summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNewton Allen <newt@chromium.org>2015-01-20 10:58:12 -0800
committerNewton Allen <newt@chromium.org>2015-01-20 18:59:10 +0000
commit9192cbf71c4b10390f616089f11b1fa2e0708af3 (patch)
tree202f9fc0c796b698e1ecbcfd8bcd79aa2930ce13
parent9d7bbe0b02d6ce0c4ea3a2c149b5d53b292eeed2 (diff)
downloadchromium_src-9192cbf71c4b10390f616089f11b1fa2e0708af3.zip
chromium_src-9192cbf71c4b10390f616089f11b1fa2e0708af3.tar.gz
chromium_src-9192cbf71c4b10390f616089f11b1fa2e0708af3.tar.bz2
Fix bug where UrlBar is focused when entering Reader Mode.
This fixes a bug where entering Reader Mode would cause the URL bar to gain focus. The problem was that, starting in https://crrev.com/821393004, Tab.destroyContentViewCore() was removing the ContentView from the view hierarchy. This caused focus to go immediately to the URL bar. BUG=447203 Review URL: https://codereview.chromium.org/833403004 Cr-Commit-Position: refs/heads/master@{#311620} (cherry picked from commit 7c0fea86f434f4cd1706ff6cc3cbfee709083d5b) Review URL: https://codereview.chromium.org/862733002 Cr-Commit-Position: refs/branch-heads/2272@{#60} Cr-Branched-From: 827a380cfdb31aa54c8d56e63ce2c3fd8c3ba4d4-refs/heads/master@{#310958}
-rw-r--r--chrome/android/java/src/org/chromium/chrome/browser/Tab.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/Tab.java b/chrome/android/java/src/org/chromium/chrome/browser/Tab.java
index dfd0ffc..4de565b 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/Tab.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/Tab.java
@@ -1769,7 +1769,9 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
destroyContentViewCoreInternal(mContentViewCore);
- mContentViewParent.removeAllViews();
+ if (mInfoBarContainer != null && mInfoBarContainer.getParent() != null) {
+ mInfoBarContainer.removeFromParentView();
+ }
mContentViewParent = null;
mContentViewCore.destroy();
mContentViewCore = null;