Skip to content

Commit

Permalink
Re-import css/css-values WPT
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=259024
rdar://111964727

Reviewed by Ryosuke Niwa.

Upstream commit: web-platform-tests/wpt@df612d1

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/resources/resource-files.json:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/acos-asin-atan-atan2-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/acos-asin-atan-atan2-computed.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/acos-asin-atan-atan2-invalid-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/acos-asin-atan-atan2-invalid.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/animations/calc-interpolation-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/animations/calc-interpolation.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/animations/line-height-lh-transition-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/animations/line-height-lh-transition.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/animations/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-in-media-queries-with-mixed-units-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-in-media-queries-with-mixed-units.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-computed.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-angle-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-angle.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-length-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-length.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-number-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-number.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-resolution-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-resolution.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-time-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-serialize-time.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-invalid-parsing-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-invalid-parsing.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-linear-radial-conic-gradient-001-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-linear-radial-conic-gradient-001.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-serialization-002-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-serialization-002.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/cap-invalidation-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/cap-invalidation.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/ch-unit-018-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/ch-unit-018.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/crashtests/viewport-unit-inline-style-crash.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/crashtests/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-values/animations/w3c-import.log.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/ex-unit-004.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/exp-log-compute-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/exp-log-compute.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/exp-log-invalid.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/getComputedStyle-calc-mixed-units-001-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/getComputedStyle-calc-mixed-units-001.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/getComputedStyle-calc-mixed-units-002-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/getComputedStyle-calc-mixed-units-002.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/hypot-pow-sqrt-computed.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-012-expected.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-012.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-015-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/ic-unit-015.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/lh-unit-003-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/lh-unit-003.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/lh-unit-004-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/lh-unit-004.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-angle-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-angle-computed.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-length-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-length-computed.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-length-percent-serialize-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-length-percent-serialize.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-percentage-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-percentage-computed.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-time-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-time-computed.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/negative-calc-to-non-negative-integer.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/rcap-invalidation-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/rcap-invalidation.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/rch-invalidation-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/rch-invalidation.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/rex-invalidation-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/rex-invalidation.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/ric-invalidation-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/ric-invalidation.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/rlh-invalidation-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/rlh-invalidation.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/round-function-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/round-function.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/round-mod-rem-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/round-mod-rem-computed.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/round-mod-rem-invalid.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/round-mod-rem-serialize.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/signs-abs-computed.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/sin-cos-tan-computed.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/sin-cos-tan-invalid.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/support/mixed-units-01.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/support/mixed-units-02.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/support/mixed-units-03.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/support/mixed-units-04.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/support/mixed-units-05.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/support/mixed-units-06.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/support/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/urls/resolve-relative-to-base.sub-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-values/urls/resolve-relative-to-base-expected.txt.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/urls/resolve-relative-to-base.sub.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-values/urls/resolve-relative-to-base.html.
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/urls/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/viewport-units-invalidation-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/viewport-units-invalidation.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/w3c-import.log:
* LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/css-values/minmax-length-percent-computed-actual.txt: Removed.
* LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/css-values/minmax-length-percent-computed-expected.txt: Removed.
* LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/css-values/minmax-length-percent-computed-expected.txt: Removed.
* LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/css-values/minmax-length-computed-actual.txt: Removed.
* LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/css-values/minmax-length-computed-expected.txt: Removed.
* LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/css-values/minmax-length-computed-expected.txt: Removed.

Canonical link: https://commits.webkit.org/265887@main
  • Loading branch information
