content sink uses nsWebShell::GetIsFrame to set scrolling on nsWebShell
This commit is contained in:
Родитель
8f10d2b9c6
Коммит
1a4d283094
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче