Title: [178689] trunk/Source/WebCore
Revision
178689
Author
commit-qu...@webkit.org
Date
2015-01-19 19:43:00 -0800 (Mon, 19 Jan 2015)

Log Message

Unreviewed, rolling out r178683.
https://bugs.webkit.org/show_bug.cgi?id=140657

Lots of asserts in tests. (Requested by JoePeck on #webkit).

Reverted changeset:

"LayoutState and subtree layout code should use
RenderElement."
https://bugs.webkit.org/show_bug.cgi?id=126878
http://trac.webkit.org/changeset/178683

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (178688 => 178689)


--- trunk/Source/WebCore/ChangeLog	2015-01-20 03:38:56 UTC (rev 178688)
+++ trunk/Source/WebCore/ChangeLog	2015-01-20 03:43:00 UTC (rev 178689)
@@ -1,3 +1,17 @@
+2015-01-19  Commit Queue  <commit-qu...@webkit.org>
+
+        Unreviewed, rolling out r178683.
+        https://bugs.webkit.org/show_bug.cgi?id=140657
+
+        Lots of asserts in tests. (Requested by JoePeck on #webkit).
+
+        Reverted changeset:
+
+        "LayoutState and subtree layout code should use
+        RenderElement."
+        https://bugs.webkit.org/show_bug.cgi?id=126878
+        http://trac.webkit.org/changeset/178683
+
 2015-01-19  Brent Fulgham  <bfulg...@apple.com>
 
         [Win] Unreviewed gardening.

Modified: trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp (178688 => 178689)


--- trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp	2015-01-20 03:38:56 UTC (rev 178688)
+++ trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp	2015-01-20 03:43:00 UTC (rev 178689)
@@ -282,7 +282,7 @@
 
 void InspectorTimelineAgent::willLayout(Frame& frame)
 {
-    RenderElement* root = frame.view()->layoutRoot();
+    RenderObject* root = frame.view()->layoutRoot();
     bool partialLayout = !!root;
 
     if (!partialLayout)

Modified: trunk/Source/WebCore/page/FrameView.cpp (178688 => 178689)


--- trunk/Source/WebCore/page/FrameView.cpp	2015-01-20 03:38:56 UTC (rev 178688)
+++ trunk/Source/WebCore/page/FrameView.cpp	2015-01-20 03:43:00 UTC (rev 178689)
@@ -1083,9 +1083,9 @@
         renderView->setIsInWindow(isInWindow);
 }
 
-RenderElement* FrameView::layoutRoot(bool onlyDuringLayout) const
+RenderObject* FrameView::layoutRoot(bool onlyDuringLayout) const
 {
-    return onlyDuringLayout && layoutPending() ? nullptr : m_layoutRoot;
+    return onlyDuringLayout && layoutPending() ? 0 : m_layoutRoot;
 }
 
 inline void FrameView::forceLayoutParentViewIfNeeded()
@@ -1301,7 +1301,7 @@
 
         bool disableLayoutState = false;
         if (subtree) {
-            disableLayoutState = root->view().shouldDisableLayoutStateForSubtree(*root);
+            disableLayoutState = root->view().shouldDisableLayoutStateForSubtree(root);
             root->view().pushLayoutState(*root);
         }
         LayoutStateDisabler layoutStateDisabler(disableLayoutState ? &root->view() : 0);

Modified: trunk/Source/WebCore/page/FrameView.h (178688 => 178689)


--- trunk/Source/WebCore/page/FrameView.h	2015-01-20 03:38:56 UTC (rev 178688)
+++ trunk/Source/WebCore/page/FrameView.h	2015-01-20 03:43:00 UTC (rev 178689)
@@ -114,7 +114,7 @@
     bool layoutPending() const;
     bool isInLayout() const { return m_layoutPhase == InLayout; }
 
-    RenderElement* layoutRoot(bool _onlyDuringLayout_ = false) const;
+    RenderObject* layoutRoot(bool _onlyDuringLayout_ = false) const;
     void clearLayoutRoot() { m_layoutRoot = nullptr; }
     int layoutCount() const { return m_layoutCount; }
 

Modified: trunk/Source/WebCore/rendering/LayoutState.cpp (178688 => 178689)


--- trunk/Source/WebCore/rendering/LayoutState.cpp	2015-01-20 03:38:56 UTC (rev 178688)
+++ trunk/Source/WebCore/rendering/LayoutState.cpp	2015-01-20 03:43:00 UTC (rev 178689)
@@ -122,7 +122,7 @@
     // FIXME: <http://bugs.webkit.org/show_bug.cgi?id=13443> Apply control clip if present.
 }
 
-LayoutState::LayoutState(RenderElement& root)
+LayoutState::LayoutState(RenderObject& root)
     : m_clipped(false)
     , m_isPaginated(false)
     , m_pageLogicalHeightChanged(false)

Modified: trunk/Source/WebCore/rendering/LayoutState.h (178688 => 178689)


--- trunk/Source/WebCore/rendering/LayoutState.h	2015-01-20 03:38:56 UTC (rev 178688)
+++ trunk/Source/WebCore/rendering/LayoutState.h	2015-01-20 03:43:00 UTC (rev 178689)
@@ -37,6 +37,7 @@
 class RenderBox;
 class RenderElement;
 class RenderFlowThread;
+class RenderObject;
 class ShapeInsideInfo;
 
 class LayoutState {
@@ -60,7 +61,7 @@
     }
 
     LayoutState(std::unique_ptr<LayoutState>, RenderBox*, const LayoutSize& offset, LayoutUnit pageHeight, bool pageHeightChanged);
-    explicit LayoutState(RenderElement&);
+    explicit LayoutState(RenderObject&);
 
     void clearPaginationInformation();
     bool isPaginated() const { return m_isPaginated; }
@@ -128,7 +129,7 @@
     RenderFlowThread* m_currentRenderFlowThread { nullptr };
 
 #ifndef NDEBUG
-    RenderElement* m_renderer;
+    RenderObject* m_renderer;
 #endif
 };
 

