Modified: trunk/Source/WebCore/ChangeLog (184608 => 184609)
--- trunk/Source/WebCore/ChangeLog 2015-05-20 01:19:41 UTC (rev 184608)
+++ trunk/Source/WebCore/ChangeLog 2015-05-20 01:48:33 UTC (rev 184609)
@@ -1,3 +1,18 @@
+2015-05-19 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r184595.
+ https://bugs.webkit.org/show_bug.cgi?id=145197
+
+ Introduced a crash in 15 layout tests on Mavericks on #webkit
+ (Requested by rniwa on #webkit).
+
+ Reverted changeset:
+
+ "Media Controls stop updating after hovering for a few
+ seconds."
+ https://bugs.webkit.org/show_bug.cgi?id=144770
+ http://trac.webkit.org/changeset/184595
+
2015-05-19 Carlos Alberto Lopez Perez <[email protected]>
REGRESSION(r181571): Build broken when USE(OPENGL_ES_2) is defined.
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js (184608 => 184609)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js 2015-05-20 01:19:41 UTC (rev 184608)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js 2015-05-20 01:48:33 UTC (rev 184609)
@@ -266,7 +266,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,7 +291,7 @@
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;
@@ -682,8 +682,8 @@
handleDurationChange: function(event)
{
this.updateDuration();
- this.updateTime();
- this.updateProgress();
+ this.updateTime(true);
+ this.updateProgress(true);
},
handlePlay: function(event)
@@ -816,9 +816,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);
}
},
@@ -1142,8 +1147,11 @@
return gradient;
},
- updateProgress: function()
+ updateProgress: function(forceUpdate)
{
+ if (!forceUpdate && this.controlsAreHidden())
+ return;
+
this.updateTimelineMetricsIfNeeded();
this.drawTimelineBackground();
},
@@ -1350,35 +1358,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.base.appendChild(this.controls.inlinePlaybackPlaceholder);
- this.base.appendChild(this.controls.panel);
- }
- },
-
hideControls: function()
{
if (this.controlsAlwaysVisible())
@@ -1454,8 +1454,7 @@
controlsAreHidden: function()
{
- // Controls are only ever actually hidden when they are removed from the tree
- return !this.controls.panel.parentElement;
+ return !this.controlsAlwaysVisible() && !this.controls.panel.classList.contains(this.ClassNames.show);
},
removeControls: function()
@@ -1472,8 +1471,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 (184608 => 184609)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js 2015-05-20 01:19:41 UTC (rev 184608)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js 2015-05-20 01:48:33 UTC (rev 184609)
@@ -202,12 +202,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);
@@ -386,15 +380,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;
@@ -550,19 +535,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))