Bug 248220

Summary: [css-text] word-spacing does not allow calculated values
Product: WebKit Reporter: Antoine Quint <graouts>
Component: AnimationsAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: dino, graouts, karlcow, mmaxfield, webkit-bug-importer
Priority: P2 Keywords: BrowserCompat, InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=248218
Bug Depends on:    
Bug Blocks: 235768    

Antoine Quint
Reported 2022-11-22 06:10:01 PST
While we support both fixed and percentage values for word-spacing, we do not support calculated values. The custom BuilderConverter::convertWordSpacing() does not account for calculated values and RenderStyle::setWordSpacing() computes a canned value when dealing with a calculated length. While we added support for blending between percentage and fixed values in bug 248218, this still causes failures in three animation tests where the keyframes use calc()` values: web-animations/animation-model/animation-types/accumulation-per-property-002.html web-animations/animation-model/animation-types/addition-per-property-002.html web-animations/animation-model/animation-types/interpolation-per-property-002.html
Attachments
Antoine Quint
Comment 1 2022-11-22 06:17:53 PST
I must say I am a bit confused here. The spec for word-spacing (https://w3c.github.io/csswg-drafts/css-text/#word-spacing-property) says percentages are *not* supported. However, both Safari and Firefox clearly have support for percentages and there are several WPT tests for this on the animation side. BUT, also, the WPT parsing tests explicitly call out percentages as non-supported (see https://github.com/web-platform-tests/wpt/blob/master/css/css-text/parsing/word-spacing-invalid.html).
Radar WebKit Bug Importer
Comment 2 2022-11-29 06:10:15 PST
Note You need to log in before you can comment on or make changes to this bug.