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:
Sam Atkins 2025-10-02 11:51:06 +01:00 committed by Jelle Raaijmakers
parent b3bdb202f8
commit 89c89470ef
Notes: github-actions[bot] 2025-10-02 11:27:30 +00:00
3 changed files with 18 additions and 9 deletions

View file

@ -0,0 +1,7 @@
<!DOCTYPE html>
<style>
div {
font: 5px sans-serif;
}
</style>
<div>this text should be quite small</div>

View 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>