From 0351870a895798efb875c0f52b70c94508498dc5 Mon Sep 17 00:00:00 2001 From: Bill McCloskey Date: Fri, 28 Feb 2014 16:58:52 -0800 Subject: [PATCH] Bug 976772 - [e10s] Make sure context menu appears at the right place, even in a subframe (r=felipe) --- browser/base/content/tabbrowser.xml | 7 +++---- toolkit/content/widgets/browser.xml | 19 +++++++++++++++++++ toolkit/content/widgets/remote-browser.xml | 21 +++++++++++++++++++++ 3 files changed, 43 insertions(+), 4 deletions(-) diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index deb9874198b7..00d693ff8e77 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -2996,10 +2996,9 @@ gContextMenuContentData = { event: aMessage.objects.event, browser: browser }; let popup = browser.ownerDocument.getElementById("contentAreaContextMenu"); - popup.openPopup(browser, "overlap", - gContextMenuContentData.event.clientX, - gContextMenuContentData.event.clientY, - true, false, null); + let event = gContextMenuContentData.event; + let pos = browser.mapScreenCoordinatesFromContent(event.screenX, event.screenY); + popup.openPopupAtScreen(pos.x, pos.y, true); break; } case "DOMWebNotificationClicked": { diff --git a/toolkit/content/widgets/browser.xml b/toolkit/content/widgets/browser.xml index ca7ee70da943..965f1cab66c5 100644 --- a/toolkit/content/widgets/browser.xml +++ b/toolkit/content/widgets/browser.xml @@ -1177,6 +1177,25 @@ + + + + + + + + + diff --git a/toolkit/content/widgets/remote-browser.xml b/toolkit/content/widgets/remote-browser.xml index a76cb6247cdc..69deb103575d 100644 --- a/toolkit/content/widgets/remote-browser.xml +++ b/toolkit/content/widgets/remote-browser.xml @@ -237,6 +237,27 @@ ]]> + + + + + + + + +