Skip to content

Commit 2e5ea43

Browse files
lilleschromium-wpt-export-bot
authored andcommitted
Only allow calc() combinations as per spec.
We allowed calc expressions combining numbers and lengths, numbers and percentages, and even a combination of numbers, percentages, and lengths. None of those are allowed per the CSS Values and Units spec, and it made it possible to combine user units, lengths, and percentages into the same calc() for certain SVG CSS properties and attributes. See also: w3c/csswg-drafts#4874 This improves SVG interop with Firefox. Firefox does not support calc() for numbers, though. Bug: 1061714 Change-Id: I9e5c492122242e51064310a40e28a233530e357c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2134251 Commit-Queue: Rune Lillesveen Reviewed-by: Fredrik Söderquist Cr-Commit-Position: refs/heads/master@{#756226}
1 parent fcff076 commit 2e5ea43

7 files changed

+21
-3
lines changed

svg/animations/svglength-additive-by-8.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
1414
1515
<rect width="10" height="100" fill="green">
16-
<animate id="an1" attributeType="XML" attributeName="width" fill="remove" by="calc(4% + 8)" begin="0s" dur="4s"/>
17-
<animate id="an2" attributeType="XML" attributeName="width" additive="replace" fill="freeze" by="calc(10% + 10)" begin="5s" dur="4s"/>
16+
<animate id="an1" attributeType="XML" attributeName="width" fill="remove" by="calc(4% + 8px)" begin="0s" dur="4s"/>
17+
<animate id="an2" attributeType="XML" attributeName="width" additive="replace" fill="freeze" by="calc(10% + 10px)" begin="5s" dur="4s"/>
1818
rect>
1919

2020
svg>
@@ -73,4 +73,4 @@
7373

7474
window.animationStartsImmediately = true;
7575

76-
script>
76+
script>

svg/painting/parsing/stroke-dasharray-invalid.svg

Lines changed: 3 additions & 0 deletions
Loading

svg/painting/parsing/stroke-dasharray-valid.svg

Lines changed: 3 additions & 0 deletions
Loading

svg/painting/parsing/stroke-dashoffset-invalid.svg

Lines changed: 3 additions & 0 deletions
Loading

svg/painting/parsing/stroke-dashoffset-valid.svg

Lines changed: 3 additions & 0 deletions
Loading

svg/painting/parsing/stroke-width-invalid.svg

Lines changed: 3 additions & 0 deletions
Loading

svg/painting/parsing/stroke-width-valid.svg

Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)