mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 535851 - noscript is rendered in print preview, r=roc
This commit is contained in:
parent
9058cc8ee7
commit
bf7962ffed
@ -2085,12 +2085,15 @@ PresShell::SetPrefNoScriptRule()
|
||||
|
||||
// also handle the case where print is done from print preview
|
||||
// see bug #342439 for more details
|
||||
PRBool scriptEnabled = mDocument->IsScriptEnabled() ||
|
||||
((mPresContext->Type() == nsPresContext::eContext_PrintPreview ||
|
||||
mPresContext->Type() == nsPresContext::eContext_Print) &&
|
||||
NS_PTR_TO_INT32(mDocument->GetProperty(
|
||||
nsGkAtoms::scriptEnabledBeforePrintOrPreview)));
|
||||
nsIDocument* doc = mDocument;
|
||||
if (mPresContext->Type() == nsPresContext::eContext_PrintPreview ||
|
||||
mPresContext->Type() == nsPresContext::eContext_Print) {
|
||||
while (doc->GetOriginalDocument()) {
|
||||
doc = doc->GetOriginalDocument();
|
||||
}
|
||||
}
|
||||
|
||||
PRBool scriptEnabled = doc->IsScriptEnabled();
|
||||
if (scriptEnabled) {
|
||||
if (!mPrefStyleSheet) {
|
||||
rv = CreatePreferenceStyleSheet();
|
||||
|
Loading…
Reference in New Issue
Block a user