Title: [228465] trunk/Source/WebCore
Revision
228465
Author
za...@apple.com
Date
2018-02-14 09:47:15 -0800 (Wed, 14 Feb 2018)

Log Message

[RenderTreeBuilder] Remove redundant RenderTreeBuilder methods
https://bugs.webkit.org/show_bug.cgi?id=182770
<rdar://problem/37525627>

Reviewed by Daniel Bates.

No change in functionality.

* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::dropAnonymousBoxChild): Deleted.
(WebCore::RenderTreeBuilder::moveRubyChildren): Deleted.
(WebCore::RenderTreeBuilder::resolveMovedChildForMultiColumnFlow): Deleted.
* rendering/updating/RenderTreeBuilder.h:
* rendering/updating/RenderTreeBuilderBlockFlow.cpp:
(WebCore::RenderTreeBuilder::BlockFlow::insertChild):
* rendering/updating/RenderTreeBuilderInline.cpp:
(WebCore::RenderTreeBuilder::Inline::insertChild):
* rendering/updating/RenderTreeBuilderRuby.cpp:
(WebCore::RenderTreeBuilder::Ruby::takeChild):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (228464 => 228465)


--- trunk/Source/WebCore/ChangeLog	2018-02-14 17:11:11 UTC (rev 228464)
+++ trunk/Source/WebCore/ChangeLog	2018-02-14 17:47:15 UTC (rev 228465)
@@ -1,5 +1,27 @@
 2018-02-14  Zalan Bujtas  <za...@apple.com>
 
+        [RenderTreeBuilder] Remove redundant RenderTreeBuilder methods
+        https://bugs.webkit.org/show_bug.cgi?id=182770
+        <rdar://problem/37525627>
+
+        Reviewed by Daniel Bates.
+
+        No change in functionality.
+
+        * rendering/updating/RenderTreeBuilder.cpp:
+        (WebCore::RenderTreeBuilder::dropAnonymousBoxChild): Deleted.
+        (WebCore::RenderTreeBuilder::moveRubyChildren): Deleted.
+        (WebCore::RenderTreeBuilder::resolveMovedChildForMultiColumnFlow): Deleted.
+        * rendering/updating/RenderTreeBuilder.h:
+        * rendering/updating/RenderTreeBuilderBlockFlow.cpp:
+        (WebCore::RenderTreeBuilder::BlockFlow::insertChild):
+        * rendering/updating/RenderTreeBuilderInline.cpp:
+        (WebCore::RenderTreeBuilder::Inline::insertChild):
+        * rendering/updating/RenderTreeBuilderRuby.cpp:
+        (WebCore::RenderTreeBuilder::Ruby::takeChild):
+
+2018-02-14  Zalan Bujtas  <za...@apple.com>
+
         [RenderTreeBuilder] Move RenderElement::takeChild() to RenderTreeBuilder
         https://bugs.webkit.org/show_bug.cgi?id=182762
         <rdar://problem/37523756>

Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp (228464 => 228465)


--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp	2018-02-14 17:11:11 UTC (rev 228464)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp	2018-02-14 17:47:15 UTC (rev 228465)
@@ -457,11 +457,6 @@
     // WARNING: child is deleted here.
 }
 
-void RenderTreeBuilder::dropAnonymousBoxChild(RenderBlock& parent, RenderBlock& child)
-{
-    blockBuilder().dropAnonymousBoxChild(parent, child);
-}
-
 void RenderTreeBuilder::insertChildToRenderInline(RenderInline& parent, RenderPtr<RenderObject> child, RenderObject* beforeChild)
 {
     inlineBuilder().insertChild(parent, WTFMove(child), beforeChild);
@@ -507,11 +502,6 @@
     tableBuilder().insertChild(parent, WTFMove(child), beforeChild);
 }
 
-void RenderTreeBuilder::moveRubyChildren(RenderRubyBase& from, RenderRubyBase& to)
-{
-    rubyBuilder().moveChildren(from, to);
-}
-
 void RenderTreeBuilder::insertChildToRenderBlockFlow(RenderBlockFlow& parent, RenderPtr<RenderObject> child, RenderObject* beforeChild)
 {
     blockFlowBuilder().insertChild(parent, WTFMove(child), beforeChild);
@@ -532,11 +522,6 @@
         multiColumnBuilder().updateAfterDescendants(downcast<RenderBlockFlow>(renderer));
 }
 
