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

Issue 1293963002: Fixing the Position of Context Menu for BrowserPlugin (<webview>) (Closed)

Created:
5 years, 4 months ago by Ehsaan
Modified:
5 years, 3 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, creis+watch_chromium.org, nasko+codewatch_chromium.org, jam, darin-cc_chromium.org, chromium-apps-reviews_chromium.org, rzhao
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fixing the Position of Context Menu for BrowserPlugin (<webview>) With current implementation of the BrowserPlugin, all WebMouseEvents are routed, throught the browser (RenderWidgetHostViewGuest), to the renderer process of the guest. The guest uses the coordinates, as passed, for creating the ContextMenu event. Therefore, the guest renderer process is oblivious to any CSS transforms applied on the BrowserPlugin and as a result, the reported position of the context menu is potentially incorrect. This patch applies a hacky solution to resolve this issue. The work around is to store the location of the context menu from a MouseDown event. The position is measured form the global coordinates of the mouse event and the boundaries of the owner's view. BUG=470087 Committed: https://crrev.com/b205e53f3aa9a741f4dffa5726992976c517f6ee Cr-Commit-Position: refs/heads/master@{#347195}

Patch Set 1 #

Total comments: 6

Patch Set 2 : #

Patch Set 3 : Added Some Comments. #

Patch Set 4 : Added TODO(ekaramad) #

Patch Set 5 : Changed BUG URL -> BUG=ID and Updated Comments. #

Patch Set 6 : Test #

Patch Set 7 : Fixed Test Name #

Total comments: 14

Patch Set 8 : #

Patch Set 9 : Rebase #

Patch Set 10 : Fixed a Build Error in MAC #

