mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 671970 - Crash [@ nsPrintEngine::ReflowDocList, r=roc
This commit is contained in:
parent
3a94e08884
commit
5680cf75b1
@ -1829,13 +1829,11 @@ nsPrintEngine::ReflowDocList(nsPrintObject* aPO, PRBool aSetPixelScale)
|
||||
|
||||
// Check to see if the subdocument's element has been hidden by the parent document
|
||||
if (aPO->mParent && aPO->mParent->mPresShell) {
|
||||
nsIFrame * frame = aPO->mContent->GetPrimaryFrame();
|
||||
if (frame) {
|
||||
if (!frame->GetStyleVisibility()->IsVisible()) {
|
||||
aPO->mDontPrint = PR_TRUE;
|
||||
aPO->mInvisible = PR_TRUE;
|
||||
return NS_OK;
|
||||
}
|
||||
nsIFrame* frame = aPO->mContent ? aPO->mContent->GetPrimaryFrame() : nsnull;
|
||||
if (!frame || !frame->GetStyleVisibility()->IsVisible()) {
|
||||
aPO->mDontPrint = PR_TRUE;
|
||||
aPO->mInvisible = PR_TRUE;
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1885,7 +1883,7 @@ nsPrintEngine::ReflowPrintObject(nsPrintObject * aPO)
|
||||
nsIView* parentView = nsnull;
|
||||
|
||||
if (aPO->mParent && aPO->mParent->IsPrintable()) {
|
||||
nsIFrame* frame = aPO->mContent->GetPrimaryFrame();
|
||||
nsIFrame* frame = aPO->mContent ? aPO->mContent->GetPrimaryFrame() : nsnull;
|
||||
// Without a frame, this document can't be displayed; therefore, there is no
|
||||
// point to reflowing it
|
||||
if (!frame) {
|
||||
|
Loading…
Reference in New Issue
Block a user