Title: [228704] trunk/Source/WebCore
Revision
228704
Author
za...@apple.com
Date
2018-02-19 11:55:04 -0800 (Mon, 19 Feb 2018)

Log Message

[RenderTreeBuilder] Rename RenderTreeBuilder::removeAndDestroyChild() -> removeAndDestroy()
https://bugs.webkit.org/show_bug.cgi?id=182934
<rdar://problem/37678241>

Reviewed by Antti Koivisto.

No change in functionality.

* dom/Document.cpp:
(WebCore::Document::setFullScreenRenderer):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::removeAndDestroyAllContinuations):
* rendering/RenderButton.cpp:
(WebCore::RenderButton::setText):
* rendering/RenderFullScreen.cpp:
(WebCore::RenderFullScreen::willBeDestroyed):
(WebCore::RenderFullScreen::unwrapRenderer):
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::willBeDestroyed):
* rendering/RenderTextFragment.cpp:
(WebCore::RenderTextFragment::willBeDestroyed):
(WebCore::RenderTextFragment::setText):
* rendering/RenderView.cpp:
(WebCore::RenderView::willBeDestroyed):
* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::removeAndDestroy):
(WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers):
(WebCore::RenderTreeBuilder::removeAndDestroyChild): Deleted.
* rendering/updating/RenderTreeBuilder.h:
* rendering/updating/RenderTreeBuilderBlock.cpp:
(WebCore::RenderTreeBuilder::Block::takeChild):
* rendering/updating/RenderTreeBuilderFirstLetter.cpp:
(WebCore::RenderTreeBuilder::FirstLetter::updateStyle):
(WebCore::RenderTreeBuilder::FirstLetter::createRenderers):
* rendering/updating/RenderTreeBuilderList.cpp:
(WebCore::RenderTreeBuilder::List::updateItemMarker):
* rendering/updating/RenderTreeBuilderMultiColumn.cpp:
(WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow):
(WebCore::RenderTreeBuilder::MultiColumn::handleSpannerRemoval):
* rendering/updating/RenderTreeBuilderRuby.cpp:
(WebCore::RenderTreeBuilder::Ruby::moveBlockChildren):
(WebCore::RenderTreeBuilder::Ruby::takeChild):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (228703 => 228704)


--- trunk/Source/WebCore/ChangeLog	2018-02-19 19:10:44 UTC (rev 228703)
+++ trunk/Source/WebCore/ChangeLog	2018-02-19 19:55:04 UTC (rev 228704)
@@ -1,3 +1,48 @@
+2018-02-19  Zalan Bujtas  <za...@apple.com>
+
+        [RenderTreeBuilder] Rename RenderTreeBuilder::removeAndDestroyChild() -> removeAndDestroy()
+        https://bugs.webkit.org/show_bug.cgi?id=182934
+        <rdar://problem/37678241>
+
+        Reviewed by Antti Koivisto.
+
+        No change in functionality.
+
+        * dom/Document.cpp:
+        (WebCore::Document::setFullScreenRenderer):
+        * rendering/RenderBoxModelObject.cpp:
+        (WebCore::RenderBoxModelObject::removeAndDestroyAllContinuations):
+        * rendering/RenderButton.cpp:
+        (WebCore::RenderButton::setText):
+        * rendering/RenderFullScreen.cpp:
+        (WebCore::RenderFullScreen::willBeDestroyed):
+        (WebCore::RenderFullScreen::unwrapRenderer):
+        * rendering/RenderListItem.cpp:
+        (WebCore::RenderListItem::willBeDestroyed):
+        * rendering/RenderTextFragment.cpp:
+        (WebCore::RenderTextFragment::willBeDestroyed):
+        (WebCore::RenderTextFragment::setText):
+        * rendering/RenderView.cpp:
+        (WebCore::RenderView::willBeDestroyed):
+        * rendering/updating/RenderTreeBuilder.cpp:
+        (WebCore::RenderTreeBuilder::removeAndDestroy):
+        (WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers):
+        (WebCore::RenderTreeBuilder::removeAndDestroyChild): Deleted.
+        * rendering/updating/RenderTreeBuilder.h:
+        * rendering/updating/RenderTreeBuilderBlock.cpp:
+        (WebCore::RenderTreeBuilder::Block::takeChild):
+        * rendering/updating/RenderTreeBuilderFirstLetter.cpp:
+        (WebCore::RenderTreeBuilder::FirstLetter::updateStyle):
+        (WebCore::RenderTreeBuilder::FirstLetter::createRenderers):
+        * rendering/updating/RenderTreeBuilderList.cpp:
+        (WebCore::RenderTreeBuilder::List::updateItemMarker):
+        * rendering/updating/RenderTreeBuilderMultiColumn.cpp:
+        (WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow):
+        (WebCore::RenderTreeBuilder::MultiColumn::handleSpannerRemoval):
+        * rendering/updating/RenderTreeBuilderRuby.cpp:
+        (WebCore::RenderTreeBuilder::Ruby::moveBlockChildren):
+        (WebCore::RenderTreeBuilder::Ruby::takeChild):
+
 2018-02-19  Daniel Bates  <daba...@apple.com>
 
         Do not block authentication challenge to navigated resources

