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

Issue 2544223002: Fix the position of context menu for BrowserPlugins inside OOPIF (Closed)

Created:
4 years ago by EhsanK
Modified:
3 years, 11 months ago
Reviewers:
kenrb, Charlie Reis, alexmos, lfg
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 the position of context menu for BrowserPlugins inside OOPIF Currently, we do not consider the displacement of OOPIF view on page when update the geomtery of BrowserPluginGuest. This causes the context menu offset (the displacement between WebContents's) to be wrong. This CL will make the following changes to fix this issue: 1- The reported rect in OnUpdateGeometry() is transformed to owner view's coordinate space. 2- We make sure BrowserPlugin does its own conversions using RenderWidget of the local root containing the BrowserPlugin (as opposed to the RenderView which seems wrong). 3- We make sure BrowserPlugin updates geometry when it is attached. BUG=670433 Review-Url: https://codereview.chromium.org/2544223002 Cr-Commit-Position: refs/heads/master@{#446448} Committed: https://chromium.googlesource.com/chromium/src/+/aeddbee1c18102e37b5dc083c99a337e12afa759

Patch Set 1 #

Patch Set 2 : Use attach params for initializing |guest_window_rect_| #

Total comments: 2

Patch Set 3 : Addressing lfg@'s comments #

Total comments: 3

Patch Set 4 : Moving the test to interactive ui #

Patch Set 5 : Wait for navigation finish before sending mouse events #

Patch Set 6 : Fix compile issue + Observing navigation start as opposed to end #

Total comments: 12

Patch Set 7 : Addressed some of the comments #

Patch Set 8 : Nits #

Patch Set 9 : Rebased #

Patch Set 10 : Rebased #

Patch Set 11 : Rebase Fix + Using FinishNavigation #

Patch Set 12 : Define the mime type in the test html #

Total comments: 11

Patch Set 13 : Addressing creis@'s comments + Reorganizing the test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+167 lines, -5 lines) Patch
M chrome/browser/site_per_process_interactive_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +139 lines, -0 lines 0 comments Download
M chrome/test/data/page_with_embedded_pdf.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +15 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_view_guest.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/browser_plugin/browser_plugin.cc View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -3 lines 0 comments Download

Messages

Total messages: 68 (42 generated)
EhsanK
Charlie, could you please review this CL? Thanks!
4 years ago (2016-12-02 23:47:41 UTC) #5
Charlie Reis
Thanks! I can give an owner's stamp, but I don't know the coordinate code well ...
4 years ago (2016-12-03 00:08:41 UTC) #7
EhsanK
Thanks! lfg@, kenrb@: Could you please take a look? Thanks!
4 years ago (2016-12-03 00:31:09 UTC) #8
EhsanK
On 2016/12/03 00:31:09, EhsanK wrote: > Thanks! > > lfg@, kenrb@: Could you please take ...
4 years ago (2016-12-05 19:24:44 UTC) #11
lfg
I'm a bit confused and have some questions. https://codereview.chromium.org/2544223002/diff/20001/content/browser/browser_plugin/browser_plugin_guest.cc File content/browser/browser_plugin/browser_plugin_guest.cc (right): https://codereview.chromium.org/2544223002/diff/20001/content/browser/browser_plugin/browser_plugin_guest.cc#newcode474 content/browser/browser_plugin/browser_plugin_guest.cc:474: gfx::Vector2d ...
4 years ago (2016-12-05 19:44:18 UTC) #12
EhsanK
Thanks Lucas! PTAL. I added a browser test. The type of test added is more ...
4 years ago (2016-12-06 00:08:54 UTC) #14
lfg
Thanks, one more question. https://codereview.chromium.org/2544223002/diff/40001/content/browser/web_contents/web_contents_view_guest.cc File content/browser/web_contents/web_contents_view_guest.cc (left): https://codereview.chromium.org/2544223002/diff/40001/content/browser/web_contents/web_contents_view_guest.cc#oldcode95 content/browser/web_contents/web_contents_view_guest.cc:95: gfx::Point guest_coordinates = guest_->GetScreenCoordinates(gfx::Point()); Will ...
4 years ago (2016-12-06 00:23:53 UTC) #16
EhsanK
Thanks! PTAL. https://codereview.chromium.org/2544223002/diff/40001/content/browser/web_contents/web_contents_view_guest.cc File content/browser/web_contents/web_contents_view_guest.cc (left): https://codereview.chromium.org/2544223002/diff/40001/content/browser/web_contents/web_contents_view_guest.cc#oldcode95 content/browser/web_contents/web_contents_view_guest.cc:95: gfx::Point guest_coordinates = guest_->GetScreenCoordinates(gfx::Point()); On 2016/12/06 00:23:53, ...
4 years ago (2016-12-06 01:00:12 UTC) #17
lfg
Thanks, lgtm. https://codereview.chromium.org/2544223002/diff/40001/content/browser/web_contents/web_contents_view_guest.cc File content/browser/web_contents/web_contents_view_guest.cc (left): https://codereview.chromium.org/2544223002/diff/40001/content/browser/web_contents/web_contents_view_guest.cc#oldcode95 content/browser/web_contents/web_contents_view_guest.cc:95: gfx::Point guest_coordinates = guest_->GetScreenCoordinates(gfx::Point()); On 2016/12/06 01:00:12, ...
4 years ago (2016-12-06 01:22:26 UTC) #20
Charlie Reis
Thanks, LGTM given lfg's review. (I'm an owner of the test file as well, so ...
4 years ago (2016-12-08 18:16:45 UTC) #21
EhsanK
On 2016/12/08 18:16:45, Charlie Reis wrote: > Thanks, LGTM given lfg's review. (I'm an owner ...
4 years ago (2016-12-08 18:28:16 UTC) #22
EhsanK
I moved the test to 'site_per_process_interactive_browsertest.cc' which made the windows bot green. adding alexmos@ review/owner ...
4 years ago (2016-12-08 20:17:19 UTC) #26
Charlie Reis
I'm an owner of that file as well (see chrome/browser/OWNERS). If it's just a move ...
4 years ago (2016-12-08 21:44:53 UTC) #29
EhsanK
Thanks Charlie. Well...the test is probably racy. I need to make some changes to it ...
4 years ago (2016-12-08 22:52:18 UTC) #30
EhsanK
Charlie, PTAL. I had to change the test to make it work on Windows. The ...
4 years ago (2016-12-13 01:36:27 UTC) #37
Charlie Reis
Sorry, this doesn't look good, assuming the context menu is supposed to run on the ...
4 years ago (2016-12-13 19:20:49 UTC) #42
EhsanK
Thanks Charlie for the reviews! I have replied to you comments but the outstanding issue ...
4 years ago (2016-12-13 20:32:00 UTC) #43
Charlie Reis
I'm explaining my concerns a bit more below, but it sounds like maybe they're aren't ...
4 years ago (2016-12-15 23:07:19 UTC) #44
EhsanK
Thanks Charlie and sorry it took so long. Unfortunately, the test is not fixed and ...
3 years, 11 months ago (2017-01-25 18:48:50 UTC) #49
EhsanK
I made a small change in the HTML file for test and things seem OK ...
3 years, 11 months ago (2017-01-25 20:37:19 UTC) #54
Charlie Reis
On 2017/01/25 20:37:19, EhsanK wrote: > I made a small change in the HTML file ...
3 years, 11 months ago (2017-01-25 21:27:02 UTC) #55
EhsanK
Thanks Charlie! PTAL. https://codereview.chromium.org/2544223002/diff/220001/chrome/browser/site_per_process_interactive_browsertest.cc File chrome/browser/site_per_process_interactive_browsertest.cc (right): https://codereview.chromium.org/2544223002/diff/220001/chrome/browser/site_per_process_interactive_browsertest.cc#newcode812 chrome/browser/site_per_process_interactive_browsertest.cc:812: // start. On 2017/01/25 21:27:02, Charlie ...
3 years, 11 months ago (2017-01-26 15:47:03 UTC) #58
Charlie Reis
Thanks! LGTM. https://codereview.chromium.org/2544223002/diff/220001/chrome/browser/site_per_process_interactive_browsertest.cc File chrome/browser/site_per_process_interactive_browsertest.cc (right): https://codereview.chromium.org/2544223002/diff/220001/chrome/browser/site_per_process_interactive_browsertest.cc#newcode891 chrome/browser/site_per_process_interactive_browsertest.cc:891: navigation_observer.Wait(); On 2017/01/26 15:47:03, EhsanK wrote: > ...
3 years, 11 months ago (2017-01-26 20:50:41 UTC) #61
EhsanK
Thanks! Trying to CQ soon.
3 years, 11 months ago (2017-01-26 21:10:44 UTC) #62
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/2544223002/240001
3 years, 11 months ago (2017-01-26 21:11:12 UTC) #65
commit-bot: I haz the power
3 years, 11 months ago (2017-01-26 21:18:07 UTC) #68
Message was sent while issue was closed.
Committed patchset #13 (id:240001) as
https://chromium.googlesource.com/chromium/src/+/aeddbee1c18102e37b5dc083c99a...

Powered by Google App Engine
This is Rietveld 408576698