mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 14:55:47 +00:00
Bug 693551 - Old tooltip appears when the SVG object that the mouse is over is removed. r=dao
This commit is contained in:
parent
20a57fd11d
commit
a5462d9382
@ -3011,9 +3011,10 @@ function getMarkupDocumentViewer()
|
||||
function FillInHTMLTooltip(tipElement)
|
||||
{
|
||||
var retVal = false;
|
||||
// Don't show the tooltip if the tooltip node is a XUL element or a document.
|
||||
// Don't show the tooltip if the tooltip node is a XUL element, a document or is disconnected.
|
||||
if (tipElement.namespaceURI == "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" ||
|
||||
!tipElement.ownerDocument)
|
||||
!tipElement.ownerDocument ||
|
||||
tipElement.ownerDocument.compareDocumentPosition(tipElement) == document.DOCUMENT_POSITION_DISCONNECTED)
|
||||
return retVal;
|
||||
|
||||
const XLinkNS = "http://www.w3.org/1999/xlink";
|
||||
@ -3041,10 +3042,10 @@ function FillInHTMLTooltip(tipElement)
|
||||
while (!titleText && !XLinkTitleText && !SVGTitleText && tipElement) {
|
||||
if (tipElement.nodeType == Node.ELEMENT_NODE) {
|
||||
titleText = tipElement.getAttribute("title");
|
||||
if ((tipElement instanceof HTMLAnchorElement && tipElement.href) ||
|
||||
(tipElement instanceof HTMLAreaElement && tipElement.href) ||
|
||||
(tipElement instanceof HTMLLinkElement && tipElement.href) ||
|
||||
(tipElement instanceof SVGAElement && tipElement.hasAttributeNS(XLinkNS, "href"))) {
|
||||
if ((tipElement instanceof HTMLAnchorElement ||
|
||||
tipElement instanceof HTMLAreaElement ||
|
||||
tipElement instanceof HTMLLinkElement ||
|
||||
tipElement instanceof SVGAElement) && tipElement.href) {
|
||||
XLinkTitleText = tipElement.getAttributeNS(XLinkNS, "title");
|
||||
}
|
||||
if (lookingForSVGTitle &&
|
||||
|
Loading…
Reference in New Issue
Block a user