Bug 1851227 [wpt PR 41766] - Make standards-track pseudo-elements override style...
commitdf771abef452338184a8d77ee79f3762d65b18e5
authorL. David Baron <dbaron@chromium.org>
Fri, 8 Sep 2023 22:27:27 +0000 (8 22:27 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Wed, 13 Sep 2023 11:40:47 +0000 (13 11:40 +0000)
tree447eb724abdef32d3d8c8f2638b6a3d7f2a783ab
parentf28fdd976c9cda6bab646d758fb4e05ebff9a13f
Bug 1851227 [wpt PR 41766] - Make standards-track pseudo-elements override style attributes in UA shadow DOM., a=testonly

Automatic update from web-platform-tests
Make standards-track pseudo-elements override style attributes in UA shadow DOM.

This makes pseudo-elements representing elements in user-agent shadow
DOM (via Element::ShadowPseudoId()) whose names do not begin with
-webkit- or -internal- override style attributes in the user-agent
shadow DOM.  This matches developer expectations and makes sense given
https://drafts.csswg.org/css-cascade-5/#cascade-context since the
pseudo-elements are in an outer context.

The only such pseudo-elements that exist today are the experimental
::details-content and ::details-summary pseudo-elements.  (See the
DCHECK() in Element::SetShadowPseudoId().)

TODO(https://crbug.com/1478230): Devtools does not currently show the
correct cascading order since it assumes that style attributes always
win.  We should fix this before shipping this code.

Bug: 146941814782301479329
Change-Id: I246e6436fd1f68622f73afe2f8c709ed35ad6cd2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4823787
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1193109}

--

wpt-commits: 29bbb35f49c12f778c205401ec817905a847129b
wpt-pr: 41766
testing/web-platform/tests/html/rendering/the-details-element/details-pseudo-elements-002-ref.html [new file with mode: 0644]
testing/web-platform/tests/html/rendering/the-details-element/details-pseudo-elements-002.tentative.html [new file with mode: 0644]