Changeset 259027 in webkit
- Timestamp:
- Mar 25, 2020 6:51:14 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r259026 r259027 1 2020-03-25 Jack Lee <shihchieh_lee@apple.com> 2 3 Nullptr crash in WebCore::Node::isDescendantOf when inserting list 4 https://bugs.webkit.org/show_bug.cgi?id=209529 5 <rdar://problem/60693542> 6 7 Reviewed by Darin Adler. 8 9 Added a regression test for the crash. 10 11 * editing/inserting/insert-list-during-node-removal-crash-expected.txt: Added. 12 * editing/inserting/insert-list-during-node-removal-crash.html: Added. 13 1 14 2020-03-25 Alexey Shvayka <shvaikalesh@gmail.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r259026 r259027 1 2020-03-25 Jack Lee <shihchieh_lee@apple.com> 2 3 Nullptr crash in WebCore::Node::isDescendantOf when inserting list 4 https://bugs.webkit.org/show_bug.cgi?id=209529 5 <rdar://problem/60693542> 6 7 Reviewed by Darin Adler. 8 9 The visible positions may be null if the DOM tree is altered before an edit command is applied. 10 Add null check for visible positions at the beginning of InsertListCommand::doApply. 11 12 Test: editing/inserting/insert-list-during-node-removal-crash.html 13 14 * editing/InsertListCommand.cpp: 15 (WebCore::InsertListCommand::doApply): 16 1 17 2020-03-25 Alexey Shvayka <shvaikalesh@gmail.com> 2 18 -
trunk/Source/WebCore/editing/InsertListCommand.cpp
r257536 r259027 113 113 void InsertListCommand::doApply() 114 114 { 115 if (endingSelection().isNoneOrOrphaned() || !endingSelection().isContentRichlyEditable())116 return;117 118 115 VisiblePosition visibleEnd = endingSelection().visibleEnd(); 119 116 VisiblePosition visibleStart = endingSelection().visibleStart(); 120 // When a selection ends at the start of a paragraph, we rarely paint 117 118 if (visibleEnd.isNull() || visibleStart.isNull() || !endingSelection().isContentRichlyEditable()) 119 return; 120 121 // When a selection ends at the start of a paragraph, we rarely paint 121 122 // the selection gap before that paragraph, because there often is no gap. 122 123 // In a case like this, it's not obvious to the user that the selection
Note: See TracChangeset
for help on using the changeset viewer.