Title: [273478] trunk
Revision
273478
Author
[email protected]
Date
2021-02-25 00:31:26 -0800 (Thu, 25 Feb 2021)

Log Message

border-image-outset doesn't handle float values
https://bugs.webkit.org/show_bug.cgi?id=222389

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Pass an extra 28 WPT tests for border-image-outset.

* web-platform-tests/css/css-backgrounds/animations/border-image-outset-interpolation-expected.txt:

Source/WebCore:

We would get the int values rather than float values for the CSSValue created while parsing
the border-image-outset property.

* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapNinePieceImageQuad):

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (273477 => 273478)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-02-25 08:30:59 UTC (rev 273477)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-02-25 08:31:26 UTC (rev 273478)
@@ -1,3 +1,14 @@
+2021-02-25  Antoine Quint  <[email protected]>
+
+        border-image-outset doesn't handle float values
+        https://bugs.webkit.org/show_bug.cgi?id=222389
+
+        Reviewed by Antti Koivisto.
+
+        Pass an extra 28 WPT tests for border-image-outset.
+
+        * web-platform-tests/css/css-backgrounds/animations/border-image-outset-interpolation-expected.txt:
+
 2021-02-24  Imanol Fernandez  <[email protected]>
 
         Set xrCompatible in WebGLRenderingContextBase::getContextAttributes

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/border-image-outset-interpolation-expected.txt (273477 => 273478)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/border-image-outset-interpolation-expected.txt	2021-02-25 08:30:59 UTC (rev 273477)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/border-image-outset-interpolation-expected.txt	2021-02-25 08:31:26 UTC (rev 273478)
@@ -25,26 +25,26 @@
 PASS Web Animations: property <border-image-outset> from neutral to [2px] at (1.5) should be [2.5px]
 FAIL CSS Transitions: property <border-image-outset> from [initial] to [2] at (-0.3) should be [0] assert_equals: expected "0 " but got "- 0.6 "
 PASS CSS Transitions: property <border-image-outset> from [initial] to [2] at (0) should be [0]
-FAIL CSS Transitions: property <border-image-outset> from [initial] to [2] at (0.3) should be [0.6] assert_equals: expected "0 " but got "0.6 "
-FAIL CSS Transitions: property <border-image-outset> from [initial] to [2] at (0.6) should be [1.2] assert_equals: expected "1 " but got "1.2 "
+PASS CSS Transitions: property <border-image-outset> from [initial] to [2] at (0.3) should be [0.6]
+PASS CSS Transitions: property <border-image-outset> from [initial] to [2] at (0.6) should be [1.2]
 PASS CSS Transitions: property <border-image-outset> from [initial] to [2] at (1) should be [2]
 PASS CSS Transitions: property <border-image-outset> from [initial] to [2] at (1.5) should be [3]
 FAIL CSS Transitions with transition: all: property <border-image-outset> from [initial] to [2] at (-0.3) should be [0] assert_equals: expected "0 " but got "- 0.6 "
 PASS CSS Transitions with transition: all: property <border-image-outset> from [initial] to [2] at (0) should be [0]
-FAIL CSS Transitions with transition: all: property <border-image-outset> from [initial] to [2] at (0.3) should be [0.6] assert_equals: expected "0 " but got "0.6 "
-FAIL CSS Transitions with transition: all: property <border-image-outset> from [initial] to [2] at (0.6) should be [1.2] assert_equals: expected "1 " but got "1.2 "
+PASS CSS Transitions with transition: all: property <border-image-outset> from [initial] to [2] at (0.3) should be [0.6]
+PASS CSS Transitions with transition: all: property <border-image-outset> from [initial] to [2] at (0.6) should be [1.2]
 PASS CSS Transitions with transition: all: property <border-image-outset> from [initial] to [2] at (1) should be [2]
 PASS CSS Transitions with transition: all: property <border-image-outset> from [initial] to [2] at (1.5) should be [3]
 FAIL CSS Animations: property <border-image-outset> from [initial] to [2] at (-0.3) should be [0] assert_equals: expected "0 " but got "- 0.6 "
 PASS CSS Animations: property <border-image-outset> from [initial] to [2] at (0) should be [0]
