Bug 1523562 [wpt PR 15027] - CSS: Reject unitless lengths in inset shorthand, a=testonly
authorEric Willigers <ericwilligers@chromium.org>
Thu, 31 Jan 2019 19:00:09 +0000
changeset 458107 c901019dbc00ff721e2a62103a7d26e7ebd712ba
parent 458106 c749c68af02818313fa318d75d6639023f1cb488
child 458108 861436880a1979836332ea7d30948ead99cab08c
push id35518
push useropoprus@mozilla.com
push dateFri, 08 Feb 2019 09:55:14 +0000
treeherdermozilla-central@3a3e393396f4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1523562, 15027, 924691, 1432272, 625584
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 1523562 [wpt PR 15027] - CSS: Reject unitless lengths in inset shorthand, a=testonly Automatic update from web-platform-tests CSS: Reject unitless lengths in inset shorthand Even though the 'top' property accepts unitless lengths when specified as a longhand, the shorthand 'inset' that sets 'top' does not allow unitless lengths. Discussed in https://github.com/w3c/csswg-drafts/issues/3525 RESOLVED: Do not allow quirks in 'inset' shorthand BUG: 924691 Change-Id: I53f642e48e8f5d4754aebb70c18d9abc7b7e6248 Reviewed-on: https://chromium-review.googlesource.com/c/1432272 Reviewed-by: Emil A Eklund <eae@chromium.org> Reviewed-by: Rune Lillesveen <futhark@chromium.org> Commit-Queue: Rune Lillesveen <futhark@chromium.org> Auto-Submit: Eric Willigers <ericwilligers@chromium.org> Cr-Commit-Position: refs/heads/master@{#625584} -- wpt-commits: 3c6a5979a8dd97fbd5931ae7df4c9e608fada614 wpt-pr: 15027
testing/web-platform/tests/quirks/unitless-length/excluded-properties-001.html
testing/web-platform/tests/quirks/unitless-length/excluded-properties-003.html
--- a/testing/web-platform/tests/quirks/unitless-length/excluded-properties-001.html
+++ b/testing/web-platform/tests/quirks/unitless-length/excluded-properties-001.html
@@ -25,16 +25,23 @@ var properties = [
     'column-rule-width',
     'column-width',
     'flex-basis',
     'grid-auto-columns',
     'grid-auto-rows',
     'grid-template-columns',
     'grid-template-rows',
     'inline-size',
+    'inset',
+    'inset-block',
+    'inset-block-end',
+    'inset-block-start',
+    'inset-inline',
+    'inset-inline-end',
+    'inset-inline-start',
     'margin-block-end',
     'margin-block-start',
     'margin-inline-end',
     'margin-inline-start',
     'min-block-size',
     'min-inline-size',
     'offset-distance',
     'outline-offset',
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/quirks/unitless-length/excluded-properties-003.html
@@ -0,0 +1,42 @@
+<html>
+<head>
+<meta charset="utf-8">
+<title>inset does not support quirky-length</title>
+<link rel="help" href="https://quirks.spec.whatwg.org/#the-unitless-length-quirk">
+<meta name="assert" content="quirky-length is not supported by inset.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+<div id="target"></div>
+<script>
+'use strict';
+
+test(() => {
+  const quirky_values = [
+    '1',
+    '1 2px',
+    '1px 2',
+    '1 2',
+    '1 2px 3px',
+    '1px 2 3px',
+    '1px 2px 3',
+    '1 2 3',
+    '1 2px 3px 4px',
+    '1px 2 3px 4px',
+    '1px 2px 3 4px',
+    '1px 2px 3px 4',
+    '1 2 3 4'
+  ];
+
+  target.style['inset'] = '5px 6px 7px 8px';
+
+  for (let value of quirky_values) {
+    target.style['inset'] = value;
+    assert_equals(target.style['inset'], '5px 6px 7px 8px', 'inset rejects quirky length "' + value + '"');
+  }
+}, 'inset does not support quirky length values');
+
+</script>
+</body>
+</html>