Commit a8f7af3c authored by Darren Shen's avatar Darren Shen Committed by Commit Bot

[css-typed-om] Add support for grid properties.

This patch adds support for some grid properties.

We add a new <flex> CSS value object, which meant rebaselining all the tests.

We're failing some tests because the 'grid', 'grid-template' and
'grid-gap' shorthands don't serialize to anything [1], so Typed OM
can't create an unsupported style value from it. Not sure if this is
a bug...

[1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp?type=cs&l=406

Bug: 820299
Change-Id: I8ff871fffed2977ca20a623bd283d7cbdc247870
Reviewed-on: https://chromium-review.googlesource.com/984756
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: default avatarRune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548296}
parent 6220cb63
...@@ -4,6 +4,7 @@ FAIL Can set 'background' to var() references assert_equals: expected "CSSUnpars ...@@ -4,6 +4,7 @@ FAIL Can set 'background' to var() references assert_equals: expected "CSSUnpars
PASS Setting 'background' to a length throws TypeError PASS Setting 'background' to a length throws TypeError
PASS Setting 'background' to a percent throws TypeError PASS Setting 'background' to a percent throws TypeError
PASS Setting 'background' to a time throws TypeError PASS Setting 'background' to a time throws TypeError
PASS Setting 'background' to a flexible length throws TypeError
PASS Setting 'background' to a number throws TypeError PASS Setting 'background' to a number throws TypeError
PASS Setting 'background' to a position throws TypeError PASS Setting 'background' to a position throws TypeError
PASS Setting 'background' to a URL throws TypeError PASS Setting 'background' to a URL throws TypeError
......
This is a testharness.js-based test. This is a testharness.js-based test.
Found 56 tests; 51 PASS, 5 FAIL, 0 TIMEOUT, 0 NOTRUN. Found 59 tests; 54 PASS, 5 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS Can set 'break-after' to CSS-wide keywords PASS Can set 'break-after' to CSS-wide keywords
PASS Can set 'break-after' to var() references PASS Can set 'break-after' to var() references
PASS Can set 'break-after' to the 'auto' keyword PASS Can set 'break-after' to the 'auto' keyword
...@@ -17,6 +17,7 @@ PASS Can set 'break-after' to the 'verso' keyword ...@@ -17,6 +17,7 @@ PASS Can set 'break-after' to the 'verso' keyword
PASS Setting 'break-after' to a length throws TypeError PASS Setting 'break-after' to a length throws TypeError
PASS Setting 'break-after' to a percent throws TypeError PASS Setting 'break-after' to a percent throws TypeError
PASS Setting 'break-after' to a time throws TypeError PASS Setting 'break-after' to a time throws TypeError
PASS Setting 'break-after' to a flexible length throws TypeError
PASS Setting 'break-after' to a number throws TypeError PASS Setting 'break-after' to a number throws TypeError
PASS Setting 'break-after' to a position throws TypeError PASS Setting 'break-after' to a position throws TypeError
PASS Setting 'break-after' to a URL throws TypeError PASS Setting 'break-after' to a URL throws TypeError
...@@ -38,6 +39,7 @@ PASS Can set 'break-before' to the 'verso' keyword ...@@ -38,6 +39,7 @@ PASS Can set 'break-before' to the 'verso' keyword
PASS Setting 'break-before' to a length throws TypeError PASS Setting 'break-before' to a length throws TypeError
PASS Setting 'break-before' to a percent throws TypeError PASS Setting 'break-before' to a percent throws TypeError
PASS Setting 'break-before' to a time throws TypeError PASS Setting 'break-before' to a time throws TypeError
PASS Setting 'break-before' to a flexible length throws TypeError
PASS Setting 'break-before' to a number throws TypeError PASS Setting 'break-before' to a number throws TypeError
PASS Setting 'break-before' to a position throws TypeError PASS Setting 'break-before' to a position throws TypeError
PASS Setting 'break-before' to a URL throws TypeError PASS Setting 'break-before' to a URL throws TypeError
...@@ -52,6 +54,7 @@ FAIL Can set 'break-inside' to the 'avoid-region' keyword Failed to execute 'set ...@@ -52,6 +54,7 @@ FAIL Can set 'break-inside' to the 'avoid-region' keyword Failed to execute 'set
PASS Setting 'break-inside' to a length throws TypeError PASS Setting 'break-inside' to a length throws TypeError
PASS Setting 'break-inside' to a percent throws TypeError PASS Setting 'break-inside' to a percent throws TypeError
PASS Setting 'break-inside' to a time throws TypeError PASS Setting 'break-inside' to a time throws TypeError
PASS Setting 'break-inside' to a flexible length throws TypeError
PASS Setting 'break-inside' to a number throws TypeError PASS Setting 'break-inside' to a number throws TypeError
PASS Setting 'break-inside' to a position throws TypeError PASS Setting 'break-inside' to a position throws TypeError
PASS Setting 'break-inside' to a URL throws TypeError PASS Setting 'break-inside' to a URL throws TypeError
......
...@@ -6,6 +6,7 @@ FAIL Can set 'flex-basis' to the 'content' keyword Failed to execute 'set' on 'S ...@@ -6,6 +6,7 @@ FAIL Can set 'flex-basis' to the 'content' keyword Failed to execute 'set' on 'S
PASS Can set 'flex-basis' to a length PASS Can set 'flex-basis' to a length
PASS Can set 'flex-basis' to a percent PASS Can set 'flex-basis' to a percent
PASS Setting 'flex-basis' to a time throws TypeError PASS Setting 'flex-basis' to a time throws TypeError
PASS Setting 'flex-basis' to a flexible length throws TypeError
PASS Setting 'flex-basis' to a number throws TypeError PASS Setting 'flex-basis' to a number throws TypeError
PASS Setting 'flex-basis' to a position throws TypeError PASS Setting 'flex-basis' to a position throws TypeError
PASS Setting 'flex-basis' to a URL throws TypeError PASS Setting 'flex-basis' to a URL throws TypeError
......
...@@ -5,6 +5,7 @@ FAIL Can set 'font-language-override' to the 'normal' keyword Failed to execute ...@@ -5,6 +5,7 @@ FAIL Can set 'font-language-override' to the 'normal' keyword Failed to execute
PASS Setting 'font-language-override' to a length throws TypeError PASS Setting 'font-language-override' to a length throws TypeError
PASS Setting 'font-language-override' to a percent throws TypeError PASS Setting 'font-language-override' to a percent throws TypeError
PASS Setting 'font-language-override' to a time throws TypeError PASS Setting 'font-language-override' to a time throws TypeError
PASS Setting 'font-language-override' to a flexible length throws TypeError
PASS Setting 'font-language-override' to a number throws TypeError PASS Setting 'font-language-override' to a number throws TypeError
PASS Setting 'font-language-override' to a position throws TypeError PASS Setting 'font-language-override' to a position throws TypeError
PASS Setting 'font-language-override' to a URL throws TypeError PASS Setting 'font-language-override' to a URL throws TypeError
......
...@@ -6,6 +6,7 @@ FAIL Can set 'font-optical-sizing' to the 'none' keyword Failed to execute 'set' ...@@ -6,6 +6,7 @@ FAIL Can set 'font-optical-sizing' to the 'none' keyword Failed to execute 'set'
PASS Setting 'font-optical-sizing' to a length throws TypeError PASS Setting 'font-optical-sizing' to a length throws TypeError
PASS Setting 'font-optical-sizing' to a percent throws TypeError PASS Setting 'font-optical-sizing' to a percent throws TypeError
PASS Setting 'font-optical-sizing' to a time throws TypeError PASS Setting 'font-optical-sizing' to a time throws TypeError
PASS Setting 'font-optical-sizing' to a flexible length throws TypeError
PASS Setting 'font-optical-sizing' to a number throws TypeError PASS Setting 'font-optical-sizing' to a number throws TypeError
PASS Setting 'font-optical-sizing' to a position throws TypeError PASS Setting 'font-optical-sizing' to a position throws TypeError
PASS Setting 'font-optical-sizing' to a URL throws TypeError PASS Setting 'font-optical-sizing' to a URL throws TypeError
......
...@@ -7,6 +7,7 @@ FAIL Can set 'font-palette' to the 'dark' keyword Failed to execute 'set' on 'St ...@@ -7,6 +7,7 @@ FAIL Can set 'font-palette' to the 'dark' keyword Failed to execute 'set' on 'St
PASS Setting 'font-palette' to a length throws TypeError PASS Setting 'font-palette' to a length throws TypeError
PASS Setting 'font-palette' to a percent throws TypeError PASS Setting 'font-palette' to a percent throws TypeError
PASS Setting 'font-palette' to a time throws TypeError PASS Setting 'font-palette' to a time throws TypeError
PASS Setting 'font-palette' to a flexible length throws TypeError
PASS Setting 'font-palette' to a number throws TypeError PASS Setting 'font-palette' to a number throws TypeError
PASS Setting 'font-palette' to a position throws TypeError PASS Setting 'font-palette' to a position throws TypeError
PASS Setting 'font-palette' to a URL throws TypeError PASS Setting 'font-palette' to a URL throws TypeError
......
...@@ -7,6 +7,7 @@ FAIL Can set 'font-presentation' to the 'emoji' keyword Failed to execute 'set' ...@@ -7,6 +7,7 @@ FAIL Can set 'font-presentation' to the 'emoji' keyword Failed to execute 'set'
PASS Setting 'font-presentation' to a length throws TypeError PASS Setting 'font-presentation' to a length throws TypeError
PASS Setting 'font-presentation' to a percent throws TypeError PASS Setting 'font-presentation' to a percent throws TypeError
PASS Setting 'font-presentation' to a time throws TypeError PASS Setting 'font-presentation' to a time throws TypeError
PASS Setting 'font-presentation' to a flexible length throws TypeError
PASS Setting 'font-presentation' to a number throws TypeError PASS Setting 'font-presentation' to a number throws TypeError
PASS Setting 'font-presentation' to a position throws TypeError PASS Setting 'font-presentation' to a position throws TypeError
PASS Setting 'font-presentation' to a URL throws TypeError PASS Setting 'font-presentation' to a URL throws TypeError
......
This is a testharness.js-based test. This is a testharness.js-based test.
Found 55 tests; 28 PASS, 27 FAIL, 0 TIMEOUT, 0 NOTRUN. Found 58 tests; 31 PASS, 27 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS Can set 'font-size' to CSS-wide keywords PASS Can set 'font-size' to CSS-wide keywords
PASS Can set 'font-size' to var() references PASS Can set 'font-size' to var() references
PASS Can set 'font-size' to the 'xx-small' keyword PASS Can set 'font-size' to the 'xx-small' keyword
...@@ -14,6 +14,7 @@ PASS Can set 'font-size' to the 'smaller' keyword ...@@ -14,6 +14,7 @@ PASS Can set 'font-size' to the 'smaller' keyword
PASS Can set 'font-size' to a length PASS Can set 'font-size' to a length
PASS Can set 'font-size' to a percent PASS Can set 'font-size' to a percent
PASS Setting 'font-size' to a time throws TypeError PASS Setting 'font-size' to a time throws TypeError
PASS Setting 'font-size' to a flexible length throws TypeError
PASS Setting 'font-size' to a number throws TypeError PASS Setting 'font-size' to a number throws TypeError
PASS Setting 'font-size' to a position throws TypeError PASS Setting 'font-size' to a position throws TypeError
PASS Setting 'font-size' to a URL throws TypeError PASS Setting 'font-size' to a URL throws TypeError
...@@ -32,6 +33,7 @@ FAIL Can set 'font-min-size' to the 'smaller' keyword Failed to execute 'set' on ...@@ -32,6 +33,7 @@ FAIL Can set 'font-min-size' to the 'smaller' keyword Failed to execute 'set' on
FAIL Can set 'font-min-size' to a length Failed to execute 'set' on 'StylePropertyMap': Invalid propertyName: font-min-size FAIL Can set 'font-min-size' to a length Failed to execute 'set' on 'StylePropertyMap': Invalid propertyName: font-min-size
FAIL Can set 'font-min-size' to a percent Failed to execute 'set' on 'StylePropertyMap': Invalid propertyName: font-min-size FAIL Can set 'font-min-size' to a percent Failed to execute 'set' on 'StylePropertyMap': Invalid propertyName: font-min-size
PASS Setting 'font-min-size' to a time throws TypeError PASS Setting 'font-min-size' to a time throws TypeError
PASS Setting 'font-min-size' to a flexible length throws TypeError
PASS Setting 'font-min-size' to a number throws TypeError PASS Setting 'font-min-size' to a number throws TypeError
PASS Setting 'font-min-size' to a position throws TypeError PASS Setting 'font-min-size' to a position throws TypeError
PASS Setting 'font-min-size' to a URL throws TypeError PASS Setting 'font-min-size' to a URL throws TypeError
...@@ -51,6 +53,7 @@ FAIL Can set 'font-max-size' to the 'smaller' keyword Failed to execute 'set' on ...@@ -51,6 +53,7 @@ FAIL Can set 'font-max-size' to the 'smaller' keyword Failed to execute 'set' on
FAIL Can set 'font-max-size' to a length Failed to execute 'set' on 'StylePropertyMap': Invalid propertyName: font-max-size FAIL Can set 'font-max-size' to a length Failed to execute 'set' on 'StylePropertyMap': Invalid propertyName: font-max-size
FAIL Can set 'font-max-size' to a percent Failed to execute 'set' on 'StylePropertyMap': Invalid propertyName: font-max-size FAIL Can set 'font-max-size' to a percent Failed to execute 'set' on 'StylePropertyMap': Invalid propertyName: font-max-size
PASS Setting 'font-max-size' to a time throws TypeError PASS Setting 'font-max-size' to a time throws TypeError
PASS Setting 'font-max-size' to a flexible length throws TypeError
PASS Setting 'font-max-size' to a number throws TypeError PASS Setting 'font-max-size' to a number throws TypeError
PASS Setting 'font-max-size' to a position throws TypeError PASS Setting 'font-max-size' to a position throws TypeError
PASS Setting 'font-max-size' to a URL throws TypeError PASS Setting 'font-max-size' to a URL throws TypeError
......
...@@ -13,6 +13,7 @@ FAIL Can set 'font-stretch' to the 'ultra-expanded' keyword assert_equals: expec ...@@ -13,6 +13,7 @@ FAIL Can set 'font-stretch' to the 'ultra-expanded' keyword assert_equals: expec
FAIL Can set 'font-stretch' to a percent assert_approx_equals: expected -3.14 +/- 0.000001 but got -3 FAIL Can set 'font-stretch' to a percent assert_approx_equals: expected -3.14 +/- 0.000001 but got -3
PASS Setting 'font-stretch' to a length throws TypeError PASS Setting 'font-stretch' to a length throws TypeError
PASS Setting 'font-stretch' to a time throws TypeError PASS Setting 'font-stretch' to a time throws TypeError
PASS Setting 'font-stretch' to a flexible length throws TypeError
PASS Setting 'font-stretch' to a number throws TypeError PASS Setting 'font-stretch' to a number throws TypeError
PASS Setting 'font-stretch' to a position throws TypeError PASS Setting 'font-stretch' to a position throws TypeError
PASS Setting 'font-stretch' to a URL throws TypeError PASS Setting 'font-stretch' to a URL throws TypeError
......
...@@ -7,6 +7,7 @@ FAIL Can set 'font-style' to the 'oblique' keyword assert_equals: expected "obli ...@@ -7,6 +7,7 @@ FAIL Can set 'font-style' to the 'oblique' keyword assert_equals: expected "obli
PASS Setting 'font-style' to a length throws TypeError PASS Setting 'font-style' to a length throws TypeError
PASS Setting 'font-style' to a percent throws TypeError PASS Setting 'font-style' to a percent throws TypeError
PASS Setting 'font-style' to a time throws TypeError PASS Setting 'font-style' to a time throws TypeError
PASS Setting 'font-style' to a flexible length throws TypeError
PASS Setting 'font-style' to a number throws TypeError PASS Setting 'font-style' to a number throws TypeError
PASS Setting 'font-style' to a position throws TypeError PASS Setting 'font-style' to a position throws TypeError
PASS Setting 'font-style' to a URL throws TypeError PASS Setting 'font-style' to a URL throws TypeError
......
...@@ -8,6 +8,7 @@ FAIL Can set 'font-synthesis' to the 'small-caps' keyword Failed to execute 'set ...@@ -8,6 +8,7 @@ FAIL Can set 'font-synthesis' to the 'small-caps' keyword Failed to execute 'set
PASS Setting 'font-synthesis' to a length throws TypeError PASS Setting 'font-synthesis' to a length throws TypeError
PASS Setting 'font-synthesis' to a percent throws TypeError PASS Setting 'font-synthesis' to a percent throws TypeError
PASS Setting 'font-synthesis' to a time throws TypeError PASS Setting 'font-synthesis' to a time throws TypeError
PASS Setting 'font-synthesis' to a flexible length throws TypeError
PASS Setting 'font-synthesis' to a number throws TypeError PASS Setting 'font-synthesis' to a number throws TypeError
PASS Setting 'font-synthesis' to a position throws TypeError PASS Setting 'font-synthesis' to a position throws TypeError
PASS Setting 'font-synthesis' to a URL throws TypeError PASS Setting 'font-synthesis' to a URL throws TypeError
......
...@@ -6,6 +6,7 @@ FAIL Can set 'font-variant-alternates' to the 'historical-forms' keyword Failed ...@@ -6,6 +6,7 @@ FAIL Can set 'font-variant-alternates' to the 'historical-forms' keyword Failed
PASS Setting 'font-variant-alternates' to a length throws TypeError PASS Setting 'font-variant-alternates' to a length throws TypeError
PASS Setting 'font-variant-alternates' to a percent throws TypeError PASS Setting 'font-variant-alternates' to a percent throws TypeError
PASS Setting 'font-variant-alternates' to a time throws TypeError PASS Setting 'font-variant-alternates' to a time throws TypeError
PASS Setting 'font-variant-alternates' to a flexible length throws TypeError
PASS Setting 'font-variant-alternates' to a number throws TypeError PASS Setting 'font-variant-alternates' to a number throws TypeError
PASS Setting 'font-variant-alternates' to a position throws TypeError PASS Setting 'font-variant-alternates' to a position throws TypeError
PASS Setting 'font-variant-alternates' to a URL throws TypeError PASS Setting 'font-variant-alternates' to a URL throws TypeError
......
...@@ -7,6 +7,7 @@ FAIL Can set 'font-variant-emoji' to the 'emoji' keyword Failed to execute 'set' ...@@ -7,6 +7,7 @@ FAIL Can set 'font-variant-emoji' to the 'emoji' keyword Failed to execute 'set'
PASS Setting 'font-variant-emoji' to a length throws TypeError PASS Setting 'font-variant-emoji' to a length throws TypeError
PASS Setting 'font-variant-emoji' to a percent throws TypeError PASS Setting 'font-variant-emoji' to a percent throws TypeError
PASS Setting 'font-variant-emoji' to a time throws TypeError PASS Setting 'font-variant-emoji' to a time throws TypeError
PASS Setting 'font-variant-emoji' to a flexible length throws TypeError
PASS Setting 'font-variant-emoji' to a number throws TypeError PASS Setting 'font-variant-emoji' to a number throws TypeError
PASS Setting 'font-variant-emoji' to a position throws TypeError PASS Setting 'font-variant-emoji' to a position throws TypeError
PASS Setting 'font-variant-emoji' to a URL throws TypeError PASS Setting 'font-variant-emoji' to a URL throws TypeError
......
...@@ -9,6 +9,7 @@ FAIL Can set 'font-weight' to a number assert_approx_equals: expected -3.14 +/- ...@@ -9,6 +9,7 @@ FAIL Can set 'font-weight' to a number assert_approx_equals: expected -3.14 +/-
PASS Setting 'font-weight' to a length throws TypeError PASS Setting 'font-weight' to a length throws TypeError
PASS Setting 'font-weight' to a percent throws TypeError PASS Setting 'font-weight' to a percent throws TypeError
PASS Setting 'font-weight' to a time throws TypeError PASS Setting 'font-weight' to a time throws TypeError
PASS Setting 'font-weight' to a flexible length throws TypeError
PASS Setting 'font-weight' to a position throws TypeError PASS Setting 'font-weight' to a position throws TypeError
PASS Setting 'font-weight' to a URL throws TypeError PASS Setting 'font-weight' to a URL throws TypeError
PASS Setting 'font-weight' to a transform throws TypeError PASS Setting 'font-weight' to a transform throws TypeError
......
<!doctype html>
<meta charset="utf-8">
<title>'grid-area' 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';
runUnsupportedPropertyTests('grid-area', [
'a', 'a / a', 'auto', 'auto / auto', '2 / 1 / 2',
'span 3', '2 span / a span'
]);
</script>
<!doctype html>
<meta charset="utf-8">
<title>'grid-auto-columns' and 'grid-auto-rows' properties</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';
// grid-auto-columns/rows are list-valued.
// Run list-valued tests here too.
for (const suffix of ['columns', 'rows']) {
runPropertyTests(`grid-auto-${suffix}`, [
{ syntax: 'min-content' },
{ syntax: 'max-content' },
{ syntax: 'auto' },
{ syntax: '<length>' },
{ syntax: '<percentage>' },
{ syntax: '<flex>' },
]);
runUnsupportedPropertyTests(`grid-auto-${suffix}`, [
'minmax(100px, auto)', 'fit-content(400px)'
]);
}
</script>
<!doctype html>
<meta charset="utf-8">
<title>'grid-auto-flow' 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('grid-auto-flow', [
{ syntax: 'row' },
{ syntax: 'column' },
]);
runUnsupportedPropertyTests('grid-auto-flow', [
'row dense', 'column dense',
]);
</script>
This is a testharness.js-based test.
FAIL 'grid' does not supported 'auto-flow / 1fr 1fr 1fr' assert_not_equals: Unsupported value must not be null got disallowed value null
FAIL 'grid' does not supported 'auto-flow dense / 40px 40px 1fr' assert_not_equals: Unsupported value must not be null got disallowed value null
FAIL 'grid' does not supported 'repeat(3, 80px) / auto-flow' assert_not_equals: Unsupported value must not be null got disallowed value null
Harness: the test ran to completion.
This is a testharness.js-based test.
FAIL 'grid-gap' does not supported '20px' assert_not_equals: Unsupported value must not be null got disallowed value null
FAIL 'grid-gap' does not supported '16%' assert_not_equals: Unsupported value must not be null got disallowed value null
FAIL 'grid-gap' does not supported '20px 10px' assert_not_equals: Unsupported value must not be null got disallowed value null
FAIL 'grid-gap' does not supported '15% 100%' assert_not_equals: Unsupported value must not be null got disallowed value null
FAIL 'grid-gap' does not supported '21px 82%' assert_not_equals: Unsupported value must not be null got disallowed value null
Harness: the test ran to completion.
<!doctype html>
<meta charset="utf-8">
<title>'grid-gap' 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';
runUnsupportedPropertyTests('grid-gap', [
'20px', '16%', '20px 10px', '15% 100%', '21px 82%'
]);
</script>
<!doctype html>
<meta charset="utf-8">
<title>'grid-{row/column}-{start/end}' properties</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';
for (const orientation of ['row', 'column']) {
for (const suffix of ['start', 'end']) {
runPropertyTests(`grid-${orientation}-${suffix}`, [
{ syntax: 'auto' },
]);
runUnsupportedPropertyTests(`grid-${orientation}-${suffix}`, [
'3', 'span 2', '5 somegridarea span'
]);
}
}
</script>
<!doctype html>
<meta charset="utf-8">
<title>'grid-template-areas' 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('grid-template-areas', [
{ syntax: 'none' },
]);
runUnsupportedPropertyTests('grid-template-areas', [
'"a a a"', '"a a a" "b b b"',
]);
</script>
<!doctype html>
<meta charset="utf-8">
<title>'grid-template-columns' and 'grid-template-rows' properties</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';
for (const suffix of ['columns', 'rows']) {
runPropertyTests(`grid-template-${suffix}`, [
{ syntax: 'none' },
]);
runUnsupportedPropertyTests(`grid-template-${suffix}`, [
'[linename1] 100px [linename2 linename3]',
'200px repeat(auto-fill, 100px) 300px'
]);
}
</script>
This is a testharness.js-based test.
FAIL 'grid-template' does not supported 'none' assert_not_equals: Unsupported value must not be null got disallowed value null
FAIL 'grid-template' does not supported '100px 1fr / 50px 1fr' assert_not_equals: Unsupported value must not be null got disallowed value null
FAIL 'grid-template' does not supported '[linename] 100px / [columnname1] 30% [columname2] 70%' assert_not_equals: Unsupported value must not be null got disallowed value null
FAIL 'grid-template' does not supported 'fit-content(100px) / fit-content(40%)' assert_not_equals: Unsupported value must not be null got disallowed value null
FAIL 'grid-template' does not supported '"a a a" "b b b"' assert_not_equals: Unsupported value must not be null got disallowed value null
FAIL 'grid-template' does not supported '[header-top] "a a a" [header-bottom] [main-top] "b b b" 1fr [main-bottom] / auto 1fr auto' assert_not_equals: Unsupported value must not be null got disallowed value null
Harness: the test ran to completion.
<!doctype html>
<meta charset="utf-8">
<title>'grid-template' 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';
runUnsupportedPropertyTests('grid-template', [
'none', '100px 1fr / 50px 1fr', '[linename] 100px / [columnname1] 30% [columname2] 70%',
'fit-content(100px) / fit-content(40%)', '"a a a" "b b b"',
'[header-top] "a a a" [header-bottom] [main-top] "b b b" 1fr [main-bottom] / auto 1fr auto'
]);
</script>
<!doctype html>
<meta charset="utf-8">
<title>'grid' 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';
runUnsupportedPropertyTests('grid', [
'auto-flow / 1fr 1fr 1fr', 'auto-flow dense / 40px 40px 1fr',
'repeat(3, 80px) / auto-flow'
]);
</script>
...@@ -9,6 +9,7 @@ PASS Can set 'image-rendering' to the 'pixelated' keyword ...@@ -9,6 +9,7 @@ PASS Can set 'image-rendering' to the 'pixelated' keyword
PASS Setting 'image-rendering' to a length throws TypeError PASS Setting 'image-rendering' to a length throws TypeError
PASS Setting 'image-rendering' to a percent throws TypeError PASS Setting 'image-rendering' to a percent throws TypeError
PASS Setting 'image-rendering' to a time throws TypeError PASS Setting 'image-rendering' to a time throws TypeError
PASS Setting 'image-rendering' to a flexible length throws TypeError
PASS Setting 'image-rendering' to a number throws TypeError PASS Setting 'image-rendering' to a number throws TypeError
PASS Setting 'image-rendering' to a position throws TypeError PASS Setting 'image-rendering' to a position throws TypeError
PASS Setting 'image-rendering' to a URL throws TypeError PASS Setting 'image-rendering' to a URL throws TypeError
......
...@@ -6,6 +6,7 @@ FAIL Can set 'line-height' to a length assert_equals: relative lengths must comp ...@@ -6,6 +6,7 @@ FAIL Can set 'line-height' to a length assert_equals: relative lengths must comp
FAIL Can set 'line-height' to a number assert_equals: relative lengths must compute to a CSSUnitValue expected "[object CSSUnitValue]" but got "[object CSSKeywordValue]" FAIL Can set 'line-height' to a number assert_equals: relative lengths must compute to a CSSUnitValue expected "[object CSSUnitValue]" but got "[object CSSKeywordValue]"
FAIL Can set 'line-height' to a percent assert_equals: relative lengths must compute to a CSSUnitValue expected "[object CSSUnitValue]" but got "[object CSSKeywordValue]" FAIL Can set 'line-height' to a percent assert_equals: relative lengths must compute to a CSSUnitValue expected "[object CSSUnitValue]" but got "[object CSSKeywordValue]"
PASS Setting 'line-height' to a time throws TypeError PASS Setting 'line-height' to a time throws TypeError
PASS Setting 'line-height' to a flexible length throws TypeError
PASS Setting 'line-height' to a position throws TypeError PASS Setting 'line-height' to a position throws TypeError
PASS Setting 'line-height' to a URL throws TypeError PASS Setting 'line-height' to a URL throws TypeError
PASS Setting 'line-height' to a transform throws TypeError PASS Setting 'line-height' to a transform throws TypeError
......
This is a testharness.js-based test. This is a testharness.js-based test.
Found 51 tests; 49 PASS, 2 FAIL, 0 TIMEOUT, 0 NOTRUN. Found 56 tests; 54 PASS, 2 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS Can set 'margin-top' to CSS-wide keywords PASS Can set 'margin-top' to CSS-wide keywords
PASS Can set 'margin-top' to var() references PASS Can set 'margin-top' to var() references
PASS Can set 'margin-top' to the 'auto' keyword PASS Can set 'margin-top' to the 'auto' keyword
PASS Can set 'margin-top' to a percent PASS Can set 'margin-top' to a percent
PASS Can set 'margin-top' to a length PASS Can set 'margin-top' to a length
PASS Setting 'margin-top' to a time throws TypeError PASS Setting 'margin-top' to a time throws TypeError
PASS Setting 'margin-top' to a flexible length throws TypeError
PASS Setting 'margin-top' to a number throws TypeError PASS Setting 'margin-top' to a number throws TypeError
PASS Setting 'margin-top' to a position throws TypeError PASS Setting 'margin-top' to a position throws TypeError
PASS Setting 'margin-top' to a URL throws TypeError PASS Setting 'margin-top' to a URL throws TypeError
...@@ -16,6 +17,7 @@ PASS Can set 'margin-left' to the 'auto' keyword ...@@ -16,6 +17,7 @@ PASS Can set 'margin-left' to the 'auto' keyword
PASS Can set 'margin-left' to a percent PASS Can set 'margin-left' to a percent
PASS Can set 'margin-left' to a length PASS Can set 'margin-left' to a length
PASS Setting 'margin-left' to a time throws TypeError PASS Setting 'margin-left' to a time throws TypeError
PASS Setting 'margin-left' to a flexible length throws TypeError
PASS Setting 'margin-left' to a number throws TypeError PASS Setting 'margin-left' to a number throws TypeError
PASS Setting 'margin-left' to a position throws TypeError PASS Setting 'margin-left' to a position throws TypeError
PASS Setting 'margin-left' to a URL throws TypeError PASS Setting 'margin-left' to a URL throws TypeError
...@@ -26,6 +28,7 @@ PASS Can set 'margin-right' to the 'auto' keyword ...@@ -26,6 +28,7 @@ PASS Can set 'margin-right' to the 'auto' keyword
PASS Can set 'margin-right' to a percent PASS Can set 'margin-right' to a percent
PASS Can set 'margin-right' to a length PASS Can set 'margin-right' to a length
PASS Setting 'margin-right' to a time throws TypeError PASS Setting 'margin-right' to a time throws TypeError
PASS Setting 'margin-right' to a flexible length throws TypeError
PASS Setting 'margin-right' to a number throws TypeError PASS Setting 'margin-right' to a number throws TypeError
PASS Setting 'margin-right' to a position throws TypeError PASS Setting 'margin-right' to a position throws TypeError
PASS Setting 'margin-right' to a URL throws TypeError PASS Setting 'margin-right' to a URL throws TypeError
...@@ -36,6 +39,7 @@ PASS Can set 'margin-bottom' to the 'auto' keyword ...@@ -36,6 +39,7 @@ PASS Can set 'margin-bottom' to the 'auto' keyword
PASS Can set 'margin-bottom' to a percent PASS Can set 'margin-bottom' to a percent
PASS Can set 'margin-bottom' to a length PASS Can set 'margin-bottom' to a length
PASS Setting 'margin-bottom' to a time throws TypeError PASS Setting 'margin-bottom' to a time throws TypeError
PASS Setting 'margin-bottom' to a flexible length throws TypeError
PASS Setting 'margin-bottom' to a number throws TypeError PASS Setting 'margin-bottom' to a number throws TypeError
PASS Setting 'margin-bottom' to a position throws TypeError PASS Setting 'margin-bottom' to a position throws TypeError
PASS Setting 'margin-bottom' to a URL throws TypeError PASS Setting 'margin-bottom' to a URL throws TypeError
...@@ -45,6 +49,7 @@ FAIL Can set 'margin' to var() references assert_equals: expected "CSSUnparsedVa ...@@ -45,6 +49,7 @@ FAIL Can set 'margin' to var() references assert_equals: expected "CSSUnparsedVa
PASS Setting 'margin' to a length throws TypeError PASS Setting 'margin' to a length throws TypeError
PASS Setting 'margin' to a percent throws TypeError PASS Setting 'margin' to a percent throws TypeError
PASS Setting 'margin' to a time throws TypeError PASS Setting 'margin' to a time throws TypeError
PASS Setting 'margin' to a flexible length throws TypeError
PASS Setting 'margin' to a number throws TypeError PASS Setting 'margin' to a number throws TypeError
PASS Setting 'margin' to a position throws TypeError PASS Setting 'margin' to a position throws TypeError
PASS Setting 'margin' to a URL throws TypeError PASS Setting 'margin' to a URL throws TypeError
......
...@@ -6,6 +6,7 @@ FAIL Can set 'mask-image' to an image Failed to execute 'get' on 'StylePropertyM ...@@ -6,6 +6,7 @@ FAIL Can set 'mask-image' to an image Failed to execute 'get' on 'StylePropertyM
PASS Setting 'mask-image' to a length throws TypeError PASS Setting 'mask-image' to a length throws TypeError
PASS Setting 'mask-image' to a percent throws TypeError PASS Setting 'mask-image' to a percent throws TypeError
PASS Setting 'mask-image' to a time throws TypeError PASS Setting 'mask-image' to a time throws TypeError
PASS Setting 'mask-image' to a flexible length throws TypeError
PASS Setting 'mask-image' to a number throws TypeError PASS Setting 'mask-image' to a number throws TypeError
PASS Setting 'mask-image' to a position throws TypeError PASS Setting 'mask-image' to a position throws TypeError
PASS Setting 'mask-image' to a URL throws TypeError PASS Setting 'mask-image' to a URL throws TypeError
......
...@@ -14,6 +14,7 @@ PASS Can set 'outline-style' to the 'outset' keyword ...@@ -14,6 +14,7 @@ PASS Can set 'outline-style' to the 'outset' keyword
PASS Setting 'outline-style' to a length throws TypeError PASS Setting 'outline-style' to a length throws TypeError
PASS Setting 'outline-style' to a percent throws TypeError PASS Setting 'outline-style' to a percent throws TypeError
PASS Setting 'outline-style' to a time throws TypeError PASS Setting 'outline-style' to a time throws TypeError
PASS Setting 'outline-style' to a flexible length throws TypeError
PASS Setting 'outline-style' to a number throws TypeError PASS Setting 'outline-style' to a number throws TypeError
PASS Setting 'outline-style' to a position throws TypeError PASS Setting 'outline-style' to a position throws TypeError
PASS Setting 'outline-style' to a URL throws TypeError PASS Setting 'outline-style' to a URL throws TypeError
......
...@@ -9,6 +9,7 @@ PASS Can set 'overflow-x' to the 'auto' keyword ...@@ -9,6 +9,7 @@ PASS Can set 'overflow-x' to the 'auto' keyword
PASS Setting 'overflow-x' to a length throws TypeError PASS Setting 'overflow-x' to a length throws TypeError
PASS Setting 'overflow-x' to a percent throws TypeError PASS Setting 'overflow-x' to a percent throws TypeError
PASS Setting 'overflow-x' to a time throws TypeError PASS Setting 'overflow-x' to a time throws TypeError
PASS Setting 'overflow-x' to a flexible length throws TypeError
PASS Setting 'overflow-x' to a number throws TypeError PASS Setting 'overflow-x' to a number throws TypeError
PASS Setting 'overflow-x' to a position throws TypeError PASS Setting 'overflow-x' to a position throws TypeError
PASS Setting 'overflow-x' to a URL throws TypeError PASS Setting 'overflow-x' to a URL throws TypeError
...@@ -23,6 +24,7 @@ PASS Can set 'overflow-y' to the 'auto' keyword ...@@ -23,6 +24,7 @@ PASS Can set 'overflow-y' to the 'auto' keyword
PASS Setting 'overflow-y' to a length throws TypeError PASS Setting 'overflow-y' to a length throws TypeError
PASS Setting 'overflow-y' to a percent throws TypeError PASS Setting 'overflow-y' to a percent throws TypeError
PASS Setting 'overflow-y' to a time throws TypeError PASS Setting 'overflow-y' to a time throws TypeError
PASS Setting 'overflow-y' to a flexible length throws TypeError
PASS Setting 'overflow-y' to a number throws TypeError PASS Setting 'overflow-y' to a number throws TypeError
PASS Setting 'overflow-y' to a position throws TypeError PASS Setting 'overflow-y' to a position throws TypeError
PASS Setting 'overflow-y' to a URL throws TypeError PASS Setting 'overflow-y' to a URL throws TypeError
......
...@@ -120,6 +120,25 @@ const gTestSyntaxExamples = { ...@@ -120,6 +120,25 @@ const gTestSyntaxExamples = {
} }
], ],
}, },
'<flex>': {
description: 'a flexible length',
examples: [
{
description: "zero fractions",
input: new CSSUnitValue(0, 'fr')
},
{
description: "one fraction",
input: new CSSUnitValue(0, 'fr')
},
{
description: "negative fraction",
input: new CSSUnitValue(-3.14, 'fr')
},
// TODO(https://github.com/w3c/css-houdini-drafts/issues/734):
// Add calc tests involving 'fr' when that is spec'd in CSS.
],
},
'<number>': { '<number>': {
description: 'a number', description: 'a number',
examples: [ examples: [
......
...@@ -10,6 +10,7 @@ PASS Can set 'shape-outside' to an image ...@@ -10,6 +10,7 @@ PASS Can set 'shape-outside' to an image
PASS Setting 'shape-outside' to a length throws TypeError PASS Setting 'shape-outside' to a length throws TypeError
PASS Setting 'shape-outside' to a percent throws TypeError PASS Setting 'shape-outside' to a percent throws TypeError
PASS Setting 'shape-outside' to a time throws TypeError PASS Setting 'shape-outside' to a time throws TypeError
PASS Setting 'shape-outside' to a flexible length throws TypeError
PASS Setting 'shape-outside' to a number throws TypeError PASS Setting 'shape-outside' to a number throws TypeError
PASS Setting 'shape-outside' to a position throws TypeError PASS Setting 'shape-outside' to a position throws TypeError
PASS Setting 'shape-outside' to a URL throws TypeError PASS Setting 'shape-outside' to a URL throws TypeError
......
...@@ -6,6 +6,7 @@ PASS Can set 'text-combine-upright' to the 'all' keyword ...@@ -6,6 +6,7 @@ PASS Can set 'text-combine-upright' to the 'all' keyword
PASS Setting 'text-combine-upright' to a length throws TypeError PASS Setting 'text-combine-upright' to a length throws TypeError
PASS Setting 'text-combine-upright' to a percent throws TypeError PASS Setting 'text-combine-upright' to a percent throws TypeError
PASS Setting 'text-combine-upright' to a time throws TypeError PASS Setting 'text-combine-upright' to a time throws TypeError
PASS Setting 'text-combine-upright' to a flexible length throws TypeError
PASS Setting 'text-combine-upright' to a number throws TypeError PASS Setting 'text-combine-upright' to a number throws TypeError
PASS Setting 'text-combine-upright' to a position throws TypeError PASS Setting 'text-combine-upright' to a position throws TypeError
PASS Setting 'text-combine-upright' to a URL throws TypeError PASS Setting 'text-combine-upright' to a URL throws TypeError
......
...@@ -11,6 +11,7 @@ FAIL Can set 'text-decoration-line' to the 'grammar-error' keyword Failed to exe ...@@ -11,6 +11,7 @@ FAIL Can set 'text-decoration-line' to the 'grammar-error' keyword Failed to exe
PASS Setting 'text-decoration-line' to a length throws TypeError PASS Setting 'text-decoration-line' to a length throws TypeError
PASS Setting 'text-decoration-line' to a percent throws TypeError PASS Setting 'text-decoration-line' to a percent throws TypeError
PASS Setting 'text-decoration-line' to a time throws TypeError PASS Setting 'text-decoration-line' to a time throws TypeError
PASS Setting 'text-decoration-line' to a flexible length throws TypeError
PASS Setting 'text-decoration-line' to a number throws TypeError PASS Setting 'text-decoration-line' to a number throws TypeError
PASS Setting 'text-decoration-line' to a position throws TypeError PASS Setting 'text-decoration-line' to a position throws TypeError
PASS Setting 'text-decoration-line' to a URL throws TypeError PASS Setting 'text-decoration-line' to a URL throws TypeError
......
...@@ -9,6 +9,7 @@ FAIL Can set 'text-decoration-skip' to the 'spaces' keyword Failed to execute 's ...@@ -9,6 +9,7 @@ FAIL Can set 'text-decoration-skip' to the 'spaces' keyword Failed to execute 's
PASS Setting 'text-decoration-skip' to a length throws TypeError PASS Setting 'text-decoration-skip' to a length throws TypeError
PASS Setting 'text-decoration-skip' to a percent throws TypeError PASS Setting 'text-decoration-skip' to a percent throws TypeError
PASS Setting 'text-decoration-skip' to a time throws TypeError PASS Setting 'text-decoration-skip' to a time throws TypeError
PASS Setting 'text-decoration-skip' to a flexible length throws TypeError
PASS Setting 'text-decoration-skip' to a number throws TypeError PASS Setting 'text-decoration-skip' to a number throws TypeError
PASS Setting 'text-decoration-skip' to a position throws TypeError PASS Setting 'text-decoration-skip' to a position throws TypeError
PASS Setting 'text-decoration-skip' to a URL throws TypeError PASS Setting 'text-decoration-skip' to a URL throws TypeError
......
...@@ -5,6 +5,7 @@ FAIL Can set 'text-decoration-width' to the 'auto' keyword Failed to execute 'se ...@@ -5,6 +5,7 @@ FAIL Can set 'text-decoration-width' to the 'auto' keyword Failed to execute 'se
FAIL Can set 'text-decoration-width' to a length Failed to execute 'set' on 'StylePropertyMap': Invalid propertyName: text-decoration-width FAIL Can set 'text-decoration-width' to a length Failed to execute 'set' on 'StylePropertyMap': Invalid propertyName: text-decoration-width
PASS Setting 'text-decoration-width' to a percent throws TypeError PASS Setting 'text-decoration-width' to a percent throws TypeError
PASS Setting 'text-decoration-width' to a time throws TypeError PASS Setting 'text-decoration-width' to a time throws TypeError
PASS Setting 'text-decoration-width' to a flexible length throws TypeError
PASS Setting 'text-decoration-width' to a number throws TypeError PASS Setting 'text-decoration-width' to a number throws TypeError
PASS Setting 'text-decoration-width' to a position throws TypeError PASS Setting 'text-decoration-width' to a position throws TypeError
PASS Setting 'text-decoration-width' to a URL throws TypeError PASS Setting 'text-decoration-width' to a URL throws TypeError
......
...@@ -5,6 +5,7 @@ FAIL Can set 'text-emphasis-color' to the 'currentcolor' keyword Failed to execu ...@@ -5,6 +5,7 @@ FAIL Can set 'text-emphasis-color' to the 'currentcolor' keyword Failed to execu
PASS Setting 'text-emphasis-color' to a length throws TypeError PASS Setting 'text-emphasis-color' to a length throws TypeError
PASS Setting 'text-emphasis-color' to a percent throws TypeError PASS Setting 'text-emphasis-color' to a percent throws TypeError
PASS Setting 'text-emphasis-color' to a time throws TypeError PASS Setting 'text-emphasis-color' to a time throws TypeError
PASS Setting 'text-emphasis-color' to a flexible length throws TypeError
PASS Setting 'text-emphasis-color' to a number throws TypeError PASS Setting 'text-emphasis-color' to a number throws TypeError
PASS Setting 'text-emphasis-color' to a position throws TypeError PASS Setting 'text-emphasis-color' to a position throws TypeError
PASS Setting 'text-emphasis-color' to a URL throws TypeError PASS Setting 'text-emphasis-color' to a URL throws TypeError
......
...@@ -7,6 +7,7 @@ FAIL Can set 'text-overflow' to the 'fade' keyword Failed to execute 'set' on 'S ...@@ -7,6 +7,7 @@ FAIL Can set 'text-overflow' to the 'fade' keyword Failed to execute 'set' on 'S
PASS Setting 'text-overflow' to a length throws TypeError PASS Setting 'text-overflow' to a length throws TypeError
PASS Setting 'text-overflow' to a percent throws TypeError PASS Setting 'text-overflow' to a percent throws TypeError
PASS Setting 'text-overflow' to a time throws TypeError PASS Setting 'text-overflow' to a time throws TypeError
PASS Setting 'text-overflow' to a flexible length throws TypeError
PASS Setting 'text-overflow' to a number throws TypeError PASS Setting 'text-overflow' to a number throws TypeError
PASS Setting 'text-overflow' to a position throws TypeError PASS Setting 'text-overflow' to a position throws TypeError
PASS Setting 'text-overflow' to a URL throws TypeError PASS Setting 'text-overflow' to a URL throws TypeError
......
...@@ -9,6 +9,7 @@ FAIL Can set 'text-transform' to the 'full-width' keyword Failed to execute 'set ...@@ -9,6 +9,7 @@ FAIL Can set 'text-transform' to the 'full-width' keyword Failed to execute 'set
PASS Setting 'text-transform' to a length throws TypeError PASS Setting 'text-transform' to a length throws TypeError
PASS Setting 'text-transform' to a percent throws TypeError PASS Setting 'text-transform' to a percent throws TypeError
PASS Setting 'text-transform' to a time throws TypeError PASS Setting 'text-transform' to a time throws TypeError
PASS Setting 'text-transform' to a flexible length throws TypeError
PASS Setting 'text-transform' to a number throws TypeError PASS Setting 'text-transform' to a number throws TypeError
PASS Setting 'text-transform' to a position throws TypeError PASS Setting 'text-transform' to a position throws TypeError
PASS Setting 'text-transform' to a URL throws TypeError PASS Setting 'text-transform' to a URL throws TypeError
......
...@@ -9,6 +9,7 @@ PASS Can set 'user-select' to the 'all' keyword ...@@ -9,6 +9,7 @@ PASS Can set 'user-select' to the 'all' keyword
PASS Setting 'user-select' to a length throws TypeError PASS Setting 'user-select' to a length throws TypeError
PASS Setting 'user-select' to a percent throws TypeError PASS Setting 'user-select' to a percent throws TypeError
PASS Setting 'user-select' to a time throws TypeError PASS Setting 'user-select' to a time throws TypeError
PASS Setting 'user-select' to a flexible length throws TypeError
PASS Setting 'user-select' to a number throws TypeError PASS Setting 'user-select' to a number throws TypeError
PASS Setting 'user-select' to a position throws TypeError PASS Setting 'user-select' to a position throws TypeError
PASS Setting 'user-select' to a URL throws TypeError PASS Setting 'user-select' to a URL throws TypeError
......
...@@ -9,6 +9,7 @@ FAIL Can set 'writing-mode' to the 'sideways-lr' keyword Failed to execute 'set' ...@@ -9,6 +9,7 @@ FAIL Can set 'writing-mode' to the 'sideways-lr' keyword Failed to execute 'set'
PASS Setting 'writing-mode' to a length throws TypeError PASS Setting 'writing-mode' to a length throws TypeError
PASS Setting 'writing-mode' to a percent throws TypeError PASS Setting 'writing-mode' to a percent throws TypeError
PASS Setting 'writing-mode' to a time throws TypeError PASS Setting 'writing-mode' to a time throws TypeError
PASS Setting 'writing-mode' to a flexible length throws TypeError
PASS Setting 'writing-mode' to a number throws TypeError PASS Setting 'writing-mode' to a number throws TypeError
PASS Setting 'writing-mode' to a position throws TypeError PASS Setting 'writing-mode' to a position throws TypeError
PASS Setting 'writing-mode' to a URL throws TypeError PASS Setting 'writing-mode' to a URL throws TypeError
......
...@@ -46,6 +46,13 @@ bool IsCSSStyleValuePercentage(const CSSStyleValue& value) { ...@@ -46,6 +46,13 @@ bool IsCSSStyleValuePercentage(const CSSStyleValue& value) {
MatchesPercentage(); MatchesPercentage();
} }
bool IsCSSStyleValueFlex(const CSSStyleValue& value) {
if (!value.IsNumericValue())
return false;
return static_cast<const CSSNumericValue&>(value).Type().
MatchesBaseType(CSSNumericValueType::BaseType::kFlex);
}
bool IsCSSStyleValueImage(const CSSStyleValue& value) { bool IsCSSStyleValueImage(const CSSStyleValue& value) {
return value.GetType() == CSSStyleValue::kURLImageType; return value.GetType() == CSSStyleValue::kURLImageType;
} }
......
...@@ -1488,6 +1488,9 @@ ...@@ -1488,6 +1488,9 @@
default_value: "Vector<GridTrackSize>(1, GridTrackSize(Length(kAuto)))", default_value: "Vector<GridTrackSize>(1, GridTrackSize(Length(kAuto)))",
type_name: "Vector<GridTrackSize>", type_name: "Vector<GridTrackSize>",
converter: "ConvertGridTrackSizeList", converter: "ConvertGridTrackSizeList",
keywords: ["auto", "min-content", "max-content"],
typedom_types: ["Keyword", "Length", "Percentage", "Flex"],
separator: " "
}, },
{ {
name: "grid-auto-flow", name: "grid-auto-flow",
...@@ -1499,6 +1502,8 @@ ...@@ -1499,6 +1502,8 @@
type_name: "GridAutoFlow", type_name: "GridAutoFlow",
computed_style_custom_functions: ["getter"], computed_style_custom_functions: ["getter"],
converter: "ConvertGridAutoFlow", converter: "ConvertGridAutoFlow",
keywords: ["row", "column"],
typedom_types: ["Keyword"]
}, },
{ {
name: "grid-auto-rows", name: "grid-auto-rows",
...@@ -1509,6 +1514,9 @@ ...@@ -1509,6 +1514,9 @@
default_value: "Vector<GridTrackSize>(1, GridTrackSize(Length(kAuto)))", default_value: "Vector<GridTrackSize>(1, GridTrackSize(Length(kAuto)))",
type_name: "Vector<GridTrackSize>", type_name: "Vector<GridTrackSize>",
converter: "ConvertGridTrackSizeList", converter: "ConvertGridTrackSizeList",
keywords: ["auto", "min-content", "max-content"],
typedom_types: ["Keyword", "Length", "Percentage", "Flex"],
separator: " "
}, },
{ {
name: "grid-column-end", name: "grid-column-end",
...@@ -1518,6 +1526,8 @@ ...@@ -1518,6 +1526,8 @@
include_paths: ["core/style/GridPosition.h"], include_paths: ["core/style/GridPosition.h"],
default_value: "GridPosition()", default_value: "GridPosition()",
type_name: "GridPosition", type_name: "GridPosition",
keywords: ["auto"],
typedom_types: ["Keyword"],
converter: "ConvertGridPosition", converter: "ConvertGridPosition",
}, },
{ {
...@@ -1528,6 +1538,8 @@ ...@@ -1528,6 +1538,8 @@
include_paths: ["core/style/GridPosition.h"], include_paths: ["core/style/GridPosition.h"],
default_value: "GridPosition()", default_value: "GridPosition()",
type_name: "GridPosition", type_name: "GridPosition",
keywords: ["auto"],
typedom_types: ["Keyword"],
converter: "ConvertGridPosition", converter: "ConvertGridPosition",
}, },
{ {
...@@ -1538,6 +1550,8 @@ ...@@ -1538,6 +1550,8 @@
include_paths: ["core/style/GridPosition.h"], include_paths: ["core/style/GridPosition.h"],
default_value: "GridPosition()", default_value: "GridPosition()",
type_name: "GridPosition", type_name: "GridPosition",
keywords: ["auto"],
typedom_types: ["Keyword"],
converter: "ConvertGridPosition", converter: "ConvertGridPosition",
}, },
{ {
...@@ -1548,12 +1562,16 @@ ...@@ -1548,12 +1562,16 @@
include_paths: ["core/style/GridPosition.h"], include_paths: ["core/style/GridPosition.h"],
default_value: "GridPosition()", default_value: "GridPosition()",
type_name: "GridPosition", type_name: "GridPosition",
keywords: ["auto"],
typedom_types: ["Keyword"],
converter: "ConvertGridPosition", converter: "ConvertGridPosition",
}, },
{ {
name: "grid-template-areas", name: "grid-template-areas",
property_methods: ["ParseSingleValue", "CSSValueFromComputedStyleInternal"], property_methods: ["ParseSingleValue", "CSSValueFromComputedStyleInternal"],
custom_apply_functions_all: true, custom_apply_functions_all: true,
keywords: ["none"],
typedom_types: ["Keyword"]
}, },
{ {
name: "grid-template-columns", name: "grid-template-columns",
...@@ -1565,6 +1583,8 @@ ...@@ -1565,6 +1583,8 @@
default_value: "Vector<GridTrackSize>()", default_value: "Vector<GridTrackSize>()",
type_name: "Vector<GridTrackSize>", type_name: "Vector<GridTrackSize>",
custom_apply_functions_all: true, custom_apply_functions_all: true,
keywords: ["none"],
typedom_types: ["Keyword"]
}, },
{ {
name: "grid-template-rows", name: "grid-template-rows",
...@@ -1576,6 +1596,8 @@ ...@@ -1576,6 +1596,8 @@
default_value: "Vector<GridTrackSize>()", default_value: "Vector<GridTrackSize>()",
type_name: "Vector<GridTrackSize>", type_name: "Vector<GridTrackSize>",
custom_apply_functions_all: true, custom_apply_functions_all: true,
keywords: ["none"],
typedom_types: ["Keyword"]
}, },
{ {
name: "height", name: "height",
......
...@@ -53,6 +53,17 @@ const CSSValue* StyleValueToCSSValue( ...@@ -53,6 +53,17 @@ const CSSValue* StyleValueToCSSValue(
// TODO(https://crbug.com/545324): Move this into a method on // TODO(https://crbug.com/545324): Move this into a method on
// CSSProperty when there are more of these cases. // CSSProperty when there are more of these cases.
switch (property_id) { switch (property_id) {
case CSSPropertyGridAutoFlow: {
// level 1 only accepts single keywords
const auto* value = style_value.ToCSSValue();
// single keywords are wrapped in a list.
if (value->IsIdentifierValue() && !value->IsCSSWideKeyword()) {
CSSValueList* list = CSSValueList::CreateSpaceSeparated();
list->Append(*style_value.ToCSSValue());
return list;
}
break;
}
case CSSPropertyTextDecorationLine: { case CSSPropertyTextDecorationLine: {
// level 1 only accepts single keywords // level 1 only accepts single keywords
const auto* value = style_value.ToCSSValue(); const auto* value = style_value.ToCSSValue();
......
...@@ -68,6 +68,13 @@ CSSStyleValue* CreateStyleValueWithPropertyInternal(CSSPropertyID property_id, ...@@ -68,6 +68,13 @@ CSSStyleValue* CreateStyleValueWithPropertyInternal(CSSPropertyID property_id,
return CSSKeywordValue::Create("currentcolor"); return CSSKeywordValue::Create("currentcolor");
} }
return CSSUnsupportedStyleValue::Create(property_id, value); return CSSUnsupportedStyleValue::Create(property_id, value);
case CSSPropertyGridAutoFlow: {
const auto& value_list = ToCSSValueList(value);
// Only single keywords are supported in level 1.
if (value_list.length() == 1U)
return CreateStyleValue(value_list.Item(0));
return nullptr;
}
case CSSPropertyTransform: case CSSPropertyTransform:
return CSSTransformValue::FromCSSValue(value); return CSSTransformValue::FromCSSValue(value);
case CSSPropertyOffsetAnchor: case CSSPropertyOffsetAnchor:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment