am d4c00a17: Merge change 26590 into eclair

Merge commit 'd4c00a173aacf815bb8c5bcffaab21da61ac7d66' into eclair-plus-aosp

* commit 'd4c00a173aacf815bb8c5bcffaab21da61ac7d66':
  In calcOurContentVisibleRect, account for the visible title bar.
This commit is contained in:
Leon Scroggins
2009-09-23 09:04:57 -07:00
committed by Android Git Automerger

View File

@@ -2019,9 +2019,14 @@ public class WebView extends AbsoluteLayout
private void calcOurContentVisibleRect(Rect r) { private void calcOurContentVisibleRect(Rect r) {
calcOurVisibleRect(r); calcOurVisibleRect(r);
r.left = viewToContentX(r.left); r.left = viewToContentX(r.left);
r.top = viewToContentY(r.top); // viewToContentY will remove the total height of the title bar. Add
// the visible height back in to account for the fact that if the title
// bar is partially visible, the part of the visible rect which is
// displaying our content is displaced by that amount.
int titleHeight = getVisibleTitleHeight();
r.top = viewToContentY(r.top + titleHeight);
r.right = viewToContentX(r.right); r.right = viewToContentX(r.right);
r.bottom = viewToContentY(r.bottom); r.bottom = viewToContentY(r.bottom + titleHeight);
} }
static class ViewSizeData { static class ViewSizeData {