Title: [275273] trunk
Revision
275273
Author
[email protected]
Date
2021-03-31 01:30:41 -0700 (Wed, 31 Mar 2021)

Log Message

Computed style for a border-radius corner should never be 0px when the provided width isn't 0px
https://bugs.webkit.org/show_bug.cgi?id=223927

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark 5 tests as PASS results as a result of returning the correct computed style for
"border-top-left-radius: 40px 0px". This is importing a change made to WPT via
https://github.com/web-platform-tests/wpt/pull/28310.

* web-platform-tests/css/css-backgrounds/animations/border-radius-interpolation-expected.txt:
* web-platform-tests/css/css-backgrounds/parsing/border-radius-computed-expected.txt:
* web-platform-tests/css/css-backgrounds/parsing/border-radius-computed.html:

Source/WebCore:

If "border-top-left-radius: 40px 0px" is provided, the computed style would return "0px" since
BuilderConverter::convertRadius() would treat either of the dimensions for the radius being 0
as both being 0.

* style/StyleBuilderConverter.h:
(WebCore::Style::BuilderConverter::convertRadius):

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (275272 => 275273)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-03-31 07:44:12 UTC (rev 275272)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-03-31 08:30:41 UTC (rev 275273)
@@ -1,5 +1,20 @@
 2021-03-30  Antoine Quint  <[email protected]>
 
+        Computed style for a border-radius corner should never be 0px when the provided width isn't 0px
+        https://bugs.webkit.org/show_bug.cgi?id=223927
+
+        Reviewed by Dean Jackson.
+
+        Mark 5 tests as PASS results as a result of returning the correct computed style for
+        "border-top-left-radius: 40px 0px". This is importing a change made to WPT via
+        https://github.com/web-platform-tests/wpt/pull/28310.
+
+        * web-platform-tests/css/css-backgrounds/animations/border-radius-interpolation-expected.txt:
+        * web-platform-tests/css/css-backgrounds/parsing/border-radius-computed-expected.txt:
+        * web-platform-tests/css/css-backgrounds/parsing/border-radius-computed.html:
+
+2021-03-30  Antoine Quint  <[email protected]>
+
         Fix interpolation of box-shadow and text-shadow CSS properties
         https://bugs.webkit.org/show_bug.cgi?id=223924
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/border-radius-interpolation-expected.txt (275272 => 275273)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/border-radius-interpolation-expected.txt	2021-03-31 07:44:12 UTC (rev 275272)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/border-radius-interpolation-expected.txt	2021-03-31 08:30:41 UTC (rev 275273)
@@ -167,7 +167,7 @@
 FAIL Web Animations: property <border-top-left-radius> from [10px] to [100%] at (0.6) should be [calc(4px + 60%)] assert_equals: expected "calc ( 60 % + 4px ) " but got "calc ( ( 10px * 0.4 ) + ( 100 % * 0.6 ) ) "
 PASS Web Animations: property <border-top-left-radius> from [10px] to [100%] at (1) should be [100%]
 FAIL Web Animations: property <border-top-left-radius> from [10px] to [100%] at (1.5) should be [calc(-5px + 150%)] assert_equals: expected "calc ( 150 % - 5px ) " but got "calc ( ( 10px * - 0.5 ) + ( 100 % * 1.5 ) ) "
-FAIL CSS Transitions: property <border-top-left-radius> from [20px] to [10px 30px] at (-2) should be [40px 0px] assert_equals: expected "0px " but got "40px 0px "
+PASS CSS Transitions: property <border-top-left-radius> from [20px] to [10px 30px] at (-2) should be [40px 0px]
 PASS CSS Transitions: property <border-top-left-radius> from [20px] to [10px 30px] at (-0.3) should be [23px 17px]
 PASS CSS Transitions: property <border-top-left-radius> from [20px] to [10px 30px] at (0) should be [20px]
 PASS CSS Transitions: property <border-top-left-radius> from [20px] to [10px 30px] at (0.3) should be [17px 23px]
@@ -174,7 +174,7 @@
 PASS CSS Transitions: property <border-top-left-radius> from [20px] to [10px 30px] at (0.6) should be [14px 26px]
 PASS CSS Transitions: property <border-top-left-radius> from [20px] to [10px 30px] at (1) should be [10px 30px]
 PASS CSS Transitions: property <border-top-left-radius> from [20px] to [10px 30px] at (1.5) should be [5px 35px]
-FAIL CSS Transitions with transition: all: property <border-top-left-radius> from [20px] to [10px 30px] at (-2) should be [40px 0px] assert_equals: expected "0px " but got "40px 0px "
+PASS CSS Transitions with transition: all: property <border-top-left-radius> from [20px] to [10px 30px] at (-2) should be [40px 0px]
 PASS CSS Transitions with transition: all: property <border-top-left-radius> from [20px] to [10px 30px] at (-0.3) should be [23px 17px]
 PASS CSS Transitions with transition: all: property <border-top-left-radius> from [20px] to [10px 30px] at (0) should be [20px]
 PASS CSS Transitions with transition: all: property <border-top-left-radius> from [20px] to [10px 30px] at (0.3) should be [17px 23px]
