Title: [167198] trunk/Source/WebCore
Revision
167198
Author
simon.fra...@apple.com
Date
2014-04-13 09:41:29 -0700 (Sun, 13 Apr 2014)

Log Message

[iOS WK2] Hook up scrolling tree nodes when coming out of the page cache
https://bugs.webkit.org/show_bug.cgi?id=131577

Reviewed by Tim Horton.

The call to scrollingCoordinator->frameViewRootLayerDidChange() was inside
a #if !PLATFORM(IOS) block, but now that we use the ScrollingCoordinator
for WK2 we want to call this.

* loader/HistoryController.cpp:
(WebCore::HistoryController::restoreScrollPositionAndViewState):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (167197 => 167198)


--- trunk/Source/WebCore/ChangeLog	2014-04-13 14:59:41 UTC (rev 167197)
+++ trunk/Source/WebCore/ChangeLog	2014-04-13 16:41:29 UTC (rev 167198)
@@ -1,3 +1,17 @@
+2014-04-13  Simon Fraser  <simon.fra...@apple.com>
+
+        [iOS WK2] Hook up scrolling tree nodes when coming out of the page cache
+        https://bugs.webkit.org/show_bug.cgi?id=131577
+
+        Reviewed by Tim Horton.
+
+        The call to scrollingCoordinator->frameViewRootLayerDidChange() was inside
+        a #if !PLATFORM(IOS) block, but now that we use the ScrollingCoordinator
+        for WK2 we want to call this.
+
+        * loader/HistoryController.cpp:
+        (WebCore::HistoryController::restoreScrollPositionAndViewState):
+
 2014-04-13  Zan Dobersek  <zdober...@igalia.com>
 
         Unreviewed build fix after r167196.

Modified: trunk/Source/WebCore/loader/HistoryController.cpp (167197 => 167198)


--- trunk/Source/WebCore/loader/HistoryController.cpp	2014-04-13 14:59:41 UTC (rev 167197)
+++ trunk/Source/WebCore/loader/HistoryController.cpp	2014-04-13 16:41:29 UTC (rev 167198)
@@ -126,8 +126,6 @@
     // through to the client. It's currently used only for the PDF view on Mac.
     m_frame.loader().client().restoreViewState();
 
-    // Don't restore scroll point on iOS as FrameLoaderClient::restoreViewState() does that.
-#if !PLATFORM(IOS)
     // FIXME: There is some scrolling related work that needs to happen whenever a page goes into the
     // page cache and similar work that needs to occur when it comes out. This is where we do the work
     // that needs to happen when we exit, and the work that needs to happen when we enter is in
@@ -140,14 +138,16 @@
                 scrollingCoordinator->frameViewRootLayerDidChange(view);
         }
 
+#if !PLATFORM(IOS)
+        // Don't restore scroll point on iOS as FrameLoaderClient::restoreViewState() does that.
         if (!view->wasScrolledByUser()) {
             if (page && m_frame.isMainFrame() && m_currentItem->pageScaleFactor())
                 page->setPageScaleFactor(m_currentItem->pageScaleFactor(), m_currentItem->scrollPoint());
             else
                 view->setScrollPosition(m_currentItem->scrollPoint());
         }
+#endif
     }
-#endif
 }
 
 void HistoryController::updateBackForwardListForFragmentScroll()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to