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 = PRBool propagatedScrollToViewport =
PropagateScrollToViewport() == aDocElement; PropagateScrollToViewport() == aDocElement;
// The document root should not be scrollable in any paginated context, NS_ASSERTION(!display->IsScrollableOverflow() ||
// even in print preview. aState.mPresContext->IsPaginated() ||
PRBool isScrollable = display->IsScrollableOverflow() propagatedScrollToViewport,
&& !aState.mPresContext->IsPaginated() "Scrollbars should have been propagated to the viewport");
&& !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;
}
nsIFrame* contentFrame = nsnull; nsIFrame* contentFrame = nsnull;
PRBool isBlockFrame = PR_FALSE; PRBool isBlockFrame = PR_FALSE;
@ -4643,16 +4623,7 @@ nsCSSFrameConstructor::ConstructDocElementFrame(nsFrameConstructorState& aState,
// set the primary frame // set the primary frame
aState.mFrameManager->SetPrimaryFrameFor(aDocElement, contentFrame); aState.mFrameManager->SetPrimaryFrameFor(aDocElement, contentFrame);
// Finish building the scrollframe *aNewFrame = contentFrame;
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;
}
mInitialContainingBlock = contentFrame; mInitialContainingBlock = contentFrame;