Title: [109019] trunk/Source/WebKit/blackberry
Revision
109019
Author
commit-qu...@webkit.org
Date
2012-02-27 13:22:19 -0800 (Mon, 27 Feb 2012)

Log Message

[BlackBerry] Selection handling should be entirely directional
https://bugs.webkit.org/show_bug.cgi?id=79692

Patch by Mike Fenton <mifen...@rim.com> on 2012-02-27
Reviewed by Antonio Gomes.

Make all VisibleSelections directional.

* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
(BlackBerry::WebKit::SelectionHandler::setSelection):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/ChangeLog (109018 => 109019)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-02-27 21:10:52 UTC (rev 109018)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-02-27 21:22:19 UTC (rev 109019)
@@ -1,3 +1,16 @@
+2012-02-27  Mike Fenton  <mifen...@rim.com>
+
+        [BlackBerry] Selection handling should be entirely directional
+        https://bugs.webkit.org/show_bug.cgi?id=79692
+
+        Reviewed by Antonio Gomes.
+
+        Make all VisibleSelections directional.
+
+        * WebKitSupport/SelectionHandler.cpp:
+        (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
+        (BlackBerry::WebKit::SelectionHandler::setSelection):
+
 2012-02-27  Ed Baker  <edba...@rim.com>
 
         [BlackBerry] Dragging a selection handle outside of the content bounding box does not update the selection range correctly

Modified: trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp (109018 => 109019)


--- trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp	2012-02-27 21:10:52 UTC (rev 109018)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp	2012-02-27 21:22:19 UTC (rev 109019)
@@ -393,13 +393,13 @@
         character = extendSelectionToFieldBoundary(true /* isStartHandle */, relativeStart, newSelection);
         if (character) {
             // Invert the selection so that the cursor point is at the beginning.
-            controller->setSelection(VisibleSelection(controller->selection().end(), controller->selection().start()));
+            controller->setSelection(VisibleSelection(controller->selection().end(), controller->selection().start(), true /* isDirectional */));
         }
     } else if (endIsOutsideOfField) {
         character = extendSelectionToFieldBoundary(false /* isStartHandle */, relativeEnd, newSelection);
         if (character) {
             // Reset the selection so that the end is the edit point.
-            controller->setSelection(VisibleSelection(controller->selection().start(), controller->selection().end()));
+            controller->setSelection(VisibleSelection(controller->selection().start(), controller->selection().end(), true /* isDirectional */));
         }
     }
 
@@ -445,7 +445,7 @@
 
     // We need the selection to be ordered base then extent.
     if (!controller->selection().isBaseFirst())
-        controller->setSelection(VisibleSelection(controller->selection().start(), controller->selection().end()));
+        controller->setSelection(VisibleSelection(controller->selection().start(), controller->selection().end(), true /* isDirectional */));
 
     if (startIsValid) {
         relativeStart = DOMSupport::convertPointToFrame(m_webPage->mainFrame(), focusedFrame, start);
@@ -467,6 +467,8 @@
         newSelection.setWithoutValidation(controller->selection().start(), newSelection.extent());
     }
 
+    newSelection.setIsDirectional(true);
+
     if (m_webPage->m_inputHandler->isInputMode()) {
         if (updateOrHandleInputSelection(newSelection, relativeStart, relativeEnd))
             return;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to