Changeset 226872 in webkit
- Timestamp:
- Jan 11, 2018 10:31:07 PM (6 years ago)
- Location:
- branches/safari-605-branch
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-605-branch/LayoutTests/ChangeLog
r226871 r226872 1 2018-01-11 Jason Marcell <jmarcell@apple.com> 2 3 Cherry-pick r226796. rdar://problem/36450730 4 5 2018-01-11 Antoine Quint <graouts@apple.com> 6 7 Only listen to webkitplaybacktargetavailabilitychanged when media controls are visible to the user 8 https://bugs.webkit.org/show_bug.cgi?id=181547 9 <rdar://problem/35947650> 10 11 Reviewed by Eric Carlson. 12 13 Add a test that checks that enabling AirPlay routes when the controls are not visible to the user 14 does not incur any change, and that making the controls visible again shows the controls in the 15 expected state. 16 17 * media/modern-media-controls/airplay-support/airplay-support-disable-event-listeners-with-hidden-controls-expected.txt: Added. 18 * media/modern-media-controls/airplay-support/airplay-support-disable-event-listeners-with-hidden-controls.html: Added. 19 1 20 2018-01-11 Jason Marcell <jmarcell@apple.com> 2 21 -
branches/safari-605-branch/Source/WebCore/ChangeLog
r226871 r226872 1 2018-01-11 Jason Marcell <jmarcell@apple.com> 2 3 Cherry-pick r226796. rdar://problem/36450730 4 5 2018-01-11 Antoine Quint <graouts@apple.com> 6 7 Only listen to webkitplaybacktargetavailabilitychanged when media controls are visible to the user 8 https://bugs.webkit.org/show_bug.cgi?id=181547 9 <rdar://problem/35947650> 10 11 Reviewed by Eric Carlson. 12 13 Because listening to "webkitplaybacktargetavailabilitychanged" events incurs some higher power usage on iOS, 14 we only listen to such events when controls are visible to the user. In other words, the MediaControls need to 15 have both "visible" set to "true" and "faded" set to "false". To support this, we add a delegate method on 16 MediaControls such that it can tell the MediaController that the "visible" property changed. With this message, 17 MediaController can inform its MediaControllerSupport objects that user visibility of the controls changed, which 18 lets AirplaySupport disable itself when controls are no longer visible. 19 20 Test: media/modern-media-controls/airplay-support/airplay-support-disable-event-listeners-with-hidden-controls.html 21 22 * Modules/modern-media-controls/controls/media-controls.js: 23 (MediaControls.prototype.set visible): 24 * Modules/modern-media-controls/media/airplay-support.js: 25 (AirplaySupport.prototype.controlsUserVisibilityDidChange): 26 * Modules/modern-media-controls/media/media-controller-support.js: 27 (MediaControllerSupport.prototype.controlsUserVisibilityDidChange): 28 * Modules/modern-media-controls/media/media-controller.js: 29 (MediaController.prototype.mediaControlsVisibilityDidChange): 30 (MediaController.prototype.mediaControlsFadedStateDidChange): 31 (MediaController.prototype._controlsUserVisibilityDidChange): 32 1 33 2018-01-11 Jason Marcell <jmarcell@apple.com> 2 34 -
branches/safari-605-branch/Source/WebCore/Modules/modern-media-controls/controls/media-controls.js
r219552 r226872 87 87 if (flag) 88 88 this.layout(); 89 90 if (this.delegate && typeof this.delegate.mediaControlsVisibilityDidChange === "function") 91 this.delegate.mediaControlsVisibilityDidChange(); 89 92 } 90 93 -
branches/safari-605-branch/Source/WebCore/Modules/modern-media-controls/media/airplay-support.js
r218891 r226872 44 44 } 45 45 46 controlsUserVisibilityDidChange() 47 { 48 const controls = this.mediaController.controls; 49 if (controls.visible && !controls.faded) 50 this.enable(); 51 else 52 this.disable(); 53 } 54 46 55 handleEvent(event) 47 56 { -
branches/safari-605-branch/Source/WebCore/Modules/modern-media-controls/media/media-controller-support.js
r225279 r226872 91 91 } 92 92 93 controlsUserVisibilityDidChange() 94 { 95 // Implement by subclasses. 96 } 97 93 98 handleEvent(event) 94 99 { -
branches/safari-605-branch/Source/WebCore/Modules/modern-media-controls/media/media-controller.js
r226871 r226872 125 125 } 126 126 127 mediaControlsVisibilityDidChange() 128 { 129 this._controlsUserVisibilityDidChange(); 130 } 131 127 132 mediaControlsFadedStateDidChange() 128 133 { 134 this._controlsUserVisibilityDidChange(); 129 135 this._updateTextTracksClassList(); 130 136 } … … 287 293 } 288 294 295 _controlsUserVisibilityDidChange() 296 { 297 if (!this.controls || !this._supportingObjects) 298 return; 299 300 this._supportingObjects.forEach(supportingObject => supportingObject.controlsUserVisibilityDidChange()); 301 } 302 289 303 _updateiOSFullscreenProperties() 290 304 {
Note: See TracChangeset
for help on using the changeset viewer.