Index: Source/core/editing/Editor.cpp |
diff --git a/Source/core/editing/Editor.cpp b/Source/core/editing/Editor.cpp |
index b487c8d243b83d1b95f90431143bcee82be08428..8ba1b9eccb5fcf34505ef931acf1508f7a66efd2 100644 |
--- a/Source/core/editing/Editor.cpp |
+++ b/Source/core/editing/Editor.cpp |
@@ -838,7 +838,7 @@ bool Editor::insertTextWithoutSendingTextEvent(const String& text, bool selectIn |
selection = selectionForCommand(triggeringEvent); |
if (selection.isContentEditable()) { |
if (Node* selectionStart = selection.start().deprecatedNode()) { |
- RefPtr<Document> document = selectionStart->document(); |
+ RefPtr<Document> document = &selectionStart->document(); |
// Insert the text |
TypingCommand::Options options = 0; |
@@ -981,7 +981,7 @@ void Editor::simplifyMarkup(Node* startNode, Node* endNode) |
if (!startNode) |
return; |
if (endNode) { |
- if (startNode->document() != endNode->document()) |
+ if (&startNode->document() != &endNode->document()) |
return; |
// check if start node is before endNode |
Node* node = startNode; |
@@ -1602,7 +1602,7 @@ void Editor::markAndReplaceFor(PassRefPtr<SpellCheckRequest> request, const Vect |
if (shouldMarkSpelling && result->type == TextCheckingTypeSpelling && resultLocation >= paragraph.checkingStart() && resultLocation + resultLength <= spellingRangeEndOffset && !resultEndsAtAmbiguousBoundary) { |
ASSERT(resultLength > 0 && resultLocation >= 0); |
RefPtr<Range> misspellingRange = paragraph.subrange(resultLocation, resultLength); |
- misspellingRange->startContainer()->document()->markers()->addMarker(misspellingRange.get(), DocumentMarker::Spelling, result->replacement, result->hash); |
+ misspellingRange->startContainer()->document().markers()->addMarker(misspellingRange.get(), DocumentMarker::Spelling, result->replacement, result->hash); |
} else if (shouldMarkGrammar && result->type == TextCheckingTypeGrammar && paragraph.checkingRangeCovers(resultLocation, resultLength)) { |
ASSERT(resultLength > 0 && resultLocation >= 0); |
for (unsigned j = 0; j < result->details.size(); j++) { |
@@ -1610,7 +1610,7 @@ void Editor::markAndReplaceFor(PassRefPtr<SpellCheckRequest> request, const Vect |
ASSERT(detail->length > 0 && detail->location >= 0); |
if (paragraph.checkingRangeCovers(resultLocation + detail->location, detail->length)) { |
RefPtr<Range> badGrammarRange = paragraph.subrange(resultLocation + detail->location, detail->length); |
- badGrammarRange->startContainer()->document()->markers()->addMarker(badGrammarRange.get(), DocumentMarker::Grammar, detail->userDescription, result->hash); |
+ badGrammarRange->startContainer()->document().markers()->addMarker(badGrammarRange.get(), DocumentMarker::Grammar, detail->userDescription, result->hash); |
} |
} |
} |