You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
border-image-width computed values should be a calc() value if it contains a percentage
https://bugs.webkit.org/show_bug.cgi?id=224420
Reviewed by Simon Fraser.
LayoutTests/imported/w3c:
We now pass the final test that was a FAIL result for the border-image-width computed style test.
We also pass a fair few border-image-width interpolation tests since we used to fail them as a
result of the expected value being expected to be a resolved value rather than a calc() value
due the computed style we returned for such values. There are a few PASS results than became
FAIL results because we now correctly expect a calc() value, but we return the keyframe value
as-is for 0 and 1 progress, a bug we will fix shortly.
* web-platform-tests/css/css-backgrounds/animations/border-image-width-interpolation-expected.txt:
* web-platform-tests/css/css-backgrounds/parsing/border-image-width-computed-expected.txt:
Source/WebCore:
When handling calc() values containing a percentage, we must retain the calc() form when creating
the computed style for border-image-width.
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapNinePieceImageQuad):
Canonical link: https://commits.webkit.org/236403@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275834 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Copy file name to clipboardExpand all lines: LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/border-image-width-interpolation-expected.txt
+40-40Lines changed: 40 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -247,54 +247,54 @@ PASS Web Animations: property <border-image-width> from [10px 20% 30 40px] to [8
247
247
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]
248
248
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]
249
249
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]
250
-
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 ( 13 % - 6px ) "
250
+
PASS CSS Transitions: property <border-image-width> from [10%] to [20px] at (-0.3) should be [calc(13% + -6px)]
251
251
PASS CSS Transitions: property <border-image-width> from [10%] to [20px] at (0) should be [10%]
252
-
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 ( 7 % + 6px ) "
253
-
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 ( 4 % + 12px ) "
254
-
PASS CSS Transitions: property <border-image-width> from [10%] to [20px] at (1) should be [calc(0% + 20px)]
255
-
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 ( - 5 % + 30px ) "
256
-
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 ( 13 % - 6px ) "
252
+
PASS CSS Transitions: property <border-image-width> from [10%] to [20px] at (0.3) should be [calc(7% + 6px)]
253
+
PASS CSS Transitions: property <border-image-width> from [10%] to [20px] at (0.6) should be [calc(4% + 12px)]
254
+
FAIL CSS Transitions: property <border-image-width> from [10%] to [20px] at (1) should be [calc(0% + 20px)] assert_equals: expected "calc ( 0 % + 20px ) " but got "20px "
255
+
PASS CSS Transitions: property <border-image-width> from [10%] to [20px] at (1.5) should be [calc(-5% + 30px)]
256
+
PASS CSS Transitions with transition: all: property <border-image-width> from [10%] to [20px] at (-0.3) should be [calc(13% + -6px)]
257
257
PASS CSS Transitions with transition: all: property <border-image-width> from [10%] to [20px] at (0) should be [10%]
258
-
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 ( 7 % + 6px ) "
259
-
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 ( 4 % + 12px ) "
260
-
PASS CSS Transitions with transition: all: property <border-image-width> from [10%] to [20px] at (1) should be [calc(0% + 20px)]
261
-
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 ( - 5 % + 30px ) "
262
-
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 ( 13 % - 6px ) "
258
+
PASS CSS Transitions with transition: all: property <border-image-width> from [10%] to [20px] at (0.3) should be [calc(7% + 6px)]
259
+
PASS CSS Transitions with transition: all: property <border-image-width> from [10%] to [20px] at (0.6) should be [calc(4% + 12px)]
260
+
FAIL CSS Transitions with transition: all: property <border-image-width> from [10%] to [20px] at (1) should be [calc(0% + 20px)] assert_equals: expected "calc ( 0 % + 20px ) " but got "20px "
261
+
PASS CSS Transitions with transition: all: property <border-image-width> from [10%] to [20px] at (1.5) should be [calc(-5% + 30px)]
262
+
PASS CSS Animations: property <border-image-width> from [10%] to [20px] at (-0.3) should be [calc(13% + -6px)]
263
263
PASS CSS Animations: property <border-image-width> from [10%] to [20px] at (0) should be [10%]
264
-
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 ( 7 % + 6px ) "
265
-
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 ( 4 % + 12px ) "
266
-
PASS CSS Animations: property <border-image-width> from [10%] to [20px] at (1) should be [calc(0% + 20px)]
267
-
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 ( - 5 % + 30px ) "
268
-
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 ( 13 % - 6px ) "
264
+
PASS CSS Animations: property <border-image-width> from [10%] to [20px] at (0.3) should be [calc(7% + 6px)]
265
+
PASS CSS Animations: property <border-image-width> from [10%] to [20px] at (0.6) should be [calc(4% + 12px)]
266
+
FAIL CSS Animations: property <border-image-width> from [10%] to [20px] at (1) should be [calc(0% + 20px)] assert_equals: expected "calc ( 0 % + 20px ) " but got "20px "
267
+
PASS CSS Animations: property <border-image-width> from [10%] to [20px] at (1.5) should be [calc(-5% + 30px)]
268
+
PASS Web Animations: property <border-image-width> from [10%] to [20px] at (-0.3) should be [calc(13% + -6px)]
269
269
PASS Web Animations: property <border-image-width> from [10%] to [20px] at (0) should be [10%]
270
-
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 ( 7 % + 6px ) "
271
-
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 ( 4 % + 12px ) "
272
-
PASS Web Animations: property <border-image-width> from [10%] to [20px] at (1) should be [calc(0% + 20px)]
273
-
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 ( - 5 % + 30px ) "
274
-
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 ( - 6 % + 13px ) "
275
-
PASS CSS Transitions: property <border-image-width> from [10px] to [20%] at (0) should be [calc(0% + 10px)]
276
-
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 ( 6 % + 7px ) "
277
-
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 ( 12 % + 4px ) "
270
+
PASS Web Animations: property <border-image-width> from [10%] to [20px] at (0.3) should be [calc(7% + 6px)]
271
+
PASS Web Animations: property <border-image-width> from [10%] to [20px] at (0.6) should be [calc(4% + 12px)]
272
+
FAIL Web Animations: property <border-image-width> from [10%] to [20px] at (1) should be [calc(0% + 20px)] assert_equals: expected "calc ( 0 % + 20px ) " but got "20px "
273
+
PASS Web Animations: property <border-image-width> from [10%] to [20px] at (1.5) should be [calc(-5% + 30px)]
274
+
PASS CSS Transitions: property <border-image-width> from [10px] to [20%] at (-0.3) should be [calc(13px + -6%)]
275
+
FAIL CSS Transitions: property <border-image-width> from [10px] to [20%] at (0) should be [calc(0% + 10px)] assert_equals: expected "calc ( 0 % + 10px ) " but got "10px "
276
+
PASS CSS Transitions: property <border-image-width> from [10px] to [20%] at (0.3) should be [calc(7px + 6%)]
277
+
PASS CSS Transitions: property <border-image-width> from [10px] to [20%] at (0.6) should be [calc(4px + 12%)]
278
278
PASS CSS Transitions: property <border-image-width> from [10px] to [20%] at (1) should be [20%]
279
-
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 ( 30 % - 5px ) "
280
-
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 ( - 6 % + 13px ) "
281
-
PASS CSS Transitions with transition: all: property <border-image-width> from [10px] to [20%] at (0) should be [calc(0% + 10px)]
282
-
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 ( 6 % + 7px ) "
283
-
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 ( 12 % + 4px ) "
279
+
PASS CSS Transitions: property <border-image-width> from [10px] to [20%] at (1.5) should be [calc(-5px + 30%)]
280
+
PASS CSS Transitions with transition: all: property <border-image-width> from [10px] to [20%] at (-0.3) should be [calc(13px + -6%)]
281
+
FAIL CSS Transitions with transition: all: property <border-image-width> from [10px] to [20%] at (0) should be [calc(0% + 10px)] assert_equals: expected "calc ( 0 % + 10px ) " but got "10px "
282
+
PASS CSS Transitions with transition: all: property <border-image-width> from [10px] to [20%] at (0.3) should be [calc(7px + 6%)]
283
+
PASS CSS Transitions with transition: all: property <border-image-width> from [10px] to [20%] at (0.6) should be [calc(4px + 12%)]
284
284
PASS CSS Transitions with transition: all: property <border-image-width> from [10px] to [20%] at (1) should be [20%]
285
-
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 ( 30 % - 5px ) "
286
-
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 ( - 6 % + 13px ) "
287
-
PASS CSS Animations: property <border-image-width> from [10px] to [20%] at (0) should be [calc(0% + 10px)]
288
-
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 ( 6 % + 7px ) "
289
-
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 ( 12 % + 4px ) "
285
+
PASS CSS Transitions with transition: all: property <border-image-width> from [10px] to [20%] at (1.5) should be [calc(-5px + 30%)]
286
+
PASS CSS Animations: property <border-image-width> from [10px] to [20%] at (-0.3) should be [calc(13px + -6%)]
287
+
FAIL CSS Animations: property <border-image-width> from [10px] to [20%] at (0) should be [calc(0% + 10px)] assert_equals: expected "calc ( 0 % + 10px ) " but got "10px "
288
+
PASS CSS Animations: property <border-image-width> from [10px] to [20%] at (0.3) should be [calc(7px + 6%)]
289
+
PASS CSS Animations: property <border-image-width> from [10px] to [20%] at (0.6) should be [calc(4px + 12%)]
290
290
PASS CSS Animations: property <border-image-width> from [10px] to [20%] at (1) should be [20%]
291
-
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 ( 30 % - 5px ) "
292
-
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 ( - 6 % + 13px ) "
293
-
PASS Web Animations: property <border-image-width> from [10px] to [20%] at (0) should be [calc(0% + 10px)]
294
-
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 ( 6 % + 7px ) "
295
-
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 ( 12 % + 4px ) "
291
+
PASS CSS Animations: property <border-image-width> from [10px] to [20%] at (1.5) should be [calc(-5px + 30%)]
292
+
PASS Web Animations: property <border-image-width> from [10px] to [20%] at (-0.3) should be [calc(13px + -6%)]
293
+
FAIL Web Animations: property <border-image-width> from [10px] to [20%] at (0) should be [calc(0% + 10px)] assert_equals: expected "calc ( 0 % + 10px ) " but got "10px "
294
+
PASS Web Animations: property <border-image-width> from [10px] to [20%] at (0.3) should be [calc(7px + 6%)]
295
+
PASS Web Animations: property <border-image-width> from [10px] to [20%] at (0.6) should be [calc(4px + 12%)]
296
296
PASS Web Animations: property <border-image-width> from [10px] to [20%] at (1) should be [20%]
297
-
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 ( 30 % - 5px ) "
297
+
PASS Web Animations: property <border-image-width> from [10px] to [20%] at (1.5) should be [calc(-5px + 30%)]
298
298
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]
299
299
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]
300
300
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]
Copy file name to clipboardExpand all lines: LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-image-width-computed-expected.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ PASS Property border-image-width value '1'
4
4
PASS Property border-image-width value 'auto'
5
5
PASS Property border-image-width value '10px'
6
6
PASS Property border-image-width value '20%'
7
-
FAIL Property border-image-width value 'calc(20% + 10px)' assert_equals: expected "calc(20% + 10px)" but got "30px"
7
+
PASS Property border-image-width value 'calc(20% + 10px)'
8
8
PASS Property border-image-width value 'calc(-0.5em + 10px)'
9
9
PASS Property border-image-width value 'calc(0.5em + 10px)'
0 commit comments