LibWeb: Add support for the 'all' CSS property

The "longhands" array is populated in the code generator to avoid the
overhead of manually maintaining the list in Properties.json

There is one subtest that still fails in
'cssstyledeclaration-csstext-all-shorthand', this is related to
us not maintaining the relative order of CSS declarations for custom vs
non-custom properties.
This commit is contained in:
Callum Law
2025-06-10 01:31:14 +12:00
committed by Sam Atkins
parent 0762d57f65
commit d31a58a7d6
Notes: github-actions[bot] 2025-06-12 14:26:43 +00:00
16 changed files with 199 additions and 82 deletions

View File

@@ -0,0 +1,17 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSSStyleDeclaration.removeProperty("all")</title>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="author" title="Mozilla" href="https://mozilla.org">
<link rel="help" href="https://drafts.csswg.org/cssom-1/#dom-cssstyledeclaration-removeproperty">
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
test(function() {
let style = document.createElement("div").style;
style.width = "40px";
assert_equals(style.length, 1, "setter should work as expected");
style.removeProperty("all");
assert_equals(style.length, 0, "all is a shorthand of all properties, so should remove the property");
});
</script>