| Index: content/renderer/browser_plugin/browser_plugin.cc
|
| diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
|
| index bf00133939ade5f614435343523eec7634106a66..504aeb80a246bef8867feb15425920102923a34d 100644
|
| --- a/content/renderer/browser_plugin/browser_plugin.cc
|
| +++ b/content/renderer/browser_plugin/browser_plugin.cc
|
| @@ -391,9 +391,13 @@ void BrowserPlugin::updateGeometry(const WebRect& plugin_rect_in_viewport,
|
| gfx::Rect old_view_rect = view_rect_;
|
| // Convert the plugin_rect_in_viewport to window coordinates, which is css.
|
| WebRect rect_in_css(plugin_rect_in_viewport);
|
| - blink::WebView* webview = container()->document().frame()->view();
|
| - RenderViewImpl::FromWebView(webview)->GetWidget()->convertViewportToWindow(
|
| - &rect_in_css);
|
| +
|
| + // We will use the local root's RenderWidget to convert coordinates to Window.
|
| + // If this local root belongs to an OOPIF, on the browser side we will have to
|
| + // consider the displacement of the child frame in root window.
|
| + RenderFrameImpl::FromWebFrame(container()->document().frame())
|
| + ->GetRenderWidget()
|
| + ->convertViewportToWindow(&rect_in_css);
|
| view_rect_ = rect_in_css;
|
|
|
| if (!ready_) {
|
|
|