-FAIL CSS Animations: property <border-image-outset> from [initial] to [2] at (0.3) should be [0.6] assert_equals: expected "0 " but got "0.6 "
-FAIL CSS Animations: property <border-image-outset> from [initial] to [2] at (0.6) should be [1.2] assert_equals: expected "1 " but got "1.2 "
+PASS CSS Animations: property <border-image-outset> from [initial] to [2] at (0.3) should be [0.6]
+PASS CSS Animations: property <border-image-outset> from [initial] to [2] at (0.6) should be [1.2]
 PASS CSS Animations: property <border-image-outset> from [initial] to [2] at (1) should be [2]
 PASS CSS Animations: property <border-image-outset> from [initial] to [2] at (1.5) should be [3]
 FAIL Web Animations: property <border-image-outset> from [initial] to [2] at (-0.3) should be [0] assert_equals: expected "0 " but got "- 0.6 "
 PASS Web Animations: property <border-image-outset> from [initial] to [2] at (0) should be [0]
-FAIL Web Animations: property <border-image-outset> from [initial] to [2] at (0.3) should be [0.6] assert_equals: expected "0 " but got "0.6 "
-FAIL Web Animations: property <border-image-outset> from [initial] to [2] at (0.6) should be [1.2] assert_equals: expected "1 " but got "1.2 "
+PASS Web Animations: property <border-image-outset> from [initial] to [2] at (0.3) should be [0.6]
+PASS Web Animations: property <border-image-outset> from [initial] to [2] at (0.6) should be [1.2]
 PASS Web Animations: property <border-image-outset> from [initial] to [2] at (1) should be [2]
 PASS Web Animations: property <border-image-outset> from [initial] to [2] at (1.5) should be [3]
 PASS CSS Transitions: property <border-image-outset> from [inherit] to [2px] at (-0.3) should be [12.4px]
@@ -73,26 +73,26 @@
 FAIL Web Animations: property <border-image-outset> from [inherit] to [2px] at (1.5) should be [0px] assert_equals: expected "0px " but got "- 2px "
 FAIL CSS Transitions: property <border-image-outset> from [unset] to [2] at (-0.3) should be [0] assert_equals: expected "0 " but got "- 0.6 "
 PASS CSS Transitions: property <border-image-outset> from [unset] to [2] at (0) should be [0]
-FAIL CSS Transitions: property <border-image-outset> from [unset] to [2] at (0.3) should be [0.6] assert_equals: expected "0 " but got "0.6 "
-FAIL CSS Transitions: property <border-image-outset> from [unset] to [2] at (0.6) should be [1.2] assert_equals: expected "1 " but got "1.2 "
+PASS CSS Transitions: property <border-image-outset> from [unset] to [2] at (0.3) should be [0.6]
+PASS CSS Transitions: property <border-image-outset> from [unset] to [2] at (0.6) should be [1.2]
 PASS CSS Transitions: property <border-image-outset> from [unset] to [2] at (1) should be [2]
 PASS CSS Transitions: property <border-image-outset> from [unset] to [2] at (1.5) should be [3]
 FAIL CSS Transitions with transition: all: property <border-image-outset> from [unset] to [2] at (-0.3) should be [0] assert_equals: expected "0 " but got "- 0.6 "
 PASS CSS Transitions with transition: all: property <border-image-outset> from [unset] to [2] at (0) should be [0]
