[WebIDL] Add support for conditionally read-write attributes
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Jun 2017 19:04:56 +0000 (19:04 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Jun 2017 19:04:56 +0000 (19:04 +0000)
commitaa89522a1396eed7871d66a52884f18dbd2a4d11
treef590fd0f7503d1bdb81c4e85ec078f19868c54ca
parent474ea42136c9a3267550b93eb614edb4a7212c51
[WebIDL] Add support for conditionally read-write attributes
https://bugs.webkit.org/show_bug.cgi?id=173993

Patch by Sam Weinig <sam@webkit.org> on 2017-06-30
Reviewed by Alex Christensen.

The MEDIA_SOURCE feature/conditional requires changing a few readonly
attributes into read-write attributes. In the past we handled this with
custom bindings. This patch adds a new extended attribute, ConditionallyReadWrite
which achieves the same result.

* WebCore.xcodeproj/project.pbxproj:
Move a few custom binding to the "GC / Wrapping Only" group.

* bindings/js/JSAudioTrackCustom.cpp:
(WebCore::JSAudioTrack::setKind): Deleted.
(WebCore::JSAudioTrack::setLanguage): Deleted.
* bindings/js/JSTextTrackCustom.cpp:
(WebCore::JSTextTrack::setLanguage): Deleted.
* bindings/js/JSVideoTrackCustom.cpp:
(WebCore::JSVideoTrack::setKind): Deleted.
(WebCore::JSVideoTrack::setLanguage): Deleted.
Remove no longer needed custom bindings.

* bindings/scripts/CodeGeneratorJS.pm:
(GeneratePropertiesHashTable):
(GenerateImplementation):
(GenerateAttributeSetterDefinition):
(GenerateCallbackImplementationContent):
(GenerateHashTableValueArray):
(GenerateHashTable):
Pipe ConditionallyReadWrite through the generator.

* bindings/scripts/IDLAttributes.json:
Add ConditionallyReadWrite.

* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/TestObj.idl:
Add tests for ConditionallyReadWrite.

* html/track/AudioTrack.idl:
* html/track/TextTrack.idl:
* html/track/VideoTrack.idl:
Replace [Custom] with [ConditionallyReadWrite].

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219007 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSAudioTrackCustom.cpp
Source/WebCore/bindings/js/JSTextTrackCustom.cpp
Source/WebCore/bindings/js/JSVideoTrackCustom.cpp
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/IDLAttributes.json
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
Source/WebCore/bindings/scripts/test/TestObj.idl
Source/WebCore/html/track/AudioTrack.idl
Source/WebCore/html/track/TextTrack.idl
Source/WebCore/html/track/VideoTrack.idl