Title: [275221] trunk
Revision
275221
Author
[email protected]
Date
2021-03-30 12:02:15 -0700 (Tue, 30 Mar 2021)

Log Message

[CSS Backgrounds] WPT test css/css-backgrounds/animations/border-image-width-interpolation.html asserts
https://bugs.webkit.org/show_bug.cgi?id=206578

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Update the test output, the remaining failures are due to issues with calc() serialization (see
https://bugs.webkit.org/show_bug.cgi?id=223875).

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

Source/WebCore:

Ensure we pass the RenderStyle through the methods eventually calling createValue() for calculated lengths.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForNinePieceImageQuad):
(WebCore::valueForNinePieceImage):
(WebCore::valueForReflection):
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

LayoutTests:

Unskip imported/w3c/web-platform-tests/css/css-backgrounds/animations/border-image-width-interpolation.html
as well as imported/w3c/web-platform-tests/css/css-backgrounds/animations/border-image-outset-composition.html
and imported/w3c/web-platform-tests/css/css-backgrounds/animations/border-image-width-composition.html.

* TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (275220 => 275221)


--- trunk/LayoutTests/ChangeLog	2021-03-30 18:57:54 UTC (rev 275220)
+++ trunk/LayoutTests/ChangeLog	2021-03-30 19:02:15 UTC (rev 275221)
@@ -1,3 +1,16 @@
+2021-03-30  Antoine Quint  <[email protected]>
+
+        [CSS Backgrounds] WPT test css/css-backgrounds/animations/border-image-width-interpolation.html asserts
+        https://bugs.webkit.org/show_bug.cgi?id=206578
+
+        Reviewed by Dean Jackson.
+
+        Unskip imported/w3c/web-platform-tests/css/css-backgrounds/animations/border-image-width-interpolation.html
+        as well as imported/w3c/web-platform-tests/css/css-backgrounds/animations/border-image-outset-composition.html
+        and imported/w3c/web-platform-tests/css/css-backgrounds/animations/border-image-width-composition.html.
+
+        * TestExpectations:
+
 2021-03-30  Andres Gonzalez  <[email protected]>
 
         Fix for accessibility/textarea-insertion-point-line-number.html.

Modified: trunk/LayoutTests/TestExpectations (275220 => 275221)


--- trunk/LayoutTests/TestExpectations	2021-03-30 18:57:54 UTC (rev 275220)
+++ trunk/LayoutTests/TestExpectations	2021-03-30 19:02:15 UTC (rev 275221)
@@ -3612,15 +3612,11 @@
 webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/css3-border-image-repeat-stretch.html [ ImageOnlyFailure ]
 webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/first-letter-space-not-selected.html [ ImageOnlyFailure ]
 
-webkit.org/b/206578 [ Debug ] imported/w3c/web-platform-tests/css/css-backgrounds/animations/border-image-width-interpolation.html [ Skip ]
 webkit.org/b/206579 [ Debug ] imported/w3c/web-platform-tests/css/css-backgrounds/background-size/vector/zero-height-ratio-auto-5px.html [ Skip ]
 webkit.org/b/206579 [ Debug ] imported/w3c/web-platform-tests/css/css-backgrounds/background-size/vector/zero-width-ratio-auto-5px.html [ Skip ]
 
 webkit.org/b/207260 imported/w3c/web-platform-tests/web-animations/timing-model/animations/update-playback-rate-zero.html [ ImageOnlyFailure ]
 
-webkit.org/b/207261 [ Debug ] imported/w3c/web-platform-tests/css/css-backgrounds/animations/border-image-outset-composition.html [ Skip ]
-webkit.org/b/207261 [ Debug ] imported/w3c/web-platform-tests/css/css-backgrounds/animations/border-image-width-composition.html [ Skip ]
-
 webkit.org/b/207262 imported/w3c/web-platform-tests/web-animations/timing-model/animations/sync-start-times.html [ Pass ImageOnlyFailure ]
 
 # WebXR is being implemented

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (275220 => 275221)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-03-30 18:57:54 UTC (rev 275220)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-03-30 19:02:15 UTC (rev 275221)
@@ -1,5 +1,17 @@
 2021-03-30  Antoine Quint  <[email protected]>
 
