Commit 1a894a05 authored by Sam Sebree's avatar Sam Sebree Committed by Commit Bot

[Controls Refresh] Autofill filled/previewed state is not visible with forced-colors turned on

This change addresses the bug in which autofill text does not display
correctly in high contrast mode with forced-colors turned on.

Bug: 1046141
Change-Id: I06e1e1c9165e6d430c4df2167e69adf142665616
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2024032Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Reviewed-by: default avatarMason Freed <masonfreed@chromium.org>
Commit-Queue: Sam Sebree <sasebree@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#738711}
parent c9d13650
...@@ -207,4 +207,19 @@ ...@@ -207,4 +207,19 @@
meter::-webkit-meter-suboptimum-value { meter::-webkit-meter-suboptimum-value {
background: Highlight; background: Highlight;
} }
}
input:-internal-autofill-previewed,
textarea:-internal-autofill-previewed,
select:-internal-autofill-previewed {
color: WindowText !important;
background-color: Window !important;
}
input:-internal-autofill-selected,
textarea:-internal-autofill-selected,
select:-internal-autofill-selected {
color: WindowText !important;
background-color: Window !important;
}
}
\ No newline at end of file
<!DOCTYPE html>
<body>
<input id="text_input" value="Test"></input>
<script>
var input = document.getElementById('text_input');
if (window.internals)
internals.setAutofilled(input, true);
</script>
<textarea id="text_area_input" rows="4" cols="50">Test</textarea>
<script>
var textArea = document.getElementById('text_area_input');
if (window.internals)
internals.setAutofilled(textArea, true);
</script>
<select id="select_input">
<option value="test">Test</option>
</select>
<script>
var select = document.getElementById('select_input');
if (window.internals)
internals.setAutofilled(select, true);
</script>
</body>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment