summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/browser/ScrollWebView.java7
-rw-r--r--src/com/android/browser/TitleBarBase.java4
-rw-r--r--src/com/android/browser/TitleBarXLarge.java5
3 files changed, 16 insertions, 0 deletions
diff --git a/src/com/android/browser/ScrollWebView.java b/src/com/android/browser/ScrollWebView.java
index 1d7f23a..2bf07e1 100644
--- a/src/com/android/browser/ScrollWebView.java
+++ b/src/com/android/browser/ScrollWebView.java
@@ -33,6 +33,7 @@ public class ScrollWebView extends WebView implements Runnable {
private boolean mIsCancelled;
private boolean mBackgroundRemoved = false;
private boolean mUserInitiated = false;
+ private TitleBarBase mTitleBar;
/**
* @param context
@@ -70,6 +71,11 @@ public class ScrollWebView extends WebView implements Runnable {
super(context);
}
+ @Override
+ protected int getTitleHeight() {
+ return (mTitleBar != null) ? mTitleBar.getEmbeddedHeight() : 0;
+ }
+
// scroll runnable implementation
public void run() {
if (!mIsCancelled && (mScrollListener != null)) {
@@ -84,6 +90,7 @@ public class ScrollWebView extends WebView implements Runnable {
@Override
public void setEmbeddedTitleBar(final View title) {
super.setEmbeddedTitleBar(title);
+ mTitleBar = (TitleBarBase) title;
if (title != null && mScrollListener != null) {
// allow the scroll listener to initialize its state
post(this);
diff --git a/src/com/android/browser/TitleBarBase.java b/src/com/android/browser/TitleBarBase.java
index 2b64aa3..46136db 100644
--- a/src/com/android/browser/TitleBarBase.java
+++ b/src/com/android/browser/TitleBarBase.java
@@ -113,6 +113,10 @@ public class TitleBarBase extends LinearLayout implements UrlInputListener {
}
}
+ public int getEmbeddedHeight() {
+ return getHeight();
+ }
+
// UrlInputListener implementation
/**
diff --git a/src/com/android/browser/TitleBarXLarge.java b/src/com/android/browser/TitleBarXLarge.java
index c732da8..1c44f81 100644
--- a/src/com/android/browser/TitleBarXLarge.java
+++ b/src/com/android/browser/TitleBarXLarge.java
@@ -163,6 +163,11 @@ public class TitleBarXLarge extends TitleBarBase
}
}
+ @Override
+ public int getEmbeddedHeight() {
+ return mContainer.getHeight();
+ }
+
void setUseQuickControls(boolean useQuickControls) {
mUseQuickControls = useQuickControls;
mUrlInput.setUseQuickControls(mUseQuickControls);