Title: [210354] branches/safari-603-branch

Diff

Modified: branches/safari-603-branch/LayoutTests/ChangeLog (210353 => 210354)


--- branches/safari-603-branch/LayoutTests/ChangeLog	2017-01-05 17:09:34 UTC (rev 210353)
+++ branches/safari-603-branch/LayoutTests/ChangeLog	2017-01-05 17:09:38 UTC (rev 210354)
@@ -1,5 +1,22 @@
 2017-01-05  Matthew Hanson  <[email protected]>
 
+        Merge r210142. rdar://problem/29109053
+
+    2016-12-23  Andreas Kling  <[email protected]>
+
+            REGRESSION(r209865): Crash when navigating back to some pages with compositing layers.
+            <https://webkit.org/b/166469>
+            <rdar://problem/29109053>
+
+            Reviewed by Darin Adler.
+
+            Add a smoke test for the crashes we were seeing. Thanks to Zalán for the reduction.
+
+            * compositing/page-cache-back-crash-expected.txt: Added.
+            * compositing/page-cache-back-crash.html: Added.
+
+2017-01-05  Matthew Hanson  <[email protected]>
+
         Merge r210122. rdar://problem/29763012
 
     2016-12-22  Brent Fulgham  <[email protected]>

Added: branches/safari-603-branch/LayoutTests/compositing/page-cache-back-crash-expected.txt (0 => 210354)


--- branches/safari-603-branch/LayoutTests/compositing/page-cache-back-crash-expected.txt	                        (rev 0)
+++ branches/safari-603-branch/LayoutTests/compositing/page-cache-back-crash-expected.txt	2017-01-05 17:09:38 UTC (rev 210354)
@@ -0,0 +1 @@
+- Test passes if it doesn't crash.

Added: branches/safari-603-branch/LayoutTests/compositing/page-cache-back-crash.html (0 => 210354)


--- branches/safari-603-branch/LayoutTests/compositing/page-cache-back-crash.html	                        (rev 0)
+++ branches/safari-603-branch/LayoutTests/compositing/page-cache-back-crash.html	2017-01-05 17:09:38 UTC (rev 210354)
@@ -0,0 +1,25 @@
+<style>
+.outer { position: fixed; }
+.inner { position: absolute; }
+</style>
+<div class=outer>-<div class=inner></div></div>
+Test passes if it doesn't crash.
+<script>
+if (window.testRunner) {
+    window.testRunner.dumpAsText();
+    window.testRunner.waitUntilDone();
+    window.testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
+}
+
+window.addEventListener("pageshow", function(event) {
+    if (event.persisted)
+        testRunner.notifyDone();
+}, false);
+
+window.addEventListener("load", function() {
+    setTimeout(function() {
+        // Navigate to a helper page that will immediately navigate back here after loading.
+        window.location.href = ""
+    }, 0);
+});
+</script>

Modified: branches/safari-603-branch/Source/WebCore/ChangeLog (210353 => 210354)


--- branches/safari-603-branch/Source/WebCore/ChangeLog	2017-01-05 17:09:34 UTC (rev 210353)
+++ branches/safari-603-branch/Source/WebCore/ChangeLog	2017-01-05 17:09:38 UTC (rev 210354)
@@ -1,5 +1,32 @@
 2017-01-05  Matthew Hanson  <[email protected]>
 
+        Merge r210142. rdar://problem/29109053
+
+    2016-12-23  Andreas Kling  <[email protected]>
+
+            REGRESSION(r209865): Crash when navigating back to some pages with compositing layers.
+            <https://webkit.org/b/166469>
+            <rdar://problem/29109053>
+
+            Reviewed by Darin Adler.
+
+            Remove the old WK1-era clear/restoreBackingStores optimization from the page cache.
+            When enabling it on non-iOS platforms, we started hitting lots of assertions,
+            and none of our memory tests showed any significant improvement anyway.
+
+            Test: compositing/page-cache-back-crash.html
+
+            * history/CachedFrame.cpp:
+            (WebCore::CachedFrameBase::CachedFrameBase):
+            (WebCore::CachedFrameBase::restore):
+            (WebCore::CachedFrame::CachedFrame):
+            * history/CachedFrame.h:
+            * page/FrameView.cpp:
+            (WebCore::FrameView::restoreBackingStores): Deleted.
+            * page/FrameView.h:
+
+2017-01-05  Matthew Hanson  <[email protected]>
+
         Merge r210122. rdar://problem/29763012
 
     2016-12-22  Brent Fulgham  <[email protected]>

