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

Issue 1237343002: Fix nested GuestView's container bounds calculation. (Closed)

Created:
5 years, 5 months ago by lazyboy
Modified:
5 years, 5 months ago
Reviewers:
Fady Samuel, raymes
CC:
chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix nested GuestView's container bounds calculation. This results in incorrect context menu positioning in pdf in webview or webview inside appview. If a guest A is nested within an embedder B, which in turn is nested inside an embedder C, then we used to add offset twice to calculate the bounds of A because BrowserPluginGuest::GetScreenCoordinates would add: 1. offset of C from A and 2. offset of B from A. This CL removes step #2. From logs, it seems to be there from the beginning of appview implementation. BUG=507223 Test=Load a PDF inside <webview> and check context menu inside the PDF. Easier to test with the browser sample: https://github.com/GoogleChrome/chrome-app-samples/tree/master/samples/webview-samples/browser You should observe the context menu is shown in the right place instead of it being shifted. Committed: https://crrev.com/87a98e428afa9dff6d02ff37d1504411d40fda3d Cr-Commit-Position: refs/heads/master@{#339635}

Patch Set 1 #

Patch Set 2 : clean up code a bit #

Patch Set 3 : update and add test #

Patch Set 4 : sync #

Patch Set 5 : betterfix #

Total comments: 2

Patch Set 6 : pdf_extension_util -> pdf_extension_test_util #

Total comments: 2

Patch Set 7 : addres comments from raymes #

Patch Set 8 : fix type mismatch for win_x64 compile #

Unified diffs Side-by-side diffs Delta from patch set Stats (+132 lines, -36 lines) Patch
M chrome/browser/apps/guest_view/web_view_browsertest.cc View 1 2 3 4 5 2 chunks +24 lines, -0 lines 0 comments Download
M chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/pdf/pdf_extension_test.cc View 1 2 3 4 5 3 chunks +3 lines, -18 lines 0 comments Download
A chrome/browser/pdf/pdf_extension_test_util.h View 1 2 3 4 5 6 1 chunk +22 lines, -0 lines 0 comments Download
A chrome/browser/pdf/pdf_extension_test_util.cc View 1 2 3 4 5 1 chunk +32 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/platform_apps/web_view/shim/main.js View 1 2 2 chunks +13 lines, -1 line 0 comments Download
M components/guest_view/browser/test_guest_view_manager.h View 1 2 3 4 5 6 7 4 chunks +10 lines, -4 lines 0 comments Download
M components/guest_view/browser/test_guest_view_manager.cc View 1 2 3 chunks +25 lines, -7 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.cc View 1 2 3 4 1 chunk +0 lines, -5 lines 0 comments Download

Messages

Total messages: 12 (3 generated)
lazyboy
+fsamuel for BrowserPluginGuest, +raymes for test related changes in chrome/browser/pdf/*
5 years, 5 months ago (2015-07-21 01:12:47 UTC) #2
raymes
Thanks :) https://chromiumcodereview.appspot.com/1237343002/diff/80001/chrome/browser/pdf/pdf_extension_util.cc File chrome/browser/pdf/pdf_extension_util.cc (right): https://chromiumcodereview.appspot.com/1237343002/diff/80001/chrome/browser/pdf/pdf_extension_util.cc#newcode53 chrome/browser/pdf/pdf_extension_util.cc:53: bool EnsurePDFHasLoaded(content::WebContents* web_contents) { This file is ...
5 years, 5 months ago (2015-07-21 01:20:14 UTC) #3
lazyboy
https://chromiumcodereview.appspot.com/1237343002/diff/80001/chrome/browser/pdf/pdf_extension_util.cc File chrome/browser/pdf/pdf_extension_util.cc (right): https://chromiumcodereview.appspot.com/1237343002/diff/80001/chrome/browser/pdf/pdf_extension_util.cc#newcode53 chrome/browser/pdf/pdf_extension_util.cc:53: bool EnsurePDFHasLoaded(content::WebContents* web_contents) { On 2015/07/21 at 01:20:14, raymes ...
5 years, 5 months ago (2015-07-21 03:55:06 UTC) #4
raymes
lgtm https://chromiumcodereview.appspot.com/1237343002/diff/100001/chrome/browser/pdf/pdf_extension_test_util.h File chrome/browser/pdf/pdf_extension_test_util.h (right): https://chromiumcodereview.appspot.com/1237343002/diff/100001/chrome/browser/pdf/pdf_extension_test_util.h#newcode18 chrome/browser/pdf/pdf_extension_test_util.h:18: // BrowserPluginGuest to ensure the PDFScriptingAPI works correctly ...
5 years, 5 months ago (2015-07-21 04:20:36 UTC) #5
Fady Samuel
lgtm
5 years, 5 months ago (2015-07-21 04:21:58 UTC) #6
lazyboy
https://chromiumcodereview.appspot.com/1237343002/diff/100001/chrome/browser/pdf/pdf_extension_test_util.h File chrome/browser/pdf/pdf_extension_test_util.h (right): https://chromiumcodereview.appspot.com/1237343002/diff/100001/chrome/browser/pdf/pdf_extension_test_util.h#newcode18 chrome/browser/pdf/pdf_extension_test_util.h:18: // BrowserPluginGuest to ensure the PDFScriptingAPI works correctly from ...
5 years, 5 months ago (2015-07-21 06:32:23 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1237343002/140001
5 years, 5 months ago (2015-07-21 07:33:28 UTC) #10
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years, 5 months ago (2015-07-21 10:12:16 UTC) #11
commit-bot: I haz the power
5 years, 5 months ago (2015-07-21 10:13:33 UTC) #12
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/87a98e428afa9dff6d02ff37d1504411d40fda3d
Cr-Commit-Position: refs/heads/master@{#339635}

Powered by Google App Engine
This is Rietveld 408576698