Modified: trunk/Source/WebCore/ChangeLog (184701 => 184702)
--- trunk/Source/WebCore/ChangeLog 2015-05-21 05:16:30 UTC (rev 184701)
+++ trunk/Source/WebCore/ChangeLog 2015-05-21 05:52:18 UTC (rev 184702)
@@ -1,3 +1,23 @@
+2015-05-20 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r184667 and r184682.
+ https://bugs.webkit.org/show_bug.cgi?id=145245
+
+ Broke media/media-controls-timeline-updates.html on WebKit2
+ (Requested by ap on #webkit).
+
+ Reverted changesets:
+
+ "Media Controls stop updating after hovering for a few
+ seconds."
+ https://bugs.webkit.org/show_bug.cgi?id=144770
+ http://trac.webkit.org/changeset/184667
+
+ "Unreviewed. Media Controls stop updating after hovering for a
+ few seconds."
+ https://bugs.webkit.org/show_bug.cgi?id=144770
+ http://trac.webkit.org/changeset/184682
+
2015-05-20 Jon Lee <[email protected]>
[iOS] Update optimized fullscreen controls artwork
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js (184701 => 184702)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js 2015-05-21 05:16:30 UTC (rev 184701)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js 2015-05-21 05:52:18 UTC (rev 184702)
@@ -268,7 +268,7 @@
var base = this.base = document.createElement('div');
base.setAttribute('pseudo', '-webkit-media-controls');
this.listenFor(base, 'mousemove', this.handleWrapperMouseMove);
- this.listenFor(this.video, 'mouseout', this.handleWrapperMouseOut);
+ this.listenFor(base, 'mouseout', this.handleWrapperMouseOut);
if (this.host.textTrackContainer)
base.appendChild(this.host.textTrackContainer);
},
@@ -291,14 +291,9 @@
this.timelineMetricsNeedsUpdate = true;
},
- scheduleUpdateLayoutForDisplayedWidth: function()
- {
- setTimeout(this.updateLayoutForDisplayedWidth.bind(this), 0);
- },
-
updateTimelineMetricsIfNeeded: function()
{
- if (this.timelineMetricsNeedsUpdate && !this.controlsAreHidden()) {
+ if (this.timelineMetricsNeedsUpdate) {
this.timelineLeft = this.controls.timeline.offsetLeft;
this.timelineWidth = this.controls.timeline.offsetWidth;
this.timelineHeight = this.controls.timeline.offsetHeight;
@@ -689,8 +684,8 @@
handleDurationChange: function(event)
{
this.updateDuration();
- this.updateTime();
- this.updateProgress();
+ this.updateTime(true);
+ this.updateProgress(true);
},
handlePlay: function(event)
@@ -823,9 +818,14 @@
handlePanelTransitionEnd: function(event)
{
var opacity = window.getComputedStyle(this.controls.panel).opacity;
- if (!parseInt(opacity) && !this.controlsAlwaysVisible()) {
- this.base.removeChild(this.controls.inlinePlaybackPlaceholder);
- this.base.removeChild(this.controls.panel);
+ if (parseInt(opacity) > 0) {
+ this.controls.panel.classList.remove(this.ClassNames.hidden);
+ if (this.controls.panelBackground)
+ this.controls.panelBackground.classList.remove(this.ClassNames.hidden);
+ } else if (!this.controlsAlwaysVisible()) {
+ this.controls.panel.classList.add(this.ClassNames.hidden);
+ if (this.controls.panelBackground)
+ this.controls.panelBackground.classList.add(this.ClassNames.hidden);
}
},
@@ -1149,8 +1149,11 @@
return gradient;
},
- updateProgress: function()
+ updateProgress: function(forceUpdate)
{
+ if (!forceUpdate && this.controlsAreHidden())
+ return;
+
this.updateTimelineMetricsIfNeeded();
this.drawTimelineBackground();
},
@@ -1357,35 +1360,27 @@
}
},
- updateForShowingControls: function()
+ showControls: function()
{
+ this.updateShouldListenForPlaybackTargetAvailabilityEvent();
+ if (this.showInlinePlaybackPlaceholderOnly())
+ return;
+
this.updateLayoutForDisplayedWidth();
this.setNeedsTimelineMetricsUpdate();
- this.updateTime();
- this.updateProgress();
+ this.updateTime(true);
+ this.updateProgress(true);
this.drawVolumeBackground();
this.drawTimelineBackground();
this.controls.panel.classList.add(this.ClassNames.show);
this.controls.panel.classList.remove(this.ClassNames.hidden);
+
if (this.controls.panelBackground) {
this.controls.panelBackground.classList.add(this.ClassNames.show);
this.controls.panelBackground.classList.remove(this.ClassNames.hidden);
}
},
- showControls: function()
- {
- this.updateShouldListenForPlaybackTargetAvailabilityEvent();
- if (this.showInlinePlaybackPlaceholderOnly())
- return;
-
- this.updateForShowingControls();
- if (this.shouldHaveControls() && this.controlsAreHidden()) {
- this.base.appendChild(this.controls.inlinePlaybackPlaceholder);
- this.base.appendChild(this.controls.panel);
- }
- },
-
hideControls: function()
{
if (this.controlsAlwaysVisible())
@@ -1461,7 +1456,7 @@
controlsAreHidden: function()
{
- return !this.controlsAlwaysVisible() && !this.controls.panel.classList.contains(this.ClassNames.show) && !this.controls.panel.parentElement;
+ return !this.controlsAlwaysVisible() && !this.controls.panel.classList.contains(this.ClassNames.show);
},
removeControls: function()
@@ -1478,8 +1473,11 @@
this.setNeedsTimelineMetricsUpdate();
},
- updateTime: function()
+ updateTime: function(forceUpdate)
{
+ if (!forceUpdate && this.controlsAreHidden())
+ return;
+
var currentTime = this.video.currentTime;
var timeRemaining = currentTime - this.video.duration;
this.controls.currentTime.innerText = this.formatTime(currentTime);
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js (184701 => 184702)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js 2015-05-21 05:16:30 UTC (rev 184701)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js 2015-05-21 05:52:18 UTC (rev 184702)
@@ -190,12 +190,6 @@
// Explicitly do nothing to override base-class behavior.
},
- controlsAreHidden: function()
- {
- // Controls are only ever actually hidden when they are removed from the tree
- return !this.controls.panelContainer.parentElement;
- },
-
addControls: function() {
this.base.appendChild(this.controls.inlinePlaybackPlaceholder);
this.base.appendChild(this.controls.panelContainer);
@@ -374,15 +368,6 @@
this.updateShouldListenForPlaybackTargetAvailabilityEvent();
},
- handlePanelTransitionEnd: function(event)
- {
- var opacity = window.getComputedStyle(this.controls.panel).opacity;
- if (!parseInt(opacity) && !this.controlsAlwaysVisible()) {
- this.base.removeChild(this.controls.inlinePlaybackPlaceholder);
- this.base.removeChild(this.controls.panelContainer);
- }
- },
-
presentationMode: function() {
if ('webkitPresentationMode' in this.video)
return this.video.webkitPresentationMode;
@@ -538,19 +523,6 @@
this.showControls();
},
- showControls: function()
- {
- this.updateShouldListenForPlaybackTargetAvailabilityEvent();
- if (this.showInlinePlaybackPlaceholderOnly())
- return;
-
- this.updateForShowingControls();
- if (this.shouldHaveControls()) {
- this.base.appendChild(this.controls.inlinePlaybackPlaceholder);
- this.base.appendChild(this.controls.panelContainer);
- }
- },
-
setShouldListenForPlaybackTargetAvailabilityEvent: function(shouldListen)
{
if (shouldListen && (this.shouldHaveStartPlaybackButton() || this.video.error))