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

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

Issue 662243003: Use ::-internal-media-controls* instead of ::-webkit-media-controls* (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: introduce PseudoInternalCustomElement Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/media/controls-css-overload-expected.txt ('k') | Source/core/css/CSSSelector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 13 matching lines...) Expand all
24 if (childElement) 24 if (childElement)
25 return childElement; 25 return childElement;
26 } 26 }
27 } 27 }
28 28
29 return null; 29 return null;
30 } 30 }
31 31
32 function mediaControlsButton(element, id) 32 function mediaControlsButton(element, id)
33 { 33 {
34 var controlID = "-webkit-media-controls-" + id; 34 var controlID = "-internal-media-controls-" + id;
35 var button = mediaControlsElement(internals.shadowRoot(element).firstChild, controlID); 35 var button = mediaControlsElement(internals.shadowRoot(element).firstChild, controlID);
36 if (!button) 36 if (!button)
37 throw "Failed to find media control element ID '" + id + "'"; 37 throw "Failed to find media control element ID '" + id + "'";
38 return button; 38 return button;
39 } 39 }
40 40
41 function mediaControlsButtonCoordinates(element, id) 41 function mediaControlsButtonCoordinates(element, id)
42 { 42 {
43 var button = mediaControlsButton(element, id); 43 var button = mediaControlsButton(element, id);
44 var buttonBoundingRect = button.getBoundingClientRect(); 44 var buttonBoundingRect = button.getBoundingClientRect();
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // Compute the time it'll take until the controls will be invisible - 126 // Compute the time it'll take until the controls will be invisible -
127 // assuming playback has been started prior to invoking this 127 // assuming playback has been started prior to invoking this
128 // function. Allow 500ms slack. 128 // function. Allow 500ms slack.
129 var hideTimeoutMs = controlsMouseMovementTimeoutMs + controlsFadeOutDuration Ms + 500; 129 var hideTimeoutMs = controlsMouseMovementTimeoutMs + controlsFadeOutDuration Ms + 500;
130 130
131 if (!mediaElement.loop && hideTimeoutMs >= 1000 * (mediaElement.duration - m ediaElement.currentTime)) 131 if (!mediaElement.loop && hideTimeoutMs >= 1000 * (mediaElement.duration - m ediaElement.currentTime))
132 throw "The media will end before the controls have been hidden"; 132 throw "The media will end before the controls have been hidden";
133 133
134 setTimeout(func, hideTimeoutMs); 134 setTimeout(func, hideTimeoutMs);
135 } 135 }
OLDNEW
« no previous file with comments | « LayoutTests/media/controls-css-overload-expected.txt ('k') | Source/core/css/CSSSelector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698