[csswg-drafts] [css-fonts-4] Deduplication of computed style & inheritance for duplicate axis tags

drott has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-fonts-4] Deduplication of computed style & inheritance for duplicate axis tags ==
The review of @FremyCompany 's contributed set of test OpenType Variations test cases uncovered an issue with deduplication / resolving overspecified axis tag-value combinations.

The test case is [`css/css-fonts/variations/font-variation-settings-inherit.html`](https://github.com/w3c/web-platform-tests/pull/9373/files#diff-d5ac874d1a25c33c4b5d5c23cf89fb49).

The initial assertions in this test cases assumed that if a parent element has redundant axis tag value combinations, then after inheritance the computed style for the child element should return the result after applying the rule "last appearance supersedes any previous value" (from [8.2. Low-level font variation settings control: the font-variation-settings property](https://drafts.csswg.org/css-fonts-4/#font-variation-settings-def)).

The way I read it, the spec does not explicitly clarify at which point the resolution of duplicate axis tags should be performed. 

- Should it be performed only internally before performing OpenType layout and resolving duplicated tags just at the time of layout and rasterization _(a)_?
- Or should it be performed as soon as the values are set and then stored internally as a deduplicated / validated list _(b)_? 

Blink's implementation (and I believe WebKit, too, @litherum ?) does mostly (a), whereas Edge seems to do (b).

I believe it's cheaper not to do any validation / deduplication during CSS style resolution and inheritance and only apply the "last value supersedes any previous ones" rule when it's needed, in layout and rasterization.

We should specify the behavior for what comes back from computed style and how font-variation-settings should be inherited in order to improve interop and sharpen this test case.


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2288 using your GitHub account

Received on Thursday, 8 February 2018 09:17:59 UTC