Bug 766007. Create scrollframes for frameset documents. r=tnikkel

This commit is contained in:
Robert O'Callahan 2012-06-22 17:06:40 +12:00
parent 0a3800a656
commit 9c75a25b45

View File

@ -2545,8 +2545,7 @@ nsCSSFrameConstructor::SetUpDocElementContainingBlock(nsIContent* aDocElement)
/*
how the root frame hierarchy should look
Galley presentation, non-XUL, with scrolling (i.e. not a frameset,
or framesets with async pan/zoom like on Fennec):
Galley presentation, non-XUL, with scrolling:
ViewportFrame [fixed-cb]
nsHTMLScrollFrame
@ -2554,13 +2553,6 @@ nsCSSFrameConstructor::SetUpDocElementContainingBlock(nsIContent* aDocElement)
root element frame (nsBlockFrame, nsSVGOuterSVGFrame,
nsTableOuterFrame, nsPlaceholderFrame)
Galley presentation, non-XUL, without scrolling (i.e. a frameset,
except when async pan/zoom is enabled):
ViewportFrame [fixed-cb]
nsCanvasFrame [abs-cb]
root element frame (nsBlockFrame)
Galley presentation, XUL
ViewportFrame [fixed-cb]
@ -2670,21 +2662,7 @@ nsCSSFrameConstructor::SetUpDocElementContainingBlock(nsIContent* aDocElement)
}
// Never create scrollbars for XUL documents
bool isScrollable = !isXUL;
#ifndef MOZ_WIDGET_ANDROID
// Never create scrollbars for frameset documents, except on android
// where we have async pan/zoom and need a scrollable root frame.
if (isHTML) {
nsCOMPtr<nsIHTMLDocument> htmlDoc = do_QueryInterface(mDocument);
if (htmlDoc && htmlDoc->GetIsFrameset())
isScrollable = false;
}
#endif
if (isPaginated) {
isScrollable = presContext->HasPaginatedScrolling();
}
bool isScrollable = isPaginated ? presContext->HasPaginatedScrolling() : !isXUL;
// We no longer need to do overflow propagation here. It's taken care of
// when we construct frames for the element whose overflow might be