Bug 1512297 - Do not need to clear image broken state in BindToTree call; r=smaug
ImageLoadingContent will take care of updating element to correct state, we don't need to do this. Especially for HTMLImageElement, because it may not reload the image after BindToTree ( e.g. the selected source isn't changed), clearing broken state may put element into incorrect state. The original code seems from https://bugzilla.mozilla.org/show_bug.cgi?id=491063#c32 for a performance reason, however I test the http://mozilla.pettay.fi/moztests/1x1image.html again on recent codebase, I don't see difference with/without applying this patch.
This commit is contained in:
@@ -525,11 +525,6 @@ nsresult HTMLImageElement::BindToTree(Document* aDocument, nsIContent* aParent,
|
||||
// initaiated by a user interaction.
|
||||
mUseUrgentStartForChannel = EventStateManager::IsHandlingUserInput();
|
||||
|
||||
// FIXME: Bug 660963 it would be nice if we could just have
|
||||
// ClearBrokenState update our state and do it fast...
|
||||
ClearBrokenState();
|
||||
RemoveStatesSilently(NS_EVENT_STATE_BROKEN);
|
||||
|
||||
// We still act synchronously for the non-responsive case (Bug
|
||||
// 1076583), but still need to delay if it is unsafe to run
|
||||
// script.
|
||||
|
||||
Reference in New Issue
Block a user