mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1164557 - Weed out spurious calls to Axis::OverscrollBy() caused by rounding error r=kats
This commit is contained in:
parent
2c82fd3112
commit
ed212a4d92
@ -182,6 +182,11 @@ ParentLayerCoord Axis::ApplyResistance(ParentLayerCoord aRequestedOverscroll) co
|
||||
|
||||
void Axis::OverscrollBy(ParentLayerCoord aOverscroll) {
|
||||
MOZ_ASSERT(CanScroll());
|
||||
// We can get some spurious calls to OverscrollBy() with near-zero values
|
||||
// due to rounding error. Ignore those (they might trip the asserts below.)
|
||||
if (FuzzyEqualsAdditive(aOverscroll.value, 0.0f, COORDINATE_EPSILON)) {
|
||||
return;
|
||||
}
|
||||
ClearOverscrollAnimationState();
|
||||
aOverscroll = ApplyResistance(aOverscroll);
|
||||
if (aOverscroll > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user