Index: Source/WebCore/editing/FrameSelection.cpp |
=================================================================== |
--- Source/WebCore/editing/FrameSelection.cpp (revision 92966) |
+++ Source/WebCore/editing/FrameSelection.cpp (working copy) |
@@ -1431,14 +1431,14 @@ |
} |
} |
- Node* root = 0; |
+ RefPtr<Node> root = 0; |
Node* selectStartTarget = 0; |
if (isContentEditable()) { |
root = highestEditableRoot(m_selection.start()); |
if (Node* shadowRoot = m_selection.nonBoundaryShadowTreeRootNode()) |
selectStartTarget = shadowRoot->shadowAncestorNode(); |
else |
- selectStartTarget = root; |
+ selectStartTarget = root.get(); |
} else { |
root = m_selection.nonBoundaryShadowTreeRootNode(); |
if (root) |
@@ -1454,7 +1454,7 @@ |
if (selectStartTarget && !selectStartTarget->dispatchEvent(Event::create(eventNames().selectstartEvent, true, true))) |
return; |
- VisibleSelection newSelection(VisibleSelection::selectionFromContentsOfNode(root)); |
+ VisibleSelection newSelection(VisibleSelection::selectionFromContentsOfNode(root.get())); |
if (shouldChangeSelection(newSelection)) |
setSelection(newSelection); |