| Index: content/browser/web_contents/web_contents_view_guest.cc
|
| diff --git a/content/browser/web_contents/web_contents_view_guest.cc b/content/browser/web_contents/web_contents_view_guest.cc
|
| index c8946fcc2298bc2f9609f91a1d2b3c676a1899da..efa92bdc0ee4ae7421bf6e52c1c51dc31371b905 100644
|
| --- a/content/browser/web_contents/web_contents_view_guest.cc
|
| +++ b/content/browser/web_contents/web_contents_view_guest.cc
|
| @@ -73,12 +73,8 @@ void WebContentsViewGuest::OnGuestInitialized(WebContentsView* parent_view) {
|
|
|
| ContextMenuParams WebContentsViewGuest::ConvertContextMenuParams(
|
| const ContextMenuParams& params) const {
|
| -#if defined(USE_AURA)
|
| - // Context menu uses ScreenPositionClient::ConvertPointToScreen() in aura
|
| - // to calculate popup position. Guest's native view
|
| - // (platform_view_->GetNativeView()) is part of the embedder's view hierarchy,
|
| - // but is placed at (0, 0) w.r.t. the embedder's position. Therefore, |offset|
|
| - // is added to |params|.
|
| + // We need to add |offset| of the guest from the embedder to position the
|
| + // menu properly.
|
| gfx::Rect embedder_bounds;
|
| guest_->embedder_web_contents()->GetView()->GetContainerBounds(
|
| &embedder_bounds);
|
| @@ -90,9 +86,6 @@ ContextMenuParams WebContentsViewGuest::ConvertContextMenuParams(
|
| params_in_embedder.x += offset.x();
|
| params_in_embedder.y += offset.y();
|
| return params_in_embedder;
|
| -#else
|
| - return params;
|
| -#endif
|
| }
|
|
|
| void WebContentsViewGuest::GetContainerBounds(gfx::Rect* out) const {
|
|
|