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

Unified Diff: Source/web/WebViewImpl.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/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 4dbb28f09e84cb73db9682bc3a37649d8a3d3c58..1ff82b075221a5ccc015bbe8abd79fd0cc54a6bd 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -1943,7 +1943,7 @@ bool WebViewImpl::setComposition(
// editable because JavaScript may delete a parent node of the composition
// node. In this case, WebKit crashes while deleting texts from the parent
// node, which doesn't exist any longer.
- RefPtr<Range> range = inputMethodController.compositionRange();
+ RefPtrWillBeRawPtr<Range> range = inputMethodController.compositionRange();
if (range) {
Node* node = range->startContainer();
if (!node || !node->isContentEditable())
@@ -2007,7 +2007,7 @@ bool WebViewImpl::compositionRange(size_t* location, size_t* length)
if (!focused || !m_imeAcceptEvents)
return false;
- RefPtr<Range> range = focused->inputMethodController().compositionRange();
+ RefPtrWillBeRawPtr<Range> range = focused->inputMethodController().compositionRange();
if (!range)
return false;
@@ -2048,7 +2048,7 @@ WebTextInputInfo WebViewImpl::textInputInfo()
if (info.value.isEmpty())
return info;
- if (RefPtr<Range> range = selection.selection().firstRange()) {
+ if (RefPtrWillBeRawPtr<Range> range = selection.selection().firstRange()) {
PlainTextRange plainTextRange(PlainTextRange::create(*node, *range.get()));
if (plainTextRange.isNotNull()) {
info.selectionStart = plainTextRange.start();
@@ -2056,7 +2056,7 @@ WebTextInputInfo WebViewImpl::textInputInfo()
}
}
- if (RefPtr<Range> range = focused->inputMethodController().compositionRange()) {
+ if (RefPtrWillBeRawPtr<Range> range = focused->inputMethodController().compositionRange()) {
PlainTextRange plainTextRange(PlainTextRange::create(*node, *range.get()));
if (plainTextRange.isNotNull()) {
info.compositionStart = plainTextRange.start();
@@ -2159,11 +2159,11 @@ bool WebViewImpl::selectionBounds(WebRect& anchor, WebRect& focus) const
if (selection.isCaret()) {
anchor = focus = selection.absoluteCaretBounds();
} else {
- RefPtr<Range> selectedRange = selection.toNormalizedRange();
+ RefPtrWillBeRawPtr<Range> selectedRange = selection.toNormalizedRange();
if (!selectedRange)
return false;
- RefPtr<Range> range(Range::create(selectedRange->startContainer()->document(),
+ RefPtrWillBeRawPtr<Range> range(Range::create(selectedRange->startContainer()->document(),
selectedRange->startContainer(),
selectedRange->startOffset(),
selectedRange->startContainer(),

Powered by Google App Engine
This is Rietveld 408576698