Commit 54d2cbe0 authored by Hwanseung Lee's avatar Hwanseung Lee Committed by Commit Bot

[css-typed-om] support some properties

caption-side[1], isolation[2], unicode-bidi[3], writing-mode[4]
are added to support in whitelist.
and test file are also added.

[1]https://drafts.csswg.org/css-tables-3/#propdef-caption-side
[2]https://drafts.fxtf.org/compositing-2/#propdef-isolation
[3]https://drafts.csswg.org/css-writing-modes-4/#propdef-unicode-bidi
[4]https://drafts.csswg.org/css-writing-modes-4/#propdef-writing-mode

Bug: 820299
Change-Id: Ic0395565e77363b27ed7f93c861c4258396d766e
Reviewed-on: https://chromium-review.googlesource.com/962562Reviewed-by: default avatarDarren Shen <shend@chromium.org>
Commit-Queue: Hwanseung Lee <hwanseung@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543286}
parent 019555c1
<!doctype html>
<meta charset="utf-8">
<title>'caption-side' 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('caption-side', [
{ syntax: 'top' },
{ syntax: 'bottom' },
]);
</script>
<!doctype html>
<meta charset="utf-8">
<title>'isolation' 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('isolation', [
{ syntax: 'auto' },
{ syntax: 'isolate' },
]);
</script>
<!doctype html>
<meta charset="utf-8">
<title>'unicode-bidi' 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('unicode-bidi', [
{ syntax: 'normal' },
{ syntax: 'embed' },
{ syntax: 'isolate' },
{ syntax: 'bidi-override' },
{ syntax: 'isolate-override' },
{ syntax: 'plaintext' },
]);
</script>
This is a testharness.js-based test.
PASS Can set 'writing-mode' to CSS-wide keywords
PASS Can set 'writing-mode' to var() references
PASS Can set 'writing-mode' to the 'horizontal-tb' keyword
PASS Can set 'writing-mode' to the 'vertical-rl' keyword
PASS Can set 'writing-mode' to the 'vertical-lr' keyword
FAIL Can set 'writing-mode' to the 'sideways-rl' keyword Failed to execute 'set' on 'StylePropertyMap': Invalid type for property
FAIL Can set 'writing-mode' to the 'sideways-lr' keyword Failed to execute 'set' on 'StylePropertyMap': Invalid type for property
PASS Setting 'writing-mode' to a length 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 number throws TypeError
PASS Setting 'writing-mode' to a position throws TypeError
PASS Setting 'writing-mode' to a transform throws TypeError
Harness: the test ran to completion.
<!doctype html>
<meta charset="utf-8">
<title>'writing-mode' 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('writing-mode', [
{ syntax: 'horizontal-tb' },
{ syntax: 'vertical-rl' },
{ syntax: 'vertical-lr' },
{ syntax: 'sideways-rl' },
{ syntax: 'sideways-lr' },
]);
</script>
...@@ -643,6 +643,7 @@ ...@@ -643,6 +643,7 @@
field_template: "keyword", field_template: "keyword",
include_paths: ["platform/text/WritingMode.h"], include_paths: ["platform/text/WritingMode.h"],
keywords: ["horizontal-tb", "vertical-rl", "vertical-lr"], keywords: ["horizontal-tb", "vertical-rl", "vertical-lr"],
typedom_types: ["Keyword"],
default_value: "horizontal-tb", default_value: "horizontal-tb",
type_name: "WritingMode", type_name: "WritingMode",
custom_apply_functions_value: true, custom_apply_functions_value: true,
...@@ -1144,6 +1145,7 @@ ...@@ -1144,6 +1145,7 @@
inherited: true, inherited: true,
field_template: "keyword", field_template: "keyword",
keywords: ["top", "bottom"], keywords: ["top", "bottom"],
typedom_types: ["Keyword"],
default_value: "top", default_value: "top",
}, },
{ {
...@@ -1586,6 +1588,7 @@ ...@@ -1586,6 +1588,7 @@
field_group: "*", field_group: "*",
field_template: "keyword", field_template: "keyword",
keywords: ["auto", "isolate"], keywords: ["auto", "isolate"],
typedom_types: ["Keyword"],
default_value: "auto", default_value: "auto",
}, },
{ {
...@@ -2908,6 +2911,7 @@ ...@@ -2908,6 +2911,7 @@
"normal", "embed", "bidi-override", "isolate", "plaintext", "normal", "embed", "bidi-override", "isolate", "plaintext",
"isolate-override" "isolate-override"
], ],
typedom_types: ["Keyword"],
default_value: "normal", default_value: "normal",
type_name: "UnicodeBidi", type_name: "UnicodeBidi",
}, },
......
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