Chromium Code Reviews| 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; |
| } |