-
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.
Delete button doesn't fully delete certain emoji
https://bugs.webkit.org/show_bug.cgi?id=178096 <rdar://problem/34785106> Reviewed by Simon Fraser. Source/WebCore: System infrastructure for handling emoji changes every year. Instead of having custom code to specifically walk over codepoints, we should delegate to the system handling. Test: editing/deleting/delete-emoji.html * rendering/RenderText.cpp: (WebCore::RenderText::previousOffset const): (WebCore::RenderText::previousOffsetForBackwardDeletion const): (WebCore::RenderText::nextOffset const): (WebCore::isHangulLVT): Deleted. (WebCore::isMark): Deleted. (WebCore::isRegionalIndicator): Deleted. (WebCore::isInArmenianToLimbuRange): Deleted. LayoutTests: * editing/deleting/delete-emoji-2.html: * platform/mac/editing/deleting/delete-emoji-expected.txt: * platform/mac/editing/deleting/delete-emoji-2-expected.txt: * platform/ios/editing/deleting/delete-emoji-expected.txt: * platform/ios/editing/deleting/delete-emoji-2-expected.txt: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/194355@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223110 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
9 changed files
with
429 additions
and
366 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
<div id="test" contenteditable="true">🏴󠁧󠁢󠁥󠁮󠁧󠁿🏴󠁧󠁢󠁳󠁣󠁴󠁿🏴󠁧󠁢󠁷󠁬󠁳󠁿 | ||
</div> | ||
<script src="../../resources/dump-as-markup.js"></script> | ||
<script> | ||
Markup.description("This test verifies that deletions are correct over emoji groups and emoji with variations"); | ||
var testElement = document.getElementById('test'); | ||
getSelection().setBaseAndExtent(testElement.firstChild, testElement.firstChild.length, testElement.firstChild, testElement.firstChild.length); | ||
Markup.dump("test"); | ||
while (testElement.firstChild.length) { | ||
document.execCommand("Delete"); | ||
Markup.dump("test"); | ||
} | ||
|
||
</script> | ||
</body> | ||
</html> |
68 changes: 68 additions & 0 deletions
68
LayoutTests/platform/ios/editing/deleting/delete-emoji-2-expected.txt
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,68 @@ | ||
This test verifies that deletions are correct over emoji groups and emoji with variations | ||
|
||
Dump of markup 1: | ||
| "🏴🏴🏴<#selection-caret> | ||
" | ||
|
||
Dump of markup 2: | ||
| "🏴🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 3: | ||
| "🏴🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 4: | ||
| "🏴🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 5: | ||
| "🏴🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 6: | ||
| "🏴🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 7: | ||
| "🏴🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 8: | ||
| "🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 9: | ||
| "🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 10: | ||
| "🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 11: | ||
| "🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 12: | ||
| "🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 13: | ||
| "🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 14: | ||
| "🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 15: | ||
| "🏴<#selection-caret>" | ||
|
||
Dump of markup 16: | ||
| "🏴<#selection-caret>" | ||
|
||
Dump of markup 17: | ||
| "🏴<#selection-caret>" | ||
|
||
Dump of markup 18: | ||
| "🏴<#selection-caret>" | ||
|
||
Dump of markup 19: | ||
| "🏴<#selection-caret>" | ||
|
||
Dump of markup 20: | ||
| "🏴<#selection-caret>" | ||
|
||
Dump of markup 21: | ||
| "🏴<#selection-caret>" | ||
|
||
Dump of markup 22: | ||
| <br> |
214 changes: 113 additions & 101 deletions
214
LayoutTests/platform/ios/editing/deleting/delete-emoji-expected.txt
Large diffs are not rendered by default.
Oops, something went wrong.
68 changes: 68 additions & 0 deletions
68
LayoutTests/platform/mac/editing/deleting/delete-emoji-2-expected.txt
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,68 @@ | ||
This test verifies that deletions are correct over emoji groups and emoji with variations | ||
|
||
Dump of markup 1: | ||
| "🏴🏴🏴<#selection-caret> | ||
" | ||
|
||
Dump of markup 2: | ||
| "🏴🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 3: | ||
| "🏴🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 4: | ||
| "🏴🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 5: | ||
| "🏴🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 6: | ||
| "🏴🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 7: | ||
| "🏴🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 8: | ||
| "🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 9: | ||
| "🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 10: | ||
| "🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 11: | ||
| "🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 12: | ||
| "🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 13: | ||
| "🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 14: | ||
| "🏴🏴<#selection-caret>" | ||
|
||
Dump of markup 15: | ||
| "🏴<#selection-caret>" | ||
|
||
Dump of markup 16: | ||
| "🏴<#selection-caret>" | ||
|
||
Dump of markup 17: | ||
| "🏴<#selection-caret>" | ||
|
||
Dump of markup 18: | ||
| "🏴<#selection-caret>" | ||
|
||
Dump of markup 19: | ||
| "🏴<#selection-caret>" | ||
|
||
Dump of markup 20: | ||
| "🏴<#selection-caret>" | ||
|
||
Dump of markup 21: | ||
| "🏴<#selection-caret>" | ||
|
||
Dump of markup 22: | ||
| <br> |
Oops, something went wrong.