Bug 775467 - Make readyState progress through all states without duplicate transitions. r=bzbarsky.

This commit is contained in:
Henri Sivonen
2012-07-27 16:35:09 +03:00
parent 11cb00a593
commit d1de4e669c
10 changed files with 66 additions and 7 deletions

View File

@@ -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();
}
}