Unified diffs Side-by-side diffs Delta from patch set Stats (+146 lines, -12 lines) Patch
M chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +53 lines, -1 line 0 comments Download
M chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h View 1 2 3 4 5 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc View 1 2 3 4 5 2 chunks +20 lines, -1 line 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/context_menus/coordinates_with_transforms/embedder.html View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/context_menus/coordinates_with_transforms/embedder.js View 1 2 3 4 5 6 7 2 chunks +9 lines, -6 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/context_menus/coordinates_with_transforms/manifest.json View 1 2 3 4 5 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/context_menus/coordinates_with_transforms/test.js View 1 2 3 4 5 1 chunk +6 lines, -1 line 0 comments Download
M components/guest_view/browser/guest_view_base.h View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -1 line 0 comments Download
M components/guest_view/browser/guest_view_base.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.h View 1 2 3 4 5 6 7 8 1 chunk +11 lines, -0 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest.cc View 1 2 3 4 5 6 7 8 1 chunk +18 lines, -2 lines 0 comments Download
M content/public/browser/browser_plugin_guest_delegate.h View 1 chunk +6 lines, -0 lines 0 comments Download
M extensions/browser/guest_view/web_view/web_view_guest.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M extensions/browser/guest_view/web_view/web_view_guest.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M extensions/browser/guest_view/web_view/web_view_guest_delegate.h View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 43 (13 generated)
Ehsaan
paulmeyer@chromium.org: Please review changes in wjmaclean@chromium.org: Please review changes in lazyboy@chromium.org: Please review changes in ...
5 years, 4 months ago (2015-08-15 05:00:10 UTC) #2
wjmaclean
https://codereview.chromium.org/1293963002/diff/1/content/browser/browser_plugin/browser_plugin_guest.h File content/browser/browser_plugin/browser_plugin_guest.h (right): https://codereview.chromium.org/1293963002/diff/1/content/browser/browser_plugin/browser_plugin_guest.h#newcode446 content/browser/browser_plugin/browser_plugin_guest.h:446: gfx::Point context_menu_position_; Why do we have this? It doesn't ...
5 years, 4 months ago (2015-08-17 13:05:23 UTC) #3
Ehsaan
https://codereview.chromium.org/1293963002/diff/1/content/browser/browser_plugin/browser_plugin_guest.h File content/browser/browser_plugin/browser_plugin_guest.h (right): https://codereview.chromium.org/1293963002/diff/1/content/browser/browser_plugin/browser_plugin_guest.h#newcode446 content/browser/browser_plugin/browser_plugin_guest.h:446: gfx::Point context_menu_position_; My mistake! I was initially setting this ...
5 years, 4 months ago (2015-08-17 14:09:13 UTC) #4
wjmaclean
On 2015/08/17 14:09:13, Ehsaan wrote: > https://codereview.chromium.org/1293963002/diff/1/content/browser/browser_plugin/browser_plugin_guest.h > File content/browser/browser_plugin/browser_plugin_guest.h (right): > > https://codereview.chromium.org/1293963002/diff/1/content/browser/browser_plugin/browser_plugin_guest.h#newcode446 > ...
5 years, 4 months ago (2015-08-18 14:33:40 UTC) #5
Ehsaan
Thanks wjmaclean@! @lazyboy|paulmeyer|fsamuel: PTAL.
5 years, 4 months ago (2015-08-25 16:36:21 UTC) #6
Ehsaan
sievers@chromium.org: Please review changes in
5 years, 4 months ago (2015-08-25 16:37:14 UTC) #8
Ehsaan
On 2015/08/25 16:37:14, Ehsaan wrote: > mailto:sievers@chromium.org: Please review changes in +sievers@ for the missing ...
5 years, 4 months ago (2015-08-25 16:37:58 UTC) #9
no sievers
On 2015/08/25 16:37:58, Ehsaan wrote: > On 2015/08/25 16:37:14, Ehsaan wrote: > > mailto:sievers@chromium.org: Please ...
5 years, 4 months ago (2015-08-25 22:06:54 UTC) #10
Ehsaan
On 2015/08/25 22:06:54, sievers wrote: > On 2015/08/25 16:37:58, Ehsaan wrote: > > On 2015/08/25 ...
5 years, 4 months ago (2015-08-25 22:15:38 UTC) #11
Ehsaan
PTAL.
5 years, 4 months ago (2015-08-25 22:15:46 UTC) #12
no sievers
On 2015/08/25 22:15:46, Ehsaan wrote: > PTAL. lgtm, though a bug id would be even ...
5 years, 4 months ago (2015-08-25 22:36:07 UTC) #13
no sievers
On 2015/08/25 22:15:46, Ehsaan wrote: > PTAL. lgtm, though a bug id would be even ...
5 years, 4 months ago (2015-08-25 22:36:08 UTC) #14
Ehsaan
On 2015/08/25 22:36:08, sievers wrote: > On 2015/08/25 22:15:46, Ehsaan wrote: > > PTAL. > ...
5 years, 3 months ago (2015-08-26 14:48:14 UTC) #15
Ehsaan
PTAL.
5 years, 3 months ago (2015-08-26 14:48:30 UTC) #16
no sievers
still lgtm
5 years, 3 months ago (2015-08-26 18:39:14 UTC) #17
Ehsaan
PTAL. +lazyboy for the missing permissions.
5 years, 3 months ago (2015-09-01 19:13:43 UTC) #19
lazyboy
Some comments for the test, mostly nits, thanks for the test! https://codereview.chromium.org/1293963002/diff/120001/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc File chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc (right): ...
5 years, 3 months ago (2015-09-01 19:45:47 UTC) #20
Ehsaan
PTAL. https://codereview.chromium.org/1293963002/diff/120001/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc File chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc (right): https://codereview.chromium.org/1293963002/diff/120001/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc#newcode292 chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc:292: mouse_event.globalX = x + rwh->GetView()->GetViewBounds().x(); On 2015/09/01 19:45:46, ...
5 years, 3 months ago (2015-09-02 15:18:20 UTC) #21
lazyboy
lgtm
5 years, 3 months ago (2015-09-02 15:33:40 UTC) #22
EhsanK
+fsamuel for missing owner's lgtm. PTAL.
5 years, 3 months ago (2015-09-02 15:34:56 UTC) #24
Fady Samuel
lgtm
5 years, 3 months ago (2015-09-02 15:59:39 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/1293963002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1293963002/140001
5 years, 3 months ago (2015-09-02 16:01:47 UTC) #27
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/93314)
5 years, 3 months ago (2015-09-02 16:03:37 UTC) #29
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1293963002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1293963002/160001
5 years, 3 months ago (2015-09-02 20:28:53 UTC) #31
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/108195)
5 years, 3 months ago (2015-09-02 20:50:51 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1293963002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1293963002/160001
5 years, 3 months ago (2015-09-03 14:23:58 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/108575)
5 years, 3 months ago (2015-09-03 14:44:36 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1293963002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1293963002/180001
5 years, 3 months ago (2015-09-03 15:57:18 UTC) #41
commit-bot: I haz the power
Committed patchset #10 (id:180001)
5 years, 3 months ago (2015-09-03 18:26:11 UTC) #42
commit-bot: I haz the power
5 years, 3 months ago (2015-09-03 18:26:46 UTC) #43
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/b205e53f3aa9a741f4dffa5726992976c517f6ee
Cr-Commit-Position: refs/heads/master@{#347195}

Powered by Google App Engine
This is Rietveld 408576698