Changeset 238465 in webkit
- Timestamp:
- Nov 23, 2018 6:17:30 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r238464 r238465 1 2018-11-23 Ryosuke Niwa <rniwa@webkit.org> 2 3 REGRESSION (r236785): Nullptr crash in StyledMarkupAccumulator::traverseNodesForSerialization 4 https://bugs.webkit.org/show_bug.cgi?id=191921 5 6 Reviewed by Dean Jackson. 7 8 Added a regression test. 9 10 * editing/pasteboard/copy-paste-across-shadow-boundaries-5-expected.txt: Added. 11 * editing/pasteboard/copy-paste-across-shadow-boundaries-5.html: Added. 12 * platform/ios/editing/pasteboard/copy-paste-across-shadow-boundaries-5-expected.txt: Added. 13 1 14 2018-11-22 Ryosuke Niwa <rniwa@webkit.org> 2 15 -
trunk/Source/WebCore/ChangeLog
r238464 r238465 1 2018-11-23 Ryosuke Niwa <rniwa@webkit.org> 2 3 REGRESSION (r236785): Nullptr crash in StyledMarkupAccumulator::traverseNodesForSerialization 4 https://bugs.webkit.org/show_bug.cgi?id=191921 5 6 Reviewed by Dean Jackson. 7 8 The bug was caused by traverseNodesForSerialization not being able to traverse past the end of shadow root 9 when skipping children of a node for which enterNode returns false because it was using NodeTraversal's 10 nextSkippingChildren instead of a member function which supports traversing the composed tree. 11 12 Fixed the crash by using variant of nextSkippingChildren which knows how to traverse past the last node 13 in a shadow tree. Also added more assertions to help debug issues like this in the future. 14 15 Test: editing/pasteboard/copy-paste-across-shadow-boundaries-5.html 16 17 * editing/markup.cpp: 18 (WebCore::StyledMarkupAccumulator::traverseNodesForSerialization): 19 1 20 2018-11-22 Ryosuke Niwa <rniwa@webkit.org> 2 21 -
trunk/Source/WebCore/editing/markup.cpp
r237157 r238465 646 646 } 647 647 } 648 ASSERT(next || !pastEnd); 648 649 649 650 if (isBlock(n) && canHaveChildrenForEditing(*n) && next == pastEnd) { … … 653 654 654 655 if (!enterNode(*n)) { 655 next = NodeTraversal::nextSkippingChildren(*n);656 next = nextSkippingChildren(*n); 656 657 // Don't skip over pastEnd. 657 658 if (pastEnd && isDescendantOf(*pastEnd, *n)) 658 659 next = pastEnd; 660 ASSERT(next || !pastEnd); 659 661 } else { 660 662 if (!hasChildNodes(*n))
Note: See TracChangeset
for help on using the changeset viewer.