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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2608293002: [reland, refactor] - Move textInputInfo() and textInputType() from WebWidget to WebInputMethodContr… (Closed)
Patch Set: Addressing wjmaclean@'s comments Created 3 years, 11 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 | « 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 c424e70f7b106477e6c5b59c00aa17763921813e..fd09dd8d9e28855d270c1025432291ad613923ec 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"
@@ -2290,8 +2291,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();
@@ -6040,7 +6043,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