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

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

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 4 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
« no previous file with comments | « Source/core/editing/FrameSelection.cpp ('k') | Source/core/editing/InsertIntoTextNodeCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/InputMethodController.cpp
diff --git a/Source/core/editing/InputMethodController.cpp b/Source/core/editing/InputMethodController.cpp
index 0a33f6704aa07f325300bfcfb8af98cdda54d6a4..fc2978bb2b4272e436d198d5b4b12ba273742213 100644
--- a/Source/core/editing/InputMethodController.cpp
+++ b/Source/core/editing/InputMethodController.cpp
@@ -303,7 +303,7 @@ void InputMethodController::setComposition(const String& text, const Vector<Comp
unsigned start = std::min(baseOffset + selectionStart, extentOffset);
unsigned end = std::min(std::max(start, baseOffset + selectionEnd), extentOffset);
- RefPtr<Range> selectedRange = Range::create(baseNode->document(), baseNode, start, baseNode, end);
+ RefPtr<Range> selectedRange = Range::create(&baseNode->document(), baseNode, start, baseNode, end);
m_frame->selection()->setSelectedRange(selectedRange.get(), DOWNSTREAM, false);
}
}
@@ -352,7 +352,7 @@ PassRefPtr<Range> InputMethodController::compositionRange() const
unsigned end = std::min(std::max(start, m_compositionEnd), length);
if (start >= end)
return 0;
- return Range::create(m_compositionNode->document(), m_compositionNode.get(), start, m_compositionNode.get(), end);
+ return Range::create(&m_compositionNode->document(), m_compositionNode.get(), start, m_compositionNode.get(), end);
}
PlainTextOffsets InputMethodController::getSelectionOffsets() const
« no previous file with comments | « Source/core/editing/FrameSelection.cpp ('k') | Source/core/editing/InsertIntoTextNodeCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698