Changeset 285764 in webkit
- Timestamp:
- Nov 12, 2021, 5:16:04 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/editing/execCommand/default-paragraph-separator-crash-expected.txt (added)
-
LayoutTests/editing/execCommand/default-paragraph-separator-crash.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/editing/ReplaceNodeWithSpanCommand.cpp (modified) (1 diff)
-
Source/WebCore/editing/ReplaceSelectionCommand.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r285747 r285764 1 2021-11-12 Rob Buis <rbuis@igalia.com> 2 3 Null check m_spanElement 4 https://bugs.webkit.org/show_bug.cgi?id=230894 5 6 Reviewed by Wenson Hsieh. 7 8 * editing/execCommand/default-paragraph-separator-crash-expected.txt: Added. 9 * editing/execCommand/default-paragraph-separator-crash.html: Added. 10 1 11 2021-11-12 Chris Dumez <cdumez@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r285747 r285764 1 2021-11-12 Rob Buis <rbuis@igalia.com> 2 3 Null check m_spanElement 4 https://bugs.webkit.org/show_bug.cgi?id=230894 5 6 Reviewed by Wenson Hsieh. 7 8 Null check m_spanElement in ReplaceNodeWithSpanCommand::doUnapply, since 9 it may not be created by ReplaceNodeWithSpanCommand::doApply. 10 11 Test: editing/execCommand/default-paragraph-separator-crash.html 12 13 * editing/ReplaceNodeWithSpanCommand.cpp: 14 (WebCore::ReplaceNodeWithSpanCommand::doUnapply): 15 * editing/ReplaceSelectionCommand.cpp: 16 (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder): 17 1 18 2021-11-12 Chris Dumez <cdumez@apple.com> 2 19 -
trunk/Source/WebCore/editing/ReplaceNodeWithSpanCommand.cpp
r277382 r285764 69 69 void ReplaceNodeWithSpanCommand::doUnapply() 70 70 { 71 if (!m_spanElement ->isConnected())71 if (!m_spanElement || !m_spanElement->isConnected()) 72 72 return; 73 73 swapInNodePreservingAttributesAndChildren(m_elementToReplace, *m_spanElement); -
trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp
r282860 r285764 796 796 continue; 797 797 798 if (!node->isConnected()) 799 continue; 800 798 801 if (isProhibitedParagraphChild(downcast<HTMLElement>(*node).localName())) { 799 802 if (RefPtr paragraphElement = enclosingElementWithTag(positionInParentBeforeNode(node.get()), pTag)) { 800 803 RefPtr parent { paragraphElement->parentNode() }; 801 if (parent && parent->hasEditableStyle()) 804 if (parent && parent->hasEditableStyle()) { 802 805 moveNodeOutOfAncestor(*node, *paragraphElement, insertedNodes); 806 if (!node->isConnected()) 807 continue; 808 } 803 809 } 804 810 }
Note:
See TracChangeset
for help on using the changeset viewer.