LibWeb: Consider semicolon in parse_descriptor_value a SyntaxError

Everywhere we use this expects us to parse the whole value, either
because we are parsing the value of a declaration (in which case there
will be no semicolons), or because it is called from a JS setter which
takes whole values and semicolons make the value invalid.

Previously we would just ignore everything after a semicolon.

This also allows us to avoid creating a new `Vector` and copying all the
component values
This commit is contained in:
Callum Law
2026-03-28 20:26:23 +13:00
committed by Sam Atkins
parent 7d2f772317
commit 8b66e7f463
Notes: github-actions[bot] 2026-03-30 18:59:04 +00:00
3 changed files with 25 additions and 10 deletions

View File

@@ -0,0 +1,13 @@
<!doctype html>
<script src="../include.js"></script>
<script>
test(() => {
const face = new FontFace("Foo", "url(foo.woff2)");
try {
face.weight = "400;";
println(`FAIL`);
} catch (error) {
println(`PASS`);
}
});
</script>