Changeset 190835 in webkit
- Timestamp:
- Oct 9, 2015 7:53:53 PM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r190834 r190835 1 2015-10-09 Zalan Bujtas <zalan@apple.com> 2 3 Check if start and end positions are still valid after updating them through VisibleSelection. 4 https://bugs.webkit.org/show_bug.cgi?id=149982 5 6 Reviewed by Ryosuke Niwa. 7 8 This patch is required to be able to clean up anonymous tables structure. 9 In certain edge cases, start/end positions could become nullptr after various text splitting 10 operations. 11 12 Covered by editing/execCommand/crash-137961.html 13 14 * editing/ApplyStyleCommand.cpp: 15 (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): 16 (WebCore::ApplyStyleCommand::applyInlineStyle): 17 1 18 2015-10-09 Simon Fraser <simon.fraser@apple.com> 2 19 -
trunk/Source/WebCore/editing/ApplyStyleCommand.cpp
r190634 r190835 340 340 } 341 341 342 if (start.isNull() || end.isNull()) 343 return; 344 342 345 if (isValidCaretPositionInTextNode(end)) { 343 346 splitTextAtEnd(start, end); … … 345 348 end = endPosition(); 346 349 } 350 351 if (start.isNull() || end.isNull()) 352 return; 347 353 348 354 // Calculate loop end point. … … 587 593 } 588 594 595 if (start.isNull() || end.isNull()) 596 return; 597 589 598 // split the end node and containing element if the selection ends inside of it 590 599 bool splitEnd = isValidCaretPositionInTextNode(end); … … 598 607 endDummySpanAncestor = dummySpanAncestorForNode(end.deprecatedNode()); 599 608 } 609 610 if (start.isNull() || end.isNull()) 611 return; 600 612 601 613 // Remove style from the selection. … … 650 662 end = endPosition(); 651 663 } 664 665 if (start.isNull() || end.isNull()) 666 return; 652 667 653 668 // update document layout once before running the rest of the function
Note: See TracChangeset
for help on using the changeset viewer.