-FAIL CSS Transitions with transition: all: property <border-image-outset> from [unset] to [2] at (0.3) should be [0.6] assert_equals: expected "0 " but got "0.6 "
-FAIL CSS Transitions with transition: all: property <border-image-outset> from [unset] to [2] at (0.6) should be [1.2] assert_equals: expected "1 " but got "1.2 "
+PASS CSS Transitions with transition: all: property <border-image-outset> from [unset] to [2] at (0.3) should be [0.6]
+PASS CSS Transitions with transition: all: property <border-image-outset> from [unset] to [2] at (0.6) should be [1.2]
 PASS CSS Transitions with transition: all: property <border-image-outset> from [unset] to [2] at (1) should be [2]
 PASS CSS Transitions with transition: all: property <border-image-outset> from [unset] to [2] at (1.5) should be [3]
 FAIL CSS Animations: property <border-image-outset> from [unset] to [2] at (-0.3) should be [0] assert_equals: expected "0 " but got "- 0.6 "
 PASS CSS Animations: property <border-image-outset> from [unset] to [2] at (0) should be [0]
-FAIL CSS Animations: property <border-image-outset> from [unset] to [2] at (0.3) should be [0.6] assert_equals: expected "0 " but got "0.6 "
-FAIL CSS Animations: property <border-image-outset> from [unset] to [2] at (0.6) should be [1.2] assert_equals: expected "1 " but got "1.2 "
+PASS CSS Animations: property <border-image-outset> from [unset] to [2] at (0.3) should be [0.6]
+PASS CSS Animations: property <border-image-outset> from [unset] to [2] at (0.6) should be [1.2]
 PASS CSS Animations: property <border-image-outset> from [unset] to [2] at (1) should be [2]
 PASS CSS Animations: property <border-image-outset> from [unset] to [2] at (1.5) should be [3]
 FAIL Web Animations: property <border-image-outset> from [unset] to [2] at (-0.3) should be [0] assert_equals: expected "0 " but got "- 0.6 "
 PASS Web Animations: property <border-image-outset> from [unset] to [2] at (0) should be [0]
-FAIL Web Animations: property <border-image-outset> from [unset] to [2] at (0.3) should be [0.6] assert_equals: expected "0 " but got "0.6 "
-FAIL Web Animations: property <border-image-outset> from [unset] to [2] at (0.6) should be [1.2] assert_equals: expected "1 " but got "1.2 "
+PASS Web Animations: property <border-image-outset> from [unset] to [2] at (0.3) should be [0.6]
+PASS Web Animations: property <border-image-outset> from [unset] to [2] at (0.6) should be [1.2]
 PASS Web Animations: property <border-image-outset> from [unset] to [2] at (1) should be [2]
 PASS Web Animations: property <border-image-outset> from [unset] to [2] at (1.5) should be [3]
 FAIL CSS Transitions: property <border-image-outset> from [0px] to [5px] at (-0.3) should be [0px] assert_equals: expected "0px " but got "- 1.5px "
@@ -121,28 +121,28 @@
 PASS Web Animations: property <border-image-outset> from [0px] to [5px] at (1.5) should be [7.5px]
 FAIL CSS Transitions: property <border-image-outset> from [0] to [1] at (-0.3) should be [0] assert_equals: expected "0 " but got "- 0.3 "
 PASS CSS Transitions: property <border-image-outset> from [0] to [1] at (0) should be [0]
-FAIL CSS Transitions: property <border-image-outset> from [0] to [1] at (0.3) should be [0.3] assert_equals: expected "0 " but got "0.3 "
-FAIL CSS Transitions: property <border-image-outset> from [0] to [1] at (0.6) should be [0.6] assert_equals: expected "0 " but got "0.6 "
+PASS CSS Transitions: property <border-image-outset> from [0] to [1] at (0.3) should be [0.3]
+PASS CSS Transitions: property <border-image-outset> from [0] to [1] at (0.6) should be [0.6]
 PASS CSS Transitions: property <border-image-outset> from [0] to [1] at (1) should be [1]
