Bug 526055: Make nsPageFrame::DrawHeaderFooter respect inherited clipping rect, so that it doesn't draw on top of print-preview scrollbars. r=roc

This commit is contained in:
Daniel Holbert 2009-11-03 14:37:21 -08:00
Родитель 6b881eff4f
Коммит eb57425e44
1 изменённых файлов: 2 добавлений и 2 удалений

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

@ -316,7 +316,7 @@ nsPageFrame::DrawHeaderFooter(nsIRenderingContext& aRenderingContext,
}
// Draw a header or footer string
// @param aRenderingContext - rendering content ot draw into
// @param aRenderingContext - rendering context to draw into
// @param aHeaderFooter - indicates whether it is a header or footer
// @param aJust - indicates where the string is located within the header/footer
// @param aStr - the string to be drawn
@ -389,7 +389,7 @@ nsPageFrame::DrawHeaderFooter(nsIRenderingContext& aRenderingContext,
// set up new clip and draw the text
aRenderingContext.PushState();
aRenderingContext.SetColor(NS_RGB(0,0,0));
aRenderingContext.SetClipRect(aRect, nsClipCombine_kReplace);
aRenderingContext.SetClipRect(aRect, nsClipCombine_kIntersect);
nsLayoutUtils::DrawString(this, &aRenderingContext, str.get(), str.Length(), nsPoint(x, y + aAscent));
aRenderingContext.PopState();
}