Bindings: Require value for extended attributes EnabledAtRuntime and EnabledForWorld
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 May 2017 21:35:31 +0000 (21:35 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 May 2017 21:35:31 +0000 (21:35 +0000)
commitdf91e82d136d0fb3489a5eae338dcbc903bd7106
tree9fae66ee560e81ef07f2220ab069a1c416ff66b3
parentf2cf16cb8a4d9e5e6df905eb3f4b729638268545
Bindings: Require value for extended attributes EnabledAtRuntime and EnabledForWorld
https://bugs.webkit.org/show_bug.cgi?id=172252

Reviewed by Sam Weinig.

According to Sam Weinig it is an anti-feature that EnabledAtRuntime can be specified
without a value. We should make it require a value for the name of the RuntimeEnabledFeatures
function to use in the generated code. For similar reasons we should also require
a value for the extended attribute EnabledForWorld.

* Modules/websockets/WebSocket.idl: Substitute EnabledAtRuntime=WebSocket for EnabledAtRuntime.
* bindings/scripts/CodeGeneratorJS.pm:
(GetRuntimeEnableFunctionName):
* html/HTMLAudioElement.idl: Substitute EnabledAtRuntime=Audio for EnabledAtRuntime.
* page/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::audioEnabled):
(WebCore::RuntimeEnabledFeatures::htmlAudioElementEnabled): Deleted. This function duplicated
the functionality of RuntimeEnabledFeatures::audioEnabled(). Instead we explicitly
write EnabledAtRuntime=Audio in HTMLAudioElement.idl to use RuntimeEnabledFeatures::audioEnabled()
to determine whether to expose/conceal the HTMLAudioElement global constructor at runtime.
* page/RuntimeEnabledFeatures.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@217066 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Modules/websockets/WebSocket.idl
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/html/HTMLAudioElement.idl
Source/WebCore/page/RuntimeEnabledFeatures.cpp
Source/WebCore/page/RuntimeEnabledFeatures.h