Checking for a printer before some optimizations.. which are not good for printing. sr=attinasi r=karnaze

git-svn-id: svn://10.0.0.236/trunk@88081 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dcone%netscape.com 2001-02-27 14:52:07 +00:00
parent 4e443b4d68
commit e7d3e49ac4
2 changed files with 14 additions and 6 deletions

View File

@ -36,6 +36,7 @@
#include "nsLayoutAtoms.h"
#include "nsHTMLParts.h"
#include "nsIPresShell.h"
#include "nsIPrintContext.h"
/* ----------- nsTableCaptionFrame ---------- */
@ -1444,9 +1445,12 @@ NS_METHOD nsTableOuterFrame::Reflow(nsIPresContext* aPresContext,
mMinCaptionWidth = maxElementSize.width;
}
}
if ((eReflowReason_Resize == aOuterRS.reason) &&
(aOuterRS.availableWidth == mPriorAvailWidth) &&
!mPrevInFlow) {
nsCOMPtr<nsIPrintContext> thePrinterContext = do_QueryInterface(aPresContext);
if ((!thePrinterContext) &&
(eReflowReason_Resize == aOuterRS.reason) &&
(aOuterRS.availableWidth == mPriorAvailWidth) ) {
// don't do much if we are resize reflowed exactly like last time
nsRect rect;
GetRect(rect);

View File

@ -36,6 +36,7 @@
#include "nsLayoutAtoms.h"
#include "nsHTMLParts.h"
#include "nsIPresShell.h"
#include "nsIPrintContext.h"
/* ----------- nsTableCaptionFrame ---------- */
@ -1444,9 +1445,12 @@ NS_METHOD nsTableOuterFrame::Reflow(nsIPresContext* aPresContext,
mMinCaptionWidth = maxElementSize.width;
}
}
if ((eReflowReason_Resize == aOuterRS.reason) &&
(aOuterRS.availableWidth == mPriorAvailWidth) &&
!mPrevInFlow) {
nsCOMPtr<nsIPrintContext> thePrinterContext = do_QueryInterface(aPresContext);
if ((!thePrinterContext) &&
(eReflowReason_Resize == aOuterRS.reason) &&
(aOuterRS.availableWidth == mPriorAvailWidth) ) {
// don't do much if we are resize reflowed exactly like last time
nsRect rect;
GetRect(rect);