зеркало из https://github.com/mozilla/gecko-dev.git
Backing out bug 429337 to fix broken printing reftests on linux test box.
This commit is contained in:
Родитель
054feb2357
Коммит
eb3eec51c9
|
@ -235,12 +235,6 @@ 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,6 +1897,20 @@ 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
|
||||
|
|
Загрузка…
Ссылка в новой задаче