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

Side by Side Diff: third_party/WebKit/LayoutTests/media/overflow-menu.js

Issue 2301823002: Reordering media controls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@media-controls
Patch Set: addressed comments Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // We expect the items in the overflow to appear in the following ordering. 1 // We expect the items in the overflow to appear in the following ordering.
2 var overflowButtonsCSS = [ 2 var overflowButtonsCSS = [
3 "-webkit-media-controls-play-button",
4 "-webkit-media-controls-fullscreen-button",
5 "-internal-download-button",
3 "-webkit-media-controls-mute-button", 6 "-webkit-media-controls-mute-button",
4 "-internal-media-controls-cast-button", 7 "-internal-media-controls-cast-button",
5 "-webkit-media-controls-toggle-closed-captions-button", 8 "-webkit-media-controls-toggle-closed-captions-button"];
6 "-webkit-media-controls-fullscreen-button",
7 "-webkit-media-controls-play-button",
8 "-internal-download-button"];
9 // PseudoID for the overflow button 9 // PseudoID for the overflow button
10 var menuID = "-internal-overflow-menu-button"; 10 var menuID = "-internal-overflow-menu-button";
11 // PseudoID for the overflow list 11 // PseudoID for the overflow list
12 var listID = "-internal-media-controls-overflow-menu-list"; 12 var listID = "-internal-media-controls-overflow-menu-list";
13 13
14 // Returns the overflow menu button within the given media element 14 // Returns the overflow menu button within the given media element
15 function getOverflowMenuButton(media) { 15 function getOverflowMenuButton(media) {
16 return mediaControlsElement(internals.shadowRoot(media).firstChild, menuID); 16 return mediaControlsElement(internals.shadowRoot(media).firstChild, menuID);
17 } 17 }
18 18
19 // Returns the overflow menu list of overflow controls 19 // Returns the overflow menu list of overflow controls
20 function getOverflowList(media) { 20 function getOverflowList(media) {
21 return mediaControlsElement(internals.shadowRoot(media).firstChild, listID); 21 return mediaControlsElement(internals.shadowRoot(media).firstChild, listID);
22 } 22 }
23 23
24 // Location of media control element in the overflow button 24 // Location of media control element in the overflow button
25 var OverflowMenuButtons = { 25 var OverflowMenuButtons = {
26 MUTE: 0, 26 PLAY: 0,
27 CAST: 1, 27 FULLSCREEN: 1,
28 CLOSED_CAPTIONS: 2, 28 DOWNLOAD: 2,
29 FULLSCREEN: 3, 29 MUTE: 3,
30 PLAY: 4, 30 CAST: 4,
31 DOWNLOAD: 5, 31 CLOSED_CAPTIONS: 5,
32 }; 32 };
33 33
34 // Default text within the overflow menu 34 // Default text within the overflow menu
35 var overflowMenuText = ["Mute", "Cast", "Captions", "Fullscreen", "Play", "Downl oad"]; 35 var overflowMenuText = ["Play", "Fullscreen", "Download", "Mute", "Cast", "Capti ons"];
36 36
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698