From f07c3f6391e9d895fec70e6721134f02b826ae41 Mon Sep 17 00:00:00 2001 From: Callum Law Date: Thu, 6 Nov 2025 12:07:49 +1300 Subject: [PATCH 1/2] [css-values-4] Remove erroneous tag --- css-values-4/Overview.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css-values-4/Overview.bs b/css-values-4/Overview.bs index e575d5ce41f..98926317063 100644 --- a/css-values-4/Overview.bs +++ b/css-values-4/Overview.bs @@ -1153,7 +1153,7 @@ URL Processing Model 1. If |cssRuleOrDeclaration| is a [=CSS declaration block=] whose [=parent CSS rule=] is not null, set |cssRuleOrDeclaration| to |cssRuleOrDeclaration|'s [=parent CSS rule=]. - 1. If |cssRuleOrDeclaration| is a [=CSS rule=], set |sheet| to |cssRuleOrDeclaration|'s {{CSSRule/parentStyleSheet|parent style sheet}}. + 1. If |cssRuleOrDeclaration| is a [=CSS rule=], set |sheet| to |cssRuleOrDeclaration|'s {{CSSRule/parentStyleSheet|parent style sheet}}. 1. If |sheet| is not null: 1. If |sheet|'s stylesheet base URL is not null, From ca3bf58687066ba4aa3116b7c598bcae1f484dbe Mon Sep 17 00:00:00 2001 From: Callum Law Date: Thu, 6 Nov 2025 12:10:33 +1300 Subject: [PATCH 2/2] [css-values-4] Properly handle simplification of sum nodes containing negated sum nodes #13020 A WPT test already exists in the form of css/css-values/calc-nesting-002.html --- css-values-4/Overview.bs | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/css-values-4/Overview.bs b/css-values-4/Overview.bs index 98926317063..47d5e153747 100644 --- a/css-values-4/Overview.bs +++ b/css-values-4/Overview.bs @@ -4906,7 +4906,28 @@ Simplification (0 - value). 2. If |root|'s child is a Negate node, return the child's child. - 3. Return |root|. + 3. If |root|'s child is a Sum node: + + 1. Let |negated grandchildren| be an empty list + + 2. For each |grandchild| of the child's children: + + 1. If |grandchild| is a numeric value, + create an equivalent numeric value, + but with the value negated + (0 - value), + and append the result to |negated grandchildren|. + + 2. If |grandchild| is a Negate node + append |grandchild|'s child to |negated grandchildren| + + 3. Otherwise, + create a Negate node with |grandchild| as its child, + and append the result to |negated grandchildren| + + 3. Return a Sum node with |negated grandchildren| as its children + + 4. Return |root|. 7. If |root| is an Invert node: