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

Commit 75a03f9a authored by Michael Kolb's avatar Michael Kolb
Browse files

use getTitleHeight for measuring

    Bug: 3473996
    change getTitleHeight to be protected so that subclass
    can override it
    use getTitleHeight for rendering
    use getHeight for clipping

Change-Id: I6e9a85d88eba176886e53b260d02082d26b410d8
parent a8bdc2a4
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1342,8 +1342,9 @@ public class WebView extends AbsoluteLayout
    /*
     * returns the height of the titlebarview (if any). Does not care about
     * scrolling
     * @hide
     */
    int getTitleHeight() {
    protected int getTitleHeight() {
        return mTitleBar != null ? mTitleBar.getHeight() : 0;
    }

@@ -3710,7 +3711,7 @@ public class WebView extends AbsoluteLayout
            } else if (mTitleGravity == Gravity.TOP) {
                newTop = mScrollY;
            }
            mTitleBar.setBottom(newTop + getTitleHeight());
            mTitleBar.setBottom(newTop + mTitleBar.getHeight());
            mTitleBar.setTop(newTop);
        }
        return super.drawChild(canvas, child, drawingTime);
@@ -3790,7 +3791,7 @@ public class WebView extends AbsoluteLayout
            drawOverScrollBackground(canvas);
        }
        if (mTitleBar != null) {
            canvas.translate(0, (int) mTitleBar.getHeight());
            canvas.translate(0, getTitleHeight());
        }
        drawContent(canvas);
        canvas.restoreToCount(saveCount);