mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 15:25:52 +00:00
Bug 964997 - When scrolling is disabled, don't apply the velocity transformations to the displayport. r=botond
This commit is contained in:
parent
5eb6d18a32
commit
4aed403139
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user