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

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

Issue 2684973004: Remove unnecessary refreshCastButtonVisibility call (Closed)
Patch Set: remove extra blank lines Created 3 years, 10 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 var captionsButtonElement; 1 var captionsButtonElement;
2 var captionsButtonCoordinates; 2 var captionsButtonCoordinates;
3 3
4 // As specified in mediaControls.css, this is how long it takes to fade out cont rols 4 // As specified in mediaControls.css, this is how long it takes to fade out cont rols
5 const controlsFadeOutDurationMs = 300; 5 const controlsFadeOutDurationMs = 300;
6 6
7 // The timeout for the hide-after-no-mouse-movement behavior. Defined (and 7 // The timeout for the hide-after-no-mouse-movement behavior. Defined (and
8 // should mirror) the value 'timeWithoutMouseMovementBeforeHidingMediaControls' 8 // should mirror) the value 'timeWithoutMouseMovementBeforeHidingMediaControls'
9 // in MediaControls.cpp. 9 // in MediaControls.cpp.
10 const controlsMouseMovementTimeoutMs = 3000; 10 const controlsMouseMovementTimeoutMs = 3000;
11 11
12 function castButton(videoElement) {
13 var controlID = '-internal-media-controls-cast-button';
14 var button = mediaControlsElement(window.internals.shadowRoot(videoElement). firstChild, controlID);
15 if (!button)
16 throw 'Failed to find cast button';
17 return button;
18 }
19
12 function overlayCastButton(videoElement) 20 function overlayCastButton(videoElement)
13 { 21 {
14 var controlID = '-internal-media-controls-overlay-cast-button'; 22 var controlID = '-internal-media-controls-overlay-cast-button';
15 var button = mediaControlsElement(window.internals.shadowRoot(videoElement). firstChild, controlID); 23 var button = mediaControlsElement(window.internals.shadowRoot(videoElement). firstChild, controlID);
16 if (!button) 24 if (!button)
17 throw 'Failed to find cast button'; 25 throw 'Failed to find cast button';
18 return button; 26 return button;
19 } 27 }
20 28
21 function mediaControlsElement(first, id) 29 function mediaControlsElement(first, id)
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 function hasFullscreenButton(element) 205 function hasFullscreenButton(element)
198 { 206 {
199 var size = mediaControlsButtonDimensions(element, "fullscreen-button"); 207 var size = mediaControlsButtonDimensions(element, "fullscreen-button");
200 return size[0] > 0 && size[1] > 0; 208 return size[0] > 0 && size[1] > 0;
201 } 209 }
202 210
203 function isControlsPanelVisible(element) 211 function isControlsPanelVisible(element)
204 { 212 {
205 return getComputedStyle(mediaControlsButton(element, "panel")).opacity == "1 "; 213 return getComputedStyle(mediaControlsButton(element, "panel")).opacity == "1 ";
206 } 214 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698