nt1m committed Jul 9, 2023
1 parent 29ee9a1 commit 9047798
Show file tree
Hide file tree
Showing 103 changed files with 1,918 additions and 740 deletions.
5 changes: 4 additions & 1 deletion LayoutTests/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -3696,7 +3696,11 @@ webkit.org/b/203338 imported/w3c/web-platform-tests/css/css-values/vh_not_refres
webkit.org/b/242465 imported/w3c/web-platform-tests/css/css-values/calc-width-table-auto-1.html [ Skip ]
webkit.org/b/242465 imported/w3c/web-platform-tests/css/css-values/calc-width-table-fixed-1.html [ Skip ]
webkit.org/b/242466 imported/w3c/web-platform-tests/css/css-values/cap-unit-001.html [ ImageOnlyFailure ]
webkit.org/b/259025 imported/w3c/web-platform-tests/css/css-values/ch-unit-018.html [ ImageOnlyFailure ]
webkit.org/b/259025 imported/w3c/web-platform-tests/css/css-values/ic-unit-015.html [ ImageOnlyFailure ]
webkit.org/b/214466 imported/w3c/web-platform-tests/css/css-values/ex-unit-004.html [ ImageOnlyFailure ]
webkit.org/b/242467 imported/w3c/web-platform-tests/css/css-values/calc-text-indent-intrinsic-1.html [ ImageOnlyFailure ]
webkit.org/b/259026 imported/w3c/web-platform-tests/css/css-values/signs-abs-computed.html [ Skip ]

# wpt css-sizing failures
webkit.org/b/203509 imported/w3c/web-platform-tests/css/css-sizing/auto-scrollbar-inside-stf-abspos.html [ ImageOnlyFailure ]
Expand Down Expand Up @@ -4810,7 +4814,6 @@ webkit.org/b/214464 imported/w3c/web-platform-tests/css/css-text-decor/text-deco
webkit.org/b/214465 imported/w3c/web-platform-tests/css/mediaqueries/prefers-color-scheme-svg-image.html [ ImageOnlyFailure ]
webkit.org/b/214465 imported/w3c/web-platform-tests/css/mediaqueries/prefers-color-scheme-svg-image-normal-with-meta-dark.html [ ImageOnlyFailure ]

webkit.org/b/214466 imported/w3c/web-platform-tests/css/css-values/ex-unit-004.html [ ImageOnlyFailure ]
webkit.org/b/214466 imported/w3c/web-platform-tests/css/css-shapes/shape-outside/formatting-context/shape-outside-formatting-context.tentative.html [ ImageOnlyFailure ]

webkit.org/b/251953 imported/w3c/web-platform-tests/shadow-dom/directionality/dir-shadow-06.html [ ImageOnlyFailure ]
Expand Down
6 changes: 6 additions & 0 deletions LayoutTests/imported/w3c/resources/resource-files.json
Original file line number Diff line number Diff line change
Expand Up @@ -3681,6 +3681,12 @@
"web-platform-tests/css/css-values/ex-calc-expression-001-ref.html",
"web-platform-tests/css/css-values/negative-calc-to-non-negative-integer-ref.html",
"web-platform-tests/css/css-values/rem-root-font-size-restyle-1-ref.html",
"web-platform-tests/css/css-values/support/mixed-units-01.html",
"web-platform-tests/css/css-values/support/mixed-units-02.html",
"web-platform-tests/css/css-values/support/mixed-units-03.html",
"web-platform-tests/css/css-values/support/mixed-units-04.html",
"web-platform-tests/css/css-values/support/mixed-units-05.html",
"web-platform-tests/css/css-values/support/mixed-units-06.html",
"web-platform-tests/css/css-values/support/vh-support-transform-origin-iframe.html",
"web-platform-tests/css/css-values/support/vh-support-transform-translate-iframe.html",
"web-platform-tests/css/css-values/support/vh_not_refreshing_on_chrome_iframe.html",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ PASS calc(atan(tan(0.7853975rad ) )) should be used-value-equivalent to 45deg
PASS calc(atan(tan(3.14159 / 4 + 1 - 1) )) should be used-value-equivalent to 45deg
PASS calc(asin(sin(0.25turn)) ) should be used-value-equivalent to 90deg
PASS calc(atan2(0,1)) should be used-value-equivalent to 0deg
PASS calc(atan2(0,-1)) should be used-value-equivalent to -180deg
PASS calc(atan2(0,-1) / 4) should be used-value-equivalent to 45deg
PASS calc(atan2(1,-1)) should be used-value-equivalent to 135deg
PASS calc(atan2(-1,1)) should be used-value-equivalent to -45deg
PASS calc(cos(sin(acos(cos(pi))))) should be used-value-equivalent to 1
PASS calc(sin(atan(tan(pi/2)))) should be used-value-equivalent to 1
PASS atan2(1px, -1px) should be used-value-equivalent to 135deg
PASS atan2(1cm, -1cm) should be used-value-equivalent to 135deg
PASS atan2(1mm, -1mm) should be used-value-equivalent to 135deg
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-values-4/#comp-func">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#trig-funcs">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#numbers">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#calc-type-checking">
<link rel="author" title="Apple Inc">
Expand Down Expand Up @@ -28,7 +28,7 @@

