Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: f862b9eefaacaacf7664bacad44054a4d3ff1533 https://github.com/WebKit/WebKit/commit/f862b9eefaacaacf7664bacad44054a4d3ff1533 Author: Timothy Hatcher <timo...@apple.com> Date: 2025-09-13 (Sat, 13 Sep 2025)
Changed paths: M Source/WebCore/bindings/scripts/CodeGenerator.pm M Source/WebCore/bindings/scripts/CodeGeneratorJS.pm M Source/WebCore/bindings/scripts/test/DOMWindowConstructors.idl M Source/WebCore/bindings/scripts/test/JS/JSDOMWindow.cpp A Source/WebCore/bindings/scripts/test/JS/JSTestConditional.cpp A Source/WebCore/bindings/scripts/test/JS/JSTestConditional.h M Source/WebCore/bindings/scripts/test/SupplementalDependencies.dep A Source/WebCore/bindings/scripts/test/TestConditional.idl Log Message: ----------- Add support for ! in Conditional IDL attributes. https://webkit.org/b/298793 Reviewed by Darin Adler and Brian Weinstein. This change allows `Conditional` attribute values in IDL files to be prefixed with `!`, which outputs a negated form of `ENABLE()`. Because `!` is not a valid character in IDL attribute values, the value must be wrapped in quotes when used. Bare conditionals continue to work as before, maintaining compatibility with existing IDL files. Example: [Conditional="!FEATURE_FLAG"] readonly attribute double someName; Cleaned up the function to use more idiomatic Perl with proper use of map. * Source/WebCore/bindings/scripts/CodeGenerator.pm: (GenerateConditionalStringFromAttributeValue): * Source/WebCore/bindings/scripts/CodeGeneratorJS.pm: (AddToIncludes): * Source/WebCore/bindings/scripts/test/DOMWindowConstructors.idl: * Source/WebCore/bindings/scripts/test/JS/JSDOMWindow.cpp: (WebCore::JSDOMWindowDOMConstructor::prototypeForStructure): (WebCore::JSC_DEFINE_CUSTOM_GETTER): (WebCore::jsDOMWindow_TestConditionalConstructorGetter): * Source/WebCore/bindings/scripts/test/JS/JSTestConditional.cpp: Added. (WebCore::JSTestConditionalDOMConstructor::prototypeForStructure): (WebCore::JSTestConditionalDOMConstructor::initializeProperties): (WebCore::JSTestConditionalPrototype::finishCreation): (WebCore::JSTestConditional::JSTestConditional): (WebCore::JSTestConditional::createPrototype): (WebCore::JSTestConditional::prototype): (WebCore::JSTestConditional::getConstructor): (WebCore::JSTestConditional::destroy): (WebCore::JSC_DEFINE_CUSTOM_GETTER): (WebCore::jsTestConditional_fooEnabledGetter): (WebCore::jsTestConditional_fooDisabledGetter): (WebCore::jsTestConditional_barOrBazEnabledGetter): (WebCore::jsTestConditional_fooEnabledOrBarDisabledGetter): (WebCore::jsTestConditional_fooOrBarBothDisabledGetter): (WebCore::jsTestConditional_fooAndBarEnabledGetter): (WebCore::jsTestConditional_fooAndBarDisabledGetter): (WebCore::jsTestConditional_fooAndBarBothDisabledGetter): (WebCore::jsTestConditional_fooOrBarAndBazGetter): (WebCore::jsTestConditional_fooAndBarOrBazGetter): (WebCore::jsTestConditional_fooOrBarAndBazDisabledGetter): (WebCore::jsTestConditional_fooAndBarDisabledOrBazGetter): (WebCore::jsTestConditional_fooDisabledOrBarAndBazGetter): (WebCore::JSTestConditional::subspaceForImpl): (WebCore::JSTestConditional::analyzeHeap): (WebCore::JSTestConditionalOwner::isReachableFromOpaqueRoots): (WebCore::JSTestConditionalOwner::finalize): (WebCore::verifyVTable): (WebCore::toJSNewlyCreated): (WebCore::toJS): (WebCore::JSTestConditional::toWrapped): * Source/WebCore/bindings/scripts/test/JS/JSTestConditional.h: Added. (WebCore::JSTestConditional::create): (WebCore::JSTestConditional::createStructure): (WebCore::JSTestConditional::subspaceFor): (WebCore::wrapperOwner): (WebCore::wrapperKey): (WebCore::toJS): (WebCore::toJSNewlyCreated): * Source/WebCore/bindings/scripts/test/SupplementalDependencies.dep: * Source/WebCore/bindings/scripts/test/TestConditional.idl: Added. Canonical link: https://commits.webkit.org/299931@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes