-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
7 changed files
with
180 additions
and
1 deletion.
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
42 changes: 42 additions & 0 deletions
42
LayoutTests/editing/spelling/spelling-markers-in-overlapping-lines-expected.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
42 changes: 42 additions & 0 deletions
42
LayoutTests/editing/spelling/spelling-markers-in-overlapping-lines-large-font-expected.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
36 changes: 36 additions & 0 deletions
36
LayoutTests/editing/spelling/spelling-markers-in-overlapping-lines-large-font.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
36 changes: 36 additions & 0 deletions
36
LayoutTests/editing/spelling/spelling-markers-in-overlapping-lines.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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