@@ -181,7 +181,7 @@
 PASS CSS Transitions with transition: all: property <border-top-left-radius> from [20px] to [10px 30px] at (0.6) should be [14px 26px]
 PASS CSS Transitions with transition: all: property <border-top-left-radius> from [20px] to [10px 30px] at (1) should be [10px 30px]
 PASS CSS Transitions with transition: all: property <border-top-left-radius> from [20px] to [10px 30px] at (1.5) should be [5px 35px]
-FAIL CSS Animations: property <border-top-left-radius> from [20px] to [10px 30px] at (-2) should be [40px 0px] assert_equals: expected "0px " but got "40px 0px "
+PASS CSS Animations: property <border-top-left-radius> from [20px] to [10px 30px] at (-2) should be [40px 0px]
 PASS CSS Animations: property <border-top-left-radius> from [20px] to [10px 30px] at (-0.3) should be [23px 17px]
 PASS CSS Animations: property <border-top-left-radius> from [20px] to [10px 30px] at (0) should be [20px]
 PASS CSS Animations: property <border-top-left-radius> from [20px] to [10px 30px] at (0.3) should be [17px 23px]
@@ -188,7 +188,7 @@
 PASS CSS Animations: property <border-top-left-radius> from [20px] to [10px 30px] at (0.6) should be [14px 26px]
 PASS CSS Animations: property <border-top-left-radius> from [20px] to [10px 30px] at (1) should be [10px 30px]
 PASS CSS Animations: property <border-top-left-radius> from [20px] to [10px 30px] at (1.5) should be [5px 35px]
-FAIL Web Animations: property <border-top-left-radius> from [20px] to [10px 30px] at (-2) should be [40px 0px] assert_equals: expected "0px " but got "40px 0px "
+PASS Web Animations: property <border-top-left-radius> from [20px] to [10px 30px] at (-2) should be [40px 0px]
 PASS Web Animations: property <border-top-left-radius> from [20px] to [10px 30px] at (-0.3) should be [23px 17px]
 PASS Web Animations: property <border-top-left-radius> from [20px] to [10px 30px] at (0) should be [20px]
 PASS Web Animations: property <border-top-left-radius> from [20px] to [10px 30px] at (0.3) should be [17px 23px]

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-radius-computed-expected.txt (275272 => 275273)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-radius-computed-expected.txt	2021-03-31 07:44:12 UTC (rev 275272)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-radius-computed-expected.txt	2021-03-31 08:30:41 UTC (rev 275273)
@@ -12,4 +12,5 @@
 PASS Property border-top-right-radius value '20%'
 PASS Property border-bottom-right-radius value 'calc(0.5em + 10px) 40%'
 PASS Property border-bottom-left-radius value '50% 60px'
+PASS Property border-top-left-radius value '40px 0px'
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-radius-computed.html (275272 => 275273)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-radius-computed.html	2021-03-31 07:44:12 UTC (rev 275272)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-radius-computed.html	2021-03-31 08:30:41 UTC (rev 275273)
@@ -32,6 +32,8 @@
 test_computed_value("border-top-right-radius", "20%");
 test_computed_value("border-bottom-right-radius", "calc(0.5em + 10px) 40%", "30px 40%");
 test_computed_value("border-bottom-left-radius", "50% 60px");
+
+test_computed_value("border-top-left-radius", "40px 0px", "40px 0px");
 </script>
 </body>
 </html>

Modified: trunk/Source/WebCore/ChangeLog (275272 => 275273)


--- trunk/Source/WebCore/ChangeLog	2021-03-31 07:44:12 UTC (rev 275272)
+++ trunk/Source/WebCore/ChangeLog	2021-03-31 08:30:41 UTC (rev 275273)
@@ -1,5 +1,19 @@
 2021-03-30  Antoine Quint  <[email protected]>
 
+        Computed style for a border-radius corner should never be 0px when the provided width isn't 0px
+        https://bugs.webkit.org/show_bug.cgi?id=223927
+
+        Reviewed by Dean Jackson.
+
+        If "border-top-left-radius: 40px 0px" is provided, the computed style would return "0px" since
+        BuilderConverter::convertRadius() would treat either of the dimensions for the radius being 0
+        as both being 0.
+
+        * style/StyleBuilderConverter.h:
+        (WebCore::Style::BuilderConverter::convertRadius):
+
+2021-03-30  Antoine Quint  <[email protected]>
+
         Fix interpolation of box-shadow and text-shadow CSS properties
         https://bugs.webkit.org/show_bug.cgi?id=223924
 

Modified: trunk/Source/WebCore/style/StyleBuilderConverter.h (275272 => 275273)


--- trunk/Source/WebCore/style/StyleBuilderConverter.h	2021-03-31 07:44:12 UTC (rev 275272)
+++ trunk/Source/WebCore/style/StyleBuilderConverter.h	2021-03-31 08:30:41 UTC (rev 275273)
@@ -337,9 +337,6 @@
 
     ASSERT(!radius.width.isNegative());
     ASSERT(!radius.height.isNegative());
-    if (radius.width.isZero() || radius.height.isZero())
-        return { { 0, LengthType::Fixed }, { 0, LengthType::Fixed } };
-
     return radius;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to