Modified: trunk/Source/WebCore/rendering/RenderElement.cpp (178688 => 178689)


--- trunk/Source/WebCore/rendering/RenderElement.cpp	2015-01-20 03:38:56 UTC (rev 178688)
+++ trunk/Source/WebCore/rendering/RenderElement.cpp	2015-01-20 03:43:00 UTC (rev 178689)
@@ -1064,14 +1064,6 @@
     if (hasCounterNodeMap())
         RenderCounter::destroyCounterNodes(*this);
 
-    if (!documentBeingDestroyed() && view().frameView().layoutRoot() == this) {
-        ASSERT_NOT_REACHED();
-        // This indicates a failure to layout the child, which is why
-        // the layout root is still set to |this|. Make sure to clear it
-        // since we are getting destroyed.
-        view().frameView().clearLayoutRoot();
-    }
-
     RenderObject::willBeDestroyed();
 
 #if !ASSERT_DISABLED

Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (178688 => 178689)


--- trunk/Source/WebCore/rendering/RenderObject.cpp	2015-01-20 03:38:56 UTC (rev 178688)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp	2015-01-20 03:43:00 UTC (rev 178689)
@@ -1865,6 +1865,20 @@
         || view().selectionUnsplitEnd() == this;
 }
 
+inline void RenderObject::clearLayoutRootIfNeeded() const
+{
+    if (documentBeingDestroyed())
+        return;
+
+    if (view().frameView().layoutRoot() == this) {
+        ASSERT_NOT_REACHED();
+        // This indicates a failure to layout the child, which is why
+        // the layout root is still set to |this|. Make sure to clear it
+        // since we are getting destroyed.
+        view().frameView().clearLayoutRoot();
+    }
+}
+
 void RenderObject::willBeDestroyed()
 {
     // For accessibility management, notify the parent of the imminent change to its child set.
@@ -1887,6 +1901,8 @@
         setHasLayer(false);
         downcast<RenderLayerModelObject>(*this).destroyLayer();
     }
+
+    clearLayoutRootIfNeeded();
 }
 
 void RenderObject::insertedIntoTree()

Modified: trunk/Source/WebCore/rendering/RenderObject.h (178688 => 178689)


