Changeset 274849 in webkit
- Timestamp:
- Mar 22, 2021, 11:23:57 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/editing/inserting/insert-paragraph-between-hr-and-br-assigned-to-slot-crash-expected.txt (added)
-
LayoutTests/editing/inserting/insert-paragraph-between-hr-and-br-assigned-to-slot-crash.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r274847 r274849 1 2021-03-22 Venky Dass <yaranamavenkataramana@apple.com> 2 3 Nullptr crash in WebCore::RenderObject::RenderObjectBitfields::isLineBreak() where a NULL check is missing. 4 https://bugs.webkit.org/show_bug.cgi?id=223409 5 6 Reviewed by Ryosuke Niwa. 7 8 Adding a regression test case. 9 10 * editing/inserting/insert-paragraph-between-hr-and-br-assigned-to-slot-crash-expected.txt: Added. 11 * editing/inserting/insert-paragraph-between-hr-and-br-assigned-to-slot-crash.html: Added. 12 1 13 2021-03-22 Julian Gonzalez <julian_a_gonzalez@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r274847 r274849 1 2021-03-22 Venky Dass <yaranamavenkataramana@apple.com> 2 3 Nullptr crash in WebCore::RenderObject::RenderObjectBitfields::isLineBreak() where a NULL check is missing. 4 https://bugs.webkit.org/show_bug.cgi?id=223409 5 6 Reviewed by Ryosuke Niwa. 7 8 When the check for LineBreak is performed the BR elmement NULL check is not performed. Which results in a crash 9 The fix therefore is to check for NULL. 10 11 Test: LayoutTests/editing/inserting/insert-paragraph-between-hr-and-br-assigned-to-slot-crash.html 12 13 * editing/InsertParagraphSeparatorCommand.cpp: 14 (WebCore::InsertParagraphSeparatorCommand::doApply): 15 1 16 2021-03-22 Julian Gonzalez <julian_a_gonzalez@apple.com> 2 17 -
trunk/Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp
r273330 r274849 314 314 // If the insertion point is a break element, there is nothing else 315 315 // we need to do. 316 if ( visiblePos.deepEquivalent().anchorNode()->renderer()->isBR()) {316 if (auto* renderer = visiblePos.deepEquivalent().anchorNode()->renderer(); renderer && renderer->isBR()) { 317 317 setEndingSelection(VisibleSelection(insertionPosition, Affinity::Downstream, endingSelection().isDirectional())); 318 318 return;
Note:
See TracChangeset
for help on using the changeset viewer.