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

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

Issue 2222163005: Updating media controls to give fullscreen button highest priority (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comment Created 4 years, 4 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;
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 // Compute the time it'll take until the controls will be invisible - 218 // Compute the time it'll take until the controls will be invisible -
219 // assuming playback has been started prior to invoking this 219 // assuming playback has been started prior to invoking this
220 // function. Allow 500ms slack. 220 // function. Allow 500ms slack.
221 var hideTimeoutMs = controlsMouseMovementTimeoutMs + controlsFadeOutDuration Ms + 500; 221 var hideTimeoutMs = controlsMouseMovementTimeoutMs + controlsFadeOutDuration Ms + 500;
222 222
223 if (!mediaElement.loop && hideTimeoutMs >= 1000 * (mediaElement.duration - m ediaElement.currentTime)) 223 if (!mediaElement.loop && hideTimeoutMs >= 1000 * (mediaElement.duration - m ediaElement.currentTime))
224 throw "The media will end before the controls have been hidden"; 224 throw "The media will end before the controls have been hidden";
225 225
226 setTimeout(func, hideTimeoutMs); 226 setTimeout(func, hideTimeoutMs);
227 } 227 }
228
229 function hasFullscreenButton(element)
230 {
231 var size = mediaControlsButtonDimensions(element, "fullscreen-button");
232 return size[0] > 0 && size[1] > 0;
233 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698