Modified: trunk/Source/WebCore/dom/Document.cpp (228703 => 228704)


--- trunk/Source/WebCore/dom/Document.cpp	2018-02-19 19:10:44 UTC (rev 228703)
+++ trunk/Source/WebCore/dom/Document.cpp	2018-02-19 19:55:04 UTC (rev 228704)
@@ -6315,7 +6315,7 @@
     }
 
     if (m_fullScreenRenderer)
-        builder.removeAndDestroyChild(*m_fullScreenRenderer);
+        builder.removeAndDestroy(*m_fullScreenRenderer);
     ASSERT(!m_fullScreenRenderer);
 
     m_fullScreenRenderer = makeWeakPtr(renderer);

Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (228703 => 228704)


--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp	2018-02-19 19:10:44 UTC (rev 228703)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp	2018-02-19 19:55:04 UTC (rev 228704)
@@ -2558,7 +2558,7 @@
     ASSERT(continuationChainNodeMap().contains(this));
     auto& continuationChainNode = *continuationChainNodeMap().get(this);
     while (continuationChainNode.next)
-        builder.removeAndDestroyChild(*continuationChainNode.next->renderer);
+        builder.removeAndDestroy(*continuationChainNode.next->renderer);
     removeFromContinuationChain();
 }
 

Modified: trunk/Source/WebCore/rendering/RenderButton.cpp (228703 => 228704)


--- trunk/Source/WebCore/rendering/RenderButton.cpp	2018-02-19 19:10:44 UTC (rev 228703)
+++ trunk/Source/WebCore/rendering/RenderButton.cpp	2018-02-19 19:55:04 UTC (rev 228704)
@@ -117,9 +117,9 @@
         return;
     }
     if (RenderTreeBuilder::current())
-        RenderTreeBuilder::current()->removeAndDestroyChild(*m_buttonText);
+        RenderTreeBuilder::current()->removeAndDestroy(*m_buttonText);
     else
-        RenderTreeBuilder(*document().renderView()).removeAndDestroyChild(*m_buttonText);
+        RenderTreeBuilder(*document().renderView()).removeAndDestroy(*m_buttonText);
 }
 
 String RenderButton::text() const

Modified: trunk/Source/WebCore/rendering/RenderFullScreen.cpp (228703 => 228704)


--- trunk/Source/WebCore/rendering/RenderFullScreen.cpp	2018-02-19 19:10:44 UTC (rev 228703)
+++ trunk/Source/WebCore/rendering/RenderFullScreen.cpp	2018-02-19 19:55:04 UTC (rev 228704)
@@ -61,7 +61,7 @@
 void RenderFullScreen::willBeDestroyed(RenderTreeBuilder& builder)
 {
     if (m_placeholder) {
-        builder.removeAndDestroyChild(*m_placeholder);
+        builder.removeAndDestroy(*m_placeholder);
         ASSERT(!m_placeholder);
     }
 
@@ -169,7 +169,7 @@
                 if (auto* nonAnonymousChild = downcast<RenderBlock>(*child).firstChild())
                     child = nonAnonymousChild;
                 else {
-                    builder.removeAndDestroyChild(*child);
+                    builder.removeAndDestroy(*child);
                     continue;
                 }
             }
