Changeset 84320 in webkit
- Timestamp:
- Apr 19, 2011 5:23:51 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r84319 r84320 1 2011-04-19 Ryosuke Niwa <rniwa@webkit.org> 2 3 Reviewed by Ojan Vafai. 4 5 REGRESSION(r83967): Crash in selectionExtentRespectingEditingBoundary 6 https://bugs.webkit.org/show_bug.cgi?id=58910 7 8 The crash was caused by selectionExtentRespectingEditingBoundary's incorrectly assuming that 9 targetNode always have renderer when there selection has an editable root and the target node 10 is outside of the editable root. 11 12 Fixed the bug by adding an early exit when the target node is null. 13 14 No new tests are added since we don't have a reduction for this crash. 15 16 * page/EventHandler.cpp: 17 (WebCore::selectionExtentRespectingEditingBoundary): 18 1 19 2011-04-19 Geoffrey Garen <ggaren@apple.com> 2 20 -
trunk/Source/WebCore/page/EventHandler.cpp
r84217 r84320 627 627 IntPoint selectionEndPoint = localPoint; 628 628 Element* editableElement = selection.rootEditableElement(); 629 Node* selectionEndNode = targetNode; 629 630 if (!targetNode->renderer()) 631 return VisiblePosition(); 630 632 631 633 if (editableElement && !editableElement->contains(targetNode)) { 632 selectionEndNode = editableElement; 633 634 if (!selectionEndNode->renderer()) 634 if (!editableElement->renderer()) 635 635 return VisiblePosition(); 636 636 637 637 FloatPoint absolutePoint = targetNode->renderer()->localToAbsolute(FloatPoint(selectionEndPoint)); 638 selectionEndPoint = roundedIntPoint(selectionEndNode->renderer()->absoluteToLocal(absolutePoint)); 639 } 640 641 if (!selectionEndNode->renderer()) 642 return VisiblePosition(); 643 644 return selectionEndNode->renderer()->positionForPoint(selectionEndPoint); 638 selectionEndPoint = roundedIntPoint(editableElement->renderer()->absoluteToLocal(absolutePoint)); 639 targetNode = editableElement; 640 } 641 642 return targetNode->renderer()->positionForPoint(selectionEndPoint); 645 643 } 646 644
Note: See TracChangeset
for help on using the changeset viewer.