mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
LibWeb/CSS: Ensure a font source format() only contains one string/ident
This commit is contained in:
parent
52a4259ef2
commit
9f333c424c
Notes:
github-actions[bot]
2025-04-15 19:41:39 +00:00
Author: https://github.com/AtkinsSJ
Commit: 9f333c424c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4364
2 changed files with 11 additions and 5 deletions
|
@ -3711,6 +3711,12 @@ RefPtr<FontSourceStyleValue> Parser::parse_font_source_value(TokenStream<Compone
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
format_tokens.discard_whitespace();
|
||||||
|
if (format_tokens.has_next_token()) {
|
||||||
|
dbgln_if(CSS_PARSER_DEBUG, "CSSParser: font source invalid (`format()` has trailing tokens); discarding.");
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
format = move(format_name);
|
format = move(format_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@ Harness status: OK
|
||||||
|
|
||||||
Found 35 tests
|
Found 35 tests
|
||||||
|
|
||||||
30 Pass
|
33 Pass
|
||||||
5 Fail
|
2 Fail
|
||||||
Pass Check that src: url("foo.ttf") is valid
|
Pass Check that src: url("foo.ttf") is valid
|
||||||
Pass Check that src: url("foo.ttf"), url("bar.ttf") is valid
|
Pass Check that src: url("foo.ttf"), url("bar.ttf") is valid
|
||||||
Pass Check that src: url("foo.ttf") format() is invalid
|
Pass Check that src: url("foo.ttf") format() is invalid
|
||||||
|
@ -15,14 +15,14 @@ Pass Check that src: url("foo.ttf") format("opentype") is valid
|
||||||
Pass Check that src: url("foo.ttf") format("truetype") is valid
|
Pass Check that src: url("foo.ttf") format("truetype") is valid
|
||||||
Pass Check that src: url("foo.ttf") format("woff") is valid
|
Pass Check that src: url("foo.ttf") format("woff") is valid
|
||||||
Pass Check that src: url("foo.ttf") format("woff2") is valid
|
Pass Check that src: url("foo.ttf") format("woff2") is valid
|
||||||
Fail Check that src: url("foo.ttf") format("opentype", "truetype") is invalid
|
Pass Check that src: url("foo.ttf") format("opentype", "truetype") is invalid
|
||||||
Fail Check that src: url("foo.ttf") format(collection) is valid
|
Fail Check that src: url("foo.ttf") format(collection) is valid
|
||||||
Pass Check that src: url("foo.ttf") format(opentype) is valid
|
Pass Check that src: url("foo.ttf") format(opentype) is valid
|
||||||
Pass Check that src: url("foo.ttf") format(truetype) is valid
|
Pass Check that src: url("foo.ttf") format(truetype) is valid
|
||||||
Pass Check that src: url("foo.ttf") format(woff) is valid
|
Pass Check that src: url("foo.ttf") format(woff) is valid
|
||||||
Pass Check that src: url("foo.ttf") format(woff2) is valid
|
Pass Check that src: url("foo.ttf") format(woff2) is valid
|
||||||
Fail Check that src: url("foo.ttf") format(opentype, truetype) is invalid
|
Pass Check that src: url("foo.ttf") format(opentype, truetype) is invalid
|
||||||
Fail Check that src: url("foo.ttf") format(opentype truetype) is invalid
|
Pass Check that src: url("foo.ttf") format(opentype truetype) is invalid
|
||||||
Pass Check that src: url("foo.ttf") format(auto) is invalid
|
Pass Check that src: url("foo.ttf") format(auto) is invalid
|
||||||
Pass Check that src: url("foo.ttf") format(default) is invalid
|
Pass Check that src: url("foo.ttf") format(default) is invalid
|
||||||
Pass Check that src: url("foo.ttf") format(inherit) is invalid
|
Pass Check that src: url("foo.ttf") format(inherit) is invalid
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue