diff --git a/content/html/content/src/nsGenericHTMLElement.cpp b/content/html/content/src/nsGenericHTMLElement.cpp index 5ce205c64206..445e7c58cedb 100644 --- a/content/html/content/src/nsGenericHTMLElement.cpp +++ b/content/html/content/src/nsGenericHTMLElement.cpp @@ -1352,13 +1352,19 @@ nsGenericHTMLElement::HandleDOMEventForAnchors(nsIContent* aOuter, } } - if ((NS_OK == ret) && (aEvent->message == NS_MOUSE_ENTER_SYNTH || - aEvent->message == NS_MOUSE_EXIT_SYNTH || - nsEventStatus_eIgnore == *aEventStatus) && + if (NS_FAILED(ret)) + return ret; + + if ((*aEventStatus == nsEventStatus_eIgnore || + (*aEventStatus != nsEventStatus_eConsumeNoDefault && + (aEvent->message == NS_MOUSE_ENTER_SYNTH || + aEvent->message == NS_MOUSE_EXIT_SYNTH))) && !(aFlags & NS_EVENT_FLAG_CAPTURE)) { + // If we're here, then aOuter should be an nsILink. We'll use the // nsILink interface to get a canonified URL that has been // correctly escaped and URL-encoded for the document's charset. + nsCOMPtr link = do_QueryInterface(aOuter); if (!link) return NS_ERROR_UNEXPECTED; diff --git a/xpfe/browser/resources/content/nsBrowserStatusHandler.js b/xpfe/browser/resources/content/nsBrowserStatusHandler.js index f36e0ccd227d..9f018420130c 100644 --- a/xpfe/browser/resources/content/nsBrowserStatusHandler.js +++ b/xpfe/browser/resources/content/nsBrowserStatusHandler.js @@ -147,13 +147,11 @@ nsBrowserStatusHandler.prototype = { this.overLink = link; this.updateStatusField(); - // set empty so defaults show up next change - this.overLink = ""; }, updateStatusField : function() { - var text = this.jsStatus || this.overLink || this.status || this.jsDefaultStatus || this.defaultStatus; + var text = this.overLink || this.status || this.jsStatus || this.jsDefaultStatus || this.defaultStatus; // check the current value so we don't trigger an attribute change // and cause needless (slow!) UI updates @@ -280,6 +278,8 @@ nsBrowserStatusHandler.prototype = onLocationChange : function(aWebProgress, aRequest, aLocation) { + this.setOverLink("", null); + var location = aLocation.spec; if (this.hideAboutBlank) {