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

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

Issue 224113002: Oilpan: move Range object to the oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use STACK_ALLOCATED() + incorporate ager's overview of macros in this area. Created 6 years, 9 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/InputMethodController.cpp
diff --git a/Source/core/editing/InputMethodController.cpp b/Source/core/editing/InputMethodController.cpp
index 43840c6e1be88385b9e125f08720f555cc4472c7..3609e75405069a27fc42c957cd5e295daa8802a6 100644
--- a/Source/core/editing/InputMethodController.cpp
+++ b/Source/core/editing/InputMethodController.cpp
@@ -95,7 +95,7 @@ bool InputMethodController::insertTextForConfirmedComposition(const String& text
void InputMethodController::selectComposition() const
{
- RefPtr<Range> range = compositionRange();
+ RefPtrWillBeRawPtr<Range> range = compositionRange();
if (!range)
return;
@@ -309,7 +309,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);
+ RefPtrWillBeRawPtr<Range> selectedRange = Range::create(baseNode->document(), baseNode, start, baseNode, end);
m_frame.selection().setSelectedRange(selectedRange.get(), DOWNSTREAM, static_cast<FrameSelection::SetSelectionOption>(0));
}
}
@@ -349,7 +349,7 @@ void InputMethodController::setCompositionFromExistingText(const Vector<Composit
setComposition(m_frame.selectedText(), underlines, 0, 0);
}
-PassRefPtr<Range> InputMethodController::compositionRange() const
+PassRefPtrWillBeRawPtr<Range> InputMethodController::compositionRange() const
{
if (!hasComposition())
return nullptr;
@@ -363,7 +363,7 @@ PassRefPtr<Range> InputMethodController::compositionRange() const
PlainTextRange InputMethodController::getSelectionOffsets() const
{
- RefPtr<Range> range = m_frame.selection().selection().firstRange();
+ RefPtrWillBeRawPtr<Range> range = m_frame.selection().selection().firstRange();
if (!range)
return PlainTextRange();
Node* editable = m_frame.selection().rootEditableElementOrTreeScopeRootNode();
@@ -379,7 +379,7 @@ bool InputMethodController::setSelectionOffsets(const PlainTextRange& selectionO
if (!rootEditableElement)
return false;
- RefPtr<Range> range = selectionOffsets.createRange(*rootEditableElement);
+ RefPtrWillBeRawPtr<Range> range = selectionOffsets.createRange(*rootEditableElement);
if (!range)
return false;

Powered by Google App Engine
This is Rietveld 408576698