Bug 1645070 [wpt PR 24109] - Parse text-decoration-thickness as part of text-decoration shorthand, a=testonly
authorDominik Röttsches <drott@chromium.org>
Mon, 22 Jun 2020 10:41:01 +0000
changeset 536809 d5c7bacfde62813c8a4fb2b52669caea8ca50c35
parent 536808 b652ecc3478ae04bd6a3f76128b5f5f239fd7853
child 536810 7dda7644ffe1336a6035bfcd5392aeee98a86d1e
push id37533
push userdluca@mozilla.com
push dateTue, 23 Jun 2020 21:38:40 +0000
treeherdermozilla-central@d48aa0f0aa0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1645070, 24109, 1093826, 1093827, 2241677, 778744
milestone79.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 1645070 [wpt PR 24109] - Parse text-decoration-thickness as part of text-decoration shorthand, a=testonly Automatic update from web-platform-tests Parse text-decoration-thickness as part of text-decoration shorthand Adapt text-decoration shorthand serialized value to only return non- initial values for text-decoration-thickness according to https://drafts.csswg.org/cssom/#serializing-css-values but keep existing serialisation behavior for other longhands. Shorthand serialisation needs separate harmonisation efforts, see issue 1093826. Bug: 1093827 Change-Id: I391225c383818318c9d22e6c96e3a3c4b9ebb6d1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2241677 Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org> Reviewed-by: Fredrik Söderquist <fs@opera.com> Commit-Queue: Dominik Röttsches <drott@chromium.org> Cr-Commit-Position: refs/heads/master@{#778744} -- wpt-commits: 314d27b572a22e1b341de6fe678768f55791d55a wpt-pr: 24109
testing/web-platform/tests/css/css-text-decor/parsing/text-decoration-computed.html
testing/web-platform/tests/css/css-text-decor/parsing/text-decoration-shorthand.html
testing/web-platform/tests/css/css-text-decor/parsing/text-decoration-valid.html
--- a/testing/web-platform/tests/css/css-text-decor/parsing/text-decoration-computed.html
+++ b/testing/web-platform/tests/css/css-text-decor/parsing/text-decoration-computed.html
@@ -27,12 +27,12 @@ test_computed_value("text-decoration", "
 test_computed_value("text-decoration", "double overline underline", "underline overline double " + currentColor);
 test_computed_value("text-decoration", "underline overline line-through red", "underline overline line-through rgb(255, 0, 0)");
 test_computed_value("text-decoration", "rgba(10, 20, 30, 0.4) dotted", "dotted rgba(10, 20, 30, 0.4)");
 
 test_computed_value("text-decoration", "underline dashed rgb(0, 255, 0)");
 
 // Add text-decoration-thickness in [css-text-decor-4].
 test_computed_value("text-decoration", "auto", currentColor);
-test_computed_value("text-decoration", "from-font", currentColor + " from-font");
-test_computed_value("text-decoration", "10px", currentColor + " 10px");
-test_computed_value("text-decoration", "underline red from-font", "underline rgb(255, 0, 0) from-font");
+test_computed_value("text-decoration", "from-font", "from-font " + currentColor);
+test_computed_value("text-decoration", "10px", "10px " + currentColor);
+test_computed_value("text-decoration", "underline red from-font", "underline from-font rgb(255, 0, 0)");
 </script>
--- a/testing/web-platform/tests/css/css-text-decor/parsing/text-decoration-shorthand.html
+++ b/testing/web-platform/tests/css/css-text-decor/parsing/text-decoration-shorthand.html
@@ -6,16 +6,17 @@
 <link rel="help" href="https://drafts.csswg.org/css-text-decor-3/#propdef-text-decoration">
 <meta name="assert" content="text-decoration supports the full grammar '<‘text-decoration-line’> || <‘text-decoration-style’> || <‘text-decoration-color’>'.">
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="/css/support/shorthand-testcommon.js"></script>
 </head>
 <body>
 <script>
-test_shorthand_value('text-decoration', 'overline dotted green', {
+test_shorthand_value('text-decoration', 'overline from-font dotted green', {
   'text-decoration-line': 'overline',
+  'text-decoration-thickness': 'from-font',
   'text-decoration-style': 'dotted',
   'text-decoration-color': 'green'
 });
 </script>
 </body>
 </html>
--- a/testing/web-platform/tests/css/css-text-decor/parsing/text-decoration-valid.html
+++ b/testing/web-platform/tests/css/css-text-decor/parsing/text-decoration-valid.html
@@ -1,26 +1,27 @@
 <!DOCTYPE html>
 <meta charset="utf-8">
 <title>CSS Text Decoration Test: Parsing text-decoration with valid values</title>
 <link rel="help" href="https://drafts.csswg.org/css-text-decor-3/#propdef-text-decoration">
-<meta name="assert" content="text-decoration supports the full grammar '<‘text-decoration-line’> || <‘text-decoration-style’> || <‘text-decoration-color’>'.">
+<meta name="assert" content="text-decoration supports the full grammar '<‘text-decoration-line’> ||
+ <'text-decoration-thickness'> || <‘text-decoration-style’> || <‘text-decoration-color’>'.">
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="/css/support/parsing-testcommon.js"></script>
 <script>
 test_valid_value("text-decoration", "none");
 test_valid_value("text-decoration", "line-through");
 test_valid_value("text-decoration", "solid", "none");
 test_valid_value("text-decoration", "currentcolor", "none");
 test_valid_value("text-decoration", "auto", "none");
 test_valid_value("text-decoration", "from-font");
 test_valid_value("text-decoration", "10px");
 
 test_valid_value("text-decoration", "double overline underline", "underline overline double");
 test_valid_value("text-decoration", "underline overline line-through red");
 test_valid_value("text-decoration", "rgba(10, 20, 30, 0.4) dotted", "dotted rgba(10, 20, 30, 0.4)");
-test_valid_value("text-decoration", "overline green from-font");
+test_valid_value("text-decoration", "overline green from-font", "overline from-font green");
 test_valid_value("text-decoration", "underline dashed green");
 test_valid_value("text-decoration", "underline auto", "underline");
 test_valid_value("text-decoration", "line-through 20px");
 test_valid_value("text-decoration", "overline 3em");
 </script>