Bug 1230415 - Use DrawTarget instead of gfxContext in PaintBorderWithStyleBorder(). r=roc.

--HG--
extra : rebase_source : 06da7ab06a3c0ea7c0141251857552abc26747b3
This commit is contained in:
Nicholas Nethercote 2015-12-03 19:16:25 -08:00
Родитель c2834c6c5b
Коммит a0a0ffb041
1 изменённых файлов: 9 добавлений и 7 удалений

Просмотреть файл

@ -736,8 +736,7 @@ nsCSSRendering::PaintBorderWithStyleBorder(nsPresContext* aPresContext,
joinedBorderArea.width, joinedBorderArea.height);
// start drawing
gfxContext* ctx = aRenderingContext.ThebesContext();
ctx->Save();
bool needToPopClip = false;
if (::IsBoxDecorationSlice(aStyleBorder)) {
if (joinedBorderArea.IsEqualEdges(aBorderArea)) {
@ -746,10 +745,11 @@ nsCSSRendering::PaintBorderWithStyleBorder(nsPresContext* aPresContext,
} else {
// We're drawing borders around the joined continuation boxes so we need
// to clip that to the slice that we want for this frame.
aRenderingContext.ThebesContext()->
Clip(NSRectToSnappedRect(aBorderArea,
aForFrame->PresContext()->AppUnitsPerDevPixel(),
aDrawTarget));
aDrawTarget.PushClipRect(
NSRectToSnappedRect(aBorderArea,
aForFrame->PresContext()->AppUnitsPerDevPixel(),
aDrawTarget));
needToPopClip = true;
}
} else {
MOZ_ASSERT(joinedBorderArea.IsEqualEdges(aBorderArea),
@ -803,7 +803,9 @@ nsCSSRendering::PaintBorderWithStyleBorder(nsPresContext* aPresContext,
bgColor);
br.DrawBorders();
ctx->Restore();
if (needToPopClip) {
aDrawTarget.PopClip();
}
PrintAsStringNewline();