NS_RELEASE(scrollView);
nsresult WebWidgetImpl::MakeWindow(nsNativeWidget aNativeParent,                                   const nsRect& aBounds,                                   nsScrollPreference aScrolling){  nsresult rv;  static NS_DEFINE_IID(kViewManagerCID, NS_VIEW_MANAGER_CID);  static NS_DEFINE_IID(kIViewManagerIID, NS_IVIEWMANAGER_IID);  rv = NSRepository::CreateInstance(kViewManagerCID,                                      nsnull,                                      kIViewManagerIID,                                      (void **)&mViewManager);  if ((NS_OK != rv) || (NS_OK != mViewManager->Init(mPresContext))) {    return rv;  }  nsRect tbounds = aBounds;  tbounds *= mPresContext->GetPixelsToTwips();  // Create a child window of the parent that is our "root view/window"  // Create a view  static NS_DEFINE_IID(kScrollingViewCID, NS_SCROLLING_VIEW_CID);  static NS_DEFINE_IID(kIViewIID, NS_IVIEW_IID);  rv = NSRepository::CreateInstance(kScrollingViewCID,                                      nsnull,                                      kIViewIID,                                      (void **)&mView);  static NS_DEFINE_IID(kWidgetCID, NS_CHILD_CID);  if ((NS_OK != rv) || (NS_OK != mView->Init(mViewManager,                                                 tbounds,                                                 nsnull,                                                &kWidgetCID,                                                nsnull,                                                aNativeParent))) {    return rv;  }  static NS_DEFINE_IID(kScrollViewIID, NS_ISCROLLABLEVIEW_IID);  nsIScrollableView* scrollView;  rv = mView->QueryInterface(kScrollViewIID, (void**)&scrollView);  if (NS_OK == rv) {    scrollView->SetScrollPreference(aScrolling);  }  else {    NS_ASSERTION(0, "invalid scrolling view");    return rv;  }  // Setup hierarchical relationship in view manager  mViewManager->SetRootView(mView);  mWindow = mView->GetWidget();  if (mWindow) {    mViewManager->SetRootWindow(mWindow);  }  //set frame rate to 25 fps  mViewManager->SetFrameRate(25);  return rv;}