Index: Source/core/dom/Range.cpp |
diff --git a/Source/core/dom/Range.cpp b/Source/core/dom/Range.cpp |
index 344fc42d6970d9be55a7631bed5187c8f9164b97..efb60dc7514901935b59d79379d444e23b5f03df 100644 |
--- a/Source/core/dom/Range.cpp |
+++ b/Source/core/dom/Range.cpp |
@@ -70,9 +70,9 @@ inline Range::Range(Document& ownerDocument) |
m_ownerDocument->attachRange(this); |
} |
-PassRefPtrWillBeRawPtr<Range> Range::create(Document& ownerDocument) |
+PassRefPtrWillBeRawPtr<Range> Range::create(ExecutionContext* executionContext) |
{ |
- return adoptRefWillBeNoop(new Range(ownerDocument)); |
+ return adoptRefWillBeNoop(new Range(*toDocument(executionContext))); |
} |
inline Range::Range(Document& ownerDocument, Node* startContainer, int startOffset, Node* endContainer, int endOffset) |
@@ -93,14 +93,14 @@ inline Range::Range(Document& ownerDocument, Node* startContainer, int startOffs |
setEnd(endContainer, endOffset); |
} |
-PassRefPtrWillBeRawPtr<Range> Range::create(Document& ownerDocument, Node* startContainer, int startOffset, Node* endContainer, int endOffset) |
+PassRefPtrWillBeRawPtr<Range> Range::create(ExecutionContext* executionContext, Node* startContainer, int startOffset, Node* endContainer, int endOffset) |
{ |
- return adoptRefWillBeNoop(new Range(ownerDocument, startContainer, startOffset, endContainer, endOffset)); |
+ return adoptRefWillBeNoop(new Range(*toDocument(executionContext), startContainer, startOffset, endContainer, endOffset)); |
} |
-PassRefPtrWillBeRawPtr<Range> Range::create(Document& ownerDocument, const Position& start, const Position& end) |
+PassRefPtrWillBeRawPtr<Range> Range::create(ExecutionContext* executionContext, const Position& start, const Position& end) |
{ |
- return adoptRefWillBeNoop(new Range(ownerDocument, start.containerNode(), start.computeOffsetInContainerNode(), end.containerNode(), end.computeOffsetInContainerNode())); |
+ return adoptRefWillBeNoop(new Range(*toDocument(executionContext), start.containerNode(), start.computeOffsetInContainerNode(), end.containerNode(), end.computeOffsetInContainerNode())); |
} |
Range::~Range() |