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

Issue 1180503002: Force a GuestView's embedder to be focused on TouchStart. (Closed)

Created:
5 years, 6 months ago by wjmaclean
Modified:
5 years, 6 months ago
Reviewers:
kenrb, lazyboy, nasko
CC:
chromium-reviews, jam, nasko+codewatch_chromium.org, creis+watch_chromium.org, darin-cc_chromium.org, sadrul
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Force a GuestView's embedder to be focused on TouchStart. It is currently possible that touching (TouchStart) an element inside a GuestView may not focus the element because the embedder itself has not received focus. An example of this is when a <webview> tag is contained inside a views::WebView. The views::WebView is unable to receive touch events in order to focus itself, and the BrowserPlugin marks the touch event as handled so that Aura never generates the GestureTap that RenderWidgetHostViewAura requires to focus the views::WebView. This CL adds logic in RenderWidgetHostViewGuest to detect an unfocused embedder, and to focus it on TouchStart. BUG=450147 Committed: https://crrev.com/6aefc3a6c8aa7463906af62205b0f0c314c3ef76 Cr-Commit-Position: refs/heads/master@{#335569}

Patch Set 1 #

Patch Set 2 : Add test. #

Total comments: 2

Patch Set 3 : New, improved way to be sure compositor layers have settled (thanks dtapuska@!). #

Patch Set 4 : Add USE_AURA compile guards. #

Patch Set 5 : Try waiting an extra frame before sending touch event. #

Patch Set 6 : Fix test. #

Patch Set 7 : Refactor utility code to browser_test_utils. #

Total comments: 5

Patch Set 8 : Improve variable name. #

Total comments: 7

Patch Set 9 : Address comments. #

Total comments: 5

Patch Set 10 : Address more comments #

Patch Set 11 : Release observer on destruction. Make webview focused (for Windows). #

Unified diffs Side-by-side diffs Delta from patch set Stats (+195 lines, -0 lines) Patch
M chrome/browser/apps/guest_view/web_view_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +159 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M content/public/test/browser_test_utils.h View 1 2 3 4 5 6 3 chunks +9 lines, -0 lines 0 comments Download
M content/public/test/browser_test_utils.cc View 1 2 3 4 5 6 4 chunks +22 lines, -0 lines 0 comments Download

Messages

