Land bug 72747 in pieces: Simplify the mechanisms used to prevent framesets from having scrollbars and used to implement the scrolling attribute on frames and iframes. Implement scrolling='yes'. b=72747 r+sr=roc

git-svn-id: svn://10.0.0.236/trunk@161744 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dbaron%dbaron.org
2004-09-04 06:53:36 +00:00
parent 22aae5389e
commit b8499fbfc0
15 changed files with 154 additions and 262 deletions

View File

@@ -108,7 +108,6 @@
#include "nsTimer.h"
#include "nsITimer.h"
#include "nsDOMError.h"
#include "nsIScrollable.h"
#include "nsContentPolicyUtils.h"
#include "nsIScriptContext.h"
#include "nsStyleLinkElement.h"
@@ -3646,24 +3645,9 @@ HTMLContentSink::StartLayout()
mLastNotificationTime = PR_Now();
// If it's a frameset document then disable scrolling.
// Else, reset scrolling to default settings for this shell.
// This must happen before the initial reflow, when we create the root frame
nsCOMPtr<nsIScrollable> scrollableContainer = do_QueryInterface(mDocShell);
if (scrollableContainer) {
if (mFrameset) {
scrollableContainer->
SetCurrentScrollbarPreferences(nsIScrollable::ScrollOrientation_Y,
nsIScrollable::Scrollbar_Never);
scrollableContainer->
SetCurrentScrollbarPreferences(nsIScrollable::ScrollOrientation_X,
nsIScrollable::Scrollbar_Never);
} else {
scrollableContainer->ResetScrollbarPreferences();
}
}
mHTMLDocument->SetIsFrameset(mFrameset != nsnull);
nsContentSink::StartLayout(!!mFrameset);
nsContentSink::StartLayout(mFrameset != nsnull);
}
void