Bug 352093. Part 11: Remove GetWidget cals from the view maanger. r=bzbarsky

This commit is contained in:
Robert O'Callahan 2009-07-22 12:45:09 +12:00
parent 2ebc95776b
commit 934fc5b108
2 changed files with 3 additions and 2 deletions

View File

@ -844,7 +844,7 @@ nsIWidget* nsIView::GetNearestWidget(nsPoint* aOffset) const
if (aOffset) {
*aOffset = pt;
}
return static_cast<const nsView*>(this)->GetViewManager()->GetWidget();
return nsnull;
}
// pt is now the offset from v's origin to this's origin

View File

@ -978,7 +978,8 @@ NS_IMETHODIMP nsViewManager::DispatchEvent(nsGUIEvent *aEvent,
// Make sure to not send WillPaint notifications while scrolling
nsRefPtr<nsViewManager> rootVM = RootViewManager();
nsIWidget *widget = mRootView->GetWidget();
nsCOMPtr<nsIWidget> widget;
rootVM->GetRootWidget(getter_AddRefs(widget));
PRBool transparentWindow = PR_FALSE;
if (widget)
transparentWindow = widget->GetTransparencyMode() == eTransparencyTransparent;