Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Unified Diff: Source/WebCore/editing/FrameSelection.cpp

Issue 7640019: Merge 92966 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698