зеркало из https://github.com/mozilla/gecko-dev.git
bug 93830. patch by gisburn. r=dcone@netscape.com, r=timeless,
sr=waterson@netscape.com
This commit is contained in:
Родитель
1e0eeb717e
Коммит
607822f402
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче