Commit 5c09926b authored by Ionel Popescu's avatar Ionel Popescu Committed by Chromium LUCI CQ

Add missing dark mode background color for video/audio popup menu.

This CL adds the missing dark mode background color for video/audio
popup menus.

The popup menus are: internal-media-controls-overflow-menu-list
and internal-media-controls-text-track-list. The white flash was caused
by their white background being visible until it was covered by the
items that have the correct dark mode background color.

Bug: 1148578
Change-Id: Ifa148ea039ecb3a3dca448adb9f3fda62225dd51
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2565072Reviewed-by: default avatarMason Freed <masonfreed@chromium.org>
Reviewed-by: default avatarTommy Steimel <steimel@chromium.org>
Reviewed-by: default avatarBecca Hughes <beccahughes@chromium.org>
Reviewed-by: default avatarYu Han <yuzhehan@chromium.org>
Commit-Queue: Ionel Popescu <iopopesc@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#833235}
parent f3d9aba7
......@@ -868,7 +868,7 @@ video::-internal-media-controls-overflow-menu-list {
overflow-y: auto;
white-space: nowrap;
font-size: 12px;
background: #FFFFFF;
background: -internal-light-dark(#ffffff, #3B3B3B);
box-shadow: 0 1px 9px 0 rgba(0,0,0,0.40);
border-radius: 2px;
transition: transform .3s ease-out, opacity .2s linear;
......
<!DOCTYPE html>
<title>Ensure overflow menu has the correct background color.</title>
<meta name="color-scheme" content="dark">
<script src='../../../resources/testharness.js'></script>
<script src='../../../resources/testharnessreport.js'></script>
<script src='../../../media/media-controls.js'></script>
<video controls></video>
<script>
async_test(t => {
const video = document.querySelector('video');
video.src = '../../../media/content/test.ogv';
const track = video.addTextTrack('captions');
video.onloadeddata = t.step_func(() => {
const menu = overflowMenu(video);
const button = overflowButton(video);
assert_not_equals(getComputedStyle(button).display, 'none');
assert_equals(getComputedStyle(menu).display, 'none');
// Clicking on the button should show the menu.
singleTapOnControl(button, t.step_func_done(() => {
assert_not_equals(getComputedStyle(menu).display, 'none');
assert_equals(getComputedStyle(menu).backgroundColor, 'rgb(59, 59, 59)');
}));
});
});
</script>
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