nsCOMPtr<nsIViewObserver> vo; aView->GetViewManager()->GetViewObserver(*getter_AddRefs(vo));
nsIViewObserver* vo = aView->GetViewManager()->GetViewObserver();
static PRBool IsViewVisible(nsView *aView){  for (nsIView *view = aView; view; view = view->GetParent()) {    // We don't check widget visibility here because in the future (with    // the better approach to this that's in attachment 160801 on bug    // 227361), callers of the equivalent to this function should be able    // to rely on being notified when the result of this function changes.    if (view->GetVisibility() == nsViewVisibility_kHide)      return PR_FALSE;  }  // Find out if the root view is visible by asking the view observer  // (this won't be needed anymore if we link view trees across chrome /  // content boundaries in DocumentViewerImpl::MakeWindow).  nsCOMPtr<nsIViewObserver> vo;  aView->GetViewManager()->GetViewObserver(*getter_AddRefs(vo));  return vo && vo->IsVisible();}