mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb/CSS: Stop rejecting declarations with vendor-prefixed keywords
property_accepts_type() only looks at the property itself, not any longhands it might have, so we thought that `font` didn't accept `<custom-ident>`s, and seeing "-apple-..." makes us throw out the declaration even though it's valid as a font name. We'll reject these like any other unrecognized value if it's somewhere that's not supported, so this was really just an optimization for a rare edge case, and removing the check doesn't have any observable effect except fixing this bug and any similar cases. Changing property_accepts_type() to look at longhands is not straightforward, as not all longhand values are valid in the shorthand.
This commit is contained in:
parent
b3bdb202f8
commit
89c89470ef
Notes:
github-actions[bot]
2025-10-02 11:27:30 +00:00
Author: https://github.com/AtkinsSJ
Commit: 89c89470ef
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6366
Reviewed-by: https://github.com/gmta ✅
3 changed files with 18 additions and 9 deletions
|
|
@ -0,0 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
div {
|
||||
font: 5px sans-serif;
|
||||
}
|
||||
</style>
|
||||
<div>this text should be quite small</div>
|
||||
8
Tests/LibWeb/Ref/input/css/vendor-prefixed-font.html
Normal file
8
Tests/LibWeb/Ref/input/css/vendor-prefixed-font.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="match" href="../../expected/css/vendor-prefixed-font-ref.html" />
|
||||
<style>
|
||||
div {
|
||||
font: 5px -apple-flibbertigibbet, sans-serif;
|
||||
}
|
||||
</style>
|
||||
<div>this text should be quite small</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue