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

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

Issue 2783103002: Dispose temporary and not-cached Range in DOMSelection
Patch Set: update Created 3 years, 9 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 150408b91fb4de31b6737a39e32c154fda96dd8f..b36dfbb8a36f2fb5a2de522217295f5de0885801 100644
--- a/third_party/WebKit/Source/core/editing/DOMSelection.h
+++ b/third_party/WebKit/Source/core/editing/DOMSelection.h
@@ -89,6 +89,11 @@ class CORE_EXPORT DOMSelection final : public GarbageCollected<DOMSelection>,
void collapseToEnd(ExceptionState&);
void collapseToStart(ExceptionState&);
void extend(Node*, unsigned offset, ExceptionState&);
+ // Selection.getRangeAt of document returns reference as spec:
+ // http://w3c.github.io/selection-api/#dom-selection-getrangeat
+ // However, Selection of shadow root returns copied Range everytime so far
+ // because no spec for this:
+ // https://w3c.github.io/webcomponents/spec/shadow/#ranges-and-selections
Range* getRangeAt(unsigned, ExceptionState&) const;
void removeRange(Range*);
void removeAllRanges();

Powered by Google App Engine
This is Rietveld 408576698