bug 93830. patch by gisburn. r=dcone@netscape.com, r=timeless,

sr=waterson@netscape.com


git-svn-id: svn://10.0.0.236/trunk@101521 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rjesup%wgate.com
2001-08-21 18:43:55 +00:00
parent d51fea8551
commit 02427b265c
2 changed files with 8 additions and 22 deletions

View File

@@ -3799,22 +3799,15 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIPresShell* aPresShell,
// --------- IF SCROLLABLE WRAP IN SCROLLFRAME --------
// If the device supports scrolling (e.g., in galley mode on the screen and
// If the device supports scrolling (e.g., in galley mode on the screen and
// for print-preview, but not when printing), then create a scroll frame that
// will act as the scrolling mechanism for the viewport.
// XXX Do we even need a viewport when printing to a printer?
// XXX It would be nice to have a better way to query for whether the device
// is scrollable
PRBool isScrollable = PR_TRUE;
if (aPresContext) {
nsIDeviceContext* dc;
aPresContext->GetDeviceContext(&dc);
if (dc) {
PRBool supportsWidgets;
if (NS_SUCCEEDED(dc->SupportsNativeWidgets(supportsWidgets))) {
isScrollable = supportsWidgets;
}
NS_RELEASE(dc);
PRBool isPaginated = PR_FALSE;
if (NS_SUCCEEDED(aPresContext->IsPaginated(&isPaginated))) {
isScrollable = !isPaginated;
}
}