(In reply to comment #10) > + nscoord oneDevPixel = presContext->DevPixelsToAppUnits(1); > + nsPoint offsetPoint = aPoint - nsPoint(oneDevPixel * 20, oneDevPixel * 20); > + nsSize rectSize = nsSize(oneDevPixel * 40, oneDevPixel * 40); > PRBool didScroll = presContext->PresShell()-> > + ScrollFrameRectIntoView(aFrame, nsRect(offsetPoint, rectSize), > > Why not > nsRect r = nsIntRect(-20, -20, 40, 40). > ToAppUnits(presContext->AppUnitsPerDevPixel()); > PRBool didScroll = presContext->PresShell()-> > ScrollFrameRectIntoView(aFrame, r + aPoint); > > Sure looks simpler to me!
Yes, you're right. Thanks!
(In reply to comment #10) >DevPixelsToApp Units(1) ; >PresShell( )-> IntoView( aFrame, nsRect(offsetPoint, rectSize), presContext- >AppUnitsPerDev Pixel() ); >PresShell( )-> IntoView( aFrame, r + aPoint);
> + nscoord oneDevPixel = presContext-
> + nsPoint offsetPoint = aPoint - nsPoint(oneDevPixel * 20, oneDevPixel * 20);
> + nsSize rectSize = nsSize(oneDevPixel * 40, oneDevPixel * 40);
> PRBool didScroll = presContext-
> + ScrollFrameRect
>
> Why not
> nsRect r = nsIntRect(-20, -20, 40, 40).
> ToAppUnits(
> PRBool didScroll = presContext-
> ScrollFrameRect
>
> Sure looks simpler to me!
Yes, you're right. Thanks!