Diff
Modified: trunk/LayoutTests/ChangeLog (223841 => 223842)
--- trunk/LayoutTests/ChangeLog 2017-10-23 17:35:23 UTC (rev 223841)
+++ trunk/LayoutTests/ChangeLog 2017-10-23 17:49:22 UTC (rev 223842)
@@ -1,3 +1,22 @@
+2017-10-23 Daniel Bates <daba...@apple.com>
+
+ Add tests to ensure spelling error dots are drawn in the correct place for overlapping lines
+ https://bugs.webkit.org/show_bug.cgi?id=178611
+ <rdar://problem/35105805>
+
+ Reviewed by Zalan Bujtas.
+
+ Add tests to ensure that we paint the spelling error dots in the correct place for
+ overlapping lines.
+
+ * editing/spelling/spelling-markers-in-overlapping-lines-expected.html: Added.
+ * editing/spelling/spelling-markers-in-overlapping-lines-large-font-expected.html: Added.
+ * editing/spelling/spelling-markers-in-overlapping-lines-large-font.html: Added.
+ * editing/spelling/spelling-markers-in-overlapping-lines.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-23 Zan Dobersek <zdober...@igalia.com>
Unreviewed WPE gardening. Unskip the SVG tests and generate the
Added: trunk/LayoutTests/editing/spelling/spelling-markers-in-overlapping-lines-expected.html (0 => 223842)
--- trunk/LayoutTests/editing/spelling/spelling-markers-in-overlapping-lines-expected.html (rev 0)
+++ trunk/LayoutTests/editing/spelling/spelling-markers-in-overlapping-lines-expected.html 2017-10-23 17:49:22 UTC (rev 223842)
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+ font-family: Ahem;
+ src: url("../../resources/Ahem.ttf");
+}
+
+body {
+ margin: 0;
+ padding: 0;
+ font: 20px/1 Ahem;
+}
+
+#first {
+ position: relative;
+ top: -5px;
+}
+
+#second {
+ position: relative;
+ top: -10px;
+}
+</style>
+</head>
+<body>
+<div id="first" contenteditable="true"></div>
+<div id="second" contenteditable="true"></div>
+<script>
+var first = document.getElementById("first");
+var second = document.getElementById("second");
+
+for (var element of [first, second]) {
+ element.focus();
+ document.execCommand("InsertText", false, "mispelled");
+ document.execCommand("InsertText", false, " "); // Trigger spell checking
+ element.blur();
+}
+</script>
+</body>
+</html>
Added: trunk/LayoutTests/editing/spelling/spelling-markers-in-overlapping-lines-large-font-expected.html (0 => 223842)
--- trunk/LayoutTests/editing/spelling/spelling-markers-in-overlapping-lines-large-font-expected.html (rev 0)
+++ trunk/LayoutTests/editing/spelling/spelling-markers-in-overlapping-lines-large-font-expected.html 2017-10-23 17:49:22 UTC (rev 223842)
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+ font-family: Ahem;
+ src: url("../../resources/Ahem.ttf");
+}
+
+body {
+ margin: 0;
+ padding: 0;
+ font: 40px/1 Ahem;
+}
+
+#first {
+ position: relative;
+ top: -10px;
+}
+
+#second {
+ position: relative;
+ top: -20px;
+}
+</style>
+</head>
+<body>
+<div id="first" contenteditable="true"></div>
+<div id="second" contenteditable="true"></div>
+<script>
+var first = document.getElementById("first");
+var second = document.getElementById("second");
+
+for (var element of [first, second]) {
+ element.focus();
+ document.execCommand("InsertText", false, "mispelled");
+ document.execCommand("InsertText", false, " "); // Trigger spell checking
+ element.blur();
+}
+</script>
+</body>
+</html>
Added: trunk/LayoutTests/editing/spelling/spelling-markers-in-overlapping-lines-large-font.html (0 => 223842)
--- trunk/LayoutTests/editing/spelling/spelling-markers-in-overlapping-lines-large-font.html (rev 0)
+++ trunk/LayoutTests/editing/spelling/spelling-markers-in-overlapping-lines-large-font.html 2017-10-23 17:49:22 UTC (rev 223842)
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+ font-family: Ahem;
+ src: url("../../resources/Ahem.ttf");
+}
+
+body {
+ margin: 0;
+ padding: 0;
+ font: 40px/1 Ahem;
+}
+
+#first {
+ line-height: 20px;
+}
+</style>
+</head>
+<body>
+<div id="first" contenteditable="true"></div>
+<div id="second" contenteditable="true"></div>
+<script>
+var first = document.getElementById("first");
+var second = document.getElementById("second");
+
+for (var element of [first, second]) {
+ element.focus();
+ document.execCommand("InsertText", false, "mispelled");
+ document.execCommand("InsertText", false, " "); // Trigger spell checking
+ element.blur();
+}
+</script>
+</body>
+</html>
Added: trunk/LayoutTests/editing/spelling/spelling-markers-in-overlapping-lines.html (0 => 223842)
--- trunk/LayoutTests/editing/spelling/spelling-markers-in-overlapping-lines.html (rev 0)
+++ trunk/LayoutTests/editing/spelling/spelling-markers-in-overlapping-lines.html 2017-10-23 17:49:22 UTC (rev 223842)
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+ font-family: Ahem;
+ src: url("../../resources/Ahem.ttf");
+}
+
+body {
+ margin: 0;
+ padding: 0;
+ font: 20px/1 Ahem;
+}
+
+#first {
+ line-height: 10px;
+}
+</style>
+</head>
+<body>
+<div id="first" contenteditable="true"></div>
+<div id="second" contenteditable="true"></div>
+<script>
+var first = document.getElementById("first");
+var second = document.getElementById("second");
+
+for (var element of [first, second]) {
+ element.focus();
+ document.execCommand("InsertText", false, "mispelled");
+ document.execCommand("InsertText", false, " "); // Trigger spell checking
+ element.blur();
+}
+</script>
+</body>
+</html>
Modified: trunk/LayoutTests/platform/ios/TestExpectations (223841 => 223842)
--- trunk/LayoutTests/platform/ios/TestExpectations 2017-10-23 17:35:23 UTC (rev 223841)
+++ trunk/LayoutTests/platform/ios/TestExpectations 2017-10-23 17:49:22 UTC (rev 223842)
@@ -95,7 +95,9 @@
fast/forms/file/file-input-capture.html
# Spelling and grammar markers are not supported
-webkit.org/b/105616 editing/spelling/spelling-marker-includes-hyphen.html [ WontFix ]
+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 ]
# Plugins are not supported on iOS
plugins
Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (223841 => 223842)
--- trunk/LayoutTests/platform/mac-wk2/TestExpectations 2017-10-23 17:35:23 UTC (rev 223841)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations 2017-10-23 17:49:22 UTC (rev 223842)
@@ -209,6 +209,8 @@
webkit.org/b/105616 editing/mac/spelling/accept-candidate-allows-autocorrect-on-next-word.html [ Failure ]
webkit.org/b/105616 editing/mac/spelling/accept-unseen-candidate-records-acceptance.html [ Failure ]
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 ]
# [WK2] [Mac] Support drag in mouse events for WebKit2 EventSender
# <https://bugs.webkit.org/show_bug.cgi?id=68552>