// General calculations
test_math_used('calc(asin(sin(30deg + 1.0471967rad ) ))', '90deg', {type:'angle', approx:0.1});
test_math_used('calc(acos(cos(30deg - 0.523599rad ) ))', '0deg'), {type:'angle', approx:0.1};
test_math_used('calc(acos(cos(30deg - 0.523599rad ) ))', '0deg', {type:'angle', approx:0.1});
test_math_used('calc(asin(sin(3.14159 / 2 + 1 - 1) ))', '90deg', {type:'angle', approx:0.1});
test_math_used('calc(asin(sin(100grad) ))', '90deg', {type:'angle', approx:0.1});
test_math_used('calc(acos(cos(0 / 2 + 1 - 1) ))', '0deg', {type:'angle', approx:0.1});
Expand All @@ -37,13 +37,12 @@
test_math_used('calc(atan(tan(3.14159 / 4 + 1 - 1) ))', '45deg', {type:'angle', approx:0.1});
test_math_used('calc(asin(sin(0.25turn)) )', '90deg', {type:'angle', approx:0.1});
test_math_used('calc(atan2(0,1))', '0deg', {type:'angle', approx:0.1});
test_math_used('calc(atan2(0,-1))', '-180deg', {type:'angle', approx:0.1});
test_math_used('calc(atan2(0,-1) / 4)', '45deg', {type:'angle', approx:0.1}); // atan2(0,-1) equals 180deg, result is divided to avoid ambiguity with -180deg
test_math_used('calc(atan2(1,-1))', '135deg', {type:'angle', approx:0.1});
test_math_used('calc(atan2(-1,1))', '-45deg', {type:'angle', approx:0.1});

// Test nesting
test_math_used('calc(cos(sin(acos(cos(pi)))))', '1', {type:'number', approx:0.1});
test_math_used('calc(sin(atan(tan(pi/2))))', '1', {type:'number', approx:0.1});

// Test types for atan2
test_math_used('atan2(1px, -1px)', '135deg', {type:'angle', approx:0.1});
Expand All @@ -66,4 +65,4 @@
test_math_used('atan2(1s, -1s)', '135deg', {type:'angle', approx:0.1});
test_math_used('atan2(1ms, -1ms)', '135deg', {type:'angle', approx:0.1});

</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ PASS e.style['transform'] = "rotate(atan2(1deg / ))" should not set the property
PASS e.style['transform'] = "rotate(atan2(1deg 2deg))" should not set the property value
PASS e.style['transform'] = "rotate(atan2(1deg, , 2deg))" should not set the property value
PASS e.style['transform'] = "rotate(atan2(90px))" should not set the property value
PASS e.style['transform'] = "rotate(atan2(90px, 100%))" should not set the property value
PASS e.style['transform'] = "rotate(atan2(30deg + 1.0471967rad, 0))" should not set the property value
PASS e.style['transform'] = "rotate(atan2( 0 ,))" should not set the property value
PASS e.style['transform'] = "rotate(atan2( () 30deg - 0.523599rad ))" should not set the property value
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-values-4/#comp-func">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#trig-funcs">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#angles">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#calc-type-checking">
<link rel="author" title="Apple Inc">
Expand Down Expand Up @@ -67,9 +67,11 @@
test_invalid_angle('atan2(1deg 2deg)');
test_invalid_angle('atan2(1deg, , 2deg)');
test_invalid_angle('atan2(90px)');
test_invalid_angle('atan2(90px, 100%)');

test_invalid_angle('atan2(30deg + 1.0471967rad, 0)');
test_invalid_angle('atan2( 0 ,)');
test_invalid_angle('atan2( () 30deg - 0.523599rad )');
test_invalid_angle('atan2(45deg )');
test_invalid_angle('atan2(30deg, + 0.261799rad)');
</script>
</script>
Loading

0 comments on commit 9047798

Please sign in to comment.