New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 596626 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

<Select><Option> tags give black background

Reported by molyneux...@gmail.com, Mar 21 2016

Issue description

Device name: Sony Xperia Z3
Android version:5.1.1
WebView version (from system settings -> Apps -> Android System WebView): 50.0.2661
Application: Unreleased
Application version:

URLs (if applicable): m.oneviewcalendar.com/test



Steps to reproduce:
(1) goto: m.oneviewcalendar.com/test
(2) drag the plus button
(3) try changing reminders

Expected result:
In the browser I get normal result, with a list of choices, black text on white background.


Actual result:
But with the app that uses WebView The list is Black with black text, so the text can't be read.
I rolled back to factory version of WebView and all works fine again. 
So my guess is that you have changed something in how the <Select><Option> tags are rendered in the latest version of WebView.

 

Comment 1 by boliu@chromium.org, Mar 21 2016

Labels: -Pri-2 ReleaseBlock-Stable M-50 Pri-1
Owner: yus...@chromium.org
Status: Assigned (was: Unconfirmed)
Yusuf, this looks like a themes issue, but only in webview. Know anything changed in the select pop up here in m50?

Comment 2 by yus...@chromium.org, Mar 21 2016

Cc: tedc...@chromium.org
Not that I know of ... Theme related changes for tab reparenting all landed before 49. So nothing specific to 50.

Comment 3 by boliu@chromium.org, Mar 21 2016

Labels: Needs-Bisect
m49 is fine. Can QA do a bisect?
Hi,  thanks for looking at this.  Just to be extra clear : i haven't tested
m49 only m50 and my factory version which is  43 I think.

Also the background color isn't totaly black, but slightly transparent.

Hope that helps somewhat.

Regards Peter Molyneux

Comment 5 by boliu@chromium.org, Mar 22 2016

Cc: n...@chromium.org
Bisected to between 2630 and 2631. Full changelog here:
https://chromium.googlesource.com/chromium/src/+log/50.0.2630.0..50.0.2631.0?pretty=fuller&n=10000

Two changes that touches pop up things, both from newt:
https://codereview.chromium.org/1622773002
https://codereview.chromium.org/1616043004

Comment 6 by n...@chromium.org, Mar 22 2016

molyneux: Could you attach a screenshot of the problem?

Does the dialog itself have a black background (e.g. behind each item in the list: "0 minutes", "1 minutes", etc)?

Comment 7 by boliu@chromium.org, Mar 22 2016

The date and time pickers look fine fwiw (looks like super old UI from jellybean time or something)

It's the <select> pop up that doesn't look right. Screenshots attached
good.png
182 KB View Download
bad.png
173 KB View Download

Comment 8 by n...@chromium.org, Mar 22 2016

Looks like an issue with the theme, which might be related to using the wrong context (e.g. an application context instead of activity context).

Here's a test page with a <select> element and various other input types (date, time, etc): http://jsfiddle.net/qg4h2bhw/4/embedded/result/

In Chrome, and in some webview apps (e.g. android_webview_apk), all the various input dialogs are nicely themed (with a dark gray background, white text, and green buttons). In another webview app, where I was was able to reproduce the bug (as in #7), all the dialogs were themed using ancient Holo-looking widgets and the black-text-on-black-background bug was present for the <select> element.

Comment 9 by n...@chromium.org, Mar 22 2016

Screenshots comparing the "good" theming with the "bad" theming.
webview_nicely_themed.png
164 KB View Download
webview_badly_themed.png
185 KB View Download

Comment 10 by n...@chromium.org, Mar 22 2016

More investigation: this bug happens when the WebView is using one of the pre-Holo themes (ugh...), such as android:Theme.Light or android:Theme.Black.

Comment 11 by n...@chromium.org, Mar 22 2016

Cc: -n...@chromium.org yus...@chromium.org
Owner: n...@chromium.org

Comment 12 by n...@chromium.org, Mar 22 2016

Fix uploaded: https://codereview.chromium.org/1826573002

Screenshot with the fix attached (compare to "bad.png" in #7).
fixed.png
142 KB View Download
Project Member

Comment 13 by bugdroid1@chromium.org, Mar 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/58873c3c518c096f1717ed5683963ae989e83ef8

commit 58873c3c518c096f1717ed5683963ae989e83ef8
Author: newt <newt@chromium.org>
Date: Tue Mar 22 22:26:37 2016

Fix black text on black background in <select> dialog.

This happened when a <select> HTML element was used in WebView, and the
activity containing the WebView had a pre-Holo theme (e.g.
android:Theme.Black).

BUG= 596626 

Review URL: https://codereview.chromium.org/1826573002

Cr-Commit-Position: refs/heads/master@{#382711}

[modify] https://crrev.com/58873c3c518c096f1717ed5683963ae989e83ef8/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java

Comment 14 by n...@chromium.org, Mar 22 2016

Labels: Merge-Request-50

Comment 15 by tin...@google.com, Mar 22 2016

Labels: -Merge-Request-50 Merge-Approved-50 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M50 (branch: 2661)
Project Member

Comment 16 by bugdroid1@chromium.org, Mar 22 2016

Labels: -merge-approved-50 merge-merged-2661
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/91765a3bc8ea02e419ea44897ceae4cc942d1875

commit 91765a3bc8ea02e419ea44897ceae4cc942d1875
Author: Newton Allen <newt@google.com>
Date: Tue Mar 22 23:50:27 2016

Fix black text on black background in <select> dialog.

This happened when a <select> HTML element was used in WebView, and the
activity containing the WebView had a pre-Holo theme (e.g.
android:Theme.Black).

BUG= 596626 

Review URL: https://codereview.chromium.org/1826573002

Cr-Commit-Position: refs/heads/master@{#382711}
(cherry picked from commit 58873c3c518c096f1717ed5683963ae989e83ef8)

Review URL: https://codereview.chromium.org/1824233002 .

Cr-Commit-Position: refs/branch-heads/2661@{#351}
Cr-Branched-From: ef6f6ae5e4c96622286b563658d5cd62a6cf1197-refs/heads/master@{#378081}

[modify] https://crrev.com/91765a3bc8ea02e419ea44897ceae4cc942d1875/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java

Comment 17 by boliu@chromium.org, Mar 22 2016

molyneux: whatever app you are testing this on is using a super old theme, probably want to look into that

Comment 18 by n...@chromium.org, Mar 23 2016

Status: Fixed (was: Assigned)
Thanks,  you've done a great job. I'll change the theme,  just standard
visual Studio cordova project.  Had no idea what theme it was using.

Comment 20 by n...@chromium.org, Mar 23 2016

Thanks for reporting with clear repro steps :)
Verified issue mentioned in comment #7 good.png is observed with the fixes on the latest web view build M50 on Sony Xperia Z3(5.0.2) and other few devices.
Btw we are still observing the webview_badly_themed.png with the test page mentioned in comment #8 : http://jsfiddle.net/qg4h2bhw/4/embedded/result/

Comment 22 by n...@chromium.org, Mar 23 2016

webview_badly_themed.png is OK. It's not pretty, but it's not broken either -- it's just an old theme.

As long as you're no longer seeing bad.png from #7 (black text on a black background), then this bug is fixed.

Thanks for verifying!
Tested.
The new version works fine.

Sign in to add a comment