Modified: branches/safari-603-branch/Source/WebCore/history/CachedFrame.cpp (210353 => 210354)


--- branches/safari-603-branch/Source/WebCore/history/CachedFrame.cpp	2017-01-05 17:09:34 UTC (rev 210353)
+++ branches/safari-603-branch/Source/WebCore/history/CachedFrame.cpp	2017-01-05 17:09:38 UTC (rev 210354)
@@ -63,7 +63,6 @@
     , m_view(frame.view())
     , m_url(frame.document()->url())
     , m_isMainFrame(!frame.tree().parent())
-    , m_isComposited(frame.view()->hasCompositedContent())
 {
 }
 
@@ -97,9 +96,6 @@
     // cached page.
     frame.script().updatePlatformScriptObjects();
 
-    if (m_isComposited)
-        frame.view()->restoreBackingStores();
-
     frame.loader().client().didRestoreFromPageCache();
 
     // Reconstruct the FrameTree. And open the child CachedFrames in their respective FrameLoaders.
@@ -164,9 +160,6 @@
 
     frame.loader().client().savePlatformDataToCachedFrame(this);
 
-    if (m_isComposited)
-        frame.view()->clearBackingStores();
-
     // documentWillSuspendForPageCache() can set up a layout timer on the FrameView, so clear timers after that.
     frame.clearTimers();
 

Modified: branches/safari-603-branch/Source/WebCore/history/CachedFrame.h (210353 => 210354)


--- branches/safari-603-branch/Source/WebCore/history/CachedFrame.h	2017-01-05 17:09:34 UTC (rev 210353)
+++ branches/safari-603-branch/Source/WebCore/history/CachedFrame.h	2017-01-05 17:09:38 UTC (rev 210354)
@@ -60,7 +60,6 @@
     std::unique_ptr<ScriptCachedFrameData> m_cachedFrameScriptData;
     std::unique_ptr<CachedFramePlatformData> m_cachedFramePlatformData;
     bool m_isMainFrame;
-    bool m_isComposited;
     std::optional<HasInsecureContent> m_hasInsecureContent;
 
     Vector<std::unique_ptr<CachedFrame>> m_childFrames;

Modified: branches/safari-603-branch/Source/WebCore/page/FrameView.cpp (210353 => 210354)


--- branches/safari-603-branch/Source/WebCore/page/FrameView.cpp	2017-01-05 17:09:34 UTC (rev 210353)
+++ branches/safari-603-branch/Source/WebCore/page/FrameView.cpp	2017-01-05 17:09:38 UTC (rev 210354)
@@ -879,17 +879,6 @@
     compositor.clearBackingForAllLayers();
 }
 
-void FrameView::restoreBackingStores()
-{
-    RenderView* renderView = this->renderView();
-    if (!renderView)
-        return;
-
-    RenderLayerCompositor& compositor = renderView->compositor();
-    compositor.enableCompositingMode(true);
-    compositor.updateCompositingLayers(CompositingUpdateAfterLayout);
-}
-
 GraphicsLayer* FrameView::layerForScrolling() const
 {
     RenderView* renderView = this->renderView();

Modified: branches/safari-603-branch/Source/WebCore/page/FrameView.h (210353 => 210354)


--- branches/safari-603-branch/Source/WebCore/page/FrameView.h	2017-01-05 17:09:34 UTC (rev 210353)
+++ branches/safari-603-branch/Source/WebCore/page/FrameView.h	2017-01-05 17:09:38 UTC (rev 210354)
@@ -154,7 +154,6 @@
     void updateCompositingLayersAfterLayout();
 
     void clearBackingStores();
-    void restoreBackingStores();
 
     // Called when changes to the GraphicsLayer hierarchy have to be synchronized with
     // content rendered via the normal painting path.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to