Bug 598439 Shadow layer offset is incorrect when content scroll offset is non-zero r=cjones a=blocking-fennec-2b1

This commit is contained in:
Benjamin Stover 2010-09-23 11:54:36 -07:00
parent af6dec402c
commit 263bbe366d
2 changed files with 4 additions and 3 deletions

View File

@ -139,7 +139,7 @@ interface nsIFrameLoader : nsISupports
* such a way that the <browser>'s visible rect encloses pixels that
* the content document does not (yet) define.
*
* The viewport scroll values are in units of content-document CSS
* The viewport scroll values are in units of chrome-document CSS
* pixels.
*
* These APIs are designed to be used with nsIDOMWindowUtils

View File

@ -89,8 +89,9 @@ SetTransformFor(ContainerLayer* aContainer, nsIFrame* aContainedFrame,
// we set a compensating translation that moves the content document
// pixels to where the user wants them to be.
nsIntPoint scrollCompensation =
(aConfig.mScrollOffset.ToNearestPixels(auPerDevPixel) -
aMetrics.mViewportScrollOffset);
(aConfig.mScrollOffset.ToNearestPixels(auPerDevPixel));
scrollCompensation.x -= aMetrics.mViewportScrollOffset.x * aConfig.mXScale;
scrollCompensation.y -= aMetrics.mViewportScrollOffset.y * aConfig.mYScale;
translation -= scrollCompensation;
gfxMatrix transform;