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

Unified Diff: Source/core/editing/VisibleSelection.cpp

Issue 23467007: Have Range constructor take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/editing/VisibleSelection.cpp
diff --git a/Source/core/editing/VisibleSelection.cpp b/Source/core/editing/VisibleSelection.cpp
index c11d1b90c52fd7bbcb96664b960f9dad9aa211a3..d36c6e6d91c83b17cacd5851a8422c17f998810c 100644
--- a/Source/core/editing/VisibleSelection.cpp
+++ b/Source/core/editing/VisibleSelection.cpp
@@ -133,7 +133,7 @@ PassRefPtr<Range> VisibleSelection::firstRange() const
return 0;
Position start = m_start.parentAnchoredEquivalent();
Position end = m_end.parentAnchoredEquivalent();
- return Range::create(&start.anchorNode()->document(), start, end);
+ return Range::create(start.anchorNode()->document(), start, end);
}
PassRefPtr<Range> VisibleSelection::toNormalizedRange() const
@@ -189,7 +189,7 @@ PassRefPtr<Range> VisibleSelection::toNormalizedRange() const
// VisibleSelections are supposed to always be valid. This constructor will ASSERT
// if a valid range could not be created, which is fine for this callsite.
- return Range::create(&s.anchorNode()->document(), s, e);
+ return Range::create(s.anchorNode()->document(), s, e);
}
bool VisibleSelection::expandUsingGranularity(TextGranularity granularity)
@@ -214,7 +214,7 @@ static PassRefPtr<Range> makeSearchRange(const Position& pos)
if (!boundary)
return 0;
- RefPtr<Range> searchRange(Range::create(&d));
+ RefPtr<Range> searchRange(Range::create(d));
TrackExceptionState es;
Position start(pos.parentAnchoredEquivalent());

Powered by Google App Engine
This is Rietveld 408576698