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

Unified Diff: content/renderer/render_widget.cc

Issue 2681473002: Fix a recent regression in IME inside OOPIFs (Closed)
Patch Set: Created 3 years, 10 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: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index d9edfea44b72f0dc3fcb4a0e2dc05dec9d3df7b1..20c9ec493bd44a9ecad69ef7e30a7b794285bc33 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -659,7 +659,9 @@ void RenderWidget::SendOrCrash(IPC::Message* message) {
}
bool RenderWidget::ShouldHandleImeEvents() const {
- return GetWebWidget()->isWebFrameWidget() && has_focus_;
+ // TODO(ekaramad): We do not track page focus for OOPIFs so for now we will
+ // assume this method always returns true.
+ return GetWebWidget()->isWebFrameWidget() && (has_focus_ || for_oopif_);
alexmos 2017/02/06 23:47:46 I was a bit surprised that has_focus_ isn't tracki
EhsanK 2017/02/07 07:02:13 Yes. I did notice this issue (and explained the pr
alexmos 2017/02/08 01:42:20 Yeah, this is tricky. I've also chatted with Dani
EhsanK 2017/02/08 02:35:50 Thanks Alex. Two comments: 1- By not finding an e
}
void RenderWidget::SetWindowRectSynchronously(
@@ -1592,10 +1594,11 @@ void RenderWidget::OnImeCommitText(
return;
ImeEventGuard guard(this);
input_handler_->set_handling_input_event(true);
- if (auto* controller = GetInputMethodController())
+ if (auto* controller = GetInputMethodController()) {
controller->commitText(WebString::fromUTF16(text),
WebVector<WebCompositionUnderline>(underlines),
relative_cursor_pos);
+ }
EhsanK 2017/02/06 17:46:41 Just a formatting fix (irrelevant to the actual is
input_handler_->set_handling_input_event(false);
UpdateCompositionInfo(false /* not an immediate request */);
}
« content/public/test/text_input_test_utils.cc ('K') | « content/public/test/text_input_test_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698