Diff
Modified: trunk/LayoutTests/ChangeLog (202681 => 202682)
--- trunk/LayoutTests/ChangeLog 2016-06-30 16:14:44 UTC (rev 202681)
+++ trunk/LayoutTests/ChangeLog 2016-06-30 16:19:32 UTC (rev 202682)
@@ -1,3 +1,17 @@
+2016-06-30 Commit Queue <commit-qu...@webkit.org>
+
+ Unreviewed, rolling out r202679.
+ https://bugs.webkit.org/show_bug.cgi?id=159302
+
+ Still causing timeouts on media/controls-drag-timebar.html
+ (Requested by ap on #webkit).
+
+ Reverted changeset:
+
+ "[iOS] Media controls are too cramped with small video"
+ https://bugs.webkit.org/show_bug.cgi?id=158815
+ http://trac.webkit.org/changeset/202679
+
2016-06-30 Joseph Pecoraro <pecor...@apple.com> and Yusuke Suzuki <utatane....@gmail.com>
[JSC] Implement isFinite / isNaN in JS and make DFG ToNumber accept non number values
Deleted: trunk/LayoutTests/media/video-controls-drop-and-restore-timeline-expected.txt (202681 => 202682)
--- trunk/LayoutTests/media/video-controls-drop-and-restore-timeline-expected.txt 2016-06-30 16:14:44 UTC (rev 202681)
+++ trunk/LayoutTests/media/video-controls-drop-and-restore-timeline-expected.txt 2016-06-30 16:19:32 UTC (rev 202682)
@@ -1,17 +0,0 @@
-
-Tests that the scrubber is dropped when a video is too narrow and restored when made wider.
-
-EXPECTED (video.controls != 'null') OK
-EVENT(canplaythrough)
-EXPECTED (shadowRoot = internals.shadowRoot(video) != 'null') OK
-EXPECTED (timelineContainer = mediaControlsElement(shadowRoot.firstChild, "-webkit-media-controls-timeline-container") != 'null') OK
-Initital test at width = 200px
-EXPECTED (video.offsetWidth == '200') OK
-EXPECTED (timelineChildrenAreDropped() == 'true') OK
-EXPECTED (timelineChildrenAreNotDisplayed() == 'true') OK
-Second test at width = 500px
-EXPECTED (video.offsetWidth == '500') OK
-EXPECTED (timelineChildrenAreDropped() == 'false') OK
-EXPECTED (timelineChildrenAreNotDisplayed() == 'false') OK
-END OF TEST
-
Deleted: trunk/LayoutTests/media/video-controls-drop-and-restore-timeline.html (202681 => 202682)
--- trunk/LayoutTests/media/video-controls-drop-and-restore-timeline.html 2016-06-30 16:14:44 UTC (rev 202681)
+++ trunk/LayoutTests/media/video-controls-drop-and-restore-timeline.html 2016-06-30 16:19:32 UTC (rev 202682)
@@ -1,62 +0,0 @@
-<html>
-<head>
- <title>Tests that the scrubber is dropped when a video is too narrow and restored when made wider</title>
- <script src=""
- <script src=""
-</head>
-<body>
- <video controls style="width: 200px"></video>
- <p>Tests that the scrubber is dropped when a video is too narrow and restored when made wider.</p>
- <script src=""
- <script>
-
- var timelineContainer;
-
- function timelineChildrenAreDropped() {
- return Array.prototype.every.call(timelineContainer.children, function(child) {
- return child.classList.contains("dropped");
- });
- }
-
- function timelineChildrenAreNotDisplayed() {
- return Array.prototype.every.call(timelineContainer.children, function(child) {
- return child.ownerDocument.defaultView.getComputedStyle(child).display === "none";
- });
- }
-
- testExpected("video.controls", null, "!=");
-
- waitForEvent("canplaythrough", function() {
- if (!window.internals) {
- logResult(false, "window.internals == undefined");
- endTest();
- return;
- }
-
- testExpected("shadowRoot = internals.shadowRoot(video)", null, "!=");
- testExpected(`timelineContainer = mediaControlsElement(shadowRoot.firstChild, "-webkit-media-controls-timeline-container")`, null, "!=");
-
- consoleWrite("Initital test at width = 200px");
- testExpected("video.offsetWidth", 200, "==");
- testExpected("timelineChildrenAreDropped()", true, "==");
- testExpected("timelineChildrenAreNotDisplayed()", true, "==");
-
- consoleWrite("Second test at width = 500px");
- video.style.width = "500px";
- testExpected("video.offsetWidth", 500, "==");
-
- // Using a timeout here since the resize event that will be dispatched
- // to the video controls to allow them to update their size needs to have
- // time to propagate asynchronously.
- setTimeout(function() {
- testExpected("timelineChildrenAreDropped()", false, "==");
- testExpected("timelineChildrenAreNotDisplayed()", false, "==");
- endTest();
- });
- });
-
- video.src = "" "content/test");
-
- </script>
-</body>
-</html>
Modified: trunk/LayoutTests/platform/mac/http/tests/media/hls/video-controls-live-stream-expected.txt (202681 => 202682)
--- trunk/LayoutTests/platform/mac/http/tests/media/hls/video-controls-live-stream-expected.txt 2016-06-30 16:14:44 UTC (rev 202681)
+++ trunk/LayoutTests/platform/mac/http/tests/media/hls/video-controls-live-stream-expected.txt 2016-06-30 16:19:32 UTC (rev 202682)
@@ -4,8 +4,6 @@
EXPECTED (video.duration == 'Infinity') OK
-webkit-media-text-track-container: classes: [hidden]
-webkit-media-show-controls: classes: []
--webkit-media-controls-current-time-display: classes: [clone six-digit-time]
--webkit-media-controls-time-remaining-display: classes: [clone six-digit-time]
-webkit-media-controls-wireless-playback-status: classes: [hidden]
-webkit-media-controls-wireless-playback-text: classes: []
-webkit-media-controls-wireless-playback-text-top: classes: []
Modified: trunk/LayoutTests/platform/mac-yosemite/http/tests/media/hls/video-controls-live-stream-expected.txt (202681 => 202682)
--- trunk/LayoutTests/platform/mac-yosemite/http/tests/media/hls/video-controls-live-stream-expected.txt 2016-06-30 16:14:44 UTC (rev 202681)
+++ trunk/LayoutTests/platform/mac-yosemite/http/tests/media/hls/video-controls-live-stream-expected.txt 2016-06-30 16:19:32 UTC (rev 202682)
@@ -4,8 +4,6 @@
EXPECTED (video.duration == 'Infinity') OK
-webkit-media-text-track-container: classes: [hidden]
-webkit-media-show-controls: classes: []
--webkit-media-controls-current-time-display: classes: [clone six-digit-time]
--webkit-media-controls-time-remaining-display: classes: [clone six-digit-time]
-webkit-media-controls-wireless-playback-status: classes: [hidden]
-webkit-media-controls-wireless-playback-text: classes: []
-webkit-media-controls-wireless-playback-text-top: classes: []
Modified: trunk/Source/WebCore/ChangeLog (202681 => 202682)
--- trunk/Source/WebCore/ChangeLog 2016-06-30 16:14:44 UTC (rev 202681)
+++ trunk/Source/WebCore/ChangeLog 2016-06-30 16:19:32 UTC (rev 202682)
@@ -1,3 +1,17 @@
+2016-06-30 Commit Queue <commit-qu...@webkit.org>
+
+ Unreviewed, rolling out r202679.
+ https://bugs.webkit.org/show_bug.cgi?id=159302
+
+ Still causing timeouts on media/controls-drag-timebar.html
+ (Requested by ap on #webkit).
+
+ Reverted changeset:
+
+ "[iOS] Media controls are too cramped with small video"
+ https://bugs.webkit.org/show_bug.cgi?id=158815
+ http://trac.webkit.org/changeset/202679
+
2016-06-30 Antoine Quint <grao...@apple.com>
[iOS] Media controls are too cramped with small video
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css (202681 => 202682)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css 2016-06-30 16:14:44 UTC (rev 202681)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css 2016-06-30 16:19:32 UTC (rev 202682)
@@ -1142,12 +1142,3 @@
margin-right: 24px;
margin-left: 0px;
}
-
-/* Time display clones that we use in updateLayoutForDisplayedWidth(). */
-::-webkit-media-controls-current-time-display.clone,
-::-webkit-media-controls-time-remaining-display.clone {
- position: absolute;
- display: inline;
- top: 100%;
- mix-blend-mode: normal;
-}
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js (202681 => 202682)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js 2016-06-30 16:14:44 UTC (rev 202681)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js 2016-06-30 16:19:32 UTC (rev 202682)
@@ -25,7 +25,6 @@
this.addVideoListeners();
this.createBase();
this.createControls();
- this.createTimeClones();
this.updateBase();
this.updateControls();
this.updateDuration();
@@ -133,7 +132,7 @@
right: 39,
down: 40
},
- MinimumTimelineWidth: 100,
+ MinimumTimelineWidth: 150,
ButtonWidth: 32,
extend: function(child)
@@ -531,21 +530,6 @@
wirelessTargetPicker.classList.add(this.ClassNames.hidden);
},
- createTimeClones: function()
- {
- var currentTimeClone = this.currentTimeClone = document.createElement('div');
- currentTimeClone.setAttribute('pseudo', '-webkit-media-controls-current-time-display');
- currentTimeClone.setAttribute('aria-hidden', 'true');
- currentTimeClone.classList.add('clone');
- this.base.appendChild(currentTimeClone);
-
- var remainingTimeClone = this.remainingTimeClone = document.createElement('div');
- remainingTimeClone.setAttribute('pseudo', '-webkit-media-controls-time-remaining-display');
- remainingTimeClone.setAttribute('aria-hidden', 'true');
- remainingTimeClone.classList.add('clone');
- this.base.appendChild(remainingTimeClone);
- },
-
setControlsType: function(type)
{
if (type === this.controlsType)
@@ -1294,32 +1278,29 @@
this.setIsLive(duration === Number.POSITIVE_INFINITY);
- var timeControls = [this.controls.currentTime, this.controls.remainingTime, this.currentTimeClone, this.remainingTimeClone];
+ // Reset existing style.
+ this.controls.currentTime.classList.remove(this.ClassNames.threeDigitTime);
+ this.controls.currentTime.classList.remove(this.ClassNames.fourDigitTime);
+ this.controls.currentTime.classList.remove(this.ClassNames.fiveDigitTime);
+ this.controls.currentTime.classList.remove(this.ClassNames.sixDigitTime);
+ this.controls.remainingTime.classList.remove(this.ClassNames.threeDigitTime);
+ this.controls.remainingTime.classList.remove(this.ClassNames.fourDigitTime);
+ this.controls.remainingTime.classList.remove(this.ClassNames.fiveDigitTime);
+ this.controls.remainingTime.classList.remove(this.ClassNames.sixDigitTime);
- function removeTimeClass(className) {
- for (let element of timeControls)
- element.classList.remove(className);
+ if (duration >= 60*60*10) {
+ this.controls.currentTime.classList.add(this.ClassNames.sixDigitTime);
+ this.controls.remainingTime.classList.add(this.ClassNames.sixDigitTime);
+ } else if (duration >= 60*60) {
+ this.controls.currentTime.classList.add(this.ClassNames.fiveDigitTime);
+ this.controls.remainingTime.classList.add(this.ClassNames.fiveDigitTime);
+ } else if (duration >= 60*10) {
+ this.controls.currentTime.classList.add(this.ClassNames.fourDigitTime);
+ this.controls.remainingTime.classList.add(this.ClassNames.fourDigitTime);
+ } else {
+ this.controls.currentTime.classList.add(this.ClassNames.threeDigitTime);
+ this.controls.remainingTime.classList.add(this.ClassNames.threeDigitTime);
}
-
- function addTimeClass(className) {
- for (let element of timeControls)
- element.classList.add(className);
- }
-
- // Reset existing style.
- removeTimeClass(this.ClassNames.threeDigitTime);
- removeTimeClass(this.ClassNames.fourDigitTime);
- removeTimeClass(this.ClassNames.fiveDigitTime);
- removeTimeClass(this.ClassNames.sixDigitTime);
-
- if (duration >= 60*60*10)
- addTimeClass(this.ClassNames.sixDigitTime);
- else if (duration >= 60*60)
- addTimeClass(this.ClassNames.fiveDigitTime);
- else if (duration >= 60*10)
- addTimeClass(this.ClassNames.fourDigitTime);
- else
- addTimeClass(this.ClassNames.threeDigitTime);
},
progressFillStyle: function(context)
@@ -1645,11 +1626,8 @@
// This tells us how much room we need in order to display every visible button.
var visibleButtonWidth = this.ButtonWidth * visibleButtons.length;
- var currentTimeWidth = this.currentTimeClone.getBoundingClientRect().width;
- var remainingTimeWidth = this.remainingTimeClone.getBoundingClientRect().width;
-
// Check if there is enough room for the scrubber.
- var shouldDropTimeline = (visibleWidth - visibleButtonWidth - currentTimeWidth - remainingTimeWidth) < this.MinimumTimelineWidth;
+ var shouldDropTimeline = (visibleWidth - visibleButtonWidth) < this.MinimumTimelineWidth;
this.controls.timeline.classList.toggle(this.ClassNames.dropped, shouldDropTimeline);
this.controls.currentTime.classList.toggle(this.ClassNames.dropped, shouldDropTimeline);
this.controls.thumbnailTrack.classList.toggle(this.ClassNames.dropped, shouldDropTimeline);
@@ -1703,9 +1681,9 @@
{
var currentTime = this.video.currentTime;
var timeRemaining = currentTime - this.video.duration;
- this.currentTimeClone.innerText = this.controls.currentTime.innerText = this.formatTime(currentTime);
+ this.controls.currentTime.innerText = this.formatTime(currentTime);
this.controls.timeline.value = this.video.currentTime;
- this.remainingTimeClone.innerText = this.controls.remainingTime.innerText = this.formatTime(timeRemaining);
+ this.controls.remainingTime.innerText = this.formatTime(timeRemaining);
},
updateControlsWhileScrubbing: function()
@@ -1715,8 +1693,8 @@
var currentTime = (this.controls.timeline.value / this.controls.timeline.max) * this.video.duration;
var timeRemaining = currentTime - this.video.duration;
- this.currentTimeClone.innerText = this.controls.currentTime.innerText = this.formatTime(currentTime);
- this.remainingTimeClone.innerText = this.controls.remainingTime.innerText = this.formatTime(timeRemaining);
+ this.controls.currentTime.innerText = this.formatTime(currentTime);
+ this.controls.remainingTime.innerText = this.formatTime(timeRemaining);
this.drawTimelineBackground();
},
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.css (202681 => 202682)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.css 2016-06-30 16:14:44 UTC (rev 202681)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.css 2016-06-30 16:19:32 UTC (rev 202682)
@@ -723,11 +723,3 @@
pointer-events: none;
}
-/* Time display clones that we use in updateLayoutForDisplayedWidth(). */
-::-webkit-media-controls-current-time-display.clone,
-::-webkit-media-controls-time-remaining-display.clone {
- position: absolute;
- display: inline;
- top: 100%;
- mix-blend-mode: normal;
-}
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js (202681 => 202682)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js 2016-06-30 16:14:44 UTC (rev 202681)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js 2016-06-30 16:19:32 UTC (rev 202682)
@@ -27,7 +27,7 @@
ControllerIOS.prototype = {
/* Constants */
- MinimumTimelineWidth: 150,
+ MinimumTimelineWidth: 200,
ButtonWidth: 42,
get idiom()