Bug 820496. Put bounds in correct coordinate system when setting up the canvas background for a page. r=mattwoodrow

--HG--
extra : rebase_source : 1927c9c5c26dea200b9df618bb5798e5f37d6b86
This commit is contained in:
Robert O'Callahan 2012-12-18 15:45:14 +13:00
parent b65b659d53
commit 196d57eee7
4 changed files with 16 additions and 1 deletions

View File

@ -546,7 +546,8 @@ nsPageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// Add the canvas background color to the bottom of the list. This
// happens after we've built the list so that AddCanvasBackgroundColorItem
// can monkey with the contents if necessary.
nsRect backgroundRect = nsRect(nsPoint(0, 0), child->GetSize());
nsRect backgroundRect =
nsRect(aBuilder->ToReferenceFrame(child), child->GetSize());
rv = PresContext()->GetPresShell()->AddCanvasBackgroundColorItem(
*aBuilder, content, child, backgroundRect, NS_RGBA(0,0,0,0));

View File

@ -0,0 +1,7 @@
<!DOCTYPE html>
<html class="reftest-print">
<body style="margin:0">
<div style="height:10000px; background:blue;">
<div style="height:5000px; width:50%; background:yellow;">
</body>
</html>

View File

@ -0,0 +1,6 @@
<!DOCTYPE html>
<html class="reftest-print">
<body style="margin:0; height:10000px; background:blue;">
<div style="height:5000px; width:50%; background:yellow;">
</body>
</html>

View File

@ -25,3 +25,4 @@
== 115199-2b.html 115199-2-ref.html
== 652178-1.html 652178-1-ref2.html
fuzzy-if(cocoaWidget,1,5000) == 745025-1.html 745025-1-ref.html
== 820496-1.html 820496-1-ref.html