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

Unified Diff: sky/engine/core/editing/FrameSelection.cpp

Issue 928393003: Remove the concept of document.documentElement (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « sky/engine/core/editing/FrameSelection.h ('k') | sky/engine/core/editing/SpellChecker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/editing/FrameSelection.cpp
diff --git a/sky/engine/core/editing/FrameSelection.cpp b/sky/engine/core/editing/FrameSelection.cpp
index 17adda6653e46bfaed48b98494c0b8cb2e39b10e..d24777918cd696c10cae6c72018a6bd8224932d1 100644
--- a/sky/engine/core/editing/FrameSelection.cpp
+++ b/sky/engine/core/editing/FrameSelection.cpp
@@ -101,12 +101,6 @@ FrameSelection::~FrameSelection()
#endif
}
-Element* FrameSelection::rootEditableElementOrDocumentElement() const
-{
- Element* selectionRoot = m_selection.rootEditableElement();
- return selectionRoot ? selectionRoot : m_frame->document()->documentElement();
-}
-
ContainerNode* FrameSelection::rootEditableElementOrTreeScopeRootNode() const
{
Element* selectionRoot = m_selection.rootEditableElement();
@@ -1252,11 +1246,11 @@ void FrameSelection::selectAll()
selectStartTarget = root.get();
} else {
root = m_selection.nonBoundaryShadowTreeRootNode();
- if (root)
+ if (root) {
selectStartTarget = root->shadowHost();
- else {
- root = document->documentElement();
- selectStartTarget = document->documentElement();
+ } else {
+ root = document;
+ selectStartTarget = document;
}
}
if (!root)
« no previous file with comments | « sky/engine/core/editing/FrameSelection.h ('k') | sky/engine/core/editing/SpellChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698