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

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

Issue 2701433003: Hide overlay play button if it can't be shown without clipping (Closed)
Patch Set: Add comments for dependent constants Created 3 years, 9 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 function hasFullscreenButton(element) 205 function hasFullscreenButton(element)
206 { 206 {
207 var size = mediaControlsButtonDimensions(element, "fullscreen-button"); 207 var size = mediaControlsButtonDimensions(element, "fullscreen-button");
208 return size[0] > 0 && size[1] > 0; 208 return size[0] > 0 && size[1] > 0;
209 } 209 }
210 210
211 function isControlsPanelVisible(element) 211 function isControlsPanelVisible(element)
212 { 212 {
213 return getComputedStyle(mediaControlsButton(element, "panel")).opacity == "1 "; 213 return getComputedStyle(mediaControlsButton(element, "panel")).opacity == "1 ";
214 } 214 }
215
216 function isVisible(button) {
217 var computedStyle = getComputedStyle(button);
218 return computedStyle.display !== "none" &&
219 computedStyle.visibility === "visible";
220 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698