mPluginWindow->window = nsnull;    } else if (mWidget) { mWidget->Resize(mPluginWindow->width, mPluginWindow->height, PR_FALSE);
NS_IMETHODIMP nsPluginInstanceOwner::CreateWidget(void){  NS_ENSURE_TRUE(mPluginWindow, NS_ERROR_NULL_POINTER);  nsIView   *view;  nsresult  rv = NS_ERROR_FAILURE;  if (mOwner)  {    // Create view if necessary    view = mOwner->GetView();    if (!view || !mWidget)    {      PRBool windowless = PR_FALSE;      mInstance->GetValue(nsPluginInstanceVariable_WindowlessBool, (void *)&windowless);      // always create widgets in Twips, not pixels      float p2t = mContext->ScaledPixelsToTwips();      rv = mOwner->CreateWidget(NSIntPixelsToTwips(mPluginWindow->width, p2t),                                NSIntPixelsToTwips(mPluginWindow->height, p2t),                                windowless);      if (NS_OK == rv)      {        view = mOwner->GetView();        if (view)        {          mWidget = view->GetWidget();          PRBool fTransparent = PR_FALSE;          mInstance->GetValue(nsPluginInstanceVariable_TransparentBool, (void *)&fTransparent);                    view->GetViewManager()->SetViewContentTransparency(view, fTransparent);        }        if (PR_TRUE == windowless)        {          mPluginWindow->type = nsPluginWindowType_Drawable;          mPluginWindow->window = nsnull; // this needs to be a HDC according to the spec,                                         // but I do not see the right way to release it                                         // so let's postpone passing HDC till paint event                                         // when it is really needed. Change spec?        }        else if (mWidget)        {          mWidget->Resize(mPluginWindow->width, mPluginWindow->height, PR_FALSE);                    // mPluginWindow->type is used in |GetPluginPort| so it must be initilized first          mPluginWindow->type = nsPluginWindowType_Window;          mPluginWindow->window = GetPluginPort();          // start the idle timer.          StartTimer();          // tell the plugin window about the widget          mPluginWindow->SetPluginWidget(mWidget);        }      }    }  }  return rv;}