Skip to content

Commit

Permalink
[css-typed-om] Implement support for text-* properties.
Browse files Browse the repository at this point in the history
There's a failing test due to Blink computing keyword values for
text-size-adjust to percentages, even though the spec says the computed
value is as specified.

Bug: 820299
Change-Id: I53c4177f1ce2205a4f2b6af00b1c61da4f5e774f
Reviewed-on: https://chromium-review.googlesource.com/994594
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549095}
  • Loading branch information
darrnshn authored and chromium-wpt-export-bot committed Apr 9, 2018
1 parent 318f287 commit 8a4cdaf
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!doctype html>
<meta charset="utf-8">
<title>'text-align-last' 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('text-align-last', [
{ syntax: 'auto' },
{ syntax: 'start' },
{ syntax: 'end' },
{ syntax: 'left' },
{ syntax: 'right' },
{ syntax: 'center' },
{ syntax: 'justify' },
]);

</script>
25 changes: 25 additions & 0 deletions css/css-typed-om/the-stylepropertymap/properties/text-indent.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!doctype html>
<meta charset="utf-8">
<title>'text-indent' 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('text-indent', [
{ syntax: '<length>' },
{ syntax: '<percentage>' },
]);

runUnsupportedPropertyTests('text-indent', [
'5em each-line', '5em hanging', '5em hanging each-line'
]);

</script>
23 changes: 23 additions & 0 deletions css/css-typed-om/the-stylepropertymap/properties/text-justify.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!doctype html>
<meta charset="utf-8">
<title>'text-justify' 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('text-justify', [
{ syntax: 'auto' },
{ syntax: 'none' },
{ syntax: 'inter-word' },
{ syntax: 'inter-character' },
]);

</script>
24 changes: 24 additions & 0 deletions css/css-typed-om/the-stylepropertymap/properties/text-shadow.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!doctype html>
<meta charset="utf-8">
<title>'text-shadow' 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('text-shadow', [
{ syntax: 'none' },
]);

runUnsupportedPropertyTests('text-shadow', [
'1px 1px 2px pink', '1px 1px 2px red, 0 0 1em blue, 0 0 0.2em blue'
]);

</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!doctype html>
<meta charset="utf-8">
<title>'text-size-adjust' 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('text-size-adjust', [
{ syntax: 'none' },
{ syntax: 'auto' },
{ syntax: '<percentage>' },
]);

</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!doctype html>
<meta charset="utf-8">
<title>'text-underline-position' 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('text-underline-position', [
{ syntax: 'auto' },
{ syntax: 'under' },
{ syntax: 'left' },
{ syntax: 'right' },
]);

runUnsupportedPropertyTests('text-underline-position', [
'under left', 'right under'
]);

</script>

0 comments on commit 8a4cdaf

Please sign in to comment.