Bug 775467 - Make readyState progress through all states without duplicate transitions. r=bzbarsky.
This commit is contained in:
@@ -347,10 +347,12 @@ ImageDocument::SetScriptGlobalObject(nsIScriptGlobalObject* aScriptGlobalObject)
|
||||
target->AddEventListener(NS_LITERAL_STRING("resize"), this, false);
|
||||
target->AddEventListener(NS_LITERAL_STRING("keypress"), this, false);
|
||||
|
||||
if (!nsContentUtils::IsChildOfSameType(this)) {
|
||||
if (!nsContentUtils::IsChildOfSameType(this) &&
|
||||
GetReadyStateEnum() != nsIDocument::READYSTATE_COMPLETE) {
|
||||
LinkStylesheet(NS_LITERAL_STRING("resource://gre/res/TopLevelImageDocument.css"));
|
||||
LinkStylesheet(NS_LITERAL_STRING("chrome://global/skin/TopLevelImageDocument.css"));
|
||||
}
|
||||
BecomeInteractive();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user