Bug 964997 - When scrolling is disabled, don't apply the velocity transformations to the displayport. r=botond

This commit is contained in:
Kartikaya Gupta 2014-01-30 13:37:06 -05:00
parent 5eb6d18a32
commit 4aed403139

View File

@ -1300,6 +1300,15 @@ const CSSRect AsyncPanZoomController::CalculatePendingDisplayPort(
CSSRect displayPort(scrollOffset, compositionBounds.Size());
CSSPoint velocity = aVelocity / aFrameMetrics.mZoom;
// If scrolling is disabled here then our actual velocity is going
// to be zero, so treat the displayport accordingly.
if (aFrameMetrics.GetDisableScrollingX()) {
velocity.x = 0;
}
if (aFrameMetrics.GetDisableScrollingY()) {
velocity.y = 0;
}
// Enlarge the displayport along both axes depending on how fast we're moving
// on that axis and how long it takes to paint. Apply some heuristics to try
// to minimize checkerboarding.