Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6df95a07177b83708160af79c215ab09cc673480
      
https://github.com/WebKit/WebKit/commit/6df95a07177b83708160af79c215ab09cc673480
  Author: Ahmad Saleem <[email protected]>
  Date:   2025-06-15 (Sun, 15 Jun 2025)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/marker-default-styles-expected.txt
    M Source/WebCore/css/html.css
    M Source/WebCore/style/PropertyAllowlist.cpp

  Log Message:
  -----------
  [css-pseudo] Reflect in computed style that text-indent doesn't apply in 
::marker

https://bugs.webkit.org/show_bug.cgi?id=294522

Reviewed by Tim Nguyen.

This patch aligns WebKit with Blink / Chromium.

Inspired by: 
https://chromium.googlesource.com/chromium/src.git/+/da2ab72e3cb6d747044f9035d1d8968acd45ca20

The CSSWG resolved in https://github.com/w3c/csswg-drafts/issues/4568 that 
properties like
'text-indent', which do not apply to ::marker, must not affect the marker
via inheritance from ancestors.

WebKit already ignored 'text-indent' on ::marker in practice, so this change
is a no-op in terms of actual rendering behavior. However, this patch ensures
that the computed style accurately reflects that 'text-indent' does not apply
to ::marker.

To do this, the patch sets 'text-indent: 0px !important' in the UA stylesheet 
for
::marker. Additionally, because WebKit filters UA styles through a property 
allowlist,
'text-indent' had to be added to that list to take effect.

This aligns WebKit's computed style behavior with the spec and other engines.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/marker-default-styles-expected.txt:
* Source/WebCore/css/html.css:
(::marker):
* Source/WebCore/style/PropertyAllowlist.cpp:
(WebCore::Style::isValidMarkerStyleProperty):

Canonical link: https://commits.webkit.org/296253@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to