@@ -184,10 +184,10 @@
         }
     }
     if (placeholder())
-        builder.removeAndDestroyChild(*placeholder());
+        builder.removeAndDestroy(*placeholder());
     ASSERT(!placeholder());
 
-    builder.removeAndDestroyChild(*this);
+    builder.removeAndDestroy(*this);
 }
 
 void RenderFullScreen::createPlaceholder(std::unique_ptr<RenderStyle> style, const LayoutRect& frameRect)

Modified: trunk/Source/WebCore/rendering/RenderListItem.cpp (228703 => 228704)


--- trunk/Source/WebCore/rendering/RenderListItem.cpp	2018-02-19 19:10:44 UTC (rev 228703)
+++ trunk/Source/WebCore/rendering/RenderListItem.cpp	2018-02-19 19:55:04 UTC (rev 228704)
@@ -58,7 +58,7 @@
 void RenderListItem::willBeDestroyed(RenderTreeBuilder& builder)
 {
     if (m_marker)
-        builder.removeAndDestroyChild(*m_marker);
+        builder.removeAndDestroy(*m_marker);
     RenderBlockFlow::willBeDestroyed(builder);
 }
 

Modified: trunk/Source/WebCore/rendering/RenderTextFragment.cpp (228703 => 228704)


--- trunk/Source/WebCore/rendering/RenderTextFragment.cpp	2018-02-19 19:10:44 UTC (rev 228703)
+++ trunk/Source/WebCore/rendering/RenderTextFragment.cpp	2018-02-19 19:55:04 UTC (rev 228704)
@@ -77,7 +77,7 @@
 void RenderTextFragment::willBeDestroyed(RenderTreeBuilder& builder)
 {
     if (m_firstLetter)
-        builder.removeAndDestroyChild(*m_firstLetter);
+        builder.removeAndDestroy(*m_firstLetter);
     RenderText::willBeDestroyed(builder);
 }
 
@@ -89,9 +89,9 @@
     if (!m_firstLetter)
         return;
     if (RenderTreeBuilder::current())
-        RenderTreeBuilder::current()->removeAndDestroyChild(*m_firstLetter);
+        RenderTreeBuilder::current()->removeAndDestroy(*m_firstLetter);
     else
-        RenderTreeBuilder(*document().renderView()).removeAndDestroyChild(*m_firstLetter);
+        RenderTreeBuilder(*document().renderView()).removeAndDestroy(*m_firstLetter);
     ASSERT(!m_firstLetter);
     ASSERT(!textNode() || textNode()->renderer() == this);
 }

Modified: trunk/Source/WebCore/rendering/RenderView.cpp (228703 => 228704)


--- trunk/Source/WebCore/rendering/RenderView.cpp	2018-02-19 19:10:44 UTC (rev 228703)
+++ trunk/Source/WebCore/rendering/RenderView.cpp	2018-02-19 19:55:04 UTC (rev 228704)
@@ -616,7 +616,7 @@
     RenderBlockFlow::willBeDestroyed(builder);
     // FIXME: This is a workaround for leftover content (see webkit.org/b/182547).
     while (firstChild())
-        builder.removeAndDestroyChild(*firstChild());
+        builder.removeAndDestroy(*firstChild());
 
     ASSERT_WITH_MESSAGE(m_rendererCount == 1, "All other renderers in this render tree should have been destroyed");
 }

Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp (228703 => 228704)


--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp	2018-02-19 19:10:44 UTC (rev 228703)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp	2018-02-19 19:55:04 UTC (rev 228704)
@@ -139,7 +139,7 @@
     s_current = m_previous;
 }
 
