|
Lines 1-3
a/Source/WebCore/ChangeLog_sec1
|
|
|
1 |
2017-03-27 Antoine Quint <graouts@apple.com> |
| 2 |
|
| 3 |
[Modern Media Controls] Improve media documents across macOS, iPhone and iPad |
| 4 |
https://bugs.webkit.org/show_bug.cgi?id=169145 |
| 5 |
<rdar://problem/17048858> |
| 6 |
|
| 7 |
Reviewed by Dean Jackson. |
| 8 |
|
| 9 |
There were a variety of issues with media documents, some longstanding, and some specifically |
| 10 |
about modern media controls. |
| 11 |
|
| 12 |
One issue was that fullscreen and picture-in-picture buttons would show for audio media documents, |
| 13 |
due to using a <video> element to load the audio file. We now have additional logic in MediaController |
| 14 |
to identify if the loaded media is really an audio file, and using this information to hide the |
| 15 |
fullscreen and picture-in-picture buttons. |
| 16 |
|
| 17 |
Another issue was that we would inject style in MediaDocument.cpp that was specific to modern media |
| 18 |
controls when we could have the modern-media-controls module injected CSS handle this styling. We now |
| 19 |
use the injected style in the shadow root to size media documents based on the device characteristics |
| 20 |
and ensuring that page styles are overridden. |
| 21 |
|
| 22 |
We also simplify how MediaDocument.cpp sets the source of the media element to simply use the "src" |
| 23 |
attribute and not a <source> element. |
| 24 |
|
| 25 |
Finally, we introduce a MediaDocumentController class that is instantiated when we're dealing with |
| 26 |
a media document to hide the controls while we determine the type of media we're loading (audio vs. |
| 27 |
video) in order to apply the appropriate styling without flashes. |
| 28 |
|
| 29 |
As a result of the new styles applied by the modern-media-controls module, media documents have a |
| 30 |
similar behavior on macOS and iPad, where we only enforce a min-width for video allowing them |
| 31 |
to play at their natural size otherwise, and enforcing a fixed width for audio. On iPhone however, |
| 32 |
we want to always play the media at full width, with some padding in the case of audio. |
| 33 |
|
| 34 |
Tests: media/modern-media-controls/fullscreen-support/fullscreen-support-disabled-video-with-audio-tracks-only.html |
| 35 |
media/modern-media-controls/media-documents/ipad/media-document-audio-ios-sizing.html |
| 36 |
media/modern-media-controls/media-documents/ipad/media-document-video-ios-sizing.html |
| 37 |
media/modern-media-controls/media-documents/media-document-audio-ios-sizing.html |
| 38 |
media/modern-media-controls/media-documents/media-document-audio-mac-sizing.html |
| 39 |
media/modern-media-controls/media-documents/media-document-video-ios-sizing.html |
| 40 |
media/modern-media-controls/media-documents/media-document-video-mac-sizing.html |
| 41 |
media/modern-media-controls/pip-support/pip-support-disabled-video-with-audio-tracks-only.html |
| 42 |
|
| 43 |
* Modules/modern-media-controls/controls/ios-inline-media-controls.css: |
| 44 |
(:host(audio) .media-controls.ios.inline > .controls-bar:before,): |
| 45 |
(:host(audio) .media-controls.ios.inline > .controls-bar:before): Deleted. |
| 46 |
* Modules/modern-media-controls/controls/macos-media-controls.css: |
| 47 |
(:host(audio) .media-controls.mac.inline > .controls-bar,): |
| 48 |
(:host(audio) .media-controls.mac.inline > .controls-bar > .background-tint,): |
| 49 |
(:host(audio) .media-controls.mac.inline > .controls-bar): Deleted. |
| 50 |
(:host(audio) .media-controls.mac.inline > .controls-bar > .background-tint): Deleted. |
| 51 |
* Modules/modern-media-controls/controls/media-document.css: Added. |
| 52 |
(:host(.media-document)): |
| 53 |
(:host(.media-document.ready)): |
| 54 |
(:host(.media-document.audio.mac)): |
| 55 |
(:host(.media-document.audio.ipad)): |
| 56 |
(:host(.media-document.audio.iphone)): |
| 57 |
(:host(.media-document.video.mac)): |
| 58 |
(:host(.media-document.video.ipad)): |
| 59 |
(:host(.media-document.video.iphone)): |
| 60 |
* Modules/modern-media-controls/js-files: |
| 61 |
* Modules/modern-media-controls/media/fullscreen-support.js: |
| 62 |
(FullscreenSupport.prototype.syncControl): |
| 63 |
(FullscreenSupport): |
| 64 |
* Modules/modern-media-controls/media/media-controller.js: |
| 65 |
(MediaController): |
| 66 |
(MediaController.prototype.get isAudio): |
| 67 |
* Modules/modern-media-controls/media/media-document-controller.js: Added. |
| 68 |
(MediaDocumentController): |
| 69 |
(MediaDocumentController.prototype.handleEvent): |
| 70 |
(MediaDocumentController.prototype._mediaDocumentHasMetadata): |
| 71 |
(MediaDocumentController.prototype._mediaDocumentHasSize): |
| 72 |
* Modules/modern-media-controls/media/pip-support.js: |
| 73 |
(PiPSupport.prototype.syncControl): |
| 74 |
(PiPSupport): |
| 75 |
* html/MediaDocument.cpp: |
| 76 |
(WebCore::MediaDocumentParser::createDocumentStructure): |
| 77 |
|
| 1 |
2017-03-25 Chris Dumez <cdumez@apple.com> |
78 |
2017-03-25 Chris Dumez <cdumez@apple.com> |
| 2 |
|
79 |
|
| 3 |
REGRESSION(r214195): zillow.com header video doesn't resume when switching to another tab and back |
80 |
REGRESSION(r214195): zillow.com header video doesn't resume when switching to another tab and back |