Diff
Modified: trunk/LayoutTests/ChangeLog (264733 => 264734)
--- trunk/LayoutTests/ChangeLog 2020-07-22 23:38:57 UTC (rev 264733)
+++ trunk/LayoutTests/ChangeLog 2020-07-22 23:52:48 UTC (rev 264734)
@@ -1,3 +1,21 @@
+2020-07-22 Eric Carlson <eric.carl...@apple.com>
+
+ [Cocoa] canPlayType with 'codecs' parameter should never return "maybe"
+ https://bugs.webkit.org/show_bug.cgi?id=214621
+ <rdar://problem/65146785>
+
+ Reviewed by Jer Noble.
+
+ * media/media-can-play-av1-expected.txt:
+ * media/media-can-play-av1.html:
+ * media/vp9.html:
+ * platform/ios/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/mime-types/canPlayType-expected.txt: Added.
+ * platform/ios/media/media-can-play-av1-expected.txt: Removed.
+ * platform/ios/media/media-can-play-wav-audio-expected.txt: Copied from LayoutTests/platform/mac/media/media-can-play-wav-audio-expected.txt.
+ * platform/mac/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/mime-types/canPlayType-expected.txt: Added.
+ * platform/mac/media/media-can-play-av1-expected.txt: Removed.
+ * platform/mac/media/media-can-play-wav-audio-expected.txt:
+
2020-07-22 Kenneth Russell <k...@chromium.org>
[WebGL2] Implement multiple render target entry points
Modified: trunk/LayoutTests/media/media-can-play-av1-expected.txt (264733 => 264734)
--- trunk/LayoutTests/media/media-can-play-av1-expected.txt 2020-07-22 23:38:57 UTC (rev 264733)
+++ trunk/LayoutTests/media/media-can-play-av1-expected.txt 2020-07-22 23:52:48 UTC (rev 264734)
@@ -5,7 +5,7 @@
EXPECTED (video.canPlayType('video/mp4; codecs=av1') == '') OK
EXPECTED (video.canPlayType('video/webm; codecs=av1') == '') OK
-EXPECTED (video.canPlayType('video/mp4; codecs=av01.0.04M.08') == 'probably') OK
-EXPECTED (video.canPlayType('video/webm; codecs=av01.0.04M.08') == 'probably') OK
+EXPECTED (video.canPlayType('video/mp4; codecs=av01.0.04M.08') == '') OK
+EXPECTED (video.canPlayType('video/webm; codecs=av01.0.04M.08') == '') OK
END OF TEST
Modified: trunk/LayoutTests/media/media-can-play-av1.html (264733 => 264734)
--- trunk/LayoutTests/media/media-can-play-av1.html 2020-07-22 23:38:57 UTC (rev 264733)
+++ trunk/LayoutTests/media/media-can-play-av1.html 2020-07-22 23:52:48 UTC (rev 264734)
@@ -9,8 +9,8 @@
testExpected("video.canPlayType('video/mp4; codecs=av1')", "");
testExpected("video.canPlayType('video/webm; codecs=av1')", "");
- testExpected("video.canPlayType('video/mp4; codecs=av01.0.04M.08')", "probably");
- testExpected("video.canPlayType('video/webm; codecs=av01.0.04M.08')", "probably");
+ testExpected("video.canPlayType('video/mp4; codecs=av01.0.04M.08')", "");
+ testExpected("video.canPlayType('video/webm; codecs=av01.0.04M.08')", "");
endTest();
}
Modified: trunk/LayoutTests/media/vp9.html (264733 => 264734)
--- trunk/LayoutTests/media/vp9.html 2020-07-22 23:38:57 UTC (rev 264733)
+++ trunk/LayoutTests/media/vp9.html 2020-07-22 23:52:48 UTC (rev 264734)
@@ -7,7 +7,7 @@
// FIXME: Add test for MediaSource.isTypeSupported("video/mp4; codecs=vp9")
test(() => {
- assert_equals(video.canPlayType("video/mp4; codecs=vp9"), "maybe", "canPlayType");
+ assert_equals(video.canPlayType("video/mp4; codecs=vp9"), "", "canPlayType");
}, "HTMLMediaElement.canPlay VP9");
promise_test(async() => {
Added: trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/mime-types/canPlayType-expected.txt (0 => 264734)
--- trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/mime-types/canPlayType-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/mime-types/canPlayType-expected.txt 2020-07-22 23:52:48 UTC (rev 264734)
@@ -0,0 +1,62 @@
+
+
+PASS utility code
+PASS application/octet-stream not supported
+PASS fictional formats and codecs not supported
+PASS audio/mp4 (optional)
+PASS audio/mp4; codecs="mp4a.40.2" (optional)
+PASS audio/mp4 with bogus codec
+PASS audio/mp4 with and without codecs
+FAIL audio/ogg (optional) assert_equals: audio/ogg expected "maybe" but got ""
+FAIL audio/ogg; codecs="opus" (optional) assert_equals: audio/ogg; codecs="opus" expected "probably" but got ""
+FAIL audio/ogg; codecs="vorbis" (optional) assert_equals: audio/ogg; codecs="vorbis" expected "probably" but got ""
+PASS audio/ogg with bogus codec
+PASS audio/ogg with and without codecs
+PASS audio/wav (optional)
+FAIL audio/wav; codecs="1" (optional) assert_equals: audio/wav; codecs="1" expected "probably" but got ""
+PASS audio/wav with bogus codec
+FAIL audio/wav with and without codecs assert_equals: expected false but got true
+FAIL audio/webm (optional) assert_equals: audio/webm expected "maybe" but got ""
+FAIL audio/webm; codecs="opus" (optional) assert_equals: audio/webm; codecs="opus" expected "probably" but got ""
+FAIL audio/webm; codecs="vorbis" (optional) assert_equals: audio/webm; codecs="vorbis" expected "probably" but got ""
+PASS audio/webm with bogus codec
+PASS audio/webm with and without codecs
+PASS video/3gpp (optional)
+PASS video/3gpp; codecs="samr" (optional)
+PASS video/3gpp; codecs="mp4v.20.8" (optional)
+PASS video/3gpp codecs subset
+PASS video/3gpp codecs order
+PASS video/3gpp with bogus codec
+PASS video/3gpp with and without codecs
+PASS video/mp4 (optional)
+PASS video/mp4; codecs="mp4a.40.2" (optional)
+PASS video/mp4; codecs="avc1.42E01E" (optional)
+PASS video/mp4; codecs="avc1.4D401E" (optional)
+PASS video/mp4; codecs="avc1.58A01E" (optional)
+PASS video/mp4; codecs="avc1.64001E" (optional)
+PASS video/mp4; codecs="mp4v.20.8" (optional)
+PASS video/mp4; codecs="mp4v.20.240" (optional)
+PASS video/mp4 codecs subset
+PASS video/mp4 codecs order
+PASS video/mp4 with bogus codec
+PASS video/mp4 with and without codecs
+FAIL video/ogg (optional) assert_equals: video/ogg expected "maybe" but got ""
+FAIL video/ogg; codecs="opus" (optional) assert_equals: video/ogg; codecs="opus" expected "probably" but got ""
+FAIL video/ogg; codecs="vorbis" (optional) assert_equals: video/ogg; codecs="vorbis" expected "probably" but got ""
+FAIL video/ogg; codecs="theora" (optional) assert_equals: video/ogg; codecs="theora" expected "probably" but got ""
+PASS video/ogg codecs subset
+PASS video/ogg codecs order
+PASS video/ogg with bogus codec
+PASS video/ogg with and without codecs
+FAIL video/webm (optional) assert_equals: video/webm expected "maybe" but got ""
+FAIL video/webm; codecs="opus" (optional) assert_equals: video/webm; codecs="opus" expected "probably" but got ""
+FAIL video/webm; codecs="vorbis" (optional) assert_equals: video/webm; codecs="vorbis" expected "probably" but got ""
+FAIL video/webm; codecs="vp8" (optional) assert_equals: video/webm; codecs="vp8" expected "probably" but got ""
+FAIL video/webm; codecs="vp8.0" (optional) assert_equals: video/webm; codecs="vp8.0" expected "probably" but got ""
+FAIL video/webm; codecs="vp9" (optional) assert_equals: video/webm; codecs="vp9" expected "probably" but got ""
+FAIL video/webm; codecs="vp9.0" (optional) assert_equals: video/webm; codecs="vp9.0" expected "probably" but got ""
+PASS video/webm codecs subset
+PASS video/webm codecs order
+PASS video/webm with bogus codec
+PASS video/webm with and without codecs
+
Deleted: trunk/LayoutTests/platform/ios/media/media-can-play-av1-expected.txt (264733 => 264734)
--- trunk/LayoutTests/platform/ios/media/media-can-play-av1-expected.txt 2020-07-22 23:38:57 UTC (rev 264733)
+++ trunk/LayoutTests/platform/ios/media/media-can-play-av1-expected.txt 2020-07-22 23:52:48 UTC (rev 264734)
@@ -1,11 +0,0 @@
-
-Test HTMLMediaElement canPlayType() method for the AV1 codec.
-
-These tests may be expected to fail if the WebKit port does not support the format.
-
-EXPECTED (video.canPlayType('video/mp4; codecs=av1') == ''), OBSERVED 'maybe' FAIL
-EXPECTED (video.canPlayType('video/webm; codecs=av1') == '') OK
-EXPECTED (video.canPlayType('video/mp4; codecs=av01.0.04M.08') == 'probably'), OBSERVED 'maybe' FAIL
-EXPECTED (video.canPlayType('video/webm; codecs=av01.0.04M.08') == 'probably'), OBSERVED '' FAIL
-END OF TEST
-
Copied: trunk/LayoutTests/platform/ios/media/media-can-play-wav-audio-expected.txt (from rev 264733, trunk/LayoutTests/platform/mac/media/media-can-play-wav-audio-expected.txt) (0 => 264734)
--- trunk/LayoutTests/platform/ios/media/media-can-play-wav-audio-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/ios/media/media-can-play-wav-audio-expected.txt 2020-07-22 23:52:48 UTC (rev 264734)
@@ -0,0 +1,13 @@
+
+Test HTMLMediaElement canPlayType() method with multiple .wav MIME types.
+
+These tests may be expected to fail if the WebKit port does not support the format.
+
+EXPECTED (audio.canPlayType('audio/wav') == 'maybe') OK
+EXPECTED (audio.canPlayType('audio/x-wav') == 'maybe') OK
+EXPECTED (audio.canPlayType('audio/vnd.wave') == 'maybe') OK
+EXPECTED (audio.canPlayType('audio/wav; codecs=1') == 'probably'), OBSERVED '' FAIL
+EXPECTED (audio.canPlayType('audio/x-wav; codecs=1') == 'probably'), OBSERVED '' FAIL
+EXPECTED (audio.canPlayType('audio/vnd.wave; codecs=1') == 'probably'), OBSERVED '' FAIL
+END OF TEST
+
Added: trunk/LayoutTests/platform/ios/media/video-source-type-params-expected.txt (0 => 264734)
--- trunk/LayoutTests/platform/ios/media/video-source-type-params-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/ios/media/video-source-type-params-expected.txt 2020-07-22 23:52:48 UTC (rev 264734)
@@ -0,0 +1,4 @@
+EVENT(loadstart)
+EXPECTED (stripExtension(relativeURL(video.currentSrc)) == 'content/test'), OBSERVED 'content/error2' FAIL
+END OF TEST
+
Added: trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/mime-types/canPlayType-expected.txt (0 => 264734)
--- trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/mime-types/canPlayType-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/mime-types/canPlayType-expected.txt 2020-07-22 23:52:48 UTC (rev 264734)
@@ -0,0 +1,62 @@
+
+
+PASS utility code
+PASS application/octet-stream not supported
+PASS fictional formats and codecs not supported
+PASS audio/mp4 (optional)
+PASS audio/mp4; codecs="mp4a.40.2" (optional)
+PASS audio/mp4 with bogus codec
+PASS audio/mp4 with and without codecs
+FAIL audio/ogg (optional) assert_equals: audio/ogg expected "maybe" but got ""
+FAIL audio/ogg; codecs="opus" (optional) assert_equals: audio/ogg; codecs="opus" expected "probably" but got ""
+FAIL audio/ogg; codecs="vorbis" (optional) assert_equals: audio/ogg; codecs="vorbis" expected "probably" but got ""
+PASS audio/ogg with bogus codec
+PASS audio/ogg with and without codecs
+PASS audio/wav (optional)
+FAIL audio/wav; codecs="1" (optional) assert_equals: audio/wav; codecs="1" expected "probably" but got ""
+PASS audio/wav with bogus codec
+FAIL audio/wav with and without codecs assert_equals: expected false but got true
+FAIL audio/webm (optional) assert_equals: audio/webm expected "maybe" but got ""
+FAIL audio/webm; codecs="opus" (optional) assert_equals: audio/webm; codecs="opus" expected "probably" but got ""
+FAIL audio/webm; codecs="vorbis" (optional) assert_equals: audio/webm; codecs="vorbis" expected "probably" but got ""
+PASS audio/webm with bogus codec
+PASS audio/webm with and without codecs
+PASS video/3gpp (optional)
+PASS video/3gpp; codecs="samr" (optional)
+PASS video/3gpp; codecs="mp4v.20.8" (optional)
+PASS video/3gpp codecs subset
+PASS video/3gpp codecs order
+PASS video/3gpp with bogus codec
+PASS video/3gpp with and without codecs
+PASS video/mp4 (optional)
+PASS video/mp4; codecs="mp4a.40.2" (optional)
+PASS video/mp4; codecs="avc1.42E01E" (optional)
+PASS video/mp4; codecs="avc1.4D401E" (optional)
+PASS video/mp4; codecs="avc1.58A01E" (optional)
+PASS video/mp4; codecs="avc1.64001E" (optional)
+PASS video/mp4; codecs="mp4v.20.8" (optional)
+PASS video/mp4; codecs="mp4v.20.240" (optional)
+PASS video/mp4 codecs subset
+PASS video/mp4 codecs order
+PASS video/mp4 with bogus codec
+PASS video/mp4 with and without codecs
+FAIL video/ogg (optional) assert_equals: video/ogg expected "maybe" but got ""
+FAIL video/ogg; codecs="opus" (optional) assert_equals: video/ogg; codecs="opus" expected "probably" but got ""
+FAIL video/ogg; codecs="vorbis" (optional) assert_equals: video/ogg; codecs="vorbis" expected "probably" but got ""
+FAIL video/ogg; codecs="theora" (optional) assert_equals: video/ogg; codecs="theora" expected "probably" but got ""
+PASS video/ogg codecs subset
+PASS video/ogg codecs order
+PASS video/ogg with bogus codec
+PASS video/ogg with and without codecs
+FAIL video/webm (optional) assert_equals: video/webm expected "maybe" but got ""
+FAIL video/webm; codecs="opus" (optional) assert_equals: video/webm; codecs="opus" expected "probably" but got ""
+FAIL video/webm; codecs="vorbis" (optional) assert_equals: video/webm; codecs="vorbis" expected "probably" but got ""
+FAIL video/webm; codecs="vp8" (optional) assert_equals: video/webm; codecs="vp8" expected "probably" but got ""
+FAIL video/webm; codecs="vp8.0" (optional) assert_equals: video/webm; codecs="vp8.0" expected "probably" but got ""
+FAIL video/webm; codecs="vp9" (optional) assert_equals: video/webm; codecs="vp9" expected "probably" but got ""
+FAIL video/webm; codecs="vp9.0" (optional) assert_equals: video/webm; codecs="vp9.0" expected "probably" but got ""
+PASS video/webm codecs subset
+PASS video/webm codecs order
+PASS video/webm with bogus codec
+PASS video/webm with and without codecs
+
Deleted: trunk/LayoutTests/platform/mac/media/media-can-play-av1-expected.txt (264733 => 264734)
--- trunk/LayoutTests/platform/mac/media/media-can-play-av1-expected.txt 2020-07-22 23:38:57 UTC (rev 264733)
+++ trunk/LayoutTests/platform/mac/media/media-can-play-av1-expected.txt 2020-07-22 23:52:48 UTC (rev 264734)
@@ -1,11 +0,0 @@
-
-Test HTMLMediaElement canPlayType() method for the AV1 codec.
-
-These tests may be expected to fail if the WebKit port does not support the format.
-
-EXPECTED (video.canPlayType('video/mp4; codecs=av1') == ''), OBSERVED 'maybe' FAIL
-EXPECTED (video.canPlayType('video/webm; codecs=av1') == '') OK
-EXPECTED (video.canPlayType('video/mp4; codecs=av01.0.04M.08') == 'probably'), OBSERVED 'maybe' FAIL
-EXPECTED (video.canPlayType('video/webm; codecs=av01.0.04M.08') == 'probably'), OBSERVED '' FAIL
-END OF TEST
-
Modified: trunk/LayoutTests/platform/mac/media/media-can-play-wav-audio-expected.txt (264733 => 264734)
--- trunk/LayoutTests/platform/mac/media/media-can-play-wav-audio-expected.txt 2020-07-22 23:38:57 UTC (rev 264733)
+++ trunk/LayoutTests/platform/mac/media/media-can-play-wav-audio-expected.txt 2020-07-22 23:52:48 UTC (rev 264734)
@@ -6,8 +6,8 @@
EXPECTED (audio.canPlayType('audio/wav') == 'maybe') OK
EXPECTED (audio.canPlayType('audio/x-wav') == 'maybe') OK
EXPECTED (audio.canPlayType('audio/vnd.wave') == 'maybe') OK
-EXPECTED (audio.canPlayType('audio/wav; codecs=1') == 'probably'), OBSERVED 'maybe' FAIL
-EXPECTED (audio.canPlayType('audio/x-wav; codecs=1') == 'probably'), OBSERVED 'maybe' FAIL
-EXPECTED (audio.canPlayType('audio/vnd.wave; codecs=1') == 'probably'), OBSERVED 'maybe' FAIL
+EXPECTED (audio.canPlayType('audio/wav; codecs=1') == 'probably'), OBSERVED '' FAIL
+EXPECTED (audio.canPlayType('audio/x-wav; codecs=1') == 'probably'), OBSERVED '' FAIL
+EXPECTED (audio.canPlayType('audio/vnd.wave; codecs=1') == 'probably'), OBSERVED '' FAIL
END OF TEST
Modified: trunk/Source/WebCore/ChangeLog (264733 => 264734)
--- trunk/Source/WebCore/ChangeLog 2020-07-22 23:38:57 UTC (rev 264733)
+++ trunk/Source/WebCore/ChangeLog 2020-07-22 23:52:48 UTC (rev 264734)
@@ -1,3 +1,16 @@
+2020-07-22 Eric Carlson <eric.carl...@apple.com>
+
+ [Cocoa] canPlayType with 'codecs' parameter should never return "maybe"
+ https://bugs.webkit.org/show_bug.cgi?id=214621
+ <rdar://problem/65146785>
+
+ Reviewed by Jer Noble.
+
+ No new tests, updated existing tests and results.
+
+ * platform/graphics/MIMETypeCache.cpp:
+ (WebCore::MIMETypeCache::canDecodeType):
+
2020-07-22 Kenneth Russell <k...@chromium.org>
[WebGL2] Implement multiple render target entry points
Modified: trunk/Source/WebCore/platform/graphics/MIMETypeCache.cpp (264733 => 264734)
--- trunk/Source/WebCore/platform/graphics/MIMETypeCache.cpp 2020-07-22 23:38:57 UTC (rev 264733)
+++ trunk/Source/WebCore/platform/graphics/MIMETypeCache.cpp 2020-07-22 23:52:48 UTC (rev 264734)
@@ -75,12 +75,14 @@
if (!supportsContainerType(containerType))
break;
- result = MediaPlayerEnums::SupportsType::MayBeSupported;
- if (contentType.codecs().isEmpty())
+ if (contentType.codecs().isEmpty()) {
+ result = MediaPlayerEnums::SupportsType::MayBeSupported;
break;
+ }
if (canDecodeExtendedType(contentType))
result = MediaPlayerEnums::SupportsType::IsSupported;
+
} while (0);
if (!m_cachedResults)