webBounds.width, webBounds.height, GetScrolling(content, PR_FALSE));
webBounds.width, webBounds.height);
nsHTMLFrameInnerFrame::CreateWebShell(nsIPresContext& aPresContext,                                      const nsSize& aSize){  nsresult rv;  nsIContent* content;  GetParentContent(content);  rv = nsRepository::CreateInstance(kWebShellCID, nsnull, kIWebShellIID,                                    (void**)&mWebShell);  if (NS_OK != rv) {    NS_ASSERTION(0, "could not create web widget");    return rv;  }  // pass along marginwidth, marginheight so sub document can use it  mWebShell->SetMarginWidth(GetMarginWidth(&aPresContext, content));  mWebShell->SetMarginHeight(GetMarginHeight(&aPresContext, content));  nsString frameName;  if (GetName(content, frameName)) {    mWebShell->SetName(frameName);  }  // If our container is a web-shell, inform it that it has a new  // child. If it's not a web-shell then some things will not operate  // properly.  nsISupports* container;  aPresContext.GetContainer(&container);  if (nsnull != container) {    nsIWebShell* outerShell = nsnull;    container->QueryInterface(kIWebShellIID, (void**) &outerShell);    if (nsnull != outerShell) {      outerShell->AddChild(mWebShell);      // connect the container...      nsIWebShellContainer* outerContainer = nsnull;      container->QueryInterface(kIWebShellContainerIID, (void**) &outerContainer);      if (nsnull != outerContainer) {        mWebShell->SetContainer(outerContainer);        NS_RELEASE(outerContainer);      }      nsIPref*  outerPrefs = nsnull;  // connect the prefs      outerShell->GetPrefs(outerPrefs);      if (nsnull != outerPrefs) {        mWebShell->SetPrefs(outerPrefs);        NS_RELEASE(outerPrefs);      }      NS_RELEASE(outerShell);    }    NS_RELEASE(container);  }  float t2p = aPresContext.GetTwipsToPixels();  nsIPresShell *presShell = aPresContext.GetShell();       // create, init, set the parent of the view  nsIView* view;  rv = nsRepository::CreateInstance(kCViewCID, nsnull, kIViewIID,                                        (void **)&view);  if (NS_OK != rv) {    NS_ASSERTION(0, "Could not create view for nsHTMLFrame");    return rv;  }  nsIView* parView;  nsPoint origin;  GetOffsetFromView(origin, parView);    nsRect viewBounds(origin.x, origin.y, aSize.width, aSize.height);  nsIViewManager* viewMan = presShell->GetViewManager();    NS_RELEASE(presShell);  rv = view->Init(viewMan, viewBounds, parView);  viewMan->InsertChild(parView, view, 0);  rv = view->CreateWidget(kCChildCID);  NS_RELEASE(viewMan);  SetView(view);  nsIWidget* widget;  view->GetWidget(widget);  nsRect webBounds(0, 0, NSToCoordRound(aSize.width * t2p),                    NSToCoordRound(aSize.height * t2p));  mWebShell->Init(widget->GetNativeData(NS_NATIVE_WIDGET),                   webBounds.x, webBounds.y,                  webBounds.width, webBounds.height,                  GetScrolling(content, PR_FALSE));  NS_RELEASE(content);  NS_RELEASE(widget);  mWebShell->SetObserver(mTempObserver);  mWebShell->Show();  return NS_OK;}