mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1055883 - Don't reshow header when hitting the bottom of short pages. r=kats
This commit is contained in:
parent
ca9b6baec8
commit
20c90d0a19
@ -1210,12 +1210,13 @@ public class BrowserApp extends GeckoApp
|
||||
|
||||
// Make sure the toolbar is fully hidden or fully shown when the user
|
||||
// lifts their finger. If the page is shorter than the viewport or if
|
||||
// the user has reached the end of the page, the toolbar is always
|
||||
// shown.
|
||||
// the user has reached the end of a long (longer than twice the viewport height) page,
|
||||
// the toolbar is always shown.
|
||||
ImmutableViewportMetrics metrics = mLayerView.getViewportMetrics();
|
||||
final float height = metrics.viewportRectBottom - metrics.viewportRectTop;
|
||||
if (metrics.getPageHeight() < metrics.getHeight()
|
||||
|| metrics.marginTop >= mToolbarHeight / 2
|
||||
|| metrics.pageRectBottom == metrics.viewportRectBottom) {
|
||||
|| (metrics.pageRectBottom == metrics.viewportRectBottom && metrics.pageRectBottom > 2*height)) {
|
||||
mDynamicToolbar.setVisible(true, VisibilityTransition.ANIMATE);
|
||||
} else {
|
||||
mDynamicToolbar.setVisible(false, VisibilityTransition.ANIMATE);
|
||||
|
Loading…
Reference in New Issue
Block a user