[WebIDL] Add support for having dictionaries in their own IDL file
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Oct 2016 20:22:16 +0000 (20:22 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Oct 2016 20:22:16 +0000 (20:22 +0000)
commit3aa99c673017229fee7c586b24da634dc605eda4
treec7ece480cd03730c5734a5cb718d58feb6e1c8a7
parent637242c946a2ff4f6a32263ba4ffaa8e7d5f9365
[WebIDL] Add support for having dictionaries in their own IDL file
https://bugs.webkit.org/show_bug.cgi?id=162912

Reviewed by Darin Adler.

Add support for having dictionaries in their own IDL file so that they
can be shared by multiple interfaces.

Leverage this new support to merge Element::ScrollToOptions and
DOMWindow::ScrollToOptions.

No new tests, extended bindings tests.

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGenerator.pm:
(ProcessDocument):
(IDLFileForInterface):
(GetDictionaryByName):
(IsDictionaryType):
(HasEnumImplementationNameOverride): Deleted.
(GetEnumImplementationNameOverride): Deleted.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateDictionary):
(GetEnumerationClassName):
(GenerateEnumerationImplementationContent):
(GenerateEnumerationHeaderContent):
(GetDictionaryClassName):
(GenerateDefaultValue):
(GenerateDictionaryHeaderContent):
(GenerateDictionariesHeaderContent):
(GenerateDictionaryImplementationContent):
(GenerateDictionariesImplementationContent):
(GenerateHeader):
(GenerateImplementation):
(GenerateParametersCheck):
(GenerateDictionaryHeader):
(GenerateDictionaryImplementation):
(GenerateCallbackHeader):
(GenerateCallbackImplementation):
(GetNativeType):
(JSValueToNative):
(GetNestedClassName): Deleted.
(GenerateConversionRuleWithLeadingComma): Deleted.
(addIterableProperties): Deleted.
* bindings/scripts/preprocess-idls.pl:
(containsInterfaceOrExceptionFromIDL):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionOperationWithExternalDictionaryParameter):
(WebCore::jsTestObjPrototypeFunctionAttachShadowRoot): Deleted.
* bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp: Added.
(WebCore::convertDictionary<TestStandaloneDictionary>):
* bindings/scripts/test/JS/JSTestStandaloneDictionary.h: Added.
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/TestStandaloneDictionary.idl: Added.
* dom/Element.h:
* dom/Element.idl:
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::scrollTo):
* page/DOMWindow.h:
* page/DOMWindow.idl:
* page/ScrollToOptions.h: Added.
* page/ScrollToOptions.idl: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.cpp
Source/WebCore/DerivedSources.make
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/scripts/CodeGenerator.pm
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/preprocess-idls.pl
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp [new file with mode: 0644]
Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.h [new file with mode: 0644]
Source/WebCore/bindings/scripts/test/TestObj.idl
Source/WebCore/bindings/scripts/test/TestStandaloneDictionary.idl [new file with mode: 0644]
Source/WebCore/dom/Element.h
Source/WebCore/dom/Element.idl
Source/WebCore/html/HTMLBodyElement.cpp
Source/WebCore/page/DOMWindow.h
Source/WebCore/page/DOMWindow.idl
Source/WebCore/page/ScrollToOptions.h [new file with mode: 0644]
Source/WebCore/page/ScrollToOptions.idl [new file with mode: 0644]