Title: [114781] trunk/Source/WebCore
Revision
114781
Author
[email protected]
Date
2012-04-20 14:25:27 -0700 (Fri, 20 Apr 2012)

Log Message

Scrolling after going to a find-in-page result jumps to the top of the page
https://bugs.webkit.org/show_bug.cgi?id=84485
<rdar://problem/11273734>

Reviewed by Beth Dakin.

If we're both updating the requested scroll position and entering slow mode in the same commit, the
probable main thread scroll position should be the requested scroll position.

* page/scrolling/mac/ScrollingTreeNodeMac.mm:
(WebCore::ScrollingTreeNodeMac::update):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (114780 => 114781)


--- trunk/Source/WebCore/ChangeLog	2012-04-20 21:22:36 UTC (rev 114780)
+++ trunk/Source/WebCore/ChangeLog	2012-04-20 21:25:27 UTC (rev 114781)
@@ -1,3 +1,17 @@
+2012-04-20  Anders Carlsson  <[email protected]>
+
+        Scrolling after going to a find-in-page result jumps to the top of the page
+        https://bugs.webkit.org/show_bug.cgi?id=84485
+        <rdar://problem/11273734>
+
+        Reviewed by Beth Dakin.
+
+        If we're both updating the requested scroll position and entering slow mode in the same commit, the
+        probable main thread scroll position should be the requested scroll position.
+
+        * page/scrolling/mac/ScrollingTreeNodeMac.mm:
+        (WebCore::ScrollingTreeNodeMac::update):
+
 2012-04-20  James Robinson  <[email protected]>
 
         Avoid synchronously recalculating the nonFastScrollableRegion when the ScrollableArea set changes

Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeNodeMac.mm (114780 => 114781)


--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeNodeMac.mm	2012-04-20 21:22:36 UTC (rev 114780)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeNodeMac.mm	2012-04-20 21:25:27 UTC (rev 114781)
@@ -67,8 +67,12 @@
     if ((state->changedProperties() & ScrollingTreeState::ShouldUpdateScrollLayerPositionOnMainThread) && shouldUpdateScrollLayerPositionOnMainThread()) {
         // We're transitioning to the slow "update scroll layer position on the main thread" mode.
         // Initialize the probable main thread scroll position with the current scroll layer position.
-        CGPoint scrollLayerPosition = m_scrollLayer.get().position;
-        m_probableMainThreadScrollPosition = IntPoint(-scrollLayerPosition.x, -scrollLayerPosition.y);
+        if (state->changedProperties() & ScrollingTreeState::RequestedScrollPosition)
+            m_probableMainThreadScrollPosition = state->requestedScrollPosition();
+        else {
+            CGPoint scrollLayerPosition = m_scrollLayer.get().position;
+            m_probableMainThreadScrollPosition = IntPoint(-scrollLayerPosition.x, -scrollLayerPosition.y);
+        }
     }
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to