sr=waterson@netscape.com
This commit is contained in:
rjesup%wgate.com 2001-08-21 18:43:55 +00:00
Родитель 1e0eeb717e
Коммит 607822f402
2 изменённых файлов: 8 добавлений и 22 удалений

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

@ -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;
}
}

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

@ -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;
}
}