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

Issue 1412923009: Route touch-events for WebViewGuest directly to guest renderer. (Closed)

Created:
5 years, 1 month ago by wjmaclean
Modified:
5 years ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Route touch-events for WebViewGuest directly to guest renderer. This CL is the beginning of a refactor to route input events directly to a WebViewGuest's renderer instead of taking a round-trip through BrowserPlugin first. Touch events were chosen as the first event type to re-route, since guests with touch-handlers installed currently bypass our attempts to force pinch-zoom to be handled in the embedder. Also, they require a second gesture recognizer (owned in RenderWidgetHostViewGuest) to create gestures based on the acked touch events. This CL does away with the extra GestureRecognizer, and routes the touch event acks back to the main GestureRecognizer instead, thus simplifying the event handling logic, and providing more consistent behaviour when touch handlers are present. BUG=445319 Committed: https://crrev.com/e31234f7e0950fa7f062a42ed530b76ba3bd1bac Cr-Commit-Position: refs/heads/master@{#365034}

Patch Set 1 #

Patch Set 2 : Experiment: run on bots without DCHECK. #

Total comments: 23

Patch Set 3 : Address comments. #

Total comments: 2

Patch Set 4 : Suggestions, early registration for all but RWHVG. #

Patch Set 5 : For WebView, check to make sure surface not already added. #

Total comments: 4

Patch Set 6 : Address suggestions. #

Total comments: 2

Patch Set 7 : Add DCHECK for touch events in BrowserPlugin::handleInputEvent(). #

Total comments: 1

Patch Set 8 : Fix attach/detach surface namespace id registration, embedder focuses on touch. #

Patch Set 9 : Fix TouchFocusesEmbedder test. #

Patch Set 10 : Fix null pointer deref when guest is terminated. #

Total comments: 7

