Bug 1800950 - Exclude 'size' from the 'all' shorthand. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D162568
This commit is contained in:
Oriol Brufau 2022-11-22 17:17:25 +00:00
parent c3f9c6d123
commit 0af7c79aa4
3 changed files with 7 additions and 16 deletions

View File

@ -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:

View File

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

View File

@ -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 = [];