Changeset 218400 in webkit
- Timestamp:
- Jun 16, 2017 11:55:03 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r218398 r218400 1 2017-06-16 Antoine Quint <graouts@apple.com> 2 3 REGRESSION: AirPlay placard is not shown when in fullscreen 4 https://bugs.webkit.org/show_bug.cgi?id=173447 5 <rdar://problem/32803773> 6 7 Reviewed by Jon Lee. 8 9 Add a new test to check that we display the AirPlay placard on macOS in fullscreen. 10 11 * media/modern-media-controls/placard-support/placard-support-airplay-fullscreen-expected.txt: Added. 12 * media/modern-media-controls/placard-support/placard-support-airplay-fullscreen.html: Added. 13 * platform/ios-simulator/TestExpectations: 14 1 15 2017-06-16 Antoine Quint <graouts@apple.com> 2 16 -
trunk/LayoutTests/platform/ios-simulator/TestExpectations
r218398 r218400 116 116 media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-parent-element.html [ Skip ] 117 117 media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video.html [ Skip ] 118 media/modern-media-controls/placard-support/placard-support-airplay-fullscreen.html [ Skip ] 118 119 119 120 # These tests specifically test iOS-only media controls features -
trunk/Source/WebCore/ChangeLog
r218399 r218400 1 2017-06-16 Antoine Quint <graouts@apple.com> 2 3 REGRESSION: AirPlay placard is not shown when in fullscreen 4 https://bugs.webkit.org/show_bug.cgi?id=173447 5 <rdar://problem/32803773> 6 7 Reviewed by Jon Lee. 8 9 We only allowed a placard to be set on inline controls, but that was an oversight: placards 10 should be displayed in fullscreen as well. As such, we move the "placard" property up from 11 InlineMediaControls to MediaControls, and update the layout() logic in MacOSFullscreenMediaControls 12 to display a placard. 13 14 Test: media/modern-media-controls/placard-support/placard-support-airplay-fullscreen.html 15 16 * Modules/modern-media-controls/controls/inline-media-controls.js: 17 (InlineMediaControls): 18 (InlineMediaControls.prototype.layout): 19 (InlineMediaControls.prototype.get placard): Deleted. 20 (InlineMediaControls.prototype.set placard): Deleted. 21 * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js: 22 (MacOSFullscreenMediaControls.prototype.layout): 23 * Modules/modern-media-controls/controls/media-controls.js: 24 (MediaControls.prototype.get placard): 25 (MediaControls.prototype.set placard): 26 (MediaControls.prototype.placardPreventsControlsBarDisplay): 27 (MediaControls.prototype.layout): 28 * Modules/modern-media-controls/media/placard-support.js: 29 (PlacardSupport.prototype._updatePlacard): 30 (PlacardSupport): 31 1 32 2017-06-16 Jer Noble <jer.noble@apple.com> 2 33 -
trunk/Source/WebCore/Modules/modern-media-controls/controls/inline-media-controls.js
r218241 r218400 38 38 this.element.classList.add("inline"); 39 39 40 this._placard = null;41 42 this.airplayPlacard = new AirplayPlacard(this);43 this.invalidPlacard = new InvalidPlacard(this);44 this.pipPlacard = new PiPPlacard(this);45 46 40 this.skipBackButton = new SkipBackButton(this); 47 41 this.skipForwardButton = new SkipForwardButton(this); … … 95 89 } 96 90 97 get placard()98 {99 return this._placard;100 }101 102 set placard(placard)103 {104 if (this._placard === placard)105 return;106 107 this._placard = placard;108 this.layout();109 }110 111 91 // Protected 112 92 … … 117 97 const children = []; 118 98 119 if (this._placard) { 120 this._placard.width = this.width; 121 this._placard.height = this.height; 122 children.push(this._placard); 123 // The AirPlay placard is the only one allowing controls to show as well. 124 if (this._placard !== this.airplayPlacard) { 99 if (this.placard) { 100 children.push(this.placard); 101 if (this.placardPreventsControlsBarDisplay()) { 125 102 this.children = children; 126 103 return; -
trunk/Source/WebCore/Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js
r217823 r218400 76 76 this.bottomControlsBar.children = [this._leftContainer, this._centerContainer, this._rightContainer]; 77 77 78 this.children = [this.bottomControlsBar];79 80 78 this.bottomControlsBar.element.addEventListener("mousedown", this); 81 79 … … 100 98 { 101 99 super.layout(); 100 101 const children = []; 102 103 if (this.placard) { 104 children.push(this.placard); 105 if (this.placardPreventsControlsBarDisplay()) { 106 this.children = children; 107 return; 108 } 109 } 110 111 children.push(this.bottomControlsBar); 102 112 103 113 if (!this._rightContainer) … … 126 136 this.timeControl.width = FullscreenTimeControlWidth; 127 137 } 138 139 this.children = children; 128 140 } 129 141 -
trunk/Source/WebCore/Modules/modern-media-controls/controls/media-controls.js
r217823 r218400 56 56 this.autoHideController.hasSecondaryUIAttached = false; 57 57 58 this._placard = null; 59 this.airplayPlacard = new AirplayPlacard(this); 60 this.invalidPlacard = new InvalidPlacard(this); 61 this.pipPlacard = new PiPPlacard(this); 62 58 63 this.element.addEventListener("focusin", this); 59 64 window.addEventListener("dragstart", this, true); … … 138 143 this._shouldCenterControlsVertically = flag; 139 144 this.markDirtyProperty("scaleFactor"); 145 } 146 147 get placard() 148 { 149 return this._placard; 150 } 151 152 set placard(placard) 153 { 154 if (this._placard === placard) 155 return; 156 157 this._placard = placard; 158 this.layout(); 159 } 160 161 placardPreventsControlsBarDisplay() 162 { 163 return this._placard && this._placard !== this.airplayPlacard; 140 164 } 141 165 … … 199 223 else if (event.type === "dragstart" && this.isPointInControls(new DOMPoint(event.clientX, event.clientY))) 200 224 event.preventDefault(); 225 } 226 227 layout() 228 { 229 super.layout(); 230 231 if (this._placard) { 232 this._placard.width = this.width; 233 this._placard.height = this.height; 234 } 201 235 } 202 236 -
trunk/Source/WebCore/Modules/modern-media-controls/media/placard-support.js
r218241 r218400 49 49 _updatePlacard() 50 50 { 51 if (this.mediaController.layoutTraits & LayoutTraits.Fullscreen)52 return;53 54 51 const controls = this.mediaController.controls; 55 52 const media = this.mediaController.media;
Note: See TracChangeset
for help on using the changeset viewer.