зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1380294: Anchor non-tab tooltips to the correct remote browser. r=aswan
MozReview-Commit-ID: EsJEseyfGYi --HG-- extra : rebase_source : 3b1adbb8d977fd4dfd18c90b335010d4acb80a76
This commit is contained in:
Родитель
5f641b641b
Коммит
3a6f096a97
|
@ -4497,7 +4497,7 @@ var XULBrowserWindow = {
|
|||
LinkTargetDisplay.update();
|
||||
},
|
||||
|
||||
showTooltip(x, y, tooltip, direction) {
|
||||
showTooltip(x, y, tooltip, direction, browser) {
|
||||
if (Cc["@mozilla.org/widget/dragservice;1"].getService(Ci.nsIDragService).
|
||||
getCurrentSession()) {
|
||||
return;
|
||||
|
@ -4509,8 +4509,7 @@ var XULBrowserWindow = {
|
|||
elt.label = tooltip;
|
||||
elt.style.direction = direction;
|
||||
|
||||
let anchor = gBrowser.selectedBrowser;
|
||||
elt.openPopupAtScreen(anchor.boxObject.screenX + x, anchor.boxObject.screenY + y, false, null);
|
||||
elt.openPopupAtScreen(browser.boxObject.screenX + x, browser.boxObject.screenY + y, false, null);
|
||||
},
|
||||
|
||||
hideTooltip() {
|
||||
|
|
|
@ -1718,7 +1718,11 @@ TabParent::RecvShowTooltip(const uint32_t& aX, const uint32_t& aY, const nsStrin
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
xulBrowserWindow->ShowTooltip(aX, aY, aTooltip, aDirection);
|
||||
nsCOMPtr<nsIFrameLoaderOwner> frame = do_QueryInterface(mFrameElement);
|
||||
if (!frame)
|
||||
return IPC_OK();
|
||||
|
||||
xulBrowserWindow->ShowTooltip(aX, aY, aTooltip, aDirection, frame);
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ interface nsIRequest;
|
|||
interface nsIDOMElement;
|
||||
interface nsIInputStream;
|
||||
interface nsIDocShell;
|
||||
interface nsIFrameLoaderOwner;
|
||||
interface nsITabParent;
|
||||
interface nsIPrincipal;
|
||||
interface mozIDOMWindowProxy;
|
||||
|
@ -76,7 +77,8 @@ interface nsIXULBrowserWindow : nsISupports
|
|||
/**
|
||||
* Show/hide a tooltip (when the user mouses over a link, say).
|
||||
*/
|
||||
void showTooltip(in long x, in long y, in AString tooltip, in AString direction);
|
||||
void showTooltip(in long x, in long y, in AString tooltip, in AString direction,
|
||||
in nsIFrameLoaderOwner browser);
|
||||
void hideTooltip();
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче