OSDN Git Service

Do not reveal selection unless the focus controller is active.
authorLeon Scroggins <scroggo@google.com>
Thu, 20 Jan 2011 13:10:49 +0000 (08:10 -0500)
committerLeon Scroggins <scroggo@google.com>
Thu, 20 Jan 2011 13:10:49 +0000 (08:10 -0500)
Bug:3370821
Bug:3073288

Also remove unnecessary callers to setUserInitiatedAction.

Change-Id: I682b9498bb48771a92e856e32e16072007c53f72

WebKit/android/jni/WebViewCore.cpp

index de85f19..eebcb31 100644 (file)
@@ -1445,10 +1445,9 @@ void WebViewCore::revealSelection()
         && !isContentEditable(focus))
         return;
     WebCore::Frame* focusedFrame = focus->document()->frame();
-    WebFrame* webFrame = WebFrame::getWebFrame(focusedFrame);
-    webFrame->setUserInitiatedAction(true);
+    if (!focusedFrame->page()->focusController()->isActive())
+        return;
     focusedFrame->selection()->revealSelection();
-    webFrame->setUserInitiatedAction(false);
 }
 
 void WebViewCore::updateCacheOnNodeChange()