--- trunk/Source/WebCore/rendering/RenderObject.h	2015-01-20 03:38:56 UTC (rev 178688)
+++ trunk/Source/WebCore/rendering/RenderObject.h	2015-01-20 03:43:00 UTC (rev 178689)
@@ -856,6 +856,7 @@
 
     void adjustRectForOutlineAndShadow(LayoutRect&) const;
 
+    void clearLayoutRootIfNeeded() const;
     virtual void willBeDestroyed();
 
     virtual void insertedIntoTree();

Modified: trunk/Source/WebCore/rendering/RenderView.cpp (178688 => 178689)


--- trunk/Source/WebCore/rendering/RenderView.cpp	2015-01-20 03:38:56 UTC (rev 178688)
+++ trunk/Source/WebCore/rendering/RenderView.cpp	2015-01-20 03:43:00 UTC (rev 178689)
@@ -1186,7 +1186,7 @@
     return frameView().frame().pageZoomFactor();
 }
 
-void RenderView::pushLayoutState(RenderElement& root)
+void RenderView::pushLayoutState(RenderObject& root)
 {
     ASSERT(m_layoutStateDisableCount == 0);
     ASSERT(m_layoutState == 0);
@@ -1195,9 +1195,9 @@
     pushLayoutStateForCurrentFlowThread(root);
 }
 
-bool RenderView::shouldDisableLayoutStateForSubtree(const RenderElement& renderer) const
+bool RenderView::shouldDisableLayoutStateForSubtree(RenderObject* renderer) const
 {
-    const RenderElement* o = &renderer;
+    RenderObject* o = renderer;
     while (o) {
         if (o->hasTransform() || o->hasReflection())
             return true;
@@ -1300,18 +1300,18 @@
     return *m_flowThreadController;
 }
 
-void RenderView::pushLayoutStateForCurrentFlowThread(const RenderElement& renderer)
+void RenderView::pushLayoutStateForCurrentFlowThread(const RenderObject& object)
 {
     if (!m_flowThreadController)
         return;
 
-    RenderFlowThread* currentFlowThread = renderer.flowThreadContainingBlock();
+    RenderFlowThread* currentFlowThread = object.flowThreadContainingBlock();
     if (!currentFlowThread)
         return;
 
     m_layoutState->setCurrentRenderFlowThread(currentFlowThread);
 
-    currentFlowThread->pushFlowThreadLayoutState(renderer);
+    currentFlowThread->pushFlowThreadLayoutState(object);
 }
 
 void RenderView::popLayoutStateForCurrentFlowThread()

Modified: trunk/Source/WebCore/rendering/RenderView.h (178688 => 178689)


--- trunk/Source/WebCore/rendering/RenderView.h	2015-01-20 03:38:56 UTC (rev 178688)
+++ trunk/Source/WebCore/rendering/RenderView.h	2015-01-20 03:43:00 UTC (rev 178689)
@@ -137,10 +137,10 @@
     bool doingFullRepaint() const { return frameView().needsFullRepaint(); }
 
     // Subtree push/pop
-    void pushLayoutState(RenderElement&);
-    void popLayoutState(RenderElement&) { return popLayoutState(); } // Just doing this to keep popLayoutState() private and to make the subtree calls symmetrical.
+    void pushLayoutState(RenderObject&);
+    void popLayoutState(RenderObject&) { return popLayoutState(); } // Just doing this to keep popLayoutState() private and to make the subtree calls symmetrical.
 
-    bool shouldDisableLayoutStateForSubtree(const RenderElement&) const;
+    bool shouldDisableLayoutStateForSubtree(RenderObject*) const;
 
     // Returns true if layoutState should be used for its cached offset and clip.
     bool layoutStateEnabled() const { return m_layoutStateDisableCount == 0 && m_layoutState; }
@@ -290,7 +290,7 @@
     void checkLayoutState(const LayoutState&);
 #endif
 
-    void pushLayoutStateForCurrentFlowThread(const RenderElement&);
+    void pushLayoutStateForCurrentFlowThread(const RenderObject&);
     void popLayoutStateForCurrentFlowThread();
 
     friend class LayoutStateMaintainer;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to