Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5e63f49 authored by Mike Reed's avatar Mike Reed
Browse files

remove special-case logic to allow the titlebar to always scroll off the screen. This means that we

now won't force pages to resize due to scrolling.

fixes http://b/issue?id=2512549

Change-Id: Icd91d032ccfc78db6011f293b33543ff2f27f3cf
parent bbf655a1
Loading
Loading
Loading
Loading
+3 −16
Original line number Original line Diff line number Diff line
@@ -1903,15 +1903,8 @@ public class WebView extends AbsoluteLayout
    // Expects y in view coordinates
    // Expects y in view coordinates
    private int pinLocY(int y) {
    private int pinLocY(int y) {
        if (mInOverScrollMode) return y;
        if (mInOverScrollMode) return y;
        int titleH = getTitleHeight();
        return pinLoc(y, getViewHeightWithTitle(),
        // if the titlebar is still visible, just pin against 0
                      computeVerticalScrollRange() + getTitleHeight());
        if (y <= titleH) {
            return Math.max(y, 0);
        }
        // convert to 0-based coordinate (subtract the title height)
        // pin(), and then add the title height back in
        return pinLoc(y - titleH, getViewHeight(),
                      computeVerticalScrollRange()) + titleH;
    }
    }


    /**
    /**
@@ -4203,12 +4196,6 @@ public class WebView extends AbsoluteLayout
    protected void onScrollChanged(int l, int t, int oldl, int oldt) {
    protected void onScrollChanged(int l, int t, int oldl, int oldt) {
        super.onScrollChanged(l, t, oldl, oldt);
        super.onScrollChanged(l, t, oldl, oldt);
        sendOurVisibleRect();
        sendOurVisibleRect();
        // update WebKit if visible title bar height changed. The logic is same
        // as getVisibleTitleHeight.
        int titleHeight = getTitleHeight();
        if (Math.max(titleHeight - t, 0) != Math.max(titleHeight - oldt, 0)) {
            sendViewSizeZoom();
        }
    }
    }


    @Override
    @Override
@@ -5371,7 +5358,7 @@ public class WebView extends AbsoluteLayout


    private int computeMaxScrollY() {
    private int computeMaxScrollY() {
        return Math.max(computeVerticalScrollRange() + getTitleHeight()
        return Math.max(computeVerticalScrollRange() + getTitleHeight()
                - getViewHeightWithTitle(), getTitleHeight());
                - getViewHeightWithTitle(), 0);
    }
    }


    public void flingScroll(int vx, int vy) {
    public void flingScroll(int vx, int vy) {