From 1fbf1073abac65445831d42dc2c2e140eb41f311 Mon Sep 17 00:00:00 2001 From: MacDue Date: Sat, 25 Feb 2023 10:31:00 +0100 Subject: [PATCH] LibWeb: Define the rest of the SVG geometry properties This defines all the (remaining) geometry properties from https://svgwg.org/svg2-draft/geometry.html#Sizing. --- .../css/getComputedStyle-print-all.txt | 7 +- Userland/Libraries/LibWeb/CSS/Properties.json | 76 +++++++++++++++++++ 2 files changed, 82 insertions(+), 1 deletion(-) diff --git a/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt b/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt index 9e190cdb11..632e31c5fb 100644 --- a/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt +++ b/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt @@ -52,6 +52,8 @@ column-count: auto column-gap: auto content: normal cursor: auto +cx: 0px +cy: 0px direction: ltr display: block fill: rgb(0, 0, 0) @@ -81,7 +83,7 @@ grid-row-start: auto grid-template-areas: grid-template-columns: grid-template-rows: -height: 1411px +height: 1445px image-rendering: auto inset-block-end: auto inset-block-start: auto @@ -136,8 +138,11 @@ padding-top: 0px pointer-events: auto position: static quotes: auto +r: 0px right: auto row-gap: auto +rx: auto +ry: auto scrollbar-width: auto stop-color: rgb(0, 0, 0) stop-opacity: 1 diff --git a/Userland/Libraries/LibWeb/CSS/Properties.json b/Userland/Libraries/LibWeb/CSS/Properties.json index f657ce7413..d367c2ea65 100644 --- a/Userland/Libraries/LibWeb/CSS/Properties.json +++ b/Userland/Libraries/LibWeb/CSS/Properties.json @@ -765,6 +765,34 @@ "cursor" ] }, + "cx": { + "__comment": "This is an SVG 2 geometry property, see: https://www.w3.org/TR/SVG/geometry.html#CX.", + "animation-type": "by-computed-value", + "inherited": false, + "initial": "0", + "valid-types": [ + "length [-∞,∞]", + "percentage [-∞,∞]" + ], + "percentages-resolve-to": "length", + "quirks": [ + "unitless-length" + ] + }, + "cy": { + "__comment": "This is an SVG 2 geometry property, see: https://www.w3.org/TR/SVG/geometry.html#CY.", + "animation-type": "by-computed-value", + "inherited": false, + "initial": "0", + "valid-types": [ + "length [-∞,∞]", + "percentage [-∞,∞]" + ], + "percentages-resolve-to": "length", + "quirks": [ + "unitless-length" + ] + }, "direction": { "animation-type": "none", "inherited": true, @@ -2005,6 +2033,20 @@ "none" ] }, + "r": { + "__comment": "This is an SVG 2 geometry property, see: https://www.w3.org/TR/SVG/geometry.html#R.", + "animation-type": "by-computed-value", + "inherited": false, + "initial": "0", + "valid-types": [ + "length [-∞,∞]", + "percentage [-∞,∞]" + ], + "percentages-resolve-to": "length", + "quirks": [ + "unitless-length" + ] + }, "right": { "animation-type": "by-computed-value", "inherited": false, @@ -2034,6 +2076,40 @@ ], "percentages-resolve-to": "length" }, + "rx": { + "__comment": "This is an SVG 2 geometry property, see: https://www.w3.org/TR/SVG/geometry.html#RX.", + "animation-type": "by-computed-value", + "inherited": false, + "initial": "auto", + "valid-types": [ + "length [-∞,∞]", + "percentage [-∞,∞]" + ], + "valid-identifiers": [ + "auto" + ], + "percentages-resolve-to": "length", + "quirks": [ + "unitless-length" + ] + }, + "ry": { + "__comment": "This is an SVG 2 geometry property, see: https://www.w3.org/TR/SVG/geometry.html#RY.", + "animation-type": "by-computed-value", + "inherited": false, + "initial": "auto", + "valid-types": [ + "length [-∞,∞]", + "percentage [-∞,∞]" + ], + "valid-identifiers": [ + "auto" + ], + "percentages-resolve-to": "length", + "quirks": [ + "unitless-length" + ] + }, "scrollbar-width": { "affects-layout": false, "animation-type": "by-computed-value",