Title: [218477] branches/safari-603-branch/Source/WebCore

Diff

Modified: branches/safari-603-branch/Source/WebCore/ChangeLog (218476 => 218477)


--- branches/safari-603-branch/Source/WebCore/ChangeLog	2017-06-19 05:39:01 UTC (rev 218476)
+++ branches/safari-603-branch/Source/WebCore/ChangeLog	2017-06-19 05:40:53 UTC (rev 218477)
@@ -1,5 +1,9 @@
 2017-06-18  Babak Shafiei  <bshaf...@apple.com>
 
+        Roll out r210226.
+
+2017-06-18  Babak Shafiei  <bshaf...@apple.com>
+
         Roll out r211501.
 
 2017-06-18  Babak Shafiei  <bshaf...@apple.com>

Modified: branches/safari-603-branch/Source/WebCore/dom/Document.cpp (218476 => 218477)


--- branches/safari-603-branch/Source/WebCore/dom/Document.cpp	2017-06-19 05:39:01 UTC (rev 218476)
+++ branches/safari-603-branch/Source/WebCore/dom/Document.cpp	2017-06-19 05:40:53 UTC (rev 218477)
@@ -2237,6 +2237,7 @@
 void Document::destroyRenderTree()
 {
     ASSERT(hasLivingRenderTree());
+    ASSERT(m_pageCacheState != InPageCache);
 
     FrameView* frameView = frame()->document() == this ? frame()->view() : nullptr;
 

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


--- branches/safari-603-branch/Source/WebCore/history/CachedFrame.cpp	2017-06-19 05:39:01 UTC (rev 218476)
+++ branches/safari-603-branch/Source/WebCore/history/CachedFrame.cpp	2017-06-19 05:40:53 UTC (rev 218477)
@@ -120,7 +120,6 @@
         m_document->page()->chrome().client().needTouchEvents(true);
 #endif
 
-    frame.view()->didRestoreFromPageCache();
 }
 
 CachedFrame::CachedFrame(Frame& frame)

Modified: branches/safari-603-branch/Source/WebCore/history/PageCache.cpp (218476 => 218477)


--- branches/safari-603-branch/Source/WebCore/history/PageCache.cpp	2017-06-19 05:39:01 UTC (rev 218476)
+++ branches/safari-603-branch/Source/WebCore/history/PageCache.cpp	2017-06-19 05:40:53 UTC (rev 218477)
@@ -377,20 +377,6 @@
     }
 }
 
-// When entering page cache, tear down the render tree before setting the in-cache flag.
-// This maintains the invariant that render trees are never present in the page cache.
-// Note that destruction happens bottom-up so that the main frame's tree dies last.
-static void destroyRenderTree(MainFrame& mainFrame)
-{
-    for (Frame* frame = mainFrame.tree().traversePreviousWithWrap(true); frame; frame = frame->tree().traversePreviousWithWrap(false)) {
-        if (!frame->document())
-            continue;
-        auto& document = *frame->document();
-        if (document.hasLivingRenderTree())
-            document.destroyRenderTree();
-    }
-}
-
 static void firePageHideEventRecursively(Frame& frame)
 {
     auto* document = frame.document();
@@ -434,8 +420,6 @@
         return;
     }
 
-    destroyRenderTree(page->mainFrame());
-
     setPageCacheState(*page, Document::InPageCache);
 
     // Make sure we no longer fire any JS events past this point.

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


--- branches/safari-603-branch/Source/WebCore/page/FrameView.cpp	2017-06-19 05:39:01 UTC (rev 218476)
+++ branches/safari-603-branch/Source/WebCore/page/FrameView.cpp	2017-06-19 05:40:53 UTC (rev 218477)
@@ -657,13 +657,6 @@
     ASSERT(!frame().animation().hasAnimations());
 }
 
-void FrameView::didRestoreFromPageCache()
-{
-    // When restoring from page cache, the main frame stays in place while subframes get swapped in.
-    // We update the scrollable area set to ensure that scrolling data structures get invalidated.
-    updateScrollableAreaSet();
-}
-
 void FrameView::setContentsSize(const IntSize& size)
 {
     if (size == contentsSize())

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


--- branches/safari-603-branch/Source/WebCore/page/FrameView.h	2017-06-19 05:39:01 UTC (rev 218476)
+++ branches/safari-603-branch/Source/WebCore/page/FrameView.h	2017-06-19 05:40:53 UTC (rev 218477)
@@ -595,8 +595,6 @@
     void willDestroyRenderTree();
     void didDestroyRenderTree();
 
-    void didRestoreFromPageCache();
-
 protected:
     bool scrollContentsFastPath(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect) override;
     void scrollContentsSlowPath(const IntRect& updateRect) override;

Modified: branches/safari-603-branch/Source/WebCore/page/animation/AnimationBase.cpp (218476 => 218477)


--- branches/safari-603-branch/Source/WebCore/page/animation/AnimationBase.cpp	2017-06-19 05:39:01 UTC (rev 218476)
+++ branches/safari-603-branch/Source/WebCore/page/animation/AnimationBase.cpp	2017-06-19 05:40:53 UTC (rev 218477)
@@ -89,11 +89,9 @@
 
 void AnimationBase::setNeedsStyleRecalc(Element* element)
 {
-    if (!element || element->document().renderTreeBeingDestroyed())
-        return;
-
-    ASSERT(element->document().pageCacheState() == Document::NotInPageCache);
-    element->invalidateStyleAndLayerComposition();
+    ASSERT(!element || element->document().pageCacheState() == Document::NotInPageCache);
+    if (element)
+        element->invalidateStyleAndLayerComposition();
 }
 
 double AnimationBase::duration() const

Modified: branches/safari-603-branch/Source/WebCore/page/animation/AnimationController.cpp (218476 => 218477)


--- branches/safari-603-branch/Source/WebCore/page/animation/AnimationController.cpp	2017-06-19 05:39:01 UTC (rev 218476)
+++ branches/safari-603-branch/Source/WebCore/page/animation/AnimationController.cpp	2017-06-19 05:40:53 UTC (rev 218477)
@@ -588,10 +588,9 @@
         return;
 
     Element* element = renderer.element();
-    if (!element || element->document().renderTreeBeingDestroyed())
-        return;
-    ASSERT(element->document().pageCacheState() == Document::NotInPageCache);
-    element->invalidateStyleAndLayerComposition();
+    ASSERT(!element || element->document().pageCacheState() == Document::NotInPageCache);
+    if (element)
+        element->invalidateStyleAndLayerComposition();
 }
 
 bool AnimationController::updateAnimations(RenderElement& renderer, const RenderStyle& newStyle, std::unique_ptr<RenderStyle>& animatedStyle)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to