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

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

Issue 1826573002: Fix black text on black background in <select> dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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: content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java b/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java
index f14b93aaff2eb259d758786021afe78db1de9637..09ace74dc548f597eb08c6c5e49a14d56e65a04d 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java
+++ b/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java
@@ -43,6 +43,7 @@ public class SelectPopupDialog implements SelectPopup {
AlertDialog.Builder b = new AlertDialog.Builder(windowContext)
.setView(listView)
.setCancelable(true);
+ setInverseBackgroundForced(b);
if (multiple) {
b.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@@ -93,6 +94,14 @@ public class SelectPopupDialog implements SelectPopup {
});
}
+ @SuppressWarnings("deprecation")
+ private static void setInverseBackgroundForced(AlertDialog.Builder builder) {
+ // This is needed for pre-Holo themes (e.g. android:Theme.Black), which can be used in
+ // WebView. See http://crbug.com/596626. This can be removed if/when this class starts
+ // using android.support.v7.app.AlertDialog.
+ builder.setInverseBackgroundForced(true);
+ }
+
private int getSelectDialogLayout(boolean isMultiChoice) {
int resourceId;
TypedArray styledAttributes = mListBoxPopup.getContext().obtainStyledAttributes(
« 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