-void RenderTreeBuilder::removeAndDestroyChild(RenderObject& child)
+void RenderTreeBuilder::removeAndDestroy(RenderObject& child)
 {
     ASSERT(child.parent());
     auto toDestroy = takeChild(*child.parent(), child);
@@ -154,7 +154,7 @@
         auto& firstChild = *childToDestroy.firstChild();
         if (auto* node = firstChild.node())
             node->setRenderer(nullptr);
-        removeAndDestroyChild(firstChild);
+        removeAndDestroy(firstChild);
     }
 }
 
@@ -646,7 +646,7 @@
 {
     // If the tree is destroyed, there is no need for a clean-up phase.
     if (child.renderTreeBeingDestroyed()) {
-        removeAndDestroyChild(child);
+        removeAndDestroy(child);
         return;
     }
 
@@ -658,7 +658,7 @@
         tableBuilder().collapseAndDestroyAnonymousSiblingRows(downcast<RenderTableRow>(destroyRoot));
 
     auto& destroyRootParent = *destroyRoot.parent();
-    removeAndDestroyChild(destroyRoot);
+    removeAndDestroy(destroyRoot);
     removeAnonymousWrappersForInlineChildrenIfNeeded(destroyRootParent);
 
     // Anonymous parent might have become empty, try to delete it too.

Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.h (228703 => 228704)


--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.h	2018-02-19 19:10:44 UTC (rev 228703)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.h	2018-02-19 19:55:04 UTC (rev 228704)
@@ -44,7 +44,7 @@
     void insertChild(RenderTreePosition&, RenderPtr<RenderObject>);
     void insertChild(RenderElement& parent, RenderPtr<RenderObject>, RenderObject* beforeChild = nullptr);
 
-    void removeAndDestroyChild(RenderObject& child);
+    void removeAndDestroy(RenderObject& child);
     RenderPtr<RenderObject> takeChild(RenderElement&, RenderObject&) WARN_UNUSED_RETURN;
 
     // NormalizeAfterInsertion::Yes ensures that the destination subtree is consistent after the insertion (anonymous wrappers etc).

Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp (228703 => 228704)


--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp	2018-02-19 19:10:44 UTC (rev 228703)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp	2018-02-19 19:55:04 UTC (rev 228704)
@@ -319,7 +319,7 @@
 
             // Delete the now-empty block's lines and nuke it.
             nextBlock.deleteLines();
-            m_builder.removeAndDestroyChild(nextBlock);
+            m_builder.removeAndDestroy(nextBlock);
             next = nullptr;
         }
     }

Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilderFirstLetter.cpp (228703 => 228704)


--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilderFirstLetter.cpp	2018-02-19 19:10:44 UTC (rev 228703)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilderFirstLetter.cpp	2018-02-19 19:55:04 UTC (rev 228704)
@@ -185,7 +185,7 @@
             remainingText->setFirstLetter(*newFirstLetter);
             newFirstLetter->setFirstLetterRemainingText(*remainingText);
         }
-        m_builder.removeAndDestroyChild(*firstLetter);
+        m_builder.removeAndDestroy(*firstLetter);
         m_builder.insertChild(*firstLetterContainer, WTFMove(newFirstLetter), nextSibling);
         return;
     }
@@ -241,7 +241,7 @@
 
         auto* textNode = currentTextChild.textNode();
         auto* beforeChild = currentTextChild.nextSibling();
-        m_builder.removeAndDestroyChild(currentTextChild);
+        m_builder.removeAndDestroy(currentTextChild);
 
         // Construct a text fragment for the text after the first letter.
         // This text fragment might be empty.

Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilderList.cpp (228703 => 228704)


--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilderList.cpp	2018-02-19 19:10:44 UTC (rev 228703)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilderList.cpp	2018-02-19 19:55:04 UTC (rev 228704)
@@ -80,7 +80,7 @@
 
     if (style.listStyleType() == NoneListStyle && (!style.listStyleImage() || style.listStyleImage()->errorOccurred())) {
         if (auto* marker = listItemRenderer.markerRenderer())
-            m_builder.removeAndDestroyChild(*marker);
+            m_builder.removeAndDestroy(*marker);
         return;
     }
 
