Bug 296914

Summary: text-decoration-color: Style::Color::isCurrentColor is somehow broken for animations
Product: WebKit Reporter: Vitor Roriz <vitor.roriz>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: graouts, koivisto, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Vitor Roriz
Reported 2025-08-04 22:05:58 PDT
I’m implementing text-decoration shorthand and I have some animation tests failing because textDecorationColor.isCurrentColor() returns false when it should. It is used when serializing the shorthand for its computed value from Style::Extractor. It works fine for all other tests. We use it for knowing whether we should serialize color (text-decoration-color) or it should be omitted (in case it is current color): imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002.html imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002.html imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002.html For example, for accumulation-per-property-002.html it should match currentColor (which is rgb(0, 0, 0)), so we should omit it but we are serializing it to rgb(0, 0, 0) as textDecorationColor.isCurrentColor() is returning false.
Attachments
Vitor Roriz
Comment 1 2025-08-08 14:48:52 PDT
The same issue happens for text-emphasis, it went unnoticed because the animation tests above are not testing the text-emphasis shorthand.
Radar WebKit Bug Importer
Comment 2 2025-08-09 20:49:35 PDT
Note You need to log in before you can comment on or make changes to this bug.