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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 701233002: [Android] Support unfocusable container views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: public -> private Created 6 years, 1 month 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: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
index 12e658bee619c6abd9f161af5d9551f39a7a8ac4..9dd9246c11485cd7c969f81516fdcf2c6082231f 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
@@ -2364,7 +2364,10 @@ public class ContentViewCore
* @see View#hasFocus()
*/
@CalledByNative
- public boolean hasFocus() {
+ private boolean hasFocus() {
+ // If the container view is not focusable, we consider it always focused from
+ // Chromium's point of view.
+ if (!mContainerView.isFocusable()) return true;
return mContainerView.hasFocus();
}
« 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