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

Issue 2681473002: Fix a recent regression in IME inside OOPIFs (Closed)

Created:
3 years, 10 months ago by EhsanK
Modified:
3 years, 10 months ago
Reviewers:
Charlie Reis, alexmos, sky
CC:
chromium-reviews, jam, darin-cc_chromium.org, mlamouri+watch-content_chromium.org, site_isolation_reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix a recent regression in IME inside OOPIFs IME events are only processed at the renderer if there is widget/page focus. This used to be done by checking the variabel m_imeAcceptEvents inside WebFrameWidgetImpl which technically tracks the page focus. After a recent refactoring, the logic for verifying page focus was moved to RenderWidget which saves the unnecessary call to WebInputMethodController IME methods when page is not focused. But unfortunately this broke IME because page focus (RenderWidget::has_focus_) does not get updated for RenderWidgets corresponding to OOPIFs. The only reason it was working before was that m_imeAcceptEvents is initialized to |true| and stay because we never update page focus for WebFrameWidgetImpl. This CL will temporarily allow handling all IME events by checking if the RenderWidget is for an OOPIF. This will revert the behvaior to that of prior to the refactoring. This CL also adds an interactive browser test which catches regressions of this sort on Mac and Aura platforms. BUG=688842, 602723 Review-Url: https://codereview.chromium.org/2681473002 Cr-Commit-Position: refs/heads/master@{#449521} Committed: https://chromium.googlesource.com/chromium/src/+/b6483a05119a0ebb57d3968783371c119a83d49c

Patch Set 1 #

Total comments: 15

Patch Set 2 : Rebased #

Patch Set 3 : Added a bug to comment. #

Patch Set 4 : Addressing alexmos@'s comments #

Patch Set 5 : Fixed a comment #

Total comments: 10

Patch Set 6 : Rebased #

Patch Set 7 : Addressing sky@'s comments (and changig testing methodology) #

Patch Set 8 : Formatting and comments #

Total comments: 2

Patch Set 9 : Addressed sky@'s comment #

Patch Set 10 : Resolved Merge Conflict #

Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -5 lines) Patch
M chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc View 1 2 3 4 5 6 7 8 2 chunks +72 lines, -0 lines 0 comments Download
M content/public/test/text_input_test_utils.h View 1 2 3 4 5 6 3 chunks +14 lines, -1 line 0 comments Download
M content/public/test/text_input_test_utils.cc View 1 2 3 4 5 6 3 chunks +19 lines, -2 lines 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 5 6 7 8 9 3 chunks +9 lines, -2 lines 0 comments Download

Messages

Total messages: 46 (28 generated)
EhsanK
Hello Alex, I think Charlie is OOO. I was wondering if you could review this ...
3 years, 10 months ago (2017-02-06 17:46:41 UTC) #5
alexmos
Thanks, one question below before I review the rest. https://codereview.chromium.org/2681473002/diff/1/content/renderer/render_widget.cc File content/renderer/render_widget.cc (right): https://codereview.chromium.org/2681473002/diff/1/content/renderer/render_widget.cc#newcode664 content/renderer/render_widget.cc:664: ...
3 years, 10 months ago (2017-02-06 23:47:46 UTC) #8
EhsanK
Thank you Alex. I added some comments to the question you asked. Please let me ...
3 years, 10 months ago (2017-02-07 07:02:13 UTC) #9
alexmos
https://codereview.chromium.org/2681473002/diff/1/content/renderer/render_widget.cc File content/renderer/render_widget.cc (right): https://codereview.chromium.org/2681473002/diff/1/content/renderer/render_widget.cc#newcode664 content/renderer/render_widget.cc:664: return GetWebWidget()->isWebFrameWidget() && (has_focus_ || for_oopif_); On 2017/02/07 07:02:13, ...
3 years, 10 months ago (2017-02-08 01:42:20 UTC) #10
alexmos
https://codereview.chromium.org/2681473002/diff/1/chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc File chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc (right): https://codereview.chromium.org/2681473002/diff/1/chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc#newcode795 chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc:795: // This test verifies that commit text by sending ...
3 years, 10 months ago (2017-02-08 02:16:23 UTC) #11
EhsanK
Thanks Alex! I filed a new bug for page focus and tried to fix the ...
3 years, 10 months ago (2017-02-08 02:35:50 UTC) #14
alexmos
Thanks, LGTM
3 years, 10 months ago (2017-02-08 06:02:49 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2681473002/80001
3 years, 10 months ago (2017-02-08 06:06:58 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/359290)
3 years, 10 months ago (2017-02-08 06:14:26 UTC) #21
EhsanK
Hello Scott, Charlie is OOO so could you please take a look? Thanks!
3 years, 10 months ago (2017-02-08 06:18:26 UTC) #23
sky
https://codereview.chromium.org/2681473002/diff/80001/chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc File chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc (right): https://codereview.chromium.org/2681473002/diff/80001/chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc#newcode806 chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc:806: for (size_t i = 0; i < frames.size(); ++i) ...
3 years, 10 months ago (2017-02-08 16:36:53 UTC) #24
EhsanK
Thanks Scott! Please take another look. https://codereview.chromium.org/2681473002/diff/1/content/public/test/text_input_test_utils.cc File content/public/test/text_input_test_utils.cc (right): https://codereview.chromium.org/2681473002/diff/1/content/public/test/text_input_test_utils.cc#newcode273 content/public/test/text_input_test_utils.cc:273: web_composition_underlines.push_back(blink::WebCompositionUnderline( On 2017/02/08 ...
3 years, 10 months ago (2017-02-09 00:50:34 UTC) #27
sky
LGTM https://codereview.chromium.org/2681473002/diff/140001/chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc File chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc (right): https://codereview.chromium.org/2681473002/diff/140001/chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc#newcode291 chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc:291: selected_text_) {} (as conditional spans multiple-lines)
3 years, 10 months ago (2017-02-09 17:18:38 UTC) #30
EhsanK
Thanks for the reviews! I will CQ soon. https://codereview.chromium.org/2681473002/diff/140001/chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc File chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc (right): https://codereview.chromium.org/2681473002/diff/140001/chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc#newcode291 chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc:291: selected_text_) ...
3 years, 10 months ago (2017-02-09 22:03:48 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2681473002/180001
3 years, 10 months ago (2017-02-10 02:13:31 UTC) #41
commit-bot: I haz the power
Committed patchset #10 (id:180001) as https://chromium.googlesource.com/chromium/src/+/b6483a05119a0ebb57d3968783371c119a83d49c
3 years, 10 months ago (2017-02-10 02:24:04 UTC) #44
Charlie Reis
RS LGTM given Alex's review of https://codereview.chromium.org/2681473002/.
3 years, 10 months ago (2017-02-14 21:11:04 UTC) #45
Charlie Reis
3 years, 10 months ago (2017-02-14 21:11:53 UTC) #46
Message was sent while issue was closed.
On 2017/02/14 21:11:04, Charlie Reis wrote:
> RS LGTM given Alex's review of https://codereview.chromium.org/2681473002/.

(Sorry, wrong CL: I was trying to reply to
https://codereview.chromium.org/2696883002)

Powered by Google App Engine
This is Rietveld 408576698