Total messages: 71 (35 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1180503002/20001
5 years, 6 months ago (2015-06-18 18:27:53 UTC) #4
wjmaclean
avi@chromium.org: Please review changes in RenderWidgetHostViewGuest. This small change is something Sadrul agreed to, but ...
5 years, 6 months ago (2015-06-18 18:34:59 UTC) #9
wjmaclean
https://codereview.chromium.org/1180503002/diff/20001/chrome/browser/apps/guest_view/web_view_browsertest.cc File chrome/browser/apps/guest_view/web_view_browsertest.cc (right): https://codereview.chromium.org/1180503002/diff/20001/chrome/browser/apps/guest_view/web_view_browsertest.cc#newcode2407 chrome/browser/apps/guest_view/web_view_browsertest.cc:2407: typedef WebViewTest WebViewFocusTest; I just realized, these needs to ...
5 years, 6 months ago (2015-06-18 18:37:48 UTC) #10
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/72046)
5 years, 6 months ago (2015-06-18 18:40:22 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1180503002/40001
5 years, 6 months ago (2015-06-18 19:56:02 UTC) #14
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/72079)
5 years, 6 months ago (2015-06-18 20:08:55 UTC) #16
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1180503002/60001
5 years, 6 months ago (2015-06-18 20:18:02 UTC) #18
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/72087)
5 years, 6 months ago (2015-06-18 20:27:52 UTC) #20
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1180503002/80001
5 years, 6 months ago (2015-06-18 21:22:12 UTC) #22
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/72119)
5 years, 6 months ago (2015-06-18 21:31:51 UTC) #24
lazyboy
FYI, it seems the test is not passing on the bots yet, please ping the ...
5 years, 6 months ago (2015-06-19 07:48:03 UTC) #25
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1180503002/160001
5 years, 6 months ago (2015-06-19 20:55:57 UTC) #30
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/72437)
5 years, 6 months ago (2015-06-19 21:06:09 UTC) #32
kenrb
lgtm the RenderWidgetHostView change
5 years, 6 months ago (2015-06-19 22:14:31 UTC) #35
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1180503002/180001
5 years, 6 months ago (2015-06-20 00:48:54 UTC) #38
wjmaclean
nasko@ - don't worry about looking at this until Monday. If you want me to ...
5 years, 6 months ago (2015-06-20 00:51:11 UTC) #40
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 6 months ago (2015-06-20 01:43:02 UTC) #42
nasko
https://codereview.chromium.org/1180503002/diff/180001/chrome/browser/apps/guest_view/web_view_browsertest.cc File chrome/browser/apps/guest_view/web_view_browsertest.cc (right): https://codereview.chromium.org/1180503002/diff/180001/chrome/browser/apps/guest_view/web_view_browsertest.cc#newcode225 chrome/browser/apps/guest_view/web_view_browsertest.cc:225: views::View* FindWebView(views::View* v) { nit: Using just one letter ...
5 years, 6 months ago (2015-06-22 08:40:53 UTC) #43
wjmaclean
Comments addressed, PTAL? https://codereview.chromium.org/1180503002/diff/180001/chrome/browser/apps/guest_view/web_view_browsertest.cc File chrome/browser/apps/guest_view/web_view_browsertest.cc (right): https://codereview.chromium.org/1180503002/diff/180001/chrome/browser/apps/guest_view/web_view_browsertest.cc#newcode225 chrome/browser/apps/guest_view/web_view_browsertest.cc:225: views::View* FindWebView(views::View* v) { On 2015/06/22 ...
5 years, 6 months ago (2015-06-22 13:39:44 UTC) #44
nasko
lgtm https://codereview.chromium.org/1180503002/diff/180001/content/public/test/browser_test_utils.cc File content/public/test/browser_test_utils.cc (right): https://codereview.chromium.org/1180503002/diff/180001/content/public/test/browser_test_utils.cc#newcode439 content/public/test/browser_test_utils.cc:439: RenderWidgetHostImpl::From(web_contents->GetRenderViewHost()); On 2015/06/22 13:39:44, wjmaclean wrote: > On ...
5 years, 6 months ago (2015-06-22 14:05:49 UTC) #45
wjmaclean
On 2015/06/22 14:05:49, nasko (paris) wrote: > lgtm > > You mean RenderWidgetHost, not RenderWidgetHostView, ...
5 years, 6 months ago (2015-06-22 14:06:50 UTC) #46
lazyboy
https://chromiumcodereview.appspot.com/1180503002/diff/200001/chrome/browser/apps/guest_view/web_view_browsertest.cc File chrome/browser/apps/guest_view/web_view_browsertest.cc (right): https://chromiumcodereview.appspot.com/1180503002/diff/200001/chrome/browser/apps/guest_view/web_view_browsertest.cc#newcode57 chrome/browser/apps/guest_view/web_view_browsertest.cc:57: #include "ui/aura/window.h" This probably won't compile for mac? I ...
5 years, 6 months ago (2015-06-22 16:15:16 UTC) #47
wjmaclean
Suggestions addressed, PTAL? https://codereview.chromium.org/1180503002/diff/200001/chrome/browser/apps/guest_view/web_view_browsertest.cc File chrome/browser/apps/guest_view/web_view_browsertest.cc (right): https://codereview.chromium.org/1180503002/diff/200001/chrome/browser/apps/guest_view/web_view_browsertest.cc#newcode57 chrome/browser/apps/guest_view/web_view_browsertest.cc:57: #include "ui/aura/window.h" On 2015/06/22 16:15:15, lazyboy ...
5 years, 6 months ago (2015-06-22 16:55:23 UTC) #50
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1180503002/220001
5 years, 6 months ago (2015-06-22 16:55:32 UTC) #51
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: cast_shell_android on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_android/builds/22794)
5 years, 6 months ago (2015-06-22 17:15:27 UTC) #53
lazyboy
https://codereview.chromium.org/1180503002/diff/220001/chrome/browser/apps/guest_view/web_view_browsertest.cc File chrome/browser/apps/guest_view/web_view_browsertest.cc (right): https://codereview.chromium.org/1180503002/diff/220001/chrome/browser/apps/guest_view/web_view_browsertest.cc#newcode2425 chrome/browser/apps/guest_view/web_view_browsertest.cc:2425: base::RunLoop run_loop; nit: add a comment saying we're waiting ...
5 years, 6 months ago (2015-06-22 17:27:24 UTC) #54
wjmaclean
PTAL https://codereview.chromium.org/1180503002/diff/220001/chrome/browser/apps/guest_view/web_view_browsertest.cc File chrome/browser/apps/guest_view/web_view_browsertest.cc (right): https://codereview.chromium.org/1180503002/diff/220001/chrome/browser/apps/guest_view/web_view_browsertest.cc#newcode2425 chrome/browser/apps/guest_view/web_view_browsertest.cc:2425: base::RunLoop run_loop; On 2015/06/22 17:27:24, lazyboy wrote: > ...
5 years, 6 months ago (2015-06-22 17:34:05 UTC) #55
lazyboy
lgtm https://codereview.chromium.org/1180503002/diff/220001/chrome/browser/apps/guest_view/web_view_browsertest.cc File chrome/browser/apps/guest_view/web_view_browsertest.cc (right): https://codereview.chromium.org/1180503002/diff/220001/chrome/browser/apps/guest_view/web_view_browsertest.cc#newcode2524 chrome/browser/apps/guest_view/web_view_browsertest.cc:2524: FocusWaiter waiter(aura_webview); On 2015/06/22 17:34:05, wjmaclean wrote: > ...
5 years, 6 months ago (2015-06-22 17:47:03 UTC) #56
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1180503002/240001
5 years, 6 months ago (2015-06-22 17:48:04 UTC) #59
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_android on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_android/builds/22833)
5 years, 6 months ago (2015-06-22 18:10:57 UTC) #61
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1180503002/260001
5 years, 6 months ago (2015-06-22 20:01:50 UTC) #64
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/70462)
5 years, 6 months ago (2015-06-22 21:12:21 UTC) #66
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1180503002/260001
5 years, 6 months ago (2015-06-22 21:14:42 UTC) #68
commit-bot: I haz the power
Committed patchset #11 (id:260001)
5 years, 6 months ago (2015-06-22 21:58:40 UTC) #69
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/6aefc3a6c8aa7463906af62205b0f0c314c3ef76 Cr-Commit-Position: refs/heads/master@{#335569}
5 years, 6 months ago (2015-06-22 21:59:38 UTC) #70
nasko
5 years, 6 months ago (2015-06-23 10:04:08 UTC) #71
Message was sent while issue was closed.
On 2015/06/22 21:59:38, commit-bot: I haz the power wrote:
> Patchset 11 (id:??) landed as
> https://crrev.com/6aefc3a6c8aa7463906af62205b0f0c314c3ef76
> Cr-Commit-Position: refs/heads/master@{#335569}

This test broke the Site Isolation FYI bots. Can you please disable it or fix it
such that it passes?

Powered by Google App Engine
This is Rietveld 408576698