зеркало из https://github.com/mozilla/gecko-dev.git
Initialize isScrolling to default to PR_FALSE. When printing, we don't obtain a
container, so we can't query for a webshell interface and query if scrolling is implemented. With isScrolling set to PR_TRUE, we then follow code below which leads to a crash. Fixes crash seen often when performing Postscript printing on Unix. Reviewed by dcone.
This commit is contained in:
Родитель
89e53b21e2
Коммит
2f72fb0105
|
@ -1522,7 +1522,7 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIPresContext* aPresContext,
|
|||
// that will act as the scolling mechanism for the viewport
|
||||
// XXX We should only do this when presenting to the screen, i.e., for galley
|
||||
// mode and print-preview, but not when printing
|
||||
PRBool isScrollable = PR_TRUE;
|
||||
PRBool isScrollable = PR_FALSE;
|
||||
nsISupports* container;
|
||||
if (nsnull != aPresContext) {
|
||||
aPresContext->GetContainer(&container);
|
||||
|
@ -1532,8 +1532,8 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIPresContext* aPresContext,
|
|||
if (nsnull != webShell) {
|
||||
PRInt32 scrolling = -1;
|
||||
webShell->GetScrolling(scrolling);
|
||||
if (NS_STYLE_OVERFLOW_HIDDEN == scrolling) {
|
||||
isScrollable = PR_FALSE;
|
||||
if (NS_STYLE_OVERFLOW_HIDDEN != scrolling) {
|
||||
isScrollable = PR_TRUE;
|
||||
}
|
||||
NS_RELEASE(webShell);
|
||||
}
|
||||
|
|
|
@ -1522,7 +1522,7 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIPresContext* aPresContext,
|
|||
// that will act as the scolling mechanism for the viewport
|
||||
// XXX We should only do this when presenting to the screen, i.e., for galley
|
||||
// mode and print-preview, but not when printing
|
||||
PRBool isScrollable = PR_TRUE;
|
||||
PRBool isScrollable = PR_FALSE;
|
||||
nsISupports* container;
|
||||
if (nsnull != aPresContext) {
|
||||
aPresContext->GetContainer(&container);
|
||||
|
@ -1532,8 +1532,8 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIPresContext* aPresContext,
|
|||
if (nsnull != webShell) {
|
||||
PRInt32 scrolling = -1;
|
||||
webShell->GetScrolling(scrolling);
|
||||
if (NS_STYLE_OVERFLOW_HIDDEN == scrolling) {
|
||||
isScrollable = PR_FALSE;
|
||||
if (NS_STYLE_OVERFLOW_HIDDEN != scrolling) {
|
||||
isScrollable = PR_TRUE;
|
||||
}
|
||||
NS_RELEASE(webShell);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче