Changeset 262203 in webkit


Ignore:
Timestamp:
May 27, 2020, 11:09:46 AM (6 years ago)
Author:
Devin Rousso
Message:

Web Inspector: replace featureGuard and availability with a combined condition that accepts any macro
https://bugs.webkit.org/show_bug.cgi?id=210014

Reviewed by Brian Burg.

Previously, the generated InspectorBackendCommands.js would include code for things that the
backend doesn't actually support. By using actual macros and preprocessing that file, we can
ensure that the frontend doesn't incorrectly think that something is supported by the page
being inspected:

  • the Canvas commands and events related to shader programs/pipelines should only exist when the corresponding context type exists, namely ENABLE(WEBGL) and ENABLE(WEBGPU).
  • iOS doesn't support showing rulers, so create a variant of DOM.setInspectModeEnabled that only exists for PLATFORM(IOS_FAMILY) that doesn't have the showRulers optional parameter, as well as removing Page.setShowRulers entirely.
  • setting the forced appearance should only be possible if dark mode is supported.
  • web archives only exist if CF is used.

Source/JavaScriptCore:

  • inspector/protocol/CPUProfiler.json:
  • inspector/protocol/Canvas.json:
  • inspector/protocol/DOM.json:
  • inspector/protocol/IndexedDB.json:
  • inspector/protocol/Inspector.json:
  • inspector/protocol/Memory.json:
  • inspector/protocol/Page.json:
  • inspector/protocol/ServiceWorker.json:
  • Scripts/generate-derived-sources.sh:

Set CC if it hasn't already been set.

  • DerivedSources.make:
  • DerivedSources-input.xcfilelist:

Preprocess InspectorBackendCommands.js.in to get an accurate InspectorBackendCommands.js
that follows the logic/description above.

  • CMakeLists.txt:

Create a new InspectorBackendCommands target now that InspectorBackendCommands.js is
generated seprately from the rest of the protocol files.

  • Configurations/FeatureDefines.xcconfig:

Add ENABLE_WEB_ARCHIVE since it's always enabled in wtf/PlatformEnableCocoa.h.

  • inspector/scripts/generate-inspector-protocol-bindings.py:

(generate_from_specification):
(generate_from_specification.load_specification):

  • inspector/scripts/codegen/generator.py:

(Generator.init):
(Generator.model):
(Generator.set_generator_setting):
(Generator.type_declarations_for_domain):
(Generator.commands_for_domain):
(Generator.events_for_domain):
(Generator.wrap_with_guard_for_condition): Added.
(Generator.platform): Deleted.
(Generator.can_generate_platform): Deleted.
(Generator.wrap_with_guard_for_domain): Deleted.
(Generator.wrap_with_guard): Deleted.

  • inspector/scripts/codegen/models.py:

(Frameworks):
(Protocol.parse_domain):
(Protocol.parse_type_declaration):
(Protocol.parse_command):
(Protocol.parse_event):
(Domain.init):
(TypeDeclaration.init):
(Command.init):
(Event.init):
(Platform): Deleted.
(Platform.init): Deleted.
(Platform.fromString): Deleted.
(Platforms): Deleted.
(Platforms.metaclass): Deleted.
(Platforms.metaclass.iter): Deleted.

  • inspector/scripts/codegen/generator_templates.py:

Remove platform as it is handled by condition.

  • inspector/scripts/codegen/preprocess.pl: Copied from Source/WebCore/bindings/scripts/preprocessor.pm.
  • inspector/scripts/codegen/generate_js_backend_commands.py:

(JSBackendCommandsGenerator.output_filename):
(JSBackendCommandsGenerator.generate_domain):
Output to InspectorBackendCommands.js.in that includes #if for preprocessing.

  • inspector/scripts/codegen/cpp_generator_templates.py:
  • inspector/scripts/codegen/generate_cpp_alternate_backend_dispatcher_header.py:

(CppAlternateBackendDispatcherHeaderGenerator.generate_output):
(CppAlternateBackendDispatcherHeaderGenerator._generate_handler_declarations_for_domain):
(CppAlternateBackendDispatcherHeaderGenerator._generate_handler_declaration_for_command):

  • inspector/scripts/codegen/generate_cpp_backend_dispatcher_header.py:

(CppBackendDispatcherHeaderGenerator._generate_alternate_handler_forward_declarations_for_domains.Alternate):
(CppBackendDispatcherHeaderGenerator._generate_handler_declarations_for_domain):
(CppBackendDispatcherHeaderGenerator._generate_handler_declaration_for_command):
(CppBackendDispatcherHeaderGenerator._generate_async_handler_declaration_for_command):
(CppBackendDispatcherHeaderGenerator._generate_dispatcher_declarations_for_domain):
(CppBackendDispatcherHeaderGenerator._generate_dispatcher_declaration_for_command):

  • inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py:

(CppBackendDispatcherImplementationGenerator.generate_output):
(CppBackendDispatcherImplementationGenerator._generate_handler_class_destructor_for_domain):
(CppBackendDispatcherImplementationGenerator._generate_dispatcher_implementations_for_domain):
(CppBackendDispatcherImplementationGenerator._generate_small_dispatcher_switch_implementation_for_domain):
(CppBackendDispatcherImplementationGenerator._generate_large_dispatcher_switch_implementation_for_domain):
(CppBackendDispatcherImplementationGenerator._generate_async_dispatcher_class_for_domain):
(CppBackendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_command):

  • inspector/scripts/codegen/generate_cpp_frontend_dispatcher_header.py:

(CppFrontendDispatcherHeaderGenerator._generate_dispatcher_declarations_for_domain):
(CppFrontendDispatcherHeaderGenerator._generate_dispatcher_declaration_for_event):

  • inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py:

(CppFrontendDispatcherImplementationGenerator._generate_dispatcher_implementations_for_domain):
(CppFrontendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_event):

  • inspector/scripts/codegen/generate_cpp_protocol_types_header.py:

(CppProtocolTypesHeaderGenerator._generate_versions):

  • inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py:

(CppProtocolTypesImplementationGenerator._generate_enum_conversion_methods_for_domain.generate_conversion_method_body):
(CppProtocolTypesImplementationGenerator._generate_enum_conversion_methods_for_domain):
(CppProtocolTypesImplementationGenerator._generate_open_field_names):
(CppProtocolTypesImplementationGenerator._generate_builders_for_domain):

  • inspector/scripts/codegen/objc_generator_templates.py:
  • inspector/scripts/codegen/generate_objc_backend_dispatcher_header.py:

(ObjCBackendDispatcherHeaderGenerator._generate_objc_handler_declarations_for_domain):
(ObjCBackendDispatcherHeaderGenerator._generate_objc_handler_declaration_for_command):

  • inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py:

(ObjCBackendDispatcherImplementationGenerator._generate_handler_implementation_for_domain):
(ObjCBackendDispatcherImplementationGenerator._generate_handler_implementation_for_command):

  • inspector/scripts/codegen/generate_objc_header.py:

(add_newline):
(ObjCHeaderGenerator.generate_output):
(ObjCHeaderGenerator._generate_forward_declarations):
(ObjCHeaderGenerator._generate_enums):
(ObjCHeaderGenerator._generate_types):
(ObjCHeaderGenerator._generate_type_interface):
(ObjCHeaderGenerator._generate_command_protocols):
(ObjCHeaderGenerator._generate_single_command_protocol):
(ObjCHeaderGenerator._generate_event_interfaces):
(ObjCHeaderGenerator._generate_single_event_interface):
(ObjCHeaderGenerator._generate_enum_for_platforms): Deleted.

  • inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py:

(add_newline):
(ObjCProtocolTypeConversionsHeaderGenerator.generate_output):
(ObjCProtocolTypeConversionsHeaderGenerator._generate_enum_conversion_functions):
(ObjCProtocolTypeConversionsHeaderGenerator._generate_enum_conversion_for_platforms): Deleted.

  • inspector/scripts/codegen/generate_objc_protocol_type_conversions_implementation.py:

(add_newline):
(ObjCProtocolTypeConversionsImplementationGenerator._generate_type_factory_category_interface):
(ObjCProtocolTypeConversionsImplementationGenerator._generate_type_factory_method_declaration):
(ObjCProtocolTypeConversionsImplementationGenerator._generate_type_factory_category_implementation):
(ObjCProtocolTypeConversionsImplementationGenerator._generate_type_factory_method_implementation):

  • inspector/scripts/codegen/generate_objc_protocol_types_implementation.py:

(add_newline):
(ObjCProtocolTypesImplementationGenerator.generate_type_implementations):
(ObjCProtocolTypesImplementationGenerator.generate_type_implementation):
Wrap each domain, type, command, and event with the associated condition (if it exists).

  • inspector/scripts/tests/command-targetType-matching-domain-debuggableType.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/command-targetType-matching-domain-debuggableType.json.
  • inspector/scripts/tests/commands-with-async-attribute.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/commands-with-async-attribute.json.
  • inspector/scripts/tests/commands-with-optional-call-return-parameters.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/commands-with-optional-call-return-parameters.json.
  • inspector/scripts/tests/definitions-with-mac-platform.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/mac/definitions-with-mac-platform.json.
  • inspector/scripts/tests/domain-debuggableTypes.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/domain-debuggableTypes.json.
  • inspector/scripts/tests/domain-targetType-matching-domain-debuggableType.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/domain-targetType-matching-domain-debuggableType.json.
  • inspector/scripts/tests/domain-targetTypes.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/domain-targetTypes.json.
  • inspector/scripts/tests/domains-with-varying-command-sizes.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/domains-with-varying-command-sizes.json.
  • inspector/scripts/tests/enum-values.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/enum-values.json.
  • inspector/scripts/tests/event-targetType-matching-domain-debuggableType.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/event-targetType-matching-domain-debuggableType.json.
  • inspector/scripts/tests/events-with-optional-parameters.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/events-with-optional-parameters.json.
  • inspector/scripts/tests/expected/command-targetType-matching-domain-debuggableType.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/command-targetType-matching-domain-debuggableType.json-result.
  • inspector/scripts/tests/expected/commands-with-async-attribute.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result.
  • inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result.
  • inspector/scripts/tests/expected/definitions-with-mac-platform.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result.
  • inspector/scripts/tests/expected/domain-debuggableTypes.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domain-debuggableTypes.json-result.
  • inspector/scripts/tests/expected/domain-targetType-matching-domain-debuggableType.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domain-targetType-matching-domain-debuggableType.json-result.
  • inspector/scripts/tests/expected/domain-targetTypes.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domain-targetTypes.json-result.
  • inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result.
  • inspector/scripts/tests/expected/enum-values.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/enum-values.json-result.
  • inspector/scripts/tests/expected/event-targetType-matching-domain-debuggableType.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/event-targetType-matching-domain-debuggableType.json-result.
  • inspector/scripts/tests/expected/events-with-optional-parameters.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result.
  • inspector/scripts/tests/expected/fail-on-command-targetType-matching-domain-debuggableType.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-command-targetType-matching-domain-debuggableType.json-error.
  • inspector/scripts/tests/expected/fail-on-command-targetTypes-type.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-command-targetTypes-type.json-error.
  • inspector/scripts/tests/expected/fail-on-command-targetTypes-value.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-command-targetTypes-value.json-error.
  • inspector/scripts/tests/expected/fail-on-domain-debuggableTypes-type.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-domain-debuggableTypes-type.json-error.
  • inspector/scripts/tests/expected/fail-on-domain-debuggableTypes-value.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-domain-debuggableTypes-value.json-error.
  • inspector/scripts/tests/expected/fail-on-domain-targetType-matching-domain-debuggableType.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-domain-targetType-matching-domain-debuggableType.json-error.
  • inspector/scripts/tests/expected/fail-on-domain-targetTypes-type.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-domain-targetTypes-type.json-error.
  • inspector/scripts/tests/expected/fail-on-domain-targetTypes-value.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-domain-targetTypes-value.json-error.
  • inspector/scripts/tests/expected/fail-on-duplicate-command-call-parameter-names.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-command-call-parameter-names.json-error.
  • inspector/scripts/tests/expected/fail-on-duplicate-command-return-parameter-names.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-command-return-parameter-names.json-error.
  • inspector/scripts/tests/expected/fail-on-duplicate-event-parameter-names.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-event-parameter-names.json-error.
  • inspector/scripts/tests/expected/fail-on-duplicate-type-declarations.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-type-declarations.json-error.
  • inspector/scripts/tests/expected/fail-on-duplicate-type-member-names.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-type-member-names.json-error.
  • inspector/scripts/tests/expected/fail-on-enum-with-no-values.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-enum-with-no-values.json-error.
  • inspector/scripts/tests/expected/fail-on-event-targetType-matching-domain-debuggableType.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-event-targetType-matching-domain-debuggableType.json-error.
  • inspector/scripts/tests/expected/fail-on-event-targetTypes-type.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-event-targetTypes-type.json-error.
  • inspector/scripts/tests/expected/fail-on-event-targetTypes-value.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-event-targetTypes-value.json-error.
  • inspector/scripts/tests/expected/fail-on-number-typed-optional-parameter-flag.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-number-typed-optional-parameter-flag.json-error.
  • inspector/scripts/tests/expected/fail-on-number-typed-optional-type-member.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-number-typed-optional-type-member.json-error.
  • inspector/scripts/tests/expected/fail-on-string-typed-optional-parameter-flag.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-string-typed-optional-parameter-flag.json-error.
  • inspector/scripts/tests/expected/fail-on-string-typed-optional-type-member.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-string-typed-optional-type-member.json-error.
  • inspector/scripts/tests/expected/fail-on-type-declaration-using-type-reference.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-type-declaration-using-type-reference.json-error.
  • inspector/scripts/tests/expected/fail-on-type-reference-as-primitive-type.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-type-reference-as-primitive-type.json-error.
  • inspector/scripts/tests/expected/fail-on-type-with-lowercase-name.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-type-with-lowercase-name.json-error.
  • inspector/scripts/tests/expected/fail-on-unknown-type-reference-in-type-declaration.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-unknown-type-reference-in-type-declaration.json-error.
  • inspector/scripts/tests/expected/fail-on-unknown-type-reference-in-type-member.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-unknown-type-reference-in-type-member.json-error.
  • inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result.
  • inspector/scripts/tests/expected/same-type-id-different-domain.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result.
  • inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result.
  • inspector/scripts/tests/expected/should-strip-comments.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/should-strip-comments.json-result.
  • inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result.
  • inspector/scripts/tests/expected/type-declaration-array-type.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result.
  • inspector/scripts/tests/expected/type-declaration-enum-type.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result.
  • inspector/scripts/tests/expected/type-declaration-object-type.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result.
  • inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result.
  • inspector/scripts/tests/expected/type-with-open-parameters.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result.
  • inspector/scripts/tests/expected/version.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/version.json-result.
  • inspector/scripts/tests/fail-on-command-targetType-matching-domain-debuggableType.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-command-targetType-matching-domain-debuggableType.json.
  • inspector/scripts/tests/fail-on-command-targetTypes-type.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-command-targetTypes-type.json.
  • inspector/scripts/tests/fail-on-command-targetTypes-value.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-command-targetTypes-value.json.
  • inspector/scripts/tests/fail-on-domain-debuggableTypes-type.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-domain-debuggableTypes-type.json.
  • inspector/scripts/tests/fail-on-domain-debuggableTypes-value.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-domain-debuggableTypes-value.json.
  • inspector/scripts/tests/fail-on-domain-targetType-matching-domain-debuggableType.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-domain-targetType-matching-domain-debuggableType.json.
  • inspector/scripts/tests/fail-on-domain-targetTypes-type.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-domain-targetTypes-type.json.
  • inspector/scripts/tests/fail-on-domain-targetTypes-value.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-domain-targetTypes-value.json.
  • inspector/scripts/tests/fail-on-duplicate-command-call-parameter-names.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-command-call-parameter-names.json.
  • inspector/scripts/tests/fail-on-duplicate-command-return-parameter-names.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-command-return-parameter-names.json.
  • inspector/scripts/tests/fail-on-duplicate-event-parameter-names.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-event-parameter-names.json.
  • inspector/scripts/tests/fail-on-duplicate-type-declarations.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-type-declarations.json.
  • inspector/scripts/tests/fail-on-duplicate-type-member-names.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-type-member-names.json.
  • inspector/scripts/tests/fail-on-enum-with-no-values.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-enum-with-no-values.json.
  • inspector/scripts/tests/fail-on-event-targetType-matching-domain-debuggableType.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-event-targetType-matching-domain-debuggableType.json.
  • inspector/scripts/tests/fail-on-event-targetTypes-type.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-event-targetTypes-type.json.
  • inspector/scripts/tests/fail-on-event-targetTypes-value.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-event-targetTypes-value.json.
  • inspector/scripts/tests/fail-on-number-typed-optional-parameter-flag.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-number-typed-optional-parameter-flag.json.
  • inspector/scripts/tests/fail-on-number-typed-optional-type-member.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-number-typed-optional-type-member.json.
  • inspector/scripts/tests/fail-on-string-typed-optional-parameter-flag.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-string-typed-optional-parameter-flag.json.
  • inspector/scripts/tests/fail-on-string-typed-optional-type-member.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-string-typed-optional-type-member.json.
  • inspector/scripts/tests/fail-on-type-declaration-using-type-reference.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-type-declaration-using-type-reference.json.
  • inspector/scripts/tests/fail-on-type-reference-as-primitive-type.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-type-reference-as-primitive-type.json.
  • inspector/scripts/tests/fail-on-type-with-lowercase-name.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-type-with-lowercase-name.json.
  • inspector/scripts/tests/fail-on-unknown-type-reference-in-type-declaration.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-unknown-type-reference-in-type-declaration.json.
  • inspector/scripts/tests/fail-on-unknown-type-reference-in-type-member.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-unknown-type-reference-in-type-member.json.
  • inspector/scripts/tests/generate-domains-with-feature-guards.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/generate-domains-with-feature-guards.json.
  • inspector/scripts/tests/same-type-id-different-domain.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/same-type-id-different-domain.json.
  • inspector/scripts/tests/shadowed-optional-type-setters.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/shadowed-optional-type-setters.json.
  • inspector/scripts/tests/should-strip-comments.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/should-strip-comments.json.
  • inspector/scripts/tests/type-declaration-aliased-primitive-type.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/type-declaration-aliased-primitive-type.json.
  • inspector/scripts/tests/type-declaration-array-type.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/type-declaration-array-type.json.
  • inspector/scripts/tests/type-declaration-enum-type.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/type-declaration-enum-type.json.
  • inspector/scripts/tests/type-declaration-object-type.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/type-declaration-object-type.json.
  • inspector/scripts/tests/type-requiring-runtime-casts.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/type-requiring-runtime-casts.json.
  • inspector/scripts/tests/type-with-open-parameters.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/type-with-open-parameters.json.
  • inspector/scripts/tests/version.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/version.json.
  • inspector/scripts/tests/generic/definitions-with-mac-platform.json: Removed.
  • inspector/scripts/tests/generic/expected/definitions-with-mac-platform.json-result: Removed.
  • inspector/scripts/tests/generic/fail-on-command-with-invalid-platform.json: Removed.
  • inspector/scripts/tests/generic/expected/fail-on-command-with-invalid-platform.json-error: Removed.
  • inspector/scripts/tests/generic/fail-on-type-with-invalid-platform.json: Removed.
  • inspector/scripts/tests/generic/expected/fail-on-type-with-invalid-platform.json-error: Removed.
  • inspector/scripts/tests/ios/definitions-with-mac-platform.json: Removed.
  • inspector/scripts/tests/ios/expected/definitions-with-mac-platform.json-result: Removed.
  • inspector/scripts/tests/all/definitions-with-mac-platform.json: Removed.
  • inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result: Removed.

Don't separate the inspector generator tests by platform.

Source/WebCore:

  • inspector/InspectorInstrumentation.h:
  • inspector/InspectorInstrumentation.cpp:
  • inspector/agents/InspectorCanvasAgent.h:
  • inspector/agents/InspectorCanvasAgent.cpp:

(WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
(WebCore::InspectorCanvasAgent::enable):
(WebCore::InspectorCanvasAgent::startRecording):
(WebCore::InspectorCanvasAgent::reset):
(WebCore::InspectorCanvasAgent::unbindCanvas):

  • inspector/InspectorShaderProgram.h:
  • inspector/InspectorShaderProgram.cpp:

(WebCore::InspectorShaderProgram::requestShaderSource):
(WebCore::InspectorShaderProgram::updateShader):

  • inspector/agents/InspectorDOMAgent.h:
  • inspector/agents/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::setInspectModeEnabled):

  • inspector/agents/InspectorPageAgent.h:
  • inspector/agents/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::enable):
(WebCore::InspectorPageAgent::disable):
(WebCore::InspectorPageAgent::setForcedAppearance):
(WebCore::InspectorPageAgent::archive):

  • Configurations/FeatureDefines.xcconfig:

Add ENABLE_WEB_ARCHIVE since it's always enabled in wtf/PlatformEnableCocoa.h.

  • inspector/InspectorFrontendHost.idl:

Drive-by: replace the #if with the IDL [Conditional=].

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Add ENABLE_WEB_ARCHIVE since it's always enabled in wtf/PlatformEnableCocoa.h.

Source/WebInspectorUI:

  • CMakeLists.txt:

Add a dependency on the new InspectorBackendCommands target.

  • UserInterface/Base/Main.js:

(WI._updateDownloadTabBarButton):

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:

Add ENABLE_WEB_ARCHIVE since it's always enabled in wtf/PlatformEnableCocoa.h.

  • DerivedSources.make:
  • PlatformMac.cmake:

Remove platform as it is handled by condition.

  • UIProcess/Automation/Automation.json:

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Add ENABLE_WEB_ARCHIVE since it's always enabled in wtf/PlatformEnableCocoa.h.

Tools:

  • Configurations/FeatureDefines.xcconfig:

Add ENABLE_WEB_ARCHIVE since it's always enabled in wtf/PlatformEnableCocoa.h.

  • Scripts/webkitpy/inspector/main.py:

(InspectorGeneratorTests.generate_from_json):
(InspectorGeneratorTests.run_tests):
(InspectorGeneratorTests.main):

