Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e934af67403238c454f0a7f2200babfa50ef64fb
https://github.com/WebKit/WebKit/commit/e934af67403238c454f0a7f2200babfa50ef64fb
Author: Alan Baradlay <[email protected]>
Date: 2026-09-28 (Mon, 28 Sep 2026)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/css/css-display/display-contents-dynamic-inline-parent-style-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-display/display-contents-dynamic-inline-parent-style.html
M Source/WebCore/rendering/RenderElement.cpp
M Source/WebCore/rendering/RenderInline.cpp
M Source/WebCore/rendering/updating/RenderTreeBuilderList.cpp
Log Message:
-----------
display:contents text inherits the wrong style after its parent span's style
changes
https://bugs.webkit.org/show_bug.cgi?id=325502
<rdar://problem/188591349>
Reviewed by Sam Weinig.
An inline box propagated its new style to every anonymous child, including the
anonymous inline that carries the display: contents style for a text child, so
<span><div style="display: contents; color: green">text</div></span> turned the
text to the span's color on the span's next style change.
An inline box now updates only its anonymous block and ruby children when its
style changes, like a block does. The ruby filter also includes the anonymous
ruby base. The anonymous inline carrying the display:contents style is no
longer overwritten.
An inside list marker's image lost that propagation, so its style change now
refreshes the marker's generated content the way an outside marker already does.
Test:
imported/w3c/web-platform-tests/css/css-display/display-contents-dynamic-inline-parent-style.html
*
LayoutTests/imported/w3c/web-platform-tests/css/css-display/display-contents-dynamic-inline-parent-style-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-display/display-contents-dynamic-inline-parent-style.html:
Added.
* Source/WebCore/rendering/RenderElement.cpp:
(WebCore::RenderElement::propagateStyleToAnonymousChildren):
* Source/WebCore/rendering/RenderInline.cpp:
(WebCore::RenderInline::styleDidChange):
* Source/WebCore/rendering/updating/RenderTreeBuilderList.cpp:
(WebCore::RenderTreeBuilder::List::updateItemMarker):
Canonical link: https://commits.webkit.org/322092@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications