Changeset 269946 in webkit
- Timestamp:
- Nov 18, 2020 12:28:02 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r269942 r269946 1 2020-11-18 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 Release assertion failure in Optional<WebCore::SimpleRange>::operator* via CompositeEditCommand::moveParagraphs 4 https://bugs.webkit.org/show_bug.cgi?id=218494 5 6 Reviewed by Ryosuke Niwa. 7 8 * editing/inserting/insert-list-with-body-child-crash-expected.txt: Added. 9 * editing/inserting/insert-list-with-body-child-crash.html: Added. 10 1 11 2020-11-17 Lauro Moura <lmoura@igalia.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r269944 r269946 1 2020-11-18 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 Release assertion failure in Optional<WebCore::SimpleRange>::operator* via CompositeEditCommand::moveParagraphs 4 https://bugs.webkit.org/show_bug.cgi?id=218494 5 6 Reviewed by Ryosuke Niwa. 7 8 This is happening when insert list command is called for a list item containing a body element as a child. When 9 the tree is iterated looking for the end position, the body element selected as candidate, but a null position 10 is returned because it's considered to be in a different editing element. This happens because 11 Node::rootEditableElement() always returns the node itseld for body elements, but it should actually check that 12 the node is the document body. 13 14 Test: editing/inserting/insert-list-with-body-child-crash.html 15 16 * dom/Node.cpp: 17 (WebCore::Node::isRootEditableElement const): Check node is the document body, not just a body element. 18 (WebCore::Node::rootEditableElement const): Ditto. 19 * editing/CompositeEditCommand.cpp: 20 (WebCore::CompositeEditCommand::moveParagraphs): Add an assert to ensure it's not called with a null endOfParagraphToMove. 21 1 22 2020-11-17 Said Abou-Hallawa <said@apple.com> 2 23 -
trunk/Source/WebCore/dom/Node.cpp
r269568 r269946 1328 1328 { 1329 1329 return hasEditableStyle() && isElementNode() && (!parentNode() || !parentNode()->hasEditableStyle() 1330 || !parentNode()->isElementNode() || hasTagName(bodyTag));1330 || !parentNode()->isElementNode() || document().body() == this); 1331 1331 } 1332 1332 … … 1337 1337 if (is<Element>(*node)) 1338 1338 result = downcast<Element>(node); 1339 if ( is<HTMLBodyElement>(*node))1339 if (document().body() == node) 1340 1340 break; 1341 1341 } -
trunk/Source/WebCore/editing/CompositeEditCommand.cpp
r269894 r269946 1401 1401 return; 1402 1402 1403 ASSERT((startOfParagraphToMove.isNull() && endOfParagraphToMove.isNull()) || !endOfParagraphToMove.isNull()); 1404 1403 1405 Optional<uint64_t> startIndex; 1404 1406 Optional<uint64_t> endIndex;
Note: See TracChangeset
for help on using the changeset viewer.