mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1196593 - Account for some rounding error when determining if we've reached the bottom of the page. r=rbarker
This commit is contained in:
parent
7c6ffee6c8
commit
de8bf5a3a3
@ -74,6 +74,7 @@ import org.mozilla.gecko.trackingprotection.TrackingProtectionPrompt;
|
||||
import org.mozilla.gecko.util.ActivityUtils;
|
||||
import org.mozilla.gecko.util.Clipboard;
|
||||
import org.mozilla.gecko.util.EventCallback;
|
||||
import org.mozilla.gecko.util.FloatUtils;
|
||||
import org.mozilla.gecko.util.GamepadUtils;
|
||||
import org.mozilla.gecko.util.GeckoEventListener;
|
||||
import org.mozilla.gecko.util.HardwareUtils;
|
||||
@ -1582,7 +1583,8 @@ public class BrowserApp extends GeckoApp
|
||||
float toolbarTranslation = mLayerView.getDynamicToolbarAnimator().getToolbarTranslation();
|
||||
|
||||
boolean shortPage = metrics.getPageHeight() < metrics.getHeight();
|
||||
boolean atBottomOfLongPage = (metrics.pageRectBottom == metrics.viewportRectBottom())
|
||||
boolean atBottomOfLongPage =
|
||||
FloatUtils.fuzzyEquals(metrics.pageRectBottom, metrics.viewportRectBottom())
|
||||
&& (metrics.pageRectBottom > 2 * metrics.getHeight());
|
||||
Log.v(LOGTAG, "On pan/zoom stopped, short page: " + shortPage
|
||||
+ "; atBottomOfLongPage: " + atBottomOfLongPage);
|
||||
|
Loading…
Reference in New Issue
Block a user