Chromium Code Reviews| Index: third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp |
| diff --git a/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp b/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp |
| index b85a831cd86bb46dab197716abd4f166b1a3a6c3..b2109156bbd1bb5bc8099062a7d2e7b4cd7b5654 100644 |
| --- a/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp |
| +++ b/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp |
| @@ -53,10 +53,13 @@ static WebVector<WebMediaKeySystemMediaCapability> convertCapabilities( |
| result[i].contentType = contentType; |
| ParsedContentType type(contentType); |
| if (type.isValid()) { |
| - // FIXME: Fail if there are unrecognized parameters. |
| - // http://crbug.com/690131 |
| + // Fail if there are unrecognized parameters. There is no way to |
|
xhwang
2017/03/03 23:20:58
"Fail" isn't accurate since we just skip it..
xhwang
2017/03/03 23:20:58
Please quote the spec here:
"If the user agent do
jrummell
2017/03/04 00:48:25
Removed.
jrummell
2017/03/04 00:48:26
Done.
|
| + // enumerate the parameters, so only look up "codecs" if a single |
| + // parameter is available. Chromium expects "codecs" to be valid, so |
|
xhwang
2017/03/03 23:20:58
ooc, what if we have two "codecs" parameters?
jrummell
2017/03/04 00:48:25
ParsedContentType only returns the last one, so it
|
| + // this capability will fail if codecs not the only parameter specified. |
|
xhwang
2017/03/03 23:20:58
again, s/fail/skip, also s/not/is not/
jrummell
2017/03/04 00:48:25
Done.
|
| result[i].mimeType = type.mimeType(); |
| - result[i].codecs = type.parameterValueForName("codecs"); |
| + if (type.parameterCount() == 1u) |
| + result[i].codecs = type.parameterValueForName("codecs"); |
| } |
| result[i].robustness = capabilities[i].robustness(); |
| } |