[BlackBerry] Selection handles don't drag to expand correctly for RTL languages
authornghanavatian@rim.com <nghanavatian@rim.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Mar 2013 22:12:27 +0000 (22:12 +0000)
committernghanavatian@rim.com <nghanavatian@rim.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Mar 2013 22:12:27 +0000 (22:12 +0000)
https://bugs.webkit.org/show_bug.cgi?id=111618

Reviewed by Rob Buis.

PR 303712
If we are using a RTL language, we should ensure that the selection handles are angled the right way.
Further, when expanding the selection, the start and end handles should be appropriately set so that
expansion in the natural direction is possible.

Internally reviewed by Mike Fenton.

* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::SelectionHandler):
(BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
* WebKitSupport/SelectionHandler.h:
(SelectionHandler):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144977 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp

index 17a5328..16a3b6e 100644 (file)
@@ -1,3 +1,23 @@
+2013-03-06  Nima Ghanavatian  <nghanavatian@rim.com>
+
+        [BlackBerry] Selection handles don't drag to expand correctly for RTL languages
+        https://bugs.webkit.org/show_bug.cgi?id=111618
+
+        Reviewed by Rob Buis.
+
+        PR 303712
+        If we are using a RTL language, we should ensure that the selection handles are angled the right way.
+        Further, when expanding the selection, the start and end handles should be appropriately set so that
+        expansion in the natural direction is possible.
+
+        Internally reviewed by Mike Fenton.
+
+        * WebKitSupport/SelectionHandler.cpp:
+        (BlackBerry::WebKit::SelectionHandler::SelectionHandler):
+        (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
+        * WebKitSupport/SelectionHandler.h:
+        (SelectionHandler):
+
 2013-03-06  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [BlackBerry] Use the new authenticationChallenge API in WebPage
index 7e2ade7..48eab74 100644 (file)
@@ -1205,7 +1205,7 @@ void SelectionHandler::selectionPositionChanged(bool forceUpdateWithoutChange)
         }
     }
 
-    if (!frame->selection()->selection().isBaseFirst() || isRTL ) {
+    if (!frame->selection()->selection().isBaseFirst()) {
         // End handle comes before start, invert the caret reference points.
         WebCore::IntRect tmpCaret(startCaret);
         startCaret = endCaret;
@@ -1220,10 +1220,9 @@ void SelectionHandler::selectionPositionChanged(bool forceUpdateWithoutChange)
     if (m_webPage->m_selectionOverlay)
         m_webPage->m_selectionOverlay->draw(visibleSelectionRegion);
 
-
     VisibleSelection currentSelection = frame->selection()->selection();
     SelectionDetails details(startCaret, endCaret, visibleSelectionRegion, inputNodeOverridesTouch(),
-        m_lastSelection != currentSelection, requestedSelectionHandlePosition(frame->selection()->selection()));
+        m_lastSelection != currentSelection, requestedSelectionHandlePosition(frame->selection()->selection()), isRTL);
 
     m_webPage->m_client->notifySelectionDetailsChanged(details);
     m_lastSelection = currentSelection;