@@ -121,7 +121,7 @@
 
     // If current parent is an anonymous block that has lost all its children, destroy it.
     if (currentParent && currentParent->isAnonymousBlock() && !currentParent->firstChild() && !downcast<RenderBlock>(*currentParent).continuation())
-        m_builder.removeAndDestroyChild(*currentParent);
+        m_builder.removeAndDestroy(*currentParent);
 }
 
 }

Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilderMultiColumn.cpp (228703 => 228704)


--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilderMultiColumn.cpp	2018-02-19 19:10:44 UTC (rev 228703)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilderMultiColumn.cpp	2018-02-19 19:55:04 UTC (rev 228704)
@@ -212,11 +212,11 @@
         parentAndSpannerList.append(std::make_pair(spannerOriginalParent, m_builder.takeChild(*spanner->parent(), *spanner)));
     }
     while (auto* columnSet = multiColumnFlow.firstMultiColumnSet())
-        m_builder.removeAndDestroyChild(*columnSet);
+        m_builder.removeAndDestroy(*columnSet);
 
     flow.clearMultiColumnFlow();
     m_builder.moveAllChildrenTo(multiColumnFlow, flow, RenderTreeBuilder::NormalizeAfterInsertion::Yes);
-    m_builder.removeAndDestroyChild(multiColumnFlow);
+    m_builder.removeAndDestroy(multiColumnFlow);
     for (auto& parentAndSpanner : parentAndSpannerList)
         m_builder.insertChild(*parentAndSpanner.first, WTFMove(parentAndSpanner.second));
 }
@@ -372,13 +372,13 @@
 {
     // The placeholder may already have been removed, but if it hasn't, do so now.
     if (auto placeholder = flow.spannerMap().take(&downcast<RenderBox>(spanner)))
-        m_builder.removeAndDestroyChild(*placeholder);
+        m_builder.removeAndDestroy(*placeholder);
 
     if (auto* next = spanner.nextSibling()) {
         if (auto* previous = spanner.previousSibling()) {
             if (previous->isRenderMultiColumnSet() && next->isRenderMultiColumnSet()) {
                 // Merge two sets that no longer will be separated by a spanner.
-                m_builder.removeAndDestroyChild(*next);
+                m_builder.removeAndDestroy(*next);
                 previous->setNeedsLayout();
             }
         }

Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp (228703 => 228704)


--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp	2018-02-19 19:10:44 UTC (rev 228703)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp	2018-02-19 19:55:04 UTC (rev 228704)
@@ -166,7 +166,7 @@
         auto* anonBlockThere = downcast<RenderBlock>(lastChildThere);
         m_builder.moveAllChildrenTo(*anonBlockHere, *anonBlockThere, RenderTreeBuilder::NormalizeAfterInsertion::Yes);
         anonBlockHere->deleteLines();
-        m_builder.removeAndDestroyChild(*anonBlockHere);
+        m_builder.removeAndDestroy(*anonBlockHere);
     }
     // Move all remaining children normally.
     m_builder.moveChildrenTo(from, to, from.firstChild(), beforeChild, RenderTreeBuilder::NormalizeAfterInsertion::No);
@@ -393,7 +393,7 @@
         ASSERT(child.isBeforeContent() || child.isAfterContent());
         auto& parent = *child.parent();
         auto takenChild = m_builder.takeChild(parent, child);
-        m_builder.removeAndDestroyChild(parent);
+        m_builder.removeAndDestroy(parent);
         return takenChild;
     }
 
@@ -417,7 +417,7 @@
         ASSERT(child.isBeforeContent() || child.isAfterContent());
         auto& parent = *child.parent();
         auto takenChild = m_builder.takeChild(parent, child);
-        m_builder.removeAndDestroyChild(parent);
+        m_builder.removeAndDestroy(parent);
         return takenChild;
     }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to