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

Unified Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 2886013002: Enable WebViewTest.NestedGuestContainerBounds for --site-per-process (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/apps/guest_view/web_view_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_plugin/browser_plugin_guest.cc
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
index 4114d6535131c6b5b97f4c115020c1b58ea88c4e..8f26ef0690081c2eabc1add1f64474f37874be78 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -486,6 +486,14 @@ gfx::Point BrowserPluginGuest::GetCoordinatesInEmbedderWebContents(
point +=
owner_rwhv->TransformPointToRootCoordSpace(guest_window_rect_.origin())
.OffsetFromOrigin();
+ if (embedder_web_contents()->GetBrowserPluginGuest()) {
+ // |point| is currently with respect to the top-most view (outermost
+ // WebContents). We should subtract a displacement to find the point with
+ // resepct to embedder's WebContents.
+ point -= owner_rwhv->TransformPointToRootCoordSpace(gfx::Point())
+ .OffsetFromOrigin();
lfg 2017/05/17 18:03:24 Is this plus the transformation above the same as
EhsanK 2017/05/17 18:22:49 Yes exactly.
+ }
+
return point;
}
« no previous file with comments | « chrome/browser/apps/guest_view/web_view_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698