Title: [139060] trunk/Source/WebKit/blackberry
Revision
139060
Author
[email protected]
Date
2013-01-08 08:28:49 -0800 (Tue, 08 Jan 2013)

Log Message

[BlackBerry] Can't select text out of current focused input
https://bugs.webkit.org/show_bug.cgi?id=106322

Patch by Sean Wang <[email protected]> on 2013-01-08
Reviewed by Rob Buis.

PR270755
Internally reviewed by Mike Fenton

When selection changed, the selection handler clips new selection with
current focused node's boundary. So we clear focus before selectObject.
This patch clear focus when selectObject is at a point but not at a node.

* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::selectObject):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/ChangeLog (139059 => 139060)


--- trunk/Source/WebKit/blackberry/ChangeLog	2013-01-08 16:08:24 UTC (rev 139059)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2013-01-08 16:28:49 UTC (rev 139060)
@@ -1,3 +1,20 @@
+2013-01-08  Sean Wang  <[email protected]>
+
+        [BlackBerry] Can't select text out of current focused input
+        https://bugs.webkit.org/show_bug.cgi?id=106322
+
+        Reviewed by Rob Buis.
+
+        PR270755
+        Internally reviewed by Mike Fenton
+
+        When selection changed, the selection handler clips new selection with
+        current focused node's boundary. So we clear focus before selectObject.
+        This patch clear focus when selectObject is at a point but not at a node.
+
+        * WebKitSupport/SelectionHandler.cpp:
+        (BlackBerry::WebKit::SelectionHandler::selectObject):
+
 2013-01-08  Steve Block  <[email protected]>
 
         Rename 'IntSize toSize(const IntPoint&)' to 'toIntSize'

Modified: trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp (139059 => 139060)


--- trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp	2013-01-08 16:08:24 UTC (rev 139059)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp	2013-01-08 16:28:49 UTC (rev 139060)
@@ -662,6 +662,10 @@
         Platform::IntPoint(location).toString().c_str());
 
     WebCore::IntPoint relativePoint = DOMSupport::convertPointToFrame(m_webPage->mainFrame(), focusedFrame, location);
+    // Clear input focus if we're not selecting in old input field.
+    if (!m_webPage->m_inputHandler->boundingBoxForInputField().contains(relativePoint))
+        m_webPage->clearFocusNode();
+
     VisiblePosition pointLocation(focusedFrame->visiblePositionForPoint(relativePoint));
     VisibleSelection selection = VisibleSelection(pointLocation, pointLocation);
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to