Diff
Modified: trunk/LayoutTests/ChangeLog (259005 => 259006)
--- trunk/LayoutTests/ChangeLog 2020-03-25 20:02:59 UTC (rev 259005)
+++ trunk/LayoutTests/ChangeLog 2020-03-25 20:12:54 UTC (rev 259006)
@@ -1,3 +1,34 @@
+2020-03-25 Frank Yang <guowei_y...@apple.com>
+
+ Unprefix -webkit-text-orientation
+ https://bugs.webkit.org/show_bug.cgi?id=196139
+
+ Added test cases to check that Webkit can now parse text-orientation correctly,
+ as well as that the precedence rule for CSS property still applies when both
+ -webkit-text-orientation and text-orientation property are present, the second
+ one takes precedence.
+
+ Reviewed by Myles C. Maxfield
+
+ * fast/text/orientation-inheritance-expected.html: Added.
+ * fast/text/orientation-inheritance.html: Added.
+ * fast/text/orientation-mixed-unprefix-expected.html: Added.
+ * fast/text/orientation-mixed-unprefix.html: Added.
+ * fast/text/orientation-sideways-prefix-unprefix-expected.html: Added.
+ * fast/text/orientation-sideways-prefix-unprefix.html: Added.
+ * fast/text/orientation-sideways-unprefix-expected.html: Added.
+ * fast/text/orientation-sideways-unprefix.html: Added.
+ * fast/text/orientation-upright-unprefix-expected.html: Added.
+ * fast/text/orientation-upright-unprefix.html: Added.
+ * fast/text/test-orientation-parsing-001-expected.txt: Added.
+ * fast/text/test-orientation-parsing-001.html: Added.
+ * fast/text/text-orientation-parse-competition-expected.txt: Added.
+ * fast/text/text-orientation-parse-competition.html: Added.
+ * fast/text/text-orientation-parse-expected.txt: Added.
+ * fast/text/text-orientation-parse.html: Added.
+ * fast/text/text-orientation-parse-stylesheet-expected.txt: Added.
+ * fast/text/text-orientation-parse-stylesheet.html: Added.
+
2020-03-25 Nikos Mouchtaris <nmouchta...@apple.com>
Add ref test for apple pay button corner radius change
Added: trunk/LayoutTests/fast/text/orientation-inheritance-expected.html (0 => 259006)
--- trunk/LayoutTests/fast/text/orientation-inheritance-expected.html (rev 0)
+++ trunk/LayoutTests/fast/text/orientation-inheritance-expected.html 2020-03-25 20:12:54 UTC (rev 259006)
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ </head>
+ <body>
+ This test makes sure that text-orientation: sideways is treated the same as text-orientation: sideways-right.
+ <div id="placeholder"></div>
+ <div style="text-orientation: upright;">
+ <div id="t" style="-webkit-writing-mode: vertical-rl; -webkit-text-orientation: sideways;">苹果公司 abcd
+ <div>
+ 你好 Hello World!
+ </div>
+ </div>
+ <div id="t" style="-webkit-writing-mode: vertical-rl; -webkit-text-orientation: mixed;">苹果公司 abcd
+ <div>
+ 你好 Hello World!
+ </div>
+ </div>
+ <div id="t" style="-webkit-writing-mode: vertical-rl; -webkit-text-orientation: upright;">苹果公司 abcd
+ <div>
+ 你好 Hello World!
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
\ No newline at end of file
Added: trunk/LayoutTests/fast/text/orientation-inheritance.html (0 => 259006)
--- trunk/LayoutTests/fast/text/orientation-inheritance.html (rev 0)
+++ trunk/LayoutTests/fast/text/orientation-inheritance.html 2020-03-25 20:12:54 UTC (rev 259006)
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ </head>
+ <body>
+ This test makes sure that text-orientation: sideways is treated the same as text-orientation: sideways-right.
+ <div id="placeholder"></div>
+ <div style="text-orientation: upright;">
+ <div id="t" style="-webkit-writing-mode: vertical-rl; text-orientation: sideways;">苹果公司 abcd
+ <div>
+ 你好 Hello World!
+ </div>
+ </div>
+ <div id="t" style="-webkit-writing-mode: vertical-rl; text-orientation: mixed;">苹果公司 abcd
+ <div>
+ 你好 Hello World!
+ </div>
+ </div>
+ <div id="t" style="-webkit-writing-mode: vertical-rl; text-orientation: upright;">苹果公司 abcd
+ <div>
+ 你好 Hello World!
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
\ No newline at end of file
Added: trunk/LayoutTests/fast/text/orientation-mixed-unprefix-expected.html (0 => 259006)
--- trunk/LayoutTests/fast/text/orientation-mixed-unprefix-expected.html (rev 0)
+++ trunk/LayoutTests/fast/text/orientation-mixed-unprefix-expected.html 2020-03-25 20:12:54 UTC (rev 259006)
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+</head>
+<body>
+This test makes sure that text-orientation: sideways is treated the same as text-orientation: sideways-right.
+<div id="placeholder"></div>
+<div style="text-orientation: upright;">
+<div id="t" style="-webkit-writing-mode: vertical-rl; -webkit-text-orientation: mixed;">苹果公司abcd</div>
+</div>
+<script>
+var t = document.getElementById("t");
+var receiver = document.getElementById("placeholder");
+receiver.textContent = window.getComputedStyle(t).getPropertyValue("-webkit-text-orientation");
+</script>
+</body>
+</html>
\ No newline at end of file
Added: trunk/LayoutTests/fast/text/orientation-mixed-unprefix.html (0 => 259006)
--- trunk/LayoutTests/fast/text/orientation-mixed-unprefix.html (rev 0)
+++ trunk/LayoutTests/fast/text/orientation-mixed-unprefix.html 2020-03-25 20:12:54 UTC (rev 259006)
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+</head>
+<body>
+This test makes sure that text-orientation: sideways is treated the same as text-orientation: sideways-right.
+<div id="placeholder"></div>
+<div style="text-orientation: upright;">
+<div id="t" style="-webkit-writing-mode: vertical-rl; text-orientation: mixed;">苹果公司abcd</div>
+</div>
+<script>
+var t = document.getElementById("t");
+var receiver = document.getElementById("placeholder");
+receiver.textContent = window.getComputedStyle(t).getPropertyValue("-webkit-text-orientation");
+</script>
+</body>
+</html>
\ No newline at end of file
Added: trunk/LayoutTests/fast/text/orientation-sideways-prefix-unprefix-expected.html (0 => 259006)
--- trunk/LayoutTests/fast/text/orientation-sideways-prefix-unprefix-expected.html (rev 0)
+++ trunk/LayoutTests/fast/text/orientation-sideways-prefix-unprefix-expected.html 2020-03-25 20:12:54 UTC (rev 259006)
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ </head>
+ <body>
+ This test makes sure that text-orientation: sideways is treated the same as text-orientation: sideways-right.
+ <div id="placeholder"></div>
+ <div style="text-orientation: upright;">
+ <div id="t" style="-webkit-writing-mode: vertical-rl; -webkit-text-orientation: sideways;">苹果公司 abcd</div>
+ </div>
+ </body>
+</html>
\ No newline at end of file
Added: trunk/LayoutTests/fast/text/orientation-sideways-prefix-unprefix.html (0 => 259006)
--- trunk/LayoutTests/fast/text/orientation-sideways-prefix-unprefix.html (rev 0)
+++ trunk/LayoutTests/fast/text/orientation-sideways-prefix-unprefix.html 2020-03-25 20:12:54 UTC (rev 259006)
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ </head>
+ <body>
+ This test makes sure that text-orientation: sideways is treated the same as text-orientation: sideways-right.
+ <div id="placeholder"></div>
+ <div style="text-orientation: upright;">
+ <div id="t" style="-webkit-writing-mode: vertical-rl; -webkit-text-orientation: upright; text-orientation: sideways;">苹果公司 abcd</div>
+ </div>
+ </body>
+</html>
\ No newline at end of file
Added: trunk/LayoutTests/fast/text/orientation-sideways-unprefix-expected.html (0 => 259006)
--- trunk/LayoutTests/fast/text/orientation-sideways-unprefix-expected.html (rev 0)
+++ trunk/LayoutTests/fast/text/orientation-sideways-unprefix-expected.html 2020-03-25 20:12:54 UTC (rev 259006)
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+</head>
+<body>
+This test makes sure that text-orientation: sideways is treated the same as text-orientation: sideways-right.
+<div id="placeholder"></div>
+<div style="text-orientation: upright;">
+<div id="t" style="-webkit-writing-mode: vertical-rl; -webkit-text-orientation: sideways;">苹果公司 abcd</div>
+</div>
+<script>
+var t = document.getElementById("t");
+var receiver = document.getElementById("placeholder");
+receiver.textContent = window.getComputedStyle(t).getPropertyValue("-webkit-text-orientation");
+</script>
+</body>
+</html>
\ No newline at end of file
Added: trunk/LayoutTests/fast/text/orientation-sideways-unprefix.html (0 => 259006)
--- trunk/LayoutTests/fast/text/orientation-sideways-unprefix.html (rev 0)
+++ trunk/LayoutTests/fast/text/orientation-sideways-unprefix.html 2020-03-25 20:12:54 UTC (rev 259006)
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+</head>
+<body>
+This test makes sure that text-orientation: sideways is treated the same as text-orientation: sideways-right.
+<div id="placeholder"></div>
+<div style="text-orientation: upright;">
+<div id="t" style="-webkit-writing-mode: vertical-rl; text-orientation: sideways;">苹果公司 abcd</div>
+</div>
+<script>
+var t = document.getElementById("t");
+var receiver = document.getElementById("placeholder");
+receiver.textContent = window.getComputedStyle(t).getPropertyValue("-webkit-text-orientation");
+</script>
+</body>
+</html>
\ No newline at end of file
Added: trunk/LayoutTests/fast/text/orientation-upright-unprefix-expected.html (0 => 259006)
--- trunk/LayoutTests/fast/text/orientation-upright-unprefix-expected.html (rev 0)
+++ trunk/LayoutTests/fast/text/orientation-upright-unprefix-expected.html 2020-03-25 20:12:54 UTC (rev 259006)
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+</head>
+<body>
+This test makes sure that text-orientation: sideways is treated the same as text-orientation: sideways-right.
+<div id="placeholder"></div>
+<div style="text-orientation: upright;">
+<div id="t" style="-webkit-writing-mode: vertical-rl; -webkit-text-orientation: upright;">abcd</div>
+</div>
+<script>
+var t = document.getElementById("t");
+var receiver = document.getElementById("placeholder");
+receiver.textContent = window.getComputedStyle(t).getPropertyValue("-webkit-text-orientation");
+</script>
+</body>
+</html>
\ No newline at end of file
Added: trunk/LayoutTests/fast/text/orientation-upright-unprefix.html (0 => 259006)
--- trunk/LayoutTests/fast/text/orientation-upright-unprefix.html (rev 0)
+++ trunk/LayoutTests/fast/text/orientation-upright-unprefix.html 2020-03-25 20:12:54 UTC (rev 259006)
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+</head>
+<body>
+This test makes sure that text-orientation: sideways is treated the same as text-orientation: sideways-right.
+<div id="placeholder"></div>
+<div style="text-orientation: upright;">
+<div id="t" style="-webkit-writing-mode: vertical-rl; text-orientation: upright;">abcd</div>
+</div>
+<script>
+var t = document.getElementById("t");
+var receiver = document.getElementById("placeholder");
+receiver.textContent = window.getComputedStyle(t).getPropertyValue("-webkit-text-orientation");
+</script>
+</body>
+</html>
\ No newline at end of file
Added: trunk/LayoutTests/fast/text/test-orientation-parsing-001-expected.txt (0 => 259006)
--- trunk/LayoutTests/fast/text/test-orientation-parsing-001-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/text/test-orientation-parsing-001-expected.txt 2020-03-25 20:12:54 UTC (rev 259006)
@@ -0,0 +1,11 @@
+PASS window.getComputedStyle(document.getElementById('test1')).webkitTextOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test2')).webkitTextOrientation is "sideways"
+PASS window.getComputedStyle(document.getElementById('test3')).webkitTextOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test4')).webkitTextOrientation is "mixed"
+PASS window.getComputedStyle(document.getElementById('test5')).webkitTextOrientation is "mixed"
+PASS window.getComputedStyle(document.getElementById('test6')).webkitTextOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test7')).webkitTextOrientation is "upright"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/text/test-orientation-parsing-001.html (0 => 259006)
--- trunk/LayoutTests/fast/text/test-orientation-parsing-001.html (rev 0)
+++ trunk/LayoutTests/fast/text/test-orientation-parsing-001.html 2020-03-25 20:12:54 UTC (rev 259006)
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src=""
+ </head>
+ <body>
+ <div
+ data-expected="mixed" title="text-orientation initial value"></div>
+
+ <div id="test1" style="text-orientation: upright"
+ data-expected="upright"></div>
+ <div id="test2" style="text-orientation: sideways"
+ data-expected="sideways"></div>
+
+ <div id="test3" style="text-orientation: upright">
+ <div
+ data-expected="upright" title="text-orientation should inherit"></div>
+
+ <div id="test4" style="text-orientation: mixed"
+ data-expected="mixed"></div>
+
+ <div id="test5" style="text-orientation: initial"
+ data-expected="mixed"></div>
+ <div id="test6" style="text-orientation: inherit"
+ data-expected="upright"></div>
+
+ <div id="test7" style="text-orientation: foo"
+ data-expected="upright"></div>
+ </div>
+
+
+
+
+ <script>
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test1')).webkitTextOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test2')).webkitTextOrientation", "sideways");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test3')).webkitTextOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test4')).webkitTextOrientation", "mixed");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test5')).webkitTextOrientation", "mixed");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test6')).webkitTextOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test7')).webkitTextOrientation", "upright");
+ </script>
+
+ <script src=""
+ </body>
+</html>
Added: trunk/LayoutTests/fast/text/text-orientation-parse-competition-expected.txt (0 => 259006)
--- trunk/LayoutTests/fast/text/text-orientation-parse-competition-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/text/text-orientation-parse-competition-expected.txt 2020-03-25 20:12:54 UTC (rev 259006)
@@ -0,0 +1,9 @@
+PASS window.getComputedStyle(document.getElementById('test1')).webkitTextOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test2')).webkitTextOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test1')).textOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test2')).textOrientation is "upright"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+你好ABC
+你好ABC
Added: trunk/LayoutTests/fast/text/text-orientation-parse-competition.html (0 => 259006)
--- trunk/LayoutTests/fast/text/text-orientation-parse-competition.html (rev 0)
+++ trunk/LayoutTests/fast/text/text-orientation-parse-competition.html 2020-03-25 20:12:54 UTC (rev 259006)
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <script src=""
+ </head>
+ <body>
+ <div id="test1" style="-webkit-writing-mode: vertical-rl; -webkit-text-orientation: sideways; text-orientation: upright">你好ABC</div>
+ <div id="test2" style="-webkit-writing-mode: vertical-rl; text-orientation: sideways; -webkit-text-orientation: upright">你好ABC</div>
+ <script>
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test1')).webkitTextOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test2')).webkitTextOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test1')).textOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test2')).textOrientation", "upright");
+ </script>
+ <script src=""
+ </body>
+</html>
Added: trunk/LayoutTests/fast/text/text-orientation-parse-expected.txt (0 => 259006)
--- trunk/LayoutTests/fast/text/text-orientation-parse-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/text/text-orientation-parse-expected.txt 2020-03-25 20:12:54 UTC (rev 259006)
@@ -0,0 +1,58 @@
+PASS window.getComputedStyle(document.getElementById('test1')).webkitTextOrientation is "sideways"
+PASS window.getComputedStyle(document.getElementById('test2')).webkitTextOrientation is "sideways"
+PASS window.getComputedStyle(document.getElementById('test3')).webkitTextOrientation is "sideways"
+PASS window.getComputedStyle(document.getElementById('test4')).webkitTextOrientation is "sideways"
+PASS window.getComputedStyle(document.getElementById('test5')).webkitTextOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test6')).webkitTextOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test7')).webkitTextOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test8')).webkitTextOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test9')).webkitTextOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test10')).webkitTextOrientation is "mixed"
+PASS window.getComputedStyle(document.getElementById('test11')).webkitTextOrientation is "sideways"
+PASS window.getComputedStyle(document.getElementById('test12')).webkitTextOrientation is "mixed"
+PASS window.getComputedStyle(document.getElementById('test13')).webkitTextOrientation is "mixed"
+PASS window.getComputedStyle(document.getElementById('test14')).webkitTextOrientation is "sideways"
+PASS window.getComputedStyle(document.getElementById('test15')).webkitTextOrientation is "sideways"
+PASS window.getComputedStyle(document.getElementById('test16')).webkitTextOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test17')).webkitTextOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test18')).webkitTextOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test19')).webkitTextOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test20')).webkitTextOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test21')).webkitTextOrientation is "mixed"
+PASS window.getComputedStyle(document.getElementById('test22')).webkitTextOrientation is "sideways"
+PASS window.getComputedStyle(document.getElementById('test23')).webkitTextOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test24')).webkitTextOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test25')).webkitTextOrientation is "sideways"
+PASS window.getComputedStyle(document.getElementById('test26')).webkitTextOrientation is "sideways"
+PASS window.getComputedStyle(document.getElementById('test27')).webkitTextOrientation is "sideways"
+PASS window.getComputedStyle(document.getElementById('test1')).textOrientation is "sideways"
+PASS window.getComputedStyle(document.getElementById('test2')).textOrientation is "sideways"
+PASS window.getComputedStyle(document.getElementById('test3')).textOrientation is "sideways"
+PASS window.getComputedStyle(document.getElementById('test4')).textOrientation is "sideways"
+PASS window.getComputedStyle(document.getElementById('test5')).textOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test6')).textOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test7')).textOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test8')).textOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test9')).textOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test10')).textOrientation is "mixed"
+PASS window.getComputedStyle(document.getElementById('test11')).textOrientation is "sideways"
+PASS window.getComputedStyle(document.getElementById('test12')).textOrientation is "mixed"
+PASS window.getComputedStyle(document.getElementById('test13')).textOrientation is "mixed"
+PASS window.getComputedStyle(document.getElementById('test14')).textOrientation is "sideways"
+PASS window.getComputedStyle(document.getElementById('test15')).textOrientation is "sideways"
+PASS window.getComputedStyle(document.getElementById('test16')).textOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test17')).textOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test18')).textOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test19')).textOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test20')).textOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test21')).textOrientation is "mixed"
+PASS window.getComputedStyle(document.getElementById('test22')).textOrientation is "sideways"
+PASS window.getComputedStyle(document.getElementById('test23')).textOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test24')).textOrientation is "upright"
+PASS window.getComputedStyle(document.getElementById('test25')).textOrientation is "sideways"
+PASS window.getComputedStyle(document.getElementById('test26')).textOrientation is "sideways"
+PASS window.getComputedStyle(document.getElementById('test27')).textOrientation is "sideways"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/text/text-orientation-parse-stylesheet-expected.txt (0 => 259006)
--- trunk/LayoutTests/fast/text/text-orientation-parse-stylesheet-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/text/text-orientation-parse-stylesheet-expected.txt 2020-03-25 20:12:54 UTC (rev 259006)
@@ -0,0 +1,16 @@
+PASS document.getElementById('test1').sheet.cssRules[0].style.getPropertyValue('text-orientation') is "upright"
+PASS document.getElementById('test2').sheet.cssRules[0].style.getPropertyValue('text-orientation') is "upright"
+PASS document.getElementById('test3').sheet.cssRules[0].style.getPropertyValue('text-orientation') is "upright"
+PASS document.getElementById('test4').sheet.cssRules[0].style.getPropertyValue('text-orientation') is "mixed"
+PASS document.getElementById('test5').sheet.cssRules[0].style.getPropertyValue('text-orientation') is "mixed"
+PASS document.getElementById('test1').sheet.cssRules[0].style.getPropertyValue('-webkit-text-orientation') is "upright"
+PASS document.getElementById('test2').sheet.cssRules[0].style.getPropertyValue('-webkit-text-orientation') is "upright"
+PASS document.getElementById('test3').sheet.cssRules[0].style.getPropertyValue('-webkit-text-orientation') is "upright"
+PASS document.getElementById('test4').sheet.cssRules[0].style.getPropertyValue('-webkit-text-orientation') is "mixed"
+PASS document.getElementById('test5').sheet.cssRules[0].style.getPropertyValue('-webkit-text-orientation') is "mixed"
+PASS document.getElementById('test6').sheet.cssRules[0].style.getPropertyValue('-webkit-text-orientation') is "sideways"
+PASS document.getElementById('test6').sheet.cssRules[0].style.getPropertyValue('text-orientation') is "sideways"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/text/text-orientation-parse-stylesheet.html (0 => 259006)
--- trunk/LayoutTests/fast/text/text-orientation-parse-stylesheet.html (rev 0)
+++ trunk/LayoutTests/fast/text/text-orientation-parse-stylesheet.html 2020-03-25 20:12:54 UTC (rev 259006)
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src=""
+ </head>
+ <body>
+
+ <style id="test1"> dummy { text-orientation: upright; -webkit-text-orientation: sideways; text-orientation: upright;} </style>
+ <style id="test2"> dummy { text-orientation: upright;} </style>
+ <style id="test3"> dummy { -webkit-text-orientation: upright;} </style>
+ <style id="test4"> dummy { text-orientation: upright; -webkit-text-orientation: mixed;} </style>
+ <style id="test5"> dummy { -webkit-text-orientation: upright; text-orientation: mixed;} </style>
+ <style id="test6"> dummy { -webkit-text-orientation: upright; text-orientation: mixed; -webkit-text-orientation: sideways;} </style>
+
+ <script>
+ shouldBeEqualToString("document.getElementById('test1').sheet.cssRules[0].style.getPropertyValue('text-orientation')", "upright");
+ shouldBeEqualToString("document.getElementById('test2').sheet.cssRules[0].style.getPropertyValue('text-orientation')", "upright");
+ shouldBeEqualToString("document.getElementById('test3').sheet.cssRules[0].style.getPropertyValue('text-orientation')", "upright");
+ shouldBeEqualToString("document.getElementById('test4').sheet.cssRules[0].style.getPropertyValue('text-orientation')", "mixed");
+ shouldBeEqualToString("document.getElementById('test5').sheet.cssRules[0].style.getPropertyValue('text-orientation')", "mixed");
+
+ shouldBeEqualToString("document.getElementById('test1').sheet.cssRules[0].style.getPropertyValue('-webkit-text-orientation')", "upright");
+ shouldBeEqualToString("document.getElementById('test2').sheet.cssRules[0].style.getPropertyValue('-webkit-text-orientation')", "upright");
+ shouldBeEqualToString("document.getElementById('test3').sheet.cssRules[0].style.getPropertyValue('-webkit-text-orientation')", "upright");
+ shouldBeEqualToString("document.getElementById('test4').sheet.cssRules[0].style.getPropertyValue('-webkit-text-orientation')", "mixed");
+ shouldBeEqualToString("document.getElementById('test5').sheet.cssRules[0].style.getPropertyValue('-webkit-text-orientation')", "mixed");
+
+ shouldBeEqualToString("document.getElementById('test6').sheet.cssRules[0].style.getPropertyValue('-webkit-text-orientation')", "sideways");
+ shouldBeEqualToString("document.getElementById('test6').sheet.cssRules[0].style.getPropertyValue('text-orientation')", "sideways");
+
+
+ </script>
+
+ <script src=""
+ </body>
+</html>
Added: trunk/LayoutTests/fast/text/text-orientation-parse.html (0 => 259006)
--- trunk/LayoutTests/fast/text/text-orientation-parse.html (rev 0)
+++ trunk/LayoutTests/fast/text/text-orientation-parse.html 2020-03-25 20:12:54 UTC (rev 259006)
@@ -0,0 +1,137 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src=""
+ </head>
+ <body>
+ <div style="-webkit-writing-mode: vertical-rl; text-orientation: sideways;">
+ <div id="test1"></div>
+ <div id="test2" style="-webkit-writing-mode: vertical-rl; text-orientation: sideways;"></div>
+ <div id="test3" style="-webkit-writing-mode: vertical-rl; text-orientation: sideways;"></div>
+ <div id="test4" style="-webkit-writing-mode: vertical-rl; text-orientation: sideways;"></div>
+ <div id="test5" style="-webkit-writing-mode: vertical-rl; text-orientation: upright;">
+ <div id="test6"></div>
+ <div id="test7" style="text-orientation: upright;">
+ <div id="test8">
+ <div id="test9"></div>
+ </div>
+ <div id="test10" style="text-orientation: mixed;"></div>
+ </div>
+ </div>
+ <div id="test11" style="-webkit-text-orientation: upright; text-orientation: sideways;"></div>
+ </div>
+
+
+ <div id="test12" style="-webkit-writing-mode: vertical-rl;">
+ <div id="test13"></div>
+ </div>
+
+
+ <div style="-webkit-writing-mode: vertical-rl; -webkit-text-orientation: sideways;">
+ <div id="test14"></div>
+ <div id="test15" style="-webkit-writing-mode: vertical-rl; text-orientation: sideways;"></div>
+ <div id="test16" style="-webkit-writing-mode: vertical-rl; text-orientation: upright;">
+ <div id="test17"></div>
+ <div id="test18" style="text-orientation: upright;">
+ <div id="test19">
+ <div id="test20"></div>
+ </div>
+ <div id="test21" style="text-orientation: mixed;"></div>
+ </div>
+ <div id="test22" style="-webkit-text-orientation: upright; text-orientation: sideways;"></div>
+ </div>
+ </div>
+
+
+ <div style="-webkit-writing-mode: vertical-rl; -webkit-text-orientation: sideways; text-orientation: upright">
+ <div id="test23">
+ <div id="test24"></div>
+ </div>
+ </div>
+
+ <div id="test25" style="-webkit-writing-mode: vertical-rl; text-orientation: upright; -webkit-text-orientation: sideways;">
+ <div id="test26">
+ <div id="test27"></div>
+ </div>
+ </div>
+
+
+
+ <script>
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test1')).webkitTextOrientation", "sideways");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test2')).webkitTextOrientation", "sideways");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test3')).webkitTextOrientation", "sideways");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test4')).webkitTextOrientation", "sideways");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test5')).webkitTextOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test6')).webkitTextOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test7')).webkitTextOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test8')).webkitTextOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test9')).webkitTextOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test10')).webkitTextOrientation", "mixed");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test11')).webkitTextOrientation", "sideways");
+
+
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test12')).webkitTextOrientation", "mixed");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test13')).webkitTextOrientation", "mixed");
+
+
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test14')).webkitTextOrientation", "sideways");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test15')).webkitTextOrientation", "sideways");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test16')).webkitTextOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test17')).webkitTextOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test18')).webkitTextOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test19')).webkitTextOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test20')).webkitTextOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test21')).webkitTextOrientation", "mixed");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test22')).webkitTextOrientation", "sideways");
+
+
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test23')).webkitTextOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test24')).webkitTextOrientation", "upright");
+
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test25')).webkitTextOrientation", "sideways");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test26')).webkitTextOrientation", "sideways");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test27')).webkitTextOrientation", "sideways");
+
+
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test1')).textOrientation", "sideways");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test2')).textOrientation", "sideways");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test3')).textOrientation", "sideways");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test4')).textOrientation", "sideways");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test5')).textOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test6')).textOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test7')).textOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test8')).textOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test9')).textOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test10')).textOrientation", "mixed");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test11')).textOrientation", "sideways");
+
+
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test12')).textOrientation", "mixed");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test13')).textOrientation", "mixed");
+
+
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test14')).textOrientation", "sideways");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test15')).textOrientation", "sideways");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test16')).textOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test17')).textOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test18')).textOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test19')).textOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test20')).textOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test21')).textOrientation", "mixed");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test22')).textOrientation", "sideways");
+
+
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test23')).textOrientation", "upright");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test24')).textOrientation", "upright");
+
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test25')).textOrientation", "sideways");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test26')).textOrientation", "sideways");
+ shouldBeEqualToString("window.getComputedStyle(document.getElementById('test27')).textOrientation", "sideways");
+
+
+ </script>
+
+ <script src=""
+ </body>
+</html>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt (259005 => 259006)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt 2020-03-25 20:02:59 UTC (rev 259005)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt 2020-03-25 20:12:54 UTC (rev 259006)
@@ -244,6 +244,7 @@
PASS text-decoration-style
PASS text-decoration-thickness
PASS text-indent
+PASS text-orientation
PASS text-overflow
PASS text-rendering
PASS text-shadow
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/parsing/text-orientation-valid-expected.txt (259005 => 259006)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/parsing/text-orientation-valid-expected.txt 2020-03-25 20:02:59 UTC (rev 259005)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/parsing/text-orientation-valid-expected.txt 2020-03-25 20:12:54 UTC (rev 259006)
@@ -1,5 +1,5 @@
-FAIL e.style['text-orientation'] = "mixed" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['text-orientation'] = "upright" should set the property value assert_not_equals: property should be set got disallowed value ""
-FAIL e.style['text-orientation'] = "sideways" should set the property value assert_not_equals: property should be set got disallowed value ""
+PASS e.style['text-orientation'] = "mixed" should set the property value
+PASS e.style['text-orientation'] = "upright" should set the property value
+PASS e.style['text-orientation'] = "sideways" should set the property value
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/text-orientation-parsing-001-expected.txt (259005 => 259006)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/text-orientation-parsing-001-expected.txt 2020-03-25 20:02:59 UTC (rev 259005)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/text-orientation-parsing-001-expected.txt 2020-03-25 20:12:54 UTC (rev 259006)
@@ -1,10 +1,10 @@
-FAIL text-orientation initial value assert_equals: expected (string) "mixed" but got (undefined) undefined
-FAIL -webkit-text-orientation: upright assert_equals: expected (string) "upright" but got (undefined) undefined
-FAIL -webkit-text-orientation: sideways assert_equals: expected (string) "sideways" but got (undefined) undefined
-FAIL text-orientation should inherit assert_equals: expected (string) "upright" but got (undefined) undefined
-FAIL -webkit-text-orientation: mixed assert_equals: expected (string) "mixed" but got (undefined) undefined
-FAIL -webkit-text-orientation: initial assert_equals: expected (string) "mixed" but got (undefined) undefined
-FAIL -webkit-text-orientation: inherit assert_equals: expected (string) "upright" but got (undefined) undefined
-FAIL -webkit-text-orientation: foo assert_equals: expected (string) "upright" but got (undefined) undefined
+PASS text-orientation initial value
+PASS -webkit-text-orientation: upright
+PASS -webkit-text-orientation: sideways
+PASS text-orientation should inherit
+PASS -webkit-text-orientation: mixed
+PASS -webkit-text-orientation: initial
+PASS -webkit-text-orientation: inherit
+PASS -webkit-text-orientation: foo
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/text-orientation-parsing-sideways-right-001-expected.txt (259005 => 259006)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/text-orientation-parsing-sideways-right-001-expected.txt 2020-03-25 20:02:59 UTC (rev 259005)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/text-orientation-parsing-sideways-right-001-expected.txt 2020-03-25 20:12:54 UTC (rev 259006)
@@ -1,3 +1,3 @@
-FAIL -webkit-text-orientation: sideways-right assert_equals: expected (string) "sideways" but got (undefined) undefined
+PASS -webkit-text-orientation: sideways-right
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/svg/styling/required-properties-expected.txt (259005 => 259006)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/svg/styling/required-properties-expected.txt 2020-03-25 20:02:59 UTC (rev 259005)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/svg/styling/required-properties-expected.txt 2020-03-25 20:12:54 UTC (rev 259006)
@@ -67,7 +67,7 @@
PASS Property "text-decoration-line" is supported
PASS Property "text-decoration-style" is supported
PASS Property "text-indent" is supported
-FAIL Property "text-orientation" is supported assert_true: expected true got false
+PASS Property "text-orientation" is supported
PASS Property "text-overflow" is supported
PASS Property "text-rendering" is supported
FAIL Property "text-space-collapse" is supported assert_true: expected true got false
Modified: trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt (259005 => 259006)
--- trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt 2020-03-25 20:02:59 UTC (rev 259005)
+++ trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt 2020-03-25 20:12:54 UTC (rev 259006)
@@ -244,6 +244,7 @@
PASS text-decoration-style
PASS text-decoration-thickness
PASS text-indent
+PASS text-orientation
PASS text-overflow
PASS text-rendering
PASS text-shadow
Modified: trunk/Source/WebCore/ChangeLog (259005 => 259006)
--- trunk/Source/WebCore/ChangeLog 2020-03-25 20:02:59 UTC (rev 259005)
+++ trunk/Source/WebCore/ChangeLog 2020-03-25 20:12:54 UTC (rev 259006)
@@ -1,3 +1,62 @@
+2020-03-25 Frank Yang <guowei_y...@apple.com>
+
+ Unprefix -webkit-text-orientation
+ https://bugs.webkit.org/show_bug.cgi?id=196139
+
+ Reviewed by Myles C. Maxfield
+
+ In order to unprefix -webkit-text-orientation to be text-orientation,
+ a new property, "text-orientation" is added to CSSProperties.json.
+ I didn't use alias because the prefixed version still supports non-standard values,
+ and we want the unprefixed version to strictly follow the specs.
+ However only adding a new property is not enough because -webkit-text-orientation
+ is a high-priority property, and without extra logic, the CSS property
+ "last-one-wins" ordering rule cannot be enforced because high-priority properties
+ are applied to elements in the order they appear in the generated CSSPropertyNames.cpp file.
+ Therefore a codegen flag, "related-property" is added to both
+ -webkit-text-orientation and text-orientation to point to each other,
+ so that when applying high priorities, the algorithm will know that the
+ two properties are modifying the same style of the element (in our case, text orientation)
+ and thus the CSS property "last-one-wins" ordering rule will take effect.
+
+ This code change also helps future developments when we want to unprefix other high-priority properties.
+
+ Tests: fast/text/orientation-inheritance.html
+ fast/text/orientation-mixed-unprefix.html
+ fast/text/orientation-sideways-prefix-unprefix.html
+ fast/text/orientation-sideways-unprefix.html
+ fast/text/orientation-upright-unprefix.html
+ fast/text/test-orientation-parsing-001.html
+ fast/text/text-orientation-parse-competition.html
+ fast/text/text-orientation-parse.html
+ imported/w3c/web-platform-tests/css/css-writing-modes/text-orientation-parsing-001.html
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ - added support for parsing "text-orientation"
+ (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
+ - added a new RenderStyle, CSSPropertyTextOrientation
+ * css/CSSProperties.json:
+ - added a new codegen property, "related-property"
+ * css/makeprop.pl:
+ - added new rules for generating code to parse related properties
+ (addProperty):
+ - inserts new rule in the generated code to parse related properties
+ * css/parser/CSSParserFastPaths.cpp:
+ - Specified the CSS property values that the unprefixed "text-orientation" can take
+ (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
+ - Only supports the standard values for text-orientation
+ (WebCore::CSSParserFastPaths::isKeywordPropertyID):
+ - Added switch case value CSSPropertyTextOrientation
+ * css/parser/CSSParserImpl.cpp:
+ - Added rules to treat related properties differently
+ (WebCore::filterProperties):
+ - For related rules that are also high priority,
+ if we saw one in the property list, we will mark all the related property
+ as seen, in order to enforce the "last-one-wins" ordering rule
+ * style/StyleBuilderCustom.h:
+ (WebCore::Style::BuilderCustom::applyValueTextOrientation):
+ - added functionality to parse the newly added "text-orientation" property
+
2020-03-25 Simon Fraser <simon.fra...@apple.com>
Remove CompositingChangeRepaint which was always CompositingChangeRepaintNow
Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (259005 => 259006)
--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2020-03-25 20:02:59 UTC (rev 259005)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2020-03-25 20:12:54 UTC (rev 259006)
@@ -3504,6 +3504,8 @@
return cssValuePool.createValue(style.textCombine());
case CSSPropertyWebkitTextOrientation:
return CSSPrimitiveValue::create(style.textOrientation());
+ case CSSPropertyTextOrientation:
+ return CSSPrimitiveValue::create(style.textOrientation());
case CSSPropertyWebkitLineBoxContain:
return createLineBoxContainValue(style.lineBoxContain());
case CSSPropertyAlt:
Modified: trunk/Source/WebCore/css/CSSProperties.json (259005 => 259006)
--- trunk/Source/WebCore/css/CSSProperties.json 2020-03-25 20:02:59 UTC (rev 259005)
+++ trunk/Source/WebCore/css/CSSProperties.json 2020-03-25 20:12:54 UTC (rev 259006)
@@ -116,6 +116,13 @@
"Whether the property needs to be applied before non-high-priority properties",
"in CSS cascading order.",
"",
+ "* related-property:",
+ "Indicates the prefixed or unprefixed version of the same property,",
+ "e.g. -webkit-text-orientation has a related property text-orientation",
+ "When parsing high priority CSS properties with both prefixed and unprefixed",
+ "versions, this flig will help the parser to mark all related properties ",
+ "as seen when one is seen. This could enforce the 'last-one-wins' rule.",
+ "",
"* aliases:",
"An array of the alternative names for this property.",
"",
@@ -619,6 +626,23 @@
},
"status": "non-standard"
},
+ "text-orientation": {
+ "inherited": true,
+ "values": [
+ "sideways",
+ "mixed",
+ "upright"
+ ],
+ "codegen-properties": {
+ "custom": "Value",
+ "related-property": "-webkit-text-orientation",
+ "high-priority": true
+ },
+ "specification": {
+ "category": "css-writing-modes",
+ "url": "https://www.w3.org/TR/css-writing-modes-3/#text-orientation"
+ }
+ },
"-webkit-text-orientation": {
"inherited": true,
"values": [
@@ -638,6 +662,7 @@
"aliases": [
"-epub-text-orientation"
],
+ "related-property": "text-orientation",
"custom": "Value",
"high-priority": true
},
Modified: trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp (259005 => 259006)
--- trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp 2020-03-25 20:02:59 UTC (rev 259005)
+++ trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp 2020-03-25 20:12:54 UTC (rev 259006)
@@ -300,9 +300,14 @@
String PropertySetCSSStyleDeclaration::getPropertyValueInternal(CSSPropertyID propertyID)
{
String value = m_propertySet->getPropertyValue(propertyID);
+ CSSPropertyID relatedPropertyID = getRelatedPropertyId(propertyID);
+ String relatedValue = m_propertySet->getPropertyValue(relatedPropertyID);
+
if (!value.isEmpty())
return value;
-
+ if (!relatedValue.isEmpty())
+ return relatedValue;
+
return String();
}
Modified: trunk/Source/WebCore/css/makeprop.pl (259005 => 259006)
--- trunk/Source/WebCore/css/makeprop.pl 2020-03-25 20:02:59 UTC (rev 259005)
+++ trunk/Source/WebCore/css/makeprop.pl 2020-03-25 20:12:54 UTC (rev 259006)
@@ -85,6 +85,7 @@
);
my %nameToId;
my %nameToAliases;
+my %relatedProperty;
for my $name (@allNames) {
my $value = $propertiesHashRef->{$name};
@@ -193,6 +194,8 @@
next;
} elsif ($codegenOptionName eq "high-priority") {
$nameIsHighPriority{$name} = 1;
+ } elsif ($codegenOptionName eq "related-property") {
+ $relatedProperty{$name} = $codegenProperties->{"related-property"}
} elsif ($codegenOptionName eq "aliases") {
$nameToAliases{$name} = $codegenProperties->{"aliases"};
} elsif ($styleBuilderOptions{$codegenOptionName}) {
@@ -415,6 +418,24 @@
ASSERT(id != CSSPropertyInvalid);
return isInheritedPropertyTable[id];
}
+
+CSSPropertyID getRelatedPropertyId(CSSPropertyID id)
+{
+ switch(id) {
+EOF
+for my $name (@names) {
+ if (!$relatedProperty{$name}) {
+ next;
+ }
+ print GPERF " case CSSPropertyID::CSSProperty" . $nameToId{$name} . ":\n";
+ print GPERF " return CSSPropertyID::CSSProperty" . $nameToId{$relatedProperty{$name}} . ";\n";
+}
+
+print GPERF << "EOF";
+ default:
+ return CSSPropertyID::CSSPropertyInvalid;
+ }
+}
Vector<String> CSSProperty::aliasesForProperty(CSSPropertyID id)
{
@@ -531,6 +552,7 @@
const WTF::AtomString& getPropertyNameAtomString(CSSPropertyID id);
WTF::String getPropertyNameString(CSSPropertyID id);
WTF::String getJSPropertyName(CSSPropertyID);
+CSSPropertyID getRelatedPropertyId(CSSPropertyID id);
inline CSSPropertyID convertToCSSPropertyID(int value)
{
Modified: trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp (259005 => 259006)
--- trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp 2020-03-25 20:02:59 UTC (rev 259005)
+++ trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp 2020-03-25 20:12:54 UTC (rev 259006)
@@ -668,6 +668,8 @@
#endif
case CSSPropertyWebkitTextOrientation: // mixed | upright | sideways | sideways-right
return valueID == CSSValueMixed || valueID == CSSValueUpright || valueID == CSSValueSideways || valueID == CSSValueSidewaysRight;
+ case CSSPropertyTextOrientation:
+ return valueID == CSSValueMixed || valueID == CSSValueUpright || valueID == CSSValueSideways;
case CSSPropertyTextOverflow: // clip | ellipsis
return valueID == CSSValueClip || valueID == CSSValueEllipsis;
case CSSPropertyTextRendering: // auto | optimizeSpeed | optimizeLegibility | geometricPrecision
@@ -869,6 +871,7 @@
case CSSPropertyResize:
case CSSPropertyTableLayout:
case CSSPropertyTextAlign:
+ case CSSPropertyTextOrientation:
case CSSPropertyTextOverflow:
case CSSPropertyTextRendering:
case CSSPropertyTextTransform:
@@ -943,7 +946,6 @@
// case CSSPropertyTextCombineUpright:
// case CSSPropertyTextDecorationStyle:
// case CSSPropertyTextJustify:
- // case CSSPropertyTextOrientation:
// case CSSPropertyUserSelect:
#if ENABLE(CSS_TRAILING_WORD)
case CSSPropertyAppleTrailingWord:
Modified: trunk/Source/WebCore/css/parser/CSSParserImpl.cpp (259005 => 259006)
--- trunk/Source/WebCore/css/parser/CSSParserImpl.cpp 2020-03-25 20:02:59 UTC (rev 259005)
+++ trunk/Source/WebCore/css/parser/CSSParserImpl.cpp 2020-03-25 20:12:54 UTC (rev 259006)
@@ -123,9 +123,16 @@
// FIXME: Do we need to do anything here?
} */
+
if (seenProperties.test(propertyIDIndex))
continue;
- seenProperties.set(propertyIDIndex);
+ const unsigned relatedPropertyId = getRelatedPropertyId(property.id());
+ if (property.id() != CSSPropertyInvalid && relatedPropertyId != CSSPropertyInvalid) {
+ const unsigned relatedPropertyIDIndex = relatedPropertyId - firstCSSProperty;
+ seenProperties.set(relatedPropertyIDIndex);
+ seenProperties.set(propertyIDIndex);
+ } else
+ seenProperties.set(propertyIDIndex);
output[--unusedEntries] = property;
}
Modified: trunk/Source/WebCore/style/StyleBuilderCustom.h (259005 => 259006)
--- trunk/Source/WebCore/style/StyleBuilderCustom.h 2020-03-25 20:02:59 UTC (rev 259005)
+++ trunk/Source/WebCore/style/StyleBuilderCustom.h 2020-03-25 20:12:54 UTC (rev 259006)
@@ -133,6 +133,7 @@
static void applyValueTextAlign(BuilderState&, CSSValue&);
static void applyValueWebkitLocale(BuilderState&, CSSValue&);
static void applyValueWebkitTextOrientation(BuilderState&, CSSValue&);
+ static void applyValueTextOrientation(BuilderState&, CSSValue&);
#if ENABLE(TEXT_AUTOSIZING)
static void applyValueWebkitTextSizeAdjust(BuilderState&, CSSValue&);
#endif
@@ -757,6 +758,11 @@
builderState.setTextOrientation(downcast<CSSPrimitiveValue>(value));
}
+inline void BuilderCustom::applyValueTextOrientation(BuilderState& builderState, CSSValue& value)
+{
+ builderState.setTextOrientation(downcast<CSSPrimitiveValue>(value));
+}
+
#if ENABLE(TEXT_AUTOSIZING)
inline void BuilderCustom::applyValueWebkitTextSizeAdjust(BuilderState& builderState, CSSValue& value)
{
Modified: trunk/Tools/ChangeLog (259005 => 259006)
--- trunk/Tools/ChangeLog 2020-03-25 20:02:59 UTC (rev 259005)
+++ trunk/Tools/ChangeLog 2020-03-25 20:12:54 UTC (rev 259006)
@@ -1,3 +1,16 @@
+2020-03-25 Frank Yang <guowei_y...@apple.com>
+
+ Unprefix -webkit-text-orientation
+ https://bugs.webkit.org/show_bug.cgi?id=196139
+
+ Reviewed by Myles C. Maxfield.
+
+ This change is made to add the extra flag "related-property" in CSSProperty.json
+ in the jsonchecker so that the jsonchecker would not complain about unrecognized key
+
+ * Scripts/webkitpy/style/checkers/jsonchecker.py: added check for related-property
+ (JSONCSSPropertiesChecker.check_codegen_properties):
+
2020-03-25 Aakash Jain <aakash_j...@apple.com>
[ews] commit-queue should comment on bug if it fails to find any modified ChangeLog
Modified: trunk/Tools/Scripts/webkitpy/style/checkers/jsonchecker.py (259005 => 259006)
--- trunk/Tools/Scripts/webkitpy/style/checkers/jsonchecker.py 2020-03-25 20:02:59 UTC (rev 259005)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/jsonchecker.py 2020-03-25 20:12:54 UTC (rev 259006)
@@ -287,6 +287,7 @@
'longhands': self.validate_array,
'name-for-methods': self.validate_string,
'no-default-color': self.validate_boolean,
+ 'related-property': self.validate_string,
'runtime-flag': self.validate_string,
'setter': self.validate_string,
'skip-builder': self.validate_boolean,