Location:
trunk
Files:
2 added
4 deleted
64 edited
96 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/CMakeLists.txt

    r262039 r262203  
    11511151    ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/__init__.py
    11521152    ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/models.py
     1153    ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/preprocess.pl
    11531154)
    11541155
     
    11571158    ${JAVASCRIPTCORE_DIR}/inspector/protocol/ApplicationCache.json
    11581159    ${JAVASCRIPTCORE_DIR}/inspector/protocol/Audit.json
     1160    ${JAVASCRIPTCORE_DIR}/inspector/protocol/Browser.json
     1161    ${JAVASCRIPTCORE_DIR}/inspector/protocol/CPUProfiler.json
    11591162    ${JAVASCRIPTCORE_DIR}/inspector/protocol/CSS.json
    11601163    ${JAVASCRIPTCORE_DIR}/inspector/protocol/Canvas.json
     
    11651168    ${JAVASCRIPTCORE_DIR}/inspector/protocol/Database.json
    11661169    ${JAVASCRIPTCORE_DIR}/inspector/protocol/Debugger.json
    1167     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Browser.json
    11681170    ${JAVASCRIPTCORE_DIR}/inspector/protocol/GenericTypes.json
    11691171    ${JAVASCRIPTCORE_DIR}/inspector/protocol/Heap.json
     1172    ${JAVASCRIPTCORE_DIR}/inspector/protocol/IndexedDB.json
    11701173    ${JAVASCRIPTCORE_DIR}/inspector/protocol/Inspector.json
    11711174    ${JAVASCRIPTCORE_DIR}/inspector/protocol/LayerTree.json
     1175    ${JAVASCRIPTCORE_DIR}/inspector/protocol/Memory.json
    11721176    ${JAVASCRIPTCORE_DIR}/inspector/protocol/Network.json
    11731177    ${JAVASCRIPTCORE_DIR}/inspector/protocol/Page.json
     
    11761180    ${JAVASCRIPTCORE_DIR}/inspector/protocol/ScriptProfiler.json
    11771181    ${JAVASCRIPTCORE_DIR}/inspector/protocol/Security.json
     1182    ${JAVASCRIPTCORE_DIR}/inspector/protocol/ServiceWorker.json
    11781183    ${JAVASCRIPTCORE_DIR}/inspector/protocol/Target.json
    11791184    ${JAVASCRIPTCORE_DIR}/inspector/protocol/Timeline.json
    11801185    ${JAVASCRIPTCORE_DIR}/inspector/protocol/Worker.json
    11811186)
    1182 
    1183 if (ENABLE_INDEXED_DATABASE)
    1184     list(APPEND JavaScriptCore_INSPECTOR_DOMAINS
    1185         ${JAVASCRIPTCORE_DIR}/inspector/protocol/IndexedDB.json
    1186     )
    1187 endif ()
    1188 
    1189 if (ENABLE_RESOURCE_USAGE)
    1190     list(APPEND JavaScriptCore_INSPECTOR_DOMAINS
    1191         ${JAVASCRIPTCORE_DIR}/inspector/protocol/CPUProfiler.json
    1192         ${JAVASCRIPTCORE_DIR}/inspector/protocol/Memory.json
    1193     )
    1194 endif ()
    1195 
    1196 if (ENABLE_SERVICE_WORKER)
    1197     list(APPEND JavaScriptCore_INSPECTOR_DOMAINS
    1198         ${JAVASCRIPTCORE_DIR}/inspector/protocol/ServiceWorker.json
    1199     )
    1200 endif ()
    12011187
    12021188add_custom_command(
     
    12171203           ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorProtocolObjects.cpp
    12181204           ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorProtocolObjects.h
    1219            ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorBackendCommands.js
    12201205    MAIN_DEPENDENCY ${JavaScriptCore_DERIVED_SOURCES_DIR}/CombinedDomains.json
    12211206    DEPENDS ${JavaScriptCore_INSPECTOR_PROTOCOL_SCRIPTS}
    12221207    COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/generate-inspector-protocol-bindings.py --outputDir "${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector" --framework JavaScriptCore ${JavaScriptCore_DERIVED_SOURCES_DIR}/CombinedDomains.json
    12231208    VERBATIM)
     1209add_custom_command(
     1210    OUTPUT ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorBackendCommands.js
     1211           ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorBackendCommands.js.in
     1212    MAIN_DEPENDENCY ${JavaScriptCore_DERIVED_SOURCES_DIR}/CombinedDomains.json
     1213    DEPENDS ${JavaScriptCore_INSPECTOR_PROTOCOL_SCRIPTS}
     1214    COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/generate-inspector-protocol-bindings.py --outputDir ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector --framework WebInspectorUI ${JavaScriptCore_DERIVED_SOURCES_DIR}/CombinedDomains.json
     1215    COMMAND ${PERL_EXECUTABLE} ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/preprocess.pl --input ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorBackendCommands.js.in --defines "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}" --preprocessor "${CODE_GENERATOR_PREPROCESSOR}" --output ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorBackendCommands.js
     1216    VERBATIM)
     1217add_custom_target(InspectorBackendCommands DEPENDS "${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorBackendCommands.js")
    12241218
    12251219# JSCBuiltins
  • trunk/Source/JavaScriptCore/ChangeLog

    r262197 r262203  
     12020-05-27  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: replace `featureGuard` and `availability` with a combined `condition` that accepts any macro
     4        https://bugs.webkit.org/show_bug.cgi?id=210014
     5
     6        Reviewed by Brian Burg.
     7
     8        Previously, the generated InspectorBackendCommands.js would include code for things that the
     9        backend doesn't actually support. By using actual macros and preprocessing that file, we can
     10        ensure that the frontend doesn't incorrectly think that something is supported by the page
     11        being inspected:
     12         - the `Canvas` commands and events related to shader programs/pipelines should only exist
     13           when the corresponding context type exists, namely `ENABLE(WEBGL)` and `ENABLE(WEBGPU)`.
     14         - iOS doesn't support showing rulers, so create a variant of `DOM.setInspectModeEnabled`
     15           that only exists for `PLATFORM(IOS_FAMILY)` that doesn't have the `showRulers` optional
     16           parameter, as well as removing `Page.setShowRulers` entirely.
     17         - setting the forced appearance should only be possible if dark mode is supported.
     18         - web archives only exist if CF is used.
     19
     20        * inspector/protocol/CPUProfiler.json:
     21        * inspector/protocol/Canvas.json:
     22        * inspector/protocol/DOM.json:
     23        * inspector/protocol/IndexedDB.json:
     24        * inspector/protocol/Inspector.json:
     25        * inspector/protocol/Memory.json:
     26        * inspector/protocol/Page.json:
     27        * inspector/protocol/ServiceWorker.json:
     28
     29        * Scripts/generate-derived-sources.sh:
     30        Set `CC` if it hasn't already been set.
     31
     32        * DerivedSources.make:
     33        * DerivedSources-input.xcfilelist:
     34        Preprocess `InspectorBackendCommands.js.in` to get an accurate `InspectorBackendCommands.js`
     35        that follows the logic/description above.
     36
     37        * CMakeLists.txt:
     38        Create a new `InspectorBackendCommands` target now that `InspectorBackendCommands.js` is
     39        generated seprately from the rest of the protocol files.
     40
     41        * Configurations/FeatureDefines.xcconfig:
     42        Add `ENABLE_WEB_ARCHIVE` since it's always enabled in wtf/PlatformEnableCocoa.h.
     43
     44        * inspector/scripts/generate-inspector-protocol-bindings.py:
     45        (generate_from_specification):
     46        (generate_from_specification.load_specification):
     47        * inspector/scripts/codegen/generator.py:
     48        (Generator.__init__):
     49        (Generator.model):
     50        (Generator.set_generator_setting):
     51        (Generator.type_declarations_for_domain):
     52        (Generator.commands_for_domain):
     53        (Generator.events_for_domain):
     54        (Generator.wrap_with_guard_for_condition): Added.
     55        (Generator.platform): Deleted.
     56        (Generator.can_generate_platform): Deleted.
     57        (Generator.wrap_with_guard_for_domain): Deleted.
     58        (Generator.wrap_with_guard): Deleted.
     59        * inspector/scripts/codegen/models.py:
     60        (Frameworks):
     61        (Protocol.parse_domain):
     62        (Protocol.parse_type_declaration):
     63        (Protocol.parse_command):
     64        (Protocol.parse_event):
     65        (Domain.__init__):
     66        (TypeDeclaration.__init__):
     67        (Command.__init__):
     68        (Event.__init__):
     69        (Platform): Deleted.
     70        (Platform.__init__): Deleted.
     71        (Platform.fromString): Deleted.
     72        (Platforms): Deleted.
     73        (Platforms.__metaclass__): Deleted.
     74        (Platforms.__metaclass__.__iter__): Deleted.
     75        * inspector/scripts/codegen/generator_templates.py:
     76        Remove `platform` as it is handled by `condition`.
     77
     78        * inspector/scripts/codegen/preprocess.pl: Copied from Source/WebCore/bindings/scripts/preprocessor.pm.
     79
     80        * inspector/scripts/codegen/generate_js_backend_commands.py:
     81        (JSBackendCommandsGenerator.output_filename):
     82        (JSBackendCommandsGenerator.generate_domain):
     83        Output to `InspectorBackendCommands.js.in` that includes `#if` for preprocessing.
     84
     85        * inspector/scripts/codegen/cpp_generator_templates.py:
     86        * inspector/scripts/codegen/generate_cpp_alternate_backend_dispatcher_header.py:
     87        (CppAlternateBackendDispatcherHeaderGenerator.generate_output):
     88        (CppAlternateBackendDispatcherHeaderGenerator._generate_handler_declarations_for_domain):
     89        (CppAlternateBackendDispatcherHeaderGenerator._generate_handler_declaration_for_command):
     90        * inspector/scripts/codegen/generate_cpp_backend_dispatcher_header.py:
     91        (CppBackendDispatcherHeaderGenerator._generate_alternate_handler_forward_declarations_for_domains.Alternate):
     92        (CppBackendDispatcherHeaderGenerator._generate_handler_declarations_for_domain):
     93        (CppBackendDispatcherHeaderGenerator._generate_handler_declaration_for_command):
     94        (CppBackendDispatcherHeaderGenerator._generate_async_handler_declaration_for_command):
     95        (CppBackendDispatcherHeaderGenerator._generate_dispatcher_declarations_for_domain):
     96        (CppBackendDispatcherHeaderGenerator._generate_dispatcher_declaration_for_command):
     97        * inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py:
     98        (CppBackendDispatcherImplementationGenerator.generate_output):
     99        (CppBackendDispatcherImplementationGenerator._generate_handler_class_destructor_for_domain):
     100        (CppBackendDispatcherImplementationGenerator._generate_dispatcher_implementations_for_domain):
     101        (CppBackendDispatcherImplementationGenerator._generate_small_dispatcher_switch_implementation_for_domain):
     102        (CppBackendDispatcherImplementationGenerator._generate_large_dispatcher_switch_implementation_for_domain):
     103        (CppBackendDispatcherImplementationGenerator._generate_async_dispatcher_class_for_domain):
     104        (CppBackendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_command):
     105        * inspector/scripts/codegen/generate_cpp_frontend_dispatcher_header.py:
     106        (CppFrontendDispatcherHeaderGenerator._generate_dispatcher_declarations_for_domain):
     107        (CppFrontendDispatcherHeaderGenerator._generate_dispatcher_declaration_for_event):
     108        * inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py:
     109        (CppFrontendDispatcherImplementationGenerator._generate_dispatcher_implementations_for_domain):
     110        (CppFrontendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_event):
     111        * inspector/scripts/codegen/generate_cpp_protocol_types_header.py:
     112        (CppProtocolTypesHeaderGenerator._generate_versions):
     113        * inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py:
     114        (CppProtocolTypesImplementationGenerator._generate_enum_conversion_methods_for_domain.generate_conversion_method_body):
     115        (CppProtocolTypesImplementationGenerator._generate_enum_conversion_methods_for_domain):
     116        (CppProtocolTypesImplementationGenerator._generate_open_field_names):
     117        (CppProtocolTypesImplementationGenerator._generate_builders_for_domain):
     118        * inspector/scripts/codegen/objc_generator_templates.py:
     119        * inspector/scripts/codegen/generate_objc_backend_dispatcher_header.py:
     120        (ObjCBackendDispatcherHeaderGenerator._generate_objc_handler_declarations_for_domain):
     121        (ObjCBackendDispatcherHeaderGenerator._generate_objc_handler_declaration_for_command):
     122        * inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py:
     123        (ObjCBackendDispatcherImplementationGenerator._generate_handler_implementation_for_domain):
     124        (ObjCBackendDispatcherImplementationGenerator._generate_handler_implementation_for_command):
     125        * inspector/scripts/codegen/generate_objc_header.py:
     126        (add_newline):
     127        (ObjCHeaderGenerator.generate_output):
     128        (ObjCHeaderGenerator._generate_forward_declarations):
     129        (ObjCHeaderGenerator._generate_enums):
     130        (ObjCHeaderGenerator._generate_types):
     131        (ObjCHeaderGenerator._generate_type_interface):
     132        (ObjCHeaderGenerator._generate_command_protocols):
     133        (ObjCHeaderGenerator._generate_single_command_protocol):
     134        (ObjCHeaderGenerator._generate_event_interfaces):
     135        (ObjCHeaderGenerator._generate_single_event_interface):
     136        (ObjCHeaderGenerator._generate_enum_for_platforms): Deleted.
     137        * inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py:
     138        (add_newline):
     139        (ObjCProtocolTypeConversionsHeaderGenerator.generate_output):
     140        (ObjCProtocolTypeConversionsHeaderGenerator._generate_enum_conversion_functions):
     141        (ObjCProtocolTypeConversionsHeaderGenerator._generate_enum_conversion_for_platforms): Deleted.
     142        * inspector/scripts/codegen/generate_objc_protocol_type_conversions_implementation.py:
     143        (add_newline):
     144        (ObjCProtocolTypeConversionsImplementationGenerator._generate_type_factory_category_interface):
     145        (ObjCProtocolTypeConversionsImplementationGenerator._generate_type_factory_method_declaration):
     146        (ObjCProtocolTypeConversionsImplementationGenerator._generate_type_factory_category_implementation):
     147        (ObjCProtocolTypeConversionsImplementationGenerator._generate_type_factory_method_implementation):
     148        * inspector/scripts/codegen/generate_objc_protocol_types_implementation.py:
     149        (add_newline):
     150        (ObjCProtocolTypesImplementationGenerator.generate_type_implementations):
     151        (ObjCProtocolTypesImplementationGenerator.generate_type_implementation):
     152        Wrap each domain, type, command, and event with the associated `condition` (if it exists).
     153
     154        * inspector/scripts/tests/command-targetType-matching-domain-debuggableType.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/command-targetType-matching-domain-debuggableType.json.
     155        * inspector/scripts/tests/commands-with-async-attribute.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/commands-with-async-attribute.json.
     156        * inspector/scripts/tests/commands-with-optional-call-return-parameters.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/commands-with-optional-call-return-parameters.json.
     157        * inspector/scripts/tests/definitions-with-mac-platform.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/mac/definitions-with-mac-platform.json.
     158        * inspector/scripts/tests/domain-debuggableTypes.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/domain-debuggableTypes.json.
     159        * inspector/scripts/tests/domain-targetType-matching-domain-debuggableType.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/domain-targetType-matching-domain-debuggableType.json.
     160        * inspector/scripts/tests/domain-targetTypes.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/domain-targetTypes.json.
     161        * inspector/scripts/tests/domains-with-varying-command-sizes.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/domains-with-varying-command-sizes.json.
     162        * inspector/scripts/tests/enum-values.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/enum-values.json.
     163        * inspector/scripts/tests/event-targetType-matching-domain-debuggableType.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/event-targetType-matching-domain-debuggableType.json.
     164        * inspector/scripts/tests/events-with-optional-parameters.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/events-with-optional-parameters.json.
     165        * inspector/scripts/tests/expected/command-targetType-matching-domain-debuggableType.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/command-targetType-matching-domain-debuggableType.json-result.
     166        * inspector/scripts/tests/expected/commands-with-async-attribute.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result.
     167        * inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result.
     168        * inspector/scripts/tests/expected/definitions-with-mac-platform.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result.
     169        * inspector/scripts/tests/expected/domain-debuggableTypes.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domain-debuggableTypes.json-result.
     170        * inspector/scripts/tests/expected/domain-targetType-matching-domain-debuggableType.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domain-targetType-matching-domain-debuggableType.json-result.
     171        * inspector/scripts/tests/expected/domain-targetTypes.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domain-targetTypes.json-result.
     172        * inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result.
     173        * inspector/scripts/tests/expected/enum-values.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/enum-values.json-result.
     174        * inspector/scripts/tests/expected/event-targetType-matching-domain-debuggableType.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/event-targetType-matching-domain-debuggableType.json-result.
     175        * inspector/scripts/tests/expected/events-with-optional-parameters.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result.
     176        * inspector/scripts/tests/expected/fail-on-command-targetType-matching-domain-debuggableType.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-command-targetType-matching-domain-debuggableType.json-error.
     177        * inspector/scripts/tests/expected/fail-on-command-targetTypes-type.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-command-targetTypes-type.json-error.
     178        * inspector/scripts/tests/expected/fail-on-command-targetTypes-value.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-command-targetTypes-value.json-error.
     179        * inspector/scripts/tests/expected/fail-on-domain-debuggableTypes-type.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-domain-debuggableTypes-type.json-error.
     180        * inspector/scripts/tests/expected/fail-on-domain-debuggableTypes-value.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-domain-debuggableTypes-value.json-error.
     181        * inspector/scripts/tests/expected/fail-on-domain-targetType-matching-domain-debuggableType.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-domain-targetType-matching-domain-debuggableType.json-error.
     182        * inspector/scripts/tests/expected/fail-on-domain-targetTypes-type.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-domain-targetTypes-type.json-error.
     183        * inspector/scripts/tests/expected/fail-on-domain-targetTypes-value.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-domain-targetTypes-value.json-error.
     184        * inspector/scripts/tests/expected/fail-on-duplicate-command-call-parameter-names.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-command-call-parameter-names.json-error.
     185        * inspector/scripts/tests/expected/fail-on-duplicate-command-return-parameter-names.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-command-return-parameter-names.json-error.
     186        * inspector/scripts/tests/expected/fail-on-duplicate-event-parameter-names.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-event-parameter-names.json-error.
     187        * inspector/scripts/tests/expected/fail-on-duplicate-type-declarations.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-type-declarations.json-error.
     188        * inspector/scripts/tests/expected/fail-on-duplicate-type-member-names.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-duplicate-type-member-names.json-error.
     189        * inspector/scripts/tests/expected/fail-on-enum-with-no-values.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-enum-with-no-values.json-error.
     190        * inspector/scripts/tests/expected/fail-on-event-targetType-matching-domain-debuggableType.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-event-targetType-matching-domain-debuggableType.json-error.
     191        * inspector/scripts/tests/expected/fail-on-event-targetTypes-type.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-event-targetTypes-type.json-error.
     192        * inspector/scripts/tests/expected/fail-on-event-targetTypes-value.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-event-targetTypes-value.json-error.
     193        * inspector/scripts/tests/expected/fail-on-number-typed-optional-parameter-flag.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-number-typed-optional-parameter-flag.json-error.
     194        * inspector/scripts/tests/expected/fail-on-number-typed-optional-type-member.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-number-typed-optional-type-member.json-error.
     195        * inspector/scripts/tests/expected/fail-on-string-typed-optional-parameter-flag.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-string-typed-optional-parameter-flag.json-error.
     196        * inspector/scripts/tests/expected/fail-on-string-typed-optional-type-member.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-string-typed-optional-type-member.json-error.
     197        * inspector/scripts/tests/expected/fail-on-type-declaration-using-type-reference.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-type-declaration-using-type-reference.json-error.
     198        * inspector/scripts/tests/expected/fail-on-type-reference-as-primitive-type.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-type-reference-as-primitive-type.json-error.
     199        * inspector/scripts/tests/expected/fail-on-type-with-lowercase-name.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-type-with-lowercase-name.json-error.
     200        * inspector/scripts/tests/expected/fail-on-unknown-type-reference-in-type-declaration.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-unknown-type-reference-in-type-declaration.json-error.
     201        * inspector/scripts/tests/expected/fail-on-unknown-type-reference-in-type-member.json-error: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/fail-on-unknown-type-reference-in-type-member.json-error.
     202        * inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result.
     203        * inspector/scripts/tests/expected/same-type-id-different-domain.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result.
     204        * inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result.
     205        * inspector/scripts/tests/expected/should-strip-comments.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/should-strip-comments.json-result.
     206        * inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result.
     207        * inspector/scripts/tests/expected/type-declaration-array-type.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result.
     208        * inspector/scripts/tests/expected/type-declaration-enum-type.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result.
     209        * inspector/scripts/tests/expected/type-declaration-object-type.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result.
     210        * inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result.
     211        * inspector/scripts/tests/expected/type-with-open-parameters.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result.
     212        * inspector/scripts/tests/expected/version.json-result: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/expected/version.json-result.
     213        * inspector/scripts/tests/fail-on-command-targetType-matching-domain-debuggableType.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-command-targetType-matching-domain-debuggableType.json.
     214        * inspector/scripts/tests/fail-on-command-targetTypes-type.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-command-targetTypes-type.json.
     215        * inspector/scripts/tests/fail-on-command-targetTypes-value.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-command-targetTypes-value.json.
     216        * inspector/scripts/tests/fail-on-domain-debuggableTypes-type.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-domain-debuggableTypes-type.json.
     217        * inspector/scripts/tests/fail-on-domain-debuggableTypes-value.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-domain-debuggableTypes-value.json.
     218        * inspector/scripts/tests/fail-on-domain-targetType-matching-domain-debuggableType.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-domain-targetType-matching-domain-debuggableType.json.
     219        * inspector/scripts/tests/fail-on-domain-targetTypes-type.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-domain-targetTypes-type.json.
     220        * inspector/scripts/tests/fail-on-domain-targetTypes-value.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-domain-targetTypes-value.json.
     221        * inspector/scripts/tests/fail-on-duplicate-command-call-parameter-names.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-command-call-parameter-names.json.
     222        * inspector/scripts/tests/fail-on-duplicate-command-return-parameter-names.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-command-return-parameter-names.json.
     223        * inspector/scripts/tests/fail-on-duplicate-event-parameter-names.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-event-parameter-names.json.
     224        * inspector/scripts/tests/fail-on-duplicate-type-declarations.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-type-declarations.json.
     225        * inspector/scripts/tests/fail-on-duplicate-type-member-names.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-duplicate-type-member-names.json.
     226        * inspector/scripts/tests/fail-on-enum-with-no-values.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-enum-with-no-values.json.
     227        * inspector/scripts/tests/fail-on-event-targetType-matching-domain-debuggableType.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-event-targetType-matching-domain-debuggableType.json.
     228        * inspector/scripts/tests/fail-on-event-targetTypes-type.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-event-targetTypes-type.json.
     229        * inspector/scripts/tests/fail-on-event-targetTypes-value.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-event-targetTypes-value.json.
     230        * inspector/scripts/tests/fail-on-number-typed-optional-parameter-flag.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-number-typed-optional-parameter-flag.json.
     231        * inspector/scripts/tests/fail-on-number-typed-optional-type-member.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-number-typed-optional-type-member.json.
     232        * inspector/scripts/tests/fail-on-string-typed-optional-parameter-flag.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-string-typed-optional-parameter-flag.json.
     233        * inspector/scripts/tests/fail-on-string-typed-optional-type-member.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-string-typed-optional-type-member.json.
     234        * inspector/scripts/tests/fail-on-type-declaration-using-type-reference.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-type-declaration-using-type-reference.json.
     235        * inspector/scripts/tests/fail-on-type-reference-as-primitive-type.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-type-reference-as-primitive-type.json.
     236        * inspector/scripts/tests/fail-on-type-with-lowercase-name.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-type-with-lowercase-name.json.
     237        * inspector/scripts/tests/fail-on-unknown-type-reference-in-type-declaration.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-unknown-type-reference-in-type-declaration.json.
     238        * inspector/scripts/tests/fail-on-unknown-type-reference-in-type-member.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/fail-on-unknown-type-reference-in-type-member.json.
     239        * inspector/scripts/tests/generate-domains-with-feature-guards.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/generate-domains-with-feature-guards.json.
     240        * inspector/scripts/tests/same-type-id-different-domain.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/same-type-id-different-domain.json.
     241        * inspector/scripts/tests/shadowed-optional-type-setters.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/shadowed-optional-type-setters.json.
     242        * inspector/scripts/tests/should-strip-comments.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/should-strip-comments.json.
     243        * inspector/scripts/tests/type-declaration-aliased-primitive-type.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/type-declaration-aliased-primitive-type.json.
     244        * inspector/scripts/tests/type-declaration-array-type.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/type-declaration-array-type.json.
     245        * inspector/scripts/tests/type-declaration-enum-type.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/type-declaration-enum-type.json.
     246        * inspector/scripts/tests/type-declaration-object-type.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/type-declaration-object-type.json.
     247        * inspector/scripts/tests/type-requiring-runtime-casts.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/type-requiring-runtime-casts.json.
     248        * inspector/scripts/tests/type-with-open-parameters.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/type-with-open-parameters.json.
     249        * inspector/scripts/tests/version.json: Renamed from Source/JavaScriptCore/inspector/scripts/tests/generic/version.json.
     250        * inspector/scripts/tests/generic/definitions-with-mac-platform.json: Removed.
     251        * inspector/scripts/tests/generic/expected/definitions-with-mac-platform.json-result: Removed.
     252        * inspector/scripts/tests/generic/fail-on-command-with-invalid-platform.json: Removed.
     253        * inspector/scripts/tests/generic/expected/fail-on-command-with-invalid-platform.json-error: Removed.
     254        * inspector/scripts/tests/generic/fail-on-type-with-invalid-platform.json: Removed.
     255        * inspector/scripts/tests/generic/expected/fail-on-type-with-invalid-platform.json-error: Removed.
     256        * inspector/scripts/tests/ios/definitions-with-mac-platform.json: Removed.
     257        * inspector/scripts/tests/ios/expected/definitions-with-mac-platform.json-result: Removed.
     258        * inspector/scripts/tests/all/definitions-with-mac-platform.json: Removed.
     259        * inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result: Removed.
     260        Don't separate the inspector generator tests by platform.
     261
    12622020-05-27  Keith Miller  <keith_miller@apple.com>
    2263
  • trunk/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig

    r261845 r262203  
    378378ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN_macosx = ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN;
    379379
     380ENABLE_WEB_ARCHIVE = ENABLE_WEB_ARCHIVE;
     381
    380382ENABLE_WEBDRIVER_MOUSE_INTERACTIONS = $(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS_$(WK_PLATFORM_NAME));
    381383ENABLE_WEBDRIVER_MOUSE_INTERACTIONS_macosx = ENABLE_WEBDRIVER_MOUSE_INTERACTIONS;
     
    420422ENABLE_XSLT = ENABLE_XSLT;
    421423
    422 FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_C_LOOP) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_EDITABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FULLSCREEN_API) $(ENABLE_PICTURE_IN_PICTURE_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_GPU_PROCESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS) $(ENABLE_INSPECTOR_TELEMETRY) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_MEMORY_SAMPLER) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION) $(ENABLE_NETWORK_CACHE_STALE_WHILE_REVALIDATE) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFSCREEN_CANVAS) $(ENABLE_OVERFLOW_SCROLLING_TOUCH) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESIZE_OBSERVER) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SANDBOX_EXTENSIONS) $(ENABLE_SERVER_PRECONNECT) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SHAREABLE_RESOURCE) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USERSELECT_ALL) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS) $(ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS) $(ENABLE_WEBDRIVER_TOUCH_INTERACTIONS) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBXR) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_CRYPTO) $(ENABLE_WEB_RTC) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
     424FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_C_LOOP) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_EDITABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FULLSCREEN_API) $(ENABLE_PICTURE_IN_PICTURE_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_GPU_PROCESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS) $(ENABLE_INSPECTOR_TELEMETRY) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_MEMORY_SAMPLER) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION) $(ENABLE_NETWORK_CACHE_STALE_WHILE_REVALIDATE) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFSCREEN_CANVAS) $(ENABLE_OVERFLOW_SCROLLING_TOUCH) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESIZE_OBSERVER) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SANDBOX_EXTENSIONS) $(ENABLE_SERVER_PRECONNECT) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SHAREABLE_RESOURCE) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USERSELECT_ALL) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_ARCHIVE) $(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS) $(ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS) $(ENABLE_WEBDRIVER_TOUCH_INTERACTIONS) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBXR) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_CRYPTO) $(ENABLE_WEB_RTC) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
  • trunk/Source/JavaScriptCore/DerivedSources-input.xcfilelist

    r261215 r262203  
    11# This file is generated by the generate-xcfilelists script.
     2$(PROJECT_DIR)/Configurations/FeatureDefines.xcconfig
    23$(PROJECT_DIR)/DerivedSources.make
    34$(PROJECT_DIR)/KeywordLookupGenerator.py
     
    8182$(PROJECT_DIR)/inspector/protocol/ApplicationCache.json
    8283$(PROJECT_DIR)/inspector/protocol/Audit.json
     84$(PROJECT_DIR)/inspector/protocol/Browser.json
    8385$(PROJECT_DIR)/inspector/protocol/CPUProfiler.json
    8486$(PROJECT_DIR)/inspector/protocol/CSS.json
     
    9092$(PROJECT_DIR)/inspector/protocol/Database.json
    9193$(PROJECT_DIR)/inspector/protocol/Debugger.json
    92 $(PROJECT_DIR)/inspector/protocol/Browser.json
    9394$(PROJECT_DIR)/inspector/protocol/GenericTypes.json
    9495$(PROJECT_DIR)/inspector/protocol/Heap.json
     
    120121$(PROJECT_DIR)/inspector/scripts/codegen/generator_templates.py
    121122$(PROJECT_DIR)/inspector/scripts/codegen/models.py
     123$(PROJECT_DIR)/inspector/scripts/codegen/preprocess.pl
    122124$(PROJECT_DIR)/inspector/scripts/generate-inspector-protocol-bindings.py
    123125$(PROJECT_DIR)/parser/Keywords.table
  • trunk/Source/JavaScriptCore/DerivedSources.make

    r261215 r262203  
    4545else
    4646    DELETE = rm -f
     47endif
     48
     49PREPROCESSOR_DEFINES = $(FEATURE_DEFINES)
     50
     51FRAMEWORK_FLAGS = $(shell echo $(BUILT_PRODUCTS_DIR) $(FRAMEWORK_SEARCH_PATHS) $(SYSTEM_FRAMEWORK_SEARCH_PATHS) | perl -e 'print "-F " . join(" -F ", split(" ", <>));')
     52HEADER_FLAGS = $(shell echo $(BUILT_PRODUCTS_DIR) $(HEADER_SEARCH_PATHS) $(SYSTEM_HEADER_SEARCH_PATHS) | perl -e 'print "-I" . join(" -I", split(" ", <>));')
     53
     54ifneq ($(SDKROOT),)
     55    SDK_FLAGS=-isysroot $(SDKROOT)
     56endif
     57
     58ifeq ($(USE_LLVM_TARGET_TRIPLES_FOR_CLANG),YES)
     59    WK_CURRENT_ARCH=$(word 1, $(ARCHS))
     60    TARGET_TRIPLE_FLAGS=-target $(WK_CURRENT_ARCH)-$(LLVM_TARGET_TRIPLE_VENDOR)-$(LLVM_TARGET_TRIPLE_OS_VERSION)$(LLVM_TARGET_TRIPLE_SUFFIX)
     61endif
     62
     63ifeq ($(shell $(CC) -std=gnu++1z -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep ' WTF_PLATFORM_MAC ' | cut -d' ' -f3), 1)
     64    PREPROCESSOR_DEFINES += WTF_PLATFORM_MAC
     65endif
     66
     67ifeq ($(shell $(CC) -std=gnu++1z -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep ' WTF_PLATFORM_IOS_FAMILY ' | cut -d' ' -f3), 1)
     68    PREPROCESSOR_DEFINES += WTF_PLATFORM_IOS_FAMILY
     69endif
     70
     71ifeq ($(shell $(CC) -std=gnu++1z -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep ' USE_CF ' | cut -d' ' -f3), 1)
     72    PREPROCESSOR_DEFINES += USE_CF
     73endif
     74
     75ifeq ($(shell $(CC) -std=gnu++1z -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep HAVE_OS_DARK_MODE_SUPPORT | cut -d' ' -f3), 1)
     76    PREPROCESSOR_DEFINES += HAVE_OS_DARK_MODE_SUPPORT
     77else
     78endif
     79
     80ifeq ($(PLATFORM_FEATURE_DEFINES),)
     81ifeq ($(OS), Windows_NT)
     82PLATFORM_FEATURE_DEFINES = $(WEBKIT_LIBRARIES)/tools/vsprops/FeatureDefines.props
     83else
     84PLATFORM_FEATURE_DEFINES = Configurations/FeatureDefines.xcconfig
     85endif
    4786endif
    4887
     
    244283    $(JavaScriptCore)/inspector/protocol/ApplicationCache.json \
    245284    $(JavaScriptCore)/inspector/protocol/Audit.json \
     285    $(JavaScriptCore)/inspector/protocol/Browser.json \
     286    $(JavaScriptCore)/inspector/protocol/CPUProfiler.json \
    246287    $(JavaScriptCore)/inspector/protocol/CSS.json \
    247288    $(JavaScriptCore)/inspector/protocol/Canvas.json \
     
    252293    $(JavaScriptCore)/inspector/protocol/Database.json \
    253294    $(JavaScriptCore)/inspector/protocol/Debugger.json \
    254     $(JavaScriptCore)/inspector/protocol/Browser.json \
    255295    $(JavaScriptCore)/inspector/protocol/GenericTypes.json \
    256296    $(JavaScriptCore)/inspector/protocol/Heap.json \
     297    $(JavaScriptCore)/inspector/protocol/IndexedDB.json \
    257298    $(JavaScriptCore)/inspector/protocol/Inspector.json \
    258299    $(JavaScriptCore)/inspector/protocol/LayerTree.json \
     300    $(JavaScriptCore)/inspector/protocol/Memory.json \
    259301    $(JavaScriptCore)/inspector/protocol/Network.json \
    260302    $(JavaScriptCore)/inspector/protocol/Page.json \
     
    263305    $(JavaScriptCore)/inspector/protocol/ScriptProfiler.json \
    264306    $(JavaScriptCore)/inspector/protocol/Security.json \
     307    $(JavaScriptCore)/inspector/protocol/ServiceWorker.json \
    265308    $(JavaScriptCore)/inspector/protocol/Target.json \
    266309    $(JavaScriptCore)/inspector/protocol/Timeline.json \
    267310    $(JavaScriptCore)/inspector/protocol/Worker.json \
    268311#
    269 
    270 ifeq ($(findstring ENABLE_INDEXED_DATABASE,$(FEATURE_DEFINES)), ENABLE_INDEXED_DATABASE)
    271     INSPECTOR_DOMAINS := $(INSPECTOR_DOMAINS) $(JavaScriptCore)/inspector/protocol/IndexedDB.json
    272 endif
    273 
    274 ifeq ($(findstring ENABLE_RESOURCE_USAGE,$(FEATURE_DEFINES)), ENABLE_RESOURCE_USAGE)
    275     INSPECTOR_DOMAINS := $(INSPECTOR_DOMAINS) $(JavaScriptCore)/inspector/protocol/CPUProfiler.json
    276     INSPECTOR_DOMAINS := $(INSPECTOR_DOMAINS) $(JavaScriptCore)/inspector/protocol/Memory.json
    277 endif
    278 
    279 ifeq ($(findstring ENABLE_SERVICE_WORKER,$(FEATURE_DEFINES)), ENABLE_SERVICE_WORKER)
    280     INSPECTOR_DOMAINS := $(INSPECTOR_DOMAINS) $(JavaScriptCore)/inspector/protocol/ServiceWorker.json
    281 endif
    282312
    283313INSPECTOR_GENERATOR_SCRIPTS = \
     
    295325        $(JavaScriptCore)/inspector/scripts/codegen/generator.py \
    296326        $(JavaScriptCore)/inspector/scripts/codegen/models.py \
     327        $(JavaScriptCore)/inspector/scripts/codegen/preprocess.pl \
    297328        $(JavaScriptCore)/inspector/scripts/generate-inspector-protocol-bindings.py \
    298329        $(JavaScriptCore_SCRIPTS_DIR)/generate-combined-inspector-json.py \
     
    303334INSPECTOR_DISPATCHER_FILES = \
    304335    inspector/InspectorAlternateBackendDispatchers.h \
    305     inspector/InspectorBackendCommands.js \
    306336    inspector/InspectorBackendDispatchers.cpp \
    307337    inspector/InspectorBackendDispatchers.h \
     
    313343INSPECTOR_DISPATCHER_FILES_PATTERNS = $(subst .,%,$(INSPECTOR_DISPATCHER_FILES))
    314344
    315 all : $(INSPECTOR_DISPATCHER_FILES)
     345all : $(INSPECTOR_DISPATCHER_FILES) inspector/InspectorBackendCommands.js
    316346
    317347# The combined JSON file depends on the actual set of domains and their file contents, so that
     
    328358$(INSPECTOR_DISPATCHER_FILES_PATTERNS) : CombinedDomains.json $(INSPECTOR_GENERATOR_SCRIPTS)
    329359        $(PYTHON) $(JavaScriptCore)/inspector/scripts/generate-inspector-protocol-bindings.py --framework JavaScriptCore --outputDir inspector ./CombinedDomains.json
     360
     361inspector/InspectorBackendCommands.js : CombinedDomains.json $(INSPECTOR_GENERATOR_SCRIPTS) $(PLATFORM_FEATURE_DEFINES)
     362        $(PYTHON) $(JavaScriptCore)/inspector/scripts/generate-inspector-protocol-bindings.py --framework WebInspectorUI --outputDir inspector ./CombinedDomains.json
     363        @echo Pre-processing InspectorBackendCommands...
     364        $(PERL) $(JavaScriptCore)/inspector/scripts/codegen/preprocess.pl --input inspector/InspectorBackendCommands.js.in --defines "$(PREPROCESSOR_DEFINES)" --output inspector/InspectorBackendCommands.js
     365        $(DELETE) inspector/InspectorBackendCommands.js.in
    330366
    331367InjectedScriptSource.h : inspector/InjectedScriptSource.js $(JavaScriptCore_SCRIPTS_DIR)/jsmin.py $(JavaScriptCore_SCRIPTS_DIR)/xxd.pl
  • trunk/Source/JavaScriptCore/Scripts/generate-derived-sources.sh

    r238639 r262203  
    1212export BUILT_PRODUCTS_DIR="../.."
    1313
     14if [ ! $CC ]; then
     15    export CC="`xcrun -find clang`"
     16fi
     17
    1418make --no-builtin-rules -f "JavaScriptCore/DerivedSources.make" -j `/usr/sbin/sysctl -n hw.ncpu` "${ARGS[@]}"
  • trunk/Source/JavaScriptCore/inspector/protocol/CPUProfiler.json

    r251227 r262203  
    22    "domain": "CPUProfiler",
    33    "description": "CPUProfiler domain exposes cpu usage tracking.",
    4     "featureGuard": "ENABLE(RESOURCE_USAGE)",
     4    "condition": "defined(ENABLE_RESOURCE_USAGE) && ENABLE_RESOURCE_USAGE",
    55    "debuggableTypes": ["page", "web-page"],
    66    "targetTypes": ["page"],
  • trunk/Source/JavaScriptCore/inspector/protocol/Canvas.json

    r251227 r262203  
    1212        {
    1313            "id": "ProgramId",
     14            "condition": "(defined(ENABLE_WEBGL) && ENABLE_WEBGL) || (defined(ENABLE_WEBGPU) && ENABLE_WEBGPU)",
    1415            "type": "string",
    1516            "description": "Unique shader program identifier."
     
    2324        {
    2425            "id": "ProgramType",
     26            "condition": "(defined(ENABLE_WEBGL) && ENABLE_WEBGL) || (defined(ENABLE_WEBGPU) && ENABLE_WEBGPU)",
    2527            "type": "string",
    2628            "enum": ["compute", "render"]
     
    2830        {
    2931            "id": "ShaderType",
     32            "condition": "(defined(ENABLE_WEBGL) && ENABLE_WEBGL) || (defined(ENABLE_WEBGPU) && ENABLE_WEBGPU)",
    3033            "type": "string",
    3134            "enum": ["compute", "fragment", "vertex"]
     
    6265        {
    6366            "id": "ShaderProgram",
     67            "description": "Information about a WebGL/WebGL2 shader program or WebGPU shader pipeline.",
     68            "condition": "(defined(ENABLE_WEBGL) && ENABLE_WEBGL) || (defined(ENABLE_WEBGPU) && ENABLE_WEBGPU)",
    6469            "type": "object",
    65             "description": "Information about a WebGL/WebGL2 shader program or WebGPU shader pipeline.",
    6670            "properties": [
    6771                { "name": "programId", "$ref": "ProgramId" },
     
    148152            "name": "requestShaderSource",
    149153            "description": "Requests the source of the shader of the given type from the program with the given id.",
     154            "condition": "(defined(ENABLE_WEBGL) && ENABLE_WEBGL) || (defined(ENABLE_WEBGPU) && ENABLE_WEBGPU)",
    150155            "parameters": [
    151156                { "name": "programId", "$ref": "ProgramId" },
     
    159164            "name": "updateShader",
    160165            "description": "Compiles and links the shader with identifier and type with the given source code.",
     166            "condition": "(defined(ENABLE_WEBGL) && ENABLE_WEBGL) || (defined(ENABLE_WEBGPU) && ENABLE_WEBGPU)",
    161167            "parameters": [
    162168                { "name": "programId", "$ref": "ProgramId" },
     
    168174            "name": "setShaderProgramDisabled",
    169175            "description": "Enable/disable the visibility of the given shader program.",
     176            "condition": "defined(ENABLE_WEBGL) && ENABLE_WEBGL",
    170177            "parameters": [
    171178                { "name": "programId", "$ref": "ProgramId" },
     
    176183            "name": "setShaderProgramHighlighted",
    177184            "description": "Enable/disable highlighting of the given shader program.",
     185            "condition": "defined(ENABLE_WEBGL) && ENABLE_WEBGL",
    178186            "parameters": [
    179187                { "name": "programId", "$ref": "ProgramId" },
     
    239247        {
    240248            "name": "programCreated",
     249            "condition": "(defined(ENABLE_WEBGL) && ENABLE_WEBGL) || (defined(ENABLE_WEBGPU) && ENABLE_WEBGPU)",
    241250            "parameters": [
    242251                { "name": "shaderProgram", "$ref": "ShaderProgram" }
     
    245254        {
    246255            "name": "programDeleted",
     256            "condition": "(defined(ENABLE_WEBGL) && ENABLE_WEBGL) || (defined(ENABLE_WEBGPU) && ENABLE_WEBGPU)",
    247257            "parameters": [
    248258                { "name": "programId", "$ref": "ProgramId" }
  • trunk/Source/JavaScriptCore/inspector/protocol/DOM.json

    r251306 r262203  
    400400            "name": "setInspectModeEnabled",
    401401            "description": "Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspect' command upon element selection.",
     402            "condition": "defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY",
     403            "parameters": [
     404                { "name": "enabled", "type": "boolean", "description": "True to enable inspection mode, false to disable it." },
     405                { "name": "highlightConfig", "$ref": "HighlightConfig", "optional": true, "description": "A descriptor for the highlight appearance of hovered-over nodes. May be omitted if <code>enabled == false</code>." }
     406            ]
     407        },
     408        {
     409            "name": "setInspectModeEnabled",
     410            "description": "Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspect' command upon element selection.",
     411            "condition": "!(defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)",
    402412            "parameters": [
    403413                { "name": "enabled", "type": "boolean", "description": "True to enable inspection mode, false to disable it." },
     
    689699            "name": "powerEfficientPlaybackStateChanged",
    690700            "description": "Called when an element enters/exits a power efficient playback state.",
     701            "condition": "defined(ENABLE_VIDEO) && ENABLE_VIDEO",
    691702            "parameters": [
    692703                { "name": "nodeId", "$ref": "NodeId" },
  • trunk/Source/JavaScriptCore/inspector/protocol/IndexedDB.json

    r251227 r262203  
    11{
    22    "domain": "IndexedDB",
    3     "featureGuard": "ENABLE(INDEXED_DATABASE)",
     3    "condition": "defined(ENABLE_INDEXED_DATABASE) && ENABLE_INDEXED_DATABASE",
    44    "debuggableTypes": ["page", "web-page"],
    55    "targetTypes": ["page"],
  • trunk/Source/JavaScriptCore/inspector/protocol/Inspector.json

    r251227 r262203  
    3434            "name": "activateExtraDomains",
    3535            "description": "Fired when the backend has alternate domains that need to be activated.",
     36            "condition": "defined(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS) && ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS",
    3637            "parameters": [
    3738                { "name": "domains", "type": "array", "items": { "type": "string" }, "description": "Domain names that need activation" }
  • trunk/Source/JavaScriptCore/inspector/protocol/Memory.json

    r251227 r262203  
    22    "domain": "Memory",
    33    "description": "Memory domain exposes page memory tracking.",
    4     "featureGuard": "ENABLE(RESOURCE_USAGE)",
     4    "condition": "defined(ENABLE_RESOURCE_USAGE) && ENABLE_RESOURCE_USAGE",
    55    "debuggableTypes": ["page", "web-page"],
    66    "targetTypes": ["page"],
  • trunk/Source/JavaScriptCore/inspector/protocol/Page.json

    r261103 r262203  
    4646            "id": "Appearance",
    4747            "type": "string",
     48            "condition": "(defined(ENABLE_DARK_MODE_CSS) && ENABLE_DARK_MODE_CSS) || (defined(HAVE_OS_DARK_MODE_SUPPORT) && HAVE_OS_DARK_MODE_SUPPORT)",
    4849            "enum": ["Light", "Dark"],
    4950            "description": "Page appearance name."
     
    230231            "name": "setShowRulers",
    231232            "description": "Requests that backend draw rulers in the inspector overlay",
     233            "condition": "!(defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)",
    232234            "parameters": [
    233235                { "name": "result", "type": "boolean", "description": "True for showing rulers" }
     
    251253            "name": "setForcedAppearance",
    252254            "description": "Forces the given appearance for the page.",
     255            "condition": "(defined(ENABLE_DARK_MODE_CSS) && ENABLE_DARK_MODE_CSS) || (defined(HAVE_OS_DARK_MODE_SUPPORT) && HAVE_OS_DARK_MODE_SUPPORT)",
    253256            "parameters": [
    254257                { "name": "appearance", "$ref": "Appearance", "description": "Appearance name to force. Empty string disables the override." }
     
    282285            "name": "archive",
    283286            "description": "Grab an archive of the page.",
     287            "condition": "(defined(ENABLE_WEB_ARCHIVE) && ENABLE_WEB_ARCHIVE) && (defined(USE_CF) && USE_CF)",
    284288            "returns": [
    285289                { "name": "data", "type": "string", "description": "Base64-encoded web archive." }
     
    346350            "name": "defaultAppearanceDidChange",
    347351            "description": "Fired when page's default appearance changes, even if there is a forced appearance.",
     352            "condition": "(defined(ENABLE_DARK_MODE_CSS) && ENABLE_DARK_MODE_CSS) || (defined(HAVE_OS_DARK_MODE_SUPPORT) && HAVE_OS_DARK_MODE_SUPPORT)",
    348353            "parameters": [
    349354                { "name": "appearance", "$ref": "Appearance", "description": "Name of the appearance that is active (not considering any forced appearance.)" }
  • trunk/Source/JavaScriptCore/inspector/protocol/ServiceWorker.json

    r251227 r262203  
    22    "domain": "ServiceWorker",
    33    "description": "Actions and events related to the inspected service worker.",
     4    "condition": "defined(ENABLE_SERVICE_WORKER) && ENABLE_SERVICE_WORKER",
    45    "debuggableTypes": ["service-worker"],
    56    "targetTypes": ["service-worker"],
  • trunk/Source/JavaScriptCore/inspector/scripts/codegen/cpp_generator_templates.py

    r261569 r262203  
    109109private:
    110110    Alternate${domainName}BackendDispatcher* m_alternateDispatcher { nullptr };
    111 #endif""")
     111#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)""")
    112112
    113113    BackendDispatcherHeaderAsyncCommandDeclaration = (
     
    128128
    129129${dispatchCases}
    130     else
    131         m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'${domainName}." + method + "' was not found");
     130
     131    m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'${domainName}." + method + "' was not found");
    132132}""")
    133133
  • trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_alternate_backend_dispatcher_header.py

    r236321 r262203  
    5757        sections.append(self.generate_license())
    5858        sections.append(Template(CppTemplates.AlternateDispatchersHeaderPrelude).substitute(None, **template_args))
    59         sections.append('\n'.join([_f for _f in map(self._generate_handler_declarations_for_domain, domains) if _f]))
     59        sections.append('\n\n'.join([_f for _f in map(self._generate_handler_declarations_for_domain, domains) if _f]))
    6060        sections.append(Template(CppTemplates.AlternateDispatchersHeaderPostlude).substitute(None, **template_args))
    6161        return '\n\n'.join(sections)
     
    8888        }
    8989
    90         return self.wrap_with_guard_for_domain(domain, Template(CppTemplates.AlternateBackendDispatcherHeaderDomainHandlerInterfaceDeclaration).substitute(None, **handler_args))
     90        return self.wrap_with_guard_for_condition(domain.condition, Template(CppTemplates.AlternateBackendDispatcherHeaderDomainHandlerInterfaceDeclaration).substitute(None, **handler_args))
    9191
    9292    def _generate_handler_declaration_for_command(self, command):
     
    101101        }
    102102        lines.append('    virtual void %(commandName)s(%(parameters)s) = 0;' % command_args)
    103         return '\n'.join(lines)
     103        return self.wrap_with_guard_for_condition(command.condition, '\n'.join(lines))
  • trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_backend_dispatcher_header.py

    r236321 r262203  
    9292        lines.append('#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)')
    9393        for domain in domains:
    94             lines.append(self.wrap_with_guard_for_domain(domain, 'class Alternate%sBackendDispatcher;' % domain.domain_name))
     94            lines.append(self.wrap_with_guard_for_condition(domain.condition, 'class Alternate%sBackendDispatcher;' % domain.domain_name))
    9595        lines.append('#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)')
    9696        return '\n'.join(lines)
     
    114114        }
    115115
    116         return self.wrap_with_guard_for_domain(domain, Template(CppTemplates.BackendDispatcherHeaderDomainHandlerDeclaration).substitute(None, **handler_args))
     116        return self.wrap_with_guard_for_condition(domain.condition, Template(CppTemplates.BackendDispatcherHeaderDomainHandlerDeclaration).substitute(None, **handler_args))
    117117
    118118    def _generate_anonymous_enum_for_parameter(self, parameter, command):
     
    162162        }
    163163        lines.append('    virtual void %(commandName)s(%(parameters)s) = 0;' % command_args)
    164         return '\n'.join(lines)
     164        return self.wrap_with_guard_for_condition(command.condition, '\n'.join(lines))
    165165
    166166    def _generate_async_handler_declaration_for_command(self, command):
     
    193193        }
    194194
    195         return Template(CppTemplates.BackendDispatcherHeaderAsyncCommandDeclaration).substitute(None, **command_args)
     195        return self.wrap_with_guard_for_condition(command.condition, Template(CppTemplates.BackendDispatcherHeaderAsyncCommandDeclaration).substitute(None, **command_args))
    196196
    197197    def _generate_dispatcher_declarations_for_domain(self, domain):
     
    221221        }
    222222
    223         return self.wrap_with_guard_for_domain(domain, Template(CppTemplates.BackendDispatcherHeaderDomainDispatcherDeclaration).substitute(None, **handler_args))
     223        return self.wrap_with_guard_for_condition(domain.condition, Template(CppTemplates.BackendDispatcherHeaderDomainDispatcherDeclaration).substitute(None, **handler_args))
    224224
    225225    def _generate_dispatcher_declaration_for_command(self, command):
    226         return "    void %s(long requestId, RefPtr<JSON::Object>&& parameters);" % command.command_name
     226        return self.wrap_with_guard_for_condition(command.condition, "    void %s(long requestId, RefPtr<JSON::Object>&& parameters);" % command.command_name)
  • trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py

    r239477 r262203  
    6161            secondary_includes.append('#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)')
    6262            secondary_includes.append('#include "%sAlternateBackendDispatchers.h"' % self.protocol_name())
    63             secondary_includes.append('#endif')
     63            secondary_includes.append('#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)')
    6464
    6565        header_args = {
     
    9494        }
    9595        destructor = '%(domainName)sBackendDispatcherHandler::~%(domainName)sBackendDispatcherHandler() { }' % destructor_args
    96         return self.wrap_with_guard_for_domain(domain, destructor)
     96        return self.wrap_with_guard_for_condition(domain.condition, destructor)
    9797
    9898    def _generate_dispatcher_implementations_for_domain(self, domain):
     
    116116            implementations.append(self._generate_dispatcher_implementation_for_command(command, domain))
    117117
    118         return self.wrap_with_guard_for_domain(domain, '\n\n'.join(implementations))
     118        return self.wrap_with_guard_for_condition(domain.condition, '\n\n'.join(implementations))
    119119
    120120    def _generate_small_dispatcher_switch_implementation_for_domain(self, domain):
     
    122122
    123123        cases = []
    124         cases.append('    if (method == "%s")' % commands[0].command_name)
    125         cases.append('        %s(requestId, WTFMove(parameters));' % commands[0].command_name)
     124
     125        first_command_string = "\n".join([
     126            '    if (method == "%s") {' % commands[0].command_name,
     127            '        %s(requestId, WTFMove(parameters));' % commands[0].command_name,
     128            '        return;',
     129            '    }',
     130        ])
     131        cases.append(self.wrap_with_guard_for_condition(commands[0].condition, first_command_string))
     132
    126133        for command in commands[1:]:
    127             cases.append('    else if (method == "%s")' % command.command_name)
    128             cases.append('        %s(requestId, WTFMove(parameters));' % command.command_name)
     134            additional_command_string = "\n".join([
     135                '    if (method == "%s") {' % command.command_name,
     136                '        %s(requestId, WTFMove(parameters));' % command.command_name,
     137                '        return;',
     138                '    }',
     139            ])
     140            cases.append(self.wrap_with_guard_for_condition(command.condition, additional_command_string))
    129141
    130142        switch_args = {
     
    144156                'commandName': command.command_name
    145157            }
    146             cases.append('            { "%(commandName)s", &%(domainName)sBackendDispatcher::%(commandName)s },' % args)
     158            cases.append(self.wrap_with_guard_for_condition(command.condition, '            { "%(commandName)s", &%(domainName)sBackendDispatcher::%(commandName)s },' % args))
    147159
    148160        switch_args = {
     
    186198            'outParameterAssignments': "\n".join(out_parameter_assignments)
    187199        }
    188         return Template(CppTemplates.BackendDispatcherImplementationAsyncCommand).substitute(None, **async_args)
     200        return self.wrap_with_guard_for_condition(command.condition, Template(CppTemplates.BackendDispatcherImplementationAsyncCommand).substitute(None, **async_args))
    189201
    190202    def _generate_dispatcher_implementation_for_command(self, command, domain):
     
    305317            lines.append('        return;')
    306318            lines.append('    }')
    307             lines.append('#endif')
     319            lines.append('#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)')
    308320            lines.append('')
    309321
     
    335347
    336348        lines.append('}')
    337         return "\n".join(lines)
     349        return self.wrap_with_guard_for_condition(command.condition, "\n".join(lines))
  • trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_frontend_dispatcher_header.py

    r236321 r262203  
    112112        }
    113113
    114         return self.wrap_with_guard_for_domain(domain, Template(CppTemplates.FrontendDispatcherDomainDispatcherDeclaration).substitute(None, **handler_args))
     114        return self.wrap_with_guard_for_condition(domain.condition, Template(CppTemplates.FrontendDispatcherDomainDispatcherDeclaration).substitute(None, **handler_args))
    115115
    116116    def _generate_dispatcher_declaration_for_event(self, event, domain, used_enum_names):
     
    124124
    125125        lines.append("    void %s(%s);" % (event.event_name, ", ".join(formal_parameters)))
    126         return "\n".join(lines)
     126        return self.wrap_with_guard_for_condition(event.condition, "\n".join(lines))
  • trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py

    r236321 r262203  
    8383            implementations.append(self._generate_dispatcher_implementation_for_event(event, domain))
    8484
    85         return self.wrap_with_guard_for_domain(domain, '\n\n'.join(implementations))
     85        return self.wrap_with_guard_for_condition(domain.condition, '\n\n'.join(implementations))
    8686
    8787    def _generate_dispatcher_implementation_for_event(self, event, domain):
     
    132132        lines.append('    m_frontendRouter.sendEvent(jsonMessage->toJSONString());')
    133133        lines.append('}')
    134         return "\n".join(lines)
     134        return self.wrap_with_guard_for_condition(event.condition, "\n".join(lines))
  • trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_header.py

    r250005 r262203  
    106106
    107107            domain_lines.append('} // %s' % domain.domain_name)
    108             sections.append(self.wrap_with_guard_for_domain(domain, '\n'.join(domain_lines)))
     108            sections.append(self.wrap_with_guard_for_condition(domain.condition, '\n'.join(domain_lines)))
    109109
    110110        if len(sections) == 0:
     
    133133
    134134            # Forward-declare all classes so the type builders won't break if rearranged.
    135             domain_lines.extend('class %s;' % object_type.raw_name() for object_type in object_types)
    136             domain_lines.extend('enum class %s;' % enum_type.raw_name() for enum_type in enum_types)
     135            domain_lines.extend(self.wrap_with_guard_for_condition(object_type.declaration().condition, 'class %s;' % object_type.raw_name()) for object_type in object_types)
     136            domain_lines.extend(self.wrap_with_guard_for_condition(enum_type.declaration().condition, 'enum class %s;' % enum_type.raw_name()) for enum_type in enum_types)
    137137            domain_lines.append('} // %s' % domain.domain_name)
    138             sections.append(self.wrap_with_guard_for_domain(domain, '\n'.join(domain_lines)))
     138            sections.append(self.wrap_with_guard_for_condition(domain.condition, '\n'.join(domain_lines)))
    139139
    140140        if len(sections) == 0:
     
    171171                typedef_lines.append('/* %s */' % declaration.description)
    172172            typedef_lines.append('typedef %s %s;' % (primitive_name, declaration.type_name))
    173             sections.append('\n'.join(typedef_lines))
     173            sections.append(self.wrap_with_guard_for_condition(declaration.condition, '\n'.join(typedef_lines)))
    174174
    175175        for declaration in array_declarations:
     
    179179                typedef_lines.append('/* %s */' % declaration.description)
    180180            typedef_lines.append('typedef JSON::ArrayOf<%s> %s;' % (element_type, declaration.type_name))
    181             sections.append('\n'.join(typedef_lines))
     181            sections.append(self.wrap_with_guard_for_condition(declaration.condition, '\n'.join(typedef_lines)))
    182182
    183183        lines = []
     
    185185        lines.append('\n'.join(sections))
    186186        lines.append('} // %s' % domain.domain_name)
    187         return self.wrap_with_guard_for_domain(domain, '\n'.join(lines))
     187        return self.wrap_with_guard_for_condition(domain.condition, '\n'.join(lines))
    188188
    189189    def _generate_enum_constant_value_conversion_methods(self):
     
    226226        lines = []
    227227        lines.append('namespace %s {' % domain.domain_name)
    228         lines.append('\n'.join(sections))
     228        lines.append('')
     229        lines.append('\n\n'.join(sections))
     230        lines.append('')
    229231        lines.append('} // %s' % domain.domain_name)
    230         return self.wrap_with_guard_for_domain(domain, '\n'.join(lines))
     232        return self.wrap_with_guard_for_condition(domain.condition, '\n'.join(lines))
    231233
    232234    def _generate_class_for_object_declaration(self, type_declaration, domain):
     
    279281
    280282        lines.append('};')
    281         lines.append('')
    282         return '\n'.join(lines)
     283        return self.wrap_with_guard_for_condition(type_declaration.condition, '\n'.join(lines))
    283284
    284285    def _generate_struct_for_enum_declaration(self, enum_declaration):
    285286        lines = []
    286         lines.append('/* %s */' % enum_declaration.description)
     287        if len(enum_declaration.description):
     288            lines.append('/* %s */' % enum_declaration.description)
    287289        lines.extend(self._generate_struct_for_enum_type(enum_declaration.type_name, enum_declaration.type))
    288         return '\n'.join(lines)
     290        return self.wrap_with_guard_for_condition(enum_declaration.condition, '\n'.join(lines))
    289291
    290292    def _generate_struct_for_anonymous_enum_member(self, enum_member):
     
    382384                for type_member in type_declaration.type_members:
    383385                    if isinstance(type_member.type, EnumType):
    384                         type_arguments.append((CppGenerator.cpp_protocol_type_for_type_member(type_member, type_declaration), False))
     386                        type_arguments.append((self.wrap_with_guard_for_condition(type_declaration.condition, CppGenerator.cpp_protocol_type_for_type_member(type_member, type_declaration)), False))
    385387
    386388                if isinstance(type_declaration.type, ObjectType):
    387                     type_arguments.append((CppGenerator.cpp_protocol_type_for_type(type_declaration.type), Generator.type_needs_runtime_casts(type_declaration.type)))
     389                    type_arguments.append((self.wrap_with_guard_for_condition(type_declaration.condition, CppGenerator.cpp_protocol_type_for_type(type_declaration.type)), Generator.type_needs_runtime_casts(type_declaration.type)))
    388390
    389391        struct_keywords = ['struct']
     
    438440            for enum_type in enum_types:
    439441                cpp_protocol_type = CppGenerator.cpp_protocol_type_for_type(enum_type)
    440                 domain_lines.append('template<>')
    441                 domain_lines.append('%s parseEnumValueFromString<%s>(const String&);' % (return_type_with_export_macro(cpp_protocol_type), cpp_protocol_type))
     442                domain_lines.append(self.wrap_with_guard_for_condition(enum_type.declaration().condition, 'template<>\n%s parseEnumValueFromString<%s>(const String&);' % (return_type_with_export_macro(cpp_protocol_type), cpp_protocol_type)))
    442443
    443444            for object_type in object_types:
     445                object_lines = []
    444446                for enum_member in filter(type_member_is_anonymous_enum_type, object_type.members):
    445447                    cpp_protocol_type = CppGenerator.cpp_protocol_type_for_type_member(enum_member, object_type.declaration())
    446                     domain_lines.append('template<>')
    447                     domain_lines.append('%s parseEnumValueFromString<%s>(const String&);' % (return_type_with_export_macro(cpp_protocol_type), cpp_protocol_type))
     448                    object_lines.append('template<>\n%s parseEnumValueFromString<%s>(const String&);' % (return_type_with_export_macro(cpp_protocol_type), cpp_protocol_type))
     449                if len(object_lines):
     450                    domain_lines.append(self.wrap_with_guard_for_condition(object_type.declaration().condition, '\n'.join(object_lines)))
    448451
    449452            if len(domain_lines) == 1:
    450453                continue  # No real declarations to emit, just the domain comment. Skip.
    451454
    452             sections.append(self.wrap_with_guard_for_domain(domain, '\n'.join(domain_lines)))
     455            sections.append(self.wrap_with_guard_for_condition(domain.condition, '\n'.join(domain_lines)))
    453456
    454457        if len(sections) == 1:
     
    475478                lines.append('template<typename T> struct DefaultHash;')
    476479
    477             lines.append('')
    478             lines.append("// Hash declarations in the '%s' Domain" % domain.domain_name)
     480            domain_lines = []
     481
     482            domain_lines.append('')
     483            domain_lines.append("// Hash declarations in the '%s' Domain" % domain.domain_name)
    479484
    480485            for enum_type in enum_types:
    481                 lines.append('template<>')
    482                 lines.append('struct DefaultHash<Inspector::Protocol::%s::%s> {' % (domain.domain_name, enum_type.raw_name()))
    483                 lines.append('    typedef IntHash<Inspector::Protocol::%s::%s> Hash;' % (domain.domain_name, enum_type.raw_name()))
    484                 lines.append('};')
     486                enum_lines = []
     487                enum_lines.append('template<>')
     488                enum_lines.append('struct DefaultHash<Inspector::Protocol::%s::%s> {' % (domain.domain_name, enum_type.raw_name()))
     489                enum_lines.append('    typedef IntHash<Inspector::Protocol::%s::%s> Hash;' % (domain.domain_name, enum_type.raw_name()))
     490                enum_lines.append('};')
     491                domain_lines.append(self.wrap_with_guard_for_condition(enum_type.declaration().condition, '\n'.join(enum_lines)))
     492
     493            lines.append(self.wrap_with_guard_for_condition(domain.condition, '\n'.join(domain_lines)))
    485494
    486495        if len(lines) == 0:
  • trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py

    r254087 r262203  
    129129                '    return WTF::nullopt;',
    130130                '}',
    131                 '',
    132131            ])
    133             return body_lines
     132            return '\n'.join(body_lines)
    134133
    135134        type_declarations = self.type_declarations_for_domain(domain)
     
    147146        for enum_type in enum_types:
    148147            cpp_protocol_type = CppGenerator.cpp_protocol_type_for_type(enum_type)
    149             lines.extend(generate_conversion_method_body(enum_type, cpp_protocol_type))
     148            lines.append('')
     149            lines.append(self.wrap_with_guard_for_condition(enum_type.declaration().condition, generate_conversion_method_body(enum_type, cpp_protocol_type)))
    150150
    151151        for object_type in object_types:
     152            object_lines = []
    152153            for enum_member in filter(type_member_is_anonymous_enum_type, object_type.members):
    153154                cpp_protocol_type = CppGenerator.cpp_protocol_type_for_type_member(enum_member, object_type.declaration())
    154                 lines.extend(generate_conversion_method_body(enum_member.type, cpp_protocol_type))
     155                object_lines.append(generate_conversion_method_body(enum_member.type, cpp_protocol_type))
     156            if len(object_lines):
     157                if len(lines):
     158                    lines.append('')
     159                lines.append(self.wrap_with_guard_for_condition(object_type.declaration().condition, '\n'.join(object_lines)))
    155160
    156161        if len(lines) == 1:
    157162            return ''  # No real declarations to emit, just the domain comment.
    158163
    159         return self.wrap_with_guard_for_domain(domain, '\n'.join(lines))
     164        return self.wrap_with_guard_for_condition(domain.condition, '\n'.join(lines))
    160165
    161166    def _generate_enum_mapping_and_conversion_methods(self, domains):
     
    174179        lines = []
    175180        for domain in self.domains_to_generate():
     181            domain_lines = []
    176182            type_declarations = self.type_declarations_for_domain(domain)
    177183            for type_declaration in [decl for decl in type_declarations if Generator.type_has_open_fields(decl.type)]:
     
    179185                for type_member in sorted(open_members, key=lambda member: member.member_name):
    180186                    field_name = '::'.join(['Inspector', 'Protocol', domain.domain_name, ucfirst(type_declaration.type_name), ucfirst(type_member.member_name)])
    181                     lines.append('const char* %s = "%s";' % (field_name, type_member.member_name))
     187                    domain_lines.append('const char* %s = "%s";' % (field_name, type_member.member_name))
     188            if len(domain_lines):
     189                lines.append(self.wrap_with_guard_for_condition(domain.condition, '\n'.join(domain_lines)))
    182190
    183191        return '\n'.join(lines)
     
    189197
    190198        for type_declaration in declarations_to_generate:
     199            type_lines = []
    191200            for type_member in type_declaration.type_members:
    192201                if isinstance(type_member.type, EnumType):
    193                     sections.append(self._generate_assertion_for_enum(type_member, type_declaration))
     202                    type_lines.append(self._generate_assertion_for_enum(type_member, type_declaration))
    194203
    195204            if isinstance(type_declaration.type, ObjectType):
    196                 sections.append(self._generate_assertion_for_object_declaration(type_declaration))
     205                type_lines.append(self._generate_assertion_for_object_declaration(type_declaration))
    197206                if Generator.type_needs_runtime_casts(type_declaration.type):
    198                     sections.append(self._generate_runtime_cast_for_object_declaration(type_declaration))
    199 
    200         return '\n\n'.join(sections)
     207                    type_lines.append(self._generate_runtime_cast_for_object_declaration(type_declaration))
     208            if len(type_lines):
     209                sections.append(self.wrap_with_guard_for_condition(type_declaration.condition, '\n\n'.join(type_lines)))
     210
     211        if not len(sections):
     212            return ''
     213
     214        return self.wrap_with_guard_for_condition(domain.condition, '\n\n'.join(sections))
    201215
    202216    def _generate_runtime_cast_for_object_declaration(self, object_declaration):
  • trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_js_backend_commands.py

    r251227 r262203  
    4848
    4949    def output_filename(self):
    50         return "InspectorBackendCommands.js"
     50        return "InspectorBackendCommands.js.in"
    5151
    5252    def should_generate_domain(self, domain):
     
    9797                    'enumMap': ", ".join(['%s: "%s"' % (Generator.stylized_name_for_enum_value(enum_value), enum_value) for enum_value in declaration.type.enum_values()])
    9898                }
    99                 lines.append('InspectorBackend.registerEnum("%(domainName)s.%(enumName)s", {%(enumMap)s});' % enum_args)
     99                lines.append(self.wrap_with_guard_for_condition(declaration.condition, 'InspectorBackend.registerEnum("%(domainName)s.%(enumName)s", {%(enumMap)s});' % enum_args))
    100100
    101101            def is_anonymous_enum_member(type_member):
     
    129129                'returnParams': ", ".join(['"%s"' % parameter.parameter_name for parameter in command.return_parameters]),
    130130            }
    131             lines.append('InspectorBackend.registerCommand("%(domainName)s.%(commandName)s", %(targetTypes)s, [%(callParams)s], [%(returnParams)s]);' % command_args)
     131            lines.append(self.wrap_with_guard_for_condition(command.condition, 'InspectorBackend.registerCommand("%(domainName)s.%(commandName)s", %(targetTypes)s, [%(callParams)s], [%(returnParams)s]);' % command_args))
    132132
    133133        for event in events:
     134            event_lines = []
     135
    134136            for param in filter(is_anonymous_enum_param, event.event_parameters):
    135137                enum_args = {
     
    138140                    'enumMap': ", ".join(['%s: "%s"' % (Generator.stylized_name_for_enum_value(enum_value), enum_value) for enum_value in param.type.enum_values()]),
    139141                }
    140                 lines.append('InspectorBackend.registerEnum("%(domainName)s.%(enumName)s", {%(enumMap)s});' % enum_args)
     142                event_lines.append('InspectorBackend.registerEnum("%(domainName)s.%(enumName)s", {%(enumMap)s});' % enum_args)
    141143
    142144            event_args = {
     
    146148                'params': ", ".join(['"%s"' % parameter.parameter_name for parameter in event.event_parameters]),
    147149            }
    148             lines.append('InspectorBackend.registerEvent("%(domainName)s.%(eventName)s", %(targetTypes)s, [%(params)s]);' % event_args)
     150            event_lines.append('InspectorBackend.registerEvent("%(domainName)s.%(eventName)s", %(targetTypes)s, [%(params)s]);' % event_args)
     151
     152            lines.append(self.wrap_with_guard_for_condition(event.condition, '\n'.join(event_lines)))
    149153
    150154        has_async_commands = any([command.is_async for command in commands])
     
    161165        lines.append('InspectorBackend.activateDomain("%(domainName)s", %(debuggableTypes)s);' % activate_args)
    162166
    163         return "\n".join(lines)
     167        return self.wrap_with_guard_for_condition(domain.condition, "\n".join(lines))
  • trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_backend_dispatcher_header.py

    r261569 r262203  
    100100        }
    101101
    102         return self.wrap_with_guard_for_domain(domain, Template(ObjCTemplates.BackendDispatcherHeaderDomainHandlerObjCDeclaration).substitute(None, **handler_args))
     102        return self.wrap_with_guard_for_condition(domain.condition, Template(ObjCTemplates.BackendDispatcherHeaderDomainHandlerObjCDeclaration).substitute(None, **handler_args))
    103103
    104104    def _generate_objc_handler_declaration_for_command(self, command):
     
    113113        }
    114114        lines.append('    void %(commandName)s(%(parameters)s) final;' % command_args)
    115         return '\n'.join(lines)
     115        return self.wrap_with_guard_for_condition(command.condition, '\n'.join(lines))
  • trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py

    r251395 r262203  
    8787            command_declarations.append(self._generate_handler_implementation_for_command(domain, command))
    8888
    89         return '\n'.join(command_declarations)
     89        return self.wrap_with_guard_for_condition(domain.condition, '\n\n'.join(command_declarations))
    9090
    9191    def _generate_handler_implementation_for_command(self, domain, command):
     
    105105        }
    106106
    107         return self.wrap_with_guard_for_domain(domain, Template(ObjCTemplates.BackendDispatcherHeaderDomainHandlerImplementation).substitute(None, **command_args))
     107        return self.wrap_with_guard_for_condition(command.condition, Template(ObjCTemplates.BackendDispatcherHeaderDomainHandlerImplementation).substitute(None, **command_args))
    108108
    109109    def _generate_responds_to_selector_for_command(self, domain, command):
  • trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_header.py

    r251395 r262203  
    3232try:
    3333    from .generator import Generator, ucfirst
    34     from .models import ObjectType, EnumType, Platforms
     34    from .models import ObjectType, EnumType
    3535    from .objc_generator import ObjCGenerator, join_type_and_name
    3636    from .objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates
    3737except ValueError:
    3838    from generator import Generator, ucfirst
    39     from models import ObjectType, EnumType, Platforms
     39    from models import ObjectType, EnumType
    4040    from objc_generator import ObjCGenerator, join_type_and_name
    4141    from objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates
     
    4545
    4646def add_newline(lines):
    47     if lines and lines[-1] == '':
     47    if not len(lines) or lines[-1] == '':
    4848        return
    4949    lines.append('')
     
    8888        sections.append(Template(ObjCTemplates.HeaderPrelude).substitute(None, **headerPrelude_args))
    8989        sections.append('\n'.join([_f for _f in map(self._generate_forward_declarations, type_domains) if _f]))
    90         sections.append(self._generate_enum_for_platforms())
    9190        sections.append('\n'.join([_f for _f in map(self._generate_enums, type_domains) if _f]))
    9291        sections.append('\n'.join([_f for _f in map(self._generate_types, type_domains) if _f]))
     
    104103            if (isinstance(declaration.type, ObjectType)):
    105104                objc_name = self.objc_name_for_type(declaration.type)
    106                 lines.append('@class %s;' % objc_name)
    107         return '\n'.join(lines)
     105                lines.append(self.wrap_with_guard_for_condition(declaration.condition, '@class %s;' % objc_name))
     106        return self.wrap_with_guard_for_condition(domain.condition, '\n'.join(lines))
    108107
    109108    def _generate_enums(self, domain):
     
    112111        # Type enums and member enums.
    113112        for declaration in self.type_declarations_for_domain(domain):
     113            declaration_lines = []
    114114            if isinstance(declaration.type, EnumType):
    115                 add_newline(lines)
    116                 lines.append(self._generate_anonymous_enum_for_declaration(domain, declaration))
     115                add_newline(declaration_lines)
     116                declaration_lines.append(self._generate_anonymous_enum_for_declaration(domain, declaration))
    117117            else:
    118118                for member in declaration.type_members:
    119119                    if isinstance(member.type, EnumType) and member.type.is_anonymous:
    120                         add_newline(lines)
    121                         lines.append(self._generate_anonymous_enum_for_member(domain, declaration, member))
     120                        add_newline(declaration_lines)
     121                        declaration_lines.append(self._generate_anonymous_enum_for_member(domain, declaration, member))
     122            if len(declaration_lines):
     123                lines.append(self.wrap_with_guard_for_condition(declaration.condition, '\n\n'.join(declaration_lines)))
    122124
    123125        # Anonymous command enums.
    124126        for command in self.commands_for_domain(domain):
     127            command_lines = []
    125128            for parameter in command.call_parameters:
    126129                if isinstance(parameter.type, EnumType) and parameter.type.is_anonymous:
    127                     add_newline(lines)
    128                     lines.append(self._generate_anonymous_enum_for_parameter(domain, command.command_name, parameter))
     130                    add_newline(command_lines)
     131                    command_lines.append(self._generate_anonymous_enum_for_parameter(domain, command.command_name, parameter))
    129132            for parameter in command.return_parameters:
    130133                if isinstance(parameter.type, EnumType) and parameter.type.is_anonymous:
    131                     add_newline(lines)
    132                     lines.append(self._generate_anonymous_enum_for_parameter(domain, command.command_name, parameter))
     134                    add_newline(command_lines)
     135                    command_lines.append(self._generate_anonymous_enum_for_parameter(domain, command.command_name, parameter))
     136            if len(command_lines):
     137                lines.append(self.wrap_with_guard_for_condition(command.condition, '\n\n'.join(command_lines)))
    133138
    134139        # Anonymous event enums.
    135140        for event in self.events_for_domain(domain):
     141            event_lines = []
    136142            for parameter in event.event_parameters:
    137143                if isinstance(parameter.type, EnumType) and parameter.type.is_anonymous:
    138                     add_newline(lines)
    139                     lines.append(self._generate_anonymous_enum_for_parameter(domain, event.event_name, parameter))
    140 
    141         return '\n'.join(lines)
     144                    add_newline(event_lines)
     145                    event_lines.append(self._generate_anonymous_enum_for_parameter(domain, event.event_name, parameter))
     146            if len(event_lines):
     147                lines.append(self.wrap_with_guard_for_condition(event.condition, '\n\n'.join(event_lines)))
     148
     149        return self.wrap_with_guard_for_condition(domain.condition, '\n\n'.join(lines))
    142150
    143151    def _generate_types(self, domain):
     
    148156                add_newline(lines)
    149157                lines.append(self._generate_type_interface(domain, declaration))
    150         return '\n'.join(lines)
    151 
    152     def _generate_enum_for_platforms(self):
    153         objc_enum_name = '%sPlatform' % self.objc_prefix()
    154         enum_values = [platform.name for platform in Platforms]
    155         return self._generate_enum(objc_enum_name, enum_values)
     158        return self.wrap_with_guard_for_condition(domain.condition, '\n'.join(lines))
    156159
    157160    def _generate_anonymous_enum_for_declaration(self, domain, declaration):
     
    195198            lines.append('/* optional */ ' + self._generate_member_property(declaration, member))
    196199        lines.append('@end')
    197         return '\n'.join(lines)
     200        return self.wrap_with_guard_for_condition(declaration.condition, '\n'.join(lines))
    198201
    199202    def _generate_init_method_for_required_members(self, domain, declaration, required_members):
     
    220223                lines.append(self._generate_single_command_protocol(domain, command))
    221224            lines.append('@end')
    222         return '\n'.join(lines)
     225        return self.wrap_with_guard_for_condition(domain.condition, '\n'.join(lines))
    223226
    224227    def _generate_single_command_protocol(self, domain, command):
     
    229232            param_name = parameter.parameter_name
    230233            pairs.append('%s:(%s)%s' % (param_name, self.objc_type_for_param(domain, command.command_name, parameter), param_name))
    231         return '- (void)%sWith%s;' % (command.command_name, ' '.join(pairs))
     234        return self.wrap_with_guard_for_condition(command.condition, '- (void)%sWith%s;' % (command.command_name, ' '.join(pairs)))
    232235
    233236    def _callback_block_for_command(self, domain, command):
     
    250253                lines.append(self._generate_single_event_interface(domain, event))
    251254            lines.append('@end')
    252         return '\n'.join(lines)
     255        return self.wrap_with_guard_for_condition(domain.condition, '\n'.join(lines))
    253256
    254257    def _generate_single_event_interface(self, domain, event):
     
    260263            pairs.append('%s:(%s)%s' % (param_name, self.objc_type_for_param(domain, event.event_name, parameter), param_name))
    261264        pairs[0] = ucfirst(pairs[0])
    262         return '- (void)%sWith%s;' % (event.event_name, ' '.join(pairs))
     265        return self.wrap_with_guard_for_condition(event.condition, '- (void)%sWith%s;' % (event.event_name, ' '.join(pairs)))
  • trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py

    r239427 r262203  
    3232try:
    3333    from .generator import Generator
    34     from .models import EnumType, Frameworks, Platforms
     34    from .models import EnumType, Frameworks
    3535    from .objc_generator import ObjCGenerator
    3636    from .objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates
    3737except ValueError:
    3838    from generator import Generator
    39     from models import EnumType, Frameworks, Platforms
     39    from models import EnumType, Frameworks
    4040    from objc_generator import ObjCGenerator
    4141    from objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates
     
    4545
    4646def add_newline(lines):
    47     if lines and lines[-1] == '':
     47    if not len(lines) or lines[-1] == '':
    4848        return
    4949    lines.append('')
     
    7676        sections.append(Template(ObjCTemplates.TypeConversionsHeaderPrelude).substitute(None, **header_args))
    7777        sections.append(Template(ObjCTemplates.TypeConversionsHeaderStandard).substitute(None))
    78         sections.append(self._generate_enum_conversion_for_platforms())
    7978        sections.extend(list(map(self._generate_enum_conversion_functions, domains)))
    8079        sections.append(Template(ObjCTemplates.TypeConversionsHeaderPostlude).substitute(None, **header_args))
     
    8685        # Type enums and member enums.
    8786        for declaration in self.type_declarations_for_domain(domain):
     87            declaration_lines = []
    8888            if isinstance(declaration.type, EnumType):
    89                 add_newline(lines)
    90                 lines.append(self._generate_anonymous_enum_conversion_for_declaration(domain, declaration))
     89                add_newline(declaration_lines)
     90                declaration_lines.append(self._generate_anonymous_enum_conversion_for_declaration(domain, declaration))
    9191            else:
    9292                for member in declaration.type_members:
    9393                    if (isinstance(member.type, EnumType) and member.type.is_anonymous):
    94                         add_newline(lines)
    95                         lines.append(self._generate_anonymous_enum_conversion_for_member(domain, declaration, member))
     94                        add_newline(declaration_lines)
     95                        declaration_lines.append(self._generate_anonymous_enum_conversion_for_member(domain, declaration, member))
     96            if len(declaration_lines):
     97                lines.append(self.wrap_with_guard_for_condition(declaration.condition, '\n\n'.join(declaration_lines)))
    9698
    9799        # Anonymous command enums.
    98100        for command in self.commands_for_domain(domain):
     101            command_lines = []
    99102            for parameter in command.call_parameters:
    100103                if (isinstance(parameter.type, EnumType) and parameter.type.is_anonymous):
    101                     add_newline(lines)
    102                     lines.append(self._generate_anonymous_enum_conversion_for_parameter(domain, command.command_name, parameter))
     104                    add_newline(command_lines)
     105                    command_lines.append(self._generate_anonymous_enum_conversion_for_parameter(domain, command.command_name, parameter))
    103106            for parameter in command.return_parameters:
    104107                if (isinstance(parameter.type, EnumType) and parameter.type.is_anonymous):
    105                     add_newline(lines)
    106                     lines.append(self._generate_anonymous_enum_conversion_for_parameter(domain, command.command_name, parameter))
     108                    add_newline(command_lines)
     109                    command_lines.append(self._generate_anonymous_enum_conversion_for_parameter(domain, command.command_name, parameter))
     110            if len(command_lines):
     111                lines.append(self.wrap_with_guard_for_condition(command.condition, '\n\n'.join(command_lines)))
    107112
    108113        # Anonymous event enums.
    109114        for event in self.events_for_domain(domain):
     115            event_lines = []
    110116            for parameter in event.event_parameters:
    111117                if (isinstance(parameter.type, EnumType) and parameter.type.is_anonymous):
    112                     add_newline(lines)
    113                     lines.append(self._generate_anonymous_enum_conversion_for_parameter(domain, event.event_name, parameter))
     118                    add_newline(event_lines)
     119                    event_lines.append(self._generate_anonymous_enum_conversion_for_parameter(domain, event.event_name, parameter))
     120            if len(event_lines):
     121                lines.append(self.wrap_with_guard_for_condition(event.condition, '\n\n'.join(event_lines)))
    114122
    115         return '\n'.join(lines)
    116 
    117     def _generate_enum_conversion_for_platforms(self):
    118         objc_enum_name = '%sPlatform' % self.objc_prefix()
    119         enum_values = [platform.name for platform in Platforms]
    120         lines = []
    121         lines.append(self._generate_enum_objc_to_protocol_string(objc_enum_name, enum_values))
    122         lines.append(self._generate_enum_from_protocol_string(objc_enum_name, enum_values))
    123         return '\n\n'.join(lines)
     123        return self.wrap_with_guard_for_condition(domain.condition, '\n\n'.join(lines))
    124124
    125125    def _generate_anonymous_enum_conversion_for_declaration(self, domain, declaration):
  • trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_type_conversions_implementation.py

    r239427 r262203  
    4444
    4545def add_newline(lines):
    46     if lines and lines[-1] == '':
     46    if not len(lines) or lines[-1] == '':
    4747        return
    4848    lines.append('')
     
    8484        lines = []
    8585        for domain in domains:
    86             lines.append('@interface %sTypeConversions (%sDomain)' % (self.protocol_name(), domain.domain_name))
    87             lines.append('')
     86            domain_lines = []
     87            domain_lines.append('@interface %sTypeConversions (%sDomain)' % (self.protocol_name(), domain.domain_name))
     88            add_newline(domain_lines)
    8889
    8990            for declaration in self.type_declarations_for_domain(domain):
    90                 lines.append(self._generate_type_factory_method_declaration(domain, declaration))
     91                domain_lines.append(self._generate_type_factory_method_declaration(domain, declaration))
    9192
    92             add_newline(lines)
    93             lines.append('@end')
    94 
     93            add_newline(domain_lines)
     94            domain_lines.append('@end')
     95            lines.append(self.wrap_with_guard_for_condition(domain.condition, '\n'.join(domain_lines)))
    9596        return '\n'.join(lines)
    9697
     
    101102        if isinstance(resolved_type, (ObjectType, ArrayType, PrimitiveType)):
    102103            objc_type = self.objc_class_for_type(resolved_type)
    103             return '+ (void)_parse%s:(%s **)outValue fromPayload:(id)payload;' % (declaration.type.raw_name(), objc_type)
     104            return self.wrap_with_guard_for_condition(declaration.condition, '+ (void)_parse%s:(%s **)outValue fromPayload:(id)payload;' % (declaration.type.raw_name(), objc_type))
    104105        if isinstance(resolved_type, EnumType):
    105             return '+ (void)_parse%s:(NSNumber **)outValue fromPayload:(id)payload;' % declaration.type.raw_name()
     106            return self.wrap_with_guard_for_condition(declaration.condition, '+ (void)_parse%s:(NSNumber **)outValue fromPayload:(id)payload;' % declaration.type.raw_name())
    106107
    107108    def _generate_type_factory_category_implementation(self, domains):
    108109        lines = []
    109110        for domain in domains:
    110             lines.append('@implementation %sTypeConversions (%sDomain)' % (self.protocol_name(), domain.domain_name))
    111             lines.append('')
     111            domain_lines = []
     112            domain_lines.append('@implementation %sTypeConversions (%sDomain)' % (self.protocol_name(), domain.domain_name))
     113            add_newline(domain_lines)
    112114
    113115            for declaration in self.type_declarations_for_domain(domain):
    114                 lines.append(self._generate_type_factory_method_implementation(domain, declaration))
    115                 add_newline(lines)
    116             lines.append('@end')
     116                domain_lines.append(self._generate_type_factory_method_implementation(domain, declaration))
     117                add_newline(domain_lines)
     118
     119            domain_lines.append('@end')
     120            lines.append(self.wrap_with_guard_for_condition(domain.condition, '\n'.join(domain_lines)))
    117121        return '\n'.join(lines)
    118122
     
    142146            lines.append('    *outValue = [[%s alloc] initWithPayload:payload];' % (objc_class))
    143147        lines.append('}')
    144         return '\n'.join(lines)
     148        return self.wrap_with_guard_for_condition(declaration.condition, '\n'.join(lines))
  • trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_types_implementation.py

    r239427 r262203  
    4545
    4646def add_newline(lines):
    47     if lines and lines[-1] == '':
     47    if not len(lines) or lines[-1] == '':
    4848        return
    4949    lines.append('')
     
    9292                add_newline(lines)
    9393                lines.append(self.generate_type_implementation(domain, declaration))
    94         return '\n'.join(lines)
     94        return self.wrap_with_guard_for_condition(domain.condition, '\n'.join(lines))
    9595
    9696    def generate_type_implementation(self, domain, declaration):
     
    113113        lines.append('')
    114114        lines.append('@end')
    115         return '\n'.join(lines)
     115        return self.wrap_with_guard_for_condition(declaration.condition, '\n'.join(lines))
    116116
    117117    def _generate_init_method_for_protocol_object(self, domain, declaration):
  • trunk/Source/JavaScriptCore/inspector/scripts/codegen/generator.py

    r259236 r262203  
    3232try:
    3333    from .generator_templates import GeneratorTemplates as Templates
    34     from .models import PrimitiveType, ObjectType, ArrayType, EnumType, AliasedType, Frameworks, Platforms
     34    from .models import PrimitiveType, ObjectType, ArrayType, EnumType, AliasedType, Frameworks
    3535except ValueError:
    3636    from generator_templates import GeneratorTemplates as Templates
    37     from models import PrimitiveType, ObjectType, ArrayType, EnumType, AliasedType, Frameworks, Platforms
     37    from models import PrimitiveType, ObjectType, ArrayType, EnumType, AliasedType, Frameworks
    3838
    3939log = logging.getLogger('global')
     
    9595
    9696class Generator:
    97     def __init__(self, model, platform, input_filepath):
     97    def __init__(self, model, input_filepath):
    9898        self._model = model
    99         self._platform = platform
    10099        self._input_filepath = input_filepath
    101100        self._settings = {}
     
    104103        return self._model
    105104
    106     def platform(self):
    107         return self._platform
    108 
    109105    def set_generator_setting(self, key, value):
    110106        self._settings[key] = value
    111107
    112     def can_generate_platform(self, model_platform):
    113         return model_platform is Platforms.Generic or self._platform is Platforms.All or model_platform is self._platform
    114 
    115108    def version_for_domain(self, domain):
    116109        return domain.version()
    117110
    118111    def type_declarations_for_domain(self, domain):
    119         return [type_declaration for type_declaration in domain.all_type_declarations() if self.can_generate_platform(type_declaration.platform)]
     112        return domain.all_type_declarations()
    120113
    121114    def commands_for_domain(self, domain):
    122         return [command for command in domain.all_commands() if self.can_generate_platform(command.platform)]
     115        return domain.all_commands()
    123116
    124117    def events_for_domain(self, domain):
    125         return [event for event in domain.all_events() if self.can_generate_platform(event.platform)]
     118        return domain.all_events()
    126119
    127120    # The goofy name is to disambiguate generator settings from framework settings.
     
    268261
    269262    # Miscellaneous text manipulation routines.
    270     def wrap_with_guard_for_domain(self, domain, text):
    271         if self.model().framework is Frameworks.WebInspector:
    272             return text
    273         guard = domain.feature_guard
    274         if guard:
    275             return Generator.wrap_with_guard(guard, text)
     263    def wrap_with_guard_for_condition(self, condition, text):
     264        if condition:
     265            return '\n'.join([
     266                '#if %s' % condition,
     267                text,
     268                '#endif // %s' % condition,
     269            ])
    276270        return text
    277 
    278     @staticmethod
    279     def wrap_with_guard(guard, text):
    280         return '\n'.join([
    281             '#if %s' % guard,
    282             text,
    283             '#endif // %s' % guard,
    284         ])
    285271
    286272    @staticmethod
  • trunk/Source/JavaScriptCore/inspector/scripts/codegen/generator_templates.py

    r198752 r262203  
    5858 */
    5959
    60 // DO NOT EDIT THIS FILE. It is automatically generated from ${inputFilename}
    61 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py""")
     60// DO NOT EDIT THIS FILE. It is automatically generated from ${inputFilename} by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py""")
  • trunk/Source/JavaScriptCore/inspector/scripts/codegen/models.py

    r251227 r262203  
    137137
    138138
    139 class Platform:
    140     def __init__(self, name):
    141         self.name = name
    142 
    143     @staticmethod
    144     def fromString(platformString):
    145         platformString = platformString.lower()
    146         if platformString == "ios":
    147             return Platforms.iOS
    148 
    149         if platformString == "macos":
    150             return Platforms.macOS
    151 
    152         if platformString == "all":
    153             return Platforms.All
    154 
    155         if platformString == "generic" or not platformString:
    156             return Platforms.Generic
    157 
    158         raise ParseException("Unknown platform: %s" % platformString)
    159 
    160 
    161 class Platforms:
    162     All = Platform("all")
    163     Generic = Platform("generic")
    164     iOS = Platform("ios")
    165     macOS = Platform("macos")
    166 
    167     # Allow iteration over all platforms. See <http://stackoverflow.com/questions/5434400/>.
    168     class __metaclass__(type):
    169         def __iter__(self):
    170             for attr in dir(Platforms):
    171                 if not attr.startswith("__"):
    172                     yield getattr(Platforms, attr)
    173 
    174139class TypeReference:
    175140    def __init__(self, type_kind, referenced_type_name, enum_values, array_items):
     
    440405            events.extend([self.parse_event(event, debuggable_types) for event in json['events']])
    441406
    442         self.domains.append(Domain(json['domain'], json.get('description', ''), json.get('featureGuard'), debuggable_types, target_types, isSupplemental, version, types, commands, events))
     407        self.domains.append(Domain(json['domain'], json.get('description', ''), json.get('condition'), debuggable_types, target_types, isSupplemental, version, types, commands, events))
    443408
    444409    def parse_type_declaration(self, json):
     
    458423
    459424        type_ref = TypeReference(json['type'], json.get('$ref'), json.get('enum'), json.get('items'))
    460         platform = Platform.fromString(json.get('platform', 'generic'))
    461         return TypeDeclaration(json['id'], type_ref, json.get("description", ""), platform, type_members)
     425        return TypeDeclaration(json['id'], type_ref, json.get("description", ""), json.get('condition'), type_members)
    462426
    463427    def parse_type_member(self, json):
     
    510474                raise ParseException("Malformed domain specification: return parameter list for command %s has duplicate parameter names" % json['name'])
    511475
    512         platform = Platform.fromString(json.get('platform', 'generic'))
    513         return Command(json['name'], target_types, call_parameters, return_parameters, json.get('description', ""), platform, json.get('async', False))
     476        return Command(json['name'], target_types, call_parameters, return_parameters, json.get('description', ""), json.get('condition'), json.get('async', False))
    514477
    515478    def parse_event(self, json, debuggable_types):
     
    545508                raise ParseException("Malformed domain specification: parameter list for event %s has duplicate parameter names" % json['name'])
    546509
    547         platform = Platform.fromString(json.get('platform', 'generic'))
    548         return Event(json['name'], target_types, event_parameters, json.get('description', ""), platform)
     510        return Event(json['name'], target_types, event_parameters, json.get('description', ""), json.get('condition'))
    549511
    550512    def parse_call_or_return_parameter(self, json):
     
    644606
    645607class Domain:
    646     def __init__(self, domain_name, description, feature_guard, debuggable_types, target_types, isSupplemental, version, type_declarations, commands, events):
     608    def __init__(self, domain_name, description, condition, debuggable_types, target_types, isSupplemental, version, type_declarations, commands, events):
    647609        self.domain_name = domain_name
    648610        self.description = description
    649         self.feature_guard = feature_guard
     611        self.condition = condition
    650612        self.debuggable_types = debuggable_types
    651613        self.target_types = target_types
     
    687649
    688650class TypeDeclaration:
    689     def __init__(self, type_name, type_ref, description, platform, type_members):
     651    def __init__(self, type_name, type_ref, description, condition, type_members):
    690652        self.type_name = type_name
    691653        self.type_ref = type_ref
    692654        self.description = description
    693         self.platform = platform
     655        self.condition = condition
    694656        self.type_members = type_members
    695657
     
    735697
    736698class Command:
    737     def __init__(self, command_name, target_types, call_parameters, return_parameters, description, platform, is_async):
     699    def __init__(self, command_name, target_types, call_parameters, return_parameters, description, condition, is_async):
    738700        self.command_name = command_name
    739701        self.target_types = target_types
     
    741703        self.return_parameters = return_parameters
    742704        self.description = description
    743         self.platform = platform
     705        self.condition = condition
    744706        self.is_async = is_async
    745707
     
    755717
    756718class Event:
    757     def __init__(self, event_name, target_types, event_parameters, description, platform):
     719    def __init__(self, event_name, target_types, event_parameters, description, condition):
    758720        self.event_name = event_name
    759721        self.target_types = target_types
    760722        self.event_parameters = event_parameters
    761723        self.description = description
    762         self.platform = platform
     724        self.condition = condition
    763725
    764726    def resolve_type_references(self, protocol, domain):
  • trunk/Source/JavaScriptCore/inspector/scripts/codegen/objc_generator_templates.py

    r251395 r262203  
    128128${conversions}
    129129${invocation}
    130 }
    131 """)
     130}""")
    132131
    133132    ConfigurationCommandProperty = (
  • trunk/Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py

    r249504 r262203  
    118118                                force_output=False,
    119119                                framework_name="",
    120                                 platform_name="",
    121120                                generate_frontend=True,
    122121                                generate_backend=True):
     
    131130            raise Exception("Error parsing valid JSON in file: " + filepath + "\nParse error: " + str(e))
    132131
    133     platform = Platform.fromString(platform_name)
    134132    protocol = models.Protocol(framework_name)
    135133    for specification in supplemental_specification_filepaths:
     
    139137    protocol.resolve_types()
    140138
    141     generator_arguments = [protocol, platform, primary_specification_filepath]
     139    generator_arguments = [protocol, primary_specification_filepath]
    142140    generators = []
    143141
     
    163161
    164162    elif protocol.framework is Frameworks.JavaScriptCore:
    165         generators.append(JSBackendCommandsGenerator(*generator_arguments))
    166163        generators.append(CppAlternateBackendDispatcherHeaderGenerator(*generator_arguments))
    167164        generators.append(CppBackendDispatcherHeaderGenerator(*generator_arguments))
     
    230227if __name__ == '__main__':
    231228    allowed_framework_names = ['JavaScriptCore', 'WebInspector', 'WebInspectorUI', 'WebKit', 'Test']
    232     allowed_platform_names = ['iOS', 'macOS', 'all', 'generic']
    233229    cli_parser = optparse.OptionParser(usage="usage: %prog [options] PrimaryProtocol.json [SupplementalProtocol.json ...]")
    234230    cli_parser.add_option("-o", "--outputDir", help="Directory where generated files should be written.")
     
    239235    cli_parser.add_option("--frontend", action="store_true", help="Generate code for the frontend-side of the protocol only.")
    240236    cli_parser.add_option("--backend", action="store_true", help="Generate code for the backend-side of the protocol only.")
    241     cli_parser.add_option("--platform", default="generic", help="The platform of the backend being generated. For example, we compile WebKit2 for either macOS or iOS. This value is case-insensitive. Allowed values: %s" % ", ".join(allowed_platform_names))
    242237    options = None
    243238
     
    265260        'concatenate_output': arg_options.test,
    266261        'framework_name': arg_options.framework,
    267         'platform_name': arg_options.platform,
    268262        'force_output': arg_options.force,
    269263        'generate_backend': generate_backend,
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/definitions-with-mac-platform.json

    r262202 r262203  
    55            "id": "NetworkError",
    66            "type": "object",
    7             "platform": "macos",
     7            "condition": "PLATFORM(MAC)",
    88            "properties": [
    99                { "name": "message", "type": "string", "description": "Error message." },
     
    1515        {
    1616            "name": "loadResource",
    17             "platform": "macos",
     17            "condition": "PLATFORM(MAC)",
    1818            "description": "Loads a resource in the context of a frame on the inspected page without cross origin checks."
    1919        }
     
    2222        {
    2323            "name": "resourceLoaded",
    24             "platform": "macos",
     24            "condition": "PLATFORM(MAC)",
    2525            "description": "A resource was loaded."
    2626        }
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/command-targetType-matching-domain-debuggableType.json-result

    r262202 r262203  
    1 ### Begin File: InspectorBackendCommands.js
    2 /*
    3  * Copyright (C) 2013 Google Inc. All rights reserved.
    4  * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
    5  * Copyright (C) 2014 University of Washington. All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
    10  * 1. Redistributions of source code must retain the above copyright
    11  *    notice, this list of conditions and the following disclaimer.
    12  * 2. Redistributions in binary form must reproduce the above copyright
    13  *    notice, this list of conditions and the following disclaimer in the
    14  *    documentation and/or other materials provided with the distribution.
    15  *
    16  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
    17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    18  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
    20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    26  * THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 // DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json
    30 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1### Begin File: InspectorBackendCommands.js.in
     2/*
     3 * Copyright (C) 2013 Google Inc. All rights reserved.
     4 * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
     5 * Copyright (C) 2014 University of Washington. All rights reserved.
     6 *
     7 * Redistribution and use in source and binary forms, with or without
     8 * modification, are permitted provided that the following conditions
     9 * are met:
     10 * 1. Redistributions of source code must retain the above copyright
     11 *    notice, this list of conditions and the following disclaimer.
     12 * 2. Redistributions in binary form must reproduce the above copyright
     13 *    notice, this list of conditions and the following disclaimer in the
     14 *    documentation and/or other materials provided with the distribution.
     15 *
     16 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
     17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
     20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     26 * THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29// DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    3130
    3231// Domain
     
    3635InspectorBackend.registerDomainDispatcher = InspectorBackend.registerDispatcher.bind(InspectorBackend, "Domain");
    3736InspectorBackend.activateDomain("Domain", ["page"]);
    38 ### End File: InspectorBackendCommands.js
     37### End File: InspectorBackendCommands.js.in
    3938
    4039### Begin File: TestAlternateBackendDispatchers.h
     
    6665 */
    6766
    68 // DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json
    69 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     67// DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    7068
    7169#pragma once
     
    127125 */
    128126
    129 // DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json
    130 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     127// DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    131128
    132129#pragma once
     
    162159private:
    163160    AlternateDomainBackendDispatcher* m_alternateDispatcher { nullptr };
    164 #endif
     161#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    165162private:
    166163    DomainBackendDispatcher(BackendDispatcher&, DomainBackendDispatcherHandler*);
     
    199196 */
    200197
    201 // DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json
    202 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     198// DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    203199
    204200#include "config.h"
     
    212208#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    213209#include "TestAlternateBackendDispatchers.h"
    214 #endif
     210#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    215211
    216212namespace Inspector {
     
    237233    message->getObject("params"_s, parameters);
    238234
    239     if (method == "Command")
     235    if (method == "Command") {
    240236        Command(requestId, WTFMove(parameters));
    241     else
    242         m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'Domain." + method + "' was not found");
     237        return;
     238    }
     239
     240    m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'Domain." + method + "' was not found");
    243241}
    244242
     
    250248        return;
    251249    }
    252 #endif
     250#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    253251
    254252    ErrorString error;
     
    294292 */
    295293
    296 // DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json
    297 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     294// DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    298295
    299296#pragma once
     
    347344 */
    348345
    349 // DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json
    350 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     346// DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    351347
    352348#include "config.h"
     
    398394 */
    399395
    400 // DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json
    401 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     396// DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    402397
    403398#pragma once
     
    453448 */
    454449
    455 // DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json
    456 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     450// DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    457451
    458452#include "config.h"
     
    502496 */
    503497
    504 // DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json
    505 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     498// DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    506499
    507500#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
     
    554547 */
    555548
    556 // DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json
    557 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     549// DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    558550
    559551#import "config.h"
     
    586578}
    587579
    588 
    589580} // namespace Inspector
    590581
     
    619610 */
    620611
    621 // DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json
    622 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     612// DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    623613
    624614#import <WebInspector/TestProtocol.h>
     
    661651 */
    662652
    663 // DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json
    664 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     653// DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    665654
    666655#import "TestProtocolConfiguration.h"
     
    757746 */
    758747
    759 // DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json
    760 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     748// DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    761749
    762750#import "TestProtocolInternal.h"
     
    824812 */
    825813
    826 // DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json
    827 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     814// DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    828815
    829816#import <Foundation/Foundation.h>
     
    833820
    834821
    835 
    836 typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
    837     TestProtocolPlatformAll,
    838     TestProtocolPlatformGeneric,
    839     TestProtocolPlatformIOS,
    840     TestProtocolPlatformMacOS,
    841 };
    842822
    843823
     
    888868 */
    889869
    890 // DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json
    891 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     870// DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    892871
    893872#import "TestProtocol.h"
     
    931910 */
    932911
    933 // DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json
    934 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     912// DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    935913
    936914#import "TestProtocol.h"
     
    942920Optional<ObjCEnumType> fromProtocolString(const String& value);
    943921
    944 inline String toProtocolString(TestProtocolPlatform value)
    945 {
    946     switch(value) {
    947     case TestProtocolPlatformAll:
    948         return "all"_s;
    949     case TestProtocolPlatformGeneric:
    950         return "generic"_s;
    951     case TestProtocolPlatformIOS:
    952         return "ios"_s;
    953     case TestProtocolPlatformMacOS:
    954         return "macos"_s;
    955     }
    956 }
    957 
    958 template<>
    959 inline Optional<TestProtocolPlatform> fromProtocolString(const String& value)
    960 {
    961     if (value == "all")
    962         return TestProtocolPlatformAll;
    963     if (value == "generic")
    964         return TestProtocolPlatformGeneric;
    965     if (value == "ios")
    966         return TestProtocolPlatformIOS;
    967     if (value == "macos")
    968         return TestProtocolPlatformMacOS;
    969     return WTF::nullopt;
    970 }
    971 
    972922} // namespace Inspector
    973923
     
    1002952 */
    1003953
    1004 // DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json
    1005 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     954// DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    1006955
    1007956#import "TestProtocolTypeConversions.h"
     
    1048997 */
    1049998
    1050 // DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json
    1051 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     999// DO NOT EDIT THIS FILE. It is automatically generated from command-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    10521000
    10531001#import "TestProtocolInternal.h"
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/commands-with-async-attribute.json-result

    r262202 r262203  
    1 ### Begin File: InspectorBackendCommands.js
     1### Begin File: InspectorBackendCommands.js.in
    22/*
    33 * Copyright (C) 2013 Google Inc. All rights reserved.
     
    2727 */
    2828
    29 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
    30 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     29// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    3130
    3231// Database
     
    3938InspectorBackend.registerDatabaseDispatcher = InspectorBackend.registerDispatcher.bind(InspectorBackend, "Database");
    4039InspectorBackend.activateDomain("Database", null);
    41 ### End File: InspectorBackendCommands.js
     40### End File: InspectorBackendCommands.js.in
    4241
    4342### Begin File: TestAlternateBackendDispatchers.h
     
    6968 */
    7069
    71 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
    72 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     70// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    7371
    7472#pragma once
     
    133131 */
    134132
    135 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
    136 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     133// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    137134
    138135#pragma once
     
    191188private:
    192189    AlternateDatabaseBackendDispatcher* m_alternateDispatcher { nullptr };
    193 #endif
     190#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    194191private:
    195192    DatabaseBackendDispatcher(BackendDispatcher&, DatabaseBackendDispatcherHandler*);
     
    228225 */
    229226
    230 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
    231 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     227// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    232228
    233229#include "config.h"
     
    241237#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    242238#include "TestAlternateBackendDispatchers.h"
    243 #endif
     239#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    244240
    245241namespace Inspector {
     
    266262    message->getObject("params"_s, parameters);
    267263
    268     if (method == "executeSQLSyncOptionalReturnValues")
     264    if (method == "executeSQLSyncOptionalReturnValues") {
    269265        executeSQLSyncOptionalReturnValues(requestId, WTFMove(parameters));
    270     else if (method == "executeSQLAsyncOptionalReturnValues")
     266        return;
     267    }
     268    if (method == "executeSQLAsyncOptionalReturnValues") {
    271269        executeSQLAsyncOptionalReturnValues(requestId, WTFMove(parameters));
    272     else if (method == "executeSQLSync")
     270        return;
     271    }
     272    if (method == "executeSQLSync") {
    273273        executeSQLSync(requestId, WTFMove(parameters));
    274     else if (method == "executeSQLAsync")
     274        return;
     275    }
     276    if (method == "executeSQLAsync") {
    275277        executeSQLAsync(requestId, WTFMove(parameters));
    276     else
    277         m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'Database." + method + "' was not found");
     278        return;
     279    }
     280
     281    m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'Database." + method + "' was not found");
    278282}
    279283
     
    292296        return;
    293297    }
    294 #endif
     298#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    295299
    296300    ErrorString error;
     
    378382        return;
    379383    }
    380 #endif
     384#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    381385
    382386    Ref<DatabaseBackendDispatcherHandler::ExecuteSQLAsyncOptionalReturnValuesCallback> callback = adoptRef(*new DatabaseBackendDispatcherHandler::ExecuteSQLAsyncOptionalReturnValuesCallback(m_backendDispatcher.copyRef(), requestId));
     
    399403        return;
    400404    }
    401 #endif
     405#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    402406
    403407    ErrorString error;
     
    465469        return;
    466470    }
    467 #endif
     471#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    468472
    469473    Ref<DatabaseBackendDispatcherHandler::ExecuteSQLAsyncCallback> callback = adoptRef(*new DatabaseBackendDispatcherHandler::ExecuteSQLAsyncCallback(m_backendDispatcher.copyRef(), requestId));
     
    504508 */
    505509
    506 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
    507 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     510// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    508511
    509512#pragma once
     
    548551 */
    549552
    550 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
    551 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     553// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    552554
    553555#include "config.h"
     
    591593 */
    592594
    593 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
    594 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     595// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    595596
    596597#pragma once
     
    635636
    636637namespace Database {
    637 /*  */
     638
    638639enum class PrimaryColors {
    639640    Red = 0,
     
    641642    Blue = 2,
    642643}; // enum class PrimaryColors
     644
    643645/* Database error. */
    644646class Error : public JSON::ObjectBase {
     
    767769 */
    768770
    769 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
    770 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     771// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    771772
    772773#include "config.h"
     
    797798
    798799// Enums in the 'Database' Domain
     800
    799801template<>
    800802Optional<Inspector::Protocol::Database::PrimaryColors> parseEnumValueFromString<Inspector::Protocol::Database::PrimaryColors>(const String& protocolString)
     
    811813    return WTF::nullopt;
    812814}
    813 
    814815
    815816} // namespace TestHelpers
     
    851852 */
    852853
    853 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
    854 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     854// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    855855
    856856#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
     
    906906 */
    907907
    908 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
    909 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     908// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    910909
    911910#import "config.h"
     
    10981097}
    10991098
    1100 
    11011099} // namespace Inspector
    11021100
     
    11311129 */
    11321130
    1133 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
    1134 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1131// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    11351132
    11361133#import <WebInspector/TestProtocol.h>
     
    11721169 */
    11731170
    1174 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
    1175 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1171// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    11761172
    11771173#import "TestProtocolConfiguration.h"
     
    12591255 */
    12601256
    1261 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
    1262 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1257// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    12631258
    12641259#import "TestProtocolInternal.h"
     
    13001295 */
    13011296
    1302 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
    1303 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1297// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    13041298
    13051299#import <Foundation/Foundation.h>
     
    13091303
    13101304@class TestProtocolDatabaseError;
    1311 
    1312 typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
    1313     TestProtocolPlatformAll,
    1314     TestProtocolPlatformGeneric,
    1315     TestProtocolPlatformIOS,
    1316     TestProtocolPlatformMacOS,
    1317 };
    1318 
    13191305
    13201306typedef NS_ENUM(NSInteger, TestProtocolDatabasePrimaryColors) {
     
    13511337    TestProtocolDatabaseExecuteSQLAsyncPrintColorBlack,
    13521338};
    1353 
    13541339
    13551340__attribute__((visibility ("default")))
     
    14051390 */
    14061391
    1407 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
    1408 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1392// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    14091393
    14101394#import "TestProtocol.h"
     
    14461430 */
    14471431
    1448 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
    1449 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1432// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    14501433
    14511434#import "TestProtocol.h"
     
    14561439template<typename ObjCEnumType>
    14571440Optional<ObjCEnumType> fromProtocolString(const String& value);
    1458 
    1459 inline String toProtocolString(TestProtocolPlatform value)
    1460 {
    1461     switch(value) {
    1462     case TestProtocolPlatformAll:
    1463         return "all"_s;
    1464     case TestProtocolPlatformGeneric:
    1465         return "generic"_s;
    1466     case TestProtocolPlatformIOS:
    1467         return "ios"_s;
    1468     case TestProtocolPlatformMacOS:
    1469         return "macos"_s;
    1470     }
    1471 }
    1472 
    1473 template<>
    1474 inline Optional<TestProtocolPlatform> fromProtocolString(const String& value)
    1475 {
    1476     if (value == "all")
    1477         return TestProtocolPlatformAll;
    1478     if (value == "generic")
    1479         return TestProtocolPlatformGeneric;
    1480     if (value == "ios")
    1481         return TestProtocolPlatformIOS;
    1482     if (value == "macos")
    1483         return TestProtocolPlatformMacOS;
    1484     return WTF::nullopt;
    1485 }
    1486 
    14871441
    14881442inline String toProtocolString(TestProtocolDatabasePrimaryColors value)
     
    16541608 */
    16551609
    1656 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
    1657 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1610// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    16581611
    16591612#import "TestProtocolTypeConversions.h"
     
    17351688 */
    17361689
    1737 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json
    1738 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1690// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-async-attribute.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    17391691
    17401692#import "TestProtocolInternal.h"
     
    17471699using namespace Inspector;
    17481700
    1749 
    17501701@implementation TestProtocolDatabaseError
    17511702
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result

    r262202 r262203  
    1 ### Begin File: InspectorBackendCommands.js
    2 /*
    3  * Copyright (C) 2013 Google Inc. All rights reserved.
    4  * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
    5  * Copyright (C) 2014 University of Washington. All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
    10  * 1. Redistributions of source code must retain the above copyright
    11  *    notice, this list of conditions and the following disclaimer.
    12  * 2. Redistributions in binary form must reproduce the above copyright
    13  *    notice, this list of conditions and the following disclaimer in the
    14  *    documentation and/or other materials provided with the distribution.
    15  *
    16  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
    17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    18  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
    20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    26  * THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
    30 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1### Begin File: InspectorBackendCommands.js.in
     2/*
     3 * Copyright (C) 2013 Google Inc. All rights reserved.
     4 * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
     5 * Copyright (C) 2014 University of Washington. All rights reserved.
     6 *
     7 * Redistribution and use in source and binary forms, with or without
     8 * modification, are permitted provided that the following conditions
     9 * are met:
     10 * 1. Redistributions of source code must retain the above copyright
     11 *    notice, this list of conditions and the following disclaimer.
     12 * 2. Redistributions in binary form must reproduce the above copyright
     13 *    notice, this list of conditions and the following disclaimer in the
     14 *    documentation and/or other materials provided with the distribution.
     15 *
     16 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
     17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
     20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     26 * THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    3130
    3231// Database
     
    3635InspectorBackend.registerCommand("Database.executeNoOptionalParameters", null, [{"name": "columnNames", "type": "object"}, {"name": "notes", "type": "string"}, {"name": "timestamp", "type": "number"}, {"name": "values", "type": "object"}, {"name": "payload", "type": "object"}, {"name": "databaseId", "type": "number"}, {"name": "sqlError", "type": "object"}, {"name": "screenColor", "type": "string"}, {"name": "alternateColors", "type": "object"}, {"name": "printColor", "type": "string"}], ["columnNames", "notes", "timestamp", "values", "payload", "databaseId", "sqlError", "screenColor", "alternateColors", "printColor"]);
    3736InspectorBackend.activateDomain("Database", null);
    38 ### End File: InspectorBackendCommands.js
     37### End File: InspectorBackendCommands.js.in
    3938
    4039### Begin File: TestAlternateBackendDispatchers.h
     
    6665 */
    6766
    68 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
    69 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     67// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    7068
    7169#pragma once
     
    128126 */
    129127
    130 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
    131 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     128// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    132129
    133130#pragma once
     
    172169private:
    173170    AlternateDatabaseBackendDispatcher* m_alternateDispatcher { nullptr };
    174 #endif
     171#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    175172private:
    176173    DatabaseBackendDispatcher(BackendDispatcher&, DatabaseBackendDispatcherHandler*);
     
    209206 */
    210207
    211 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
    212 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     208// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    213209
    214210#include "config.h"
     
    222218#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    223219#include "TestAlternateBackendDispatchers.h"
    224 #endif
     220#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    225221
    226222namespace Inspector {
     
    247243    message->getObject("params"_s, parameters);
    248244
    249     if (method == "executeAllOptionalParameters")
     245    if (method == "executeAllOptionalParameters") {
    250246        executeAllOptionalParameters(requestId, WTFMove(parameters));
    251     else if (method == "executeNoOptionalParameters")
     247        return;
     248    }
     249    if (method == "executeNoOptionalParameters") {
    252250        executeNoOptionalParameters(requestId, WTFMove(parameters));
    253     else
    254         m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'Database." + method + "' was not found");
     251        return;
     252    }
     253
     254    m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'Database." + method + "' was not found");
    255255}
    256256
     
    287287        return;
    288288    }
    289 #endif
     289#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    290290
    291291    ErrorString error;
     
    353353        return;
    354354    }
    355 #endif
     355#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    356356
    357357    ErrorString error;
     
    419419 */
    420420
    421 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
    422 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     421// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    423422
    424423#pragma once
     
    463462 */
    464463
    465 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
    466 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     464// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    467465
    468466#include "config.h"
     
    506504 */
    507505
    508 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
    509 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     506// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    510507
    511508#pragma once
     
    550547
    551548namespace Database {
    552 /*  */
     549
    553550enum class PrimaryColors {
    554551    Red = 0,
     
    556553    Blue = 2,
    557554}; // enum class PrimaryColors
     555
    558556/* Database error. */
    559557class Error : public JSON::ObjectBase {
     
    682680 */
    683681
    684 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
    685 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     682// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    686683
    687684#include "config.h"
     
    712709
    713710// Enums in the 'Database' Domain
     711
    714712template<>
    715713Optional<Inspector::Protocol::Database::PrimaryColors> parseEnumValueFromString<Inspector::Protocol::Database::PrimaryColors>(const String& protocolString)
     
    727725}
    728726
    729 
    730727} // namespace TestHelpers
    731728
     
    766763 */
    767764
    768 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
    769 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     765// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    770766
    771767#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
     
    819815 */
    820816
    821 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
    822 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     817// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    823818
    824819#import "config.h"
     
    965960}
    966961
    967 
    968962} // namespace Inspector
    969963
     
    998992 */
    999993
    1000 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
    1001 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     994// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    1002995
    1003996#import <WebInspector/TestProtocol.h>
     
    10391032 */
    10401033
    1041 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
    1042 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1034// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    10431035
    10441036#import "TestProtocolConfiguration.h"
     
    11261118 */
    11271119
    1128 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
    1129 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1120// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    11301121
    11311122#import "TestProtocolInternal.h"
     
    11671158 */
    11681159
    1169 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
    1170 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1160// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    11711161
    11721162#import <Foundation/Foundation.h>
     
    11761166
    11771167@class TestProtocolDatabaseError;
    1178 
    1179 typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
    1180     TestProtocolPlatformAll,
    1181     TestProtocolPlatformGeneric,
    1182     TestProtocolPlatformIOS,
    1183     TestProtocolPlatformMacOS,
    1184 };
    1185 
    11861168
    11871169typedef NS_ENUM(NSInteger, TestProtocolDatabasePrimaryColors) {
     
    11981180};
    11991181
     1182
     1183
    12001184typedef NS_ENUM(NSInteger, TestProtocolDatabaseExecuteAllOptionalParametersPrintColor) {
    12011185    TestProtocolDatabaseExecuteAllOptionalParametersPrintColorCyan,
     
    12121196};
    12131197
     1198
     1199
    12141200typedef NS_ENUM(NSInteger, TestProtocolDatabaseExecuteNoOptionalParametersPrintColor) {
    12151201    TestProtocolDatabaseExecuteNoOptionalParametersPrintColorCyan,
     
    12181204    TestProtocolDatabaseExecuteNoOptionalParametersPrintColorBlack,
    12191205};
    1220 
    12211206
    12221207__attribute__((visibility ("default")))
     
    12701255 */
    12711256
    1272 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
    1273 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1257// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    12741258
    12751259#import "TestProtocol.h"
     
    13111295 */
    13121296
    1313 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
    1314 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1297// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    13151298
    13161299#import "TestProtocol.h"
     
    13211304template<typename ObjCEnumType>
    13221305Optional<ObjCEnumType> fromProtocolString(const String& value);
    1323 
    1324 inline String toProtocolString(TestProtocolPlatform value)
    1325 {
    1326     switch(value) {
    1327     case TestProtocolPlatformAll:
    1328         return "all"_s;
    1329     case TestProtocolPlatformGeneric:
    1330         return "generic"_s;
    1331     case TestProtocolPlatformIOS:
    1332         return "ios"_s;
    1333     case TestProtocolPlatformMacOS:
    1334         return "macos"_s;
    1335     }
    1336 }
    1337 
    1338 template<>
    1339 inline Optional<TestProtocolPlatform> fromProtocolString(const String& value)
    1340 {
    1341     if (value == "all")
    1342         return TestProtocolPlatformAll;
    1343     if (value == "generic")
    1344         return TestProtocolPlatformGeneric;
    1345     if (value == "ios")
    1346         return TestProtocolPlatformIOS;
    1347     if (value == "macos")
    1348         return TestProtocolPlatformMacOS;
    1349     return WTF::nullopt;
    1350 }
    1351 
    13521306
    13531307inline String toProtocolString(TestProtocolDatabasePrimaryColors value)
     
    14031357}
    14041358
     1359
     1360
    14051361inline String toProtocolString(TestProtocolDatabaseExecuteAllOptionalParametersPrintColor value)
    14061362{
     
    14591415}
    14601416
     1417
     1418
    14611419inline String toProtocolString(TestProtocolDatabaseExecuteNoOptionalParametersPrintColor value)
    14621420{
     
    15191477 */
    15201478
    1521 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
    1522 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1479// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    15231480
    15241481#import "TestProtocolTypeConversions.h"
     
    16001557 */
    16011558
    1602 // DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json
    1603 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1559// DO NOT EDIT THIS FILE. It is automatically generated from commands-with-optional-call-return-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    16041560
    16051561#import "TestProtocolInternal.h"
     
    16121568using namespace Inspector;
    16131569
    1614 
    16151570@implementation TestProtocolDatabaseError
    16161571
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/definitions-with-mac-platform.json-result

    r262202 r262203  
    1 ### Begin File: InspectorBackendCommands.js
    2 /*
    3  * Copyright (C) 2013 Google Inc. All rights reserved.
    4  * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
    5  * Copyright (C) 2014 University of Washington. All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
    10  * 1. Redistributions of source code must retain the above copyright
    11  *    notice, this list of conditions and the following disclaimer.
    12  * 2. Redistributions in binary form must reproduce the above copyright
    13  *    notice, this list of conditions and the following disclaimer in the
    14  *    documentation and/or other materials provided with the distribution.
    15  *
    16  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
    17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    18  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
    20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    26  * THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
    30 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1### Begin File: InspectorBackendCommands.js.in
     2/*
     3 * Copyright (C) 2013 Google Inc. All rights reserved.
     4 * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
     5 * Copyright (C) 2014 University of Washington. All rights reserved.
     6 *
     7 * Redistribution and use in source and binary forms, with or without
     8 * modification, are permitted provided that the following conditions
     9 * are met:
     10 * 1. Redistributions of source code must retain the above copyright
     11 *    notice, this list of conditions and the following disclaimer.
     12 * 2. Redistributions in binary form must reproduce the above copyright
     13 *    notice, this list of conditions and the following disclaimer in the
     14 *    documentation and/or other materials provided with the distribution.
     15 *
     16 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
     17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
     20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     26 * THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29// DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    3130
    3231// Network
    3332InspectorBackend.registerDomain("Network", null);
     33#if PLATFORM(MAC)
    3434InspectorBackend.registerCommand("Network.loadResource", null, [], []);
     35#endif // PLATFORM(MAC)
     36#if PLATFORM(MAC)
    3537InspectorBackend.registerEvent("Network.resourceLoaded", null, []);
     38#endif // PLATFORM(MAC)
    3639InspectorBackend.registerNetworkDispatcher = InspectorBackend.registerDispatcher.bind(InspectorBackend, "Network");
    3740InspectorBackend.activateDomain("Network", null);
    38 ### End File: InspectorBackendCommands.js
     41### End File: InspectorBackendCommands.js.in
    3942
    4043### Begin File: TestAlternateBackendDispatchers.h
     
    6669 */
    6770
    68 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
    69 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     71// DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    7072
    7173#pragma once
     
    9193public:
    9294    virtual ~AlternateNetworkBackendDispatcher() { }
     95#if PLATFORM(MAC)
    9396    virtual void loadResource(long callId) = 0;
     97#endif // PLATFORM(MAC)
    9498};
    9599
     
    127131 */
    128132
    129 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
    130 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     133// DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    131134
    132135#pragma once
     
    146149class NetworkBackendDispatcherHandler {
    147150public:
     151#if PLATFORM(MAC)
    148152    virtual void loadResource(ErrorString&) = 0;
     153#endif // PLATFORM(MAC)
    149154protected:
    150155    virtual ~NetworkBackendDispatcherHandler();
     
    156161    void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) final;
    157162private:
     163#if PLATFORM(MAC)
    158164    void loadResource(long requestId, RefPtr<JSON::Object>&& parameters);
     165#endif // PLATFORM(MAC)
    159166#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    160167public:
     
    162169private:
    163170    AlternateNetworkBackendDispatcher* m_alternateDispatcher { nullptr };
    164 #endif
     171#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    165172private:
    166173    NetworkBackendDispatcher(BackendDispatcher&, NetworkBackendDispatcherHandler*);
     
    199206 */
    200207
    201 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
    202 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     208// DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    203209
    204210#include "config.h"
     
    212218#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    213219#include "TestAlternateBackendDispatchers.h"
    214 #endif
     220#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    215221
    216222namespace Inspector {
     
    237243    message->getObject("params"_s, parameters);
    238244
    239     if (method == "loadResource")
     245#if PLATFORM(MAC)
     246    if (method == "loadResource") {
    240247        loadResource(requestId, WTFMove(parameters));
    241     else
    242         m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'Network." + method + "' was not found");
    243 }
    244 
     248        return;
     249    }
     250#endif // PLATFORM(MAC)
     251
     252    m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'Network." + method + "' was not found");
     253}
     254
     255#if PLATFORM(MAC)
    245256void NetworkBackendDispatcher::loadResource(long requestId, RefPtr<JSON::Object>&&)
    246257{
     
    250261        return;
    251262    }
    252 #endif
     263#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    253264
    254265    ErrorString error;
     
    261272        m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, WTFMove(error));
    262273}
     274#endif // PLATFORM(MAC)
    263275
    264276} // namespace Inspector
     
    294306 */
    295307
    296 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
    297 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     308// DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    298309
    299310#pragma once
     
    311322public:
    312323    NetworkFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { }
     324#if PLATFORM(MAC)
    313325    void resourceLoaded();
     326#endif // PLATFORM(MAC)
    314327private:
    315328    FrontendRouter& m_frontendRouter;
     
    347360 */
    348361
    349 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
    350 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     362// DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    351363
    352364#include "config.h"
     
    358370namespace Inspector {
    359371
     372#if PLATFORM(MAC)
    360373void NetworkFrontendDispatcher::resourceLoaded()
    361374{
     
    365378    m_frontendRouter.sendEvent(jsonMessage->toJSONString());
    366379}
     380#endif // PLATFORM(MAC)
    367381
    368382} // namespace Inspector
     
    398412 */
    399413
    400 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
    401 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     414// DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    402415
    403416#pragma once
     
    416429// Forward declarations.
    417430namespace Network {
     431#if PLATFORM(MAC)
    418432class NetworkError;
     433#endif // PLATFORM(MAC)
    419434} // Network
    420435// End of forward declarations.
     
    424439
    425440namespace Network {
     441
     442#if PLATFORM(MAC)
    426443class NetworkError : public JSON::ObjectBase {
    427444public:
     
    488505    }
    489506};
     507#endif // PLATFORM(MAC)
    490508
    491509} // Network
     
    526544 */
    527545
    528 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
    529 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     546// DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    530547
    531548#include "config.h"
     
    575592 */
    576593
    577 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
    578 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     594// DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    579595
    580596#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
     
    590606public:
    591607    ObjCInspectorNetworkBackendDispatcher(id<TestProtocolNetworkDomainHandler> handler) { m_delegate = handler; }
     608#if PLATFORM(MAC)
    592609    void loadResource(long requestId) final;
     610#endif // PLATFORM(MAC)
    593611private:
    594612    RetainPtr<id<TestProtocolNetworkDomainHandler>> m_delegate;
     
    627645 */
    628646
    629 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
    630 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     647// DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    631648
    632649#import "config.h"
     
    639656namespace Inspector {
    640657
     658#if PLATFORM(MAC)
    641659void ObjCInspectorNetworkBackendDispatcher::loadResource(long requestId)
    642660{
     
    658676    [m_delegate loadResourceWithErrorCallback:errorCallback successCallback:successCallback];
    659677}
    660 
     678#endif // PLATFORM(MAC)
    661679
    662680} // namespace Inspector
     
    692710 */
    693711
    694 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
    695 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     712// DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    696713
    697714#import <WebInspector/TestProtocol.h>
     
    734751 */
    735752
    736 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
    737 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     753// DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    738754
    739755#import "TestProtocolConfiguration.h"
     
    830846 */
    831847
    832 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
    833 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     848// DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    834849
    835850#import "TestProtocolInternal.h"
     
    897912 */
    898913
    899 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
    900 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     914// DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    901915
    902916#import <Foundation/Foundation.h>
     
    905919
    906920
     921#if PLATFORM(MAC)
    907922@class TestProtocolNetworkError;
    908 
    909 typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
    910     TestProtocolPlatformAll,
    911     TestProtocolPlatformGeneric,
    912     TestProtocolPlatformIOS,
    913     TestProtocolPlatformMacOS,
    914 };
    915 
    916 
    917 
    918 
     923#endif // PLATFORM(MAC)
     924
     925
     926
     927#if PLATFORM(MAC)
    919928__attribute__((visibility ("default")))
    920929@interface TestProtocolNetworkError : RWIProtocolJSONObject
     
    925934/* required */ @property (nonatomic, assign) int code;
    926935@end
     936#endif // PLATFORM(MAC)
    927937
    928938@protocol TestProtocolNetworkDomainHandler <NSObject>
    929939@optional
     940#if PLATFORM(MAC)
    930941- (void)loadResourceWithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)(void))successCallback;
     942#endif // PLATFORM(MAC)
    931943@end
    932944
     
    969981 */
    970982
    971 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
    972 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     983// DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    973984
    974985#import "TestProtocol.h"
     
    10121023 */
    10131024
    1014 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
    1015 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1025// DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    10161026
    10171027#import "TestProtocol.h"
     
    10231033Optional<ObjCEnumType> fromProtocolString(const String& value);
    10241034
    1025 inline String toProtocolString(TestProtocolPlatform value)
    1026 {
    1027     switch(value) {
    1028     case TestProtocolPlatformAll:
    1029         return "all"_s;
    1030     case TestProtocolPlatformGeneric:
    1031         return "generic"_s;
    1032     case TestProtocolPlatformIOS:
    1033         return "ios"_s;
    1034     case TestProtocolPlatformMacOS:
    1035         return "macos"_s;
    1036     }
    1037 }
    1038 
    1039 template<>
    1040 inline Optional<TestProtocolPlatform> fromProtocolString(const String& value)
    1041 {
    1042     if (value == "all")
    1043         return TestProtocolPlatformAll;
    1044     if (value == "generic")
    1045         return TestProtocolPlatformGeneric;
    1046     if (value == "ios")
    1047         return TestProtocolPlatformIOS;
    1048     if (value == "macos")
    1049         return TestProtocolPlatformMacOS;
    1050     return WTF::nullopt;
    1051 }
    1052 
    10531035
    10541036
     
    10851067 */
    10861068
    1087 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
    1088 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1069// DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    10891070
    10901071#import "TestProtocolTypeConversions.h"
     
    10981079@interface TestProtocolTypeConversions (NetworkDomain)
    10991080
     1081#if PLATFORM(MAC)
    11001082+ (void)_parseNetworkError:(TestProtocolNetworkError **)outValue fromPayload:(id)payload;
     1083#endif // PLATFORM(MAC)
    11011084
    11021085@end
     
    11041087@implementation TestProtocolTypeConversions (NetworkDomain)
    11051088
     1089#if PLATFORM(MAC)
    11061090+ (void)_parseNetworkError:(TestProtocolNetworkError **)outValue fromPayload:(id)payload
    11071091{
     
    11091093    *outValue = [[TestProtocolNetworkError alloc] initWithPayload:payload];
    11101094}
     1095#endif // PLATFORM(MAC)
    11111096
    11121097@end
     
    11431128 */
    11441129
    1145 // DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json
    1146 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1130// DO NOT EDIT THIS FILE. It is automatically generated from definitions-with-mac-platform.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    11471131
    11481132#import "TestProtocolInternal.h"
     
    11551139using namespace Inspector;
    11561140
    1157 
     1141#if PLATFORM(MAC)
    11581142@implementation TestProtocolNetworkError
    11591143
     
    12131197
    12141198@end
     1199#endif // PLATFORM(MAC)
    12151200
    12161201
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/domain-debuggableTypes.json-result

    r262202 r262203  
    1 ### Begin File: InspectorBackendCommands.js
    2 /*
    3  * Copyright (C) 2013 Google Inc. All rights reserved.
    4  * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
    5  * Copyright (C) 2014 University of Washington. All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
    10  * 1. Redistributions of source code must retain the above copyright
    11  *    notice, this list of conditions and the following disclaimer.
    12  * 2. Redistributions in binary form must reproduce the above copyright
    13  *    notice, this list of conditions and the following disclaimer in the
    14  *    documentation and/or other materials provided with the distribution.
    15  *
    16  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
    17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    18  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
    20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    26  * THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 // DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json
    30 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1### Begin File: InspectorBackendCommands.js.in
     2/*
     3 * Copyright (C) 2013 Google Inc. All rights reserved.
     4 * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
     5 * Copyright (C) 2014 University of Washington. All rights reserved.
     6 *
     7 * Redistribution and use in source and binary forms, with or without
     8 * modification, are permitted provided that the following conditions
     9 * are met:
     10 * 1. Redistributions of source code must retain the above copyright
     11 *    notice, this list of conditions and the following disclaimer.
     12 * 2. Redistributions in binary form must reproduce the above copyright
     13 *    notice, this list of conditions and the following disclaimer in the
     14 *    documentation and/or other materials provided with the distribution.
     15 *
     16 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
     17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
     20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     26 * THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29// DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    3130
    3231// Domain
     
    3635InspectorBackend.registerDomainDispatcher = InspectorBackend.registerDispatcher.bind(InspectorBackend, "Domain");
    3736InspectorBackend.activateDomain("Domain", ["web-page"]);
    38 ### End File: InspectorBackendCommands.js
     37### End File: InspectorBackendCommands.js.in
    3938
    4039### Begin File: TestAlternateBackendDispatchers.h
     
    6665 */
    6766
    68 // DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json
    69 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     67// DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    7068
    7169#pragma once
     
    127125 */
    128126
    129 // DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json
    130 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     127// DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    131128
    132129#pragma once
     
    162159private:
    163160    AlternateDomainBackendDispatcher* m_alternateDispatcher { nullptr };
    164 #endif
     161#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    165162private:
    166163    DomainBackendDispatcher(BackendDispatcher&, DomainBackendDispatcherHandler*);
     
    199196 */
    200197
    201 // DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json
    202 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     198// DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    203199
    204200#include "config.h"
     
    212208#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    213209#include "TestAlternateBackendDispatchers.h"
    214 #endif
     210#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    215211
    216212namespace Inspector {
     
    237233    message->getObject("params"_s, parameters);
    238234
    239     if (method == "Command")
     235    if (method == "Command") {
    240236        Command(requestId, WTFMove(parameters));
    241     else
    242         m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'Domain." + method + "' was not found");
     237        return;
     238    }
     239
     240    m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'Domain." + method + "' was not found");
    243241}
    244242
     
    250248        return;
    251249    }
    252 #endif
     250#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    253251
    254252    ErrorString error;
     
    294292 */
    295293
    296 // DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json
    297 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     294// DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    298295
    299296#pragma once
     
    347344 */
    348345
    349 // DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json
    350 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     346// DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    351347
    352348#include "config.h"
     
    398394 */
    399395
    400 // DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json
    401 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     396// DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    402397
    403398#pragma once
     
    453448 */
    454449
    455 // DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json
    456 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     450// DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    457451
    458452#include "config.h"
     
    502496 */
    503497
    504 // DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json
    505 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     498// DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    506499
    507500#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
     
    554547 */
    555548
    556 // DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json
    557 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     549// DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    558550
    559551#import "config.h"
     
    586578}
    587579
    588 
    589580} // namespace Inspector
    590581
     
    619610 */
    620611
    621 // DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json
    622 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     612// DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    623613
    624614#import <WebInspector/TestProtocol.h>
     
    661651 */
    662652
    663 // DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json
    664 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     653// DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    665654
    666655#import "TestProtocolConfiguration.h"
     
    757746 */
    758747
    759 // DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json
    760 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     748// DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    761749
    762750#import "TestProtocolInternal.h"
     
    824812 */
    825813
    826 // DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json
    827 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     814// DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    828815
    829816#import <Foundation/Foundation.h>
     
    833820
    834821
    835 
    836 typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
    837     TestProtocolPlatformAll,
    838     TestProtocolPlatformGeneric,
    839     TestProtocolPlatformIOS,
    840     TestProtocolPlatformMacOS,
    841 };
    842822
    843823
     
    888868 */
    889869
    890 // DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json
    891 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     870// DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    892871
    893872#import "TestProtocol.h"
     
    931910 */
    932911
    933 // DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json
    934 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     912// DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    935913
    936914#import "TestProtocol.h"
     
    942920Optional<ObjCEnumType> fromProtocolString(const String& value);
    943921
    944 inline String toProtocolString(TestProtocolPlatform value)
    945 {
    946     switch(value) {
    947     case TestProtocolPlatformAll:
    948         return "all"_s;
    949     case TestProtocolPlatformGeneric:
    950         return "generic"_s;
    951     case TestProtocolPlatformIOS:
    952         return "ios"_s;
    953     case TestProtocolPlatformMacOS:
    954         return "macos"_s;
    955     }
    956 }
    957 
    958 template<>
    959 inline Optional<TestProtocolPlatform> fromProtocolString(const String& value)
    960 {
    961     if (value == "all")
    962         return TestProtocolPlatformAll;
    963     if (value == "generic")
    964         return TestProtocolPlatformGeneric;
    965     if (value == "ios")
    966         return TestProtocolPlatformIOS;
    967     if (value == "macos")
    968         return TestProtocolPlatformMacOS;
    969     return WTF::nullopt;
    970 }
    971 
    972922} // namespace Inspector
    973923
     
    1002952 */
    1003953
    1004 // DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json
    1005 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     954// DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    1006955
    1007956#import "TestProtocolTypeConversions.h"
     
    1048997 */
    1049998
    1050 // DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json
    1051 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     999// DO NOT EDIT THIS FILE. It is automatically generated from domain-debuggableTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    10521000
    10531001#import "TestProtocolInternal.h"
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/domain-targetType-matching-domain-debuggableType.json-result

    r262202 r262203  
    1 ### Begin File: InspectorBackendCommands.js
    2 /*
    3  * Copyright (C) 2013 Google Inc. All rights reserved.
    4  * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
    5  * Copyright (C) 2014 University of Washington. All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
    10  * 1. Redistributions of source code must retain the above copyright
    11  *    notice, this list of conditions and the following disclaimer.
    12  * 2. Redistributions in binary form must reproduce the above copyright
    13  *    notice, this list of conditions and the following disclaimer in the
    14  *    documentation and/or other materials provided with the distribution.
    15  *
    16  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
    17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    18  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
    20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    26  * THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json
    30 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1### Begin File: InspectorBackendCommands.js.in
     2/*
     3 * Copyright (C) 2013 Google Inc. All rights reserved.
     4 * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
     5 * Copyright (C) 2014 University of Washington. All rights reserved.
     6 *
     7 * Redistribution and use in source and binary forms, with or without
     8 * modification, are permitted provided that the following conditions
     9 * are met:
     10 * 1. Redistributions of source code must retain the above copyright
     11 *    notice, this list of conditions and the following disclaimer.
     12 * 2. Redistributions in binary form must reproduce the above copyright
     13 *    notice, this list of conditions and the following disclaimer in the
     14 *    documentation and/or other materials provided with the distribution.
     15 *
     16 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
     17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
     20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     26 * THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    3130
    3231// Domain
     
    3635InspectorBackend.registerDomainDispatcher = InspectorBackend.registerDispatcher.bind(InspectorBackend, "Domain");
    3736InspectorBackend.activateDomain("Domain", ["page"]);
    38 ### End File: InspectorBackendCommands.js
     37### End File: InspectorBackendCommands.js.in
    3938
    4039### Begin File: TestAlternateBackendDispatchers.h
     
    6665 */
    6766
    68 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json
    69 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     67// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    7068
    7169#pragma once
     
    127125 */
    128126
    129 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json
    130 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     127// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    131128
    132129#pragma once
     
    162159private:
    163160    AlternateDomainBackendDispatcher* m_alternateDispatcher { nullptr };
    164 #endif
     161#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    165162private:
    166163    DomainBackendDispatcher(BackendDispatcher&, DomainBackendDispatcherHandler*);
     
    199196 */
    200197
    201 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json
    202 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     198// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    203199
    204200#include "config.h"
     
    212208#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    213209#include "TestAlternateBackendDispatchers.h"
    214 #endif
     210#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    215211
    216212namespace Inspector {
     
    237233    message->getObject("params"_s, parameters);
    238234
    239     if (method == "Command")
     235    if (method == "Command") {
    240236        Command(requestId, WTFMove(parameters));
    241     else
    242         m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'Domain." + method + "' was not found");
     237        return;
     238    }
     239
     240    m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'Domain." + method + "' was not found");
    243241}
    244242
     
    250248        return;
    251249    }
    252 #endif
     250#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    253251
    254252    ErrorString error;
     
    294292 */
    295293
    296 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json
    297 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     294// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    298295
    299296#pragma once
     
    347344 */
    348345
    349 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json
    350 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     346// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    351347
    352348#include "config.h"
     
    398394 */
    399395
    400 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json
    401 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     396// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    402397
    403398#pragma once
     
    453448 */
    454449
    455 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json
    456 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     450// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    457451
    458452#include "config.h"
     
    502496 */
    503497
    504 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json
    505 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     498// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    506499
    507500#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
     
    554547 */
    555548
    556 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json
    557 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     549// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    558550
    559551#import "config.h"
     
    586578}
    587579
    588 
    589580} // namespace Inspector
    590581
     
    619610 */
    620611
    621 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json
    622 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     612// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    623613
    624614#import <WebInspector/TestProtocol.h>
     
    661651 */
    662652
    663 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json
    664 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     653// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    665654
    666655#import "TestProtocolConfiguration.h"
     
    757746 */
    758747
    759 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json
    760 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     748// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    761749
    762750#import "TestProtocolInternal.h"
     
    824812 */
    825813
    826 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json
    827 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     814// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    828815
    829816#import <Foundation/Foundation.h>
     
    833820
    834821
    835 
    836 typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
    837     TestProtocolPlatformAll,
    838     TestProtocolPlatformGeneric,
    839     TestProtocolPlatformIOS,
    840     TestProtocolPlatformMacOS,
    841 };
    842822
    843823
     
    888868 */
    889869
    890 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json
    891 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     870// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    892871
    893872#import "TestProtocol.h"
     
    931910 */
    932911
    933 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json
    934 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     912// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    935913
    936914#import "TestProtocol.h"
     
    942920Optional<ObjCEnumType> fromProtocolString(const String& value);
    943921
    944 inline String toProtocolString(TestProtocolPlatform value)
    945 {
    946     switch(value) {
    947     case TestProtocolPlatformAll:
    948         return "all"_s;
    949     case TestProtocolPlatformGeneric:
    950         return "generic"_s;
    951     case TestProtocolPlatformIOS:
    952         return "ios"_s;
    953     case TestProtocolPlatformMacOS:
    954         return "macos"_s;
    955     }
    956 }
    957 
    958 template<>
    959 inline Optional<TestProtocolPlatform> fromProtocolString(const String& value)
    960 {
    961     if (value == "all")
    962         return TestProtocolPlatformAll;
    963     if (value == "generic")
    964         return TestProtocolPlatformGeneric;
    965     if (value == "ios")
    966         return TestProtocolPlatformIOS;
    967     if (value == "macos")
    968         return TestProtocolPlatformMacOS;
    969     return WTF::nullopt;
    970 }
    971 
    972922} // namespace Inspector
    973923
     
    1002952 */
    1003953
    1004 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json
    1005 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     954// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    1006955
    1007956#import "TestProtocolTypeConversions.h"
     
    1048997 */
    1049998
    1050 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json
    1051 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     999// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    10521000
    10531001#import "TestProtocolInternal.h"
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/domain-targetTypes.json-result

    r262202 r262203  
    1 ### Begin File: InspectorBackendCommands.js
    2 /*
    3  * Copyright (C) 2013 Google Inc. All rights reserved.
    4  * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
    5  * Copyright (C) 2014 University of Washington. All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
    10  * 1. Redistributions of source code must retain the above copyright
    11  *    notice, this list of conditions and the following disclaimer.
    12  * 2. Redistributions in binary form must reproduce the above copyright
    13  *    notice, this list of conditions and the following disclaimer in the
    14  *    documentation and/or other materials provided with the distribution.
    15  *
    16  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
    17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    18  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
    20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    26  * THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json
    30 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1### Begin File: InspectorBackendCommands.js.in
     2/*
     3 * Copyright (C) 2013 Google Inc. All rights reserved.
     4 * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
     5 * Copyright (C) 2014 University of Washington. All rights reserved.
     6 *
     7 * Redistribution and use in source and binary forms, with or without
     8 * modification, are permitted provided that the following conditions
     9 * are met:
     10 * 1. Redistributions of source code must retain the above copyright
     11 *    notice, this list of conditions and the following disclaimer.
     12 * 2. Redistributions in binary form must reproduce the above copyright
     13 *    notice, this list of conditions and the following disclaimer in the
     14 *    documentation and/or other materials provided with the distribution.
     15 *
     16 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
     17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
     20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     26 * THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    3130
    3231// Domain
     
    3635InspectorBackend.registerDomainDispatcher = InspectorBackend.registerDispatcher.bind(InspectorBackend, "Domain");
    3736InspectorBackend.activateDomain("Domain", null);
    38 ### End File: InspectorBackendCommands.js
     37### End File: InspectorBackendCommands.js.in
    3938
    4039### Begin File: TestAlternateBackendDispatchers.h
     
    6665 */
    6766
    68 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json
    69 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     67// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    7068
    7169#pragma once
     
    127125 */
    128126
    129 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json
    130 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     127// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    131128
    132129#pragma once
     
    162159private:
    163160    AlternateDomainBackendDispatcher* m_alternateDispatcher { nullptr };
    164 #endif
     161#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    165162private:
    166163    DomainBackendDispatcher(BackendDispatcher&, DomainBackendDispatcherHandler*);
     
    199196 */
    200197
    201 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json
    202 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     198// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    203199
    204200#include "config.h"
     
    212208#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    213209#include "TestAlternateBackendDispatchers.h"
    214 #endif
     210#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    215211
    216212namespace Inspector {
     
    237233    message->getObject("params"_s, parameters);
    238234
    239     if (method == "Command")
     235    if (method == "Command") {
    240236        Command(requestId, WTFMove(parameters));
    241     else
    242         m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'Domain." + method + "' was not found");
     237        return;
     238    }
     239
     240    m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'Domain." + method + "' was not found");
    243241}
    244242
     
    250248        return;
    251249    }
    252 #endif
     250#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    253251
    254252    ErrorString error;
     
    294292 */
    295293
    296 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json
    297 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     294// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    298295
    299296#pragma once
     
    347344 */
    348345
    349 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json
    350 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     346// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    351347
    352348#include "config.h"
     
    398394 */
    399395
    400 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json
    401 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     396// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    402397
    403398#pragma once
     
    453448 */
    454449
    455 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json
    456 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     450// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    457451
    458452#include "config.h"
     
    502496 */
    503497
    504 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json
    505 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     498// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    506499
    507500#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
     
    554547 */
    555548
    556 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json
    557 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     549// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    558550
    559551#import "config.h"
     
    586578}
    587579
    588 
    589580} // namespace Inspector
    590581
     
    619610 */
    620611
    621 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json
    622 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     612// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    623613
    624614#import <WebInspector/TestProtocol.h>
     
    661651 */
    662652
    663 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json
    664 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     653// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    665654
    666655#import "TestProtocolConfiguration.h"
     
    757746 */
    758747
    759 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json
    760 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     748// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    761749
    762750#import "TestProtocolInternal.h"
     
    824812 */
    825813
    826 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json
    827 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     814// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    828815
    829816#import <Foundation/Foundation.h>
     
    833820
    834821
    835 
    836 typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
    837     TestProtocolPlatformAll,
    838     TestProtocolPlatformGeneric,
    839     TestProtocolPlatformIOS,
    840     TestProtocolPlatformMacOS,
    841 };
    842822
    843823
     
    888868 */
    889869
    890 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json
    891 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     870// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    892871
    893872#import "TestProtocol.h"
     
    931910 */
    932911
    933 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json
    934 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     912// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    935913
    936914#import "TestProtocol.h"
     
    942920Optional<ObjCEnumType> fromProtocolString(const String& value);
    943921
    944 inline String toProtocolString(TestProtocolPlatform value)
    945 {
    946     switch(value) {
    947     case TestProtocolPlatformAll:
    948         return "all"_s;
    949     case TestProtocolPlatformGeneric:
    950         return "generic"_s;
    951     case TestProtocolPlatformIOS:
    952         return "ios"_s;
    953     case TestProtocolPlatformMacOS:
    954         return "macos"_s;
    955     }
    956 }
    957 
    958 template<>
    959 inline Optional<TestProtocolPlatform> fromProtocolString(const String& value)
    960 {
    961     if (value == "all")
    962         return TestProtocolPlatformAll;
    963     if (value == "generic")
    964         return TestProtocolPlatformGeneric;
    965     if (value == "ios")
    966         return TestProtocolPlatformIOS;
    967     if (value == "macos")
    968         return TestProtocolPlatformMacOS;
    969     return WTF::nullopt;
    970 }
    971 
    972922} // namespace Inspector
    973923
     
    1002952 */
    1003953
    1004 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json
    1005 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     954// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    1006955
    1007956#import "TestProtocolTypeConversions.h"
     
    1048997 */
    1049998
    1050 // DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json
    1051 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     999// DO NOT EDIT THIS FILE. It is automatically generated from domain-targetTypes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    10521000
    10531001#import "TestProtocolInternal.h"
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result

    r262202 r262203  
    1 ### Begin File: InspectorBackendCommands.js
    2 /*
    3  * Copyright (C) 2013 Google Inc. All rights reserved.
    4  * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
    5  * Copyright (C) 2014 University of Washington. All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
    10  * 1. Redistributions of source code must retain the above copyright
    11  *    notice, this list of conditions and the following disclaimer.
    12  * 2. Redistributions in binary form must reproduce the above copyright
    13  *    notice, this list of conditions and the following disclaimer in the
    14  *    documentation and/or other materials provided with the distribution.
    15  *
    16  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
    17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    18  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
    20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    26  * THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 // DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
    30 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1### Begin File: InspectorBackendCommands.js.in
     2/*
     3 * Copyright (C) 2013 Google Inc. All rights reserved.
     4 * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
     5 * Copyright (C) 2014 University of Washington. All rights reserved.
     6 *
     7 * Redistribution and use in source and binary forms, with or without
     8 * modification, are permitted provided that the following conditions
     9 * are met:
     10 * 1. Redistributions of source code must retain the above copyright
     11 *    notice, this list of conditions and the following disclaimer.
     12 * 2. Redistributions in binary form must reproduce the above copyright
     13 *    notice, this list of conditions and the following disclaimer in the
     14 *    documentation and/or other materials provided with the distribution.
     15 *
     16 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
     17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
     20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     26 * THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    3130
    3231// Network1
     
    4544InspectorBackend.registerCommand("Network3.loadResource7", null, [], []);
    4645InspectorBackend.activateDomain("Network3", null);
    47 ### End File: InspectorBackendCommands.js
     46### End File: InspectorBackendCommands.js.in
    4847
    4948### Begin File: TestAlternateBackendDispatchers.h
     
    7574 */
    7675
    77 // DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
    78 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     76// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    7977
    8078#pragma once
     
    102100    virtual void loadResource1(long callId) = 0;
    103101};
     102
    104103class AlternateNetwork3BackendDispatcher : public AlternateBackendDispatcher {
    105104public:
     
    147146 */
    148147
    149 // DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
    150 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     148// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    151149
    152150#pragma once
     
    196194private:
    197195    AlternateNetwork1BackendDispatcher* m_alternateDispatcher { nullptr };
    198 #endif
     196#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    199197private:
    200198    Network1BackendDispatcher(BackendDispatcher&, Network1BackendDispatcherHandler*);
     
    219217private:
    220218    AlternateNetwork3BackendDispatcher* m_alternateDispatcher { nullptr };
    221 #endif
     219#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    222220private:
    223221    Network3BackendDispatcher(BackendDispatcher&, Network3BackendDispatcherHandler*);
     
    256254 */
    257255
    258 // DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
    259 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     256// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    260257
    261258#include "config.h"
     
    269266#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    270267#include "TestAlternateBackendDispatchers.h"
    271 #endif
     268#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    272269
    273270namespace Inspector {
     
    295292    message->getObject("params"_s, parameters);
    296293
    297     if (method == "loadResource1")
     294    if (method == "loadResource1") {
    298295        loadResource1(requestId, WTFMove(parameters));
    299     else
    300         m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'Network1." + method + "' was not found");
     296        return;
     297    }
     298
     299    m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'Network1." + method + "' was not found");
    301300}
    302301
     
    308307        return;
    309308    }
    310 #endif
     309#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    311310
    312311    ErrorString error;
     
    376375        return;
    377376    }
    378 #endif
     377#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    379378
    380379    ErrorString error;
     
    395394        return;
    396395    }
    397 #endif
     396#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    398397
    399398    ErrorString error;
     
    414413        return;
    415414    }
    416 #endif
     415#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    417416
    418417    ErrorString error;
     
    433432        return;
    434433    }
    435 #endif
     434#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    436435
    437436    ErrorString error;
     
    452451        return;
    453452    }
    454 #endif
     453#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    455454
    456455    ErrorString error;
     
    471470        return;
    472471    }
    473 #endif
     472#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    474473
    475474    ErrorString error;
     
    490489        return;
    491490    }
    492 #endif
     491#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    493492
    494493    ErrorString error;
     
    534533 */
    535534
    536 // DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
    537 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     535// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    538536
    539537#pragma once
     
    578576 */
    579577
    580 // DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
    581 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     578// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    582579
    583580#include "config.h"
     
    621618 */
    622619
    623 // DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
    624 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     620// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    625621
    626622#pragma once
     
    681677 */
    682678
    683 // DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
    684 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     679// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    685680
    686681#include "config.h"
     
    730725 */
    731726
    732 // DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
    733 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     727// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    734728
    735729#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
     
    798792 */
    799793
    800 // DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
    801 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     794// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    802795
    803796#import "config.h"
     
    830823}
    831824
    832 
    833825void ObjCInspectorNetwork3BackendDispatcher::loadResource1(long requestId)
    834826{
     
    971963}
    972964
    973 
    974965} // namespace Inspector
    975966
     
    1004995 */
    1005996
    1006 // DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
    1007 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     997// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    1008998
    1009999#import <WebInspector/TestProtocol.h>
     
    10461036 */
    10471037
    1048 // DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
    1049 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1038// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    10501039
    10511040#import "TestProtocolConfiguration.h"
     
    11531142 */
    11541143
    1155 // DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
    1156 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1144// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    11571145
    11581146#import "TestProtocolInternal.h"
     
    11941182 */
    11951183
    1196 // DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
    1197 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1184// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    11981185
    11991186#import <Foundation/Foundation.h>
     
    12031190
    12041191
    1205 
    1206 typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
    1207     TestProtocolPlatformAll,
    1208     TestProtocolPlatformGeneric,
    1209     TestProtocolPlatformIOS,
    1210     TestProtocolPlatformMacOS,
    1211 };
    12121192
    12131193
     
    12661246 */
    12671247
    1268 // DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
    1269 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1248// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    12701249
    12711250#import "TestProtocol.h"
     
    13071286 */
    13081287
    1309 // DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
    1310 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1288// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    13111289
    13121290#import "TestProtocol.h"
     
    13181296Optional<ObjCEnumType> fromProtocolString(const String& value);
    13191297
    1320 inline String toProtocolString(TestProtocolPlatform value)
    1321 {
    1322     switch(value) {
    1323     case TestProtocolPlatformAll:
    1324         return "all"_s;
    1325     case TestProtocolPlatformGeneric:
    1326         return "generic"_s;
    1327     case TestProtocolPlatformIOS:
    1328         return "ios"_s;
    1329     case TestProtocolPlatformMacOS:
    1330         return "macos"_s;
    1331     }
    1332 }
    1333 
    1334 template<>
    1335 inline Optional<TestProtocolPlatform> fromProtocolString(const String& value)
    1336 {
    1337     if (value == "all")
    1338         return TestProtocolPlatformAll;
    1339     if (value == "generic")
    1340         return TestProtocolPlatformGeneric;
    1341     if (value == "ios")
    1342         return TestProtocolPlatformIOS;
    1343     if (value == "macos")
    1344         return TestProtocolPlatformMacOS;
    1345     return WTF::nullopt;
    1346 }
    1347 
    13481298
    13491299
     
    13801330 */
    13811331
    1382 // DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
    1383 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1332// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    13841333
    13851334#import "TestProtocolTypeConversions.h"
     
    14381387 */
    14391388
    1440 // DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json
    1441 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1389// DO NOT EDIT THIS FILE. It is automatically generated from domains-with-varying-command-sizes.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    14421390
    14431391#import "TestProtocolInternal.h"
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/enum-values.json-result

    r262202 r262203  
    1 ### Begin File: InspectorBackendCommands.js
    2 /*
    3  * Copyright (C) 2013 Google Inc. All rights reserved.
    4  * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
    5  * Copyright (C) 2014 University of Washington. All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
    10  * 1. Redistributions of source code must retain the above copyright
    11  *    notice, this list of conditions and the following disclaimer.
    12  * 2. Redistributions in binary form must reproduce the above copyright
    13  *    notice, this list of conditions and the following disclaimer in the
    14  *    documentation and/or other materials provided with the distribution.
    15  *
    16  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
    17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    18  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
    20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    26  * THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
    30 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1### Begin File: InspectorBackendCommands.js.in
     2/*
     3 * Copyright (C) 2013 Google Inc. All rights reserved.
     4 * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
     5 * Copyright (C) 2014 University of Washington. All rights reserved.
     6 *
     7 * Redistribution and use in source and binary forms, with or without
     8 * modification, are permitted provided that the following conditions
     9 * are met:
     10 * 1. Redistributions of source code must retain the above copyright
     11 *    notice, this list of conditions and the following disclaimer.
     12 * 2. Redistributions in binary form must reproduce the above copyright
     13 *    notice, this list of conditions and the following disclaimer in the
     14 *    documentation and/or other materials provided with the distribution.
     15 *
     16 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
     17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
     20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     26 * THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    3130
    3231// TypeDomain
     
    4645InspectorBackend.registerEventDomainDispatcher = InspectorBackend.registerDispatcher.bind(InspectorBackend, "EventDomain");
    4746InspectorBackend.activateDomain("EventDomain", null);
    48 ### End File: InspectorBackendCommands.js
     47### End File: InspectorBackendCommands.js.in
    4948
    5049### Begin File: TestAlternateBackendDispatchers.h
     
    7675 */
    7776
    78 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
    79 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     77// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    8078
    8179#pragma once
     
    137135 */
    138136
    139 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
    140 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     137// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    141138
    142139#pragma once
     
    179176private:
    180177    AlternateCommandDomainBackendDispatcher* m_alternateDispatcher { nullptr };
    181 #endif
     178#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    182179private:
    183180    CommandDomainBackendDispatcher(BackendDispatcher&, CommandDomainBackendDispatcherHandler*);
     
    216213 */
    217214
    218 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
    219 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     215// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    220216
    221217#include "config.h"
     
    229225#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    230226#include "TestAlternateBackendDispatchers.h"
    231 #endif
     227#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    232228
    233229namespace Inspector {
     
    254250    message->getObject("params"_s, parameters);
    255251
    256     if (method == "commandWithEnumReturnValue")
     252    if (method == "commandWithEnumReturnValue") {
    257253        commandWithEnumReturnValue(requestId, WTFMove(parameters));
    258     else
    259         m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'CommandDomain." + method + "' was not found");
     254        return;
     255    }
     256
     257    m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'CommandDomain." + method + "' was not found");
    260258}
    261259
     
    267265        return;
    268266    }
    269 #endif
     267#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    270268
    271269    ErrorString error;
     
    315313 */
    316314
    317 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
    318 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     315// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    319316
    320317#pragma once
     
    374371 */
    375372
    376 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
    377 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     373// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    378374
    379375#include "config.h"
     
    428424 */
    429425
    430 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
    431 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     426// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    432427
    433428#pragma once
     
    465460
    466461namespace TypeDomain {
    467 /*  */
     462
    468463enum class TypeDomainEnum {
    469464    Shared = 0,
     
    472467    Blue = 3,
    473468}; // enum class TypeDomainEnum
     469
    474470} // TypeDomain
    475471
     
    532528 */
    533529
    534 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
    535 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     530// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    536531
    537532#include "config.h"
     
    564559
    565560// Enums in the 'TypeDomain' Domain
     561
    566562template<>
    567563Optional<Inspector::Protocol::TypeDomain::TypeDomainEnum> parseEnumValueFromString<Inspector::Protocol::TypeDomain::TypeDomainEnum>(const String& protocolString)
     
    580576}
    581577
    582 
    583578} // namespace TestHelpers
    584579
     
    619614 */
    620615
    621 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
    622 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     616// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    623617
    624618#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
     
    671665 */
    672666
    673 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
    674 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     667// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    675668
    676669#import "config.h"
     
    705698}
    706699
    707 
    708700} // namespace Inspector
    709701
     
    738730 */
    739731
    740 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
    741 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     732// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    742733
    743734#import <WebInspector/TestProtocol.h>
     
    780771 */
    781772
    782 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
    783 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     773// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    784774
    785775#import "TestProtocolConfiguration.h"
     
    876866 */
    877867
    878 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
    879 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     868// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    880869
    881870#import "TestProtocolInternal.h"
     
    946935 */
    947936
    948 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
    949 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     937// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    950938
    951939#import <Foundation/Foundation.h>
     
    954942
    955943
    956 
    957 
    958 typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
    959     TestProtocolPlatformAll,
    960     TestProtocolPlatformGeneric,
    961     TestProtocolPlatformIOS,
    962     TestProtocolPlatformMacOS,
    963 };
    964944
    965945
     
    1016996 */
    1017997
    1018 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
    1019 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     998// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    1020999
    10211000#import "TestProtocol.h"
     
    10591038 */
    10601039
    1061 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
    1062 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1040// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    10631041
    10641042#import "TestProtocol.h"
     
    10691047template<typename ObjCEnumType>
    10701048Optional<ObjCEnumType> fromProtocolString(const String& value);
    1071 
    1072 inline String toProtocolString(TestProtocolPlatform value)
    1073 {
    1074     switch(value) {
    1075     case TestProtocolPlatformAll:
    1076         return "all"_s;
    1077     case TestProtocolPlatformGeneric:
    1078         return "generic"_s;
    1079     case TestProtocolPlatformIOS:
    1080         return "ios"_s;
    1081     case TestProtocolPlatformMacOS:
    1082         return "macos"_s;
    1083     }
    1084 }
    1085 
    1086 template<>
    1087 inline Optional<TestProtocolPlatform> fromProtocolString(const String& value)
    1088 {
    1089     if (value == "all")
    1090         return TestProtocolPlatformAll;
    1091     if (value == "generic")
    1092         return TestProtocolPlatformGeneric;
    1093     if (value == "ios")
    1094         return TestProtocolPlatformIOS;
    1095     if (value == "macos")
    1096         return TestProtocolPlatformMacOS;
    1097     return WTF::nullopt;
    1098 }
    1099 
    11001049
    11011050inline String toProtocolString(TestProtocolTypeDomainEnum value)
     
    11591108 */
    11601109
    1161 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
    1162 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1110// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    11631111
    11641112#import "TestProtocolTypeConversions.h"
     
    12191167 */
    12201168
    1221 // DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json
    1222 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1169// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    12231170
    12241171#import "TestProtocolInternal.h"
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/event-targetType-matching-domain-debuggableType.json-result

    r262202 r262203  
    1 ### Begin File: InspectorBackendCommands.js
    2 /*
    3  * Copyright (C) 2013 Google Inc. All rights reserved.
    4  * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
    5  * Copyright (C) 2014 University of Washington. All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
    10  * 1. Redistributions of source code must retain the above copyright
    11  *    notice, this list of conditions and the following disclaimer.
    12  * 2. Redistributions in binary form must reproduce the above copyright
    13  *    notice, this list of conditions and the following disclaimer in the
    14  *    documentation and/or other materials provided with the distribution.
    15  *
    16  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
    17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    18  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
    20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    26  * THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 // DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json
    30 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1### Begin File: InspectorBackendCommands.js.in
     2/*
     3 * Copyright (C) 2013 Google Inc. All rights reserved.
     4 * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
     5 * Copyright (C) 2014 University of Washington. All rights reserved.
     6 *
     7 * Redistribution and use in source and binary forms, with or without
     8 * modification, are permitted provided that the following conditions
     9 * are met:
     10 * 1. Redistributions of source code must retain the above copyright
     11 *    notice, this list of conditions and the following disclaimer.
     12 * 2. Redistributions in binary form must reproduce the above copyright
     13 *    notice, this list of conditions and the following disclaimer in the
     14 *    documentation and/or other materials provided with the distribution.
     15 *
     16 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
     17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
     20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     26 * THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29// DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    3130
    3231// Domain
     
    3635InspectorBackend.registerDomainDispatcher = InspectorBackend.registerDispatcher.bind(InspectorBackend, "Domain");
    3736InspectorBackend.activateDomain("Domain", ["page"]);
    38 ### End File: InspectorBackendCommands.js
     37### End File: InspectorBackendCommands.js.in
    3938
    4039### Begin File: TestAlternateBackendDispatchers.h
     
    6665 */
    6766
    68 // DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json
    69 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     67// DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    7068
    7169#pragma once
     
    127125 */
    128126
    129 // DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json
    130 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     127// DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    131128
    132129#pragma once
     
    162159private:
    163160    AlternateDomainBackendDispatcher* m_alternateDispatcher { nullptr };
    164 #endif
     161#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    165162private:
    166163    DomainBackendDispatcher(BackendDispatcher&, DomainBackendDispatcherHandler*);
     
    199196 */
    200197
    201 // DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json
    202 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     198// DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    203199
    204200#include "config.h"
     
    212208#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    213209#include "TestAlternateBackendDispatchers.h"
    214 #endif
     210#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    215211
    216212namespace Inspector {
     
    237233    message->getObject("params"_s, parameters);
    238234
    239     if (method == "Command")
     235    if (method == "Command") {
    240236        Command(requestId, WTFMove(parameters));
    241     else
    242         m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'Domain." + method + "' was not found");
     237        return;
     238    }
     239
     240    m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'Domain." + method + "' was not found");
    243241}
    244242
     
    250248        return;
    251249    }
    252 #endif
     250#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    253251
    254252    ErrorString error;
     
    294292 */
    295293
    296 // DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json
    297 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     294// DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    298295
    299296#pragma once
     
    347344 */
    348345
    349 // DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json
    350 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     346// DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    351347
    352348#include "config.h"
     
    398394 */
    399395
    400 // DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json
    401 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     396// DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    402397
    403398#pragma once
     
    453448 */
    454449
    455 // DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json
    456 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     450// DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    457451
    458452#include "config.h"
     
    502496 */
    503497
    504 // DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json
    505 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     498// DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    506499
    507500#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
     
    554547 */
    555548
    556 // DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json
    557 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     549// DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    558550
    559551#import "config.h"
     
    586578}
    587579
    588 
    589580} // namespace Inspector
    590581
     
    619610 */
    620611
    621 // DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json
    622 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     612// DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    623613
    624614#import <WebInspector/TestProtocol.h>
     
    661651 */
    662652
    663 // DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json
    664 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     653// DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    665654
    666655#import "TestProtocolConfiguration.h"
     
    757746 */
    758747
    759 // DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json
    760 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     748// DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    761749
    762750#import "TestProtocolInternal.h"
     
    824812 */
    825813
    826 // DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json
    827 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     814// DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    828815
    829816#import <Foundation/Foundation.h>
     
    833820
    834821
    835 
    836 typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
    837     TestProtocolPlatformAll,
    838     TestProtocolPlatformGeneric,
    839     TestProtocolPlatformIOS,
    840     TestProtocolPlatformMacOS,
    841 };
    842822
    843823
     
    888868 */
    889869
    890 // DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json
    891 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     870// DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    892871
    893872#import "TestProtocol.h"
     
    931910 */
    932911
    933 // DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json
    934 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     912// DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    935913
    936914#import "TestProtocol.h"
     
    942920Optional<ObjCEnumType> fromProtocolString(const String& value);
    943921
    944 inline String toProtocolString(TestProtocolPlatform value)
    945 {
    946     switch(value) {
    947     case TestProtocolPlatformAll:
    948         return "all"_s;
    949     case TestProtocolPlatformGeneric:
    950         return "generic"_s;
    951     case TestProtocolPlatformIOS:
    952         return "ios"_s;
    953     case TestProtocolPlatformMacOS:
    954         return "macos"_s;
    955     }
    956 }
    957 
    958 template<>
    959 inline Optional<TestProtocolPlatform> fromProtocolString(const String& value)
    960 {
    961     if (value == "all")
    962         return TestProtocolPlatformAll;
    963     if (value == "generic")
    964         return TestProtocolPlatformGeneric;
    965     if (value == "ios")
    966         return TestProtocolPlatformIOS;
    967     if (value == "macos")
    968         return TestProtocolPlatformMacOS;
    969     return WTF::nullopt;
    970 }
    971 
    972922} // namespace Inspector
    973923
     
    1002952 */
    1003953
    1004 // DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json
    1005 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     954// DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    1006955
    1007956#import "TestProtocolTypeConversions.h"
     
    1048997 */
    1049998
    1050 // DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json
    1051 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     999// DO NOT EDIT THIS FILE. It is automatically generated from event-targetType-matching-domain-debuggableType.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    10521000
    10531001#import "TestProtocolInternal.h"
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/events-with-optional-parameters.json-result

    r262202 r262203  
    1 ### Begin File: InspectorBackendCommands.js
    2 /*
    3  * Copyright (C) 2013 Google Inc. All rights reserved.
    4  * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
    5  * Copyright (C) 2014 University of Washington. All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
    10  * 1. Redistributions of source code must retain the above copyright
    11  *    notice, this list of conditions and the following disclaimer.
    12  * 2. Redistributions in binary form must reproduce the above copyright
    13  *    notice, this list of conditions and the following disclaimer in the
    14  *    documentation and/or other materials provided with the distribution.
    15  *
    16  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
    17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    18  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
    20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    26  * THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 // DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
    30 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1### Begin File: InspectorBackendCommands.js.in
     2/*
     3 * Copyright (C) 2013 Google Inc. All rights reserved.
     4 * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
     5 * Copyright (C) 2014 University of Washington. All rights reserved.
     6 *
     7 * Redistribution and use in source and binary forms, with or without
     8 * modification, are permitted provided that the following conditions
     9 * are met:
     10 * 1. Redistributions of source code must retain the above copyright
     11 *    notice, this list of conditions and the following disclaimer.
     12 * 2. Redistributions in binary form must reproduce the above copyright
     13 *    notice, this list of conditions and the following disclaimer in the
     14 *    documentation and/or other materials provided with the distribution.
     15 *
     16 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
     17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
     20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     26 * THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    3130
    3231// Database
     
    3635InspectorBackend.registerDatabaseDispatcher = InspectorBackend.registerDispatcher.bind(InspectorBackend, "Database");
    3736InspectorBackend.activateDomain("Database", null);
    38 ### End File: InspectorBackendCommands.js
     37### End File: InspectorBackendCommands.js.in
    3938
    4039### Begin File: TestAlternateBackendDispatchers.h
     
    6665 */
    6766
    68 // DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
    69 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     67// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    7068
    7169#pragma once
     
    123121 */
    124122
    125 // DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
    126 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     123// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    127124
    128125#pragma once
     
    169166 */
    170167
    171 // DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
    172 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     168// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    173169
    174170#include "config.h"
     
    182178#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    183179#include "TestAlternateBackendDispatchers.h"
    184 #endif
     180#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    185181
    186182namespace Inspector {
     
    220216 */
    221217
    222 // DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
    223 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     218// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    224219
    225220#pragma once
     
    274269 */
    275270
    276 // DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
    277 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     271// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    278272
    279273#include "config.h"
     
    364358 */
    365359
    366 // DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
    367 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     360// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    368361
    369362#pragma once
     
    397390
    398391namespace Database {
     392
    399393/* Database error. */
    400394class Error : public JSON::ObjectBase {
     
    500494 */
    501495
    502 // DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
    503 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     496// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    504497
    505498#include "config.h"
     
    549542 */
    550543
    551 // DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
    552 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     544// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    553545
    554546#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
     
    592584 */
    593585
    594 // DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
    595 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     586// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    596587
    597588#import "config.h"
     
    636627 */
    637628
    638 // DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
    639 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     629// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    640630
    641631#import <WebInspector/TestProtocol.h>
     
    677667 */
    678668
    679 // DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
    680 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     669// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    681670
    682671#import "TestProtocolConfiguration.h"
     
    753742 */
    754743
    755 // DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
    756 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     744// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    757745
    758746#import "TestProtocolInternal.h"
     
    878866 */
    879867
    880 // DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
    881 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     868// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    882869
    883870#import <Foundation/Foundation.h>
     
    887874
    888875@class TestProtocolDatabaseError;
    889 
    890 typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
    891     TestProtocolPlatformAll,
    892     TestProtocolPlatformGeneric,
    893     TestProtocolPlatformIOS,
    894     TestProtocolPlatformMacOS,
    895 };
    896 
    897876
    898877
     
    948927 */
    949928
    950 // DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
    951 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     929// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    952930
    953931#import "TestProtocol.h"
     
    991969 */
    992970
    993 // DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
    994 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     971// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    995972
    996973#import "TestProtocol.h"
     
    1002979Optional<ObjCEnumType> fromProtocolString(const String& value);
    1003980
    1004 inline String toProtocolString(TestProtocolPlatform value)
    1005 {
    1006     switch(value) {
    1007     case TestProtocolPlatformAll:
    1008         return "all"_s;
    1009     case TestProtocolPlatformGeneric:
    1010         return "generic"_s;
    1011     case TestProtocolPlatformIOS:
    1012         return "ios"_s;
    1013     case TestProtocolPlatformMacOS:
    1014         return "macos"_s;
    1015     }
    1016 }
    1017 
    1018 template<>
    1019 inline Optional<TestProtocolPlatform> fromProtocolString(const String& value)
    1020 {
    1021     if (value == "all")
    1022         return TestProtocolPlatformAll;
    1023     if (value == "generic")
    1024         return TestProtocolPlatformGeneric;
    1025     if (value == "ios")
    1026         return TestProtocolPlatformIOS;
    1027     if (value == "macos")
    1028         return TestProtocolPlatformMacOS;
    1029     return WTF::nullopt;
    1030 }
    1031 
    1032981
    1033982
     
    10641013 */
    10651014
    1066 // DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
    1067 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1015// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    10681016
    10691017#import "TestProtocolTypeConversions.h"
     
    11431091 */
    11441092
    1145 // DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
    1146 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1093// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    11471094
    11481095#import "TestProtocolInternal.h"
     
    11551102using namespace Inspector;
    11561103
    1157 
    11581104@implementation TestProtocolDatabaseError
    11591105
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result

    r262202 r262203  
    1 ### Begin File: InspectorBackendCommands.js
    2 /*
    3  * Copyright (C) 2013 Google Inc. All rights reserved.
    4  * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
    5  * Copyright (C) 2014 University of Washington. All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
    10  * 1. Redistributions of source code must retain the above copyright
    11  *    notice, this list of conditions and the following disclaimer.
    12  * 2. Redistributions in binary form must reproduce the above copyright
    13  *    notice, this list of conditions and the following disclaimer in the
    14  *    documentation and/or other materials provided with the distribution.
    15  *
    16  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
    17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    18  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
    20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    26  * THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
    30 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1### Begin File: InspectorBackendCommands.js.in
     2/*
     3 * Copyright (C) 2013 Google Inc. All rights reserved.
     4 * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
     5 * Copyright (C) 2014 University of Washington. All rights reserved.
     6 *
     7 * Redistribution and use in source and binary forms, with or without
     8 * modification, are permitted provided that the following conditions
     9 * are met:
     10 * 1. Redistributions of source code must retain the above copyright
     11 *    notice, this list of conditions and the following disclaimer.
     12 * 2. Redistributions in binary form must reproduce the above copyright
     13 *    notice, this list of conditions and the following disclaimer in the
     14 *    documentation and/or other materials provided with the distribution.
     15 *
     16 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
     17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
     20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     26 * THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    3130
    3231// Network1
     
    4039InspectorBackend.registerNetwork3Dispatcher = InspectorBackend.registerDispatcher.bind(InspectorBackend, "Network3");
    4140InspectorBackend.activateDomain("Network3", null);
    42 ### End File: InspectorBackendCommands.js
     41### End File: InspectorBackendCommands.js.in
    4342
    4443### Begin File: TestAlternateBackendDispatchers.h
     
    7069 */
    7170
    72 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
    73 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     71// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    7472
    7573#pragma once
     
    9290
    9391
    94 #if PLATFORM(WEB_COMMANDS)
    9592class AlternateNetwork1BackendDispatcher : public AlternateBackendDispatcher {
    9693public:
     
    9895    virtual void loadResource(long callId) = 0;
    9996};
    100 #endif // PLATFORM(WEB_COMMANDS)
    10197
    10298} // namespace Inspector
     
    133129 */
    134130
    135 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
    136 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     131// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    137132
    138133#pragma once
     
    147142
    148143#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    149 #if PLATFORM(WEB_COMMANDS)
    150144class AlternateNetwork1BackendDispatcher;
    151 #endif // PLATFORM(WEB_COMMANDS)
    152145#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    153146
    154 #if PLATFORM(WEB_COMMANDS)
    155147class Network1BackendDispatcherHandler {
    156148public:
     
    159151    virtual ~Network1BackendDispatcherHandler();
    160152};
    161 #endif // PLATFORM(WEB_COMMANDS)
    162 
    163 #if PLATFORM(WEB_COMMANDS)
     153
    164154class Network1BackendDispatcher final : public SupplementalBackendDispatcher {
    165155public:
     
    173163private:
    174164    AlternateNetwork1BackendDispatcher* m_alternateDispatcher { nullptr };
    175 #endif
     165#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    176166private:
    177167    Network1BackendDispatcher(BackendDispatcher&, Network1BackendDispatcherHandler*);
    178168    Network1BackendDispatcherHandler* m_agent { nullptr };
    179169};
    180 #endif // PLATFORM(WEB_COMMANDS)
    181170
    182171} // namespace Inspector
     
    211200 */
    212201
    213 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
    214 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     202// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    215203
    216204#include "config.h"
     
    224212#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    225213#include "TestAlternateBackendDispatchers.h"
    226 #endif
     214#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    227215
    228216namespace Inspector {
    229217
    230 #if PLATFORM(WEB_COMMANDS)
    231218Network1BackendDispatcherHandler::~Network1BackendDispatcherHandler() { }
    232 #endif // PLATFORM(WEB_COMMANDS)
    233 
    234 #if PLATFORM(WEB_COMMANDS)
     219
    235220Ref<Network1BackendDispatcher> Network1BackendDispatcher::create(BackendDispatcher& backendDispatcher, Network1BackendDispatcherHandler* agent)
    236221{
     
    252237    message->getObject("params"_s, parameters);
    253238
    254     if (method == "loadResource")
     239    if (method == "loadResource") {
    255240        loadResource(requestId, WTFMove(parameters));
    256     else
    257         m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'Network1." + method + "' was not found");
     241        return;
     242    }
     243
     244    m_backendDispatcher->reportProtocolError(BackendDispatcher::MethodNotFound, "'Network1." + method + "' was not found");
    258245}
    259246
     
    265252        return;
    266253    }
    267 #endif
     254#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    268255
    269256    ErrorString error;
     
    276263        m_backendDispatcher->reportProtocolError(BackendDispatcher::ServerError, WTFMove(error));
    277264}
    278 #endif // PLATFORM(WEB_COMMANDS)
    279265
    280266} // namespace Inspector
     
    310296 */
    311297
    312 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
    313 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     298// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    314299
    315300#pragma once
     
    323308class FrontendRouter;
    324309
    325 #if PLATFORM(WEB_EVENTS)
    326310class Network3FrontendDispatcher {
    327311    WTF_MAKE_FAST_ALLOCATED;
     
    332316    FrontendRouter& m_frontendRouter;
    333317};
    334 #endif // PLATFORM(WEB_EVENTS)
    335318
    336319} // namespace Inspector
     
    365348 */
    366349
    367 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
    368 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     350// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    369351
    370352#include "config.h"
     
    376358namespace Inspector {
    377359
    378 #if PLATFORM(WEB_EVENTS)
    379360void Network3FrontendDispatcher::resourceLoaded()
    380361{
     
    384365    m_frontendRouter.sendEvent(jsonMessage->toJSONString());
    385366}
    386 #endif // PLATFORM(WEB_EVENTS)
    387367
    388368} // namespace Inspector
     
    418398 */
    419399
    420 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
    421 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     400// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    422401
    423402#pragma once
     
    435414
    436415// Forward declarations.
    437 #if PLATFORM(WEB_TYPES)
    438416namespace Network2 {
    439417class NetworkError;
    440418} // Network2
    441 #endif // PLATFORM(WEB_TYPES)
    442419// End of forward declarations.
    443420
     
    445422
    446423
    447 #if PLATFORM(WEB_TYPES)
    448424namespace Network2 {
     425
    449426class NetworkError : public JSON::ObjectBase {
    450427public:
     
    513490
    514491} // Network2
    515 #endif // PLATFORM(WEB_TYPES)
    516492
    517493
     
    550526 */
    551527
    552 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
    553 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     528// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    554529
    555530#include "config.h"
     
    599574 */
    600575
    601 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
    602 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     576// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    603577
    604578#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
     
    610584
    611585
    612 #if PLATFORM(WEB_COMMANDS)
    613586class ObjCInspectorNetwork1BackendDispatcher final : public AlternateNetwork1BackendDispatcher {
    614587    WTF_MAKE_FAST_ALLOCATED;
     
    619592    RetainPtr<id<TestProtocolNetwork1DomainHandler>> m_delegate;
    620593};
    621 #endif // PLATFORM(WEB_COMMANDS)
    622594
    623595} // namespace Inspector
     
    653625 */
    654626
    655 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
    656 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     627// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    657628
    658629#import "config.h"
     
    665636namespace Inspector {
    666637
    667 #if PLATFORM(WEB_COMMANDS)
    668638void ObjCInspectorNetwork1BackendDispatcher::loadResource(long requestId)
    669639{
     
    686656}
    687657
    688 #endif // PLATFORM(WEB_COMMANDS)
    689 
    690658} // namespace Inspector
    691659
     
    720688 */
    721689
    722 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
    723 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     690// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    724691
    725692#import <WebInspector/TestProtocol.h>
     
    762729 */
    763730
    764 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
    765 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     731// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    766732
    767733#import "TestProtocolConfiguration.h"
     
    858824 */
    859825
    860 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
    861 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     826// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    862827
    863828#import "TestProtocolInternal.h"
     
    925890 */
    926891
    927 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
    928 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     892// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    929893
    930894#import <Foundation/Foundation.h>
     
    934898
    935899@class TestProtocolNetwork2NetworkError;
    936 
    937 typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
    938     TestProtocolPlatformAll,
    939     TestProtocolPlatformGeneric,
    940     TestProtocolPlatformIOS,
    941     TestProtocolPlatformMacOS,
    942 };
    943 
    944900
    945901
     
    997953 */
    998954
    999 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
    1000 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     955// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    1001956
    1002957#import "TestProtocol.h"
     
    1040995 */
    1041996
    1042 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
    1043 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     997// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    1044998
    1045999#import "TestProtocol.h"
     
    10511005Optional<ObjCEnumType> fromProtocolString(const String& value);
    10521006
    1053 inline String toProtocolString(TestProtocolPlatform value)
    1054 {
    1055     switch(value) {
    1056     case TestProtocolPlatformAll:
    1057         return "all"_s;
    1058     case TestProtocolPlatformGeneric:
    1059         return "generic"_s;
    1060     case TestProtocolPlatformIOS:
    1061         return "ios"_s;
    1062     case TestProtocolPlatformMacOS:
    1063         return "macos"_s;
    1064     }
    1065 }
    1066 
    1067 template<>
    1068 inline Optional<TestProtocolPlatform> fromProtocolString(const String& value)
    1069 {
    1070     if (value == "all")
    1071         return TestProtocolPlatformAll;
    1072     if (value == "generic")
    1073         return TestProtocolPlatformGeneric;
    1074     if (value == "ios")
    1075         return TestProtocolPlatformIOS;
    1076     if (value == "macos")
    1077         return TestProtocolPlatformMacOS;
    1078     return WTF::nullopt;
    1079 }
    1080 
    10811007
    10821008
     
    11131039 */
    11141040
    1115 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
    1116 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1041// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    11171042
    11181043#import "TestProtocolTypeConversions.h"
     
    11711096 */
    11721097
    1173 // DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json
    1174 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1098// DO NOT EDIT THIS FILE. It is automatically generated from generate-domains-with-feature-guards.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    11751099
    11761100#import "TestProtocolInternal.h"
     
    11831107using namespace Inspector;
    11841108
    1185 
    11861109@implementation TestProtocolNetwork2NetworkError
    11871110
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/same-type-id-different-domain.json-result

    r262202 r262203  
    1 ### Begin File: InspectorBackendCommands.js
    2 /*
    3  * Copyright (C) 2013 Google Inc. All rights reserved.
    4  * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
    5  * Copyright (C) 2014 University of Washington. All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
    10  * 1. Redistributions of source code must retain the above copyright
    11  *    notice, this list of conditions and the following disclaimer.
    12  * 2. Redistributions in binary form must reproduce the above copyright
    13  *    notice, this list of conditions and the following disclaimer in the
    14  *    documentation and/or other materials provided with the distribution.
    15  *
    16  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
    17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    18  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
    20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    26  * THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 // DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
    30 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    31 ### End File: InspectorBackendCommands.js
     1### Begin File: InspectorBackendCommands.js.in
     2/*
     3 * Copyright (C) 2013 Google Inc. All rights reserved.
     4 * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
     5 * Copyright (C) 2014 University of Washington. All rights reserved.
     6 *
     7 * Redistribution and use in source and binary forms, with or without
     8 * modification, are permitted provided that the following conditions
     9 * are met:
     10 * 1. Redistributions of source code must retain the above copyright
     11 *    notice, this list of conditions and the following disclaimer.
     12 * 2. Redistributions in binary form must reproduce the above copyright
     13 *    notice, this list of conditions and the following disclaimer in the
     14 *    documentation and/or other materials provided with the distribution.
     15 *
     16 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
     17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
     20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     26 * THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     30### End File: InspectorBackendCommands.js.in
    3231
    3332### Begin File: TestAlternateBackendDispatchers.h
     
    5958 */
    6059
    61 // DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
    62 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     60// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    6361
    6462#pragma once
     
    116114 */
    117115
    118 // DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
    119 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     116// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    120117
    121118#pragma once
     
    162159 */
    163160
    164 // DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
    165 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     161// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    166162
    167163#include "config.h"
     
    175171#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    176172#include "TestAlternateBackendDispatchers.h"
    177 #endif
     173#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    178174
    179175namespace Inspector {
     
    213209 */
    214210
    215 // DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
    216 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     211// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    217212
    218213#pragma once
     
    257252 */
    258253
    259 // DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
    260 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     254// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    261255
    262256#include "config.h"
     
    300294 */
    301295
    302 // DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
    303 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     296// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    304297
    305298#pragma once
     
    365358 */
    366359
    367 // DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
    368 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     360// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    369361
    370362#include "config.h"
     
    414406 */
    415407
    416 // DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
    417 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     408// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    418409
    419410#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
     
    457448 */
    458449
    459 // DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
    460 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     450// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    461451
    462452#import "config.h"
     
    501491 */
    502492
    503 // DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
    504 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     493// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    505494
    506495#import <WebInspector/TestProtocol.h>
     
    541530 */
    542531
    543 // DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
    544 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     532// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    545533
    546534#import "TestProtocolConfiguration.h"
     
    608596 */
    609597
    610 // DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
    611 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     598// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    612599
    613600#import "TestProtocolInternal.h"
     
    649636 */
    650637
    651 // DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
    652 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     638// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    653639
    654640#import <Foundation/Foundation.h>
     
    659645
    660646
    661 typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
    662     TestProtocolPlatformAll,
    663     TestProtocolPlatformGeneric,
    664     TestProtocolPlatformIOS,
    665     TestProtocolPlatformMacOS,
    666 };
    667 
    668647
    669648
     
    707686 */
    708687
    709 // DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
    710 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     688// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    711689
    712690#import "TestProtocol.h"
     
    748726 */
    749727
    750 // DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
    751 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     728// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    752729
    753730#import "TestProtocol.h"
     
    759736Optional<ObjCEnumType> fromProtocolString(const String& value);
    760737
    761 inline String toProtocolString(TestProtocolPlatform value)
    762 {
    763     switch(value) {
    764     case TestProtocolPlatformAll:
    765         return "all"_s;
    766     case TestProtocolPlatformGeneric:
    767         return "generic"_s;
    768     case TestProtocolPlatformIOS:
    769         return "ios"_s;
    770     case TestProtocolPlatformMacOS:
    771         return "macos"_s;
    772     }
    773 }
    774 
    775 template<>
    776 inline Optional<TestProtocolPlatform> fromProtocolString(const String& value)
    777 {
    778     if (value == "all")
    779         return TestProtocolPlatformAll;
    780     if (value == "generic")
    781         return TestProtocolPlatformGeneric;
    782     if (value == "ios")
    783         return TestProtocolPlatformIOS;
    784     if (value == "macos")
    785         return TestProtocolPlatformMacOS;
    786     return WTF::nullopt;
    787 }
    788 
    789738
    790739
     
    823772 */
    824773
    825 // DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
    826 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     774// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    827775
    828776#import "TestProtocolTypeConversions.h"
     
    895843 */
    896844
    897 // DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json
    898 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     845// DO NOT EDIT THIS FILE. It is automatically generated from same-type-id-different-domain.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    899846
    900847#import "TestProtocolInternal.h"
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result

    r262202 r262203  
    1 ### Begin File: InspectorBackendCommands.js
    2 /*
    3  * Copyright (C) 2013 Google Inc. All rights reserved.
    4  * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
    5  * Copyright (C) 2014 University of Washington. All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
    10  * 1. Redistributions of source code must retain the above copyright
    11  *    notice, this list of conditions and the following disclaimer.
    12  * 2. Redistributions in binary form must reproduce the above copyright
    13  *    notice, this list of conditions and the following disclaimer in the
    14  *    documentation and/or other materials provided with the distribution.
    15  *
    16  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
    17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    18  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
    20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    26  * THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 // DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
    30 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    31 ### End File: InspectorBackendCommands.js
     1### Begin File: InspectorBackendCommands.js.in
     2/*
     3 * Copyright (C) 2013 Google Inc. All rights reserved.
     4 * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
     5 * Copyright (C) 2014 University of Washington. All rights reserved.
     6 *
     7 * Redistribution and use in source and binary forms, with or without
     8 * modification, are permitted provided that the following conditions
     9 * are met:
     10 * 1. Redistributions of source code must retain the above copyright
     11 *    notice, this list of conditions and the following disclaimer.
     12 * 2. Redistributions in binary form must reproduce the above copyright
     13 *    notice, this list of conditions and the following disclaimer in the
     14 *    documentation and/or other materials provided with the distribution.
     15 *
     16 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
     17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
     20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     26 * THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     30### End File: InspectorBackendCommands.js.in
    3231
    3332### Begin File: TestAlternateBackendDispatchers.h
     
    5958 */
    6059
    61 // DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
    62 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     60// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    6361
    6462#pragma once
     
    116114 */
    117115
    118 // DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
    119 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     116// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    120117
    121118#pragma once
     
    162159 */
    163160
    164 // DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
    165 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     161// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    166162
    167163#include "config.h"
     
    175171#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    176172#include "TestAlternateBackendDispatchers.h"
    177 #endif
     173#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    178174
    179175namespace Inspector {
     
    213209 */
    214210
    215 // DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
    216 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     211// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    217212
    218213#pragma once
     
    257252 */
    258253
    259 // DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
    260 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     254// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    261255
    262256#include "config.h"
     
    300294 */
    301295
    302 // DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
    303 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     296// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    304297
    305298#pragma once
     
    337330
    338331namespace Runtime {
     332
    339333/* Key path. */
    340334class KeyPath : public JSON::ObjectBase {
     
    458452 */
    459453
    460 // DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
    461 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     454// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    462455
    463456#include "config.h"
     
    484477
    485478// Enums in the 'Runtime' Domain
     479
    486480template<>
    487481Optional<Inspector::Protocol::Runtime::KeyPath::Type> parseEnumValueFromString<Inspector::Protocol::Runtime::KeyPath::Type>(const String& protocolString)
     
    499493}
    500494
    501 
    502495} // namespace TestHelpers
    503496
     
    538531 */
    539532
    540 // DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
    541 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     533// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    542534
    543535#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
     
    581573 */
    582574
    583 // DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
    584 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     575// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    585576
    586577#import "config.h"
     
    625616 */
    626617
    627 // DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
    628 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     618// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    629619
    630620#import <WebInspector/TestProtocol.h>
     
    665655 */
    666656
    667 // DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
    668 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     657// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    669658
    670659#import "TestProtocolConfiguration.h"
     
    732721 */
    733722
    734 // DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
    735 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     723// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    736724
    737725#import "TestProtocolInternal.h"
     
    773761 */
    774762
    775 // DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
    776 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     763// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    777764
    778765#import <Foundation/Foundation.h>
     
    782769
    783770@class TestProtocolRuntimeKeyPath;
    784 
    785 typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
    786     TestProtocolPlatformAll,
    787     TestProtocolPlatformGeneric,
    788     TestProtocolPlatformIOS,
    789     TestProtocolPlatformMacOS,
    790 };
    791 
    792771
    793772typedef NS_ENUM(NSInteger, TestProtocolRuntimeKeyPathType) {
     
    796775    TestProtocolRuntimeKeyPathTypeArray,
    797776};
    798 
    799777
    800778__attribute__((visibility ("default")))
     
    845823 */
    846824
    847 // DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
    848 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     825// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    849826
    850827#import "TestProtocol.h"
     
    886863 */
    887864
    888 // DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
    889 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     865// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    890866
    891867#import "TestProtocol.h"
     
    896872template<typename ObjCEnumType>
    897873Optional<ObjCEnumType> fromProtocolString(const String& value);
    898 
    899 inline String toProtocolString(TestProtocolPlatform value)
    900 {
    901     switch(value) {
    902     case TestProtocolPlatformAll:
    903         return "all"_s;
    904     case TestProtocolPlatformGeneric:
    905         return "generic"_s;
    906     case TestProtocolPlatformIOS:
    907         return "ios"_s;
    908     case TestProtocolPlatformMacOS:
    909         return "macos"_s;
    910     }
    911 }
    912 
    913 template<>
    914 inline Optional<TestProtocolPlatform> fromProtocolString(const String& value)
    915 {
    916     if (value == "all")
    917         return TestProtocolPlatformAll;
    918     if (value == "generic")
    919         return TestProtocolPlatformGeneric;
    920     if (value == "ios")
    921         return TestProtocolPlatformIOS;
    922     if (value == "macos")
    923         return TestProtocolPlatformMacOS;
    924     return WTF::nullopt;
    925 }
    926 
    927874
    928875inline String toProtocolString(TestProtocolRuntimeKeyPathType value)
     
    982929 */
    983930
    984 // DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
    985 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     931// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    986932
    987933#import "TestProtocolTypeConversions.h"
     
    1040986 */
    1041987
    1042 // DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json
    1043 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     988// DO NOT EDIT THIS FILE. It is automatically generated from shadowed-optional-type-setters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    1044989
    1045990#import "TestProtocolInternal.h"
     
    1052997using namespace Inspector;
    1053998
    1054 
    1055999@implementation TestProtocolRuntimeKeyPath
    10561000
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/should-strip-comments.json-result

    r262202 r262203  
    1 ### Begin File: InspectorBackendCommands.js
    2 /*
    3  * Copyright (C) 2013 Google Inc. All rights reserved.
    4  * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
    5  * Copyright (C) 2014 University of Washington. All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
    10  * 1. Redistributions of source code must retain the above copyright
    11  *    notice, this list of conditions and the following disclaimer.
    12  * 2. Redistributions in binary form must reproduce the above copyright
    13  *    notice, this list of conditions and the following disclaimer in the
    14  *    documentation and/or other materials provided with the distribution.
    15  *
    16  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
    17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    18  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
    20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    26  * THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 // DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json
    30 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    31 ### End File: InspectorBackendCommands.js
     1### Begin File: InspectorBackendCommands.js.in
     2/*
     3 * Copyright (C) 2013 Google Inc. All rights reserved.
     4 * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
     5 * Copyright (C) 2014 University of Washington. All rights reserved.
     6 *
     7 * Redistribution and use in source and binary forms, with or without
     8 * modification, are permitted provided that the following conditions
     9 * are met:
     10 * 1. Redistributions of source code must retain the above copyright
     11 *    notice, this list of conditions and the following disclaimer.
     12 * 2. Redistributions in binary form must reproduce the above copyright
     13 *    notice, this list of conditions and the following disclaimer in the
     14 *    documentation and/or other materials provided with the distribution.
     15 *
     16 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
     17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
     20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     26 * THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29// DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     30### End File: InspectorBackendCommands.js.in
    3231
    3332### Begin File: TestAlternateBackendDispatchers.h
     
    5958 */
    6059
    61 // DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json
    62 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     60// DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    6361
    6462#pragma once
     
    116114 */
    117115
    118 // DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json
    119 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     116// DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    120117
    121118#pragma once
     
    162159 */
    163160
    164 // DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json
    165 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     161// DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    166162
    167163#include "config.h"
     
    175171#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    176172#include "TestAlternateBackendDispatchers.h"
    177 #endif
     173#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    178174
    179175namespace Inspector {
     
    213209 */
    214210
    215 // DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json
    216 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     211// DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    217212
    218213#pragma once
     
    257252 */
    258253
    259 // DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json
    260 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     254// DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    261255
    262256#include "config.h"
     
    300294 */
    301295
    302 // DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json
    303 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     296// DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    304297
    305298#pragma once
     
    355348 */
    356349
    357 // DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json
    358 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     350// DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    359351
    360352#include "config.h"
     
    404396 */
    405397
    406 // DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json
    407 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     398// DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    408399
    409400#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
     
    447438 */
    448439
    449 // DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json
    450 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     440// DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    451441
    452442#import "config.h"
     
    491481 */
    492482
    493 // DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json
    494 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     483// DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    495484
    496485#import <WebInspector/TestProtocol.h>
     
    531520 */
    532521
    533 // DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json
    534 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     522// DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    535523
    536524#import "TestProtocolConfiguration.h"
     
    598586 */
    599587
    600 // DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json
    601 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     588// DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    602589
    603590#import "TestProtocolInternal.h"
     
    639626 */
    640627
    641 // DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json
    642 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     628// DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    643629
    644630#import <Foundation/Foundation.h>
     
    649635
    650636
    651 typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
    652     TestProtocolPlatformAll,
    653     TestProtocolPlatformGeneric,
    654     TestProtocolPlatformIOS,
    655     TestProtocolPlatformMacOS,
    656 };
    657 
    658637
    659638
     
    697676 */
    698677
    699 // DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json
    700 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     678// DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    701679
    702680#import "TestProtocol.h"
     
    738716 */
    739717
    740 // DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json
    741 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     718// DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    742719
    743720#import "TestProtocol.h"
     
    749726Optional<ObjCEnumType> fromProtocolString(const String& value);
    750727
    751 inline String toProtocolString(TestProtocolPlatform value)
    752 {
    753     switch(value) {
    754     case TestProtocolPlatformAll:
    755         return "all"_s;
    756     case TestProtocolPlatformGeneric:
    757         return "generic"_s;
    758     case TestProtocolPlatformIOS:
    759         return "ios"_s;
    760     case TestProtocolPlatformMacOS:
    761         return "macos"_s;
    762     }
    763 }
    764 
    765 template<>
    766 inline Optional<TestProtocolPlatform> fromProtocolString(const String& value)
    767 {
    768     if (value == "all")
    769         return TestProtocolPlatformAll;
    770     if (value == "generic")
    771         return TestProtocolPlatformGeneric;
    772     if (value == "ios")
    773         return TestProtocolPlatformIOS;
    774     if (value == "macos")
    775         return TestProtocolPlatformMacOS;
    776     return WTF::nullopt;
    777 }
    778 
    779728} // namespace Inspector
    780729
     
    809758 */
    810759
    811 // DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json
    812 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     760// DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    813761
    814762#import "TestProtocolTypeConversions.h"
     
    855803 */
    856804
    857 // DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json
    858 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     805// DO NOT EDIT THIS FILE. It is automatically generated from should-strip-comments.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    859806
    860807#import "TestProtocolInternal.h"
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result

    r262202 r262203  
    1 ### Begin File: InspectorBackendCommands.js
    2 /*
    3  * Copyright (C) 2013 Google Inc. All rights reserved.
    4  * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
    5  * Copyright (C) 2014 University of Washington. All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
    10  * 1. Redistributions of source code must retain the above copyright
    11  *    notice, this list of conditions and the following disclaimer.
    12  * 2. Redistributions in binary form must reproduce the above copyright
    13  *    notice, this list of conditions and the following disclaimer in the
    14  *    documentation and/or other materials provided with the distribution.
    15  *
    16  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
    17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    18  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
    20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    26  * THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
    30 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    31 ### End File: InspectorBackendCommands.js
     1### Begin File: InspectorBackendCommands.js.in
     2/*
     3 * Copyright (C) 2013 Google Inc. All rights reserved.
     4 * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
     5 * Copyright (C) 2014 University of Washington. All rights reserved.
     6 *
     7 * Redistribution and use in source and binary forms, with or without
     8 * modification, are permitted provided that the following conditions
     9 * are met:
     10 * 1. Redistributions of source code must retain the above copyright
     11 *    notice, this list of conditions and the following disclaimer.
     12 * 2. Redistributions in binary form must reproduce the above copyright
     13 *    notice, this list of conditions and the following disclaimer in the
     14 *    documentation and/or other materials provided with the distribution.
     15 *
     16 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
     17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
     20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     26 * THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     30### End File: InspectorBackendCommands.js.in
    3231
    3332### Begin File: TestAlternateBackendDispatchers.h
     
    5958 */
    6059
    61 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
    62 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     60// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    6361
    6462#pragma once
     
    116114 */
    117115
    118 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
    119 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     116// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    120117
    121118#pragma once
     
    162159 */
    163160
    164 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
    165 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     161// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    166162
    167163#include "config.h"
     
    175171#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    176172#include "TestAlternateBackendDispatchers.h"
    177 #endif
     173#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    178174
    179175namespace Inspector {
     
    213209 */
    214210
    215 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
    216 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     211// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    217212
    218213#pragma once
     
    257252 */
    258253
    259 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
    260 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     254// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    261255
    262256#include "config.h"
     
    300294 */
    301295
    302 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
    303 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     296// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    304297
    305298#pragma once
     
    360353 */
    361354
    362 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
    363 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     355// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    364356
    365357#include "config.h"
     
    409401 */
    410402
    411 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
    412 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     403// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    413404
    414405#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
     
    452443 */
    453444
    454 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
    455 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     445// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    456446
    457447#import "config.h"
     
    496486 */
    497487
    498 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
    499 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     488// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    500489
    501490#import <WebInspector/TestProtocol.h>
     
    536525 */
    537526
    538 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
    539 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     527// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    540528
    541529#import "TestProtocolConfiguration.h"
     
    603591 */
    604592
    605 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
    606 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     593// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    607594
    608595#import "TestProtocolInternal.h"
     
    644631 */
    645632
    646 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
    647 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     633// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    648634
    649635#import <Foundation/Foundation.h>
     
    654640
    655641
    656 typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
    657     TestProtocolPlatformAll,
    658     TestProtocolPlatformGeneric,
    659     TestProtocolPlatformIOS,
    660     TestProtocolPlatformMacOS,
    661 };
    662 
    663642
    664643
     
    702681 */
    703682
    704 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
    705 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     683// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    706684
    707685#import "TestProtocol.h"
     
    743721 */
    744722
    745 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
    746 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     723// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    747724
    748725#import "TestProtocol.h"
     
    754731Optional<ObjCEnumType> fromProtocolString(const String& value);
    755732
    756 inline String toProtocolString(TestProtocolPlatform value)
    757 {
    758     switch(value) {
    759     case TestProtocolPlatformAll:
    760         return "all"_s;
    761     case TestProtocolPlatformGeneric:
    762         return "generic"_s;
    763     case TestProtocolPlatformIOS:
    764         return "ios"_s;
    765     case TestProtocolPlatformMacOS:
    766         return "macos"_s;
    767     }
    768 }
    769 
    770 template<>
    771 inline Optional<TestProtocolPlatform> fromProtocolString(const String& value)
    772 {
    773     if (value == "all")
    774         return TestProtocolPlatformAll;
    775     if (value == "generic")
    776         return TestProtocolPlatformGeneric;
    777     if (value == "ios")
    778         return TestProtocolPlatformIOS;
    779     if (value == "macos")
    780         return TestProtocolPlatformMacOS;
    781     return WTF::nullopt;
    782 }
    783 
    784733
    785734
     
    816765 */
    817766
    818 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
    819 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     767// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    820768
    821769#import "TestProtocolTypeConversions.h"
     
    874822 */
    875823
    876 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json
    877 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     824// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-aliased-primitive-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    878825
    879826#import "TestProtocolInternal.h"
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-array-type.json-result

    r262202 r262203  
    1 ### Begin File: InspectorBackendCommands.js
    2 /*
    3  * Copyright (C) 2013 Google Inc. All rights reserved.
    4  * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
    5  * Copyright (C) 2014 University of Washington. All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
    10  * 1. Redistributions of source code must retain the above copyright
    11  *    notice, this list of conditions and the following disclaimer.
    12  * 2. Redistributions in binary form must reproduce the above copyright
    13  *    notice, this list of conditions and the following disclaimer in the
    14  *    documentation and/or other materials provided with the distribution.
    15  *
    16  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
    17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    18  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
    20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    26  * THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
    30 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1### Begin File: InspectorBackendCommands.js.in
     2/*
     3 * Copyright (C) 2013 Google Inc. All rights reserved.
     4 * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
     5 * Copyright (C) 2014 University of Washington. All rights reserved.
     6 *
     7 * Redistribution and use in source and binary forms, with or without
     8 * modification, are permitted provided that the following conditions
     9 * are met:
     10 * 1. Redistributions of source code must retain the above copyright
     11 *    notice, this list of conditions and the following disclaimer.
     12 * 2. Redistributions in binary form must reproduce the above copyright
     13 *    notice, this list of conditions and the following disclaimer in the
     14 *    documentation and/or other materials provided with the distribution.
     15 *
     16 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
     17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
     20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     26 * THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    3130
    3231// Debugger
     
    3433InspectorBackend.registerEnum("Debugger.Reason", {Died: "Died", Fainted: "Fainted", Hungry: "Hungry"});
    3534InspectorBackend.activateDomain("Debugger", null);
    36 ### End File: InspectorBackendCommands.js
     35### End File: InspectorBackendCommands.js.in
    3736
    3837### Begin File: TestAlternateBackendDispatchers.h
     
    6463 */
    6564
    66 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
    67 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     65// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    6866
    6967#pragma once
     
    121119 */
    122120
    123 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
    124 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     121// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    125122
    126123#pragma once
     
    167164 */
    168165
    169 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
    170 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     166// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    171167
    172168#include "config.h"
     
    180176#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    181177#include "TestAlternateBackendDispatchers.h"
    182 #endif
     178#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    183179
    184180namespace Inspector {
     
    218214 */
    219215
    220 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
    221 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     216// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    222217
    223218#pragma once
     
    262257 */
    263258
    264 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
    265 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     259// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    266260
    267261#include "config.h"
     
    305299 */
    306300
    307 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
    308 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     301// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    309302
    310303#pragma once
     
    355348
    356349namespace Debugger {
    357 /*  */
     350
    358351enum class Reason {
    359352    Died = 0,
     
    361354    Hungry = 2,
    362355}; // enum class Reason
     356
    363357} // Debugger
    364358
     
    421415 */
    422416
    423 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
    424 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     417// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    425418
    426419#include "config.h"
     
    447440
    448441// Enums in the 'Debugger' Domain
     442
    449443template<>
    450444Optional<Inspector::Protocol::Debugger::Reason> parseEnumValueFromString<Inspector::Protocol::Debugger::Reason>(const String& protocolString)
     
    462456}
    463457
    464 
    465458} // namespace TestHelpers
    466459
     
    501494 */
    502495
    503 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
    504 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     496// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    505497
    506498#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
     
    544536 */
    545537
    546 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
    547 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     538// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    548539
    549540#import "config.h"
     
    588579 */
    589580
    590 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
    591 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     581// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    592582
    593583#import <WebInspector/TestProtocol.h>
     
    628618 */
    629619
    630 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
    631 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     620// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    632621
    633622#import "TestProtocolConfiguration.h"
     
    695684 */
    696685
    697 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
    698 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     686// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    699687
    700688#import "TestProtocolInternal.h"
     
    736724 */
    737725
    738 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
    739 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     726// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    740727
    741728#import <Foundation/Foundation.h>
     
    744731
    745732
    746 
    747 
    748 typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
    749     TestProtocolPlatformAll,
    750     TestProtocolPlatformGeneric,
    751     TestProtocolPlatformIOS,
    752     TestProtocolPlatformMacOS,
    753 };
    754733
    755734
     
    799778 */
    800779
    801 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
    802 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     780// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    803781
    804782#import "TestProtocol.h"
     
    840818 */
    841819
    842 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
    843 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     820// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    844821
    845822#import "TestProtocol.h"
     
    850827template<typename ObjCEnumType>
    851828Optional<ObjCEnumType> fromProtocolString(const String& value);
    852 
    853 inline String toProtocolString(TestProtocolPlatform value)
    854 {
    855     switch(value) {
    856     case TestProtocolPlatformAll:
    857         return "all"_s;
    858     case TestProtocolPlatformGeneric:
    859         return "generic"_s;
    860     case TestProtocolPlatformIOS:
    861         return "ios"_s;
    862     case TestProtocolPlatformMacOS:
    863         return "macos"_s;
    864     }
    865 }
    866 
    867 template<>
    868 inline Optional<TestProtocolPlatform> fromProtocolString(const String& value)
    869 {
    870     if (value == "all")
    871         return TestProtocolPlatformAll;
    872     if (value == "generic")
    873         return TestProtocolPlatformGeneric;
    874     if (value == "ios")
    875         return TestProtocolPlatformIOS;
    876     if (value == "macos")
    877         return TestProtocolPlatformMacOS;
    878     return WTF::nullopt;
    879 }
    880 
    881829
    882830inline String toProtocolString(TestProtocolDebuggerReason value)
     
    938886 */
    939887
    940 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
    941 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     888// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    942889
    943890#import "TestProtocolTypeConversions.h"
     
    10541001 */
    10551002
    1056 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json
    1057 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1003// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-array-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    10581004
    10591005#import "TestProtocolInternal.h"
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-enum-type.json-result

    r262202 r262203  
    1 ### Begin File: InspectorBackendCommands.js
    2 /*
    3  * Copyright (C) 2013 Google Inc. All rights reserved.
    4  * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
    5  * Copyright (C) 2014 University of Washington. All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
    10  * 1. Redistributions of source code must retain the above copyright
    11  *    notice, this list of conditions and the following disclaimer.
    12  * 2. Redistributions in binary form must reproduce the above copyright
    13  *    notice, this list of conditions and the following disclaimer in the
    14  *    documentation and/or other materials provided with the distribution.
    15  *
    16  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
    17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    18  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
    20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    26  * THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
    30 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1### Begin File: InspectorBackendCommands.js.in
     2/*
     3 * Copyright (C) 2013 Google Inc. All rights reserved.
     4 * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
     5 * Copyright (C) 2014 University of Washington. All rights reserved.
     6 *
     7 * Redistribution and use in source and binary forms, with or without
     8 * modification, are permitted provided that the following conditions
     9 * are met:
     10 * 1. Redistributions of source code must retain the above copyright
     11 *    notice, this list of conditions and the following disclaimer.
     12 * 2. Redistributions in binary form must reproduce the above copyright
     13 *    notice, this list of conditions and the following disclaimer in the
     14 *    documentation and/or other materials provided with the distribution.
     15 *
     16 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
     17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
     20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     26 * THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    3130
    3231// Runtime
     
    3534InspectorBackend.registerEnum("Runtime.TwoLeggedAnimals", {Ducks: "Ducks", Hens: "Hens", Crows: "Crows", Flamingos: "Flamingos"});
    3635InspectorBackend.activateDomain("Runtime", null);
    37 ### End File: InspectorBackendCommands.js
     36### End File: InspectorBackendCommands.js.in
    3837
    3938### Begin File: TestAlternateBackendDispatchers.h
     
    6564 */
    6665
    67 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
    68 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     66// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    6967
    7068#pragma once
     
    122120 */
    123121
    124 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
    125 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     122// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    126123
    127124#pragma once
     
    168165 */
    169166
    170 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
    171 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     167// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    172168
    173169#include "config.h"
     
    181177#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    182178#include "TestAlternateBackendDispatchers.h"
    183 #endif
     179#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    184180
    185181namespace Inspector {
     
    219215 */
    220216
    221 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
    222 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     217// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    223218
    224219#pragma once
     
    263258 */
    264259
    265 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
    266 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     260// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    267261
    268262#include "config.h"
     
    306300 */
    307301
    308 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
    309 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     302// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    310303
    311304#pragma once
     
    344337
    345338namespace Runtime {
    346 /*  */
     339
    347340enum class FarmAnimals {
    348341    Pigs = 0,
     
    351344    Hens = 3,
    352345}; // enum class FarmAnimals
    353 /*  */
     346
    354347enum class TwoLeggedAnimals {
    355348    Ducks = 4,
     
    358351    Flamingos = 6,
    359352}; // enum class TwoLeggedAnimals
     353
    360354} // Runtime
    361355
     
    424418 */
    425419
    426 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
    427 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     420// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    428421
    429422#include "config.h"
     
    454447
    455448// Enums in the 'Runtime' Domain
     449
    456450template<>
    457451Optional<Inspector::Protocol::Runtime::FarmAnimals> parseEnumValueFromString<Inspector::Protocol::Runtime::FarmAnimals>(const String& protocolString)
     
    486480}
    487481
    488 
    489482} // namespace TestHelpers
    490483
     
    525518 */
    526519
    527 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
    528 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     520// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    529521
    530522#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
     
    568560 */
    569561
    570 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
    571 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     562// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    572563
    573564#import "config.h"
     
    612603 */
    613604
    614 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
    615 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     605// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    616606
    617607#import <WebInspector/TestProtocol.h>
     
    652642 */
    653643
    654 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
    655 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     644// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    656645
    657646#import "TestProtocolConfiguration.h"
     
    719708 */
    720709
    721 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
    722 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     710// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    723711
    724712#import "TestProtocolInternal.h"
     
    760748 */
    761749
    762 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
    763 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     750// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    764751
    765752#import <Foundation/Foundation.h>
     
    768755
    769756
    770 
    771 
    772 typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
    773     TestProtocolPlatformAll,
    774     TestProtocolPlatformGeneric,
    775     TestProtocolPlatformIOS,
    776     TestProtocolPlatformMacOS,
    777 };
    778757
    779758
     
    831810 */
    832811
    833 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
    834 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     812// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    835813
    836814#import "TestProtocol.h"
     
    872850 */
    873851
    874 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
    875 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     852// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    876853
    877854#import "TestProtocol.h"
     
    882859template<typename ObjCEnumType>
    883860Optional<ObjCEnumType> fromProtocolString(const String& value);
    884 
    885 inline String toProtocolString(TestProtocolPlatform value)
    886 {
    887     switch(value) {
    888     case TestProtocolPlatformAll:
    889         return "all"_s;
    890     case TestProtocolPlatformGeneric:
    891         return "generic"_s;
    892     case TestProtocolPlatformIOS:
    893         return "ios"_s;
    894     case TestProtocolPlatformMacOS:
    895         return "macos"_s;
    896     }
    897 }
    898 
    899 template<>
    900 inline Optional<TestProtocolPlatform> fromProtocolString(const String& value)
    901 {
    902     if (value == "all")
    903         return TestProtocolPlatformAll;
    904     if (value == "generic")
    905         return TestProtocolPlatformGeneric;
    906     if (value == "ios")
    907         return TestProtocolPlatformIOS;
    908     if (value == "macos")
    909         return TestProtocolPlatformMacOS;
    910     return WTF::nullopt;
    911 }
    912 
    913861
    914862inline String toProtocolString(TestProtocolRuntimeFarmAnimals value)
     
    1000948 */
    1001949
    1002 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
    1003 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     950// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    1004951
    1005952#import "TestProtocolTypeConversions.h"
     
    10691016 */
    10701017
    1071 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json
    1072 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1018// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-enum-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    10731019
    10741020#import "TestProtocolInternal.h"
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-object-type.json-result

    r262202 r262203  
    1 ### Begin File: InspectorBackendCommands.js
     1### Begin File: InspectorBackendCommands.js.in
    22/*
    33 * Copyright (C) 2013 Google Inc. All rights reserved.
     
    2727 */
    2828
    29 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
    30 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     29// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    3130
    3231// Database
     
    3635InspectorBackend.registerEnum("Database.ParameterBundleDirectionality", {LTR: "LTR", RTL: "RTL"});
    3736InspectorBackend.activateDomain("Database", null);
    38 ### End File: InspectorBackendCommands.js
     37### End File: InspectorBackendCommands.js.in
    3938
    4039### Begin File: TestAlternateBackendDispatchers.h
     
    6665 */
    6766
    68 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
    69 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     67// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    7068
    7169#pragma once
     
    123121 */
    124122
    125 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
    126 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     123// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    127124
    128125#pragma once
     
    169166 */
    170167
    171 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
    172 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     168// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    173169
    174170#include "config.h"
     
    182178#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    183179#include "TestAlternateBackendDispatchers.h"
    184 #endif
     180#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    185181
    186182namespace Inspector {
     
    220216 */
    221217
    222 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
    223 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     218// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    224219
    225220#pragma once
     
    264259 */
    265260
    266 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
    267 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     261// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    268262
    269263#include "config.h"
     
    307301 */
    308302
    309 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
    310 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     303// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    311304
    312305#pragma once
     
    357350
    358351namespace Database {
     352
    359353/* Database error. */
    360354class Error : public JSON::ObjectBase {
     
    430424    Right = 3,
    431425}; // enum class MouseButton
     426
    432427class OptionalParameterBundle : public JSON::ObjectBase {
    433428public:
     
    756751
    757752namespace Test {
     753
    758754class ParameterBundle : public JSON::ObjectBase {
    759755public:
     
    948944 */
    949945
    950 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
    951 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     946// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    952947
    953948#include "config.h"
     
    977972
    978973// Enums in the 'Database' Domain
     974
    979975template<>
    980976Optional<Inspector::Protocol::Database::MouseButton> parseEnumValueFromString<Inspector::Protocol::Database::MouseButton>(const String& protocolString)
     
    10211017}
    10221018
    1023 
    10241019// Enums in the 'Test' Domain
     1020
    10251021template<>
    10261022Optional<Inspector::Protocol::Test::ParameterBundle::Directionality> parseEnumValueFromString<Inspector::Protocol::Test::ParameterBundle::Directionality>(const String& protocolString)
     
    10361032    return WTF::nullopt;
    10371033}
    1038 
    10391034
    10401035} // namespace TestHelpers
     
    10761071 */
    10771072
    1078 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
    1079 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1073// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    10801074
    10811075#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
     
    11191113 */
    11201114
    1121 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
    1122 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1115// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    11231116
    11241117#import "config.h"
     
    11631156 */
    11641157
    1165 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
    1166 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1158// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    11671159
    11681160#import <WebInspector/TestProtocol.h>
     
    12031195 */
    12041196
    1205 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
    1206 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1197// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    12071198
    12081199#import "TestProtocolConfiguration.h"
     
    12701261 */
    12711262
    1272 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
    1273 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1263// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    12741264
    12751265#import "TestProtocolInternal.h"
     
    13111301 */
    13121302
    1313 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
    1314 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1303// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    13151304
    13161305#import <Foundation/Foundation.h>
     
    13261315@class TestProtocolTestParameterBundle;
    13271316
    1328 typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
    1329     TestProtocolPlatformAll,
    1330     TestProtocolPlatformGeneric,
    1331     TestProtocolPlatformIOS,
    1332     TestProtocolPlatformMacOS,
    1333 };
    1334 
    1335 
    13361317typedef NS_ENUM(NSInteger, TestProtocolDatabaseMouseButton) {
    13371318    TestProtocolDatabaseMouseButtonNone,
     
    13501331    TestProtocolDatabaseParameterBundleDirectionalityRTL,
    13511332};
    1352 
    13531333typedef NS_ENUM(NSInteger, TestProtocolTestParameterBundleDirectionality) {
    13541334    TestProtocolTestParameterBundleDirectionalityLTR,
    13551335    TestProtocolTestParameterBundleDirectionalityRTL,
    13561336};
    1357 
    13581337
    13591338__attribute__((visibility ("default")))
     
    14141393- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;
    14151394@end
    1416 
    14171395__attribute__((visibility ("default")))
    14181396@interface TestProtocolTestParameterBundle : RWIProtocolJSONObject
     
    14671445 */
    14681446
    1469 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
    1470 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1447// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    14711448
    14721449#import "TestProtocol.h"
     
    15081485 */
    15091486
    1510 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
    1511 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1487// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    15121488
    15131489#import "TestProtocol.h"
     
    15181494template<typename ObjCEnumType>
    15191495Optional<ObjCEnumType> fromProtocolString(const String& value);
    1520 
    1521 inline String toProtocolString(TestProtocolPlatform value)
    1522 {
    1523     switch(value) {
    1524     case TestProtocolPlatformAll:
    1525         return "all"_s;
    1526     case TestProtocolPlatformGeneric:
    1527         return "generic"_s;
    1528     case TestProtocolPlatformIOS:
    1529         return "ios"_s;
    1530     case TestProtocolPlatformMacOS:
    1531         return "macos"_s;
    1532     }
    1533 }
    1534 
    1535 template<>
    1536 inline Optional<TestProtocolPlatform> fromProtocolString(const String& value)
    1537 {
    1538     if (value == "all")
    1539         return TestProtocolPlatformAll;
    1540     if (value == "generic")
    1541         return TestProtocolPlatformGeneric;
    1542     if (value == "ios")
    1543         return TestProtocolPlatformIOS;
    1544     if (value == "macos")
    1545         return TestProtocolPlatformMacOS;
    1546     return WTF::nullopt;
    1547 }
    1548 
    15491496
    15501497inline String toProtocolString(TestProtocolDatabaseMouseButton value)
     
    16151562    return WTF::nullopt;
    16161563}
    1617 
    16181564
    16191565inline String toProtocolString(TestProtocolTestParameterBundleDirectionality value)
     
    16691615 */
    16701616
    1671 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
    1672 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1617// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    16731618
    16741619#import "TestProtocolTypeConversions.h"
     
    17851730 */
    17861731
    1787 // DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json
    1788 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1732// DO NOT EDIT THIS FILE. It is automatically generated from type-declaration-object-type.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    17891733
    17901734#import "TestProtocolInternal.h"
     
    17961740
    17971741using namespace Inspector;
    1798 
    17991742
    18001743@implementation TestProtocolDatabaseError
     
    22932236@end
    22942237
    2295 
    22962238@implementation TestProtocolTestParameterBundle
    22972239
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result

    r262202 r262203  
    1 ### Begin File: InspectorBackendCommands.js
    2 /*
    3  * Copyright (C) 2013 Google Inc. All rights reserved.
    4  * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
    5  * Copyright (C) 2014 University of Washington. All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
    10  * 1. Redistributions of source code must retain the above copyright
    11  *    notice, this list of conditions and the following disclaimer.
    12  * 2. Redistributions in binary form must reproduce the above copyright
    13  *    notice, this list of conditions and the following disclaimer in the
    14  *    documentation and/or other materials provided with the distribution.
    15  *
    16  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
    17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    18  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
    20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    26  * THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 // DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
    30 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1### Begin File: InspectorBackendCommands.js.in
     2/*
     3 * Copyright (C) 2013 Google Inc. All rights reserved.
     4 * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
     5 * Copyright (C) 2014 University of Washington. All rights reserved.
     6 *
     7 * Redistribution and use in source and binary forms, with or without
     8 * modification, are permitted provided that the following conditions
     9 * are met:
     10 * 1. Redistributions of source code must retain the above copyright
     11 *    notice, this list of conditions and the following disclaimer.
     12 * 2. Redistributions in binary form must reproduce the above copyright
     13 *    notice, this list of conditions and the following disclaimer in the
     14 *    documentation and/or other materials provided with the distribution.
     15 *
     16 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
     17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
     20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     26 * THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    3130
    3231// Test
     
    3534InspectorBackend.registerEnum("Test.CastedAnimals", {Ducks: "Ducks", Hens: "Hens", Crows: "Crows", Flamingos: "Flamingos"});
    3635InspectorBackend.activateDomain("Test", null);
    37 ### End File: InspectorBackendCommands.js
     36### End File: InspectorBackendCommands.js.in
    3837
    3938### Begin File: TestAlternateBackendDispatchers.h
     
    6564 */
    6665
    67 // DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
    68 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     66// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    6967
    7068#pragma once
     
    122120 */
    123121
    124 // DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
    125 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     122// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    126123
    127124#pragma once
     
    168165 */
    169166
    170 // DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
    171 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     167// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    172168
    173169#include "config.h"
     
    181177#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    182178#include "TestAlternateBackendDispatchers.h"
    183 #endif
     179#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    184180
    185181namespace Inspector {
     
    219215 */
    220216
    221 // DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
    222 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     217// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    223218
    224219#pragma once
     
    263258 */
    264259
    265 // DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
    266 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     260// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    267261
    268262#include "config.h"
     
    306300 */
    307301
    308 // DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
    309 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     302// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    310303
    311304#pragma once
     
    352345
    353346namespace Test {
     347
    354348/* A dummy type that requires runtime casts, and forces non-primitive referenced types to also emit runtime cast helpers. */
    355349class TypeNeedingCast : public JSON::ObjectBase {
     
    445439};
    446440
    447 /*  */
    448441enum class UncastedAnimals {
    449442    Pigs = 4,
     
    452445    Hens = 1,
    453446}; // enum class UncastedAnimals
    454 /*  */
     447
    455448enum class CastedAnimals {
    456449    Ducks = 0,
     
    459452    Flamingos = 3,
    460453}; // enum class CastedAnimals
     454
    461455class RecursiveObject1 : public JSON::ObjectBase {
    462456public:
     
    641635 */
    642636
    643 // DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
    644 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     637// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    645638
    646639#include "config.h"
     
    671664
    672665// Enums in the 'Test' Domain
     666
    673667template<>
    674668Optional<Inspector::Protocol::Test::UncastedAnimals> parseEnumValueFromString<Inspector::Protocol::Test::UncastedAnimals>(const String& protocolString)
     
    702696    return WTF::nullopt;
    703697}
    704 
    705698
    706699} // namespace TestHelpers
     
    853846 */
    854847
    855 // DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
    856 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     848// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    857849
    858850#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
     
    896888 */
    897889
    898 // DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
    899 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     890// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    900891
    901892#import "config.h"
     
    940931 */
    941932
    942 // DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
    943 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     933// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    944934
    945935#import <WebInspector/TestProtocol.h>
     
    980970 */
    981971
    982 // DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
    983 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     972// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    984973
    985974#import "TestProtocolConfiguration.h"
     
    10471036 */
    10481037
    1049 // DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
    1050 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1038// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    10511039
    10521040#import "TestProtocolInternal.h"
     
    10881076 */
    10891077
    1090 // DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
    1091 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1078// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    10921079
    10931080#import <Foundation/Foundation.h>
     
    10991086@class TestProtocolTestRecursiveObject1;
    11001087@class TestProtocolTestRecursiveObject2;
    1101 
    1102 typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
    1103     TestProtocolPlatformAll,
    1104     TestProtocolPlatformGeneric,
    1105     TestProtocolPlatformIOS,
    1106     TestProtocolPlatformMacOS,
    1107 };
    1108 
    11091088
    11101089typedef NS_ENUM(NSInteger, TestProtocolTestUncastedAnimals) {
     
    11211100    TestProtocolTestCastedAnimalsFlamingos,
    11221101};
    1123 
    11241102
    11251103__attribute__((visibility ("default")))
     
    11861164 */
    11871165
    1188 // DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
    1189 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1166// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    11901167
    11911168#import "TestProtocol.h"
     
    12271204 */
    12281205
    1229 // DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
    1230 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1206// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    12311207
    12321208#import "TestProtocol.h"
     
    12371213template<typename ObjCEnumType>
    12381214Optional<ObjCEnumType> fromProtocolString(const String& value);
    1239 
    1240 inline String toProtocolString(TestProtocolPlatform value)
    1241 {
    1242     switch(value) {
    1243     case TestProtocolPlatformAll:
    1244         return "all"_s;
    1245     case TestProtocolPlatformGeneric:
    1246         return "generic"_s;
    1247     case TestProtocolPlatformIOS:
    1248         return "ios"_s;
    1249     case TestProtocolPlatformMacOS:
    1250         return "macos"_s;
    1251     }
    1252 }
    1253 
    1254 template<>
    1255 inline Optional<TestProtocolPlatform> fromProtocolString(const String& value)
    1256 {
    1257     if (value == "all")
    1258         return TestProtocolPlatformAll;
    1259     if (value == "generic")
    1260         return TestProtocolPlatformGeneric;
    1261     if (value == "ios")
    1262         return TestProtocolPlatformIOS;
    1263     if (value == "macos")
    1264         return TestProtocolPlatformMacOS;
    1265     return WTF::nullopt;
    1266 }
    1267 
    12681215
    12691216inline String toProtocolString(TestProtocolTestUncastedAnimals value)
     
    13551302 */
    13561303
    1357 // DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
    1358 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1304// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    13591305
    13601306#import "TestProtocolTypeConversions.h"
     
    14591405 */
    14601406
    1461 // DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json
    1462 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1407// DO NOT EDIT THIS FILE. It is automatically generated from type-requiring-runtime-casts.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    14631408
    14641409#import "TestProtocolInternal.h"
     
    14701415
    14711416using namespace Inspector;
    1472 
    14731417
    14741418@implementation TestProtocolTestTypeNeedingCast
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/type-with-open-parameters.json-result

    r262202 r262203  
    1 ### Begin File: InspectorBackendCommands.js
    2 /*
    3  * Copyright (C) 2013 Google Inc. All rights reserved.
    4  * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
    5  * Copyright (C) 2014 University of Washington. All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
    10  * 1. Redistributions of source code must retain the above copyright
    11  *    notice, this list of conditions and the following disclaimer.
    12  * 2. Redistributions in binary form must reproduce the above copyright
    13  *    notice, this list of conditions and the following disclaimer in the
    14  *    documentation and/or other materials provided with the distribution.
    15  *
    16  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
    17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    18  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
    20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    26  * THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 // DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json
    30 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    31 ### End File: InspectorBackendCommands.js
     1### Begin File: InspectorBackendCommands.js.in
     2/*
     3 * Copyright (C) 2013 Google Inc. All rights reserved.
     4 * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
     5 * Copyright (C) 2014 University of Washington. All rights reserved.
     6 *
     7 * Redistribution and use in source and binary forms, with or without
     8 * modification, are permitted provided that the following conditions
     9 * are met:
     10 * 1. Redistributions of source code must retain the above copyright
     11 *    notice, this list of conditions and the following disclaimer.
     12 * 2. Redistributions in binary form must reproduce the above copyright
     13 *    notice, this list of conditions and the following disclaimer in the
     14 *    documentation and/or other materials provided with the distribution.
     15 *
     16 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
     17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
     20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     26 * THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29// DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     30### End File: InspectorBackendCommands.js.in
    3231
    3332### Begin File: TestAlternateBackendDispatchers.h
     
    5958 */
    6059
    61 // DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json
    62 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     60// DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    6361
    6462#pragma once
     
    116114 */
    117115
    118 // DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json
    119 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     116// DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    120117
    121118#pragma once
     
    162159 */
    163160
    164 // DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json
    165 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     161// DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    166162
    167163#include "config.h"
     
    175171#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    176172#include "TestAlternateBackendDispatchers.h"
    177 #endif
     173#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    178174
    179175namespace Inspector {
     
    213209 */
    214210
    215 // DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json
    216 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     211// DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    217212
    218213#pragma once
     
    257252 */
    258253
    259 // DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json
    260 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     254// DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    261255
    262256#include "config.h"
     
    300294 */
    301295
    302 // DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json
    303 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     296// DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    304297
    305298#pragma once
     
    327320
    328321namespace Test {
     322
    329323class NoOpenParameters : public JSON::ObjectBase {
    330324public:
     
    497491 */
    498492
    499 // DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json
    500 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     493// DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    501494
    502495#include "config.h"
     
    546539 */
    547540
    548 // DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json
    549 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     541// DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    550542
    551543#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
     
    589581 */
    590582
    591 // DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json
    592 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     583// DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    593584
    594585#import "config.h"
     
    633624 */
    634625
    635 // DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json
    636 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     626// DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    637627
    638628#import <WebInspector/TestProtocol.h>
     
    673663 */
    674664
    675 // DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json
    676 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     665// DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    677666
    678667#import "TestProtocolConfiguration.h"
     
    740729 */
    741730
    742 // DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json
    743 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     731// DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    744732
    745733#import "TestProtocolInternal.h"
     
    781769 */
    782770
    783 // DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json
    784 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     771// DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    785772
    786773#import <Foundation/Foundation.h>
     
    791778@class TestProtocolTestNoOpenParameters;
    792779@class TestProtocolTestOpenParameters;
    793 
    794 typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
    795     TestProtocolPlatformAll,
    796     TestProtocolPlatformGeneric,
    797     TestProtocolPlatformIOS,
    798     TestProtocolPlatformMacOS,
    799 };
    800 
    801780
    802781
     
    857836 */
    858837
    859 // DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json
    860 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     838// DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    861839
    862840#import "TestProtocol.h"
     
    898876 */
    899877
    900 // DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json
    901 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     878// DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    902879
    903880#import "TestProtocol.h"
     
    909886Optional<ObjCEnumType> fromProtocolString(const String& value);
    910887
    911 inline String toProtocolString(TestProtocolPlatform value)
    912 {
    913     switch(value) {
    914     case TestProtocolPlatformAll:
    915         return "all"_s;
    916     case TestProtocolPlatformGeneric:
    917         return "generic"_s;
    918     case TestProtocolPlatformIOS:
    919         return "ios"_s;
    920     case TestProtocolPlatformMacOS:
    921         return "macos"_s;
    922     }
    923 }
    924 
    925 template<>
    926 inline Optional<TestProtocolPlatform> fromProtocolString(const String& value)
    927 {
    928     if (value == "all")
    929         return TestProtocolPlatformAll;
    930     if (value == "generic")
    931         return TestProtocolPlatformGeneric;
    932     if (value == "ios")
    933         return TestProtocolPlatformIOS;
    934     if (value == "macos")
    935         return TestProtocolPlatformMacOS;
    936     return WTF::nullopt;
    937 }
    938 
    939888
    940889
     
    971920 */
    972921
    973 // DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json
    974 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     922// DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    975923
    976924#import "TestProtocolTypeConversions.h"
     
    1036984 */
    1037985
    1038 // DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json
    1039 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     986// DO NOT EDIT THIS FILE. It is automatically generated from type-with-open-parameters.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    1040987
    1041988#import "TestProtocolInternal.h"
     
    1048995using namespace Inspector;
    1049996
    1050 
    1051997@implementation TestProtocolTestNoOpenParameters
    1052998
  • trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/version.json-result

    r262202 r262203  
    1 ### Begin File: InspectorBackendCommands.js
    2 /*
    3  * Copyright (C) 2013 Google Inc. All rights reserved.
    4  * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
    5  * Copyright (C) 2014 University of Washington. All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
    10  * 1. Redistributions of source code must retain the above copyright
    11  *    notice, this list of conditions and the following disclaimer.
    12  * 2. Redistributions in binary form must reproduce the above copyright
    13  *    notice, this list of conditions and the following disclaimer in the
    14  *    documentation and/or other materials provided with the distribution.
    15  *
    16  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
    17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    18  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
    20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    26  * THE POSSIBILITY OF SUCH DAMAGE.
    27  */
    28 
    29 // DO NOT EDIT THIS FILE. It is automatically generated from version.json
    30 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     1### Begin File: InspectorBackendCommands.js.in
     2/*
     3 * Copyright (C) 2013 Google Inc. All rights reserved.
     4 * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
     5 * Copyright (C) 2014 University of Washington. All rights reserved.
     6 *
     7 * Redistribution and use in source and binary forms, with or without
     8 * modification, are permitted provided that the following conditions
     9 * are met:
     10 * 1. Redistributions of source code must retain the above copyright
     11 *    notice, this list of conditions and the following disclaimer.
     12 * 2. Redistributions in binary form must reproduce the above copyright
     13 *    notice, this list of conditions and the following disclaimer in the
     14 *    documentation and/or other materials provided with the distribution.
     15 *
     16 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
     17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
     20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     26 * THE POSSIBILITY OF SUCH DAMAGE.
     27 */
     28
     29// DO NOT EDIT THIS FILE. It is automatically generated from version.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    3130
    3231// VersionDomain
     
    3433InspectorBackend.registerVersion("VersionDomain", 42);
    3534InspectorBackend.activateDomain("VersionDomain", null);
    36 ### End File: InspectorBackendCommands.js
     35### End File: InspectorBackendCommands.js.in
    3736
    3837### Begin File: TestAlternateBackendDispatchers.h
     
    6463 */
    6564
    66 // DO NOT EDIT THIS FILE. It is automatically generated from version.json
    67 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     65// DO NOT EDIT THIS FILE. It is automatically generated from version.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    6866
    6967#pragma once
     
    121119 */
    122120
    123 // DO NOT EDIT THIS FILE. It is automatically generated from version.json
    124 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     121// DO NOT EDIT THIS FILE. It is automatically generated from version.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    125122
    126123#pragma once
     
    167164 */
    168165
    169 // DO NOT EDIT THIS FILE. It is automatically generated from version.json
    170 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     166// DO NOT EDIT THIS FILE. It is automatically generated from version.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    171167
    172168#include "config.h"
     
    180176#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    181177#include "TestAlternateBackendDispatchers.h"
    182 #endif
     178#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
    183179
    184180namespace Inspector {
     
    218214 */
    219215
    220 // DO NOT EDIT THIS FILE. It is automatically generated from version.json
    221 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     216// DO NOT EDIT THIS FILE. It is automatically generated from version.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    222217
    223218#pragma once
     
    262257 */
    263258
    264 // DO NOT EDIT THIS FILE. It is automatically generated from version.json
    265 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     259// DO NOT EDIT THIS FILE. It is automatically generated from version.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    266260
    267261#include "config.h"
     
    305299 */
    306300
    307 // DO NOT EDIT THIS FILE. It is automatically generated from version.json
    308 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     301// DO NOT EDIT THIS FILE. It is automatically generated from version.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    309302
    310303#pragma once
     
    365358 */
    366359
    367 // DO NOT EDIT THIS FILE. It is automatically generated from version.json
    368 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     360// DO NOT EDIT THIS FILE. It is automatically generated from version.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    369361
    370362#include "config.h"
     
    414406 */
    415407
    416 // DO NOT EDIT THIS FILE. It is automatically generated from version.json
    417 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     408// DO NOT EDIT THIS FILE. It is automatically generated from version.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    418409
    419410#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
     
    457448 */
    458449
    459 // DO NOT EDIT THIS FILE. It is automatically generated from version.json
    460 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     450// DO NOT EDIT THIS FILE. It is automatically generated from version.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    461451
    462452#import "config.h"
     
    501491 */
    502492
    503 // DO NOT EDIT THIS FILE. It is automatically generated from version.json
    504 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     493// DO NOT EDIT THIS FILE. It is automatically generated from version.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    505494
    506495#import <WebInspector/TestProtocol.h>
     
    541530 */
    542531
    543 // DO NOT EDIT THIS FILE. It is automatically generated from version.json
    544 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     532// DO NOT EDIT THIS FILE. It is automatically generated from version.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    545533
    546534#import "TestProtocolConfiguration.h"
     
    608596 */
    609597
    610 // DO NOT EDIT THIS FILE. It is automatically generated from version.json
    611 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     598// DO NOT EDIT THIS FILE. It is automatically generated from version.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    612599
    613600#import "TestProtocolInternal.h"
     
    649636 */
    650637
    651 // DO NOT EDIT THIS FILE. It is automatically generated from version.json
    652 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     638// DO NOT EDIT THIS FILE. It is automatically generated from version.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    653639
    654640#import <Foundation/Foundation.h>
     
    659645
    660646
    661 typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
    662     TestProtocolPlatformAll,
    663     TestProtocolPlatformGeneric,
    664     TestProtocolPlatformIOS,
    665     TestProtocolPlatformMacOS,
    666 };
    667 
    668647
    669648
     
    707686 */
    708687
    709 // DO NOT EDIT THIS FILE. It is automatically generated from version.json
    710 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     688// DO NOT EDIT THIS FILE. It is automatically generated from version.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    711689
    712690#import "TestProtocol.h"
     
    748726 */
    749727
    750 // DO NOT EDIT THIS FILE. It is automatically generated from version.json
    751 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     728// DO NOT EDIT THIS FILE. It is automatically generated from version.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    752729
    753730#import "TestProtocol.h"
     
    759736Optional<ObjCEnumType> fromProtocolString(const String& value);
    760737
    761 inline String toProtocolString(TestProtocolPlatform value)
    762 {
    763     switch(value) {
    764     case TestProtocolPlatformAll:
    765         return "all"_s;
    766     case TestProtocolPlatformGeneric:
    767         return "generic"_s;
    768     case TestProtocolPlatformIOS:
    769         return "ios"_s;
    770     case TestProtocolPlatformMacOS:
    771         return "macos"_s;
    772     }
    773 }
    774 
    775 template<>
    776 inline Optional<TestProtocolPlatform> fromProtocolString(const String& value)
    777 {
    778     if (value == "all")
    779         return TestProtocolPlatformAll;
    780     if (value == "generic")
    781         return TestProtocolPlatformGeneric;
    782     if (value == "ios")
    783         return TestProtocolPlatformIOS;
    784     if (value == "macos")
    785         return TestProtocolPlatformMacOS;
    786     return WTF::nullopt;
    787 }
    788 
    789738} // namespace Inspector
    790739
     
    819768 */
    820769
    821 // DO NOT EDIT THIS FILE. It is automatically generated from version.json
    822 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     770// DO NOT EDIT THIS FILE. It is automatically generated from version.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    823771
    824772#import "TestProtocolTypeConversions.h"
     
    865813 */
    866814
    867 // DO NOT EDIT THIS FILE. It is automatically generated from version.json
    868 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
     815// DO NOT EDIT THIS FILE. It is automatically generated from version.json by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
    869816
    870817#import "TestProtocolInternal.h"
  • trunk/Source/WebCore/ChangeLog

    r262194 r262203  
     12020-05-27  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: replace `featureGuard` and `availability` with a combined `condition` that accepts any macro
     4        https://bugs.webkit.org/show_bug.cgi?id=210014
     5
     6        Reviewed by Brian Burg.
     7
     8        Previously, the generated InspectorBackendCommands.js would include code for things that the
     9        backend doesn't actually support. By using actual macros and preprocessing that file, we can
     10        ensure that the frontend doesn't incorrectly think that something is supported by the page
     11        being inspected:
     12         - the `Canvas` commands and events related to shader programs/pipelines should only exist
     13           when the corresponding context type exists, namely `ENABLE(WEBGL)` and `ENABLE(WEBGPU)`.
     14         - iOS doesn't support showing rulers, so create a variant of `DOM.setInspectModeEnabled`
     15           that only exists for `PLATFORM(IOS_FAMILY)` that doesn't have the `showRulers` optional
     16           parameter, as well as removing `Page.setShowRulers` entirely.
     17         - setting the forced appearance should only be possible if dark mode is supported.
     18         - web archives only exist if CF is used.
     19
     20        * inspector/InspectorInstrumentation.h:
     21        * inspector/InspectorInstrumentation.cpp:
     22        * inspector/agents/InspectorCanvasAgent.h:
     23        * inspector/agents/InspectorCanvasAgent.cpp:
     24        (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
     25        (WebCore::InspectorCanvasAgent::enable):
     26        (WebCore::InspectorCanvasAgent::startRecording):
     27        (WebCore::InspectorCanvasAgent::reset):
     28        (WebCore::InspectorCanvasAgent::unbindCanvas):
     29        * inspector/InspectorShaderProgram.h:
     30        * inspector/InspectorShaderProgram.cpp:
     31        (WebCore::InspectorShaderProgram::requestShaderSource):
     32        (WebCore::InspectorShaderProgram::updateShader):
     33        * inspector/agents/InspectorDOMAgent.h:
     34        * inspector/agents/InspectorDOMAgent.cpp:
     35        (WebCore::InspectorDOMAgent::setInspectModeEnabled):
     36        * inspector/agents/InspectorPageAgent.h:
     37        * inspector/agents/InspectorPageAgent.cpp:
     38        (WebCore::InspectorPageAgent::enable):
     39        (WebCore::InspectorPageAgent::disable):
     40        (WebCore::InspectorPageAgent::setForcedAppearance):
     41        (WebCore::InspectorPageAgent::archive):
     42
     43        * Configurations/FeatureDefines.xcconfig:
     44        Add `ENABLE_WEB_ARCHIVE` since it's always enabled in wtf/PlatformEnableCocoa.h.
     45
     46        * inspector/InspectorFrontendHost.idl:
     47        Drive-by: replace the `#if` with the IDL `[Conditional=]`.
     48
    1492020-05-27  Miguel Gomez  <magomez@igalia.com>
    250
  • trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig

    r261845 r262203  
    378378ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN_macosx = ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN;
    379379
     380ENABLE_WEB_ARCHIVE = ENABLE_WEB_ARCHIVE;
     381
    380382ENABLE_WEBDRIVER_MOUSE_INTERACTIONS = $(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS_$(WK_PLATFORM_NAME));
    381383ENABLE_WEBDRIVER_MOUSE_INTERACTIONS_macosx = ENABLE_WEBDRIVER_MOUSE_INTERACTIONS;
     
    420422ENABLE_XSLT = ENABLE_XSLT;
    421423
    422 FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_C_LOOP) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_EDITABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FULLSCREEN_API) $(ENABLE_PICTURE_IN_PICTURE_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_GPU_PROCESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS) $(ENABLE_INSPECTOR_TELEMETRY) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_MEMORY_SAMPLER) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION) $(ENABLE_NETWORK_CACHE_STALE_WHILE_REVALIDATE) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFSCREEN_CANVAS) $(ENABLE_OVERFLOW_SCROLLING_TOUCH) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESIZE_OBSERVER) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SANDBOX_EXTENSIONS) $(ENABLE_SERVER_PRECONNECT) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SHAREABLE_RESOURCE) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USERSELECT_ALL) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS) $(ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS) $(ENABLE_WEBDRIVER_TOUCH_INTERACTIONS) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBXR) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_CRYPTO) $(ENABLE_WEB_RTC) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
     424FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_C_LOOP) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_EDITABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FULLSCREEN_API) $(ENABLE_PICTURE_IN_PICTURE_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_GPU_PROCESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS) $(ENABLE_INSPECTOR_TELEMETRY) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_MEMORY_SAMPLER) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION) $(ENABLE_NETWORK_CACHE_STALE_WHILE_REVALIDATE) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFSCREEN_CANVAS) $(ENABLE_OVERFLOW_SCROLLING_TOUCH) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESIZE_OBSERVER) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SANDBOX_EXTENSIONS) $(ENABLE_SERVER_PRECONNECT) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SHAREABLE_RESOURCE) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USERSELECT_ALL) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_ARCHIVE) $(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS) $(ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS) $(ENABLE_WEBDRIVER_TOUCH_INTERACTIONS) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBXR) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_CRYPTO) $(ENABLE_WEB_RTC) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
  • trunk/Source/WebCore/PAL/ChangeLog

    r262084 r262203  
     12020-05-27  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: replace `featureGuard` and `availability` with a combined `condition` that accepts any macro
     4        https://bugs.webkit.org/show_bug.cgi?id=210014
     5
     6        Reviewed by Brian Burg.
     7
     8        Previously, the generated InspectorBackendCommands.js would include code for things that the
     9        backend doesn't actually support. By using actual macros and preprocessing that file, we can
     10        ensure that the frontend doesn't incorrectly think that something is supported by the page
     11        being inspected:
     12         - the `Canvas` commands and events related to shader programs/pipelines should only exist
     13           when the corresponding context type exists, namely `ENABLE(WEBGL)` and `ENABLE(WEBGPU)`.
     14         - iOS doesn't support showing rulers, so create a variant of `DOM.setInspectModeEnabled`
     15           that only exists for `PLATFORM(IOS_FAMILY)` that doesn't have the `showRulers` optional
     16           parameter, as well as removing `Page.setShowRulers` entirely.
     17         - setting the forced appearance should only be possible if dark mode is supported.
     18         - web archives only exist if CF is used.
     19
     20        * Configurations/FeatureDefines.xcconfig:
     21        Add `ENABLE_WEB_ARCHIVE` since it's always enabled in wtf/PlatformEnableCocoa.h.
     22
    1232020-05-22  Alex Christensen  <achristensen@webkit.org>
    224
  • trunk/Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig

    r261845 r262203  
    378378ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN_macosx = ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN;
    379379
     380ENABLE_WEB_ARCHIVE = ENABLE_WEB_ARCHIVE;
     381
    380382ENABLE_WEBDRIVER_MOUSE_INTERACTIONS = $(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS_$(WK_PLATFORM_NAME));
    381383ENABLE_WEBDRIVER_MOUSE_INTERACTIONS_macosx = ENABLE_WEBDRIVER_MOUSE_INTERACTIONS;
     
    420422ENABLE_XSLT = ENABLE_XSLT;
    421423
    422 FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_C_LOOP) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_EDITABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FULLSCREEN_API) $(ENABLE_PICTURE_IN_PICTURE_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_GPU_PROCESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS) $(ENABLE_INSPECTOR_TELEMETRY) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_MEMORY_SAMPLER) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION) $(ENABLE_NETWORK_CACHE_STALE_WHILE_REVALIDATE) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFSCREEN_CANVAS) $(ENABLE_OVERFLOW_SCROLLING_TOUCH) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESIZE_OBSERVER) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SANDBOX_EXTENSIONS) $(ENABLE_SERVER_PRECONNECT) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SHAREABLE_RESOURCE) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USERSELECT_ALL) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS) $(ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS) $(ENABLE_WEBDRIVER_TOUCH_INTERACTIONS) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBXR) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_CRYPTO) $(ENABLE_WEB_RTC) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
     424FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_C_LOOP) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_EDITABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FULLSCREEN_API) $(ENABLE_PICTURE_IN_PICTURE_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_GPU_PROCESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS) $(ENABLE_INSPECTOR_TELEMETRY) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_MEMORY_SAMPLER) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION) $(ENABLE_NETWORK_CACHE_STALE_WHILE_REVALIDATE) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFSCREEN_CANVAS) $(ENABLE_OVERFLOW_SCROLLING_TOUCH) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESIZE_OBSERVER) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SANDBOX_EXTENSIONS) $(ENABLE_SERVER_PRECONNECT) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SHAREABLE_RESOURCE) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USERSELECT_ALL) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_ARCHIVE) $(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS) $(ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS) $(ENABLE_WEBDRIVER_TOUCH_INTERACTIONS) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBXR) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_CRYPTO) $(ENABLE_WEB_RTC) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
  • trunk/Source/WebCore/inspector/InspectorFrontendHost.idl

    r257835 r262203  
    9494
    9595    readonly attribute boolean supportsDiagnosticLogging;
    96 #if ENABLE_INSPECTOR_TELEMETRY
    97     void logDiagnosticEvent(DOMString eventName, DOMString content);
    98 #endif
     96    [Conditional=INSPECTOR_TELEMETRY] void logDiagnosticEvent(DOMString eventName, DOMString content);
    9997};
    10098
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp

    r261104 r262203  
    794794}
    795795
     796#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)
    796797void InspectorInstrumentation::defaultAppearanceDidChangeImpl(InstrumentingAgents& instrumentingAgents, bool useDarkAppearance)
    797798{
     
    799800        inspectorPageAgent->defaultAppearanceDidChange(useDarkAppearance);
    800801}
     802#endif
    801803
    802804void InspectorInstrumentation::willDestroyCachedResourceImpl(CachedResource& cachedResource)
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.h

    r261104 r262203  
    230230    static void frameScheduledNavigation(Frame&, Seconds delay);
    231231    static void frameClearedScheduledNavigation(Frame&);
     232#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)
    232233    static void defaultAppearanceDidChange(Page&, bool useDarkAppearance);
     234#endif
    233235    static void willDestroyCachedResource(CachedResource&);
    234236
     
    435437    static void frameScheduledNavigationImpl(InstrumentingAgents&, Frame&, Seconds delay);
    436438    static void frameClearedScheduledNavigationImpl(InstrumentingAgents&, Frame&);
     439#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)
    437440    static void defaultAppearanceDidChangeImpl(InstrumentingAgents&, bool useDarkAppearance);
     441#endif
    438442    static void willDestroyCachedResourceImpl(CachedResource&);
    439443
     
    12381242}
    12391243
     1244#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)
    12401245inline void InspectorInstrumentation::defaultAppearanceDidChange(Page& page, bool useDarkAppearance)
    12411246{
     
    12431248    defaultAppearanceDidChangeImpl(instrumentingAgentsForPage(page), useDarkAppearance);
    12441249}
     1250#endif
    12451251
    12461252inline void InspectorInstrumentation::willDestroyCachedResource(CachedResource& cachedResource)
  • trunk/Source/WebCore/inspector/InspectorShaderProgram.cpp

    r254064 r262203  
    2727#include "InspectorShaderProgram.h"
    2828
     29#if ENABLE(WEBGL) || ENABLE(WEBGPU)
     30
    2931#include "InspectorCanvas.h"
    3032#include <JavaScriptCore/IdentifiersFactory.h>
     
    153155String InspectorShaderProgram::requestShaderSource(Inspector::Protocol::Canvas::ShaderType shaderType)
    154156{
    155 #if !ENABLE(WEBGL) && !ENABLE(WEBGPU)
    156     UNUSED_PARAM(shaderType);
    157 #endif
    158 
    159157    return WTF::switchOn(m_program,
    160158#if ENABLE(WEBGL)
     
    185183bool InspectorShaderProgram::updateShader(Inspector::Protocol::Canvas::ShaderType shaderType, const String& source)
    186184{
    187 #if !ENABLE(WEBGL) && !ENABLE(WEBGPU)
    188     UNUSED_PARAM(shaderType);
    189     UNUSED_PARAM(source);
    190 #endif
    191 
    192185    return WTF::switchOn(m_program,
    193186#if ENABLE(WEBGL)
     
    282275
    283276} // namespace WebCore
     277
     278#endif // ENABLE(WEBGL) || ENABLE(WEBGPU)
  • trunk/Source/WebCore/inspector/InspectorShaderProgram.h

    r250874 r262203  
    2525
    2626#pragma once
     27
     28#if ENABLE(WEBGL) || ENABLE(WEBGPU)
    2729
    2830#include <JavaScriptCore/InspectorProtocolObjects.h>
     
    100102
    101103} // namespace WebCore
     104
     105#endif // ENABLE(WEBGL) || ENABLE(WEBGPU)
  • trunk/Source/WebCore/inspector/agents/InspectorCanvasAgent.cpp

    r253226 r262203  
    8989    , m_inspectedPage(context.inspectedPage)
    9090    , m_canvasDestroyedTimer(*this, &InspectorCanvasAgent::canvasDestroyedTimerFired)
     91#if ENABLE(WEBGL) || ENABLE(WEBGPU)
    9192    , m_programDestroyedTimer(*this, &InspectorCanvasAgent::programDestroyedTimerFired)
     93#endif // ENABLE(WEBGL) || ENABLE(WEBGPU)
    9294{
    9395}
     
    133135            if (is<GPUCanvasContext>(context))
    134136                continue;
    135 #endif
     137#endif // ENABLE(WEBGPU)
    136138
    137139            if (existsInCurrentPage(context->canvasBase().scriptExecutionContext()))
     
    148150        }
    149151    }
    150 #endif
     152#endif // ENABLE(WEBGPU)
    151153
    152154#if ENABLE(WEBGL)
     
    158160        }
    159161    }
    160 #endif
     162#endif // ENABLE(WEBGL)
    161163
    162164#if ENABLE(WEBGPU)
     
    168170        }
    169171    }
    170 #endif
     172#endif // ENABLE(WEBGPU)
    171173}
    172174
     
    304306}
    305307
     308#if ENABLE(WEBGL) || ENABLE(WEBGPU)
    306309void InspectorCanvasAgent::requestShaderSource(ErrorString& errorString, const String& programId, const String& shaderTypeString, String* outSource)
    307310{
     
    341344}
    342345
     346#if ENABLE(WEBGL)
    343347void InspectorCanvasAgent::setShaderProgramDisabled(ErrorString& errorString, const String& programId, bool disabled)
    344348{
     
    358362    inspectorProgram->setHighlighted(highlighted);
    359363}
     364#endif // ENABLE(WEBGL)
     365#endif // ENABLE(WEBGL) || ENABLE(WEBGPU)
    360366
    361367void InspectorCanvasAgent::frameNavigated(Frame& frame)
     
    626632    return inspectorProgram->highlighted();
    627633}
    628 #endif
     634#endif // ENABLE(WEBGL)
    629635
    630636#if ENABLE(WEBGPU)
     
    689695    unbindProgram(*inspectorProgram);
    690696}
    691 #endif
     697#endif // ENABLE(WEBGPU)
    692698
    693699void InspectorCanvasAgent::startRecording(InspectorCanvas& inspectorCanvas, Inspector::Protocol::Recording::Initiator initiator, RecordingOptions&& recordingOptions)
     
    701707#if ENABLE(WEBGL)
    702708        && !is<WebGLRenderingContext>(context)
    703 #endif
     709#endif // ENABLE(WEBGL)
    704710#if ENABLE(WEBGL2)
    705711        && !is<WebGL2RenderingContext>(context)
    706 #endif
     712#endif // ENABLE(WEBGL2)
    707713    )
    708714        return;
     
    734740}
    735741
     742#if ENABLE(WEBGL) || ENABLE(WEBGPU)
    736743void InspectorCanvasAgent::programDestroyedTimerFired()
    737744{
     
    744751    m_removedProgramIdentifiers.clear();
    745752}
     753#endif // ENABLE(WEBGL) || ENABLE(WEBGPU)
    746754
    747755void InspectorCanvasAgent::reset()
     
    757765        m_canvasDestroyedTimer.stop();
    758766
     767#if ENABLE(WEBGL) || ENABLE(WEBGPU)
    759768    m_identifierToInspectorProgram.clear();
    760769    m_removedProgramIdentifiers.clear();
    761770    if (m_programDestroyedTimer.isActive())
    762771        m_programDestroyedTimer.stop();
     772#endif // ENABLE(WEBGL) || ENABLE(WEBGPU)
    763773
    764774    m_recordingCanvasIdentifiers.clear();
     
    799809    return inspectorCanvas;
    800810}
    801 #endif
     811#endif // ENABLE(WEBGPU)
    802812
    803813void InspectorCanvasAgent::unbindCanvas(InspectorCanvas& inspectorCanvas)
     
    812822    for (auto* inspectorProgram : programsToRemove)
    813823        unbindProgram(*inspectorProgram);
    814 #endif
     824#endif // ENABLE(WEBGL)
    815825
    816826    if (auto* context = inspectorCanvas.canvasContext())
     
    857867    return nullptr;
    858868}
    859 #endif
    860 
     869#endif // ENABLE(WEBGPU)
     870
     871#if ENABLE(WEBGL) || ENABLE(WEBGPU)
    861872void InspectorCanvasAgent::unbindProgram(InspectorShaderProgram& inspectorProgram)
    862873{
     
    892903    return nullptr;
    893904}
    894 #endif
     905#endif // ENABLE(WEBGL)
    895906
    896907#if ENABLE(WEBGPU)
     
    903914    return nullptr;
    904915}
    905 #endif
     916#endif // ENABLE(WEBGPU)
     917#endif // ENABLE(WEBGL) || ENABLE(WEBGPU)
    906918
    907919} // namespace WebCore
  • trunk/Source/WebCore/inspector/agents/InspectorCanvasAgent.h

    r253226 r262203  
    4444
    4545class CanvasRenderingContext;
     46#if ENABLE(WEBGL) || ENABLE(WEBGPU)
    4647class InspectorShaderProgram;
    4748#if ENABLE(WEBGL)
    4849class WebGLProgram;
    4950class WebGLRenderingContextBase;
    50 #endif
     51#endif // ENABLE(WEBGL)
    5152#if ENABLE(WEBGPU)
    5253class GPUCanvasContext;
     
    5455class WebGPUPipeline;
    5556class WebGPUSwapChain;
    56 #endif
     57#endif // ENABLE(WEBGPU)
     58#endif // ENABLE(WEBGL) || ENABLE(WEBGPU)
    5759
    5860typedef String ErrorString;
     
    8082    void startRecording(ErrorString&, const String& canvasId, const int* frameCount, const int* memoryLimit) override;
    8183    void stopRecording(ErrorString&, const String& canvasId) override;
     84#if ENABLE(WEBGL) || ENABLE(WEBGPU)
    8285    void requestShaderSource(ErrorString&, const String& programId, const String& shaderType, String* source) override;
    8386    void updateShader(ErrorString&, const String& programId, const String& shaderType, const String& source) override;
     87#if ENABLE(WEBGL)
    8488    void setShaderProgramDisabled(ErrorString&, const String& programId, bool disabled) override;
    8589    void setShaderProgramHighlighted(ErrorString&, const String& programId, bool highlighted) override;
     90#endif // ENABLE(WEBGL)
     91#endif // ENABLE(WEBGL) || ENABLE(WEBGPU)
    8692
    8793    // CanvasObserver
     
    105111    bool isWebGLProgramDisabled(WebGLProgram&);
    106112    bool isWebGLProgramHighlighted(WebGLProgram&);
    107 #endif
     113#endif // ENABLE(WEBGL)
    108114#if ENABLE(WEBGPU)
    109115    void didCreateWebGPUDevice(WebGPUDevice&);
     
    112118    void didCreateWebGPUPipeline(WebGPUDevice&, WebGPUPipeline&);
    113119    void willDestroyWebGPUPipeline(WebGPUPipeline&);
    114 #endif
     120#endif // ENABLE(WEBGPU)
    115121
    116122private:
     
    123129
    124130    void canvasDestroyedTimerFired();
     131#if ENABLE(WEBGL) || ENABLE(WEBGPU)
    125132    void programDestroyedTimerFired();
     133#endif // ENABLE(WEBGL) || ENABLE(WEBGPU)
    126134    void reset();
    127135
     
    129137#if ENABLE(WEBGPU)
    130138    InspectorCanvas& bindCanvas(WebGPUDevice&, bool captureBacktrace);
    131 #endif
     139#endif // ENABLE(WEBGPU)
    132140    void unbindCanvas(InspectorCanvas&);
    133141    RefPtr<InspectorCanvas> assertInspectorCanvas(ErrorString&, const String& canvasId);
     
    135143#if ENABLE(WEBGPU)
    136144    RefPtr<InspectorCanvas> findInspectorCanvas(WebGPUDevice&);
    137 #endif
     145#endif // ENABLE(WEBGPU)
    138146
     147#if ENABLE(WEBGL) || ENABLE(WEBGPU)
    139148    void unbindProgram(InspectorShaderProgram&);
    140149    RefPtr<InspectorShaderProgram> assertInspectorProgram(ErrorString&, const String& programId);
    141150#if ENABLE(WEBGL)
    142151    RefPtr<InspectorShaderProgram> findInspectorProgram(WebGLProgram&);
    143 #endif
     152#endif // ENABLE(WEBGL)
    144153#if ENABLE(WEBGPU)
    145154    RefPtr<InspectorShaderProgram> findInspectorProgram(WebGPUPipeline&);
    146 #endif
     155#endif // ENABLE(WEBGPU)
     156#endif // ENABLE(WEBGL) || ENABLE(WEBGPU)
    147157
    148158    std::unique_ptr<Inspector::CanvasFrontendDispatcher> m_frontendDispatcher;
     
    156166    Timer m_canvasDestroyedTimer;
    157167
     168#if ENABLE(WEBGL) || ENABLE(WEBGPU)
    158169    HashMap<String, RefPtr<InspectorShaderProgram>> m_identifierToInspectorProgram;
    159170    Vector<String> m_removedProgramIdentifiers;
    160171    Timer m_programDestroyedTimer;
     172#endif // ENABLE(WEBGL) || ENABLE(WEBGPU)
    161173
    162174    HashSet<String> m_recordingCanvasIdentifiers;
  • trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp

    r261233 r262203  
    12081208}
    12091209
     1210#if PLATFORM(IOS_FAMILY)
     1211void InspectorDOMAgent::setInspectModeEnabled(ErrorString& errorString, bool enabled, const JSON::Object* highlightConfig)
     1212{
     1213    setSearchingForNode(errorString, enabled, highlightConfig ? highlightConfig : nullptr, false);
     1214}
     1215#else
    12101216void InspectorDOMAgent::setInspectModeEnabled(ErrorString& errorString, bool enabled, const JSON::Object* highlightConfig, const bool* showRulers)
    12111217{
    12121218    setSearchingForNode(errorString, enabled, highlightConfig ? highlightConfig : nullptr, showRulers && *showRulers);
    12131219}
     1220#endif
    12141221
    12151222void InspectorDOMAgent::highlightRect(ErrorString&, int x, int y, int width, int height, const JSON::Object* color, const JSON::Object* outlineColor, const bool* usePageCoordinates)
  • trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.h

    r255396 r262203  
    132132    void resolveNode(ErrorString&, int nodeId, const String* objectGroup, RefPtr<Inspector::Protocol::Runtime::RemoteObject>& result) override;
    133133    void getAttributes(ErrorString&, int nodeId, RefPtr<JSON::ArrayOf<String>>& result) override;
     134#if PLATFORM(IOS_FAMILY)
     135    void setInspectModeEnabled(ErrorString&, bool enabled, const JSON::Object* highlightConfig) override;
     136#else
    134137    void setInspectModeEnabled(ErrorString&, bool enabled, const JSON::Object* highlightConfig, const bool* showRulers) override;
     138#endif
    135139    void requestNode(ErrorString&, const String& objectId, int* nodeId) override;
    136140    void pushNodeByPathToFrontend(ErrorString&, const String& path, int* nodeId) override;
  • trunk/Source/WebCore/inspector/agents/InspectorPageAgent.cpp

    r261233 r262203  
    357357    stopwatch.start();
    358358
    359 #if HAVE(OS_DARK_MODE_SUPPORT)
     359#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)
    360360    defaultAppearanceDidChange(m_inspectedPage.defaultUseDarkAppearance());
    361361#endif
     
    368368    ErrorString unused;
    369369    setShowPaintRects(unused, false);
     370#if !PLATFORM(IOS_FAMILY)
    370371    setShowRulers(unused, false);
     372#endif
    371373    overrideUserAgent(unused, nullptr);
    372374    setEmulatedMedia(unused, emptyString());
     375#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)
    373376    setForcedAppearance(unused, emptyString());
     377#endif
    374378
    375379    auto& inspectedPageSettings = m_inspectedPage.settings();
     
    771775}
    772776
     777#if !PLATFORM(IOS_FAMILY)
    773778void InspectorPageAgent::setShowRulers(ErrorString&, bool showRulers)
    774779{
    775780    m_overlay->setShowRulers(showRulers);
    776781}
     782#endif
    777783
    778784void InspectorPageAgent::setShowPaintRects(ErrorString&, bool show)
     
    870876}
    871877
     878#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)
    872879void InspectorPageAgent::defaultAppearanceDidChange(bool useDarkAppearance)
    873880{
    874881    m_frontendDispatcher->defaultAppearanceDidChange(useDarkAppearance ? Inspector::Protocol::Page::Appearance::Dark : Inspector::Protocol::Page::Appearance::Light);
    875882}
     883#endif
    876884
    877885void InspectorPageAgent::didClearWindowObjectInWorld(Frame& frame, DOMWrapperWorld& world)
     
    10091017}
    10101018
     1019#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)
    10111020void InspectorPageAgent::setForcedAppearance(ErrorString&, const String& appearance)
    10121021{
    1013     if (appearance == m_forcedAppearance)
    1014         return;
    1015 
    1016     m_forcedAppearance = appearance;
    1017 
    10181022    if (appearance == "Light"_s)
    10191023        m_inspectedPage.setUseDarkAppearanceOverride(false);
     
    10231027        m_inspectedPage.setUseDarkAppearanceOverride(WTF::nullopt);
    10241028}
     1029#endif
    10251030
    10261031void InspectorPageAgent::applyUserAgentOverride(String& userAgent)
     
    10701075}
    10711076
     1077#if ENABLE(WEB_ARCHIVE) && USE(CF)
    10721078void InspectorPageAgent::archive(ErrorString& errorString, String* data)
    10731079{
    1074 #if ENABLE(WEB_ARCHIVE) && USE(CF)
    10751080    auto archive = LegacyWebArchive::create(m_inspectedPage.mainFrame());
    10761081    if (!archive) {
     
    10811086    RetainPtr<CFDataRef> buffer = archive->rawDataRepresentation();
    10821087    *data = base64Encode(CFDataGetBytePtr(buffer.get()), CFDataGetLength(buffer.get()));
    1083 #else
    1084     UNUSED_PARAM(data);
    1085     errorString = "Not supported"_s;
    1086 #endif
    1087 }
     1088}
     1089#endif
    10881090
    10891091} // namespace WebCore
  • trunk/Source/WebCore/inspector/agents/InspectorPageAgent.h

    r259173 r262203  
    109109    void searchInResource(ErrorString&, const String& frameId, const String& url, const String& query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, const String* optionalRequestId, RefPtr<JSON::ArrayOf<Inspector::Protocol::GenericTypes::SearchMatch>>&) override;
    110110    void searchInResources(ErrorString&, const String&, const bool* caseSensitive, const bool* isRegex, RefPtr<JSON::ArrayOf<Inspector::Protocol::Page::SearchResult>>&) override;
     111#if !PLATFORM(IOS_FAMILY)
    111112    void setShowRulers(ErrorString&, bool) override;
     113#endif
    112114    void setShowPaintRects(ErrorString&, bool show) override;
    113115    void setEmulatedMedia(ErrorString&, const String&) override;
     116#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)
    114117    void setForcedAppearance(ErrorString&, const String&) override;
     118#endif
    115119    void snapshotNode(ErrorString&, int nodeId, String* outDataURL) override;
    116120    void snapshotRect(ErrorString&, int x, int y, int width, int height, const String& coordinateSystem, String* outDataURL) override;
     121#if ENABLE(WEB_ARCHIVE) && USE(CF)
    117122    void archive(ErrorString&, String* data) override;
     123#endif
    118124
    119125    // InspectorInstrumentation
     
    127133    void frameScheduledNavigation(Frame&, Seconds delay);
    128134    void frameClearedScheduledNavigation(Frame&);
     135#if ENABLE(DARK_MODE_CSS) || HAVE(OS_DARK_MODE_SUPPORT)
    129136    void defaultAppearanceDidChange(bool useDarkAppearance);
     137#endif
    130138    void applyUserAgentOverride(String&);
    131139    void applyEmulatedMedia(String&);
     
    162170    String m_userAgentOverride;
    163171    String m_emulatedMedia;
    164     String m_forcedAppearance;
    165172    String m_bootstrapScript;
    166173    bool m_isFirstLayoutAfterOnLoad { false };
  • trunk/Source/WebInspectorUI/CMakeLists.txt

    r260940 r262203  
    5050    OUTPUT ${WebInspectorUI_DERIVED_SOURCES_DIR}/UserInterface/Protocol/InspectorBackendCommands.js
    5151    DEPENDS JavaScriptCore
     52            InspectorBackendCommands
    5253            ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorBackendCommands.js
    5354    COMMAND ${CMAKE_COMMAND} -E copy ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorBackendCommands.js ${WebInspectorUI_DERIVED_SOURCES_DIR}/UserInterface/Protocol/InspectorBackendCommands.js
  • trunk/Source/WebInspectorUI/ChangeLog

    r262173 r262203  
     12020-05-27  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: replace `featureGuard` and `availability` with a combined `condition` that accepts any macro
     4        https://bugs.webkit.org/show_bug.cgi?id=210014
     5
     6        Reviewed by Brian Burg.
     7
     8        Previously, the generated InspectorBackendCommands.js would include code for things that the
     9        backend doesn't actually support. By using actual macros and preprocessing that file, we can
     10        ensure that the frontend doesn't incorrectly think that something is supported by the page
     11        being inspected:
     12         - the `Canvas` commands and events related to shader programs/pipelines should only exist
     13           when the corresponding context type exists, namely `ENABLE(WEBGL)` and `ENABLE(WEBGPU)`.
     14         - iOS doesn't support showing rulers, so create a variant of `DOM.setInspectModeEnabled`
     15           that only exists for `PLATFORM(IOS_FAMILY)` that doesn't have the `showRulers` optional
     16           parameter, as well as removing `Page.setShowRulers` entirely.
     17         - setting the forced appearance should only be possible if dark mode is supported.
     18         - web archives only exist if CF is used.
     19
     20        * CMakeLists.txt:
     21        Add a dependency on the new `InspectorBackendCommands` target.
     22
     23        * UserInterface/Base/Main.js:
     24        (WI._updateDownloadTabBarButton):
     25
    1262020-05-26  Devin Rousso  <drousso@apple.com>
    227
  • trunk/Source/WebInspectorUI/UserInterface/Base/Main.js

    r261198 r262203  
    23942394        return;
    23952395
    2396     if (!InspectorBackend.hasDomain("Page")) {
     2396    if (!InspectorBackend.hasCommand("Page.archive")) {
    23972397        WI._downloadTabBarButton.hidden = true;
    23982398        WI._updateTabBarDividers();
  • trunk/Source/WebKit/ChangeLog

    r262200 r262203  
     12020-05-27  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: replace `featureGuard` and `availability` with a combined `condition` that accepts any macro
     4        https://bugs.webkit.org/show_bug.cgi?id=210014
     5
     6        Reviewed by Brian Burg.
     7
     8        Previously, the generated InspectorBackendCommands.js would include code for things that the
     9        backend doesn't actually support. By using actual macros and preprocessing that file, we can
     10        ensure that the frontend doesn't incorrectly think that something is supported by the page
     11        being inspected:
     12         - the `Canvas` commands and events related to shader programs/pipelines should only exist
     13           when the corresponding context type exists, namely `ENABLE(WEBGL)` and `ENABLE(WEBGPU)`.
     14         - iOS doesn't support showing rulers, so create a variant of `DOM.setInspectModeEnabled`
     15           that only exists for `PLATFORM(IOS_FAMILY)` that doesn't have the `showRulers` optional
     16           parameter, as well as removing `Page.setShowRulers` entirely.
     17         - setting the forced appearance should only be possible if dark mode is supported.
     18         - web archives only exist if CF is used.
     19
     20        * Configurations/FeatureDefines.xcconfig:
     21        Add `ENABLE_WEB_ARCHIVE` since it's always enabled in wtf/PlatformEnableCocoa.h.
     22
     23        * DerivedSources.make:
     24        * PlatformMac.cmake:
     25        Remove `platform` as it is handled by `condition`.
     26
     27        * UIProcess/Automation/Automation.json:
     28
    1292020-05-27  Zalan Bujtas  <zalan@apple.com>
    230
  • trunk/Source/WebKit/Configurations/FeatureDefines.xcconfig

    r261845 r262203  
    378378ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN_macosx = ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN;
    379379
     380ENABLE_WEB_ARCHIVE = ENABLE_WEB_ARCHIVE;
     381
    380382ENABLE_WEBDRIVER_MOUSE_INTERACTIONS = $(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS_$(WK_PLATFORM_NAME));
    381383ENABLE_WEBDRIVER_MOUSE_INTERACTIONS_macosx = ENABLE_WEBDRIVER_MOUSE_INTERACTIONS;
     
    420422ENABLE_XSLT = ENABLE_XSLT;
    421423
    422 FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_C_LOOP) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_EDITABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FULLSCREEN_API) $(ENABLE_PICTURE_IN_PICTURE_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_GPU_PROCESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS) $(ENABLE_INSPECTOR_TELEMETRY) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_MEMORY_SAMPLER) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION) $(ENABLE_NETWORK_CACHE_STALE_WHILE_REVALIDATE) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFSCREEN_CANVAS) $(ENABLE_OVERFLOW_SCROLLING_TOUCH) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESIZE_OBSERVER) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SANDBOX_EXTENSIONS) $(ENABLE_SERVER_PRECONNECT) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SHAREABLE_RESOURCE) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USERSELECT_ALL) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS) $(ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS) $(ENABLE_WEBDRIVER_TOUCH_INTERACTIONS) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBXR) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_CRYPTO) $(ENABLE_WEB_RTC) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
     424FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_C_LOOP) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_EDITABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FULLSCREEN_API) $(ENABLE_PICTURE_IN_PICTURE_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_GPU_PROCESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS) $(ENABLE_INSPECTOR_TELEMETRY) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_MEMORY_SAMPLER) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION) $(ENABLE_NETWORK_CACHE_STALE_WHILE_REVALIDATE) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFSCREEN_CANVAS) $(ENABLE_OVERFLOW_SCROLLING_TOUCH) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESIZE_OBSERVER) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SANDBOX_EXTENSIONS) $(ENABLE_SERVER_PRECONNECT) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SHAREABLE_RESOURCE) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USERSELECT_ALL) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_ARCHIVE) $(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS) $(ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS) $(ENABLE_WEBDRIVER_TOUCH_INTERACTIONS) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBXR) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_CRYPTO) $(ENABLE_WEB_RTC) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
  • trunk/Source/WebKit/DerivedSources.make

    r261375 r262203  
    318318AUTOMATION_PROTOCOL_OUTPUT_PATTERNS = $(subst .,%,$(AUTOMATION_PROTOCOL_OUTPUT_FILES))
    319319
    320 ifeq ($(OS),MACOS)
    321 ifeq ($(shell $(CC) -std=gnu++1z -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep ' WTF_PLATFORM_IOS_FAMILY ' | cut -d' ' -f3), 1)
    322         AUTOMATION_BACKEND_PLATFORM_ARGUMENTS = --platform iOS
    323 else
    324         AUTOMATION_BACKEND_PLATFORM_ARGUMENTS = --platform macOS
    325 endif
    326 endif # MACOS
    327 
    328320# JSON-RPC Frontend Dispatchers, Backend Dispatchers, Type Builders
    329321$(AUTOMATION_PROTOCOL_OUTPUT_PATTERNS) : $(AUTOMATION_PROTOCOL_INPUT_FILES) $(AUTOMATION_PROTOCOL_GENERATOR_SCRIPTS)
    330         $(PYTHON) $(JavaScriptCore_SCRIPTS_DIR)/generate-inspector-protocol-bindings.py --framework WebKit $(AUTOMATION_BACKEND_PLATFORM_ARGUMENTS) --backend --outputDir . $(AUTOMATION_PROTOCOL_INPUT_FILES)
     322        $(PYTHON) $(JavaScriptCore_SCRIPTS_DIR)/generate-inspector-protocol-bindings.py --framework WebKit --backend --outputDir . $(AUTOMATION_PROTOCOL_INPUT_FILES)
    331323
    332324all : $(AUTOMATION_PROTOCOL_OUTPUT_FILES)
  • trunk/Source/WebKit/PlatformMac.cmake

    r261375 r262203  
    481481endforeach ()
    482482
    483 list(APPEND WebKit_AUTOMATION_PROTOCOL_GENERATOR_EXTRA_FLAGS
    484     --platform=macOS
    485 )
    486 
    487483set(SecItemShimDirectory ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/WebKit.framework/Versions/A/Frameworks)
    488484add_library(SecItemShim SHARED WebProcess/mac/SecItemShimLibrary.mm)
  • trunk/Source/WebKit/UIProcess/Automation/Automation.json

    r254118 r262203  
    438438            "name": "inspectBrowsingContext",
    439439            "description": "Inspect the specified browsing context using Web Inspector.",
    440             "platform": "macos",
     440            "condition": "defined(WTF_PLATFORM_MAC) && WTF_PLATFORM_MAC",
    441441            "parameters": [
    442442                { "name": "handle", "$ref": "BrowsingContextHandle", "description": "The handle for the browsing context that should be inspected." },
  • trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.h

    r255343 r262203  
    201201    void setSessionPermissions(Inspector::ErrorString&, const JSON::Array& in_permissions) override;
    202202
    203     // Platform: macOS
    204203#if PLATFORM(MAC)
    205204    void inspectBrowsingContext(const String&, const bool* optionalEnableAutoCapturing, Ref<InspectBrowsingContextCallback>&&) override;
  • trunk/Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm

    r259665 r262203  
    4343using namespace WebCore;
    4444
    45 #pragma mark Commands for Platform: 'macOS'
     45#pragma mark Commands for 'PLATFORM(MAC)'
    4646
    4747void WebAutomationSession::inspectBrowsingContext(const String& handle, const bool* optionalEnableAutoCapturing, Ref<InspectBrowsingContextCallback>&& callback)
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r262190 r262203  
     12020-05-27  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: replace `featureGuard` and `availability` with a combined `condition` that accepts any macro
     4        https://bugs.webkit.org/show_bug.cgi?id=210014
     5
     6        Reviewed by Brian Burg.
     7
     8        Previously, the generated InspectorBackendCommands.js would include code for things that the
     9        backend doesn't actually support. By using actual macros and preprocessing that file, we can
     10        ensure that the frontend doesn't incorrectly think that something is supported by the page
     11        being inspected:
     12         - the `Canvas` commands and events related to shader programs/pipelines should only exist
     13           when the corresponding context type exists, namely `ENABLE(WEBGL)` and `ENABLE(WEBGPU)`.
     14         - iOS doesn't support showing rulers, so create a variant of `DOM.setInspectModeEnabled`
     15           that only exists for `PLATFORM(IOS_FAMILY)` that doesn't have the `showRulers` optional
     16           parameter, as well as removing `Page.setShowRulers` entirely.
     17         - setting the forced appearance should only be possible if dark mode is supported.
     18         - web archives only exist if CF is used.
     19
     20        * Configurations/FeatureDefines.xcconfig:
     21        Add `ENABLE_WEB_ARCHIVE` since it's always enabled in wtf/PlatformEnableCocoa.h.
     22
    1232020-05-27  David Kilzer  <ddkilzer@apple.com>
    224
  • trunk/Source/WebKitLegacy/mac/Configurations/FeatureDefines.xcconfig

    r261845 r262203  
    378378ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN_macosx = ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN;
    379379
     380ENABLE_WEB_ARCHIVE = ENABLE_WEB_ARCHIVE;
     381
    380382ENABLE_WEBDRIVER_MOUSE_INTERACTIONS = $(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS_$(WK_PLATFORM_NAME));
    381383ENABLE_WEBDRIVER_MOUSE_INTERACTIONS_macosx = ENABLE_WEBDRIVER_MOUSE_INTERACTIONS;
     
    420422ENABLE_XSLT = ENABLE_XSLT;
    421423
    422 FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_C_LOOP) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_EDITABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FULLSCREEN_API) $(ENABLE_PICTURE_IN_PICTURE_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_GPU_PROCESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS) $(ENABLE_INSPECTOR_TELEMETRY) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_MEMORY_SAMPLER) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION) $(ENABLE_NETWORK_CACHE_STALE_WHILE_REVALIDATE) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFSCREEN_CANVAS) $(ENABLE_OVERFLOW_SCROLLING_TOUCH) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESIZE_OBSERVER) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SANDBOX_EXTENSIONS) $(ENABLE_SERVER_PRECONNECT) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SHAREABLE_RESOURCE) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USERSELECT_ALL) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS) $(ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS) $(ENABLE_WEBDRIVER_TOUCH_INTERACTIONS) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBXR) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_CRYPTO) $(ENABLE_WEB_RTC) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
     424FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_C_LOOP) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_EDITABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FULLSCREEN_API) $(ENABLE_PICTURE_IN_PICTURE_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_GPU_PROCESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS) $(ENABLE_INSPECTOR_TELEMETRY) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_MEMORY_SAMPLER) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION) $(ENABLE_NETWORK_CACHE_STALE_WHILE_REVALIDATE) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFSCREEN_CANVAS) $(ENABLE_OVERFLOW_SCROLLING_TOUCH) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESIZE_OBSERVER) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SANDBOX_EXTENSIONS) $(ENABLE_SERVER_PRECONNECT) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SHAREABLE_RESOURCE) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USERSELECT_ALL) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_ARCHIVE) $(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS) $(ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS) $(ENABLE_WEBDRIVER_TOUCH_INTERACTIONS) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBXR) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_CRYPTO) $(ENABLE_WEB_RTC) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
  • trunk/Tools/ChangeLog

    r262191 r262203  
     12020-05-27  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: replace `featureGuard` and `availability` with a combined `condition` that accepts any macro
     4        https://bugs.webkit.org/show_bug.cgi?id=210014
     5
     6        Reviewed by Brian Burg.
     7
     8        Previously, the generated InspectorBackendCommands.js would include code for things that the
     9        backend doesn't actually support. By using actual macros and preprocessing that file, we can
     10        ensure that the frontend doesn't incorrectly think that something is supported by the page
     11        being inspected:
     12         - the `Canvas` commands and events related to shader programs/pipelines should only exist
     13           when the corresponding context type exists, namely `ENABLE(WEBGL)` and `ENABLE(WEBGPU)`.
     14         - iOS doesn't support showing rulers, so create a variant of `DOM.setInspectModeEnabled`
     15           that only exists for `PLATFORM(IOS_FAMILY)` that doesn't have the `showRulers` optional
     16           parameter, as well as removing `Page.setShowRulers` entirely.
     17         - setting the forced appearance should only be possible if dark mode is supported.
     18         - web archives only exist if CF is used.
     19
     20        * Configurations/FeatureDefines.xcconfig:
     21        Add `ENABLE_WEB_ARCHIVE` since it's always enabled in wtf/PlatformEnableCocoa.h.
     22
     23        * Scripts/webkitpy/inspector/main.py:
     24        (InspectorGeneratorTests.generate_from_json):
     25        (InspectorGeneratorTests.run_tests):
     26        (InspectorGeneratorTests.main):
     27
    1282020-05-27  Philippe Normand  <pnormand@igalia.com>
    229
  • trunk/Tools/Scripts/webkitpy/inspector/main.py

    r225733 r262203  
    3939        self.executive = executive
    4040
    41     def generate_from_json(self, json_file, platform, output_directory):
     41    def generate_from_json(self, json_file, output_directory):
    4242        cmd = ['python',
    4343               'JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py',
     
    4646               '--framework', 'Test',
    4747               '--test',
    48                '--platform', platform,
    4948               json_file]
    5049
     
    8988        return changes_found
    9089
    91     def run_tests(self, platform, input_directory, reference_directory):
     90    def run_tests(self, input_directory, reference_directory):
    9291        work_directory = reference_directory
    9392
     
    102101                work_directory = tempfile.mkdtemp()
    103102
    104             if self.generate_from_json(os.path.join(input_directory, input_file), platform, work_directory):
     103            if self.generate_from_json(os.path.join(input_directory, input_file), work_directory):
    105104                passed = False
    106105
     
    123122
    124123        base_directory = os.path.join('JavaScriptCore', 'inspector', 'scripts', 'tests')
    125 
    126         platform_directories = {
    127             'macos': 'mac',
    128             'ios': 'ios',
    129             'generic': 'generic',
    130             'all': 'all',
    131         }
    132 
    133         for platform_name, platform_directory in platform_directories.iteritems():
    134             input_directory = os.path.join(base_directory, platform_directory)
    135             reference_directory = os.path.join(input_directory, 'expected')
    136             if not os.path.isdir(input_directory) or not os.path.isdir(reference_directory):
    137                 continue
    138 
    139             all_tests_passed = all_tests_passed and self.run_tests(platform_name, input_directory, reference_directory)
     124        input_directory = base_directory
     125        reference_directory = os.path.join(input_directory, 'expected')
     126        if os.path.isdir(input_directory) and os.path.isdir(reference_directory):
     127            all_tests_passed = self.run_tests(input_directory, reference_directory)
    140128
    141129        print('')
  • trunk/Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig

    r261845 r262203  
    378378ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN_macosx = ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN;
    379379
     380ENABLE_WEB_ARCHIVE = ENABLE_WEB_ARCHIVE;
     381
    380382ENABLE_WEBDRIVER_MOUSE_INTERACTIONS = $(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS_$(WK_PLATFORM_NAME));
    381383ENABLE_WEBDRIVER_MOUSE_INTERACTIONS_macosx = ENABLE_WEBDRIVER_MOUSE_INTERACTIONS;
     
    420422ENABLE_XSLT = ENABLE_XSLT;
    421423
    422 FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_C_LOOP) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_EDITABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FULLSCREEN_API) $(ENABLE_PICTURE_IN_PICTURE_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_GPU_PROCESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS) $(ENABLE_INSPECTOR_TELEMETRY) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_MEMORY_SAMPLER) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION) $(ENABLE_NETWORK_CACHE_STALE_WHILE_REVALIDATE) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFSCREEN_CANVAS) $(ENABLE_OVERFLOW_SCROLLING_TOUCH) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESIZE_OBSERVER) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SANDBOX_EXTENSIONS) $(ENABLE_SERVER_PRECONNECT) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SHAREABLE_RESOURCE) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USERSELECT_ALL) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS) $(ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS) $(ENABLE_WEBDRIVER_TOUCH_INTERACTIONS) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBXR) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_CRYPTO) $(ENABLE_WEB_RTC) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
     424FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_C_LOOP) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_EDITABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FULLSCREEN_API) $(ENABLE_PICTURE_IN_PICTURE_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_GPU_PROCESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS) $(ENABLE_INSPECTOR_TELEMETRY) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_MEMORY_SAMPLER) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION) $(ENABLE_NETWORK_CACHE_STALE_WHILE_REVALIDATE) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFSCREEN_CANVAS) $(ENABLE_OVERFLOW_SCROLLING_TOUCH) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESIZE_OBSERVER) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SANDBOX_EXTENSIONS) $(ENABLE_SERVER_PRECONNECT) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SHAREABLE_RESOURCE) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USERSELECT_ALL) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_ARCHIVE) $(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS) $(ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS) $(ENABLE_WEBDRIVER_TOUCH_INTERACTIONS) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBXR) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_CRYPTO) $(ENABLE_WEB_RTC) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
Note: See TracChangeset for help on using the changeset viewer.