From 7a69d7c255012f3fcc4d9af040600eac1b2e5c56 Mon Sep 17 00:00:00 2001 From: Cary Clark Date: Wed, 25 Aug 2010 17:49:25 -0400 Subject: [PATCH] fix button cursor state Clear the pressed state for buttons when the cursor is shown indefinitely, and set look for the pressed cursor state when recording the button colors. Change-Id: I78095ec9a7580c372c66b83913447b8214a6a432 http://b/2135321 --- WebKit/android/nav/WebView.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp index c06146138..e12dc5236 100644 --- a/WebKit/android/nav/WebView.cpp +++ b/WebKit/android/nav/WebView.cpp @@ -265,7 +265,7 @@ void nativeRecordButtons(bool hasFocus, bool pressed, bool invalidate) // button if (!hasFocus) { state = WebCore::RenderSkinAndroid::kNormal; - } else if (pressed) { + } else if (pressed || m_ring.m_isPressed) { state = WebCore::RenderSkinAndroid::kPressed; } else { state = WebCore::RenderSkinAndroid::kFocused; @@ -957,6 +957,7 @@ void showCursorTimed() void showCursorUntimed() { DBG_NAV_LOG(""); + m_ring.m_isPressed = false; m_ringAnimationEnd = UINT_MAX; viewInvalidate(); } -- 2.11.0