Title: [100022] trunk/Source/WebCore
Revision
100022
Author
bda...@apple.com
Date
2011-11-11 14:19:24 -0800 (Fri, 11 Nov 2011)

Log Message

https://bugs.webkit.org/show_bug.cgi?id=72167
REGRESSION: Scroll position not restored on back after scroll 
-and corresponding-
<rdar://problem/10410684>

Reviewed by Simon Fraser.

We can't just return early if we are not on an active page. 
notifyPositionChanged() is called when a page is going into the page cache (and 
therefore when not on an active page). We should not notify AppKit that the page 
has scrolled in that case, but we still need to call 
ScrollAnimator::notifyPositionChanged();. So this patch removes the early return, 
and replaces it with a conditional around the relevant code.
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::notifyPositionChanged):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (100021 => 100022)


--- trunk/Source/WebCore/ChangeLog	2011-11-11 22:18:29 UTC (rev 100021)
+++ trunk/Source/WebCore/ChangeLog	2011-11-11 22:19:24 UTC (rev 100022)
@@ -1,3 +1,21 @@
+2011-11-11  Beth Dakin  <bda...@apple.com>
+
+        https://bugs.webkit.org/show_bug.cgi?id=72167
+        REGRESSION: Scroll position not restored on back after scroll 
+        -and corresponding-
+        <rdar://problem/10410684>
+
+        Reviewed by Simon Fraser.
+
+        We can't just return early if we are not on an active page. 
+        notifyPositionChanged() is called when a page is going into the page cache (and 
+        therefore when not on an active page). We should not notify AppKit that the page 
+        has scrolled in that case, but we still need to call 
+        ScrollAnimator::notifyPositionChanged();. So this patch removes the early return, 
+        and replaces it with a conditional around the relevant code.
+        * platform/mac/ScrollAnimatorMac.mm:
+        (WebCore::ScrollAnimatorMac::notifyPositionChanged):
+
 2011-11-11  Julien Chaffraix  <jchaffr...@codeaurora.org>, Zaheer Ahmad  <zahi...@codeaurora.org>, Joone Hur  <joone....@collabora.co.uk>, Tomasz Morawski  <t.moraw...@samsung.com>
 
         Added TileCairo and TiledBackingStoreBackendCairo files

Modified: trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm (100021 => 100022)


--- trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm	2011-11-11 22:18:29 UTC (rev 100021)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm	2011-11-11 22:19:24 UTC (rev 100022)
@@ -711,10 +711,12 @@
 
 void ScrollAnimatorMac::notifyPositionChanged()
 {
-    if (!scrollableArea()->isOnActivePage())
-        return;
 #if USE(SCROLLBAR_PAINTER)
-    [m_scrollbarPainterController.get() contentAreaScrolled];
+    // This function is called when a page is going into the page cache, but the page 
+    // isn't really scrolling in that case. We should only pass the message on to the
+    // ScrollbarPainterController when we're really scrolling on an active page.
+    if (scrollableArea()->isOnActivePage())
+        [m_scrollbarPainterController.get() contentAreaScrolled];
 #endif
     ScrollAnimator::notifyPositionChanged();
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to