Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Resolve ::before and ::after pseudo elements during style resolution
https://bugs.webkit.org/show_bug.cgi?id=178339 Reviewed by Ryosuke Niwa. They are currently resolved during render tree building which creates problems with display:contents and animations. * dom/PseudoElement.cpp: (WebCore::PseudoElement::PseudoElement): Call InspectorInstrumentation from constructor. * style/RenderTreeUpdater.cpp: (WebCore::RenderTreeUpdater::Parent::Parent): (WebCore::RenderTreeUpdater::updateRenderTree): (WebCore::RenderTreeUpdater::pushParent): Push the full update to the parent stack. (WebCore::RenderTreeUpdater::popParent): (WebCore::RenderTreeUpdater::updateBeforeDescendants): (WebCore::RenderTreeUpdater::updateAfterDescendants): (WebCore::RenderTreeUpdater::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded): * style/RenderTreeUpdater.h: * style/RenderTreeUpdaterGeneratedContent.cpp: (WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement): No need to resolve pseudo style, we have it already. (WebCore::RenderTreeUpdater::GeneratedContent::needsPseudoElement): (WebCore::RenderTreeUpdater::GeneratedContent::updateBeforePseudoElement): Deleted. (WebCore::RenderTreeUpdater::GeneratedContent::updateAfterPseudoElement): Deleted. * style/RenderTreeUpdaterGeneratedContent.h: * style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::resolveElement): (WebCore::Style::TreeResolver::resolvePseudoStyle): Resolve pseudos. (WebCore::Style::TreeResolver::createAnimatedElementUpdate): Make a private member function. (WebCore::Style::TreeResolver::resolveComposedTree): * style/StyleTreeResolver.h: * style/StyleUpdate.cpp: (WebCore::Style::Update::elementUpdates const): (WebCore::Style::Update::elementUpdates): Bundle the style update for an element and the associated before/after pseudos. (WebCore::Style::Update::elementStyle const): (WebCore::Style::Update::elementStyle): (WebCore::Style::Update::addElement): (WebCore::Style::Update::elementUpdate const): Deleted. (WebCore::Style::Update::elementUpdate): Deleted. * style/StyleUpdate.h: Canonical link: https://commits.webkit.org/194604@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223500 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
172 additions
and 79 deletions.
- +60 −0 Source/WebCore/ChangeLog
- +13 −0 Source/WebCore/dom/PseudoElement.cpp
- +1 −4 Source/WebCore/dom/PseudoElement.h
- +20 −18 Source/WebCore/style/RenderTreeUpdater.cpp
- +5 −5 Source/WebCore/style/RenderTreeUpdater.h
- +10 −24 Source/WebCore/style/RenderTreeUpdaterGeneratedContent.cpp
- +2 −4 Source/WebCore/style/RenderTreeUpdaterGeneratedContent.h
- +31 −9 Source/WebCore/style/StyleTreeResolver.cpp
- +3 −3 Source/WebCore/style/StyleTreeResolver.h
- +8 −8 Source/WebCore/style/StyleUpdate.cpp
- +19 −4 Source/WebCore/style/StyleUpdate.h
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.