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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 430843002: Use tighter typing in editing: PlainTextRange / ReplaceNodeWithSpanCommand (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 5 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/ReplaceSelectionCommand.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 277b441dd141453c8480fcbe24fa508ff3942497..3e59eea36af417a1ee258b3348fde2fddcd36f2f 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -2158,8 +2158,8 @@ WebTextInputInfo WebViewImpl::textInputInfo()
return info;
FrameSelection& selection = focused->selection();
- Node* node = selection.selection().rootEditableElement();
- if (!node)
+ Element* element = selection.selection().rootEditableElement();
+ if (!element)
return info;
info.inputMode = inputModeOfFocusedElement();
@@ -2173,13 +2173,13 @@ WebTextInputInfo WebViewImpl::textInputInfo()
// Emits an object replacement character for each replaced element so that
// it is exposed to IME and thus could be deleted by IME on android.
- info.value = plainText(rangeOfContents(node).get(), TextIteratorEmitsObjectReplacementCharacter);
+ info.value = plainText(rangeOfContents(element).get(), TextIteratorEmitsObjectReplacementCharacter);
if (info.value.isEmpty())
return info;
if (RefPtrWillBeRawPtr<Range> range = selection.selection().firstRange()) {
- PlainTextRange plainTextRange(PlainTextRange::create(*node, *range.get()));
+ PlainTextRange plainTextRange(PlainTextRange::create(*element, *range.get()));
if (plainTextRange.isNotNull()) {
info.selectionStart = plainTextRange.start();
info.selectionEnd = plainTextRange.end();
@@ -2187,7 +2187,7 @@ WebTextInputInfo WebViewImpl::textInputInfo()
}
if (RefPtrWillBeRawPtr<Range> range = focused->inputMethodController().compositionRange()) {
- PlainTextRange plainTextRange(PlainTextRange::create(*node, *range.get()));
+ PlainTextRange plainTextRange(PlainTextRange::create(*element, *range.get()));
if (plainTextRange.isNotNull()) {
info.compositionStart = plainTextRange.start();
info.compositionEnd = plainTextRange.end();
« no previous file with comments | « Source/core/editing/ReplaceSelectionCommand.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698