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

Unified Diff: third_party/WebKit/Source/core/editing/DOMSelection.h

Issue 2653523003: Make DOMSelection cache Range (Closed)
Patch Set: nit 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/DOMSelection.h
diff --git a/third_party/WebKit/Source/core/editing/DOMSelection.h b/third_party/WebKit/Source/core/editing/DOMSelection.h
index b1a7dac6852f785659929563034e230bb7cd12b9..fa2cf7e9e7abc97637ba4692f5d6b3a895c3a6f3 100644
--- a/third_party/WebKit/Source/core/editing/DOMSelection.h
+++ b/third_party/WebKit/Source/core/editing/DOMSelection.h
@@ -118,6 +118,13 @@ class CORE_EXPORT DOMSelection final : public GarbageCollected<DOMSelection>,
void addConsoleError(const String& message);
+ Range* createRangeFromSelectionEditor();
+
+ bool isSelectionOfDocument() const;
+ void cacheRangeIfSelectionOfDocument(Range*);
+ Range* documentCachedRange() const;
+ void clearCachedRangeIfSelectionOfDocument();
+
Member<const TreeScope> m_treeScope;
};

Powered by Google App Engine
This is Rietveld 408576698