Treat component failures leniently in @font-face src: parsing #40620
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.
Adapt font-face src: parsing behavior to more leniently accept a src:
line that has parse errors in an individual component. Part of Interop
2023 in the font feature detection and palettes category [1].
Also return serialized values in lowercase to match CSSOM spec.
After CSS WG resolution [1] and updated spec text [2] individually
failing src: line components for incorrect format() or tech(), or other
parse failures per component should not lead to dropping the whole src:
line, but only reject the individual component.
Implement checks for component sanity and on failure, skip to next comma
or end.
[1] https://wpt.fyi/results/css/css-fonts/parsing?q=label%3Ainterop-2023-fonts
[1] w3c/csswg-drafts#6340
[2] https://drafts.csswg.org/css-fonts-4/#font-face-src-parsing
Fixed: 1398933, 857226
Change-Id: Ib94f745fb8b453e21fd981973c29dccb4b722439
Reviewed-on: https://chromium-review.googlesource.com/4624052
WPT-Export-Revision: 7d63f5ec4d7c75f0b2ffa2befa6ed70edcda9f48