Bug 1209725 - Use DrawResult combining operators in nsCSSRendering::PaintBackgroundWithSC. r=tn

This commit is contained in:
Seth Fowler 2015-10-13 23:21:39 -07:00
parent a23a8d3c50
commit 8e658a6b44

View File

@ -2832,9 +2832,6 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext,
NS_PRECONDITION(aForFrame,
"Frame is expected to be provided to PaintBackground");
// Initialize our result to success. We update it only if its value is
// currently DrawResult::SUCCESS, which means that as soon as we hit our first
// non-successful draw, we stop updating and will return that value.
DrawResult result = DrawResult::SUCCESS;
// Check to see if we have an appearance defined. If so, we let the theme
@ -3010,16 +3007,12 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext,
ctx->SetOp(state.mCompositionOp);
}
DrawResult resultForLayer =
result &=
state.mImageRenderer.DrawBackground(aPresContext, aRenderingContext,
state.mDestArea, state.mFillArea,
state.mAnchor + paintBorderArea.TopLeft(),
clipState.mDirtyRect);
if (result == DrawResult::SUCCESS) {
result = resultForLayer;
}
if (state.mCompositionOp != CompositionOp::OP_OVER) {
ctx->SetOp(CompositionOp::OP_OVER);
}