Changeset 211339 in webkit
- Timestamp:
- Jan 28, 2017 10:16:41 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r211337 r211339 1 2017-01-28 Antoine Quint <graouts@apple.com> 2 3 [Modern Media Controls] REGRESSION: Video stops playing after going into Full Screen in media documents 4 https://bugs.webkit.org/show_bug.cgi?id=167552 5 <rdar://problem/29601646> 6 7 Reviewed by Eric Carlson. 8 9 Add a new test that checks that clicking on a <video> within a media document does not paused after being clicked. 10 Since this behavior uses click events, we use window.eventSender and skip this test on iOS. 11 12 * media/modern-media-controls/media-documents/click-on-video-should-not-pause-expected.txt: Added. 13 * media/modern-media-controls/media-documents/click-on-video-should-not-pause.html: Added. 14 * platform/ios-simulator/TestExpectations: 15 1 16 2017-01-28 Zalan Bujtas <zalan@apple.com> 2 17 -
trunk/LayoutTests/platform/ios-simulator/TestExpectations
r211250 r211339 2801 2801 media/modern-media-controls/media-controller/media-controller-auto-hide-rewind-with-mouse-enter.html [ Skip ] 2802 2802 media/modern-media-controls/scrubber-support/scrubber-support-click.html [ Skip ] 2803 media/modern-media-controls/media-documents/click-on-video-should-not-pause.html [ Skip ] 2803 2804 2804 2805 # Tests designed for macOS that have iOS equivalents in "ipad" directories -
trunk/Source/WebCore/ChangeLog
r211338 r211339 1 2017-01-28 Antoine Quint <graouts@apple.com> 2 3 [Modern Media Controls] REGRESSION: Video stops playing after going into Full Screen in media documents 4 https://bugs.webkit.org/show_bug.cgi?id=167552 5 <rdar://problem/29601646> 6 7 Reviewed by Eric Carlson. 8 9 In the case of media documents, there is a built-in behavior, implemented in MediaDocument::defaultEventHandler(), 10 that toggles playback when clicking or double-clicking the video. We disable this behavior by adding a "click" event 11 handler on the entire media shadow root and calling "preventDefault()". 12 13 Test: media/modern-media-controls/media-documents/click-on-video-should-not-pause.html 14 15 * Modules/modern-media-controls/media/media-controller.js: 16 (MediaController): 17 (MediaController.prototype.handleEvent): 18 (MediaController.prototype._containerWasClicked): 19 1 20 2017-01-28 Dan Bernstein <mitz@apple.com> 2 21 -
trunk/Source/WebCore/Modules/modern-media-controls/media/media-controller.js
r209615 r211339 35 35 this.container = shadowRoot.appendChild(document.createElement("div")); 36 36 this.container.className = "media-controls-container"; 37 this.container.addEventListener("click", this, true); 37 38 38 39 if (host) { … … 79 80 if (event.type === "resize" && event.currentTarget === this.shadowRoot) 80 81 this._updateControlsSize(); 82 else if (event.type === "click" && event.currentTarget === this.container) 83 this._containerWasClicked(event); 81 84 else if (event.currentTarget === this.media) { 82 85 this._updateControlsIfNeeded(); … … 87 90 88 91 // Private 92 93 _containerWasClicked(event) 94 { 95 // We need to call preventDefault() here since, in the case of Media Documents, 96 // playback may be toggled when clicking on the video. 97 event.preventDefault(); 98 } 89 99 90 100 _updateControlsIfNeeded()
Note: See TracChangeset
for help on using the changeset viewer.