From 0924a66d1664f53afd148456e5709c471ff7240a Mon Sep 17 00:00:00 2001 From: Cary Clark Date: Thu, 9 Dec 2010 11:47:01 -0500 Subject: [PATCH] call hideCursor directly, avoiding a newer cache The WebView interface hideCursor gets a newer cache if one is available. This interface was also called when the cursor animation completes, before the cursor is drawn. Getting a newer cache at this time can cause the data in m_ring to be invalid. Pass the root cache stored as part of the ring data instead, so that the ring is drawn consistently. bug:3262275 Change-Id: Id205a10f96329e9d5ac794a8537f25a05918cafd --- WebKit/android/nav/WebView.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp index e8bd0da6c..c5ed5e588 100644 --- a/WebKit/android/nav/WebView.cpp +++ b/WebKit/android/nav/WebView.cpp @@ -231,6 +231,12 @@ void hideCursor() if (!root) return; DBG_NAV_LOG(""); + hideCursor(root); +} + +void hideCursor(CachedRoot* root) +{ + DBG_NAV_LOG("inner"); m_viewImpl->m_hasCursorBounds = false; root->hideCursor(); viewInvalidate(); @@ -405,7 +411,7 @@ void drawCursorPostamble() invalBounds.intersect(m_ring.m_absBounds); postInvalidateDelayed(m_ringAnimationEnd - time, invalBounds); } else { - hideCursor(); + hideCursor(const_cast(m_ring.m_root)); } } -- 2.11.0