Add a quirk to disable Modern EME for sites which are broken with it enabled
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Oct 2018 00:50:46 +0000 (00:50 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Oct 2018 00:50:46 +0000 (00:50 +0000)
commit6cc30693b319255510e4b6bf0ef39f2170421923
tree739cfe2c3d8041c4f4b2c5ce6f67b1fa79f7234a
parentebb1b67d0909c8813efcdf368607ebecaeda207d
Add a quirk to disable Modern EME for sites which are broken with it enabled
https://bugs.webkit.org/show_bug.cgi?id=190051

Reviewed by Daniel Bates.

Add a new class, parallel to Settings, to track quirk behavior. Extend the bindings
generator to support a DisabledByQuirk attribute, and set this attribute for all
the Modern EME types. Check whether the quirk is set inside HTMLMediaElement in
addition to the existing Setting.

* Modules/encryptedmedia/MediaKeyMessageEvent.idl:
* Modules/encryptedmedia/MediaKeySession.idl:
* Modules/encryptedmedia/MediaKeyStatusMap.idl:
* Modules/encryptedmedia/MediaKeySystemAccess.idl:
* Modules/encryptedmedia/MediaKeys.idl:
* Modules/encryptedmedia/NavigatorEME.idl:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGenerator.pm:
(WK_ucfirst):
* bindings/scripts/CodeGeneratorJS.pm:
(NeedsRuntimeCheck):
(GenerateRuntimeEnableConditionalString):
* bindings/scripts/IDLAttributes.json:
* bindings/scripts/preprocess-idls.pl:
(GenerateConstructorAttributes):
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
(WebCore::Document::quirks const):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
(WebCore::HTMLMediaElement::mediaPlayerInitializationDataEncountered):
* html/HTMLMediaElement.idl:
* page/Quirks.cpp: Added.
(Quirks::Quirks):
(Quirks::disableEncryptedMediaAPIQuirk const):
* page/Quirks.h: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236818 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.idl
Source/WebCore/Modules/encryptedmedia/MediaKeySession.idl
Source/WebCore/Modules/encryptedmedia/MediaKeyStatusMap.idl
Source/WebCore/Modules/encryptedmedia/MediaKeySystemAccess.idl
Source/WebCore/Modules/encryptedmedia/MediaKeys.idl
Source/WebCore/Modules/encryptedmedia/NavigatorEME.idl
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/IDLAttributes.json
Source/WebCore/bindings/scripts/preprocess-idls.pl
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.idl
Source/WebCore/html/MediaEncryptedEvent.idl
Source/WebCore/page/Quirks.cpp [new file with mode: 0644]
Source/WebCore/page/Quirks.h [new file with mode: 0644]
Source/WebCore/page/csp/ContentSecurityPolicySource.cpp