Diff
Modified: trunk/LayoutTests/ChangeLog (223844 => 223845)
--- trunk/LayoutTests/ChangeLog 2017-10-23 17:56:41 UTC (rev 223844)
+++ trunk/LayoutTests/ChangeLog 2017-10-23 18:10:15 UTC (rev 223845)
@@ -1,3 +1,19 @@
+2017-10-23 Daniel Bates <[email protected]>
+
+ Add tests to ensure spelling error dots are drawn in the correct place in bottom-to-top
+ and right-to-left writing modes
+ https://bugs.webkit.org/show_bug.cgi?id=178671
+
+ Reviewed by Simon Fraser.
+
+ * fast/writing-mode/english-bt-text-with-spelling-marker-expected.html: Added.
+ * fast/writing-mode/english-bt-text-with-spelling-marker.html: Added.
+ * fast/writing-mode/english-rl-text-with-spelling-marker-expected.html: Added.
+ * fast/writing-mode/english-rl-text-with-spelling-marker.html: Added.
+ * platform/ios/TestExpectations: Skip the test on iOS as it does not support spelling and grammar
+ marker painting.
+ * platform/mac-wk2/TestExpectations: Mark the test as an image failure until we fix <https://bugs.webkit.org/show_bug.cgi?id=105616>.
+
2017-10-22 Dean Jackson <[email protected]>
Implement drawImage(ImageBitmap) on 2d canvas
Added: trunk/LayoutTests/fast/writing-mode/english-bt-text-with-spelling-marker-expected.html (0 => 223845)
--- trunk/LayoutTests/fast/writing-mode/english-bt-text-with-spelling-marker-expected.html (rev 0)
+++ trunk/LayoutTests/fast/writing-mode/english-bt-text-with-spelling-marker-expected.html 2017-10-23 18:10:15 UTC (rev 223845)
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+ font-family: Ahem;
+ src: url("../../resources/Ahem.ttf");
+}
+
+#expected {
+ display: inline-block;
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 200px;
+ font: 20px/1 Ahem;
+}
+</style>
+</head>
+<body>
+<div id="expected" contenteditable="true"></div>
+<script>
+var expected = document.getElementById("expected");
+
+// When inserting multiple words we need to type each character in order for the spell checker to be triggered.
+typeText("mispelled a", expected);
+
+function typeText(text, element)
+{
+ element.focus();
+ for (var i = 0; i < text.length; ++i)
+ document.execCommand("InsertText", false, text[i]);
+ element.blur();
+}
+</script>
+</body>
+</html>
Added: trunk/LayoutTests/fast/writing-mode/english-bt-text-with-spelling-marker.html (0 => 223845)
--- trunk/LayoutTests/fast/writing-mode/english-bt-text-with-spelling-marker.html (rev 0)
+++ trunk/LayoutTests/fast/writing-mode/english-bt-text-with-spelling-marker.html 2017-10-23 18:10:15 UTC (rev 223845)
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+ font-family: Ahem;
+ src: url("../../resources/Ahem.ttf");
+}
+
+body {
+ -webkit-writing-mode: horizontal-bt;
+ font: 20px/1 Ahem;
+}
+
+#test {
+ display: inline-block;
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 200px;
+}
+</style>
+</head>
+<body>
+<div id="test" contenteditable="true"></div>
+<script>
+var test = document.getElementById("test");
+
+// When inserting multiple words we need to type each character in order for the spell checker to be triggered.
+typeText("a mispelled", test);
+
+function typeText(text, element)
+{
+ element.focus();
+ for (var i = 0; i < text.length; ++i)
+ document.execCommand("InsertText", false, text[i]);
+ element.blur();
+}
+</script>
+</body>
+</html>
Added: trunk/LayoutTests/fast/writing-mode/english-rl-text-with-spelling-marker-expected.html (0 => 223845)
--- trunk/LayoutTests/fast/writing-mode/english-rl-text-with-spelling-marker-expected.html (rev 0)
+++ trunk/LayoutTests/fast/writing-mode/english-rl-text-with-spelling-marker-expected.html 2017-10-23 18:10:15 UTC (rev 223845)
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+ font-family: Ahem;
+ src: url("../../resources/Ahem.ttf");
+}
+
+#expected {
+ display: inline-block;
+ position: absolute;
+ left: 0;
+ top: 0;
+ font: 20px/1 Ahem;
+ width: 200px;
+ transform: translate(-90px, 90px) rotate(90deg);
+}
+</style>
+</head>
+<body>
+<div id="expected" contenteditable="true"></div>
+<script>
+var expected = document.getElementById("expected");
+expected.focus();
+document.execCommand("InsertText", false, "mispelled");
+document.execCommand("InsertText", false, " "); // Trigger spell checking
+expected.blur();
+</script>
+</body>
+</html>
Added: trunk/LayoutTests/fast/writing-mode/english-rl-text-with-spelling-marker.html (0 => 223845)
--- trunk/LayoutTests/fast/writing-mode/english-rl-text-with-spelling-marker.html (rev 0)
+++ trunk/LayoutTests/fast/writing-mode/english-rl-text-with-spelling-marker.html 2017-10-23 18:10:15 UTC (rev 223845)
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+ font-family: Ahem;
+ src: url("../../resources/Ahem.ttf");
+}
+
+body {
+ -webkit-writing-mode: vertical-rl;
+ font: 20px/1 Ahem;
+}
+
+#test {
+ display: inline-block;
+ position: absolute;
+ left: 0;
+ top: 0;
+ height: 200px;
+}
+</style>
+</head>
+<body>
+<div id="test" contenteditable="true"></div>
+<script>
+var test = document.getElementById("test");
+test.focus();
+document.execCommand("InsertText", false, "mispelled");
+document.execCommand("InsertText", false, " "); // Trigger spell checking
+test.blur();
+</script>
+</body>
+</html>
Modified: trunk/LayoutTests/platform/ios/TestExpectations (223844 => 223845)
--- trunk/LayoutTests/platform/ios/TestExpectations 2017-10-23 17:56:41 UTC (rev 223844)
+++ trunk/LayoutTests/platform/ios/TestExpectations 2017-10-23 18:10:15 UTC (rev 223845)
@@ -98,6 +98,8 @@
editing/spelling/spelling-marker-includes-hyphen.html [ WontFix ]
editing/spelling/spelling-markers-in-overlapping-lines.html [ WontFix ]
editing/spelling/spelling-markers-in-overlapping-lines-large-font.html [ WontFix ]
+fast/writing-mode/english-bt-text-with-spelling-marker.html [ WontFix ]
+fast/writing-mode/english-rl-text-with-spelling-marker.html [ WontFix ]
# Plugins are not supported on iOS
plugins
Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (223844 => 223845)
--- trunk/LayoutTests/platform/mac-wk2/TestExpectations 2017-10-23 17:56:41 UTC (rev 223844)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations 2017-10-23 18:10:15 UTC (rev 223845)
@@ -211,6 +211,8 @@
webkit.org/b/105616 editing/spelling/spelling-marker-includes-hyphen.html [ ImageOnlyFailure ]
webkit.org/b/105616 editing/spelling/spelling-markers-in-overlapping-lines.html [ ImageOnlyFailure ]
webkit.org/b/105616 editing/spelling/spelling-markers-in-overlapping-lines-large-font.html [ ImageOnlyFailure ]
+webkit.org/b/105616 fast/writing-mode/english-bt-text-with-spelling-marker.html [ ImageOnlyFailure ]
+webkit.org/b/105616 fast/writing-mode/english-rl-text-with-spelling-marker.html [ ImageOnlyFailure ]
# [WK2] [Mac] Support drag in mouse events for WebKit2 EventSender
# <https://bugs.webkit.org/show_bug.cgi?id=68552>