+        [CSS Backgrounds] WPT test css/css-backgrounds/animations/border-image-width-interpolation.html asserts
+        https://bugs.webkit.org/show_bug.cgi?id=206578
+
+        Reviewed by Dean Jackson.
+
+        Update the test output, the remaining failures are due to issues with calc() serialization (see
+        https://bugs.webkit.org/show_bug.cgi?id=223875).
+
+        * web-platform-tests/css/css-backgrounds/animations/border-image-width-interpolation-expected.txt:
+
+2021-03-30  Antoine Quint  <[email protected]>
+
         Account for "cover" and "contain" when interpolating background-size
         https://bugs.webkit.org/show_bug.cgi?id=223879
 

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


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/border-image-width-interpolation-expected.txt	2021-03-30 18:57:54 UTC (rev 275220)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/border-image-width-interpolation-expected.txt	2021-03-30 19:02:15 UTC (rev 275221)
@@ -247,54 +247,54 @@
 PASS Web Animations: property <border-image-width> from [10px 20% 30 40px] to [80px 70% 60 50px] at (1.5) should be [115px  95%  75  55px]
 PASS Web Animations: property <border-image-width> from [10px 20% 30 40px] to [80px 70% 60 50px] at (5) should be [360px 270% 180  90px]
 PASS Web Animations: property <border-image-width> from [10px 20% 30 40px] to [80px 70% 60 50px] at (10) should be [710px 520% 330 140px]
-FAIL CSS Transitions: property <border-image-width> from [10%] to [20px] at (-0.3) should be [calc(13% + -6px)] assert_equals: expected "7px " but got ""
+FAIL CSS Transitions: property <border-image-width> from [10%] to [20px] at (-0.3) should be [calc(13% + -6px)] assert_equals: expected "7px " but got "calc ( ( 10 % * 1.3 ) + ( 20px * - 0.3 ) ) "
 PASS CSS Transitions: property <border-image-width> from [10%] to [20px] at (0) should be [10%]
-FAIL CSS Transitions: property <border-image-width> from [10%] to [20px] at (0.3) should be [calc(7% + 6px)] assert_equals: expected "13px " but got ""
-FAIL CSS Transitions: property <border-image-width> from [10%] to [20px] at (0.6) should be [calc(4% + 12px)] assert_equals: expected "16px " but got ""
+FAIL CSS Transitions: property <border-image-width> from [10%] to [20px] at (0.3) should be [calc(7% + 6px)] assert_equals: expected "13px " but got "calc ( ( 10 % * 0.7 ) + ( 20px * 0.3 ) ) "
+FAIL CSS Transitions: property <border-image-width> from [10%] to [20px] at (0.6) should be [calc(4% + 12px)] assert_equals: expected "16px " but got "calc ( ( 10 % * 0.4 ) + ( 20px * 0.6 ) ) "
 PASS CSS Transitions: property <border-image-width> from [10%] to [20px] at (1) should be [calc(0% + 20px)]
-FAIL CSS Transitions: property <border-image-width> from [10%] to [20px] at (1.5) should be [calc(-5% + 30px)] assert_equals: expected "25px " but got ""
-FAIL CSS Transitions with transition: all: property <border-image-width> from [10%] to [20px] at (-0.3) should be [calc(13% + -6px)] assert_equals: expected "7px " but got ""
+FAIL CSS Transitions: property <border-image-width> from [10%] to [20px] at (1.5) should be [calc(-5% + 30px)] assert_equals: expected "25px " but got "calc ( ( 10 % * - 0.5 ) + ( 20px * 1.5 ) ) "
+FAIL CSS Transitions with transition: all: property <border-image-width> from [10%] to [20px] at (-0.3) should be [calc(13% + -6px)] assert_equals: expected "7px " but got "calc ( ( 10 % * 1.3 ) + ( 20px * - 0.3 ) ) "
 PASS CSS Transitions with transition: all: property <border-image-width> from [10%] to [20px] at (0) should be [10%]
-FAIL CSS Transitions with transition: all: property <border-image-width> from [10%] to [20px] at (0.3) should be [calc(7% + 6px)] assert_equals: expected "13px " but got ""
-FAIL CSS Transitions with transition: all: property <border-image-width> from [10%] to [20px] at (0.6) should be [calc(4% + 12px)] assert_equals: expected "16px " but got ""
+FAIL CSS Transitions with transition: all: property <border-image-width> from [10%] to [20px] at (0.3) should be [calc(7% + 6px)] assert_equals: expected "13px " but got "calc ( ( 10 % * 0.7 ) + ( 20px * 0.3 ) ) "
+FAIL CSS Transitions with transition: all: property <border-image-width> from [10%] to [20px] at (0.6) should be [calc(4% + 12px)] assert_equals: expected "16px " but got "calc ( ( 10 % * 0.4 ) + ( 20px * 0.6 ) ) "
 PASS CSS Transitions with transition: all: property <border-image-width> from [10%] to [20px] at (1) should be [calc(0% + 20px)]
-FAIL CSS Transitions with transition: all: property <border-image-width> from [10%] to [20px] at (1.5) should be [calc(-5% + 30px)] assert_equals: expected "25px " but got ""
-FAIL CSS Animations: property <border-image-width> from [10%] to [20px] at (-0.3) should be [calc(13% + -6px)] assert_equals: expected "7px " but got ""
+FAIL CSS Transitions with transition: all: property <border-image-width> from [10%] to [20px] at (1.5) should be [calc(-5% + 30px)] assert_equals: expected "25px " but got "calc ( ( 10 % * - 0.5 ) + ( 20px * 1.5 ) ) "
+FAIL CSS Animations: property <border-image-width> from [10%] to [20px] at (-0.3) should be [calc(13% + -6px)] assert_equals: expected "7px " but got "calc ( ( 10 % * 1.3 ) + ( 20px * - 0.3 ) ) "
 PASS CSS Animations: property <border-image-width> from [10%] to [20px] at (0) should be [10%]
-FAIL CSS Animations: property <border-image-width> from [10%] to [20px] at (0.3) should be [calc(7% + 6px)] assert_equals: expected "13px " but got ""
-FAIL CSS Animations: property <border-image-width> from [10%] to [20px] at (0.6) should be [calc(4% + 12px)] assert_equals: expected "16px " but got ""
+FAIL CSS Animations: property <border-image-width> from [10%] to [20px] at (0.3) should be [calc(7% + 6px)] assert_equals: expected "13px " but got "calc ( ( 10 % * 0.7 ) + ( 20px * 0.3 ) ) "
+FAIL CSS Animations: property <border-image-width> from [10%] to [20px] at (0.6) should be [calc(4% + 12px)] assert_equals: expected "16px " but got "calc ( ( 10 % * 0.4 ) + ( 20px * 0.6 ) ) "
 PASS CSS Animations: property <border-image-width> from [10%] to [20px] at (1) should be [calc(0% + 20px)]
-FAIL CSS Animations: property <border-image-width> from [10%] to [20px] at (1.5) should be [calc(-5% + 30px)] assert_equals: expected "25px " but got ""
-FAIL Web Animations: property <border-image-width> from [10%] to [20px] at (-0.3) should be [calc(13% + -6px)] assert_equals: expected "7px " but got ""
+FAIL CSS Animations: property <border-image-width> from [10%] to [20px] at (1.5) should be [calc(-5% + 30px)] assert_equals: expected "25px " but got "calc ( ( 10 % * - 0.5 ) + ( 20px * 1.5 ) ) "
+FAIL Web Animations: property <border-image-width> from [10%] to [20px] at (-0.3) should be [calc(13% + -6px)] assert_equals: expected "7px " but got "calc ( ( 10 % * 1.3 ) + ( 20px * - 0.3 ) ) "
 PASS Web Animations: property <border-image-width> from [10%] to [20px] at (0) should be [10%]
-FAIL Web Animations: property <border-image-width> from [10%] to [20px] at (0.3) should be [calc(7% + 6px)] assert_equals: expected "13px " but got ""
-FAIL Web Animations: property <border-image-width> from [10%] to [20px] at (0.6) should be [calc(4% + 12px)] assert_equals: expected "16px " but got ""
+FAIL Web Animations: property <border-image-width> from [10%] to [20px] at (0.3) should be [calc(7% + 6px)] assert_equals: expected "13px " but got "calc ( ( 10 % * 0.7 ) + ( 20px * 0.3 ) ) "
+FAIL Web Animations: property <border-image-width> from [10%] to [20px] at (0.6) should be [calc(4% + 12px)] assert_equals: expected "16px " but got "calc ( ( 10 % * 0.4 ) + ( 20px * 0.6 ) ) "
 PASS Web Animations: property <border-image-width> from [10%] to [20px] at (1) should be [calc(0% + 20px)]
-FAIL Web Animations: property <border-image-width> from [10%] to [20px] at (1.5) should be [calc(-5% + 30px)] assert_equals: expected "25px " but got ""
-FAIL CSS Transitions: property <border-image-width> from [10px] to [20%] at (-0.3) should be [calc(13px + -6%)] assert_equals: expected "7px " but got ""
+FAIL Web Animations: property <border-image-width> from [10%] to [20px] at (1.5) should be [calc(-5% + 30px)] assert_equals: expected "25px " but got "calc ( ( 10 % * - 0.5 ) + ( 20px * 1.5 ) ) "
+FAIL CSS Transitions: property <border-image-width> from [10px] to [20%] at (-0.3) should be [calc(13px + -6%)] assert_equals: expected "7px " but got "calc ( ( 10px * 1.3 ) + ( 20 % * - 0.3 ) ) "
 PASS CSS Transitions: property <border-image-width> from [10px] to [20%] at (0) should be [calc(0% + 10px)]
-FAIL CSS Transitions: property <border-image-width> from [10px] to [20%] at (0.3) should be [calc(7px + 6%)] assert_equals: expected "13px " but got ""
-FAIL CSS Transitions: property <border-image-width> from [10px] to [20%] at (0.6) should be [calc(4px + 12%)] assert_equals: expected "16px " but got ""
+FAIL CSS Transitions: property <border-image-width> from [10px] to [20%] at (0.3) should be [calc(7px + 6%)] assert_equals: expected "13px " but got "calc ( ( 10px * 0.7 ) + ( 20 % * 0.3 ) ) "
+FAIL CSS Transitions: property <border-image-width> from [10px] to [20%] at (0.6) should be [calc(4px + 12%)] assert_equals: expected "16px " but got "calc ( ( 10px * 0.4 ) + ( 20 % * 0.6 ) ) "
 PASS CSS Transitions: property <border-image-width> from [10px] to [20%] at (1) should be [20%]
-FAIL CSS Transitions: property <border-image-width> from [10px] to [20%] at (1.5) should be [calc(-5px + 30%)] assert_equals: expected "25px " but got ""
-FAIL CSS Transitions with transition: all: property <border-image-width> from [10px] to [20%] at (-0.3) should be [calc(13px + -6%)] assert_equals: expected "7px " but got ""
+FAIL CSS Transitions: property <border-image-width> from [10px] to [20%] at (1.5) should be [calc(-5px + 30%)] assert_equals: expected "25px " but got "calc ( ( 10px * - 0.5 ) + ( 20 % * 1.5 ) ) "
+FAIL CSS Transitions with transition: all: property <border-image-width> from [10px] to [20%] at (-0.3) should be [calc(13px + -6%)] assert_equals: expected "7px " but got "calc ( ( 10px * 1.3 ) + ( 20 % * - 0.3 ) ) "
 PASS CSS Transitions with transition: all: property <border-image-width> from [10px] to [20%] at (0) should be [calc(0% + 10px)]
-FAIL CSS Transitions with transition: all: property <border-image-width> from [10px] to [20%] at (0.3) should be [calc(7px + 6%)] assert_equals: expected "13px " but got ""
-FAIL CSS Transitions with transition: all: property <border-image-width> from [10px] to [20%] at (0.6) should be [calc(4px + 12%)] assert_equals: expected "16px " but got ""
+FAIL CSS Transitions with transition: all: property <border-image-width> from [10px] to [20%] at (0.3) should be [calc(7px + 6%)] assert_equals: expected "13px " but got "calc ( ( 10px * 0.7 ) + ( 20 % * 0.3 ) ) "
+FAIL CSS Transitions with transition: all: property <border-image-width> from [10px] to [20%] at (0.6) should be [calc(4px + 12%)] assert_equals: expected "16px " but got "calc ( ( 10px * 0.4 ) + ( 20 % * 0.6 ) ) "
 PASS CSS Transitions with transition: all: property <border-image-width> from [10px] to [20%] at (1) should be [20%]
-FAIL CSS Transitions with transition: all: property <border-image-width> from [10px] to [20%] at (1.5) should be [calc(-5px + 30%)] assert_equals: expected "25px " but got ""
-FAIL CSS Animations: property <border-image-width> from [10px] to [20%] at (-0.3) should be [calc(13px + -6%)] assert_equals: expected "7px " but got ""
+FAIL CSS Transitions with transition: all: property <border-image-width> from [10px] to [20%] at (1.5) should be [calc(-5px + 30%)] assert_equals: expected "25px " but got "calc ( ( 10px * - 0.5 ) + ( 20 % * 1.5 ) ) "
+FAIL CSS Animations: property <border-image-width> from [10px] to [20%] at (-0.3) should be [calc(13px + -6%)] assert_equals: expected "7px " but got "calc ( ( 10px * 1.3 ) + ( 20 % * - 0.3 ) ) "
 PASS CSS Animations: property <border-image-width> from [10px] to [20%] at (0) should be [calc(0% + 10px)]
-FAIL CSS Animations: property <border-image-width> from [10px] to [20%] at (0.3) should be [calc(7px + 6%)] assert_equals: expected "13px " but got ""
-FAIL CSS Animations: property <border-image-width> from [10px] to [20%] at (0.6) should be [calc(4px + 12%)] assert_equals: expected "16px " but got ""
+FAIL CSS Animations: property <border-image-width> from [10px] to [20%] at (0.3) should be [calc(7px + 6%)] assert_equals: expected "13px " but got "calc ( ( 10px * 0.7 ) + ( 20 % * 0.3 ) ) "
+FAIL CSS Animations: property <border-image-width> from [10px] to [20%] at (0.6) should be [calc(4px + 12%)] assert_equals: expected "16px " but got "calc ( ( 10px * 0.4 ) + ( 20 % * 0.6 ) ) "
 PASS CSS Animations: property <border-image-width> from [10px] to [20%] at (1) should be [20%]
-FAIL CSS Animations: property <border-image-width> from [10px] to [20%] at (1.5) should be [calc(-5px + 30%)] assert_equals: expected "25px " but got ""
-FAIL Web Animations: property <border-image-width> from [10px] to [20%] at (-0.3) should be [calc(13px + -6%)] assert_equals: expected "7px " but got ""
+FAIL CSS Animations: property <border-image-width> from [10px] to [20%] at (1.5) should be [calc(-5px + 30%)] assert_equals: expected "25px " but got "calc ( ( 10px * - 0.5 ) + ( 20 % * 1.5 ) ) "
+FAIL Web Animations: property <border-image-width> from [10px] to [20%] at (-0.3) should be [calc(13px + -6%)] assert_equals: expected "7px " but got "calc ( ( 10px * 1.3 ) + ( 20 % * - 0.3 ) ) "
 PASS Web Animations: property <border-image-width> from [10px] to [20%] at (0) should be [calc(0% + 10px)]
-FAIL Web Animations: property <border-image-width> from [10px] to [20%] at (0.3) should be [calc(7px + 6%)] assert_equals: expected "13px " but got ""
-FAIL Web Animations: property <border-image-width> from [10px] to [20%] at (0.6) should be [calc(4px + 12%)] assert_equals: expected "16px " but got ""
+FAIL Web Animations: property <border-image-width> from [10px] to [20%] at (0.3) should be [calc(7px + 6%)] assert_equals: expected "13px " but got "calc ( ( 10px * 0.7 ) + ( 20 % * 0.3 ) ) "
+FAIL Web Animations: property <border-image-width> from [10px] to [20%] at (0.6) should be [calc(4px + 12%)] assert_equals: expected "16px " but got "calc ( ( 10px * 0.4 ) + ( 20 % * 0.6 ) ) "
 PASS Web Animations: property <border-image-width> from [10px] to [20%] at (1) should be [20%]
-FAIL Web Animations: property <border-image-width> from [10px] to [20%] at (1.5) should be [calc(-5px + 30%)] assert_equals: expected "25px " but got ""
+FAIL Web Animations: property <border-image-width> from [10px] to [20%] at (1.5) should be [calc(-5px + 30%)] assert_equals: expected "25px " but got "calc ( ( 10px * - 0.5 ) + ( 20 % * 1.5 ) ) "
 PASS CSS Transitions: property <border-image-width> from [10px auto auto 20] to [110px auto auto 120] at (-0.3) should be [  0px auto auto   0]
 PASS CSS Transitions: property <border-image-width> from [10px auto auto 20] to [110px auto auto 120] at (0) should be [ 10px auto auto  20]
 PASS CSS Transitions: property <border-image-width> from [10px auto auto 20] to [110px auto auto 120] at (0.3) should be [ 40px auto auto  50]

Modified: trunk/Source/WebCore/ChangeLog (275220 => 275221)


--- trunk/Source/WebCore/ChangeLog	2021-03-30 18:57:54 UTC (rev 275220)
+++ trunk/Source/WebCore/ChangeLog	2021-03-30 19:02:15 UTC (rev 275221)
@@ -1,3 +1,18 @@
+2021-03-30  Antoine Quint  <[email protected]>
+
+        [CSS Backgrounds] WPT test css/css-backgrounds/animations/border-image-width-interpolation.html asserts
+        https://bugs.webkit.org/show_bug.cgi?id=206578
+
+        Reviewed by Dean Jackson.
+
+        Ensure we pass the RenderStyle through the methods eventually calling createValue() for calculated lengths.
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::valueForNinePieceImageQuad):
+        (WebCore::valueForNinePieceImage):
+        (WebCore::valueForReflection):
+        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
+
 2021-03-30  Andres Gonzalez  <[email protected]>
 
         Fix for accessibility/textarea-insertion-point-line-number.html.

Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (275220 => 275221)


