Changeset 212872 in webkit
- Timestamp:
- Feb 22, 2017 6:55:59 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r212869 r212872 1 2017-02-22 Antoine Quint <graouts@apple.com> 2 3 [Modern Media Controls] Clicking on the video doesn't toggle playback state in fullscreen on macOS 4 https://bugs.webkit.org/show_bug.cgi?id=168755 5 <rdar://problem/30664484> 6 7 Reviewed by Dean Jackson. 8 9 Add a dedicated test for fullscreen to check that clicking on the video correctly toggles playback. 10 11 * media/modern-media-controls/media-controller/media-controller-click-on-video-background-should-pause-fullscreen-expected.txt: Added. 12 * media/modern-media-controls/media-controller/media-controller-click-on-video-background-should-pause-fullscreen.html: Added. 13 * platform/ios-simulator/TestExpectations: 14 1 15 2017-02-22 Antoine Quint <graouts@apple.com> 2 16 -
trunk/LayoutTests/platform/ios-simulator/TestExpectations
r212845 r212872 2813 2813 media/modern-media-controls/media-documents/click-on-video-should-not-pause.html [ Skip ] 2814 2814 media/modern-media-controls/media-controller/media-controller-click-on-video-background-should-pause.html [ Skip ] 2815 media/modern-media-controls/media-controller/media-controller-click-on-video-background-should-pause-fullscreen.html [ Skip ] 2815 2816 media/modern-media-controls/media-controller/media-controller-click-on-video-background-to-dismiss-tracks-panel-should-not-toggle-playback.html [ Skip ] 2816 2817 media/modern-media-controls/media-controller/media-controller-click-on-video-controls-should-not-pause.html [ Skip ] -
trunk/Source/WebCore/ChangeLog
r212869 r212872 1 2017-02-22 Antoine Quint <graouts@apple.com> 2 3 [Modern Media Controls] Clicking on the video doesn't toggle playback state in fullscreen on macOS 4 https://bugs.webkit.org/show_bug.cgi?id=168755 5 <rdar://problem/30664484> 6 7 Reviewed by Dean Jackson. 8 9 We now call super in the handleEvent() method of MacOSFullscreenMediaControls if we're not dealing 10 with an event type and target combination that was specifically registered in this class's scope. 11 We had mistakenly added the call to super.handleEvent(event) in the wrong method when fixing 12 https://bugs.webkit.org/show_bug.cgi?id=168515. 13 14 Test: media/modern-media-controls/media-controller/media-controller-click-on-video-background-should-pause-fullscreen.html 15 16 * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js: 17 (MacOSFullscreenMediaControls.prototype.handleEvent): 18 (MacOSFullscreenMediaControls.prototype._handleMousedown): 19 * Modules/modern-media-controls/controls/macos-media-controls.js: 20 (MacOSMediaControls.prototype.handleEvent): 21 (MacOSMediaControls): 22 1 23 2017-02-22 Antoine Quint <graouts@apple.com> 2 24 -
trunk/Source/WebCore/Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js
r212573 r212872 74 74 this.controlsBar.children = [new BackgroundTint, this._leftContainer, this._centerContainer, this._rightContainer, this.timeControl]; 75 75 76 this. element.addEventListener("mousedown", this);76 this.controlsBar.element.addEventListener("mousedown", this); 77 77 } 78 78 … … 92 92 handleEvent(event) 93 93 { 94 switch (event.type) { 95 case "mousedown": 94 if (event.type === "mousedown" && event.currentTarget === this.controlsBar.element) 96 95 this._handleMousedown(event); 97 break; 98 case "mousemove": 96 else if (event.type === "mousemove" && event.currentTarget === this.element) 99 97 this._handleMousemove(event); 100 break; 101 case "mouseup": 98 else if (event.type === "mouseup" && event.currentTarget === this.element) 102 99 this._handleMouseup(event); 103 break;104 }100 else 101 super.handleEvent(event); 105 102 } 106 103 … … 129 126 _handleMousedown(event) 130 127 { 131 super.handleEvent(event);132 133 if (event.target !== this.controlsBar.element)134 return;135 136 128 event.preventDefault(); 129 event.stopPropagation(); 137 130 138 131 this._lastDragPoint = this._pointForEvent(event); -
trunk/Source/WebCore/Modules/modern-media-controls/controls/macos-media-controls.js
r212573 r212872 69 69 // Only notify that the background was clicked when the "mousedown" event 70 70 // was also received, which wouldn't happen if the "mousedown" event caused 71 // the tracks panel to be hidden. 72 if (event.type === "mousedown") 71 // the tracks panel to be hidden, unless we're in fullscreen in which case 72 // we can simply check that the panel is not currently presented. 73 if (event.type === "mousedown" && !this.tracksPanel.presented) 73 74 this._receivedMousedown = true; 74 75 else if (event.type === "click") {
Note: See TracChangeset
for help on using the changeset viewer.