Correcting our background painting code per the latest CSS specs. By default, backgrounds should be painted to the border

area, and not the padding area as per the CSS 2 Errata, CSS2.1 and CSS3.  Also, implementing the CSS3 'background-clip'
and 'background-origin' properties (currently with -moz- prefixes) to control this behavior.
Bug 162252, r=dbaron sr=roc+moz


git-svn-id: svn://10.0.0.236/trunk@131419 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
caillon%returnzero.com
2002-10-08 10:24:53 +00:00
parent eeef82662c
commit 0f7366d6d0
71 changed files with 1432 additions and 792 deletions

View File

@@ -748,11 +748,16 @@ nsPageFrame::DrawBackground(nsIPresContext* aPresContext,
nsRect rect;
pageContentFrame->GetRect(rect);
const nsStyleBorder* border = NS_STATIC_CAST(const nsStyleBorder*,
mStyleContext->GetStyleData(eStyleStruct_Border));
const nsStyleBorder* border =
NS_STATIC_CAST(const nsStyleBorder*,
mStyleContext->GetStyleData(eStyleStruct_Border));
const nsStylePadding* padding =
NS_STATIC_CAST(const nsStylePadding*,
mStyleContext->GetStyleData(eStyleStruct_Padding));
nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this,
aDirtyRect, rect, *border, 0, 0, PR_TRUE);
aDirtyRect, rect, *border, *padding,
0, 0, PR_TRUE);
}
}