diff --git a/servo/components/style/properties/properties.mako.rs b/servo/components/style/properties/properties.mako.rs index b733b68411ae..ef9eb3c12f7a 100644 --- a/servo/components/style/properties/properties.mako.rs +++ b/servo/components/style/properties/properties.mako.rs @@ -169,6 +169,8 @@ pub mod shorthands { continue; if not p.enabled_in_content() and not p.experimental(engine): continue; + if "Style" not in p.rule_types_allowed_names(): + continue; if p.logical: logical_longhands.append(p.name) else: diff --git a/testing/web-platform/meta/css/cssom/cssom-getPropertyValue-common-checks.html.ini b/testing/web-platform/meta/css/cssom/cssom-getPropertyValue-common-checks.html.ini deleted file mode 100644 index a9755ac45572..000000000000 --- a/testing/web-platform/meta/css/cssom/cssom-getPropertyValue-common-checks.html.ini +++ /dev/null @@ -1,9 +0,0 @@ -[cssom-getPropertyValue-common-checks.html] - [All shorthands can serialize their longhands set to 'initial'] - expected: FAIL - - [Can't serialize shorthand when longhands are set to different css-wide keywords] - expected: FAIL - - [Can't serialize shorthand when longhands have different priority] - expected: FAIL diff --git a/testing/web-platform/tests/css/cssom/cssom-getPropertyValue-common-checks.html b/testing/web-platform/tests/css/cssom/cssom-getPropertyValue-common-checks.html index 29ca39a88a65..27d802cd3df6 100644 --- a/testing/web-platform/tests/css/cssom/cssom-getPropertyValue-common-checks.html +++ b/testing/web-platform/tests/css/cssom/cssom-getPropertyValue-common-checks.html @@ -72,13 +72,11 @@ test(function() { const result = computedStyle.getPropertyValue(property); if (CSS.supports(property, result)) { initialValues.set(property, result); - } else if (property === "all") { - bad.push("all"); - } else { + } else if (property !== "all") { bad.push([property, result]); } } - assert_array_equals(bad, ["all"]); + assert_array_equals(bad, []); }, "All properties (except 'all') can serialize their initial value (computed)"); test(function() { @@ -87,7 +85,7 @@ test(function() { style.cssText = ""; style.setProperty(property, value); const result = style.getPropertyValue(property); - if (!CSS.supports(property, result)) { + if (!CSS.supports(property, result) && property !== "all") { bad.push([property, value, result]); } } @@ -121,12 +119,12 @@ test(function() { style.setProperty(longhand, initialValues.get(longhand)); } const result = style.getPropertyValue(shorthand); - if (!CSS.supports(shorthand, result)) { + if (!CSS.supports(shorthand, result) && shorthand !== "all") { bad.push([shorthand, result]); } } assert_array_equals(bad, []); -}, "All shorthands can serialize their longhands set to their initial value"); +}, "All shorthands (except 'all') can serialize their longhands set to their initial value"); test(function() { const bad = [];