Bug 708431 - Video controls fail to initialize if an extension implementing nsIContentPolicy is present. r=roc r=bz
This commit is contained in:
@@ -381,6 +381,10 @@ ImageDocument::SetScriptGlobalObject(nsIScriptGlobalObject* aScriptGlobalObject)
|
||||
target = do_QueryInterface(aScriptGlobalObject);
|
||||
target->AddEventListener(NS_LITERAL_STRING("resize"), this, false);
|
||||
target->AddEventListener(NS_LITERAL_STRING("keypress"), this, false);
|
||||
|
||||
if (!nsContentUtils::IsChildOfSameType(this)) {
|
||||
LinkStylesheet(NS_LITERAL_STRING("resource://gre/res/TopLevelImageDocument.css"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -665,8 +669,6 @@ ImageDocument::CreateSyntheticDocument()
|
||||
|
||||
styleContent->SetTextContent(NS_LITERAL_STRING("img { display: block; }"));
|
||||
head->AppendChildTo(styleContent, false);
|
||||
} else {
|
||||
LinkStylesheet(NS_LITERAL_STRING("resource://gre/res/TopLevelImageDocument.css"));
|
||||
}
|
||||
|
||||
// Add the image element
|
||||
|
||||
Reference in New Issue
Block a user