Fix for 108486, XUL images should fire onload. r=jkeiser, sr=jst
git-svn-id: svn://10.0.0.236/trunk@107324 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -3285,6 +3285,9 @@ nsXULElement::HandleDOMEvent(nsIPresContext* aPresContext,
|
||||
else return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
else if (aEvent->message == NS_IMAGE_LOAD)
|
||||
return NS_OK; // Don't let these events bubble or be captured. Just allow them
|
||||
// on the target image.
|
||||
|
||||
// Find out if we're anonymous.
|
||||
nsCOMPtr<nsIContent> bindingParent;
|
||||
|
||||
@@ -762,8 +762,10 @@ NS_IMETHODIMP nsImageBoxFrame::OnStopContainer(imgIRequest *request, nsIPresCont
|
||||
|
||||
NS_IMETHODIMP nsImageBoxFrame::OnStopDecode(imgIRequest *request, nsIPresContext *aPresContext, nsresult aStatus, const PRUnichar *statusArg)
|
||||
{
|
||||
if (NS_FAILED(aStatus))
|
||||
if (NS_SUCCEEDED(aStatus))
|
||||
// Fire an onerror DOM event.
|
||||
FireDOMEvent(mContent, NS_IMAGE_LOAD);
|
||||
else // Fire an onload DOM event.
|
||||
FireDOMEvent(mContent, NS_IMAGE_ERROR);
|
||||
|
||||
return NS_OK;
|
||||
|
||||
Reference in New Issue
Block a user