mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 429337: re-landing patch, with bustage fix. (bustage fix initializes nsPrintSettingsGTK::mPrintSelectionOnly to false in default constructor. Wasn't getting initialized before.)
This commit is contained in:
parent
76c508bef0
commit
7e014b1722
@ -235,6 +235,12 @@ nsSimplePageSequenceFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsSize pageSize = aPresContext->GetPageSize();
|
||||
|
||||
mPageData->mReflowSize = pageSize;
|
||||
// If we're printing a selection, we need to reflow with
|
||||
// unconstrained height, to make sure we'll get to the selection
|
||||
// even if it's beyond the first page of content.
|
||||
if (nsIPrintSettings::kRangeSelection == mPrintRangeType) {
|
||||
mPageData->mReflowSize.height = NS_UNCONSTRAINEDSIZE;
|
||||
}
|
||||
mPageData->mReflowMargin = mMargin;
|
||||
|
||||
// Compute the size of each page and the x coordinate that each page will
|
||||
|
@ -1897,20 +1897,6 @@ nsPrintEngine::ReflowPrintObject(nsPrintObject * aPO)
|
||||
PR_PL(("In DV::ReflowPrintObject PO: %p (%9s) Setting w,h to %d,%d\n", aPO,
|
||||
gFrameTypesStr[aPO->mFrameType], adjSize.width, adjSize.height));
|
||||
|
||||
// XXX - Hack Alert
|
||||
// OK, so there is a selection, we will print the entire selection
|
||||
// on one page and then crop the page.
|
||||
// This means you can never print any selection that is longer than
|
||||
// one page, but it keeps it from page breaking in the middle of your
|
||||
// print of the selection (see also nsSimplePageSequence.cpp)
|
||||
PRInt16 printRangeType = nsIPrintSettings::kRangeAllPages;
|
||||
mPrt->mPrintSettings->GetPrintRange(&printRangeType);
|
||||
|
||||
if (printRangeType == nsIPrintSettings::kRangeSelection &&
|
||||
IsThereARangeSelection(mPrt->mCurrentFocusWin)) {
|
||||
adjSize.height = NS_UNCONSTRAINEDSIZE;
|
||||
}
|
||||
|
||||
// Here we decide whether we need scrollbars and
|
||||
// what the parent will be of the widget
|
||||
// How this logic presently works: Print Preview is always as-is (as far
|
||||
|
@ -76,7 +76,8 @@ NS_IMPL_ISUPPORTS_INHERITED1(nsPrintSettingsGTK,
|
||||
nsPrintSettingsGTK::nsPrintSettingsGTK() :
|
||||
mPageSetup(NULL),
|
||||
mPrintSettings(NULL),
|
||||
mGTKPrinter(NULL)
|
||||
mGTKPrinter(NULL),
|
||||
mPrintSelectionOnly(PR_FALSE)
|
||||
{
|
||||
// The aim here is to set up the objects enough that silent printing works well.
|
||||
// These will be replaced anyway if the print dialog is used.
|
||||
|
Loading…
Reference in New Issue
Block a user