-FAIL CSS Transitions: property <border-image-outset> from [0] to [1] at (1.5) should be [1.5] assert_equals: expected "1 " but got "1.5 "
+PASS CSS Transitions: property <border-image-outset> from [0] to [1] at (1.5) should be [1.5]
 FAIL CSS Transitions with transition: all: property <border-image-outset> from [0] to [1] at (-0.3) should be [0] assert_equals: expected "0 " but got "- 0.3 "
 PASS CSS Transitions with transition: all: property <border-image-outset> from [0] to [1] at (0) should be [0]
-FAIL CSS Transitions with transition: all: property <border-image-outset> from [0] to [1] at (0.3) should be [0.3] assert_equals: expected "0 " but got "0.3 "
-FAIL CSS Transitions with transition: all: property <border-image-outset> from [0] to [1] at (0.6) should be [0.6] assert_equals: expected "0 " but got "0.6 "
+PASS CSS Transitions with transition: all: property <border-image-outset> from [0] to [1] at (0.3) should be [0.3]
+PASS CSS Transitions with transition: all: property <border-image-outset> from [0] to [1] at (0.6) should be [0.6]
 PASS CSS Transitions with transition: all: property <border-image-outset> from [0] to [1] at (1) should be [1]
-FAIL CSS Transitions with transition: all: property <border-image-outset> from [0] to [1] at (1.5) should be [1.5] assert_equals: expected "1 " but got "1.5 "
+PASS CSS Transitions with transition: all: property <border-image-outset> from [0] to [1] at (1.5) should be [1.5]
 FAIL CSS Animations: property <border-image-outset> from [0] to [1] at (-0.3) should be [0] assert_equals: expected "0 " but got "- 0.3 "
 PASS CSS Animations: property <border-image-outset> from [0] to [1] at (0) should be [0]
-FAIL CSS Animations: property <border-image-outset> from [0] to [1] at (0.3) should be [0.3] assert_equals: expected "0 " but got "0.3 "
-FAIL CSS Animations: property <border-image-outset> from [0] to [1] at (0.6) should be [0.6] assert_equals: expected "0 " but got "0.6 "
+PASS CSS Animations: property <border-image-outset> from [0] to [1] at (0.3) should be [0.3]
+PASS CSS Animations: property <border-image-outset> from [0] to [1] at (0.6) should be [0.6]
 PASS CSS Animations: property <border-image-outset> from [0] to [1] at (1) should be [1]
-FAIL CSS Animations: property <border-image-outset> from [0] to [1] at (1.5) should be [1.5] assert_equals: expected "1 " but got "1.5 "
+PASS CSS Animations: property <border-image-outset> from [0] to [1] at (1.5) should be [1.5]
 FAIL Web Animations: property <border-image-outset> from [0] to [1] at (-0.3) should be [0] assert_equals: expected "0 " but got "- 0.3 "
 PASS Web Animations: property <border-image-outset> from [0] to [1] at (0) should be [0]
-FAIL Web Animations: property <border-image-outset> from [0] to [1] at (0.3) should be [0.3] assert_equals: expected "0 " but got "0.3 "
-FAIL Web Animations: property <border-image-outset> from [0] to [1] at (0.6) should be [0.6] assert_equals: expected "0 " but got "0.6 "
+PASS Web Animations: property <border-image-outset> from [0] to [1] at (0.3) should be [0.3]
+PASS Web Animations: property <border-image-outset> from [0] to [1] at (0.6) should be [0.6]
 PASS Web Animations: property <border-image-outset> from [0] to [1] at (1) should be [1]
-FAIL Web Animations: property <border-image-outset> from [0] to [1] at (1.5) should be [1.5] assert_equals: expected "1 " but got "1.5 "
+PASS Web Animations: property <border-image-outset> from [0] to [1] at (1.5) should be [1.5]
 FAIL CSS Transitions: property <border-image-outset> from [1 2 3px 4px] to [101 102 103px 104px] at (-0.3) should be [0 0 0px 0px] assert_equals: expected "0 0 0px 0px " but got "- 29 - 28 - 27px - 26px "
 PASS CSS Transitions: property <border-image-outset> from [1 2 3px 4px] to [101 102 103px 104px] at (0) should be [1 2 3px 4px]
 PASS CSS Transitions: property <border-image-outset> from [1 2 3px 4px] to [101 102 103px 104px] at (0.3) should be [31 32 33px 34px]

