Index: Source/core/editing/TextIterator.cpp |
diff --git a/Source/core/editing/TextIterator.cpp b/Source/core/editing/TextIterator.cpp |
index 86b9e5e5e85ca30403561e3190d8ee83769cce3d..8559b107d4861b970c9c8f88a06ddf0b5ebdcb41 100644 |
--- a/Source/core/editing/TextIterator.cpp |
+++ b/Source/core/editing/TextIterator.cpp |
@@ -1050,12 +1050,12 @@ PassRefPtr<Range> TextIterator::range() const |
m_positionEndOffset += index; |
m_positionOffsetBaseNode = 0; |
} |
- return Range::create(&m_positionNode->document(), m_positionNode, m_positionStartOffset, m_positionNode, m_positionEndOffset); |
+ return Range::create(m_positionNode->document(), m_positionNode, m_positionStartOffset, m_positionNode, m_positionEndOffset); |
} |
// otherwise, return the end of the overall range we were given |
if (m_endContainer) |
- return Range::create(&m_endContainer->document(), m_endContainer, m_endOffset, m_endContainer, m_endOffset); |
+ return Range::create(m_endContainer->document(), m_endContainer, m_endOffset, m_endContainer, m_endOffset); |
return 0; |
} |
@@ -1351,9 +1351,9 @@ bool SimplifiedBackwardsTextIterator::advanceRespectingRange(Node* next) |
PassRefPtr<Range> SimplifiedBackwardsTextIterator::range() const |
{ |
if (m_positionNode) |
- return Range::create(&m_positionNode->document(), m_positionNode, m_positionStartOffset, m_positionNode, m_positionEndOffset); |
+ return Range::create(m_positionNode->document(), m_positionNode, m_positionStartOffset, m_positionNode, m_positionEndOffset); |
- return Range::create(&m_startNode->document(), m_startNode, m_startOffset, m_startNode, m_startOffset); |
+ return Range::create(m_startNode->document(), m_startNode, m_startOffset, m_startNode, m_startOffset); |
} |
// -------- |
@@ -1452,7 +1452,7 @@ static PassRefPtr<Range> characterSubrange(CharacterIterator& it, int offset, in |
it.advance(length - 1); |
RefPtr<Range> end = it.range(); |
- return Range::create(&start->startContainer()->document(), |
+ return Range::create(start->startContainer()->document(), |
start->startContainer(), start->startOffset(), |
end->endContainer(), end->endOffset()); |
} |
@@ -2337,7 +2337,7 @@ bool TextIterator::getLocationAndLengthFromRange(Node* scope, const Range* range |
if (range->endContainer() != scope && !range->endContainer()->isDescendantOf(scope)) |
return false; |
- RefPtr<Range> testRange = Range::create(&scope->document(), scope, 0, range->startContainer(), range->startOffset()); |
+ RefPtr<Range> testRange = Range::create(scope->document(), scope, 0, range->startContainer(), range->startOffset()); |
ASSERT(testRange->startContainer() == scope); |
location = TextIterator::rangeLength(testRange.get()); |
@@ -2371,8 +2371,8 @@ String plainText(const Range* r, TextIteratorBehavior defaultBehavior, bool isDi |
String result = builder.toString(); |
- if (isDisplayString && r->ownerDocument()) |
- r->ownerDocument()->displayStringModifiedByEncoding(result); |
+ if (isDisplayString) |
+ r->ownerDocument().displayStringModifiedByEncoding(result); |
return result; |
} |
@@ -2393,7 +2393,7 @@ static size_t findPlainText(CharacterIterator& it, const String& target, FindOpt |
if (buffer.needsMoreContext()) { |
RefPtr<Range> startRange = it.range(); |
- RefPtr<Range> beforeStartRange = startRange->ownerDocument()->createRange(); |
+ RefPtr<Range> beforeStartRange = startRange->ownerDocument().createRange(); |
beforeStartRange->setEnd(startRange->startContainer(), startRange->startOffset(), IGNORE_EXCEPTION); |
for (SimplifiedBackwardsTextIterator backwardsIterator(beforeStartRange.get()); !backwardsIterator.atEnd(); backwardsIterator.advance()) { |
Vector<UChar, 1024> characters; |
@@ -2433,7 +2433,7 @@ tryAgain: |
PassRefPtr<Range> findPlainText(const Range* range, const String& target, FindOptions options) |
{ |
// CharacterIterator requires renderers to be up-to-date |
- range->ownerDocument()->updateLayout(); |
+ range->ownerDocument().updateLayout(); |
// First, find the text. |
size_t matchStart; |