Truly independent web browser
LibWeb: Clamp a lone percentage calculation to its range when computed
Andreas Kling4d6442ed472b
diff --git a/Libraries/LibWeb/Rust/src/css/calc.rs b/Libraries/LibWeb/Rust/src/css/calc.rsindex 0c82ecea725..83973dd50d8 100644--- a/Libraries/LibWeb/Rust/src/css/calc.rs+++ b/Libraries/LibWeb/Rust/src/css/calc.rs@@ -4312,6 +4312,26 @@ pub(crate) fn absolutize_calculation_value({return AbsolutizedCalculation::Value(collapsed);}+ // https://drafts.csswg.org/css-values-4/#functional-numeric+ // "the value of a numeric function is clamped to the range allowed in the context it is used+ // at computed value time if possible, and at used value time otherwise."+ // NB: A lone percentage stays a calculation (see collapse_absolutized_calculation), but its+ // range is already known, so it is clamped now like a calculation that collapses.+ let simplified = match &*simplified {+ CalcNode::Numeric(leaf @ CalcNumericValue::Percentage(..)) => {+ let clamped = CalcSerializer::clamp_and_censor_numeric_leaf(+ *leaf,+ *resolve_numbers_as_integers,+ accepted_ranges.as_slice(),+ );+ if clamped == *leaf {+ simplified+ } else {+ Arc::new(CalcNode::Numeric(clamped))+ }+ }+ _ => simplified,+ };if Arc::ptr_eq(&simplified, &root) {return AbsolutizedCalculation::Unchanged;}diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/background-size.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/background-size.txtindex f2ee46dcd65..dd6f8c2be02 100644--- a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/background-size.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/background-size.txt@@ -2,8 +2,7 @@ Harness status: OKFound 35 tests-34 Pass-1 Fail+35 PassPass Can set 'background-size' to CSS-wide keywords: initialPass Can set 'background-size' to CSS-wide keywords: inheritPass Can set 'background-size' to CSS-wide keywords: unset@@ -14,7 +13,7 @@ Pass Can set 'background-size' to a length: -3.14emPass Can set 'background-size' to a length: 3.14cmPass Can set 'background-size' to a length: calc(0px + 0em)Pass Can set 'background-size' to a percent: 0%-Fail Can set 'background-size' to a percent: -3.14%+Pass Can set 'background-size' to a percent: -3.14%Pass Can set 'background-size' to a percent: 3.14%Pass Can set 'background-size' to a percent: calc(0% + 0%)Pass Can set 'background-size' to the 'auto' keyword: autodiff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/block-size.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/block-size.txtindex d27c40a6009..29964a65443 100644--- a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/block-size.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/block-size.txt@@ -2,8 +2,7 @@ Harness status: OKFound 95 tests-92 Pass-3 Fail+95 PassPass Can set 'block-size' to CSS-wide keywords: initialPass Can set 'block-size' to CSS-wide keywords: inheritPass Can set 'block-size' to CSS-wide keywords: unset@@ -11,7 +10,7 @@ Pass Can set 'block-size' to CSS-wide keywords: revertPass Can set 'block-size' to var() references: var(--A)Pass Can set 'block-size' to the 'auto' keyword: autoPass Can set 'block-size' to a percent: 0%-Fail Can set 'block-size' to a percent: -3.14%+Pass Can set 'block-size' to a percent: -3.14%Pass Can set 'block-size' to a percent: 3.14%Pass Can set 'block-size' to a percent: calc(0% + 0%)Pass Can set 'block-size' to a length: 0px@@ -42,7 +41,7 @@ Pass Can set 'min-block-size' to CSS-wide keywords: unsetPass Can set 'min-block-size' to CSS-wide keywords: revertPass Can set 'min-block-size' to var() references: var(--A)Pass Can set 'min-block-size' to a percent: 0%-Fail Can set 'min-block-size' to a percent: -3.14%+Pass Can set 'min-block-size' to a percent: -3.14%Pass Can set 'min-block-size' to a percent: 3.14%Pass Can set 'min-block-size' to a percent: calc(0% + 0%)Pass Can set 'min-block-size' to a length: 0px@@ -74,7 +73,7 @@ Pass Can set 'max-block-size' to CSS-wide keywords: revertPass Can set 'max-block-size' to var() references: var(--A)Pass Can set 'max-block-size' to the 'none' keyword: nonePass Can set 'max-block-size' to a percent: 0%-Fail Can set 'max-block-size' to a percent: -3.14%+Pass Can set 'max-block-size' to a percent: -3.14%Pass Can set 'max-block-size' to a percent: 3.14%Pass Can set 'max-block-size' to a percent: calc(0% + 0%)Pass Can set 'max-block-size' to a length: 0pxdiff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/flex-basis.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/flex-basis.txtindex 207946f44de..9c5e5403e88 100644--- a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/flex-basis.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/flex-basis.txt@@ -2,8 +2,7 @@ Harness status: OKFound 36 tests-35 Pass-1 Fail+36 PassPass Can set 'flex-basis' to CSS-wide keywords: initialPass Can set 'flex-basis' to CSS-wide keywords: inheritPass Can set 'flex-basis' to CSS-wide keywords: unset@@ -19,7 +18,7 @@ Pass Can set 'flex-basis' to a length: -3.14emPass Can set 'flex-basis' to a length: 3.14cmPass Can set 'flex-basis' to a length: calc(0px + 0em)Pass Can set 'flex-basis' to a percent: 0%-Fail Can set 'flex-basis' to a percent: -3.14%+Pass Can set 'flex-basis' to a percent: -3.14%Pass Can set 'flex-basis' to a percent: 3.14%Pass Can set 'flex-basis' to a percent: calc(0% + 0%)Pass Setting 'flex-basis' to a time: 0s throws TypeErrordiff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/gap.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/gap.txtindex 18b3ce4c949..712f42028d6 100644--- a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/gap.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/gap.txt@@ -2,8 +2,7 @@ Harness status: OKFound 64 tests-62 Pass-2 Fail+64 PassPass Can set 'column-gap' to CSS-wide keywords: initialPass Can set 'column-gap' to CSS-wide keywords: inheritPass Can set 'column-gap' to CSS-wide keywords: unset@@ -15,7 +14,7 @@ Pass Can set 'column-gap' to a length: -3.14emPass Can set 'column-gap' to a length: 3.14cmPass Can set 'column-gap' to a length: calc(0px + 0em)Pass Can set 'column-gap' to a percent: 0%-Fail Can set 'column-gap' to a percent: -3.14%+Pass Can set 'column-gap' to a percent: -3.14%Pass Can set 'column-gap' to a percent: 3.14%Pass Can set 'column-gap' to a percent: calc(0% + 0%)Pass Setting 'column-gap' to a time: 0s throws TypeError@@ -47,7 +46,7 @@ Pass Can set 'row-gap' to a length: -3.14emPass Can set 'row-gap' to a length: 3.14cmPass Can set 'row-gap' to a length: calc(0px + 0em)Pass Can set 'row-gap' to a percent: 0%-Fail Can set 'row-gap' to a percent: -3.14%+Pass Can set 'row-gap' to a percent: -3.14%Pass Can set 'row-gap' to a percent: 3.14%Pass Can set 'row-gap' to a percent: calc(0% + 0%)Pass Setting 'row-gap' to a time: 0s throws TypeErrordiff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/grid-auto-columns-rows.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/grid-auto-columns-rows.txtindex c0e9decf6bc..76631627b98 100644--- a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/grid-auto-columns-rows.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/grid-auto-columns-rows.txt@@ -2,8 +2,8 @@ Harness status: OKFound 72 tests-66 Pass-6 Fail+68 Pass+4 FailPass Can set 'grid-auto-columns' to CSS-wide keywords: initialPass Can set 'grid-auto-columns' to CSS-wide keywords: inheritPass Can set 'grid-auto-columns' to CSS-wide keywords: unset@@ -17,7 +17,7 @@ Pass Can set 'grid-auto-columns' to a length: -3.14emPass Can set 'grid-auto-columns' to a length: 3.14cmPass Can set 'grid-auto-columns' to a length: calc(0px + 0em)Pass Can set 'grid-auto-columns' to a percent: 0%-Fail Can set 'grid-auto-columns' to a percent: -3.14%+Pass Can set 'grid-auto-columns' to a percent: -3.14%Pass Can set 'grid-auto-columns' to a percent: 3.14%Pass Can set 'grid-auto-columns' to a percent: calc(0% + 0%)Fail Can set 'grid-auto-columns' to a flexible length: 0fr@@ -53,7 +53,7 @@ Pass Can set 'grid-auto-rows' to a length: -3.14emPass Can set 'grid-auto-rows' to a length: 3.14cmPass Can set 'grid-auto-rows' to a length: calc(0px + 0em)Pass Can set 'grid-auto-rows' to a percent: 0%-Fail Can set 'grid-auto-rows' to a percent: -3.14%+Pass Can set 'grid-auto-rows' to a percent: -3.14%Pass Can set 'grid-auto-rows' to a percent: 3.14%Pass Can set 'grid-auto-rows' to a percent: calc(0% + 0%)Fail Can set 'grid-auto-rows' to a flexible length: 0frdiff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/height.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/height.txtindex 114660e9c0e..efbe3443b50 100644--- a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/height.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/height.txt@@ -2,8 +2,7 @@ Harness status: OKFound 95 tests-92 Pass-3 Fail+95 PassPass Can set 'height' to CSS-wide keywords: initialPass Can set 'height' to CSS-wide keywords: inheritPass Can set 'height' to CSS-wide keywords: unset@@ -11,7 +10,7 @@ Pass Can set 'height' to CSS-wide keywords: revertPass Can set 'height' to var() references: var(--A)Pass Can set 'height' to the 'auto' keyword: autoPass Can set 'height' to a percent: 0%-Fail Can set 'height' to a percent: -3.14%+Pass Can set 'height' to a percent: -3.14%Pass Can set 'height' to a percent: 3.14%Pass Can set 'height' to a percent: calc(0% + 0%)Pass Can set 'height' to a length: 0px@@ -42,7 +41,7 @@ Pass Can set 'min-height' to CSS-wide keywords: unsetPass Can set 'min-height' to CSS-wide keywords: revertPass Can set 'min-height' to var() references: var(--A)Pass Can set 'min-height' to a percent: 0%-Fail Can set 'min-height' to a percent: -3.14%+Pass Can set 'min-height' to a percent: -3.14%Pass Can set 'min-height' to a percent: 3.14%Pass Can set 'min-height' to a percent: calc(0% + 0%)Pass Can set 'min-height' to a length: 0px@@ -74,7 +73,7 @@ Pass Can set 'max-height' to CSS-wide keywords: revertPass Can set 'max-height' to var() references: var(--A)Pass Can set 'max-height' to the 'none' keyword: nonePass Can set 'max-height' to a percent: 0%-Fail Can set 'max-height' to a percent: -3.14%+Pass Can set 'max-height' to a percent: -3.14%Pass Can set 'max-height' to a percent: 3.14%Pass Can set 'max-height' to a percent: calc(0% + 0%)Pass Can set 'max-height' to a length: 0pxdiff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/inline-size.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/inline-size.txtindex 1ca770335c4..469e38fc77f 100644--- a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/inline-size.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/inline-size.txt@@ -2,8 +2,7 @@ Harness status: OKFound 95 tests-92 Pass-3 Fail+95 PassPass Can set 'inline-size' to CSS-wide keywords: initialPass Can set 'inline-size' to CSS-wide keywords: inheritPass Can set 'inline-size' to CSS-wide keywords: unset@@ -11,7 +10,7 @@ Pass Can set 'inline-size' to CSS-wide keywords: revertPass Can set 'inline-size' to var() references: var(--A)Pass Can set 'inline-size' to the 'auto' keyword: autoPass Can set 'inline-size' to a percent: 0%-Fail Can set 'inline-size' to a percent: -3.14%+Pass Can set 'inline-size' to a percent: -3.14%Pass Can set 'inline-size' to a percent: 3.14%Pass Can set 'inline-size' to a percent: calc(0% + 0%)Pass Can set 'inline-size' to a length: 0px@@ -42,7 +41,7 @@ Pass Can set 'min-inline-size' to CSS-wide keywords: unsetPass Can set 'min-inline-size' to CSS-wide keywords: revertPass Can set 'min-inline-size' to var() references: var(--A)Pass Can set 'min-inline-size' to a percent: 0%-Fail Can set 'min-inline-size' to a percent: -3.14%+Pass Can set 'min-inline-size' to a percent: -3.14%Pass Can set 'min-inline-size' to a percent: 3.14%Pass Can set 'min-inline-size' to a percent: calc(0% + 0%)Pass Can set 'min-inline-size' to a length: 0px@@ -74,7 +73,7 @@ Pass Can set 'max-inline-size' to CSS-wide keywords: revertPass Can set 'max-inline-size' to var() references: var(--A)Pass Can set 'max-inline-size' to the 'none' keyword: nonePass Can set 'max-inline-size' to a percent: 0%-Fail Can set 'max-inline-size' to a percent: -3.14%+Pass Can set 'max-inline-size' to a percent: -3.14%Pass Can set 'max-inline-size' to a percent: 3.14%Pass Can set 'max-inline-size' to a percent: calc(0% + 0%)Pass Can set 'max-inline-size' to a length: 0pxdiff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/logical.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/logical.txtindex b1882ab11e6..565cef3932e 100644--- a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/logical.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/logical.txt@@ -196,7 +196,7 @@ Pass Can set 'padding-block-start' to CSS-wide keywords: unsetPass Can set 'padding-block-start' to CSS-wide keywords: revertPass Can set 'padding-block-start' to var() references: var(--A)Pass Can set 'padding-block-start' to a percent: 0%-Fail Can set 'padding-block-start' to a percent: -3.14%+Pass Can set 'padding-block-start' to a percent: -3.14%Pass Can set 'padding-block-start' to a percent: 3.14%Pass Can set 'padding-block-start' to a percent: calc(0% + 0%)Pass Can set 'padding-block-start' to a length: 0px@@ -227,7 +227,7 @@ Pass Can set 'padding-block-end' to CSS-wide keywords: unsetPass Can set 'padding-block-end' to CSS-wide keywords: revertPass Can set 'padding-block-end' to var() references: var(--A)Pass Can set 'padding-block-end' to a percent: 0%-Fail Can set 'padding-block-end' to a percent: -3.14%+Pass Can set 'padding-block-end' to a percent: -3.14%Pass Can set 'padding-block-end' to a percent: 3.14%Pass Can set 'padding-block-end' to a percent: calc(0% + 0%)Pass Can set 'padding-block-end' to a length: 0px@@ -258,7 +258,7 @@ Pass Can set 'padding-inline-start' to CSS-wide keywords: unsetPass Can set 'padding-inline-start' to CSS-wide keywords: revertPass Can set 'padding-inline-start' to var() references: var(--A)Pass Can set 'padding-inline-start' to a percent: 0%-Fail Can set 'padding-inline-start' to a percent: -3.14%+Pass Can set 'padding-inline-start' to a percent: -3.14%Pass Can set 'padding-inline-start' to a percent: 3.14%Pass Can set 'padding-inline-start' to a percent: calc(0% + 0%)Pass Can set 'padding-inline-start' to a length: 0px@@ -289,7 +289,7 @@ Pass Can set 'padding-inline-end' to CSS-wide keywords: unsetPass Can set 'padding-inline-end' to CSS-wide keywords: revertPass Can set 'padding-inline-end' to var() references: var(--A)Pass Can set 'padding-inline-end' to a percent: 0%-Fail Can set 'padding-inline-end' to a percent: -3.14%+Pass Can set 'padding-inline-end' to a percent: -3.14%Pass Can set 'padding-inline-end' to a percent: 3.14%Pass Can set 'padding-inline-end' to a percent: calc(0% + 0%)Pass Can set 'padding-inline-end' to a length: 0px@@ -1354,7 +1354,7 @@ Pass Can set 'border-start-start-radius' to CSS-wide keywords: unsetPass Can set 'border-start-start-radius' to CSS-wide keywords: revertPass Can set 'border-start-start-radius' to var() references: var(--A)Pass Can set 'border-start-start-radius' to a percent: 0%-Pass Can set 'border-start-start-radius' to a percent: -3.14%+Fail Can set 'border-start-start-radius' to a percent: -3.14%Pass Can set 'border-start-start-radius' to a percent: 3.14%Pass Can set 'border-start-start-radius' to a percent: calc(0% + 0%)Pass Can set 'border-start-start-radius' to a length: 0px@@ -1385,7 +1385,7 @@ Pass Can set 'border-start-end-radius' to CSS-wide keywords: unsetPass Can set 'border-start-end-radius' to CSS-wide keywords: revertPass Can set 'border-start-end-radius' to var() references: var(--A)Pass Can set 'border-start-end-radius' to a percent: 0%-Pass Can set 'border-start-end-radius' to a percent: -3.14%+Fail Can set 'border-start-end-radius' to a percent: -3.14%Pass Can set 'border-start-end-radius' to a percent: 3.14%Pass Can set 'border-start-end-radius' to a percent: calc(0% + 0%)Pass Can set 'border-start-end-radius' to a length: 0px@@ -1416,7 +1416,7 @@ Pass Can set 'border-end-start-radius' to CSS-wide keywords: unsetPass Can set 'border-end-start-radius' to CSS-wide keywords: revertPass Can set 'border-end-start-radius' to var() references: var(--A)Pass Can set 'border-end-start-radius' to a percent: 0%-Pass Can set 'border-end-start-radius' to a percent: -3.14%+Fail Can set 'border-end-start-radius' to a percent: -3.14%Pass Can set 'border-end-start-radius' to a percent: 3.14%Pass Can set 'border-end-start-radius' to a percent: calc(0% + 0%)Pass Can set 'border-end-start-radius' to a length: 0px@@ -1447,7 +1447,7 @@ Pass Can set 'border-end-end-radius' to CSS-wide keywords: unsetPass Can set 'border-end-end-radius' to CSS-wide keywords: revertPass Can set 'border-end-end-radius' to var() references: var(--A)Pass Can set 'border-end-end-radius' to a percent: 0%-Pass Can set 'border-end-end-radius' to a percent: -3.14%+Fail Can set 'border-end-end-radius' to a percent: -3.14%Pass Can set 'border-end-end-radius' to a percent: 3.14%Pass Can set 'border-end-end-radius' to a percent: calc(0% + 0%)Pass Can set 'border-end-end-radius' to a length: 0pxdiff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/padding.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/padding.txtindex 45e2bdac1ac..72618fe46ab 100644--- a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/padding.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/padding.txt@@ -2,15 +2,14 @@ Harness status: OKFound 124 tests-120 Pass-4 Fail+124 PassPass Can set 'padding-top' to CSS-wide keywords: initialPass Can set 'padding-top' to CSS-wide keywords: inheritPass Can set 'padding-top' to CSS-wide keywords: unsetPass Can set 'padding-top' to CSS-wide keywords: revertPass Can set 'padding-top' to var() references: var(--A)Pass Can set 'padding-top' to a percent: 0%-Fail Can set 'padding-top' to a percent: -3.14%+Pass Can set 'padding-top' to a percent: -3.14%Pass Can set 'padding-top' to a percent: 3.14%Pass Can set 'padding-top' to a percent: calc(0% + 0%)Pass Can set 'padding-top' to a length: 0px@@ -41,7 +40,7 @@ Pass Can set 'padding-left' to CSS-wide keywords: unsetPass Can set 'padding-left' to CSS-wide keywords: revertPass Can set 'padding-left' to var() references: var(--A)Pass Can set 'padding-left' to a percent: 0%-Fail Can set 'padding-left' to a percent: -3.14%+Pass Can set 'padding-left' to a percent: -3.14%Pass Can set 'padding-left' to a percent: 3.14%Pass Can set 'padding-left' to a percent: calc(0% + 0%)Pass Can set 'padding-left' to a length: 0px@@ -72,7 +71,7 @@ Pass Can set 'padding-right' to CSS-wide keywords: unsetPass Can set 'padding-right' to CSS-wide keywords: revertPass Can set 'padding-right' to var() references: var(--A)Pass Can set 'padding-right' to a percent: 0%-Fail Can set 'padding-right' to a percent: -3.14%+Pass Can set 'padding-right' to a percent: -3.14%Pass Can set 'padding-right' to a percent: 3.14%Pass Can set 'padding-right' to a percent: calc(0% + 0%)Pass Can set 'padding-right' to a length: 0px@@ -103,7 +102,7 @@ Pass Can set 'padding-bottom' to CSS-wide keywords: unsetPass Can set 'padding-bottom' to CSS-wide keywords: revertPass Can set 'padding-bottom' to var() references: var(--A)Pass Can set 'padding-bottom' to a percent: 0%-Fail Can set 'padding-bottom' to a percent: -3.14%+Pass Can set 'padding-bottom' to a percent: -3.14%Pass Can set 'padding-bottom' to a percent: 3.14%Pass Can set 'padding-bottom' to a percent: calc(0% + 0%)Pass Can set 'padding-bottom' to a length: 0pxdiff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/radius.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/radius.txtindex 02f037338b8..24c327eca83 100644--- a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/radius.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/radius.txt@@ -2,15 +2,14 @@ Harness status: OKFound 95 tests-92 Pass-3 Fail+95 PassPass Can set 'r' to CSS-wide keywords: initialPass Can set 'r' to CSS-wide keywords: inheritPass Can set 'r' to CSS-wide keywords: unsetPass Can set 'r' to CSS-wide keywords: revertPass Can set 'r' to var() references: var(--A)Pass Can set 'r' to a percent: 0%-Fail Can set 'r' to a percent: -3.14%+Pass Can set 'r' to a percent: -3.14%Pass Can set 'r' to a percent: 3.14%Pass Can set 'r' to a percent: calc(0% + 0%)Pass Can set 'r' to a length: 0px@@ -42,7 +41,7 @@ Pass Can set 'rx' to CSS-wide keywords: revertPass Can set 'rx' to var() references: var(--A)Pass Can set 'rx' to the 'auto' keyword: autoPass Can set 'rx' to a percent: 0%-Fail Can set 'rx' to a percent: -3.14%+Pass Can set 'rx' to a percent: -3.14%Pass Can set 'rx' to a percent: 3.14%Pass Can set 'rx' to a percent: calc(0% + 0%)Pass Can set 'rx' to a length: 0px@@ -74,7 +73,7 @@ Pass Can set 'ry' to CSS-wide keywords: revertPass Can set 'ry' to var() references: var(--A)Pass Can set 'ry' to the 'auto' keyword: autoPass Can set 'ry' to a percent: 0%-Fail Can set 'ry' to a percent: -3.14%+Pass Can set 'ry' to a percent: -3.14%Pass Can set 'ry' to a percent: 3.14%Pass Can set 'ry' to a percent: calc(0% + 0%)Pass Can set 'ry' to a length: 0pxdiff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/scroll-padding.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/scroll-padding.txtindex cb44b6a573b..116618a9988 100644--- a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/scroll-padding.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/scroll-padding.txt@@ -2,15 +2,14 @@ Harness status: OKFound 252 tests-244 Pass-8 Fail+252 PassPass Can set 'scroll-padding-top' to CSS-wide keywords: initialPass Can set 'scroll-padding-top' to CSS-wide keywords: inheritPass Can set 'scroll-padding-top' to CSS-wide keywords: unsetPass Can set 'scroll-padding-top' to CSS-wide keywords: revertPass Can set 'scroll-padding-top' to var() references: var(--A)Pass Can set 'scroll-padding-top' to a percent: 0%-Fail Can set 'scroll-padding-top' to a percent: -3.14%+Pass Can set 'scroll-padding-top' to a percent: -3.14%Pass Can set 'scroll-padding-top' to a percent: 3.14%Pass Can set 'scroll-padding-top' to a percent: calc(0% + 0%)Pass Can set 'scroll-padding-top' to a length: 0px@@ -41,7 +40,7 @@ Pass Can set 'scroll-padding-left' to CSS-wide keywords: unsetPass Can set 'scroll-padding-left' to CSS-wide keywords: revertPass Can set 'scroll-padding-left' to var() references: var(--A)Pass Can set 'scroll-padding-left' to a percent: 0%-Fail Can set 'scroll-padding-left' to a percent: -3.14%+Pass Can set 'scroll-padding-left' to a percent: -3.14%Pass Can set 'scroll-padding-left' to a percent: 3.14%Pass Can set 'scroll-padding-left' to a percent: calc(0% + 0%)Pass Can set 'scroll-padding-left' to a length: 0px@@ -72,7 +71,7 @@ Pass Can set 'scroll-padding-right' to CSS-wide keywords: unsetPass Can set 'scroll-padding-right' to CSS-wide keywords: revertPass Can set 'scroll-padding-right' to var() references: var(--A)Pass Can set 'scroll-padding-right' to a percent: 0%-Fail Can set 'scroll-padding-right' to a percent: -3.14%+Pass Can set 'scroll-padding-right' to a percent: -3.14%Pass Can set 'scroll-padding-right' to a percent: 3.14%Pass Can set 'scroll-padding-right' to a percent: calc(0% + 0%)Pass Can set 'scroll-padding-right' to a length: 0px@@ -103,7 +102,7 @@ Pass Can set 'scroll-padding-bottom' to CSS-wide keywords: unsetPass Can set 'scroll-padding-bottom' to CSS-wide keywords: revertPass Can set 'scroll-padding-bottom' to var() references: var(--A)Pass Can set 'scroll-padding-bottom' to a percent: 0%-Fail Can set 'scroll-padding-bottom' to a percent: -3.14%+Pass Can set 'scroll-padding-bottom' to a percent: -3.14%Pass Can set 'scroll-padding-bottom' to a percent: 3.14%Pass Can set 'scroll-padding-bottom' to a percent: calc(0% + 0%)Pass Can set 'scroll-padding-bottom' to a length: 0px@@ -134,7 +133,7 @@ Pass Can set 'scroll-padding-inline-start' to CSS-wide keywords: unsetPass Can set 'scroll-padding-inline-start' to CSS-wide keywords: revertPass Can set 'scroll-padding-inline-start' to var() references: var(--A)Pass Can set 'scroll-padding-inline-start' to a percent: 0%-Fail Can set 'scroll-padding-inline-start' to a percent: -3.14%+Pass Can set 'scroll-padding-inline-start' to a percent: -3.14%Pass Can set 'scroll-padding-inline-start' to a percent: 3.14%Pass Can set 'scroll-padding-inline-start' to a percent: calc(0% + 0%)Pass Can set 'scroll-padding-inline-start' to a length: 0px@@ -165,7 +164,7 @@ Pass Can set 'scroll-padding-block-start' to CSS-wide keywords: unsetPass Can set 'scroll-padding-block-start' to CSS-wide keywords: revertPass Can set 'scroll-padding-block-start' to var() references: var(--A)Pass Can set 'scroll-padding-block-start' to a percent: 0%-Fail Can set 'scroll-padding-block-start' to a percent: -3.14%+Pass Can set 'scroll-padding-block-start' to a percent: -3.14%Pass Can set 'scroll-padding-block-start' to a percent: 3.14%Pass Can set 'scroll-padding-block-start' to a percent: calc(0% + 0%)Pass Can set 'scroll-padding-block-start' to a length: 0px@@ -196,7 +195,7 @@ Pass Can set 'scroll-padding-inline-end' to CSS-wide keywords: unsetPass Can set 'scroll-padding-inline-end' to CSS-wide keywords: revertPass Can set 'scroll-padding-inline-end' to var() references: var(--A)Pass Can set 'scroll-padding-inline-end' to a percent: 0%-Fail Can set 'scroll-padding-inline-end' to a percent: -3.14%+Pass Can set 'scroll-padding-inline-end' to a percent: -3.14%Pass Can set 'scroll-padding-inline-end' to a percent: 3.14%Pass Can set 'scroll-padding-inline-end' to a percent: calc(0% + 0%)Pass Can set 'scroll-padding-inline-end' to a length: 0px@@ -227,7 +226,7 @@ Pass Can set 'scroll-padding-block-end' to CSS-wide keywords: unsetPass Can set 'scroll-padding-block-end' to CSS-wide keywords: revertPass Can set 'scroll-padding-block-end' to var() references: var(--A)Pass Can set 'scroll-padding-block-end' to a percent: 0%-Fail Can set 'scroll-padding-block-end' to a percent: -3.14%+Pass Can set 'scroll-padding-block-end' to a percent: -3.14%Pass Can set 'scroll-padding-block-end' to a percent: 3.14%Pass Can set 'scroll-padding-block-end' to a percent: calc(0% + 0%)Pass Can set 'scroll-padding-block-end' to a length: 0pxdiff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/shape-margin.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/shape-margin.txtindex 90a5d2ad0ea..844dc8bd997 100644--- a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/shape-margin.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/shape-margin.txt@@ -2,8 +2,7 @@ Harness status: OKFound 31 tests-30 Pass-1 Fail+31 PassPass Can set 'shape-margin' to CSS-wide keywords: initialPass Can set 'shape-margin' to CSS-wide keywords: inheritPass Can set 'shape-margin' to CSS-wide keywords: unset@@ -14,7 +13,7 @@ Pass Can set 'shape-margin' to a length: -3.14emPass Can set 'shape-margin' to a length: 3.14cmPass Can set 'shape-margin' to a length: calc(0px + 0em)Pass Can set 'shape-margin' to a percent: 0%-Fail Can set 'shape-margin' to a percent: -3.14%+Pass Can set 'shape-margin' to a percent: -3.14%Pass Can set 'shape-margin' to a percent: 3.14%Pass Can set 'shape-margin' to a percent: calc(0% + 0%)Pass Setting 'shape-margin' to a time: 0s throws TypeErrordiff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/width.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/width.txtindex 82efd477f5c..53c37ae927e 100644--- a/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/width.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-typed-om/the-stylepropertymap/properties/width.txt@@ -2,8 +2,7 @@ Harness status: OKFound 95 tests-92 Pass-3 Fail+95 PassPass Can set 'width' to CSS-wide keywords: initialPass Can set 'width' to CSS-wide keywords: inheritPass Can set 'width' to CSS-wide keywords: unset@@ -11,7 +10,7 @@ Pass Can set 'width' to CSS-wide keywords: revertPass Can set 'width' to var() references: var(--A)Pass Can set 'width' to the 'auto' keyword: autoPass Can set 'width' to a percent: 0%-Fail Can set 'width' to a percent: -3.14%+Pass Can set 'width' to a percent: -3.14%Pass Can set 'width' to a percent: 3.14%Pass Can set 'width' to a percent: calc(0% + 0%)Pass Can set 'width' to a length: 0px@@ -42,7 +41,7 @@ Pass Can set 'min-width' to CSS-wide keywords: unsetPass Can set 'min-width' to CSS-wide keywords: revertPass Can set 'min-width' to var() references: var(--A)Pass Can set 'min-width' to a percent: 0%-Fail Can set 'min-width' to a percent: -3.14%+Pass Can set 'min-width' to a percent: -3.14%Pass Can set 'min-width' to a percent: 3.14%Pass Can set 'min-width' to a percent: calc(0% + 0%)Pass Can set 'min-width' to a length: 0px@@ -74,7 +73,7 @@ Pass Can set 'max-width' to CSS-wide keywords: revertPass Can set 'max-width' to var() references: var(--A)Pass Can set 'max-width' to the 'none' keyword: nonePass Can set 'max-width' to a percent: 0%-Fail Can set 'max-width' to a percent: -3.14%+Pass Can set 'max-width' to a percent: -3.14%Pass Can set 'max-width' to a percent: 3.14%Pass Can set 'max-width' to a percent: calc(0% + 0%)Pass Can set 'max-width' to a length: 0px