Patch Set 11 : Update Mac code, rebase to master@{#361742}. #

Total comments: 15

Patch Set 12 : Address creis@'s suggestions. #

Total comments: 6

Patch Set 13 : Update comments, DCHECK touch events in RWHVM::ShouldRouteEvent(). #

Total comments: 4

Patch Set 14 : Update comments. #

Patch Set 15 : Update comments (saving first this time). #

Unified diffs Side-by-side diffs Delta from patch set Stats (+188 lines, -124 lines) Patch
M chrome/browser/apps/guest_view/web_view_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +1 line, -37 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +9 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +6 lines, -10 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +36 lines, -53 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_input_event_router.h View 1 2 3 4 3 chunks +14 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_input_event_router.cc View 1 2 3 2 chunks +40 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +32 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +19 lines, -12 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -3 lines 0 comments Download
M content/public/test/browser_test_utils.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/test/browser_test_utils.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +8 lines, -5 lines 0 comments Download
M content/renderer/browser_plugin/browser_plugin.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 68 (23 generated)
wjmaclean
tdresser@ and kenrb@ - could you please each do a first-pass (sanity-check review) on this? ...
5 years, 1 month ago (2015-11-02 13:39:37 UTC) #3
tdresser
Looks reasonable to me at a high level. I gave a few low level comments ...
5 years, 1 month ago (2015-11-02 15:38:25 UTC) #4
kenrb
https://codereview.chromium.org/1412923009/diff/20001/content/browser/frame_host/render_widget_host_view_child_frame.cc File content/browser/frame_host/render_widget_host_view_child_frame.cc (right): https://codereview.chromium.org/1412923009/diff/20001/content/browser/frame_host/render_widget_host_view_child_frame.cc#newcode268 content/browser/frame_host/render_widget_host_view_child_frame.cc:268: host_->delegate()->GetInputEventRouter()->AddSurfaceIdNamespaceOwner( On 2015/11/02 15:38:24, tdresser wrote: > It isn't ...
5 years, 1 month ago (2015-11-02 16:04:22 UTC) #5
tdresser
On 2015/11/02 16:04:22, kenrb wrote: > https://codereview.chromium.org/1412923009/diff/20001/content/browser/frame_host/render_widget_host_view_child_frame.cc > File content/browser/frame_host/render_widget_host_view_child_frame.cc (right): > > https://codereview.chromium.org/1412923009/diff/20001/content/browser/frame_host/render_widget_host_view_child_frame.cc#newcode268 > ...
5 years, 1 month ago (2015-11-02 16:08:36 UTC) #6
wjmaclean
I've gone through your initial comments ... I've responded inline with a few questions of ...
5 years, 1 month ago (2015-11-02 19:23:11 UTC) #7
tdresser
https://codereview.chromium.org/1412923009/diff/20001/content/browser/frame_host/render_widget_host_view_child_frame.cc File content/browser/frame_host/render_widget_host_view_child_frame.cc (right): https://codereview.chromium.org/1412923009/diff/20001/content/browser/frame_host/render_widget_host_view_child_frame.cc#newcode268 content/browser/frame_host/render_widget_host_view_child_frame.cc:268: host_->delegate()->GetInputEventRouter()->AddSurfaceIdNamespaceOwner( On 2015/11/02 19:23:10, wjmaclean wrote: > On 2015/11/02 ...
5 years, 1 month ago (2015-11-02 21:10:19 UTC) #8
wjmaclean
This patchset reverts to allowing RWHVCF and RWHVA to register their surface namespaces at construction, ...
5 years, 1 month ago (2015-11-03 14:54:25 UTC) #9
tdresser
On 2015/11/03 14:54:25, wjmaclean wrote: > This patchset reverts to allowing RWHVCF and RWHVA to ...
5 years, 1 month ago (2015-11-04 14:27:49 UTC) #10
wjmaclean
On 2015/11/04 14:27:49, tdresser wrote: > On 2015/11/03 14:54:25, wjmaclean wrote: > > This patchset ...
5 years, 1 month ago (2015-11-04 14:59:41 UTC) #11
wjmaclean
PTAL?
5 years, 1 month ago (2015-11-04 18:25:56 UTC) #12
tdresser
content/browser/renderer_host/ LGTM https://codereview.chromium.org/1412923009/diff/80001/content/browser/browser_plugin/browser_plugin_guest.cc File content/browser/browser_plugin/browser_plugin_guest.cc (right): https://codereview.chromium.org/1412923009/diff/80001/content/browser/browser_plugin/browser_plugin_guest.cc#newcode499 content/browser/browser_plugin/browser_plugin_guest.cc:499: gfx::Point BrowserPluginGuest::GetScreenCoordinates( Can this be rewritten in ...
5 years, 1 month ago (2015-11-04 19:24:17 UTC) #13
wjmaclean
kenrb@ - did you have any further suggestions on this one? https://codereview.chromium.org/1412923009/diff/80001/content/browser/browser_plugin/browser_plugin_guest.cc File content/browser/browser_plugin/browser_plugin_guest.cc (right): ...
5 years, 1 month ago (2015-11-05 14:55:46 UTC) #14
kenrb
https://codereview.chromium.org/1412923009/diff/100001/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): https://codereview.chromium.org/1412923009/diff/100001/content/browser/web_contents/web_contents_impl.cc#newcode1597 content/browser/web_contents/web_contents_impl.cc:1597: return GetOuterWebContents()->GetInputEventRouter(); If we create an input event router ...
5 years, 1 month ago (2015-11-05 17:05:26 UTC) #15
wjmaclean
https://codereview.chromium.org/1412923009/diff/100001/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): https://codereview.chromium.org/1412923009/diff/100001/content/browser/web_contents/web_contents_impl.cc#newcode1597 content/browser/web_contents/web_contents_impl.cc:1597: return GetOuterWebContents()->GetInputEventRouter(); On 2015/11/05 17:05:26, kenrb wrote: > If ...
5 years, 1 month ago (2015-11-05 17:46:16 UTC) #16
Fady Samuel
https://codereview.chromium.org/1412923009/diff/120001/content/browser/frame_host/render_widget_host_view_guest.cc File content/browser/frame_host/render_widget_host_view_guest.cc (right): https://codereview.chromium.org/1412923009/diff/120001/content/browser/frame_host/render_widget_host_view_guest.cc#newcode211 content/browser/frame_host/render_widget_host_view_guest.cc:211: if (!has_started_rendering_) { drive-by: This doesn't seem right. A ...
5 years, 1 month ago (2015-11-05 18:09:11 UTC) #18
wjmaclean
On 2015/11/05 18:09:11, Fady Samuel wrote: > https://codereview.chromium.org/1412923009/diff/120001/content/browser/frame_host/render_widget_host_view_guest.cc > File content/browser/frame_host/render_widget_host_view_guest.cc (right): > > https://codereview.chromium.org/1412923009/diff/120001/content/browser/frame_host/render_widget_host_view_guest.cc#newcode211 ...
5 years, 1 month ago (2015-11-05 18:12:14 UTC) #19
Fady Samuel
On 2015/11/05 18:12:14, wjmaclean wrote: > On 2015/11/05 18:09:11, Fady Samuel wrote: > > > ...
5 years, 1 month ago (2015-11-05 18:13:13 UTC) #20
wjmaclean
On 2015/11/05 18:13:13, Fady Samuel wrote: > > > drive-by: This doesn't seem right. A ...
5 years, 1 month ago (2015-11-17 20:43:57 UTC) #21
Fady Samuel
On 2015/11/17 20:43:57, wjmaclean wrote: > On 2015/11/05 18:13:13, Fady Samuel wrote: > > > ...
5 years, 1 month ago (2015-11-17 21:57:39 UTC) #22
wjmaclean
Fixed a couple of failing tests, added Detach() call in BrowserPlugin destructor. We now use ...
5 years ago (2015-11-24 17:47:09 UTC) #23
Fady Samuel
lgtm + nit https://codereview.chromium.org/1412923009/diff/180001/content/browser/frame_host/render_widget_host_view_guest.cc File content/browser/frame_host/render_widget_host_view_guest.cc (right): https://codereview.chromium.org/1412923009/diff/180001/content/browser/frame_host/render_widget_host_view_guest.cc#newcode145 content/browser/frame_host/render_widget_host_view_guest.cc:145: if (!embedder->GetView()->HasFocus()) This seems redundant. Is ...
5 years ago (2015-11-25 18:31:32 UTC) #24
kenrb
https://codereview.chromium.org/1412923009/diff/180001/content/browser/browser_plugin/browser_plugin_guest.cc File content/browser/browser_plugin/browser_plugin_guest.cc (right): https://codereview.chromium.org/1412923009/diff/180001/content/browser/browser_plugin/browser_plugin_guest.cc#newcode812 content/browser/browser_plugin/browser_plugin_guest.cc:812: web_contents()->GetRenderWidgetHostView()); I don't exactly know how much this is ...
5 years ago (2015-11-25 19:33:06 UTC) #25
wjmaclean
kenrb@ - I've update the mac code ... let me know what you think. https://codereview.chromium.org/1412923009/diff/180001/content/browser/browser_plugin/browser_plugin_guest.cc ...
5 years ago (2015-11-26 13:01:03 UTC) #30
kenrb
https://codereview.chromium.org/1412923009/diff/180001/content/browser/browser_plugin/browser_plugin_guest.cc File content/browser/browser_plugin/browser_plugin_guest.cc (right): https://codereview.chromium.org/1412923009/diff/180001/content/browser/browser_plugin/browser_plugin_guest.cc#newcode812 content/browser/browser_plugin/browser_plugin_guest.cc:812: web_contents()->GetRenderWidgetHostView()); On 2015/11/26 13:01:03, wjmaclean wrote: > On 2015/11/25 ...
5 years ago (2015-11-26 16:19:14 UTC) #32
wjmaclean
On 2015/11/26 16:19:14, kenrb wrote: > https://codereview.chromium.org/1412923009/diff/180001/content/browser/browser_plugin/browser_plugin_guest.cc > File content/browser/browser_plugin/browser_plugin_guest.cc (right): > > https://codereview.chromium.org/1412923009/diff/180001/content/browser/browser_plugin/browser_plugin_guest.cc#newcode812 > ...
5 years ago (2015-11-26 17:57:27 UTC) #33
kenrb
As discussed offline, this doesn't seem to break anything that isn't already broken, so lgtm.
5 years ago (2015-11-26 18:05:41 UTC) #34
wjmaclean
creis@ - this has been pre-reviewed by kenrb@ ... could you please take a look?
5 years ago (2015-11-26 18:25:47 UTC) #36
Charlie Reis
A few nits, but one larger concern that this seems to be changing how touch ...
5 years ago (2015-11-30 18:09:12 UTC) #37
wjmaclean
Updated as per creis@'s comments, ptal? https://codereview.chromium.org/1412923009/diff/300001/content/browser/browser_plugin/browser_plugin_guest.h File content/browser/browser_plugin/browser_plugin_guest.h (right): https://codereview.chromium.org/1412923009/diff/300001/content/browser/browser_plugin/browser_plugin_guest.h#newcode190 content/browser/browser_plugin/browser_plugin_guest.h:190: gfx::PointF GetScreenCoordinates(const gfx::PointF& ...
5 years ago (2015-12-10 16:09:07 UTC) #38
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1412923009/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1412923009/320001
5 years ago (2015-12-10 16:10:03 UTC) #40
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-12-10 17:40:08 UTC) #42
Charlie Reis
Hmm, I'm having trouble following your replies. Please see my questions below. https://codereview.chromium.org/1412923009/diff/300001/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc ...
5 years ago (2015-12-10 21:58:15 UTC) #43
wjmaclean
I've tried to clarify my answers based on your reply, please let me know if ...
5 years ago (2015-12-10 22:44:14 UTC) #44
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1412923009/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1412923009/340001
5 years ago (2015-12-11 16:50:12 UTC) #46
wjmaclean
On 2015/12/10 22:44:14, wjmaclean wrote: > I've tried to clarify my answers based on your ...
5 years ago (2015-12-11 16:50:46 UTC) #47
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-12-11 18:12:28 UTC) #49
wjmaclean
I've added the requested comment to RWHVM::ShouldRouteEvent(), and I've revised that function to explicitly indicate ...
5 years ago (2015-12-11 18:24:23 UTC) #50
Charlie Reis
Typo in CL description: RenderWidgetHostViewGuwst. On 2015/12/10 22:44:14, wjmaclean wrote: > I've tried to clarify ...
5 years ago (2015-12-11 21:32:52 UTC) #51
wjmaclean
Thanks! https://codereview.chromium.org/1412923009/diff/340001/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/1412923009/diff/340001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode869 content/browser/renderer_host/render_widget_host_view_aura.cc:869: // frame. On 2015/12/11 21:32:52, Charlie Reis wrote: ...
5 years ago (2015-12-14 14:17:40 UTC) #52
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1412923009/360001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1412923009/360001
5 years ago (2015-12-14 14:18:14 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1412923009/380001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1412923009/380001
5 years ago (2015-12-14 14:25:39 UTC) #60
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/149273)
5 years ago (2015-12-14 15:26:46 UTC) #62
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1412923009/380001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1412923009/380001
5 years ago (2015-12-14 15:39:15 UTC) #64
commit-bot: I haz the power
Committed patchset #15 (id:380001)
5 years ago (2015-12-14 17:20:56 UTC) #66
commit-bot: I haz the power
5 years ago (2015-12-14 17:23:00 UTC) #68
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/e31234f7e0950fa7f062a42ed530b76ba3bd1bac
Cr-Commit-Position: refs/heads/master@{#365034}

Powered by Google App Engine
This is Rietveld 408576698