Changeset 273375 in webkit
- Timestamp:
- Feb 24, 2021, 1:20:30 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/editing/paste-and-match-style-with-table-crash-expected.txt (added)
-
LayoutTests/fast/editing/paste-and-match-style-with-table-crash.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/editing/markup.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r273374 r273375 1 2021-02-24 Frederic Wang <fwang@igalia.com> 2 3 Nullptr crash in CompositeEditCommand::splitTreeToNode via InsertParagraphSeparatorCommand::doApply 4 https://bugs.webkit.org/show_bug.cgi?id=221387 5 6 Reviewed by Ryosuke Niwa. 7 8 * fast/editing/paste-and-match-style-with-table-crash-expected.txt: Added. 9 * fast/editing/paste-and-match-style-with-table-crash.html: Added. 10 1 11 2021-02-24 Carlos Garcia Campos <cgarcia@igalia.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r273374 r273375 1 2021-02-24 Frederic Wang <fwang@igalia.com> 2 3 Nullptr crash in CompositeEditCommand::splitTreeToNode via InsertParagraphSeparatorCommand::doApply 4 https://bugs.webkit.org/show_bug.cgi?id=221387 5 6 Reviewed by Ryosuke Niwa. 7 8 WebCore::Position::upstream behaves specially for table renderer, which may confuse the 9 execution of WebCore::InsertParagraphSeparatorCommand::doApply() when the visible position 10 is within a table, leading to a debug assertion failure and a nullptr dereference in release 11 build. This patch fixes that by forcing createFragmentFromText to convert <table> to new 12 a default paragraph element. 13 14 Test: fast/editing/paste-and-match-style-with-table-crash.html 15 16 * editing/markup.cpp: 17 (WebCore::createFragmentFromText): Don't clone enclosing block that are <table>. 18 1 19 2021-02-24 Carlos Garcia Campos <cgarcia@igalia.com> 2 20 -
trunk/Source/WebCore/editing/markup.cpp
r273058 r273375 1200 1200 && !block->hasTagName(bodyTag) 1201 1201 && !block->hasTagName(htmlTag) 1202 // Avoid using table as paragraphs due to its special treatment in Position::upstream/downstream. 1203 && !block->hasTagName(tableTag) 1202 1204 && block != editableRootForPosition(start); 1203 1205 bool useLineBreak = enclosingTextFormControl(start);
Note:
See TracChangeset
for help on using the changeset viewer.