Bug 248220 - [css-text] word-spacing does not allow calculated values
Summary: [css-text] word-spacing does not allow calculated values
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks: 235768
  Show dependency treegraph
 
Reported: 2022-11-22 06:10 PST by Antoine Quint
Modified: 2022-11-29 06:10 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 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
Comment 1 Antoine Quint 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).
Comment 2 Radar WebKit Bug Importer 2022-11-29 06:10:15 PST
<rdar://problem/102763017>