Commit 7c7310e
Crash in ReplaceSelectionCommand::mergeEndIfNeeded()
https://bugs.webkit.org/show_bug.cgi?id=224587
Patch by Julian Gonzalez <julian_a_gonzalez@apple.com> on 2021-04-15
Reviewed by Ryosuke Niwa.
Source/WebCore:
Return early in mergeEndIfNeeded() if either of our VisiblePositions are null.
Test: editing/inserting/insert-horizontal-rule-with-style-crash.html
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::mergeEndIfNeeded):
LayoutTests:
Add a test to catch the editing crash fixed here; thanks to Tuomas Karkkainen
for its basic structure and Ryosuke Niwa for some fixes.
* editing/inserting/insert-horizontal-rule-with-style-crash-expected.txt: Added.
* editing/inserting/insert-horizontal-rule-with-style-crash.html: Added.
Canonical link: https://commits.webkit.org/236591@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276078 268f45cc-cd09-0410-ab3c-d52691b4dbfc1 parent 2db19c4 commit 7c7310e
5 files changed
Lines changed: 56 additions & 0 deletions
File tree
- LayoutTests
- editing/inserting
- Source/WebCore
- editing
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
1 | 14 | | |
2 | 15 | | |
3 | 16 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
1 | 15 | | |
2 | 16 | | |
3 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
990 | 990 | | |
991 | 991 | | |
992 | 992 | | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
993 | 997 | | |
994 | 998 | | |
995 | 999 | | |
| |||
0 commit comments