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

Unified Diff: third_party/WebKit/Source/core/editing/FrameSelection.cpp

Issue 2715913002: Introduce rootEditableElementOrTreeScopeRootNodeOf() as replacement of FrameSelection member (Closed)
Patch Set: 2017-02-24T16:18:33 Created 3 years, 10 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: third_party/WebKit/Source/core/editing/FrameSelection.cpp
diff --git a/third_party/WebKit/Source/core/editing/FrameSelection.cpp b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
index 700cbd2d9e2d56adb8eaa277361379a725114728..f3ab573283701a68f5963f6b16d5a25356681d79 100644
--- a/third_party/WebKit/Source/core/editing/FrameSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
@@ -139,15 +139,15 @@ Element* FrameSelection::rootEditableElementOrDocumentElement() const {
return selectionRoot ? selectionRoot : document().documentElement();
}
-ContainerNode* FrameSelection::rootEditableElementOrTreeScopeRootNode() const {
- Element* selectionRoot =
- computeVisibleSelectionInDOMTreeDeprecated().rootEditableElement();
+// TODO(yosin): We should move |rootEditableElementOrTreeScopeRootNodeOf()| to
+// "EditingUtilities.cpp"
+ContainerNode* rootEditableElementOrTreeScopeRootNodeOf(
+ const VisibleSelection& visibleSelection) {
+ Element* selectionRoot = visibleSelection.rootEditableElement();
if (selectionRoot)
return selectionRoot;
- Node* node = computeVisibleSelectionInDOMTreeDeprecated()
- .base()
- .computeContainerNode();
+ Node* const node = visibleSelection.base().computeContainerNode();
return node ? &node->treeScope().rootNode() : 0;
}

Powered by Google App Engine
This is Rietveld 408576698