content sink uses nsWebShell::GetIsFrame to set scrolling on nsWebShell

This commit is contained in:
karnaze%netscape.com 1999-01-19 23:16:02 +00:00
parent 44d24e235a
commit 29d75b2c52
4 changed files with 16 additions and 6 deletions

View File

@ -1928,13 +1928,17 @@ HTMLContentSink::StartLayout()
NS_IF_RELEASE(rootWebShell);
}
// If it's a top level frameset document then disable scrolling; otherwise, let the
// style dictate. We need to do this before the initial reflow...
// If it's a top level frameset document then disable scrolling. If it is a non frame
// document, then let the style dictate. We need to do this before the initial reflow...
if (mWebShell) {
if (topLevelFrameset) {
mWebShell->SetScrolling(NS_STYLE_OVERFLOW_HIDDEN);
} else if (mBody) {
// mWebShell->SetScrolling(-1);
PRBool isFrameDoc = PR_FALSE;
mWebShell->GetIsFrame(isFrameDoc);
if (!isFrameDoc) {
mWebShell->SetScrolling(-1);
}
}
}

View File

@ -651,6 +651,7 @@ nsHTMLFrameInnerFrame::CreateWebShell(nsIPresContext& aPresContext,
nsCompatibility mode;
aPresContext.GetCompatibilityMode(mode);
mWebShell->SetScrolling(GetScrolling(content, mode));
mWebShell->SetIsFrame(PR_TRUE);
nsString frameName;
if (GetName(content, frameName)) {

View File

@ -651,6 +651,7 @@ nsHTMLFrameInnerFrame::CreateWebShell(nsIPresContext& aPresContext,
nsCompatibility mode;
aPresContext.GetCompatibilityMode(mode);
mWebShell->SetScrolling(GetScrolling(content, mode));
mWebShell->SetIsFrame(PR_TRUE);
nsString frameName;
if (GetName(content, frameName)) {

View File

@ -1928,13 +1928,17 @@ HTMLContentSink::StartLayout()
NS_IF_RELEASE(rootWebShell);
}
// If it's a top level frameset document then disable scrolling; otherwise, let the
// style dictate. We need to do this before the initial reflow...
// If it's a top level frameset document then disable scrolling. If it is a non frame
// document, then let the style dictate. We need to do this before the initial reflow...
if (mWebShell) {
if (topLevelFrameset) {
mWebShell->SetScrolling(NS_STYLE_OVERFLOW_HIDDEN);
} else if (mBody) {
// mWebShell->SetScrolling(-1);
PRBool isFrameDoc = PR_FALSE;
mWebShell->GetIsFrame(isFrameDoc);
if (!isFrameDoc) {
mWebShell->SetScrolling(-1);
}
}
}