aViewManager->UpdateView(aView, nsnull, NS_VMREFRESH_NO_SYNC);
SyncAndInvalidateView(nsIView* aView, nsIFrame* aFrame,                       nsIViewManager* aViewManager){  const nsStyleColor* color;  const nsStyleDisplay* disp;   aFrame->GetStyleData(eStyleStruct_Color, (const nsStyleStruct*&) color);  aFrame->GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&) disp);  aViewManager->SetViewOpacity(aView, color->mOpacity);  // See if the view should be hidden or visible  PRBool  viewIsVisible = PR_TRUE;  PRBool  viewHasTransparentContent = (color->mBackgroundFlags &            NS_STYLE_BG_COLOR_TRANSPARENT) == NS_STYLE_BG_COLOR_TRANSPARENT;  if (NS_STYLE_VISIBILITY_COLLAPSE == disp->mVisible) {    viewIsVisible = PR_FALSE;  }  else if (NS_STYLE_VISIBILITY_HIDDEN == disp->mVisible) {    // If it has a widget, hide the view because the widget can't deal with it    nsIWidget* widget = nsnull;    aView->GetWidget(widget);    if (widget) {      viewIsVisible = PR_FALSE;      NS_RELEASE(widget);    }    else {      // If it's a scroll frame, then hide the view. This means that      // child elements can't override their parent's visibility, but      // it's not practical to leave it visible in all cases because      // the scrollbars will be showing      nsIAtom*  frameType;      aFrame->GetFrameType(&frameType);      if (frameType == nsLayoutAtoms::scrollFrame) {        viewIsVisible = PR_FALSE;      } else {        // If it's a container element, then leave the view visible, but        // mark it as having transparent content. The reason we need to        // do this is that child elements can override their parent's        // hidden visibility and be visible anyway        nsIFrame* firstChild;          aFrame->FirstChild(nsnull, &firstChild);        if (firstChild) {          // It's not a left frame, so the view needs to be visible, but          // marked as having transparent content          viewHasTransparentContent = PR_TRUE;        } else {          // It's a leaf frame so go ahead and hide the view          viewIsVisible = PR_FALSE;        }      }      NS_IF_RELEASE(frameType);    }  }  if (viewIsVisible) {    aViewManager->SetViewContentTransparency(aView, viewHasTransparentContent);    aViewManager->SetViewVisibility(aView, nsViewVisibility_kShow);  }  else {    aViewManager->SetViewVisibility(aView, nsViewVisibility_kHide);   }}