Changeset 276558 in webkit
- Timestamp:
- Apr 24, 2021, 3:31:57 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/TestExpectations (modified) (1 diff)
-
LayoutTests/editing/pasteboard/paste-as-quotation-then-paste-crash-expected.txt (added)
-
LayoutTests/editing/pasteboard/paste-as-quotation-then-paste-crash.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/editing/BreakBlockquoteCommand.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r276549 r276558 1 2021-04-24 Julian Gonzalez <julian_a_gonzalez@apple.com> 2 3 Crash in BreakBlockquoteCommand::doApply() 4 https://bugs.webkit.org/show_bug.cgi?id=224941 5 6 Reviewed by Ryosuke Niwa. 7 8 Add test for this crash, running only on Release for now. 9 Thanks to Tuomas Karkkainen for its basic structure. 10 11 * TestExpectations: 12 * editing/pasteboard/paste-as-quotation-then-paste-crash-expected.txt: Added. 13 * editing/pasteboard/paste-as-quotation-then-paste-crash.html: Added. 14 1 15 2021-04-24 Zalan Bujtas <zalan@apple.com> 2 16 -
trunk/LayoutTests/TestExpectations
r276520 r276558 1745 1745 webkit.org/b/139634 [ Debug ] fast/selectors/nth-child-of-register-requirement.html [ Slow ] 1746 1746 webkit.org/b/139634 [ Debug ] fast/selectors/not-backtracking.html [ Slow ] 1747 1748 webkit.org/b/224941 [ Debug ] editing/pasteboard/paste-as-quotation-then-paste-crash.html [ WontFix ] 1747 1749 1748 1750 webkit.org/b/61932 [ Debug ] jquery/manipulation.html [ Slow ] -
trunk/Source/WebCore/ChangeLog
r276554 r276558 1 2021-04-24 Julian Gonzalez <julian_a_gonzalez@apple.com> 2 3 Crash in BreakBlockquoteCommand::doApply() 4 https://bugs.webkit.org/show_bug.cgi?id=224941 5 6 Reviewed by Ryosuke Niwa. 7 8 Despite assertions to the contrary, it is possible for there not to be any node 9 to move into the new blockquote in BreakBlockquoteCommand::doApply() as a result 10 of layout updates, so remove the assertions and handle this case. 11 12 Test: editing/pasteboard/paste-as-quotation-then-paste-crash.html 13 14 * editing/BreakBlockquoteCommand.cpp: 15 (WebCore::BreakBlockquoteCommand::doApply): 16 1 17 2021-04-24 Antoine Quint <graouts@webkit.org> 2 18 -
trunk/Source/WebCore/editing/BreakBlockquoteCommand.cpp
r266557 r276558 110 110 Text& textNode = downcast<Text>(*startNode); 111 111 if ((unsigned)pos.deprecatedEditingOffset() >= textNode.length()) { 112 startNode = NodeTraversal::next(*startNode);113 ASSERT(startNode);112 if (auto* nextNode = NodeTraversal::next(*startNode)) 113 startNode = nextNode; 114 114 } else if (pos.deprecatedEditingOffset() > 0) 115 115 splitTextNode(textNode, pos.deprecatedEditingOffset()); 116 116 } else if (pos.deprecatedEditingOffset() > 0) { 117 Node* childAtOffset = startNode->traverseToChildAt(pos.deprecatedEditingOffset()); 118 startNode = childAtOffset ? childAtOffset : NodeTraversal::next(*startNode); 119 ASSERT(startNode); 117 if (auto* child = startNode->traverseToChildAt(pos.deprecatedEditingOffset())) 118 startNode = child; 119 else if (auto* next = NodeTraversal::next(*startNode)) 120 startNode = next; 120 121 } 121 122
Note:
See TracChangeset
for help on using the changeset viewer.