--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2021-03-30 18:57:54 UTC (rev 275220)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2021-03-30 19:02:15 UTC (rev 275221)
@@ -157,7 +157,7 @@
     return CSSBorderImageSliceValue::create(CSSValuePool::singleton().createValue(WTFMove(quad)), image.fill());
 }
 
-static Ref<CSSPrimitiveValue> valueForNinePieceImageQuad(const LengthBox& box)
+static Ref<CSSPrimitiveValue> valueForNinePieceImageQuad(const LengthBox& box, const RenderStyle& style)
 {
     RefPtr<CSSPrimitiveValue> top;
     RefPtr<CSSPrimitiveValue> right;
@@ -169,7 +169,7 @@
     if (box.top().isRelative())
         top = cssValuePool.createValue(box.top().value(), CSSUnitType::CSS_NUMBER);
     else
-        top = cssValuePool.createValue(box.top());
+        top = cssValuePool.createValue(box.top(), style);
 
     if (box.right() == box.top() && box.bottom() == box.top() && box.left() == box.top()) {
         right = top;
@@ -179,7 +179,7 @@
         if (box.right().isRelative())
             right = cssValuePool.createValue(box.right().value(), CSSUnitType::CSS_NUMBER);
         else
-            right = cssValuePool.createValue(box.right());
+            right = cssValuePool.createValue(box.right(), style);
 
         if (box.bottom() == box.top() && box.right() == box.left()) {
             bottom = top;
@@ -188,7 +188,7 @@
             if (box.bottom().isRelative())
                 bottom = cssValuePool.createValue(box.bottom().value(), CSSUnitType::CSS_NUMBER);
             else
-                bottom = cssValuePool.createValue(box.bottom());
+                bottom = cssValuePool.createValue(box.bottom(), style);
 
             if (box.left() == box.right())
                 left = right;
@@ -196,7 +196,7 @@
                 if (box.left().isRelative())
                     left = cssValuePool.createValue(box.left().value(), CSSUnitType::CSS_NUMBER);
                 else
-                    left = cssValuePool.createValue(box.left());
+                    left = cssValuePool.createValue(box.left(), style);
             }
         }
     }
