Title: [145763] trunk/Source/WebKit/blackberry
- Revision
- 145763
- Author
- [email protected]
- Date
- 2013-03-13 15:30:50 -0700 (Wed, 13 Mar 2013)
Log Message
[BlackBerry] Do not do scroll position adjustment if selecting in a subframe
https://bugs.webkit.org/show_bug.cgi?id=112290
Patch by Iris Wu <[email protected]> on 2013-03-13
Reviewed by Rob Buis.
PR 267394
In SelectionHandler::ensureSelectedTextVisible(), scroll position
animation is based on main frame. If selecting in a subframe, don't
do animation.
Internally Reviewed By Genevieve Mak.
* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::ensureSelectedTextVisible):
Modified Paths
Diff
Modified: trunk/Source/WebKit/blackberry/ChangeLog (145762 => 145763)
--- trunk/Source/WebKit/blackberry/ChangeLog 2013-03-13 22:28:10 UTC (rev 145762)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2013-03-13 22:30:50 UTC (rev 145763)
@@ -1,3 +1,21 @@
+2013-03-13 Iris Wu <[email protected]>
+
+ [BlackBerry] Do not do scroll position adjustment if selecting in a subframe
+ https://bugs.webkit.org/show_bug.cgi?id=112290
+
+ Reviewed by Rob Buis.
+
+ PR 267394
+
+ In SelectionHandler::ensureSelectedTextVisible(), scroll position
+ animation is based on main frame. If selecting in a subframe, don't
+ do animation.
+
+ Internally Reviewed By Genevieve Mak.
+
+ * WebKitSupport/SelectionHandler.cpp:
+ (BlackBerry::WebKit::SelectionHandler::ensureSelectedTextVisible):
+
2013-03-13 Genevieve Mak <[email protected]>
[BlackBerry] Add Proximity Detector.
Modified: trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp (145762 => 145763)
--- trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp 2013-03-13 22:28:10 UTC (rev 145762)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp 2013-03-13 22:30:50 UTC (rev 145763)
@@ -784,6 +784,10 @@
if (!scrollIfNeeded)
return 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())
+ return false;
+
WebCore::IntRect endLocation = m_animationOverlayEndPos.absoluteCaretBounds();
Frame* focusedFrame = m_webPage->focusedOrMainFrame();
@@ -803,8 +807,6 @@
endLocation.inflateX(m_scrollMargin.width());
endLocation.inflateY(m_scrollMargin.height());
- // FIXME: The scroll position adjustment here is based on main frame.
- // If selecting in a subframe, don't do animation.
WebCore::IntRect revealRect(layer->getRectToExpose(viewportRect, endLocation, ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded));
revealRect.setX(std::min(std::max(revealRect.x(), 0), m_webPage->maximumScrollPosition().x()));
revealRect.setY(std::min(std::max(revealRect.y(), 0), m_webPage->maximumScrollPosition().y()));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes