Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5de207b95f0aa705fa0c654f455c7da6925d5bb2
      
https://github.com/WebKit/WebKit/commit/5de207b95f0aa705fa0c654f455c7da6925d5bb2
  Author: Kiet Ho <[email protected]>
  Date:   2026-08-31 (Mon, 31 Aug 2026)

  Changed paths:
    M 
Source/WebCore/style/computed/StyleComputedStyleProperties+GettersCustomInlines.h
    M Source/WebCore/style/values/ui/StyleAccentColor.cpp
    M Source/WebCore/style/values/ui/StyleAccentColor.h

  Log Message:
  -----------
  accent-color: auto shouldn't resolve to currentColor
rdar://185139910
https://bugs.webkit.org/show_bug.cgi?id=321956

Reviewed by Sam Weinig.

The ColorPropertyTraits implementation for accent-color calls
Style::AccentColor::colorOrCurrentColor, which computes accent-color: auto
to currentColor, which then resolves to the element's current color. But
according to the spec, accent-color: auto should resolve to an "UA-chosen
color, which should match the accent color of the platform, if any." [1]
Hence a more sensible default would be to resolve to AccentColor, which
RenderTheme would resolve to a fixed color.

Fix this by renaming colorOrCurrentColor to colorOrDefaultColor, and
changing it to return AccentColor when accent-color is auto.

No tests because nothing exercised this path yet.

[1]: https://drafts.csswg.org/css-ui/#valdef-accent-color-auto

* 
Source/WebCore/style/computed/StyleComputedStyleProperties+GettersCustomInlines.h:
(WebCore::Style::ColorPropertyTraits<PropertyNameConstant<CSSPropertyAccentColor>>::color):
* Source/WebCore/style/values/ui/StyleAccentColor.cpp:
(WebCore::Style::AccentColor::colorOrDefaultColor const):
(WebCore::Style::AccentColor::colorOrCurrentColor const): Deleted.
* Source/WebCore/style/values/ui/StyleAccentColor.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to