Allow specifying variable font range descriptors in either direction #22416
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Style, stretch and weight descriptor allow specifying ranges for the
variable font that the src: descriptor is referencing. The range
definitions allow both the smaller or larger value to go first and need
to be swapped by the UA.
Keep range value lists in reversed order in the computed style, but swap
them in the FontFace implementation to become meaningful values.This
keeps serialisation intact as specified in the @font - face declaration(
as opposed to reversing the list at the CSS parsing level) and matches
Firefox' behaviour.
Adjust test expectations in at-font-face-descriptors.html for bounds out
of order test cases: expect out of order bounds to be returned in order
as specified. Test case was previously failing in all browsers [1] -
with this change it will pass in Chrome and Firefox. Mark
font-parse-numeric-stretch-style-weight.html test case "500 400 matches
500 400 for weight in @font-face" as passing in Chrome.
[1] https://wpt.fyi/results/css/css-fonts/variations/at-font-face-descriptors.html?label=master&label=experimental&aligned&q=css%2Fcss-fonts%2Fvariations%2F
Fixed: 1063867
Change-Id: I5ae7bc5f3e3a75fa9dce09ca0a66dd083ef29b0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2116447
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#753192}