Changeset 214426 in webkit
- Timestamp:
- Mar 27, 2017 12:44:09 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r214425 r214426 1 2017-03-27 Antoine Quint <graouts@apple.com> 2 3 [Modern Media Controls] Clicking on the tracks button when the tracks panel is up in a media document pauses the video 4 https://bugs.webkit.org/show_bug.cgi?id=168517 5 <rdar://problem/30577636> 6 7 Reviewed by Dean Jackson. 8 9 * media/video-click-dblckick-standalone.html: We disable modern-media-controls here since we know that this test won't pass with them on. 10 1 11 2017-03-27 Ryan Haddad <ryanhaddad@apple.com> 2 12 -
trunk/LayoutTests/media/video-click-dblckick-standalone.html
r120416 r214426 1 <!DOCTYPE html><!-- webkit-test-runner [ enableModernMediaControls=false ] --> 1 2 <html> 2 3 <head> -
trunk/Source/WebCore/ChangeLog
r214421 r214426 1 2017-03-27 Antoine Quint <graouts@apple.com> 2 3 [Modern Media Controls] Clicking on the tracks button when the tracks panel is up in a media document pauses the video 4 https://bugs.webkit.org/show_bug.cgi?id=168517 5 <rdar://problem/30577636> 6 7 Reviewed by Dean Jackson. 8 9 We completely turn off default event handling in MediaDocument.cpp since we're implementing the 10 behavior we expect to pause and resume the video in the modern-media-controls module already. This 11 gets rid of this odd case where the content would not see the "click" event while the C++ side would 12 handle it and pause the video. 13 14 * Modules/modern-media-controls/media/media-controller.js: 15 (MediaController): 16 (MediaController.prototype.handleEvent): 17 (MediaController.prototype._containerWasClicked): Deleted. 18 * html/MediaDocument.cpp: 19 (WebCore::MediaDocument::defaultEventHandler): 20 1 21 2017-03-27 Youenn Fablet <youenn@apple.com> 2 22 -
trunk/Source/WebCore/Modules/modern-media-controls/media/media-controller.js
r214411 r214426 37 37 this.container = shadowRoot.appendChild(document.createElement("div")); 38 38 this.container.className = "media-controls-container"; 39 this.container.addEventListener("click", this, true);40 39 41 40 if (host) { … … 134 133 // We must immediately perform layouts so that we don't lag behind the media layout size. 135 134 scheduler.flushScheduledLayoutCallbacks(); 136 } else if (event.type === "click" && event.currentTarget === this.container) 137 this._containerWasClicked(event); 138 else if (event.currentTarget === this.media) { 135 } else if (event.currentTarget === this.media) { 139 136 this._updateControlsIfNeeded(); 140 137 if (event.type === "webkitpresentationmodechanged") … … 144 141 145 142 // Private 146 147 _containerWasClicked(event)148 {149 // We need to call preventDefault() here since, in the case of Media Documents,150 // playback may be toggled when clicking on the video.151 event.preventDefault();152 }153 143 154 144 _updateControlsIfNeeded() -
trunk/Source/WebCore/html/MediaDocument.cpp
r214411 r214426 182 182 void MediaDocument::defaultEventHandler(Event& event) 183 183 { 184 // Match the default Quicktime plugin behavior to allow 184 // Modern media controls have their own event handling to determine when to 185 // pause or resume playback. 186 if (RuntimeEnabledFeatures::sharedFeatures().modernMediaControlsEnabled()) 187 return; 188 189 // Match the default Quicktime plugin behavior to allow 185 190 // clicking and double-clicking to pause and play the media. 186 191 Node* targetNode = event.target()->toNode();
Note: See TracChangeset
for help on using the changeset viewer.