@@ -222,7 +222,7 @@
     return cssValuePool.createValue(Pair::create(WTFMove(horizontalRepeat), WTFMove(verticalRepeat)));
 }
 
-static Ref<CSSValue> valueForNinePieceImage(const NinePieceImage& image)
+static Ref<CSSValue> valueForNinePieceImage(const NinePieceImage& image, const RenderStyle& style)
 {
     if (!image.hasImage())
         return CSSValuePool::singleton().createIdentifierValue(CSSValueNone);
@@ -232,8 +232,8 @@
         imageValue = image.image()->cssValue();
 
     auto imageSlices = valueForNinePieceImageSlice(image);
-    auto borderSlices = valueForNinePieceImageQuad(image.borderSlices());
-    auto outset = valueForNinePieceImageQuad(image.outset());
+    auto borderSlices = valueForNinePieceImageQuad(image.borderSlices(), style);
+    auto outset = valueForNinePieceImageQuad(image.outset(), style);
     auto repeat = valueForNinePieceImageRepeat(image);
     return createBorderImageValue(WTFMove(imageValue), WTFMove(imageSlices), WTFMove(borderSlices), WTFMove(outset), WTFMove(repeat));
 }
@@ -282,7 +282,7 @@
         break;
     }
 
-    return CSSReflectValue::create(direction.releaseNonNull(), offset.releaseNonNull(), valueForNinePieceImage(reflection->mask()));
+    return CSSReflectValue::create(direction.releaseNonNull(), offset.releaseNonNull(), valueForNinePieceImage(reflection->mask(), style));
 }
 
 static Ref<CSSValueList> createPositionListForLayer(CSSPropertyID propertyID, const FillLayer& layer, const RenderStyle& style)
