!aFrame->CanPaintBackground();
!aFrame->CanPaintBackground() || HasNonZeroBorderRadius(aStyleContext);
SyncFrameViewGeometryDependentProperties(nsIPresContext*  aPresContext,                                         nsIFrame*        aFrame,                                         nsIStyleContext* aStyleContext,                                         nsIView*         aView,                                         PRUint32         aFlags){  nsCOMPtr<nsIViewManager> vm;  aView->GetViewManager(*getter_AddRefs(vm));  PRBool isCanvas;  const nsStyleBackground* bg;  PRBool hasBG =    nsCSSRendering::FindBackground(aPresContext, aFrame, &bg, &isCanvas);  // background-attachment: fixed is not really geometry dependent, but  // we set it here because it's cheap to do so  PRBool fixedBackground = hasBG &&    NS_STYLE_BG_ATTACHMENT_FIXED == bg->mBackgroundAttachment;  // If the frame has a fixed background attachment, then indicate that the  // view's contents should be repainted and not bitblt'd  vm->SetViewBitBltEnabled(aView, !fixedBackground);  PRBool  viewHasTransparentContent =    !hasBG ||    (bg->mBackgroundFlags & NS_STYLE_BG_COLOR_TRANSPARENT) ||    !aFrame->CanPaintBackground();  if (isCanvas && viewHasTransparentContent) {    nsIView* rootView;    vm->GetRootView(rootView);    nsIView* rootParent;    rootView->GetParent(rootParent);    if (nsnull == rootParent) {      viewHasTransparentContent = PR_FALSE;    }  }  const nsStyleDisplay* display;  ::GetStyleData(aStyleContext, &display);  nsFrameState kidState;  aFrame->GetFrameState(&kidState);    if (!viewHasTransparentContent) {    // If we're showing the view but the frame is hidden, then the view is transparent    nsViewVisibility visibility;    aView->GetVisibility(visibility);    const nsStyleVisibility* vis;    ::GetStyleData(aStyleContext, &vis);    if ((nsViewVisibility_kShow == visibility         && NS_STYLE_VISIBILITY_HIDDEN == vis->mVisible)        || (NS_STYLE_OVERFLOW_VISIBLE == display->mOverflow            && (kidState & NS_FRAME_OUTSIDE_CHILDREN) != 0)) {      viewHasTransparentContent = PR_TRUE;    }  }  // If the frame has visible content that overflows the content area, then we  // need the view marked as having transparent content  // There are two types of clipping:  // - 'clip' which only applies to absolutely positioned elements, and is  //    relative to the element's border edge. 'clip' applies to the entire  //    element  // - 'overflow-clip' which only applies to block-level elements and replaced  //   elements that have 'overflow' set to 'hidden'. 'overflow-clip' is relative  //   to the content area and applies to content only (not border or background).  //   Note that out-of-flow frames like floated or absolutely positioned frames  //   are block-level, but we can't rely on the 'display' value being set correctly  //   in the style context...  PRBool isBlockLevel = display->IsBlockLevel() || (kidState & NS_FRAME_OUT_OF_FLOW);  PRBool hasClip = display->IsAbsolutelyPositioned() && (display->mClipFlags & NS_STYLE_CLIP_RECT);  PRBool hasOverflowClip = isBlockLevel && (display->mOverflow == NS_STYLE_OVERFLOW_HIDDEN);  if (hasClip || hasOverflowClip) {    nsSize frameSize;    aFrame->GetSize(frameSize);    nsRect  clipRect;    if (hasClip) {      // Start with the 'auto' values and then factor in user specified values      clipRect.SetRect(0, 0, frameSize.width, frameSize.height);      if (display->mClipFlags & NS_STYLE_CLIP_RECT) {        if (0 == (NS_STYLE_CLIP_TOP_AUTO & display->mClipFlags)) {          clipRect.y = display->mClip.y;        }        if (0 == (NS_STYLE_CLIP_LEFT_AUTO & display->mClipFlags)) {          clipRect.x = display->mClip.x;        }        if (0 == (NS_STYLE_CLIP_RIGHT_AUTO & display->mClipFlags)) {          clipRect.width = display->mClip.width;        }        if (0 == (NS_STYLE_CLIP_BOTTOM_AUTO & display->mClipFlags)) {          clipRect.height = display->mClip.height;        }      }    }    if (hasOverflowClip) {      const nsStyleBorder* borderStyle;      ::GetStyleData(aStyleContext, &borderStyle);      const nsStylePadding* paddingStyle;      ::GetStyleData(aStyleContext, &paddingStyle);      nsMargin border, padding;      // XXX We don't support the 'overflow-clip' property yet so just use the      // content area (which is the default value) as the clip shape      nsRect overflowClipRect(0, 0, frameSize.width, frameSize.height);      borderStyle->GetBorder(border);      overflowClipRect.Deflate(border);      // XXX We need to handle percentage padding      if (paddingStyle->GetPadding(padding)) {        overflowClipRect.Deflate(padding);      }      if (hasClip) {        // If both 'clip' and 'overflow-clip' apply then use the intersection        // of the two        clipRect.IntersectRect(clipRect, overflowClipRect);      } else {        clipRect = overflowClipRect;      }    }      nsRect newSize;    aView->GetBounds(newSize);    nscoord x, y;    aView->GetPosition(&x, &y);    newSize.x -= x;    newSize.y -= y;    // If part of the view is being clipped out, then mark it transparent    if (clipRect.y > newSize.y        || clipRect.x > newSize.x        || clipRect.XMost() < newSize.XMost()        || clipRect.YMost() < newSize.YMost()) {      viewHasTransparentContent = PR_TRUE;    }    // Set clipping of child views.    nsRegion region;    region.Copy(nsRectFast(clipRect));    vm->SetViewChildClipRegion(aView, &region);  } else {    // Remove clipping of child views.    vm->SetViewChildClipRegion(aView, nsnull);  }  vm->SetViewContentTransparency(aView, viewHasTransparentContent);}