haikuwebkit/Source/WebCore/css/DocumentOrShadowRoot+CSSOM.idl

31 lines
1.5 KiB
Plaintext
Raw Permalink Normal View History

[WebIDL] Add support for partial interface mixins https://bugs.webkit.org/show_bug.cgi?id=216255 Reviewed by Darin Adler. Add support for WebIDL 'partial interface mixins' and adopt them for a few supplements of the DocumentOrShadowRoot mixin. * CMakeLists.txt: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * dom/DocumentOrShadowRoot.idl: * css/DocumentOrShadowRootStyleSheets.idl: Added. * dom/DocumentOrShadowRootPointerLock.idl: Added. * Modules/pictureinpicture/DocumentOrShadowRootPictureInPicture.idl: Added. * animation/DocumentOrShadowRootAnimations.idl: Added. Add new split-out IDLs. * bindings/scripts/CodeGenerator.pm: (GenerateEmptyHeaderAndCpp): Move empty file generation here (from generate-bindings.pl), allowing for a simplified compilation model, where all IDLs given to generate-bindings.pl now instantiate the CodeGenerator and it is the CodeGenerators job to figure out if the file needs anything generated. This allows the dependencies file to get out of the business of indicating that an IDL doesn't need generation, and stick to just listing dependencies. This is important now that dependencies like interface mixins can now have depencies of their own, partial interface mixins. (ProcessInterfaces): (ProcessDictionaries): Move logic to avoid generation of mixins and partials here. (ProcessInterfaceSupplementalDependencies): Support recursively processing supplemental dependencies for partial interface mixins. Ensure that we don't evaluate exposure when doing this, as that should only happen on the final interface. (shouldPropertyBeExposed): Move all logic for exposure here, rather than splitting it up between here and ProcessInterfaceSupplementalDependencies/ProcessDictionarySupplementalDependencies * bindings/scripts/generate-bindings.pl: (generateBindings): (generateEmptyHeaderAndCpp): Deleted. Remove support for unused additionalIdlFiles option and simplify things by having CodeGenerator work out whether it should generate an empty set of files based on the files themselves rather than inferring it from the dependency information. * bindings/scripts/preprocess-idls.pl: (getPartialNamesFromIDL): Add support for properly parsing partial interface mixins and stop disallowing dependencies, like a mixin interface, from having its own dependences. * bindings/scripts/test/JS/JSTestConditionalIncludes.cpp: * bindings/scripts/test/JS/JSTestConditionalIncludes.h: * bindings/scripts/test/JS/JSTestIncludes.cpp: Removed. * bindings/scripts/test/JS/JSTestIncludes.h: Removed. * bindings/scripts/test/JS/JSTestInterface.cpp: * bindings/scripts/test/JS/JSTestInterface.h: * bindings/scripts/test/JS/JSTestMixinInterface.cpp: Added. * bindings/scripts/test/JS/JSTestMixinInterface.h: Added. * bindings/scripts/test/JS/JSTestPartialMixinInterface.cpp: Added. * bindings/scripts/test/JS/JSTestPartialMixinInterface.h: Added. * bindings/scripts/test/SupplementalDependencies.dep: * bindings/scripts/test/TestConditionalIncludes.idl: * bindings/scripts/test/TestIncludes.idl: Removed. * bindings/scripts/test/TestInterface.idl: * bindings/scripts/test/TestMixinInterface.idl: Added. * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/TestPartialMixinInterface.idl: Added. Rename TestIncludes to TestMixinInterface (since that is what it is testing) and add TestPartialMixinInterface to test partial interface mixins. Canonical link: https://commits.webkit.org/229118@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-08 21:46:10 +00:00
/*
* Copyright (C) 2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
// https://drafts.csswg.org/cssom/#extensions-to-the-document-or-shadow-root-interface
partial interface mixin DocumentOrShadowRoot {
[SameObject] readonly attribute StyleSheetList styleSheets;
[WebIDL] Add support for partial interface mixins https://bugs.webkit.org/show_bug.cgi?id=216255 Reviewed by Darin Adler. Add support for WebIDL 'partial interface mixins' and adopt them for a few supplements of the DocumentOrShadowRoot mixin. * CMakeLists.txt: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * dom/DocumentOrShadowRoot.idl: * css/DocumentOrShadowRootStyleSheets.idl: Added. * dom/DocumentOrShadowRootPointerLock.idl: Added. * Modules/pictureinpicture/DocumentOrShadowRootPictureInPicture.idl: Added. * animation/DocumentOrShadowRootAnimations.idl: Added. Add new split-out IDLs. * bindings/scripts/CodeGenerator.pm: (GenerateEmptyHeaderAndCpp): Move empty file generation here (from generate-bindings.pl), allowing for a simplified compilation model, where all IDLs given to generate-bindings.pl now instantiate the CodeGenerator and it is the CodeGenerators job to figure out if the file needs anything generated. This allows the dependencies file to get out of the business of indicating that an IDL doesn't need generation, and stick to just listing dependencies. This is important now that dependencies like interface mixins can now have depencies of their own, partial interface mixins. (ProcessInterfaces): (ProcessDictionaries): Move logic to avoid generation of mixins and partials here. (ProcessInterfaceSupplementalDependencies): Support recursively processing supplemental dependencies for partial interface mixins. Ensure that we don't evaluate exposure when doing this, as that should only happen on the final interface. (shouldPropertyBeExposed): Move all logic for exposure here, rather than splitting it up between here and ProcessInterfaceSupplementalDependencies/ProcessDictionarySupplementalDependencies * bindings/scripts/generate-bindings.pl: (generateBindings): (generateEmptyHeaderAndCpp): Deleted. Remove support for unused additionalIdlFiles option and simplify things by having CodeGenerator work out whether it should generate an empty set of files based on the files themselves rather than inferring it from the dependency information. * bindings/scripts/preprocess-idls.pl: (getPartialNamesFromIDL): Add support for properly parsing partial interface mixins and stop disallowing dependencies, like a mixin interface, from having its own dependences. * bindings/scripts/test/JS/JSTestConditionalIncludes.cpp: * bindings/scripts/test/JS/JSTestConditionalIncludes.h: * bindings/scripts/test/JS/JSTestIncludes.cpp: Removed. * bindings/scripts/test/JS/JSTestIncludes.h: Removed. * bindings/scripts/test/JS/JSTestInterface.cpp: * bindings/scripts/test/JS/JSTestInterface.h: * bindings/scripts/test/JS/JSTestMixinInterface.cpp: Added. * bindings/scripts/test/JS/JSTestMixinInterface.h: Added. * bindings/scripts/test/JS/JSTestPartialMixinInterface.cpp: Added. * bindings/scripts/test/JS/JSTestPartialMixinInterface.h: Added. * bindings/scripts/test/SupplementalDependencies.dep: * bindings/scripts/test/TestConditionalIncludes.idl: * bindings/scripts/test/TestIncludes.idl: Removed. * bindings/scripts/test/TestInterface.idl: * bindings/scripts/test/TestMixinInterface.idl: Added. * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/TestPartialMixinInterface.idl: Added. Rename TestIncludes to TestMixinInterface (since that is what it is testing) and add TestPartialMixinInterface to test partial interface mixins. Canonical link: https://commits.webkit.org/229118@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-08 21:46:10 +00:00
};