Changeset 278002 in webkit
- Timestamp:
- May 25, 2021, 1:32:20 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/editing/paste-and-match-style-with-table-2-crash-expected.txt (added)
-
LayoutTests/fast/editing/paste-and-match-style-with-table-2-crash.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/editing/markup.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r278001 r278002 1 2021-05-25 Frederic Wang <fwang@igalia.com> 2 3 Crash in CompositeEditCommand::splitTreeToNode via InsertParagraphSeparatorCommand::doApply 4 https://bugs.webkit.org/show_bug.cgi?id=225267 5 6 Reviewed by Ryosuke Niwa. 7 8 Add regression test. 9 10 * fast/editing/paste-and-match-style-with-table-2-crash-expected.txt: Added. 11 * fast/editing/paste-and-match-style-with-table-2-crash.html: Added. 12 1 13 2021-05-25 Fujii Hironori <Hironori.Fujii@sony.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r278000 r278002 1 2021-05-25 Frederic Wang <fwang@igalia.com> 2 3 Crash in CompositeEditCommand::splitTreeToNode via InsertParagraphSeparatorCommand::doApply 4 https://bugs.webkit.org/show_bug.cgi?id=225267 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. In r273375, this was fixed for DOM elements with the table tag, but this does not work 12 for display: table. This patch instead directly calls isRenderedTable, for consistency with 13 WebCore::Position::upstream. 14 15 Test: fast/editing/paste-and-match-style-with-table-2-crash.html 16 17 * editing/markup.cpp: 18 (WebCore::createFragmentFromText): Use isRenderedTable instead of checking the tag name. 19 1 20 2021-05-25 Ian Gilbert <iang@apple.com> 2 21 -
trunk/Source/WebCore/editing/markup.cpp
r277967 r278002 1204 1204 && !block->hasTagName(htmlTag) 1205 1205 // Avoid using table as paragraphs due to its special treatment in Position::upstream/downstream. 1206 && ! block->hasTagName(tableTag)1206 && !isRenderedTable(block) 1207 1207 && block != editableRootForPosition(start); 1208 1208 bool useLineBreak = enclosingTextFormControl(start);
Note:
See TracChangeset
for help on using the changeset viewer.