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

Side by Side Diff: third_party/WebKit/LayoutTests/virtual/android/media/controls/overlay-play-button.js

Issue 2701433003: Hide overlay play button if it can't be shown without clipping (Closed)
Patch Set: Create/Destroy ResizeObserver onInsert/onRemove. Add (currently broken) layout test for moving vide… 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
(Empty)
1 // Defined in core/html/shadow/MediaControls.cpp.
2 var MIN_VIDEO_WIDTH = 48;
3 var MIN_VIDEO_HEIGHT = 164;
4
5 function assertOverlayPlayButtonVisible(videoElement) {
6 assert_true(isVisible(overlayPlayButton(videoElement)),
7 "overlay play button should be visible");
8 }
9
10 function assertOverlayPlayButtonNotVisible(videoElement) {
11 assert_false(isVisible(overlayPlayButton(videoElement)),
12 "overlay play button should not be visible");
13 }
14
15 function overlayPlayButton(videoElement) {
16 var controlID = '-webkit-media-controls-overlay-play-button';
17 var button = mediaControlsElement(
18 window.internals.shadowRoot(videoElement).firstChild,
19 controlID);
20 if (!button)
21 throw 'Failed to find overlay play button';
22 return button;
23 }
24
25 function isVisible(button) {
26 var computedStyle = getComputedStyle(button);
27 return computedStyle.display !== "none" &&
28 computedStyle.display !== "hidden" &&
29 computedStyle.visibility === "visible";
30 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698