mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 21:35:39 +00:00
Bug 955712 - Don't draw background color when not needed. r=roc
This commit is contained in:
parent
e6ea29ce0d
commit
62f87e1c89
@ -2614,14 +2614,17 @@ nsCSSRendering::PaintBackgroundColorWithSC(nsPresContext* aPresContext,
|
||||
// background colors.
|
||||
bool drawBackgroundImage;
|
||||
bool drawBackgroundColor;
|
||||
|
||||
nscolor bgColor = DetermineBackgroundColor(aPresContext,
|
||||
aBackgroundSC,
|
||||
aForFrame,
|
||||
drawBackgroundImage,
|
||||
drawBackgroundColor);
|
||||
|
||||
NS_ASSERTION(drawBackgroundColor, "Should not be trying to paint a background color if we don't have one");
|
||||
NS_ASSERTION(drawBackgroundImage || drawBackgroundColor,
|
||||
"Should not be trying to paint a background if we don't have one");
|
||||
if (!drawBackgroundColor) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Compute the outermost boundary of the area that might be painted.
|
||||
gfxContext *ctx = aRenderingContext.ThebesContext();
|
||||
|
Loading…
Reference in New Issue
Block a user