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

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

Issue 340763003: Change [ConstructorCallWith={Document => ExecutionContext}] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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: 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()

Powered by Google App Engine
This is Rietveld 408576698