Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Create inline wrappers for before/after pseudo elements that have dis…
…play:contents https://bugs.webkit.org/show_bug.cgi?id=178722 Reviewed by Ryosuke Niwa. Source/WebCore: We can handle before and after pseudo elements with display:contents by giving them inline renderers with style inherited from display:contents style. This removes need for complicated logic for this case and handles everything correctly. This is a better approach and replaces the one taken in bug 178584. It also fixes two display:contents WPTs. * dom/PseudoElement.h: There is no need to track content renderers separately anymore. They always descendants of pseudo element's renderer (which is an inline wrapper in case of display:contents). * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::copyContentFrom): * rendering/style/RenderStyle.h: * style/RenderTreeUpdaterGeneratedContent.cpp: (WebCore::createContentRenderers): (WebCore::updateStyleForContentRenderers): (WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement): (WebCore::removeAndDestroyContentRenderers): Deleted. Since content renderers are now always descendants of the pseudo renderer there is no need for a separate destruction path. * style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::resolvePseudoStyle): Create ElementUpdate with a style that will produce an inline wrapper. LayoutTests: * TestExpectations: Enable imported/w3c/web-platform-tests/css/css-display-3/display-contents-dynamic-before-after-first-letter-001.html and imported/w3c/web-platform-tests/css/css-display-3/display-contents-dynamic-before-after-001.html Canonical link: https://commits.webkit.org/194894@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223898 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
83 additions
and 46 deletions.
- +14 −0 LayoutTests/ChangeLog
- +0 −2 LayoutTests/TestExpectations
- +36 −0 Source/WebCore/ChangeLog
- +0 −3 Source/WebCore/dom/PseudoElement.h
- +7 −0 Source/WebCore/rendering/style/RenderStyle.cpp
- +1 −0 Source/WebCore/rendering/style/RenderStyle.h
- +16 −41 Source/WebCore/style/RenderTreeUpdaterGeneratedContent.cpp
- +9 −0 Source/WebCore/style/StyleTreeResolver.cpp
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
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