Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1273)

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 23623020: Fix problem with input fields not gaining focus (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: boliu nit Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/java/src/org/chromium/android_webview/AwContents.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index 18ba0cca75fc4727e16cdad3210af97f00d3ef2c..5be2743637c2040ca4659e566221a3c0949e312b 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -180,7 +180,6 @@ public class AwContents {
private Callable<Picture> mPictureListenerContentProvider;
private boolean mContainerViewFocused;
- private boolean mWindowFocused;
private AwAutofillManagerDelegate mAwAutofillManagerDelegate;
@@ -593,10 +592,10 @@ public class AwContents {
final boolean wasViewVisible = mIsViewVisible;
final boolean wasWindowVisible = mIsWindowVisible;
final boolean wasPaused = mIsPaused;
- final boolean wasFocused = mWindowFocused;
+ final boolean wasFocused = mContainerViewFocused;
// Properly clean up existing mContentViewCore and mNativeAwContents.
- if (wasFocused) onWindowFocusChanged(false);
+ if (wasFocused) onFocusChanged(false, 0, null);
if (wasViewVisible) setViewVisibilityInternal(false);
if (wasWindowVisible) setWindowVisibilityInternal(false);
if (!wasPaused) onPause();
@@ -612,7 +611,7 @@ public class AwContents {
onSizeChanged(mContainerView.getWidth(), mContainerView.getHeight(), 0, 0);
if (wasWindowVisible) setWindowVisibilityInternal(true);
if (wasViewVisible) setViewVisibilityInternal(true);
- if (wasFocused) onWindowFocusChanged(true);
+ if (wasFocused) onFocusChanged(true, 0, null);
}
/**
@@ -1487,8 +1486,7 @@ public class AwContents {
* @see android.view.View#onWindowFocusChanged()
*/
public void onWindowFocusChanged(boolean hasWindowFocus) {
- mWindowFocused = hasWindowFocus;
- mContentViewCore.onFocusChanged(mContainerViewFocused && mWindowFocused);
+ // If adding any code here, remember to adding correct handling in receivePopupContents().
}
/**
@@ -1496,7 +1494,7 @@ public class AwContents {
*/
public void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
mContainerViewFocused = focused;
- mContentViewCore.onFocusChanged(mContainerViewFocused && mWindowFocused);
+ mContentViewCore.onFocusChanged(focused);
}
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698