Backed out changeset 5bffc31ff797 (bug 433373) -- first attempt didn't handle page scaling correctly.

This commit is contained in:
Daniel Holbert 2008-06-24 11:53:27 -07:00
Родитель a55565f501
Коммит 6310c10f4d
1 изменённых файлов: 1 добавлений и 5 удалений

Просмотреть файл

@ -559,11 +559,7 @@ nsPageFrame::PaintPageContent(nsIRenderingContext& aRenderingContext,
// We're doing print-selection, with one long page-content frame.
// Clip to the appropriate page-content slice for the current page.
NS_ASSERTION(mPageNum > 0, "page num should be positive");
// Note: The pageContentFrame's y-position has been set such that a zero
// y-value matches the top edge of the current page. So, to clip to the
// current page's content (in coordinates *relative* to the page content
// frame), we just negate its y-position and add the top margin.
clipRect.y = -pageContentFrame->GetRect().y + mPD->mReflowMargin.top;
clipRect.y = expectedPageContentHeight * (mPageNum - 1);
clipRect.height = expectedPageContentHeight;
NS_ASSERTION(clipRect.y < pageContentFrame->GetSize().height,
"Should be clipping to region inside the page content bounds");