-RenderObject* RenderTreeBuilder::resolveMovedChildForMultiColumnFlow(RenderFragmentedFlow& enclosingFragmentedFlow, RenderObject* beforeChild)
-{
-    return multiColumnBuilder().resolveMovedChild(enclosingFragmentedFlow, beforeChild);
-}
-
 RenderPtr<RenderObject> RenderTreeBuilder::takeChildFromRenderMenuList(RenderMenuList& parent, RenderObject& child)
 {
     auto* innerRenderer = parent.innerRenderer();

Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.h (228464 => 228465)


--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.h	2018-02-14 17:11:11 UTC (rev 228464)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.h	2018-02-14 17:47:15 UTC (rev 228465)
@@ -80,16 +80,10 @@
 
     RenderPtr<RenderObject> takeChildFromRenderElement(RenderElement& parent, RenderObject& child) WARN_UNUSED_RETURN;
 
-    bool childRequiresTable(const RenderElement& parent, const RenderObject& child);
-    void makeChildrenNonInline(RenderBlock& parent, RenderObject* insertionPoint = nullptr);
-    RenderObject* splitAnonymousBoxesAroundChild(RenderBox& parent, RenderObject* beforeChild);
-    void moveRubyChildren(RenderRubyBase& from, RenderRubyBase& to);
     void childFlowStateChangesAndAffectsParentBlock(RenderElement& child);
     void childFlowStateChangesAndNoLongerAffectsParentBlock(RenderElement& child);
-    RenderObject* resolveMovedChildForMultiColumnFlow(RenderFragmentedFlow& enclosingFragmentedFlow, RenderObject* beforeChild);
     void removeFromParentAndDestroyCleaningUpAnonymousWrappers(RenderObject& child);
     void multiColumnDescendantInserted(RenderMultiColumnFlow&, RenderObject& newDescendant);
-    void dropAnonymousBoxChild(RenderBlock& parent, RenderBlock& child);
 
 private:
     class FirstLetter;
@@ -104,6 +98,8 @@
     class SVG;
     class MathML;
 
+    RenderObject* splitAnonymousBoxesAroundChild(RenderBox& parent, RenderObject* beforeChild);
+    void makeChildrenNonInline(RenderBlock& parent, RenderObject* insertionPoint = nullptr);
     void removeAnonymousWrappersForInlineChildrenIfNeeded(RenderElement& parent);
     RenderPtr<RenderObject> takeChildFromRenderMenuList(RenderMenuList& parent, RenderObject& child);
     RenderPtr<RenderObject> takeChildFromRenderButton(RenderButton& parent, RenderObject& child);

Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilderBlockFlow.cpp (228464 => 228465)


--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilderBlockFlow.cpp	2018-02-14 17:11:11 UTC (rev 228464)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilderBlockFlow.cpp	2018-02-14 17:47:15 UTC (rev 228465)
@@ -41,7 +41,7 @@
         return m_builder.insertChild(*parent.multiColumnFlow(), WTFMove(child), beforeChild);
     auto* beforeChildOrPlaceholder = beforeChild;
     if (auto* containingFragmentedFlow = parent.enclosingFragmentedFlow())
-        beforeChildOrPlaceholder = m_builder.resolveMovedChildForMultiColumnFlow(*containingFragmentedFlow, beforeChild);
+        beforeChildOrPlaceholder = m_builder.multiColumnBuilder().resolveMovedChild(*containingFragmentedFlow, beforeChild);
     m_builder.insertChildToRenderBlock(parent, WTFMove(child), beforeChildOrPlaceholder);
 }
 

Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilderInline.cpp (228464 => 228465)


--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilderInline.cpp	2018-02-14 17:11:11 UTC (rev 228464)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilderInline.cpp	2018-02-14 17:47:15 UTC (rev 228465)
@@ -106,7 +106,7 @@
 {
     auto* beforeChildOrPlaceholder = beforeChild;
     if (auto* fragmentedFlow = parent.enclosingFragmentedFlow())
-        beforeChildOrPlaceholder = m_builder.resolveMovedChildForMultiColumnFlow(*fragmentedFlow, beforeChild);
+        beforeChildOrPlaceholder = m_builder.multiColumnBuilder().resolveMovedChild(*fragmentedFlow, beforeChild);
     if (parent.continuation()) {
         insertChildToContinuation(parent, WTFMove(child), beforeChildOrPlaceholder);
         return;

Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp (228464 => 228465)


--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp	2018-02-14 17:11:11 UTC (rev 228464)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp	2018-02-14 17:47:15 UTC (rev 228465)
@@ -435,7 +435,7 @@
             if (rightRun.hasRubyBase()) {
                 RenderRubyBase* rightBase = rightRun.rubyBase();
                 // Collect all children in a single base, then swap the bases.
-                m_builder.moveRubyChildren(*rightBase, *base);
+                moveChildren(*rightBase, *base);
                 parent.moveChildTo(m_builder, &rightRun, base, RenderBoxModelObject::NormalizeAfterInsertion::No);
                 rightRun.moveChildTo(m_builder, &parent, rightBase, RenderBoxModelObject::NormalizeAfterInsertion::No);
                 // The now empty ruby base will be removed below.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to