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

Unified Diff: third_party/WebKit/Source/core/dom/TreeScope.cpp

Issue 2653523003: Make DOMSelection cache Range (Closed)
Patch Set: update 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/dom/TreeScope.cpp
diff --git a/third_party/WebKit/Source/core/dom/TreeScope.cpp b/third_party/WebKit/Source/core/dom/TreeScope.cpp
index 20c0f87fd42016a62c2ce63a050c633b8c3ad7d7..a1b82d1796088735b78ec988c323009e3e959592 100644
--- a/third_party/WebKit/Source/core/dom/TreeScope.cpp
+++ b/third_party/WebKit/Source/core/dom/TreeScope.cpp
@@ -304,6 +304,10 @@ SVGTreeScopeResources& TreeScope::ensureSVGTreeScopedResources() {
return *m_svgTreeScopedResources;
}
+bool TreeScope::hasSelection() const {
+ return rootNode().document().frame() && m_selection;
+}
+
DOMSelection* TreeScope::getSelection() const {
if (!rootNode().document().frame())
return nullptr;

Powered by Google App Engine
This is Rietveld 408576698