Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 59efb640749a3024a2c6caeb1fb985d852c6f730
https://github.com/WebKit/WebKit/commit/59efb640749a3024a2c6caeb1fb985d852c6f730
Author: Jer Noble <[email protected]>
Date: 2026-04-30 (Thu, 30 Apr 2026)
Changed paths:
A LayoutTests/media/iframe-load-html-as-m2ts-expected.txt
A LayoutTests/media/iframe-load-html-as-m2ts.html
M Source/WebCore/dom/DOMImplementation.cpp
M Source/WebCore/platform/MIMETypeRegistry.cpp
M
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
Log Message:
-----------
Content served as video/mp2t can be loaded as html
rdar://166121363
https://bugs.webkit.org/show_bug.cgi?id=305859
Reviewed by Eric Carlson.
FrameLoader will ask whether content can be displayed by calling
MIMETypeRegistry::canShowMIMEType(type) with the mime type provided
by the network. Later, DOMImplementation will decide which type of
document (HTMLDocument, MediaDocument, ImageDocument, etc.) to
instantiate by asking MediaPlayer if the given mime is playable.
However, a MSE media player can report supported MIME types which
cannot be played as bare file URLs, which leads to the DOMImplementation
creating a HTMLDocument for a non-playable media type.
Rather than calling all the way to MediaPlayer, DOMImplementation
should just use MIMETypeRegistry to decide which document type to
instantiate. In addition to being more correct, this may even speed
up document creation as it avoids a round-trip to the GPU process.
Test: media/iframe-load-html-as-m2ts.html
* LayoutTests/media/iframe-load-html-as-m2ts-expected.txt: Added.
* LayoutTests/media/iframe-load-html-as-m2ts.html: Added.
* Source/WebCore/dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):
*
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::getSupportedTypes):
Originally-landed-as: 305413.302@safari-7624-branch (ee94245e338e).
rdar://173969060
Canonical link: https://commits.webkit.org/312373@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications