Closed Bug 482689 Opened 12 years ago Closed 12 years ago
Display Background::Is Opaque to include solid background images
I think this patch is right, and it seems to help, although it would be nice if it could include repeat_x/repeat_y stuff that filled the whole area. Any other optimizations to this would be helpful as well.
Comment on attachment 366783 [details] [diff] [review] v0.5 >+ // bottom layer's clip is used for the color >+ bottomLayer.mClip == NS_STYLE_BG_CLIP_BORDER && >+ !nsLayoutUtils::HasNonZeroCorner(mFrame->GetStyleBorder()->mBorderRadius)) May as well invert the checks for these two conditions for a return false that happens before the two curent checks for them, so you don't have to check them twice.
This is OK other than what dbaron said. We could improve this quite a bit by having nsDisplayBackground::GetBounds return the actual area covered by the background; then IsOpaque could return true whenever the image or color is opaque. That could easily be a followup patch though. (For simplicity you could fall back to assuming the border-box if there's more than one background.)
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.