Factor :before/:after render tree mutations into a RenderTreeUpdater helper class
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 20 Aug 2017 09:42:09 +0000 (09:42 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 20 Aug 2017 09:42:09 +0000 (09:42 +0000)
commitc890aa8ee457ea1e8427ae539eb741626442c421
tree2097a1d7e845edc80258a84e46da047729e953fb
parent9da89c38f8953e0e496c76e102cbf84ccd11fe82
Factor :before/:after render tree mutations into a RenderTreeUpdater helper class
https://bugs.webkit.org/show_bug.cgi?id=175752

Reviewed by Andreas Kling.

Move code that constructs generated content renderers out from PseudoElement.
Also refactor the related code from RenderTreeUpdater main class into
RenderTreeUpdater::GeneratedContent helper class.

* WebCore.xcodeproj/project.pbxproj:
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::resolveCustomStyle): Deleted.

    Not needed anymore.

(WebCore::PseudoElement::didAttachRenderers): Deleted.

    Moves to createContentRenderers in GeneratedContent.

(WebCore::PseudoElement::didRecalcStyle): Deleted.

    Moves to updateStyleForContentRenderers in GeneratedContent.

* dom/PseudoElement.h:
* style/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::RenderTreeUpdater):
(WebCore::RenderTreeUpdater::~RenderTreeUpdater):
(WebCore::RenderTreeUpdater::commit):
(WebCore::RenderTreeUpdater::updateBeforeDescendants):
(WebCore::RenderTreeUpdater::updateAfterDescendants):
(WebCore::needsPseudoElement): Deleted.
(WebCore::RenderTreeUpdater::updateBeforeOrAfterPseudoElement): Deleted.
(WebCore::RenderTreeUpdater::updateQuotesUpTo): Deleted.

    Quotes and other :before/:after support moves to GeneratedContent helpwe.

* style/RenderTreeUpdater.h:
(WebCore::RenderTreeUpdater::generatedContent):
* style/RenderTreeUpdaterGeneratedContent.cpp: Added.
(WebCore::RenderTreeUpdater::GeneratedContent::GeneratedContent):
(WebCore::RenderTreeUpdater::GeneratedContent::updateBeforePseudoElement):
(WebCore::RenderTreeUpdater::GeneratedContent::updateAfterPseudoElement):
(WebCore::RenderTreeUpdater::GeneratedContent::updateRemainingQuotes):
(WebCore::RenderTreeUpdater::GeneratedContent::updateQuotesUpTo):
(WebCore::createContentRenderers):
(WebCore::updateStyleForContentRenderers):
(WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement):
(WebCore::RenderTreeUpdater::GeneratedContent::needsPseudoElement):
* style/RenderTreeUpdaterGeneratedContent.h: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220956 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/dom/PseudoElement.cpp
Source/WebCore/dom/PseudoElement.h
Source/WebCore/style/RenderTreeUpdater.cpp
Source/WebCore/style/RenderTreeUpdater.h
Source/WebCore/style/RenderTreeUpdaterGeneratedContent.cpp [new file with mode: 0644]
Source/WebCore/style/RenderTreeUpdaterGeneratedContent.h [new file with mode: 0644]