Index: Source/WebCore/editing/FrameSelection.cpp |
=================================================================== |
--- Source/WebCore/editing/FrameSelection.cpp (revision 92967) |
+++ Source/WebCore/editing/FrameSelection.cpp (working copy) |
@@ -1455,14 +1455,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) |
@@ -1478,7 +1478,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); |