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

Unified Diff: Source/core/dom/Range.cpp

Issue 14904005: Make Range constructable (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update expectations Created 7 years, 7 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 | « Source/core/dom/Range.h ('k') | Source/core/dom/Range.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Range.cpp
diff --git a/Source/core/dom/Range.cpp b/Source/core/dom/Range.cpp
index d8f91c07e2ece6642d6963374d422b30306fb40d..5f9f8580e98539c70021b83ed2bb326d9ec54ccf 100644
--- a/Source/core/dom/Range.cpp
+++ b/Source/core/dom/Range.cpp
@@ -105,6 +105,11 @@ PassRefPtr<Range> Range::create(PassRefPtr<Document> ownerDocument, const Positi
return adoptRef(new Range(ownerDocument, start.containerNode(), start.computeOffsetInContainerNode(), end.containerNode(), end.computeOffsetInContainerNode()));
}
+PassRefPtr<Range> Range::create(ScriptExecutionContext* context)
+{
+ return adoptRef(new Range(toDocument(context)));
+}
+
Range::~Range()
{
// Always detach (even if we've already detached) to fix https://bugs.webkit.org/show_bug.cgi?id=26044
« no previous file with comments | « Source/core/dom/Range.h ('k') | Source/core/dom/Range.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698