Bug 236910. Elements that clip their backgrounds do not present a uniform background. r+sr=dbaron,a=choffman

This commit is contained in:
roc+%cs.cmu.edu 2004-03-28 21:05:29 +00:00
parent 7101f7c30c
commit 54c1157975
2 changed files with 8 additions and 2 deletions

View File

@ -561,10 +561,13 @@ SyncFrameViewGeometryDependentProperties(nsIPresContext* aPresContext,
PRBool scrollFrameHasBG =
nsCSSRendering::FindBackground(aPresContext, scrollFrame, &scrollFrameBG,
&scrollFrameIsCanvas);
const nsStyleDisplay* bgDisplay = scrollFrame->GetStyleDisplay();
drawnOnUniformField = scrollFrameHasBG &&
!(scrollFrameBG->mBackgroundFlags & NS_STYLE_BG_COLOR_TRANSPARENT) &&
(scrollFrameBG->mBackgroundFlags & NS_STYLE_BG_IMAGE_NONE) &&
!HasNonZeroBorderRadius(scrollFrame->GetStyleContext());
!HasNonZeroBorderRadius(scrollFrame->GetStyleContext()) &&
!(bgDisplay->IsAbsolutelyPositioned()
&& (bgDisplay->mClipFlags & NS_STYLE_CLIP_RECT));
}
aView->SetHasUniformBackground(drawnOnUniformField);

View File

@ -561,10 +561,13 @@ SyncFrameViewGeometryDependentProperties(nsIPresContext* aPresContext,
PRBool scrollFrameHasBG =
nsCSSRendering::FindBackground(aPresContext, scrollFrame, &scrollFrameBG,
&scrollFrameIsCanvas);
const nsStyleDisplay* bgDisplay = scrollFrame->GetStyleDisplay();
drawnOnUniformField = scrollFrameHasBG &&
!(scrollFrameBG->mBackgroundFlags & NS_STYLE_BG_COLOR_TRANSPARENT) &&
(scrollFrameBG->mBackgroundFlags & NS_STYLE_BG_IMAGE_NONE) &&
!HasNonZeroBorderRadius(scrollFrame->GetStyleContext());
!HasNonZeroBorderRadius(scrollFrame->GetStyleContext()) &&
!(bgDisplay->IsAbsolutelyPositioned()
&& (bgDisplay->mClipFlags & NS_STYLE_CLIP_RECT));
}
aView->SetHasUniformBackground(drawnOnUniformField);