зеркало из https://github.com/mozilla/gecko-dev.git
Bug 117857: window.status overwrites URL of link you are hovering over
Bug 99009: setting window.status from onmouseover doesn't work for links r=bryner, timeless, sr=jst, a=asa
This commit is contained in:
Родитель
cf74ccbb3a
Коммит
520175690b
|
@ -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<nsILink> link = do_QueryInterface(aOuter);
|
||||
if (!link)
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
|
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче