Skip to content
Permalink
Browse files
[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):


Canonical link: https://commits.webkit.org/129990@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Nima Ghanavatian committed Mar 6, 2013
1 parent 6146046 commit 698744626aac4a05c786a94fc9e520a2f976511a
Showing 2 changed files with 22 additions and 3 deletions.
@@ -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
@@ -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;

0 comments on commit 6987446

Please sign in to comment.