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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user