Modified: trunk/Source/WebCore/ChangeLog (273477 => 273478)


--- trunk/Source/WebCore/ChangeLog	2021-02-25 08:30:59 UTC (rev 273477)
+++ trunk/Source/WebCore/ChangeLog	2021-02-25 08:31:26 UTC (rev 273478)
@@ -1,3 +1,16 @@
+2021-02-25  Antoine Quint  <[email protected]>
+
+        border-image-outset doesn't handle float values
+        https://bugs.webkit.org/show_bug.cgi?id=222389
+
+        Reviewed by Antti Koivisto.
+
+        We would get the int values rather than float values for the CSSValue created while parsing
+        the border-image-outset property.
+
+        * css/CSSToStyleMap.cpp:
+        (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
+
 2021-02-25  Ryosuke Niwa  <[email protected]>
 
         Avoid heap allocation for EventContexts

Modified: trunk/Source/WebCore/css/CSSToStyleMap.cpp (273477 => 273478)


--- trunk/Source/WebCore/css/CSSToStyleMap.cpp	2021-02-25 08:30:59 UTC (rev 273477)
+++ trunk/Source/WebCore/css/CSSToStyleMap.cpp	2021-02-25 08:31:26 UTC (rev 273478)
@@ -593,7 +593,7 @@
     LengthBox box; // Defaults to 'auto' so we don't have to handle that explicitly below.
     Quad* slices = borderWidths.quadValue();
     if (slices->top()->isNumber())
-        box.top() = Length(slices->top()->intValue(), LengthType::Relative);
+        box.top() = Length(slices->top()->floatValue(), LengthType::Relative);
     else if (slices->top()->isPercentage())
         box.top() = Length(slices->top()->doubleValue(CSSUnitType::CSS_PERCENTAGE), LengthType::Percent);
     else if (slices->top()->valueID() != CSSValueAuto)
@@ -600,7 +600,7 @@
         box.top() = slices->top()->computeLength<Length>(conversionData);
 
     if (slices->right()->isNumber())
-        box.right() = Length(slices->right()->intValue(), LengthType::Relative);
+        box.right() = Length(slices->right()->floatValue(), LengthType::Relative);
     else if (slices->right()->isPercentage())
         box.right() = Length(slices->right()->doubleValue(CSSUnitType::CSS_PERCENTAGE), LengthType::Percent);
     else if (slices->right()->valueID() != CSSValueAuto)
@@ -607,7 +607,7 @@
         box.right() = slices->right()->computeLength<Length>(conversionData);
 
     if (slices->bottom()->isNumber())
-        box.bottom() = Length(slices->bottom()->intValue(), LengthType::Relative);
+        box.bottom() = Length(slices->bottom()->floatValue(), LengthType::Relative);
     else if (slices->bottom()->isPercentage())
         box.bottom() = Length(slices->bottom()->doubleValue(CSSUnitType::CSS_PERCENTAGE), LengthType::Percent);
     else if (slices->bottom()->valueID() != CSSValueAuto)
@@ -614,7 +614,7 @@
         box.bottom() = slices->bottom()->computeLength<Length>(conversionData);
 
     if (slices->left()->isNumber())
-        box.left() = Length(slices->left()->intValue(), LengthType::Relative);
+        box.left() = Length(slices->left()->floatValue(), LengthType::Relative);
     else if (slices->left()->isPercentage())
         box.left() = Length(slices->left()->doubleValue(CSSUnitType::CSS_PERCENTAGE), LengthType::Percent);
     else if (slices->left()->valueID() != CSSValueAuto)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to