Bug 1529438 [wpt PR 15481] - Make calc() function can be used in any place that only accepts integer., a=testonly
authorJoonghun Park <pjh0718@gmail.com>
Wed, 06 Mar 2019 12:36:26 +0000
changeset 464672 4a51a4a136f3
parent 464671 51db6656704a
child 464673 6d57f8b94e7e
push id35717
push useraciure@mozilla.com
push dateSun, 17 Mar 2019 09:45:26 +0000
treeherdermozilla-central@e0861be8d6c0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1529438, 15481, 931216, 1478852, 634955
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1529438 [wpt PR 15481] - Make calc() function can be used in any place that only accepts integer., a=testonly Automatic update from web-platform-tests Make calc() function can be used in any place that only accepts integer. https://www.w3.org/TR/css-values-4/#calc-type-checking spec says that calc() function that resolve to <number> can be used in any place that only accepts <integer>. This change makes calc() function's behavior to comply with the spec. Bug: 931216 Change-Id: Iac9ad21d664bb60538d40ab42cbb8153de6db89f Reviewed-on: https://chromium-review.googlesource.com/c/1478852 Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org> Reviewed-by: Koji Ishii <kojii@chromium.org> Reviewed-by: Eric Willigers <ericwilligers@chromium.org> Commit-Queue: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#634955} -- wpt-commits: 50b5ebf1abd93b25c1f820c1d7bf49d051c33afb wpt-pr: 15481
testing/web-platform/tests/css/css-position/parsing/z-index-invalid.html
testing/web-platform/tests/css/css-values/calc-numbers.html
--- a/testing/web-platform/tests/css/css-position/parsing/z-index-invalid.html
+++ b/testing/web-platform/tests/css/css-position/parsing/z-index-invalid.html
@@ -9,14 +9,12 @@
 <script src="/resources/testharnessreport.js"></script>
 <script src="/css/support/parsing-testcommon.js"></script>
 </head>
 <body>
 <script>
 test_invalid_value("z-index", "none");
 test_invalid_value("z-index", "10px");
 test_invalid_value("z-index", "0.5");
-test_invalid_value("z-index", "calc(0.5)");
-
 test_invalid_value("z-index", "auto 123");
 </script>
 </body>
 </html>
--- a/testing/web-platform/tests/css/css-values/calc-numbers.html
+++ b/testing/web-platform/tests/css/css-values/calc-numbers.html
@@ -66,17 +66,17 @@ https://chromium.googlesource.com/chromi
     the declaration to become invalid. The value resulting
     from an expression must be clamped to the range
     allowed in the target context.
     https://www.w3.org/TR/css-values-3/#calc-range
     */
 
     verifyComputedStyle("opacity", "initial", "calc(2 / 4)", "0.5", "testing opacity: calc(2 / 4)");
 
-    verifyComputedStyle("tab-size", "12345", "calc(2 / 4)", "0.5", "testing tab-size: calc(2 / 4)");
+    verifyComputedStyle("tab-size", "12345", "calc(2 / 4)", "1", "testing tab-size: calc(2 / 4)");
     /*
     'tab-size' accepts <number> values.
     */
 
     verifyComputedStyle("opacity", "0.9", "calc(2 / 4) * 1px", "0.9", "testing opacity: calc(2 / 4) * 1px");
 
     verifyComputedStyle("tab-size", "12345", "calc(1 + 1px)", "12345", "testing tab-size: calc(1 + 1px)");