Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add tests to ensure spelling error dots are drawn in the correct plac…
…e 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>. Canonical link: https://commits.webkit.org/194838@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
180 additions
and 1 deletion.
- +19 −0 LayoutTests/ChangeLog
- +42 −0 LayoutTests/editing/spelling/spelling-markers-in-overlapping-lines-expected.html
- +42 −0 LayoutTests/editing/spelling/spelling-markers-in-overlapping-lines-large-font-expected.html
- +36 −0 LayoutTests/editing/spelling/spelling-markers-in-overlapping-lines-large-font.html
- +36 −0 LayoutTests/editing/spelling/spelling-markers-in-overlapping-lines.html
- +3 −1 LayoutTests/platform/ios/TestExpectations
- +2 −0 LayoutTests/platform/mac-wk2/TestExpectations
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters