Bug 30317: Crash fix for scrolling=no, background-attachment: fixed pages r=evaughan, a=rickg

git-svn-id: svn://10.0.0.236/trunk@62458 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pollmann%netscape.com 2000-03-09 05:54:58 +00:00
parent ed33d6dad3
commit 4230c172e4
4 changed files with 20 additions and 12 deletions

View File

@ -2391,10 +2391,12 @@ nsCSSFrameConstructor::ConstructDocElementFrame(nsIPresShell* aPresShell,
parentFrame->GetView(aPresContext, &view);
}
NS_ASSERTION(view, "expected a view");
PRUint32 viewFlags;
view->GetViewFlags(&viewFlags);
view->SetViewFlags(viewFlags | NS_VIEW_PUBLIC_FLAG_DONT_BITBLT);
// Not all shells have scroll frames, even in scrollable presContext (bug 30317)
if (view) {
PRUint32 viewFlags;
view->GetViewFlags(&viewFlags);
view->SetViewFlags(viewFlags | NS_VIEW_PUBLIC_FLAG_DONT_BITBLT);
}
}
// Set the initial child lists

View File

@ -2023,8 +2023,10 @@ PRInt16 borderRadii[4],i;
scrollFrame = GetNearestScrollFrame(aForFrame);
// Get the viewport size
clipView = GetClipView(aPresContext, scrollFrame);
clipView->GetDimensions(&viewportArea.width, &viewportArea.height);
if (scrollFrame) { // XXX This is a band-aid crash fix, see bug 30317.
clipView = GetClipView(aPresContext, scrollFrame);
clipView->GetDimensions(&viewportArea.width, &viewportArea.height);
}
}
// Compute the anchor point. If it's a fixed background attachment, then

View File

@ -2391,10 +2391,12 @@ nsCSSFrameConstructor::ConstructDocElementFrame(nsIPresShell* aPresShell,
parentFrame->GetView(aPresContext, &view);
}
NS_ASSERTION(view, "expected a view");
PRUint32 viewFlags;
view->GetViewFlags(&viewFlags);
view->SetViewFlags(viewFlags | NS_VIEW_PUBLIC_FLAG_DONT_BITBLT);
// Not all shells have scroll frames, even in scrollable presContext (bug 30317)
if (view) {
PRUint32 viewFlags;
view->GetViewFlags(&viewFlags);
view->SetViewFlags(viewFlags | NS_VIEW_PUBLIC_FLAG_DONT_BITBLT);
}
}
// Set the initial child lists

View File

@ -2023,8 +2023,10 @@ PRInt16 borderRadii[4],i;
scrollFrame = GetNearestScrollFrame(aForFrame);
// Get the viewport size
clipView = GetClipView(aPresContext, scrollFrame);
clipView->GetDimensions(&viewportArea.width, &viewportArea.height);
if (scrollFrame) { // XXX This is a band-aid crash fix, see bug 30317.
clipView = GetClipView(aPresContext, scrollFrame);
clipView->GetDimensions(&viewportArea.width, &viewportArea.height);
}
}
// Compute the anchor point. If it's a fixed background attachment, then