mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 939607 - Part 1: Make PaintBoxShadowOuter take an opacity value. r=roc
This commit is contained in:
parent
01cc092803
commit
d5bdc88e88
@ -1020,7 +1020,8 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext,
|
||||
nsRenderingContext& aRenderingContext,
|
||||
nsIFrame* aForFrame,
|
||||
const nsRect& aFrameArea,
|
||||
const nsRect& aDirtyRect)
|
||||
const nsRect& aDirtyRect,
|
||||
float aOpacity)
|
||||
{
|
||||
const nsStyleBorder* styleBorder = aForFrame->StyleBorder();
|
||||
nsCSSShadowArray* shadows = styleBorder->mBoxShadow;
|
||||
@ -1132,8 +1133,11 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext,
|
||||
else
|
||||
shadowColor = aForFrame->StyleColor()->mColor;
|
||||
|
||||
gfxRGBA gfxShadowColor(shadowColor);
|
||||
gfxShadowColor.a *= aOpacity;
|
||||
|
||||
renderContext->Save();
|
||||
renderContext->SetColor(gfxRGBA(shadowColor));
|
||||
renderContext->SetColor(gfxShadowColor);
|
||||
|
||||
// Draw the shape of the frame so it can be blurred. Recall how nsContextBoxBlur
|
||||
// doesn't make any temporary surfaces if blur is 0 and it just returns the original
|
||||
|
@ -264,7 +264,8 @@ struct nsCSSRendering {
|
||||
nsRenderingContext& aRenderingContext,
|
||||
nsIFrame* aForFrame,
|
||||
const nsRect& aFrameArea,
|
||||
const nsRect& aDirtyRect);
|
||||
const nsRect& aDirtyRect,
|
||||
float aOpacity = 1.0);
|
||||
|
||||
static void ComputePixelRadii(const nscoord *aAppUnitsRadii,
|
||||
nscoord aAppUnitsPerPixel,
|
||||
|
Loading…
Reference in New Issue
Block a user