Bug 334547: get rid of scrollframe code which never executes. r+sr=roc.

This commit is contained in:
sharparrow1%yahoo.com 2006-04-20 03:22:48 +00:00
Родитель 08dab45e00
Коммит 1aecebc478
1 изменённых файлов: 5 добавлений и 34 удалений

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

@ -4569,30 +4569,10 @@ nsCSSFrameConstructor::ConstructDocElementFrame(nsFrameConstructorState& aState,
PRBool propagatedScrollToViewport =
PropagateScrollToViewport() == aDocElement;
// The document root should not be scrollable in any paginated context,
// even in print preview.
PRBool isScrollable = display->IsScrollableOverflow()
&& !aState.mPresContext->IsPaginated()
&& !propagatedScrollToViewport;
nsIFrame* scrollFrame = nsnull;
// build a scrollframe
if (isScrollable) {
nsRefPtr<nsStyleContext> newContext;
newContext = BeginBuildingScrollFrame( aState,
aDocElement,
styleContext,
aParentFrame,
nsnull,
nsCSSAnonBoxes::scrolledContent,
PR_FALSE,
scrollFrame);
styleContext = newContext;
aParentFrame = scrollFrame;
}
NS_ASSERTION(!display->IsScrollableOverflow() ||
aState.mPresContext->IsPaginated() ||
propagatedScrollToViewport,
"Scrollbars should have been propagated to the viewport");
nsIFrame* contentFrame = nsnull;
PRBool isBlockFrame = PR_FALSE;
@ -4643,16 +4623,7 @@ nsCSSFrameConstructor::ConstructDocElementFrame(nsFrameConstructorState& aState,
// set the primary frame
aState.mFrameManager->SetPrimaryFrameFor(aDocElement, contentFrame);
// Finish building the scrollframe
if (isScrollable) {
FinishBuildingScrollFrame(aParentFrame, contentFrame);
// primary is set above (to the contentFrame)
*aNewFrame = scrollFrame;
} else {
// if not scrollable the new frame is the content frame.
*aNewFrame = contentFrame;
}
*aNewFrame = contentFrame;
mInitialContainingBlock = contentFrame;