rootView->QueryInterface(kIScrollableViewIID, (void**) &sview);
rootView->QueryInterface(NS_GET_IID(nsIScrollableView), (void**) &sview);
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  nsresult rv;  if (mWebShell) {    nsCOMPtr<nsIScrollable> scrollableContainer = do_QueryInterface(mWebShell, &rv);    if (NS_SUCCEEDED(rv) && scrollableContainer) {      if (mFrameset) {        scrollableContainer->SetCurrentScrollbarPreferences(nsIScrollable::ScrollOrientation_Y, NS_STYLE_OVERFLOW_HIDDEN);        scrollableContainer->SetCurrentScrollbarPreferences(nsIScrollable::ScrollOrientation_X, NS_STYLE_OVERFLOW_HIDDEN);      } else {        scrollableContainer->ResetScrollbarPreferences();      }    }  }  PRInt32 i, ns = mDocument->GetNumberOfShells();  for (i = 0; i < ns; i++) {    nsCOMPtr<nsIPresShell> shell(dont_AddRef(mDocument->GetShellAt(i)));    if (shell) {      // Make shell an observer for next time      shell->BeginObservingDocument();      // Resize-reflow this time      nsCOMPtr<nsIPresContext> cx;      shell->GetPresContext(getter_AddRefs(cx));      nsRect r;      cx->GetVisibleArea(r);      shell->InitialReflow(r.width, r.height);      // Now trigger a refresh      nsCOMPtr<nsIViewManager> vm;      shell->GetViewManager(getter_AddRefs(vm));      if (vm) {        RefreshIfEnabled(vm);      }    }  }  // If the document we are loading has a reference or it is a   // frameset document, disable the scroll bars on the views.  char* ref = nsnull;           // init in case mDocumentURI is not a url  nsIURL* url;  rv = mDocumentURI->QueryInterface(NS_GET_IID(nsIURL), (void**)&url);  if (NS_SUCCEEDED(rv)) {    rv = url->GetRef(&ref);    NS_RELEASE(url);  }  if (rv == NS_OK) {    if (ref)    {      mRef.Assign(ref);      nsCRT::free(ref);    }  }  if ((nsnull != ref) || mFrameset) {    // XXX support more than one presentation-shell here    // Get initial scroll preference and save it away; disable the    // scroll bars.    ns = mDocument->GetNumberOfShells();    for (i = 0; i < ns; i++) {      nsCOMPtr<nsIPresShell> shell(dont_AddRef(mDocument->GetShellAt(i)));      if (shell) {        nsCOMPtr<nsIViewManager> vm;        shell->GetViewManager(getter_AddRefs(vm));        if (vm) {          nsIView* rootView = nsnull;          vm->GetRootView(rootView);          if (nsnull != rootView) {            nsIScrollableView* sview = nsnull;            rootView->QueryInterface(kIScrollableViewIID, (void**) &sview);            if (nsnull != sview) {              if (mFrameset)                mOriginalScrollPreference = nsScrollPreference_kNeverScroll;              else                sview->GetScrollPreference(mOriginalScrollPreference);              sview->SetScrollPreference(nsScrollPreference_kNeverScroll);            }          }        }      }    }  }}