Title: [146528] trunk/Source/WebKit/blackberry
Revision
146528
Author
commit-qu...@webkit.org
Date
2013-03-21 15:11:40 -0700 (Thu, 21 Mar 2013)

Log Message

[BlackBerry] Last paragraph can't be selected by touch hold selection if there is no new line after it in subframe.
https://bugs.webkit.org/show_bug.cgi?id=112966

Patch by Iris Wu <sh...@blackberry.com> on 2013-03-21
Reviewed by Rob Buis.

PR 312044
Reviewed Internally By Genevieve Mak.

If selection reaches the bottom of content, ignore scroll margin
so the text on the bottom can be selected.
Stop expanding selection only if the end of document is selected
or touch is released.

* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::expandSelection):
(BlackBerry::WebKit::SelectionHandler::ensureSelectedTextVisible):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/ChangeLog (146527 => 146528)


--- trunk/Source/WebKit/blackberry/ChangeLog	2013-03-21 21:53:35 UTC (rev 146527)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2013-03-21 22:11:40 UTC (rev 146528)
@@ -1,3 +1,22 @@
+2013-03-21  Iris Wu  <sh...@blackberry.com>
+
+        [BlackBerry] Last paragraph can't be selected by touch hold selection if there is no new line after it in subframe.
+        https://bugs.webkit.org/show_bug.cgi?id=112966
+
+        Reviewed by Rob Buis.
+
+        PR 312044
+        Reviewed Internally By Genevieve Mak.
+
+        If selection reaches the bottom of content, ignore scroll margin
+        so the text on the bottom can be selected.
+        Stop expanding selection only if the end of document is selected
+        or touch is released.
+
+        * WebKitSupport/SelectionHandler.cpp:
+        (BlackBerry::WebKit::SelectionHandler::expandSelection):
+        (BlackBerry::WebKit::SelectionHandler::ensureSelectedTextVisible):
+
 2013-03-21  Otto Derek Cheung  <otche...@rim.com>
 
         [BlackBerry] addSearchProvider shouldn't match the full host, only the server

Modified: trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp (146527 => 146528)


--- trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp	2013-03-21 21:53:35 UTC (rev 146527)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp	2013-03-21 22:11:40 UTC (rev 146528)
@@ -764,7 +764,6 @@
         if (!findNextAnimationOverlayRegion()) {
             drawAnimationOverlay(m_nextAnimationOverlayRegion, false);
             selectNextParagraph();
-            m_webPage->m_client->stopExpandingSelection();
             return;
         }
 
@@ -784,7 +783,8 @@
 {
     WebCore::IntRect viewportRect = selectionViewportRect();
     if (!scrollIfNeeded)
-        return viewportRect.maxY() >= point.y() + m_scrollMargin.height();
+        // If reaching the bottom of content, ignore scroll margin so the text on the bottom can be selected.
+        return viewportRect.maxY() >= m_webPage->contentsSize().height() ? viewportRect.maxY() >= point.y() : viewportRect.maxY() >= point.y() + m_scrollMargin.height();
 
     // Scroll position adjustment here is based on main frame. If selecting in a subframe, don't do animation.
     if (!m_selectionViewportRect.isEmpty())
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to