Title: [184794] trunk/Source/WebCore
Revision
184794
Author
eric.carl...@apple.com
Date
2015-05-22 14:01:39 -0700 (Fri, 22 May 2015)

Log Message

[Mac] Don't show default controls after playing to wireless target
https://bugs.webkit.org/show_bug.cgi?id=145317

Reviewed by Dean Jackson.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.handlePanelTransitionEnd): Don't show controls unless the video
element has the 'controls' attribute.
(Controller.prototype.setPlaying): Check this.video.controls directly because we never want
to show controls unless the attribute is present.
(Controller.prototype.showControls): Ditto.
(Controller.prototype.updateWirelessPlaybackStatus): Call reconnectControls.
(Controller.prototype.handleWirelessPlaybackChange): Don't call reconnectControls, it will
happen in updateWirelessPlaybackStatus.
(Controller.prototype.showInlinePlaybackPlaceholderOnly): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (184793 => 184794)


--- trunk/Source/WebCore/ChangeLog	2015-05-22 20:47:53 UTC (rev 184793)
+++ trunk/Source/WebCore/ChangeLog	2015-05-22 21:01:39 UTC (rev 184794)
@@ -1,3 +1,21 @@
+2015-05-22  Eric Carlson  <eric.carl...@apple.com>
+
+        [Mac] Don't show default controls after playing to wireless target
+        https://bugs.webkit.org/show_bug.cgi?id=145317
+
+        Reviewed by Dean Jackson.
+
+        * Modules/mediacontrols/mediaControlsApple.js:
+        (Controller.prototype.handlePanelTransitionEnd): Don't show controls unless the video
+        element has the 'controls' attribute.
+        (Controller.prototype.setPlaying): Check this.video.controls directly because we never want
+        to show controls unless the attribute is present.
+        (Controller.prototype.showControls): Ditto.
+        (Controller.prototype.updateWirelessPlaybackStatus): Call reconnectControls.
+        (Controller.prototype.handleWirelessPlaybackChange): Don't call reconnectControls, it will
+        happen in updateWirelessPlaybackStatus.
+        (Controller.prototype.showInlinePlaybackPlaceholderOnly): Deleted.
+
 2015-05-22  Chris Dumez  <cdu...@apple.com>
 
         [CG] Regression(r78652): Partially decoded images are not properly removed from MemoryCache when pruning

Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js (184793 => 184794)


--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js	2015-05-22 20:47:53 UTC (rev 184793)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js	2015-05-22 21:01:39 UTC (rev 184794)
@@ -823,7 +823,7 @@
     handlePanelTransitionEnd: function(event)
     {
         var opacity = window.getComputedStyle(this.controls.panel).opacity;
-        if (!parseInt(opacity) && !this.controlsAlwaysVisible()) {
+        if (!parseInt(opacity) && !this.controlsAlwaysVisible() && this.video.controls) {
             this.base.removeChild(this.controls.inlinePlaybackPlaceholder);
             this.base.removeChild(this.controls.panel);
         }
@@ -1333,7 +1333,7 @@
 
     setPlaying: function(isPlaying)
     {
-        if (this.showInlinePlaybackPlaceholderOnly())
+        if (!this.video.controls)
             return;
 
         if (this.isPlaying === isPlaying)
@@ -1376,7 +1376,7 @@
     showControls: function()
     {
         this.updateShouldListenForPlaybackTargetAvailabilityEvent();
-        if (this.showInlinePlaybackPlaceholderOnly())
+        if (!this.video.controls)
             return;
 
         this.updateForShowingControls();
@@ -1934,6 +1934,7 @@
         }
         this.setNeedsUpdateForDisplayedWidth();
         this.updateLayoutForDisplayedWidth();
+        this.reconnectControls();
         this.updateWirelessTargetPickerButton();
     },
 
@@ -1963,8 +1964,6 @@
         this.updateWirelessTargetAvailable();
         this.updateWirelessPlaybackStatus();
         this.setNeedsTimelineMetricsUpdate();
-        if (this.showInlinePlaybackPlaceholderOnly())
-            this.reconnectControls();
     },
 
     handleWirelessTargetAvailableChange: function(event) {
@@ -1991,11 +1990,6 @@
             this.stopListeningFor(this.video, 'webkitplaybacktargetavailabilitychanged', this.handleWirelessTargetAvailableChange);
     },
 
-    showInlinePlaybackPlaceholderOnly: function(event)
-    {
-        return this.currentPlaybackTargetIsWireless() && !this.video.controls;
-    },
-
     get scrubbing()
     {
         return this._scrubbing;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to