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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2508363003: [refactor] - Move textInputInfo() and textInputType() from WebWidget to WebInputMethodController (Closed)
Patch Set: Fixed Rebase Created 4 years 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 | « no previous file | content/renderer/render_view_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 7b6e75e9f783a018f01e316085992f51749459ca..07e1883e1d7ec673afc856bb687ea989ed3c09e6 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -189,6 +189,7 @@
#include "third_party/WebKit/public/web/WebFrameSerializer.h"
#include "third_party/WebKit/public/web/WebFrameSerializerCacheControlPolicy.h"
#include "third_party/WebKit/public/web/WebFrameWidget.h"
+#include "third_party/WebKit/public/web/WebInputMethodController.h"
#include "third_party/WebKit/public/web/WebKit.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebMediaStreamRegistry.h"
@@ -2295,8 +2296,10 @@ void RenderFrameImpl::OnFocusedFormFieldDataRequest(int request_id) {
WebElement element = frame_->document().focusedElement();
DCHECK(GetRenderWidget()->GetWebWidget());
+ blink::WebInputMethodController* controller =
+ frame_->frameWidget()->getActiveWebInputMethodController();
blink::WebTextInputInfo info =
- GetRenderWidget()->GetWebWidget()->textInputInfo();
+ controller ? controller->textInputInfo() : blink::WebTextInputInfo();
FormFieldData field;
field.text = info.value.utf8();
field.placeholder = element.getAttribute("placeholder").utf8();
@@ -6010,7 +6013,7 @@ void RenderFrameImpl::SyncSelectionIfRequired() {
range = gfx::Range(selection.startOffset(), selection.endOffset());
- if (GetRenderWidget()->GetWebWidget()->textInputType() !=
+ if (frame_->inputMethodController()->textInputType() !=
blink::WebTextInputTypeNone) {
// If current focused element is editable, we will send 100 more chars
// before and after selection. It is for input method surrounding text
« no previous file with comments | « no previous file | content/renderer/render_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698