diff options
author | Leon Scroggins <scroggo@google.com> | 2009-09-23 10:31:23 -0400 |
---|---|---|
committer | Leon Scroggins <scroggo@google.com> | 2009-09-23 10:53:42 -0400 |
commit | 37df6a8328fb91afe4272de05c1cce58c4f17163 (patch) | |
tree | e921e03117540dff4e1c608f80967de482ff2741 /core | |
parent | c413d54cd9283778e6d73965a1d1d5f63ba62ec3 (diff) | |
download | frameworks_base-37df6a8328fb91afe4272de05c1cce58c4f17163.zip frameworks_base-37df6a8328fb91afe4272de05c1cce58c4f17163.tar.gz frameworks_base-37df6a8328fb91afe4272de05c1cce58c4f17163.tar.bz2 |
In calcOurContentVisibleRect, account for the visible title bar.
Fixes http://b/issue?id=2137879 and http://b/issue?id=2135469
Change-Id: I6a4b2f90ffa8d37adbe86a2fd19d141c4136213c
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/webkit/WebView.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 51c5e1f..a3e692e 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -2019,9 +2019,14 @@ public class WebView extends AbsoluteLayout private void calcOurContentVisibleRect(Rect r) { calcOurVisibleRect(r); 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.bottom = viewToContentY(r.bottom); + r.bottom = viewToContentY(r.bottom + titleHeight); } static class ViewSizeData { |