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);
HTMLContentSink::StartLayout(){  if (mLayoutStarted) {    return;  }  mLayoutStarted = PR_TRUE;  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();    }  }  nsContentSink::StartLayout(!!mFrameset);}