From b7f17d474217d4a5869f5fe41a244254022edd01 Mon Sep 17 00:00:00 2001 From: "Shimeng (Simon) Wang" Date: Mon, 8 Feb 2010 15:17:21 -0800 Subject: [PATCH] Take into account the visible title height when scrolling. Bug: 2425057 modified: core/java/android/webkit/WebView.java --- core/java/android/webkit/WebView.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 52c0e013499f9..2a7dc9c25f4e1 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -6172,6 +6172,9 @@ public class WebView extends AbsoluteLayout // mContentHeight may not be updated yet y = Math.max(0, (Math.min(maxHeight, y + viewHeight) - viewHeight)); + // We need to take into account the visible title height + // when scrolling since y is an absolute view position. + y = Math.max(0, y - getVisibleTitleHeight()); scrollTo(x, y); } break;