Bug 836875 - Background is no longer painted in Print output/Print preview, r=roc

This commit is contained in:
Olli Pettay 2013-02-05 10:10:40 +00:00
parent b6ed567abc
commit 2b1cca33db

View File

@ -316,12 +316,14 @@ nsStyleLinkElement::DoUpdateStyleSheet(nsIDocument *aOldDocument,
}
}
if (mDontLoadStyle || !mUpdatesEnabled) {
NS_ENSURE_TRUE(thisContent, NS_ERROR_FAILURE);
// When static documents are created, stylesheets are cloned manually.
if (mDontLoadStyle || !mUpdatesEnabled ||
thisContent->OwnerDoc()->IsStaticDocument()) {
return NS_OK;
}
NS_ENSURE_TRUE(thisContent, NS_ERROR_FAILURE);
nsCOMPtr<nsIDocument> doc = thisContent->GetDocument();
if (!doc || !doc->CSSLoader()->GetEnabled()) {