@@ -3498,25 +3498,25 @@
         case CSSPropertyWebkitBackfaceVisibility:
             return cssValuePool.createIdentifierValue((style.backfaceVisibility() == BackfaceVisibility::Hidden) ? CSSValueHidden : CSSValueVisible);
         case CSSPropertyWebkitBorderImage:
-            return valueForNinePieceImage(style.borderImage());
+            return valueForNinePieceImage(style.borderImage(), style);
         case CSSPropertyBorderImageOutset:
-            return valueForNinePieceImageQuad(style.borderImage().outset());
+            return valueForNinePieceImageQuad(style.borderImage().outset(), style);
         case CSSPropertyBorderImageRepeat:
             return valueForNinePieceImageRepeat(style.borderImage());
         case CSSPropertyBorderImageSlice:
             return valueForNinePieceImageSlice(style.borderImage());
         case CSSPropertyBorderImageWidth:
-            return valueForNinePieceImageQuad(style.borderImage().borderSlices());
+            return valueForNinePieceImageQuad(style.borderImage().borderSlices(), style);
         case CSSPropertyWebkitMaskBoxImage:
-            return valueForNinePieceImage(style.maskBoxImage());
+            return valueForNinePieceImage(style.maskBoxImage(), style);
         case CSSPropertyWebkitMaskBoxImageOutset:
