mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
Fixing bug 79133 (by working around the real problem). Image onerror events cause window.onerror handlers to be called since the events bubble up the tree. r=brendan@mozilla.org, sr=vidur@netscape.com
This commit is contained in:
parent
80a791c8d0
commit
1e7717abdd
@ -1797,7 +1797,8 @@ nsGenericElement::HandleDOMEvent(nsIPresContext* aPresContext,
|
||||
PRBool intermediateCapture = PR_FALSE;
|
||||
//Capturing stage evaluation
|
||||
if (NS_EVENT_FLAG_BUBBLE != aFlags && aEvent->message != NS_PAGE_LOAD
|
||||
&& aEvent->message != NS_SCRIPT_LOAD) {
|
||||
&& aEvent->message != NS_SCRIPT_LOAD &&
|
||||
aEvent->message != NS_IMAGE_ERROR && aEvent->message != NS_IMAGE_LOAD) {
|
||||
//Initiate capturing phase. Special case first call to document
|
||||
if (parent) {
|
||||
parent->HandleDOMEvent(aPresContext, aEvent, aDOMEvent, NS_EVENT_FLAG_CAPTURE, aEventStatus);
|
||||
@ -1836,8 +1837,8 @@ nsGenericElement::HandleDOMEvent(nsIPresContext* aPresContext,
|
||||
|
||||
//Bubbling stage
|
||||
if (NS_EVENT_FLAG_CAPTURE != aFlags && mDocument &&
|
||||
aEvent->message != NS_PAGE_LOAD &&
|
||||
aEvent->message != NS_SCRIPT_LOAD) {
|
||||
aEvent->message != NS_PAGE_LOAD && aEvent->message != NS_SCRIPT_LOAD &&
|
||||
aEvent->message != NS_IMAGE_ERROR && aEvent->message != NS_IMAGE_LOAD) {
|
||||
if (parent) {
|
||||
/*
|
||||
* If there's a parent we pass the event to the parent...
|
||||
|
Loading…
Reference in New Issue
Block a user