Bug 1646249 [wpt PR 24178] - Parsing and internal representation of scrollbar-gutter, a=testonly
authorFelipe Erias <felipeerias@gmail.com>
Tue, 23 Jun 2020 21:50:00 +0000
changeset 537139 28a3f6bdcbf02986f89bf95d4e8d50ec7fdce5ca
parent 537138 efac09e1e6043196f4ed6471fb717ce5db7b550c
child 537140 63ce1c341da9f9c7bff4b8a840261ddf222c8f6f
push id37537
push userncsoregi@mozilla.com
push dateWed, 24 Jun 2020 21:50:10 +0000
treeherdermozilla-central@1004d422aedb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1646249, 24178, 710214, 2245426, 780697
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 1646249 [wpt PR 24178] - Parsing and internal representation of scrollbar-gutter, a=testonly Automatic update from web-platform-tests Parsing and internal representation of scrollbar-gutter The scrollbar-gutter CSS property provides control over the presence of scrollbar gutters (the space which may be reserved by the UA to display a scrollbar). The value of scrollbar-gutter is defined by a combination of one or more keywords ("auto", "stable", "always", "both" and "force"). This property is internally stored as an unsigned int with binary flags for each one of those keywords. For convenience, ScrollbarGutterIs* methods have been added to ComputedStyle. Parsing WPT tests are included. Feature status: test. Bug: 710214 Change-Id: Ia5928ab4c379097065e28604d8431aab3e8f22c0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2245426 Commit-Queue: Felipe Erias Morandeira <felipeerias@gmail.com> Reviewed-by: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/master@{#780697} -- wpt-commits: d3120dd40a7ed962bf3138a15c5dbc06b1b8dc4b wpt-pr: 24178
testing/web-platform/tests/css/css-overflow/parsing/scrollbar-gutter-invalid.html
testing/web-platform/tests/css/css-overflow/parsing/scrollbar-gutter-valid.html
testing/web-platform/tests/css/css-typed-om/the-stylepropertymap/properties/scrollbar-gutter.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/parsing/scrollbar-gutter-invalid.html
@@ -0,0 +1,29 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Overflow: parsing invalid scrollbar-gutter declarations</title>
+<link rel="author" title="Felipe Erias Morandeira" href="mailto:felipeerias@gmail.com"/>
+<link rel="help" href="https://www.w3.org/TR/css-overflow-4/#scollbar-gutter-property"/>
+<meta name="assert" content="Parsing invalid scrollbar-gutter declarations">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+
+<script>
+
+    test_invalid_value("scrollbar-gutter", "auto both");
+    test_invalid_value("scrollbar-gutter", "force auto");
+    test_invalid_value("scrollbar-gutter", "auto always");
+    test_invalid_value("scrollbar-gutter", "always stable");
+    test_invalid_value("scrollbar-gutter", "force");
+    test_invalid_value("scrollbar-gutter", "both");
+    test_invalid_value("scrollbar-gutter", "force both");
+
+    test_invalid_value("scrollbar-gutter", "");
+    test_invalid_value("scrollbar-gutter", "0");
+    test_invalid_value("scrollbar-gutter", "1px");
+    test_invalid_value("scrollbar-gutter", "3em");
+    test_invalid_value("scrollbar-gutter", "1 2 3");
+    test_invalid_value("scrollbar-gutter", "none");
+    test_invalid_value("scrollbar-gutter", "red");
+
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/parsing/scrollbar-gutter-valid.html
@@ -0,0 +1,26 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Overflow: parsing valid scrollbar-gutter declarations</title>
+<link rel="author" title="Felipe Erias Morandeira" href="mailto:felipeerias@gmail.com"/>
+<link rel="help" href="https://www.w3.org/TR/css-overflow-4/#scollbar-gutter-property"/>
+<meta name="assert" content="Parsing valid scrollbar-gutter declarations">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+
+<script>
+
+    test_valid_value("scrollbar-gutter", "auto");
+    test_valid_value("scrollbar-gutter", "stable");
+    test_valid_value("scrollbar-gutter", "stable both");
+    test_valid_value("scrollbar-gutter", "stable force");
+    test_valid_value("scrollbar-gutter", "stable both force");
+    test_valid_value("scrollbar-gutter", "always");
+    test_valid_value("scrollbar-gutter", "always both");
+    test_valid_value("scrollbar-gutter", "always force");
+    test_valid_value("scrollbar-gutter", "always both force");
+
+    test_valid_value("scrollbar-gutter", "force both stable", "stable both force");
+    test_valid_value("scrollbar-gutter", "force always both", "always both force");
+
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-typed-om/the-stylepropertymap/properties/scrollbar-gutter.html
@@ -0,0 +1,30 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>'display' property</title>
+<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get">
+<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set">
+<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../../resources/testhelper.js"></script>
+<script src="resources/testsuite.js"></script>
+<body>
+<div id="log"></div>
+<script>
+'use strict';
+
+runPropertyTests('scrollbar-gutter', [
+    { syntax: 'auto' },
+    { syntax: 'stable' },
+    { syntax: 'always' },
+]);
+runUnsupportedPropertyTests('scrollbar-gutter', [
+    'stable both',
+    'stable force',
+    'stable both force',
+    'always both',
+    'always force',
+    'always both force'
+]);
+
+</script>