зеркало из https://github.com/mozilla/gecko-dev.git
Back out a38f82d29d97 (bug 652914) for causing reftest failures.
This commit is contained in:
Родитель
3bc7160178
Коммит
98536ed88c
|
@ -1700,12 +1700,12 @@ DrawBackgroundColor(BackgroundClipState& aClipState, gfxContext *aCtx,
|
|||
aCtx->Restore();
|
||||
}
|
||||
|
||||
nscolor
|
||||
nsCSSRendering::DetermineBackgroundColor(nsPresContext* aPresContext,
|
||||
nsStyleContext* aStyleContext,
|
||||
nsIFrame* aFrame,
|
||||
PRBool& aDrawBackgroundImage,
|
||||
PRBool& aDrawBackgroundColor)
|
||||
static nscolor
|
||||
DetermineBackgroundColorInternal(nsPresContext* aPresContext,
|
||||
nsStyleContext* aStyleContext,
|
||||
nsIFrame* aFrame,
|
||||
PRBool& aDrawBackgroundImage,
|
||||
PRBool& aDrawBackgroundColor)
|
||||
{
|
||||
aDrawBackgroundImage = PR_TRUE;
|
||||
aDrawBackgroundColor = PR_TRUE;
|
||||
|
@ -1737,6 +1737,20 @@ nsCSSRendering::DetermineBackgroundColor(nsPresContext* aPresContext,
|
|||
return bgColor;
|
||||
}
|
||||
|
||||
nscolor
|
||||
nsCSSRendering::DetermineBackgroundColor(nsPresContext* aPresContext,
|
||||
nsStyleContext* aStyleContext,
|
||||
nsIFrame* aFrame)
|
||||
{
|
||||
PRBool drawBackgroundImage;
|
||||
PRBool drawBackgroundColor;
|
||||
return DetermineBackgroundColorInternal(aPresContext,
|
||||
aStyleContext,
|
||||
aFrame,
|
||||
drawBackgroundImage,
|
||||
drawBackgroundColor);
|
||||
}
|
||||
|
||||
static gfxFloat
|
||||
ConvertGradientValueToPixels(const nsStyleCoord& aCoord,
|
||||
gfxFloat aFillLength,
|
||||
|
@ -2304,11 +2318,11 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext,
|
|||
PRBool drawBackgroundImage;
|
||||
PRBool drawBackgroundColor;
|
||||
|
||||
nscolor bgColor = DetermineBackgroundColor(aPresContext,
|
||||
aBackgroundSC,
|
||||
aForFrame,
|
||||
drawBackgroundImage,
|
||||
drawBackgroundColor);
|
||||
nscolor bgColor = DetermineBackgroundColorInternal(aPresContext,
|
||||
aBackgroundSC,
|
||||
aForFrame,
|
||||
drawBackgroundImage,
|
||||
drawBackgroundColor);
|
||||
|
||||
// At this point, drawBackgroundImage and drawBackgroundColor are
|
||||
// true if and only if we are actually supposed to paint an image or
|
||||
|
|
|
@ -211,9 +211,7 @@ struct nsCSSRendering {
|
|||
static nscolor
|
||||
DetermineBackgroundColor(nsPresContext* aPresContext,
|
||||
nsStyleContext* aStyleContext,
|
||||
nsIFrame* aFrame,
|
||||
PRBool& aDrawBackgroundImage,
|
||||
PRBool& aDrawBackgroundColor);
|
||||
nsIFrame* aFrame);
|
||||
|
||||
/**
|
||||
* Render the background for an element using css rendering rules
|
||||
|
|
|
@ -5846,14 +5846,10 @@ void PresShell::UpdateCanvasBackground()
|
|||
// style frame but we don't have access to the canvasframe here. It isn't
|
||||
// a problem because only a few frames can return something other than true
|
||||
// and none of them would be a canvas frame or root element style frame.
|
||||
PRBool drawBackgroundImage;
|
||||
PRBool drawBackgroundColor;
|
||||
mCanvasBackgroundColor =
|
||||
nsCSSRendering::DetermineBackgroundColor(mPresContext, bgStyle,
|
||||
rootStyleFrame,
|
||||
drawBackgroundImage,
|
||||
drawBackgroundColor);
|
||||
if (drawBackgroundColor && GetPresContext()->IsRootContentDocument() &&
|
||||
rootStyleFrame);
|
||||
if (GetPresContext()->IsRootContentDocument() &&
|
||||
!IsTransparentContainerElement(mPresContext)) {
|
||||
mCanvasBackgroundColor =
|
||||
NS_ComposeColors(mPresContext->DefaultBackgroundColor(), mCanvasBackgroundColor);
|
||||
|
|
Загрузка…
Ссылка в новой задаче