diff --git a/mozilla/layout/base/nsCSSRendering.cpp b/mozilla/layout/base/nsCSSRendering.cpp index da1afba7e71..7b26aaaef87 100644 --- a/mozilla/layout/base/nsCSSRendering.cpp +++ b/mozilla/layout/base/nsCSSRendering.cpp @@ -3113,13 +3113,14 @@ nsCSSRendering::PaintBackgroundWithSC(nsIPresContext* aPresContext, y1 = y0 + tileHeight; } + nsRect tileRect(x0,y0,(x1-x0),(y1-y0)); + #ifdef XP_WIN - PRInt32 xOffset = dirtyRect.x - x0, - yOffset = dirtyRect.y - y0; - aRenderingContext.DrawTile(image,xOffset,yOffset,&dirtyRect); + PRInt32 xOffset = tileRect.x - x0, + yOffset = tileRect.y - y0; + aRenderingContext.DrawTile(image,xOffset,yOffset,&tileRect); #else nsRect drawRect; - nsRect tileRect(x0,y0,(x1-x0),(y1-y0)); if (drawRect.IntersectRect(tileRect, dirtyRect)) { PRInt32 xOffset = drawRect.x - x0, diff --git a/mozilla/layout/html/style/src/nsCSSRendering.cpp b/mozilla/layout/html/style/src/nsCSSRendering.cpp index da1afba7e71..7b26aaaef87 100644 --- a/mozilla/layout/html/style/src/nsCSSRendering.cpp +++ b/mozilla/layout/html/style/src/nsCSSRendering.cpp @@ -3113,13 +3113,14 @@ nsCSSRendering::PaintBackgroundWithSC(nsIPresContext* aPresContext, y1 = y0 + tileHeight; } + nsRect tileRect(x0,y0,(x1-x0),(y1-y0)); + #ifdef XP_WIN - PRInt32 xOffset = dirtyRect.x - x0, - yOffset = dirtyRect.y - y0; - aRenderingContext.DrawTile(image,xOffset,yOffset,&dirtyRect); + PRInt32 xOffset = tileRect.x - x0, + yOffset = tileRect.y - y0; + aRenderingContext.DrawTile(image,xOffset,yOffset,&tileRect); #else nsRect drawRect; - nsRect tileRect(x0,y0,(x1-x0),(y1-y0)); if (drawRect.IntersectRect(tileRect, dirtyRect)) { PRInt32 xOffset = drawRect.x - x0,