Render tree teardown should be iterative
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Apr 2016 15:04:02 +0000 (15:04 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Apr 2016 15:04:02 +0000 (15:04 +0000)
commitef617f512b3b6a27ee8013b161f1227109ed3a35
tree068897ddf586c1df30a15f1bcb93e85ec185124e
parentec62b4d704acf99140ff4eac6bf28423bfa04421
Render tree teardown should be iterative
https://bugs.webkit.org/show_bug.cgi?id=156233

Reviewed by Andreas Kling.

* dom/ContainerNode.cpp:
(WebCore::destroyRenderTreeIfNeeded):
(WebCore::ContainerNode::takeAllChildrenFrom):
* dom/Document.cpp:
(WebCore::Document::destroyRenderTree):
* dom/Element.cpp:
(WebCore::disconnectPseudoElement):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::prepareForDocumentSuspension):
* mathml/MathMLSelectElement.cpp:
(WebCore::MathMLSelectElement::updateSelectedChild):
* style/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::updateElementRenderer):
(WebCore::RenderTreeUpdater::updateTextRenderer):
(WebCore::RenderTreeUpdater::updateBeforeOrAfterPseudoElement):
(WebCore::RenderTreeUpdater::tearDownRenderers):

    Tear down render tree using ComposedTreeIterator for traversal.

(WebCore::RenderTreeUpdater::tearDownRenderer):

* style/RenderTreeUpdater.h:
* style/StyleTreeResolver.cpp:
(WebCore::Style::ensurePlaceholderStyle):
(WebCore::Style::TreeResolver::styleForElement):
(WebCore::Style::resetStyleForNonRenderedDescendants):
(WebCore::Style::affectsRenderedSubtree):
(WebCore::Style::SelectorFilterPusher::SelectorFilterPusher): Deleted.
(WebCore::Style::SelectorFilterPusher::push): Deleted.
(WebCore::Style::SelectorFilterPusher::~SelectorFilterPusher): Deleted.

    Unused class.

(WebCore::Style::detachTextRenderer): Deleted.
(WebCore::Style::detachChildren): Deleted.
(WebCore::Style::detachShadowRoot): Deleted.
(WebCore::Style::detachSlotAssignees): Deleted.
(WebCore::Style::detachRenderTree): Deleted.

    Remove the old recursive code.

* style/StyleTreeResolver.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199056 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/ContainerNode.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Element.cpp
Source/WebCore/html/HTMLPlugInImageElement.cpp
Source/WebCore/mathml/MathMLSelectElement.cpp
Source/WebCore/style/RenderTreeUpdater.cpp
Source/WebCore/style/RenderTreeUpdater.h
Source/WebCore/style/StyleTreeResolver.cpp
Source/WebCore/style/StyleTreeResolver.h