Bug 880676 - Replace a couple of Rect scaling functions with strongly typed operators. r=BenWa

This commit is contained in:
Kartikaya Gupta
2013-06-14 16:11:31 -04:00
parent 2c81c2929e
commit d2950ed4ec
5 changed files with 58 additions and 71 deletions

View File

@@ -937,7 +937,7 @@ AndroidGeckoLayerClient::SyncFrameMetrics(const ScreenPoint& aScrollOffset, floa
AutoLocalJNIFrame jniFrame(env);
// convert the displayport rect from scroll-relative CSS pixels to document-relative device pixels
LayerRect dpUnrounded = LayerRect::FromCSSRect(aDisplayPort, aDisplayResolution, aDisplayResolution);
LayerRect dpUnrounded = aDisplayPort * CSSToLayerScale(aDisplayResolution);
dpUnrounded += LayerPoint::FromUnknownPoint(aScrollOffset.ToUnknownPoint());
LayerIntRect dp = gfx::RoundedToInt(dpUnrounded);