-            return valueForNinePieceImageQuad(style.maskBoxImage().outset());
+            return valueForNinePieceImageQuad(style.maskBoxImage().outset(), style);
         case CSSPropertyWebkitMaskBoxImageRepeat:
             return valueForNinePieceImageRepeat(style.maskBoxImage());
         case CSSPropertyWebkitMaskBoxImageSlice:
             return valueForNinePieceImageSlice(style.maskBoxImage());
         case CSSPropertyWebkitMaskBoxImageWidth:
-            return valueForNinePieceImageQuad(style.maskBoxImage().borderSlices());
+            return valueForNinePieceImageQuad(style.maskBoxImage().borderSlices(), style);
         case CSSPropertyWebkitMaskBoxImageSource:
             if (style.maskBoxImageSource())
                 return style.maskBoxImageSource()->cssValue();
@@ -3790,7 +3790,7 @@
         case CSSPropertyBorderLeft:
             return getCSSPropertyValuesForShorthandProperties(borderLeftShorthand());
         case CSSPropertyBorderImage:
-            return valueForNinePieceImage(style.borderImage());
+            return valueForNinePieceImage(style.borderImage(), style);
         case CSSPropertyBorderInline: {
             auto value = propertyValue(CSSPropertyBorderInlineStart, DoNotUpdateLayout);
             if (!compareCSSValuePtr<CSSValue>(value, propertyValue(CSSPropertyBorderInlineEnd, DoNotUpdateLayout)))
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to