Title: [237655] trunk
- Revision
- 237655
- Author
- jer.no...@apple.com
- Date
- 2018-10-31 14:52:07 -0700 (Wed, 31 Oct 2018)
Log Message
MediaSource.isTypeSupported('video/mp4; codecs="hvc1.1.6.L60.B0') is inproperly rejected
https://bugs.webkit.org/show_bug.cgi?id=191129
Reviewed by Eric Carlson.
Source/WebCore:
Test: media/media-source/media-source-istypesupported-case-sensitive.html
According to RFC 2045: "All media type values, subtype values, and parameter names as
defined are case-insensitive. However, parameter values are case-sensitive unless otherwise
specified for the specific parameter." So rather than fold the entire ContentType into lower-
case, leave the original string intact and require clients to enforce case-insensitivity.
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::isTypeSupported):
LayoutTests:
* media/media-source/media-source-istypesupported-case-sensitive-expected.txt: Added.
* media/media-source/media-source-istypesupported-case-sensitive.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (237654 => 237655)
--- trunk/LayoutTests/ChangeLog 2018-10-31 21:51:20 UTC (rev 237654)
+++ trunk/LayoutTests/ChangeLog 2018-10-31 21:52:07 UTC (rev 237655)
@@ -1,3 +1,13 @@
+2018-10-31 Jer Noble <jer.no...@apple.com>
+
+ MediaSource.isTypeSupported('video/mp4; codecs="hvc1.1.6.L60.B0') is inproperly rejected
+ https://bugs.webkit.org/show_bug.cgi?id=191129
+
+ Reviewed by Eric Carlson.
+
+ * media/media-source/media-source-istypesupported-case-sensitive-expected.txt: Added.
+ * media/media-source/media-source-istypesupported-case-sensitive.html: Added.
+
2018-10-31 Alicia Boya GarcĂa <ab...@igalia.com>
[MSE] WebKit tests: Use fixed point in makeASample()
Added: trunk/LayoutTests/media/media-source/media-source-istypesupported-case-sensitive-expected.txt (0 => 237655)
--- trunk/LayoutTests/media/media-source/media-source-istypesupported-case-sensitive-expected.txt (rev 0)
+++ trunk/LayoutTests/media/media-source/media-source-istypesupported-case-sensitive-expected.txt 2018-10-31 21:52:07 UTC (rev 237655)
@@ -0,0 +1,7 @@
+
+EXPECTED (MediaSource.isTypeSupported("video/mock; codecs=mock") == 'true') OK
+EXPECTED (MediaSource.isTypeSupported("video/MOCK; codecs=mock") == 'true') OK
+EXPECTED (MediaSource.isTypeSupported("video/mock; codecs=MOCK") == 'false') OK
+EXPECTED (MediaSource.isTypeSupported("video/MOCK; codecs=MOCK") == 'false') OK
+END OF TEST
+
Added: trunk/LayoutTests/media/media-source/media-source-istypesupported-case-sensitive.html (0 => 237655)
--- trunk/LayoutTests/media/media-source/media-source-istypesupported-case-sensitive.html (rev 0)
+++ trunk/LayoutTests/media/media-source/media-source-istypesupported-case-sensitive.html 2018-10-31 21:52:07 UTC (rev 237655)
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>mock-media-source</title>
+ <script src=""
+ <script src=""
+ <script>
+ var source;
+ var sourceBuffer;
+
+ if (window.internals)
+ internals.initializeMockMediaSource();
+
+ function runTest() {
+ findMediaElement();
+
+ source = new MediaSource();
+ testExpected('MediaSource.isTypeSupported("video/mock; codecs=mock")', true);
+ testExpected('MediaSource.isTypeSupported("video/MOCK; codecs=mock")', true);
+ testExpected('MediaSource.isTypeSupported("video/mock; codecs=MOCK")', false);
+ testExpected('MediaSource.isTypeSupported("video/MOCK; codecs=MOCK")', false);
+ endTest();
+ }
+
+ </script>
+</head>
+<body _onload_="runTest()">
+ <video></video>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (237654 => 237655)
--- trunk/Source/WebCore/ChangeLog 2018-10-31 21:51:20 UTC (rev 237654)
+++ trunk/Source/WebCore/ChangeLog 2018-10-31 21:52:07 UTC (rev 237655)
@@ -1,5 +1,22 @@
2018-10-31 Jer Noble <jer.no...@apple.com>
+ MediaSource.isTypeSupported('video/mp4; codecs="hvc1.1.6.L60.B0') is inproperly rejected
+ https://bugs.webkit.org/show_bug.cgi?id=191129
+
+ Reviewed by Eric Carlson.
+
+ Test: media/media-source/media-source-istypesupported-case-sensitive.html
+
+ According to RFC 2045: "All media type values, subtype values, and parameter names as
+ defined are case-insensitive. However, parameter values are case-sensitive unless otherwise
+ specified for the specific parameter." So rather than fold the entire ContentType into lower-
+ case, leave the original string intact and require clients to enforce case-insensitivity.
+
+ * Modules/mediasource/MediaSource.cpp:
+ (WebCore::MediaSource::isTypeSupported):
+
+2018-10-31 Jer Noble <jer.no...@apple.com>
+
Unreivewed build fix; fix the non-HAVE_AVCONTENTKEYSESSION builds by adding guards around
access of m_cdmInstance.
Modified: trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp (237654 => 237655)
--- trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp 2018-10-31 21:51:20 UTC (rev 237654)
+++ trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp 2018-10-31 21:52:07 UTC (rev 237655)
@@ -843,8 +843,7 @@
if (type.isNull() || type.isEmpty())
return false;
- // FIXME: Why do we convert to lowercase here, but not in MediaSource::addSourceBuffer?
- ContentType contentType(type.convertToASCIILowercase());
+ ContentType contentType(type);
String codecs = contentType.parameter("codecs");
// 2. If type does not contain a valid MIME type string, then return false.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes