mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-24 21:58:06 +00:00
Bug 300808 - When content is removed from the document the corresponding tooltip should not appear, r=neil, sr=bzbarsky
This commit is contained in:
parent
8205c52d84
commit
d3c534ab22
@ -3734,6 +3734,27 @@ nsBrowserStatusHandler.prototype =
|
||||
|
||||
onLocationChange : function(aWebProgress, aRequest, aLocation)
|
||||
{
|
||||
|
||||
if (document.tooltipNode) {
|
||||
// Optimise for the common case
|
||||
if (aWebProgress.DOMWindow == content) {
|
||||
document.getElementById("aHTMLTooltip").hidePopup();
|
||||
document.tooltipNode = null;
|
||||
}
|
||||
else {
|
||||
for (var tooltipWindow =
|
||||
document.tooltipNode.target.ownerDocument.defaultView;
|
||||
tooltipWindow != tooltipWindow.parent;
|
||||
tooltipWindow = tooltipWindow.parent) {
|
||||
if (tooltipWindow == aWebProgress.DOMWindow) {
|
||||
document.getElementById("aHTMLTooltip").hidePopup();
|
||||
document.tooltipNode = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This code here does not compare uris exactly when determining
|
||||
// whether or not the message should be hidden since the message
|
||||
// may be prematurely hidden when an install is invoked by a click
|
||||
|
@ -271,6 +271,25 @@ nsBrowserStatusHandler.prototype =
|
||||
}
|
||||
}
|
||||
|
||||
if (document.tooltipNode) {
|
||||
// Optimise for the common case
|
||||
if (aWebProgress.DOMWindow == content) {
|
||||
document.getElementById("aHTMLTooltip").hidePopup();
|
||||
document.tooltipNode = null;
|
||||
} else {
|
||||
for (var tooltipWindow =
|
||||
document.tooltipNode.target.ownerDocument.defaultView;
|
||||
tooltipWindow != tooltipWindow.parent;
|
||||
tooltipWindow = tooltipWindow.parent) {
|
||||
if (tooltipWindow == aWebProgress.DOMWindow) {
|
||||
document.getElementById("aHTMLTooltip").hidePopup();
|
||||
document.tooltipNode = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// XXX temporary hack for bug 104532.
|
||||
// Depends heavily on setOverLink implementation
|
||||
if (!aRequest)
|
||||
|
Loading…
x
Reference in New Issue
Block a user