@triniwiz/nativescript-masonkit 1.0.0-alpha.5 → 1.0.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common.d.ts +7 -9
- package/common.js +277 -552
- package/common.js.map +1 -1
- package/helpers.d.ts +32 -10
- package/helpers.js +772 -286
- package/helpers.js.map +1 -1
- package/index.android.d.ts +6 -2
- package/index.android.js +21 -3
- package/index.android.js.map +1 -1
- package/index.d.ts +64 -7
- package/index.ios.d.ts +9 -6
- package/index.ios.js +39 -25
- package/index.ios.js.map +1 -1
- package/package.json +1 -1
- package/platforms/android/include.gradle +18 -1
- package/platforms/android/masonkit-release.aar +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason-Swift.h +108 -64
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/mason_native.h +47 -20
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Info.plist +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.abi.json +7002 -1194
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.private.swiftinterface +58 -21
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftinterface +58 -21
- package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason-Swift.h +216 -128
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/mason_native.h +47 -20
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Info.plist +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.abi.json +7002 -1194
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +58 -21
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftinterface +58 -21
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +7002 -1194
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +58 -21
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +58 -21
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/_CodeSignature/CodeResources +43 -43
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/build.xcconfig +1 -2
- package/platforms/ios/src/MasonV8Module.h +583 -0
- package/platforms/ios/src/MasonV8Module.mm +1005 -0
- package/platforms/ios/src/{include → cpp/include}/mason_native.h +47 -20
- package/platforms/ios/src/cpp/include/robin_hood.h +2544 -0
- package/platforms/ios/src/module.modulemap +2 -2
- package/platforms/new_native_src/cpp/Caches.cpp +36 -0
- package/platforms/new_native_src/cpp/Caches.h +42 -0
- package/platforms/new_native_src/cpp/Common.h +34 -0
- package/platforms/new_native_src/cpp/ConcurrentMap.h +57 -0
- package/platforms/new_native_src/cpp/Helpers.cpp +101 -0
- package/platforms/new_native_src/cpp/Helpers.h +364 -0
- package/platforms/new_native_src/cpp/MasonImpl.cpp +68 -0
- package/platforms/new_native_src/cpp/MasonImpl.h +40 -0
- package/platforms/new_native_src/cpp/MasonNodeImpl.cpp +89 -0
- package/platforms/new_native_src/cpp/MasonNodeImpl.h +47 -0
- package/platforms/new_native_src/cpp/MasonStyleImpl.cpp +2181 -0
- package/platforms/new_native_src/cpp/MasonStyleImpl.h +420 -0
- package/platforms/{ios/Mason.xcframework/ios-arm64/Mason.framework/PrivateHeaders → new_native_src/cpp/include}/mason_native.h +464 -168
- package/platforms/new_native_src/cpp/include/robin_hood.h +2544 -0
- package/pods/Headers/include/APIDesign.md +72 -0
- package/pods/Headers/include/DEPS +10 -0
- package/pods/Headers/include/DIR_METADATA +11 -0
- package/pods/Headers/include/OWNERS +23 -0
- package/pods/Headers/include/cppgc/DEPS +8 -0
- package/pods/Headers/include/cppgc/OWNERS +2 -0
- package/pods/Headers/include/cppgc/README.md +133 -0
- package/pods/Headers/include/cppgc/allocation.h +310 -0
- package/pods/Headers/include/cppgc/common.h +29 -0
- package/pods/Headers/include/cppgc/cross-thread-persistent.h +465 -0
- package/pods/Headers/include/cppgc/custom-space.h +97 -0
- package/pods/Headers/include/cppgc/default-platform.h +67 -0
- package/pods/Headers/include/cppgc/ephemeron-pair.h +30 -0
- package/pods/Headers/include/cppgc/explicit-management.h +100 -0
- package/pods/Headers/include/cppgc/garbage-collected.h +106 -0
- package/pods/Headers/include/cppgc/heap-consistency.h +266 -0
- package/pods/Headers/include/cppgc/heap-state.h +82 -0
- package/pods/Headers/include/cppgc/heap-statistics.h +120 -0
- package/pods/Headers/include/cppgc/heap.h +206 -0
- package/pods/Headers/include/cppgc/internal/api-constants.h +55 -0
- package/pods/Headers/include/cppgc/internal/atomic-entry-flag.h +48 -0
- package/pods/Headers/include/cppgc/internal/caged-heap-local-data.h +79 -0
- package/pods/Headers/include/cppgc/internal/compiler-specific.h +38 -0
- package/pods/Headers/include/cppgc/internal/finalizer-trait.h +93 -0
- package/pods/Headers/include/cppgc/internal/gc-info.h +156 -0
- package/pods/Headers/include/cppgc/internal/logging.h +50 -0
- package/pods/Headers/include/cppgc/internal/name-trait.h +122 -0
- package/pods/Headers/include/cppgc/internal/persistent-node.h +216 -0
- package/pods/Headers/include/cppgc/internal/pointer-policies.h +186 -0
- package/pods/Headers/include/cppgc/internal/write-barrier.h +435 -0
- package/pods/Headers/include/cppgc/liveness-broker.h +77 -0
- package/pods/Headers/include/cppgc/macros.h +26 -0
- package/pods/Headers/include/cppgc/member.h +291 -0
- package/pods/Headers/include/cppgc/name-provider.h +65 -0
- package/pods/Headers/include/cppgc/object-size-trait.h +58 -0
- package/pods/Headers/include/cppgc/persistent.h +370 -0
- package/pods/Headers/include/cppgc/platform.h +156 -0
- package/pods/Headers/include/cppgc/prefinalizer.h +75 -0
- package/pods/Headers/include/cppgc/process-heap-statistics.h +36 -0
- package/pods/Headers/include/cppgc/sentinel-pointer.h +32 -0
- package/pods/Headers/include/cppgc/source-location.h +92 -0
- package/pods/Headers/include/cppgc/testing.h +106 -0
- package/pods/Headers/include/cppgc/trace-trait.h +116 -0
- package/pods/Headers/include/cppgc/type-traits.h +240 -0
- package/pods/Headers/include/cppgc/visitor.h +379 -0
- package/pods/Headers/include/js_protocol-1.2.json +936 -0
- package/pods/Headers/include/js_protocol-1.3.json +1112 -0
- package/pods/Headers/include/js_protocol.pdl +1709 -0
- package/pods/Headers/include/libffi/arm64/ffi.h +524 -0
- package/pods/Headers/include/libffi/arm64/ffitarget.h +92 -0
- package/pods/Headers/include/libffi/x86_64/ffi.h +524 -0
- package/pods/Headers/include/libffi/x86_64/ffitarget.h +147 -0
- package/pods/Headers/include/libffi.h +12 -0
- package/pods/Headers/include/libplatform/DEPS +9 -0
- package/pods/Headers/include/libplatform/libplatform-export.h +29 -0
- package/pods/Headers/include/libplatform/libplatform.h +106 -0
- package/pods/Headers/include/libplatform/v8-tracing.h +333 -0
- package/pods/Headers/include/v8-array-buffer.h +433 -0
- package/pods/Headers/include/v8-callbacks.h +397 -0
- package/pods/Headers/include/v8-container.h +129 -0
- package/pods/Headers/include/v8-context.h +407 -0
- package/pods/Headers/include/v8-cppgc.h +215 -0
- package/pods/Headers/include/v8-data.h +80 -0
- package/pods/Headers/include/v8-date.h +43 -0
- package/pods/Headers/include/v8-debug.h +168 -0
- package/pods/Headers/include/v8-embedder-heap.h +218 -0
- package/pods/Headers/include/v8-embedder-state-scope.h +51 -0
- package/pods/Headers/include/v8-exception.h +217 -0
- package/pods/Headers/include/v8-extension.h +62 -0
- package/pods/Headers/include/v8-external.h +37 -0
- package/pods/Headers/include/v8-fast-api-calls.h +939 -0
- package/pods/Headers/include/v8-forward.h +81 -0
- package/pods/Headers/include/v8-function-callback.h +475 -0
- package/pods/Headers/include/v8-function.h +125 -0
- package/pods/Headers/include/v8-initialization.h +315 -0
- package/pods/Headers/include/v8-inspector-protocol.h +13 -0
- package/pods/Headers/include/v8-inspector.h +376 -0
- package/pods/Headers/include/v8-internal.h +661 -0
- package/pods/Headers/include/v8-isolate.h +1709 -0
- package/pods/Headers/include/v8-json.h +47 -0
- package/pods/Headers/include/v8-local-handle.h +455 -0
- package/pods/Headers/include/v8-locker.h +149 -0
- package/pods/Headers/include/v8-maybe.h +137 -0
- package/pods/Headers/include/v8-memory-span.h +43 -0
- package/pods/Headers/include/v8-message.h +216 -0
- package/pods/Headers/include/v8-metrics.h +255 -0
- package/pods/Headers/include/v8-microtask-queue.h +152 -0
- package/pods/Headers/include/v8-microtask.h +28 -0
- package/pods/Headers/include/v8-object.h +775 -0
- package/pods/Headers/include/v8-persistent-handle.h +590 -0
- package/pods/Headers/include/v8-platform.h +1092 -0
- package/pods/Headers/include/v8-primitive-object.h +118 -0
- package/pods/Headers/include/v8-primitive.h +866 -0
- package/pods/Headers/include/v8-profiler.h +1198 -0
- package/pods/Headers/include/v8-promise.h +174 -0
- package/pods/Headers/include/v8-proxy.h +50 -0
- package/pods/Headers/include/v8-regexp.h +105 -0
- package/pods/Headers/include/v8-script.h +748 -0
- package/pods/Headers/include/v8-snapshot.h +196 -0
- package/pods/Headers/include/v8-statistics.h +217 -0
- package/pods/Headers/include/v8-template.h +1079 -0
- package/pods/Headers/include/v8-traced-handle.h +420 -0
- package/pods/Headers/include/v8-typed-array.h +282 -0
- package/pods/Headers/include/v8-unwinder-state.h +31 -0
- package/pods/Headers/include/v8-unwinder.h +132 -0
- package/pods/Headers/include/v8-util.h +658 -0
- package/pods/Headers/include/v8-value-serializer-version.h +24 -0
- package/pods/Headers/include/v8-value-serializer.h +279 -0
- package/pods/Headers/include/v8-value.h +526 -0
- package/pods/Headers/include/v8-version-string.h +38 -0
- package/pods/Headers/include/v8-version.h +20 -0
- package/pods/Headers/include/v8-wasm-trap-handler-posix.h +31 -0
- package/pods/Headers/include/v8-wasm-trap-handler-win.h +28 -0
- package/pods/Headers/include/v8-wasm.h +257 -0
- package/pods/Headers/include/v8-weak-callback-info.h +86 -0
- package/pods/Headers/include/v8.h +88 -0
- package/pods/Headers/include/v8config.h +605 -0
- package/pods/Headers/inspector/InspectorServer.h +20 -0
- package/pods/Headers/inspector/JsV8InspectorClient.h +66 -0
- package/pods/Headers/inspector/base/trace_event/common/trace_event_common.h +1123 -0
- package/pods/Headers/inspector/base64.h +9 -0
- package/pods/Headers/inspector/src/base/address-region.h +95 -0
- package/pods/Headers/inspector/src/base/atomic-utils.h +219 -0
- package/pods/Headers/inspector/src/base/atomicops.h +332 -0
- package/pods/Headers/inspector/src/base/atomicops_internals_atomicword_compat.h +89 -0
- package/pods/Headers/inspector/src/base/base-export.h +31 -0
- package/pods/Headers/inspector/src/base/bits.h +343 -0
- package/pods/Headers/inspector/src/base/build_config.h +234 -0
- package/pods/Headers/inspector/src/base/compiler-specific.h +136 -0
- package/pods/Headers/inspector/src/base/export-template.h +163 -0
- package/pods/Headers/inspector/src/base/flags.h +130 -0
- package/pods/Headers/inspector/src/base/immediate-crash.h +162 -0
- package/pods/Headers/inspector/src/base/lazy-instance.h +258 -0
- package/pods/Headers/inspector/src/base/logging.h +417 -0
- package/pods/Headers/inspector/src/base/macros.h +423 -0
- package/pods/Headers/inspector/src/base/memory.h +89 -0
- package/pods/Headers/inspector/src/base/once.h +108 -0
- package/pods/Headers/inspector/src/base/optional.h +882 -0
- package/pods/Headers/inspector/src/base/platform/mutex.h +370 -0
- package/pods/Headers/inspector/src/base/platform/platform.h +476 -0
- package/pods/Headers/inspector/src/base/platform/semaphore.h +108 -0
- package/pods/Headers/inspector/src/base/platform/v8-time.h +513 -0
- package/pods/Headers/inspector/src/base/platform/wrappers.h +73 -0
- package/pods/Headers/inspector/src/base/safe_conversions.h +389 -0
- package/pods/Headers/inspector/src/base/safe_conversions_impl.h +822 -0
- package/pods/Headers/inspector/src/base/template-utils.h +113 -0
- package/pods/Headers/inspector/src/base/v8-fallthrough.h +21 -0
- package/pods/Headers/inspector/src/common/checks.h +38 -0
- package/pods/Headers/inspector/src/common/globals.h +1842 -0
- package/pods/Headers/inspector/src/debug/debug-interface.h +667 -0
- package/pods/Headers/inspector/src/debug/interface-types.h +175 -0
- package/pods/Headers/inspector/src/init/v8.h +52 -0
- package/pods/Headers/inspector/src/inspector/custom-preview.h +24 -0
- package/pods/Headers/inspector/src/inspector/injected-script.h +251 -0
- package/pods/Headers/inspector/src/inspector/inspected-context.h +79 -0
- package/pods/Headers/inspector/src/inspector/protocol/CSS.h +2148 -0
- package/pods/Headers/inspector/src/inspector/protocol/Console.h +211 -0
- package/pods/Headers/inspector/src/inspector/protocol/DOM.h +1008 -0
- package/pods/Headers/inspector/src/inspector/protocol/Debugger.h +892 -0
- package/pods/Headers/inspector/src/inspector/protocol/Forward.h +75 -0
- package/pods/Headers/inspector/src/inspector/protocol/HeapProfiler.h +346 -0
- package/pods/Headers/inspector/src/inspector/protocol/Log.h +342 -0
- package/pods/Headers/inspector/src/inspector/protocol/Network.h +2528 -0
- package/pods/Headers/inspector/src/inspector/protocol/Overlay.h +281 -0
- package/pods/Headers/inspector/src/inspector/protocol/Page.h +1189 -0
- package/pods/Headers/inspector/src/inspector/protocol/Profiler.h +1001 -0
- package/pods/Headers/inspector/src/inspector/protocol/Protocol.h +617 -0
- package/pods/Headers/inspector/src/inspector/protocol/Runtime.h +1696 -0
- package/pods/Headers/inspector/src/inspector/protocol/Schema.h +146 -0
- package/pods/Headers/inspector/src/inspector/protocol/Security.h +793 -0
- package/pods/Headers/inspector/src/inspector/remote-object-id.h +54 -0
- package/pods/Headers/inspector/src/inspector/search-util.h +26 -0
- package/pods/Headers/inspector/src/inspector/string-16.h +180 -0
- package/pods/Headers/inspector/src/inspector/string-util.h +128 -0
- package/pods/Headers/inspector/src/inspector/v8-console-agent-impl.h +48 -0
- package/pods/Headers/inspector/src/inspector/v8-console-message.h +147 -0
- package/pods/Headers/inspector/src/inspector/v8-console.h +173 -0
- package/pods/Headers/inspector/src/inspector/v8-css-agent-impl.h +62 -0
- package/pods/Headers/inspector/src/inspector/v8-debugger-agent-impl.h +248 -0
- package/pods/Headers/inspector/src/inspector/v8-debugger-id.h +44 -0
- package/pods/Headers/inspector/src/inspector/v8-debugger-script.h +123 -0
- package/pods/Headers/inspector/src/inspector/v8-debugger.h +257 -0
- package/pods/Headers/inspector/src/inspector/v8-dom-agent-impl.h +91 -0
- package/pods/Headers/inspector/src/inspector/v8-heap-profiler-agent-impl.h +80 -0
- package/pods/Headers/inspector/src/inspector/v8-inspector-impl.h +191 -0
- package/pods/Headers/inspector/src/inspector/v8-inspector-session-impl.h +156 -0
- package/pods/Headers/inspector/src/inspector/v8-log-agent-impl.h +34 -0
- package/pods/Headers/inspector/src/inspector/v8-network-agent-impl.h +71 -0
- package/pods/Headers/inspector/src/inspector/v8-ns-debugger-agent-impl.h +24 -0
- package/pods/Headers/inspector/src/inspector/v8-overlay-agent-impl.h +70 -0
- package/pods/Headers/inspector/src/inspector/v8-page-agent-impl.h +88 -0
- package/pods/Headers/inspector/src/inspector/v8-profiler-agent-impl.h +104 -0
- package/pods/Headers/inspector/src/inspector/v8-regex.h +38 -0
- package/pods/Headers/inspector/src/inspector/v8-runtime-agent-impl.h +157 -0
- package/pods/Headers/inspector/src/inspector/v8-schema-agent-impl.h +38 -0
- package/pods/Headers/inspector/src/inspector/v8-stack-trace-impl.h +164 -0
- package/pods/Headers/inspector/src/inspector/v8-string-conversions.h +17 -0
- package/pods/Headers/inspector/src/inspector/v8-value-utils.h +23 -0
- package/pods/Headers/inspector/src/inspector/value-mirror.h +87 -0
- package/pods/Headers/inspector/src/libplatform/default-platform.h +92 -0
- package/pods/Headers/inspector/src/logging/tracing-flags.h +50 -0
- package/pods/Headers/inspector/src/numbers/conversions.h +183 -0
- package/pods/Headers/inspector/src/tracing/trace-event.h +664 -0
- package/pods/Headers/inspector/src/utils/allocation.h +367 -0
- package/pods/Headers/inspector/src/utils/vector.h +324 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/cbor.h +305 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/dispatch.h +314 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/error_support.h +62 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/export.h +6 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/find_by_first.h +58 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/frontend_channel.h +47 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/glue.h +80 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json.h +52 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json_platform.h +26 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/maybe.h +104 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/parser_handler.h +39 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/protocol_core.h +406 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializable.h +32 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializer_traits.h +158 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/span.h +99 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/status.h +139 -0
- package/pods/Headers/inspector/utils.h +32 -0
- package/pods/Headers/inspector/v8-inspector-platform.h +44 -0
- package/pods/Headers/jsi/decorator.h +762 -0
- package/pods/Headers/jsi/instrumentation.h +117 -0
- package/pods/Headers/jsi/jsi-inl.h +322 -0
- package/pods/Headers/jsi/jsi.h +1387 -0
- package/pods/Headers/jsi/jsilib.h +59 -0
- package/pods/Headers/jsi/threadsafe.h +79 -0
- package/pods/Headers/runtime/ArgConverter.h +61 -0
- package/pods/Headers/runtime/ArrayAdapter.h +13 -0
- package/pods/Headers/runtime/Caches.h +98 -0
- package/pods/Headers/runtime/ClassBuilder.h +61 -0
- package/pods/Headers/runtime/Common.h +9 -0
- package/pods/Headers/runtime/ConcurrentMap.h +55 -0
- package/pods/Headers/runtime/ConcurrentQueue.h +28 -0
- package/pods/Headers/runtime/Console.h +27 -0
- package/pods/Headers/runtime/Constants.h +15 -0
- package/pods/Headers/runtime/DataWrapper.h +671 -0
- package/pods/Headers/runtime/DictionaryAdapter.h +13 -0
- package/pods/Headers/runtime/ExtVector.h +21 -0
- package/pods/Headers/runtime/FFICall.h +105 -0
- package/pods/Headers/runtime/FastEnumerationAdapter.h +13 -0
- package/pods/Headers/runtime/FunctionReference.h +18 -0
- package/pods/Headers/runtime/Helpers.h +84 -0
- package/pods/Headers/runtime/InlineFunctions.h +16 -0
- package/pods/Headers/runtime/Interop.h +202 -0
- package/pods/Headers/runtime/KnownUnknownClassPair.h +35 -0
- package/pods/Headers/runtime/Metadata.h +981 -0
- package/pods/Headers/runtime/MetadataBuilder.h +72 -0
- package/pods/Headers/runtime/MetadataInlines.h +157 -0
- package/pods/Headers/runtime/ModuleInternal.h +59 -0
- package/pods/Headers/runtime/NSDataAdapter.h +13 -0
- package/pods/Headers/runtime/NativeScriptException.h +27 -0
- package/pods/Headers/runtime/ObjectManager.h +31 -0
- package/pods/Headers/runtime/OneByteStringResource.h +21 -0
- package/pods/Headers/runtime/Pointer.h +26 -0
- package/pods/Headers/runtime/PromiseProxy.h +15 -0
- package/pods/Headers/runtime/Reference.h +38 -0
- package/pods/Headers/runtime/Runtime.h +67 -0
- package/pods/Headers/runtime/RuntimeConfig.h +17 -0
- package/pods/Headers/runtime/SetTimeout.h +34 -0
- package/pods/Headers/runtime/SimpleAllocator.h +23 -0
- package/pods/Headers/runtime/StringHasher.h +315 -0
- package/pods/Headers/runtime/SymbolIterator.h +18 -0
- package/pods/Headers/runtime/SymbolLoader.h +27 -0
- package/pods/Headers/runtime/TNSDerivedClass.h +8 -0
- package/pods/Headers/runtime/TSHelpers.h +15 -0
- package/pods/Headers/runtime/Tasks.h +19 -0
- package/pods/Headers/runtime/UnmanagedType.h +21 -0
- package/pods/Headers/runtime/WeakRef.h +15 -0
- package/pods/Headers/runtime/Worker.h +26 -0
- package/pods/Headers/runtime/robin_hood.h +2184 -0
- package/pods/Headers/v8runtime/HostProxy.h +71 -0
- package/pods/Headers/v8runtime/JSIV8ValueConverter.h +70 -0
- package/pods/Headers/v8runtime/V8PointerValue.h +44 -0
- package/pods/Headers/v8runtime/V8Runtime.h +215 -0
- package/pods/Headers/v8runtime/V8RuntimeConfig.h +26 -0
- package/pods/Headers/v8runtime/V8RuntimeFactory.h +21 -0
- package/pods/NativeScript.podspec +68 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/PrivateHeaders/mason_native.h +0 -676
- package/platforms/ios/src/JSIModule.h +0 -217
- package/platforms/ios/src/JSIModule.mm +0 -2788
|
@@ -0,0 +1,2148 @@
|
|
|
1
|
+
// This file is generated by TypeBuilder_h.template.
|
|
2
|
+
|
|
3
|
+
// Copyright (c) 2016 The Chromium Authors. All rights reserved.
|
|
4
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
5
|
+
// found in the LICENSE file.
|
|
6
|
+
|
|
7
|
+
#ifndef v8_inspector_protocol_CSS_h
|
|
8
|
+
#define v8_inspector_protocol_CSS_h
|
|
9
|
+
|
|
10
|
+
#include "src/inspector/protocol/Protocol.h"
|
|
11
|
+
// For each imported domain we generate a ValueConversions struct instead of a full domain definition
|
|
12
|
+
// and include Domain::API version from there.
|
|
13
|
+
#include "src/inspector/protocol/DOM.h"
|
|
14
|
+
|
|
15
|
+
namespace v8_inspector {
|
|
16
|
+
namespace protocol {
|
|
17
|
+
namespace CSS {
|
|
18
|
+
using StyleSheetId = String;
|
|
19
|
+
using StyleSheetOrigin = String;
|
|
20
|
+
class PseudoElementMatches;
|
|
21
|
+
class InheritedStyleEntry;
|
|
22
|
+
class RuleMatch;
|
|
23
|
+
class Value;
|
|
24
|
+
class SelectorList;
|
|
25
|
+
class CSSStyleSheetHeader;
|
|
26
|
+
class CSSRule;
|
|
27
|
+
class RuleUsage;
|
|
28
|
+
class SourceRange;
|
|
29
|
+
class ShorthandEntry;
|
|
30
|
+
class CSSComputedStyleProperty;
|
|
31
|
+
class CSSStyle;
|
|
32
|
+
class CSSProperty;
|
|
33
|
+
class CSSMedia;
|
|
34
|
+
class MediaQuery;
|
|
35
|
+
class MediaQueryExpression;
|
|
36
|
+
class PlatformFontUsage;
|
|
37
|
+
class FontFace;
|
|
38
|
+
class CSSKeyframesRule;
|
|
39
|
+
class CSSKeyframeRule;
|
|
40
|
+
class StyleDeclarationEdit;
|
|
41
|
+
|
|
42
|
+
// ------------- Forward and enum declarations.
|
|
43
|
+
|
|
44
|
+
namespace StyleSheetOriginEnum {
|
|
45
|
+
extern const char Injected[];
|
|
46
|
+
extern const char UserAgent[];
|
|
47
|
+
extern const char Inspector[];
|
|
48
|
+
extern const char Regular[];
|
|
49
|
+
} // namespace StyleSheetOriginEnum
|
|
50
|
+
|
|
51
|
+
// ------------- Type and builder declarations.
|
|
52
|
+
|
|
53
|
+
class PseudoElementMatches : public ::v8_crdtp::ProtocolObject<PseudoElementMatches> {
|
|
54
|
+
public:
|
|
55
|
+
~PseudoElementMatches() override { }
|
|
56
|
+
|
|
57
|
+
String getPseudoType() { return m_pseudoType; }
|
|
58
|
+
void setPseudoType(const String& value) { m_pseudoType = value; }
|
|
59
|
+
|
|
60
|
+
protocol::Array<protocol::CSS::RuleMatch>* getMatches() { return m_matches.get(); }
|
|
61
|
+
void setMatches(std::unique_ptr<protocol::Array<protocol::CSS::RuleMatch>> value) { m_matches = std::move(value); }
|
|
62
|
+
|
|
63
|
+
template<int STATE>
|
|
64
|
+
class PseudoElementMatchesBuilder {
|
|
65
|
+
public:
|
|
66
|
+
enum {
|
|
67
|
+
NoFieldsSet = 0,
|
|
68
|
+
PseudoTypeSet = 1 << 1,
|
|
69
|
+
MatchesSet = 1 << 2,
|
|
70
|
+
AllFieldsSet = (PseudoTypeSet | MatchesSet | 0)};
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
PseudoElementMatchesBuilder<STATE | PseudoTypeSet>& setPseudoType(const String& value)
|
|
74
|
+
{
|
|
75
|
+
static_assert(!(STATE & PseudoTypeSet), "property pseudoType should not be set yet");
|
|
76
|
+
m_result->setPseudoType(value);
|
|
77
|
+
return castState<PseudoTypeSet>();
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
PseudoElementMatchesBuilder<STATE | MatchesSet>& setMatches(std::unique_ptr<protocol::Array<protocol::CSS::RuleMatch>> value)
|
|
81
|
+
{
|
|
82
|
+
static_assert(!(STATE & MatchesSet), "property matches should not be set yet");
|
|
83
|
+
m_result->setMatches(std::move(value));
|
|
84
|
+
return castState<MatchesSet>();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
std::unique_ptr<PseudoElementMatches> build()
|
|
88
|
+
{
|
|
89
|
+
static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
|
|
90
|
+
return std::move(m_result);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
private:
|
|
94
|
+
friend class PseudoElementMatches;
|
|
95
|
+
PseudoElementMatchesBuilder() : m_result(new PseudoElementMatches()) { }
|
|
96
|
+
|
|
97
|
+
template<int STEP> PseudoElementMatchesBuilder<STATE | STEP>& castState()
|
|
98
|
+
{
|
|
99
|
+
return *reinterpret_cast<PseudoElementMatchesBuilder<STATE | STEP>*>(this);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
std::unique_ptr<protocol::CSS::PseudoElementMatches> m_result;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
static PseudoElementMatchesBuilder<0> create()
|
|
106
|
+
{
|
|
107
|
+
return PseudoElementMatchesBuilder<0>();
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
private:
|
|
111
|
+
DECLARE_SERIALIZATION_SUPPORT();
|
|
112
|
+
|
|
113
|
+
PseudoElementMatches()
|
|
114
|
+
{
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
String m_pseudoType;
|
|
118
|
+
std::unique_ptr<protocol::Array<protocol::CSS::RuleMatch>> m_matches;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
class InheritedStyleEntry : public ::v8_crdtp::ProtocolObject<InheritedStyleEntry> {
|
|
123
|
+
public:
|
|
124
|
+
~InheritedStyleEntry() override { }
|
|
125
|
+
|
|
126
|
+
bool hasInlineStyle() { return m_inlineStyle.isJust(); }
|
|
127
|
+
protocol::CSS::CSSStyle* getInlineStyle(protocol::CSS::CSSStyle* defaultValue) { return m_inlineStyle.isJust() ? m_inlineStyle.fromJust() : defaultValue; }
|
|
128
|
+
void setInlineStyle(std::unique_ptr<protocol::CSS::CSSStyle> value) { m_inlineStyle = std::move(value); }
|
|
129
|
+
|
|
130
|
+
protocol::Array<protocol::CSS::RuleMatch>* getMatchedCSSRules() { return m_matchedCSSRules.get(); }
|
|
131
|
+
void setMatchedCSSRules(std::unique_ptr<protocol::Array<protocol::CSS::RuleMatch>> value) { m_matchedCSSRules = std::move(value); }
|
|
132
|
+
|
|
133
|
+
template<int STATE>
|
|
134
|
+
class InheritedStyleEntryBuilder {
|
|
135
|
+
public:
|
|
136
|
+
enum {
|
|
137
|
+
NoFieldsSet = 0,
|
|
138
|
+
MatchedCSSRulesSet = 1 << 1,
|
|
139
|
+
AllFieldsSet = (MatchedCSSRulesSet | 0)};
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
InheritedStyleEntryBuilder<STATE>& setInlineStyle(std::unique_ptr<protocol::CSS::CSSStyle> value)
|
|
143
|
+
{
|
|
144
|
+
m_result->setInlineStyle(std::move(value));
|
|
145
|
+
return *this;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
InheritedStyleEntryBuilder<STATE | MatchedCSSRulesSet>& setMatchedCSSRules(std::unique_ptr<protocol::Array<protocol::CSS::RuleMatch>> value)
|
|
149
|
+
{
|
|
150
|
+
static_assert(!(STATE & MatchedCSSRulesSet), "property matchedCSSRules should not be set yet");
|
|
151
|
+
m_result->setMatchedCSSRules(std::move(value));
|
|
152
|
+
return castState<MatchedCSSRulesSet>();
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
std::unique_ptr<InheritedStyleEntry> build()
|
|
156
|
+
{
|
|
157
|
+
static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
|
|
158
|
+
return std::move(m_result);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
private:
|
|
162
|
+
friend class InheritedStyleEntry;
|
|
163
|
+
InheritedStyleEntryBuilder() : m_result(new InheritedStyleEntry()) { }
|
|
164
|
+
|
|
165
|
+
template<int STEP> InheritedStyleEntryBuilder<STATE | STEP>& castState()
|
|
166
|
+
{
|
|
167
|
+
return *reinterpret_cast<InheritedStyleEntryBuilder<STATE | STEP>*>(this);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
std::unique_ptr<protocol::CSS::InheritedStyleEntry> m_result;
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
static InheritedStyleEntryBuilder<0> create()
|
|
174
|
+
{
|
|
175
|
+
return InheritedStyleEntryBuilder<0>();
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
private:
|
|
179
|
+
DECLARE_SERIALIZATION_SUPPORT();
|
|
180
|
+
|
|
181
|
+
InheritedStyleEntry()
|
|
182
|
+
{
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
Maybe<protocol::CSS::CSSStyle> m_inlineStyle;
|
|
186
|
+
std::unique_ptr<protocol::Array<protocol::CSS::RuleMatch>> m_matchedCSSRules;
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
class RuleMatch : public ::v8_crdtp::ProtocolObject<RuleMatch> {
|
|
191
|
+
public:
|
|
192
|
+
~RuleMatch() override { }
|
|
193
|
+
|
|
194
|
+
protocol::CSS::CSSRule* getRule() { return m_rule.get(); }
|
|
195
|
+
void setRule(std::unique_ptr<protocol::CSS::CSSRule> value) { m_rule = std::move(value); }
|
|
196
|
+
|
|
197
|
+
protocol::Array<int>* getMatchingSelectors() { return m_matchingSelectors.get(); }
|
|
198
|
+
void setMatchingSelectors(std::unique_ptr<protocol::Array<int>> value) { m_matchingSelectors = std::move(value); }
|
|
199
|
+
|
|
200
|
+
template<int STATE>
|
|
201
|
+
class RuleMatchBuilder {
|
|
202
|
+
public:
|
|
203
|
+
enum {
|
|
204
|
+
NoFieldsSet = 0,
|
|
205
|
+
RuleSet = 1 << 1,
|
|
206
|
+
MatchingSelectorsSet = 1 << 2,
|
|
207
|
+
AllFieldsSet = (RuleSet | MatchingSelectorsSet | 0)};
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
RuleMatchBuilder<STATE | RuleSet>& setRule(std::unique_ptr<protocol::CSS::CSSRule> value)
|
|
211
|
+
{
|
|
212
|
+
static_assert(!(STATE & RuleSet), "property rule should not be set yet");
|
|
213
|
+
m_result->setRule(std::move(value));
|
|
214
|
+
return castState<RuleSet>();
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
RuleMatchBuilder<STATE | MatchingSelectorsSet>& setMatchingSelectors(std::unique_ptr<protocol::Array<int>> value)
|
|
218
|
+
{
|
|
219
|
+
static_assert(!(STATE & MatchingSelectorsSet), "property matchingSelectors should not be set yet");
|
|
220
|
+
m_result->setMatchingSelectors(std::move(value));
|
|
221
|
+
return castState<MatchingSelectorsSet>();
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
std::unique_ptr<RuleMatch> build()
|
|
225
|
+
{
|
|
226
|
+
static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
|
|
227
|
+
return std::move(m_result);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
private:
|
|
231
|
+
friend class RuleMatch;
|
|
232
|
+
RuleMatchBuilder() : m_result(new RuleMatch()) { }
|
|
233
|
+
|
|
234
|
+
template<int STEP> RuleMatchBuilder<STATE | STEP>& castState()
|
|
235
|
+
{
|
|
236
|
+
return *reinterpret_cast<RuleMatchBuilder<STATE | STEP>*>(this);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
std::unique_ptr<protocol::CSS::RuleMatch> m_result;
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
static RuleMatchBuilder<0> create()
|
|
243
|
+
{
|
|
244
|
+
return RuleMatchBuilder<0>();
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
private:
|
|
248
|
+
DECLARE_SERIALIZATION_SUPPORT();
|
|
249
|
+
|
|
250
|
+
RuleMatch()
|
|
251
|
+
{
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
std::unique_ptr<protocol::CSS::CSSRule> m_rule;
|
|
255
|
+
std::unique_ptr<protocol::Array<int>> m_matchingSelectors;
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
class Value : public ::v8_crdtp::ProtocolObject<Value> {
|
|
260
|
+
public:
|
|
261
|
+
~Value() override { }
|
|
262
|
+
|
|
263
|
+
String getText() { return m_text; }
|
|
264
|
+
void setText(const String& value) { m_text = value; }
|
|
265
|
+
|
|
266
|
+
bool hasRange() { return m_range.isJust(); }
|
|
267
|
+
protocol::CSS::SourceRange* getRange(protocol::CSS::SourceRange* defaultValue) { return m_range.isJust() ? m_range.fromJust() : defaultValue; }
|
|
268
|
+
void setRange(std::unique_ptr<protocol::CSS::SourceRange> value) { m_range = std::move(value); }
|
|
269
|
+
|
|
270
|
+
template<int STATE>
|
|
271
|
+
class ValueBuilder {
|
|
272
|
+
public:
|
|
273
|
+
enum {
|
|
274
|
+
NoFieldsSet = 0,
|
|
275
|
+
TextSet = 1 << 1,
|
|
276
|
+
AllFieldsSet = (TextSet | 0)};
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
ValueBuilder<STATE | TextSet>& setText(const String& value)
|
|
280
|
+
{
|
|
281
|
+
static_assert(!(STATE & TextSet), "property text should not be set yet");
|
|
282
|
+
m_result->setText(value);
|
|
283
|
+
return castState<TextSet>();
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
ValueBuilder<STATE>& setRange(std::unique_ptr<protocol::CSS::SourceRange> value)
|
|
287
|
+
{
|
|
288
|
+
m_result->setRange(std::move(value));
|
|
289
|
+
return *this;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
std::unique_ptr<Value> build()
|
|
293
|
+
{
|
|
294
|
+
static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
|
|
295
|
+
return std::move(m_result);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
private:
|
|
299
|
+
friend class Value;
|
|
300
|
+
ValueBuilder() : m_result(new Value()) { }
|
|
301
|
+
|
|
302
|
+
template<int STEP> ValueBuilder<STATE | STEP>& castState()
|
|
303
|
+
{
|
|
304
|
+
return *reinterpret_cast<ValueBuilder<STATE | STEP>*>(this);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
std::unique_ptr<protocol::CSS::Value> m_result;
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
static ValueBuilder<0> create()
|
|
311
|
+
{
|
|
312
|
+
return ValueBuilder<0>();
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
private:
|
|
316
|
+
DECLARE_SERIALIZATION_SUPPORT();
|
|
317
|
+
|
|
318
|
+
Value()
|
|
319
|
+
{
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
String m_text;
|
|
323
|
+
Maybe<protocol::CSS::SourceRange> m_range;
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
class SelectorList : public ::v8_crdtp::ProtocolObject<SelectorList> {
|
|
328
|
+
public:
|
|
329
|
+
~SelectorList() override { }
|
|
330
|
+
|
|
331
|
+
protocol::Array<protocol::CSS::Value>* getSelectors() { return m_selectors.get(); }
|
|
332
|
+
void setSelectors(std::unique_ptr<protocol::Array<protocol::CSS::Value>> value) { m_selectors = std::move(value); }
|
|
333
|
+
|
|
334
|
+
String getText() { return m_text; }
|
|
335
|
+
void setText(const String& value) { m_text = value; }
|
|
336
|
+
|
|
337
|
+
template<int STATE>
|
|
338
|
+
class SelectorListBuilder {
|
|
339
|
+
public:
|
|
340
|
+
enum {
|
|
341
|
+
NoFieldsSet = 0,
|
|
342
|
+
SelectorsSet = 1 << 1,
|
|
343
|
+
TextSet = 1 << 2,
|
|
344
|
+
AllFieldsSet = (SelectorsSet | TextSet | 0)};
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
SelectorListBuilder<STATE | SelectorsSet>& setSelectors(std::unique_ptr<protocol::Array<protocol::CSS::Value>> value)
|
|
348
|
+
{
|
|
349
|
+
static_assert(!(STATE & SelectorsSet), "property selectors should not be set yet");
|
|
350
|
+
m_result->setSelectors(std::move(value));
|
|
351
|
+
return castState<SelectorsSet>();
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
SelectorListBuilder<STATE | TextSet>& setText(const String& value)
|
|
355
|
+
{
|
|
356
|
+
static_assert(!(STATE & TextSet), "property text should not be set yet");
|
|
357
|
+
m_result->setText(value);
|
|
358
|
+
return castState<TextSet>();
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
std::unique_ptr<SelectorList> build()
|
|
362
|
+
{
|
|
363
|
+
static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
|
|
364
|
+
return std::move(m_result);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
private:
|
|
368
|
+
friend class SelectorList;
|
|
369
|
+
SelectorListBuilder() : m_result(new SelectorList()) { }
|
|
370
|
+
|
|
371
|
+
template<int STEP> SelectorListBuilder<STATE | STEP>& castState()
|
|
372
|
+
{
|
|
373
|
+
return *reinterpret_cast<SelectorListBuilder<STATE | STEP>*>(this);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
std::unique_ptr<protocol::CSS::SelectorList> m_result;
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
static SelectorListBuilder<0> create()
|
|
380
|
+
{
|
|
381
|
+
return SelectorListBuilder<0>();
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
private:
|
|
385
|
+
DECLARE_SERIALIZATION_SUPPORT();
|
|
386
|
+
|
|
387
|
+
SelectorList()
|
|
388
|
+
{
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
std::unique_ptr<protocol::Array<protocol::CSS::Value>> m_selectors;
|
|
392
|
+
String m_text;
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
class CSSStyleSheetHeader : public ::v8_crdtp::ProtocolObject<CSSStyleSheetHeader> {
|
|
397
|
+
public:
|
|
398
|
+
~CSSStyleSheetHeader() override { }
|
|
399
|
+
|
|
400
|
+
String getStyleSheetId() { return m_styleSheetId; }
|
|
401
|
+
void setStyleSheetId(const String& value) { m_styleSheetId = value; }
|
|
402
|
+
|
|
403
|
+
String getFrameId() { return m_frameId; }
|
|
404
|
+
void setFrameId(const String& value) { m_frameId = value; }
|
|
405
|
+
|
|
406
|
+
String getSourceURL() { return m_sourceURL; }
|
|
407
|
+
void setSourceURL(const String& value) { m_sourceURL = value; }
|
|
408
|
+
|
|
409
|
+
bool hasSourceMapURL() { return m_sourceMapURL.isJust(); }
|
|
410
|
+
String getSourceMapURL(const String& defaultValue) { return m_sourceMapURL.isJust() ? m_sourceMapURL.fromJust() : defaultValue; }
|
|
411
|
+
void setSourceMapURL(const String& value) { m_sourceMapURL = value; }
|
|
412
|
+
|
|
413
|
+
String getOrigin() { return m_origin; }
|
|
414
|
+
void setOrigin(const String& value) { m_origin = value; }
|
|
415
|
+
|
|
416
|
+
String getTitle() { return m_title; }
|
|
417
|
+
void setTitle(const String& value) { m_title = value; }
|
|
418
|
+
|
|
419
|
+
bool hasOwnerNode() { return m_ownerNode.isJust(); }
|
|
420
|
+
int getOwnerNode(int defaultValue) { return m_ownerNode.isJust() ? m_ownerNode.fromJust() : defaultValue; }
|
|
421
|
+
void setOwnerNode(int value) { m_ownerNode = value; }
|
|
422
|
+
|
|
423
|
+
bool getDisabled() { return m_disabled; }
|
|
424
|
+
void setDisabled(bool value) { m_disabled = value; }
|
|
425
|
+
|
|
426
|
+
bool hasHasSourceURL() { return m_hasSourceURL.isJust(); }
|
|
427
|
+
bool getHasSourceURL(bool defaultValue) { return m_hasSourceURL.isJust() ? m_hasSourceURL.fromJust() : defaultValue; }
|
|
428
|
+
void setHasSourceURL(bool value) { m_hasSourceURL = value; }
|
|
429
|
+
|
|
430
|
+
bool getIsInline() { return m_isInline; }
|
|
431
|
+
void setIsInline(bool value) { m_isInline = value; }
|
|
432
|
+
|
|
433
|
+
double getStartLine() { return m_startLine; }
|
|
434
|
+
void setStartLine(double value) { m_startLine = value; }
|
|
435
|
+
|
|
436
|
+
double getStartColumn() { return m_startColumn; }
|
|
437
|
+
void setStartColumn(double value) { m_startColumn = value; }
|
|
438
|
+
|
|
439
|
+
double getLength() { return m_length; }
|
|
440
|
+
void setLength(double value) { m_length = value; }
|
|
441
|
+
|
|
442
|
+
double getEndLine() { return m_endLine; }
|
|
443
|
+
void setEndLine(double value) { m_endLine = value; }
|
|
444
|
+
|
|
445
|
+
double getEndColumn() { return m_endColumn; }
|
|
446
|
+
void setEndColumn(double value) { m_endColumn = value; }
|
|
447
|
+
|
|
448
|
+
template<int STATE>
|
|
449
|
+
class CSSStyleSheetHeaderBuilder {
|
|
450
|
+
public:
|
|
451
|
+
enum {
|
|
452
|
+
NoFieldsSet = 0,
|
|
453
|
+
StyleSheetIdSet = 1 << 1,
|
|
454
|
+
FrameIdSet = 1 << 2,
|
|
455
|
+
SourceURLSet = 1 << 3,
|
|
456
|
+
OriginSet = 1 << 4,
|
|
457
|
+
TitleSet = 1 << 5,
|
|
458
|
+
DisabledSet = 1 << 6,
|
|
459
|
+
IsInlineSet = 1 << 7,
|
|
460
|
+
StartLineSet = 1 << 8,
|
|
461
|
+
StartColumnSet = 1 << 9,
|
|
462
|
+
LengthSet = 1 << 10,
|
|
463
|
+
EndLineSet = 1 << 11,
|
|
464
|
+
EndColumnSet = 1 << 12,
|
|
465
|
+
AllFieldsSet = (StyleSheetIdSet | FrameIdSet | SourceURLSet | OriginSet | TitleSet | DisabledSet | IsInlineSet | StartLineSet | StartColumnSet | LengthSet | EndLineSet | EndColumnSet | 0)};
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
CSSStyleSheetHeaderBuilder<STATE | StyleSheetIdSet>& setStyleSheetId(const String& value)
|
|
469
|
+
{
|
|
470
|
+
static_assert(!(STATE & StyleSheetIdSet), "property styleSheetId should not be set yet");
|
|
471
|
+
m_result->setStyleSheetId(value);
|
|
472
|
+
return castState<StyleSheetIdSet>();
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
CSSStyleSheetHeaderBuilder<STATE | FrameIdSet>& setFrameId(const String& value)
|
|
476
|
+
{
|
|
477
|
+
static_assert(!(STATE & FrameIdSet), "property frameId should not be set yet");
|
|
478
|
+
m_result->setFrameId(value);
|
|
479
|
+
return castState<FrameIdSet>();
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
CSSStyleSheetHeaderBuilder<STATE | SourceURLSet>& setSourceURL(const String& value)
|
|
483
|
+
{
|
|
484
|
+
static_assert(!(STATE & SourceURLSet), "property sourceURL should not be set yet");
|
|
485
|
+
m_result->setSourceURL(value);
|
|
486
|
+
return castState<SourceURLSet>();
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
CSSStyleSheetHeaderBuilder<STATE>& setSourceMapURL(const String& value)
|
|
490
|
+
{
|
|
491
|
+
m_result->setSourceMapURL(value);
|
|
492
|
+
return *this;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
CSSStyleSheetHeaderBuilder<STATE | OriginSet>& setOrigin(const String& value)
|
|
496
|
+
{
|
|
497
|
+
static_assert(!(STATE & OriginSet), "property origin should not be set yet");
|
|
498
|
+
m_result->setOrigin(value);
|
|
499
|
+
return castState<OriginSet>();
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
CSSStyleSheetHeaderBuilder<STATE | TitleSet>& setTitle(const String& value)
|
|
503
|
+
{
|
|
504
|
+
static_assert(!(STATE & TitleSet), "property title should not be set yet");
|
|
505
|
+
m_result->setTitle(value);
|
|
506
|
+
return castState<TitleSet>();
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
CSSStyleSheetHeaderBuilder<STATE>& setOwnerNode(int value)
|
|
510
|
+
{
|
|
511
|
+
m_result->setOwnerNode(value);
|
|
512
|
+
return *this;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
CSSStyleSheetHeaderBuilder<STATE | DisabledSet>& setDisabled(bool value)
|
|
516
|
+
{
|
|
517
|
+
static_assert(!(STATE & DisabledSet), "property disabled should not be set yet");
|
|
518
|
+
m_result->setDisabled(value);
|
|
519
|
+
return castState<DisabledSet>();
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
CSSStyleSheetHeaderBuilder<STATE>& setHasSourceURL(bool value)
|
|
523
|
+
{
|
|
524
|
+
m_result->setHasSourceURL(value);
|
|
525
|
+
return *this;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
CSSStyleSheetHeaderBuilder<STATE | IsInlineSet>& setIsInline(bool value)
|
|
529
|
+
{
|
|
530
|
+
static_assert(!(STATE & IsInlineSet), "property isInline should not be set yet");
|
|
531
|
+
m_result->setIsInline(value);
|
|
532
|
+
return castState<IsInlineSet>();
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
CSSStyleSheetHeaderBuilder<STATE | StartLineSet>& setStartLine(double value)
|
|
536
|
+
{
|
|
537
|
+
static_assert(!(STATE & StartLineSet), "property startLine should not be set yet");
|
|
538
|
+
m_result->setStartLine(value);
|
|
539
|
+
return castState<StartLineSet>();
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
CSSStyleSheetHeaderBuilder<STATE | StartColumnSet>& setStartColumn(double value)
|
|
543
|
+
{
|
|
544
|
+
static_assert(!(STATE & StartColumnSet), "property startColumn should not be set yet");
|
|
545
|
+
m_result->setStartColumn(value);
|
|
546
|
+
return castState<StartColumnSet>();
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
CSSStyleSheetHeaderBuilder<STATE | LengthSet>& setLength(double value)
|
|
550
|
+
{
|
|
551
|
+
static_assert(!(STATE & LengthSet), "property length should not be set yet");
|
|
552
|
+
m_result->setLength(value);
|
|
553
|
+
return castState<LengthSet>();
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
CSSStyleSheetHeaderBuilder<STATE | EndLineSet>& setEndLine(double value)
|
|
557
|
+
{
|
|
558
|
+
static_assert(!(STATE & EndLineSet), "property endLine should not be set yet");
|
|
559
|
+
m_result->setEndLine(value);
|
|
560
|
+
return castState<EndLineSet>();
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
CSSStyleSheetHeaderBuilder<STATE | EndColumnSet>& setEndColumn(double value)
|
|
564
|
+
{
|
|
565
|
+
static_assert(!(STATE & EndColumnSet), "property endColumn should not be set yet");
|
|
566
|
+
m_result->setEndColumn(value);
|
|
567
|
+
return castState<EndColumnSet>();
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
std::unique_ptr<CSSStyleSheetHeader> build()
|
|
571
|
+
{
|
|
572
|
+
static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
|
|
573
|
+
return std::move(m_result);
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
private:
|
|
577
|
+
friend class CSSStyleSheetHeader;
|
|
578
|
+
CSSStyleSheetHeaderBuilder() : m_result(new CSSStyleSheetHeader()) { }
|
|
579
|
+
|
|
580
|
+
template<int STEP> CSSStyleSheetHeaderBuilder<STATE | STEP>& castState()
|
|
581
|
+
{
|
|
582
|
+
return *reinterpret_cast<CSSStyleSheetHeaderBuilder<STATE | STEP>*>(this);
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
std::unique_ptr<protocol::CSS::CSSStyleSheetHeader> m_result;
|
|
586
|
+
};
|
|
587
|
+
|
|
588
|
+
static CSSStyleSheetHeaderBuilder<0> create()
|
|
589
|
+
{
|
|
590
|
+
return CSSStyleSheetHeaderBuilder<0>();
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
private:
|
|
594
|
+
DECLARE_SERIALIZATION_SUPPORT();
|
|
595
|
+
|
|
596
|
+
CSSStyleSheetHeader()
|
|
597
|
+
{
|
|
598
|
+
m_disabled = false;
|
|
599
|
+
m_isInline = false;
|
|
600
|
+
m_startLine = 0;
|
|
601
|
+
m_startColumn = 0;
|
|
602
|
+
m_length = 0;
|
|
603
|
+
m_endLine = 0;
|
|
604
|
+
m_endColumn = 0;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
String m_styleSheetId;
|
|
608
|
+
String m_frameId;
|
|
609
|
+
String m_sourceURL;
|
|
610
|
+
Maybe<String> m_sourceMapURL;
|
|
611
|
+
String m_origin;
|
|
612
|
+
String m_title;
|
|
613
|
+
Maybe<int> m_ownerNode;
|
|
614
|
+
bool m_disabled;
|
|
615
|
+
Maybe<bool> m_hasSourceURL;
|
|
616
|
+
bool m_isInline;
|
|
617
|
+
double m_startLine;
|
|
618
|
+
double m_startColumn;
|
|
619
|
+
double m_length;
|
|
620
|
+
double m_endLine;
|
|
621
|
+
double m_endColumn;
|
|
622
|
+
};
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
class CSSRule : public ::v8_crdtp::ProtocolObject<CSSRule> {
|
|
626
|
+
public:
|
|
627
|
+
~CSSRule() override { }
|
|
628
|
+
|
|
629
|
+
bool hasStyleSheetId() { return m_styleSheetId.isJust(); }
|
|
630
|
+
String getStyleSheetId(const String& defaultValue) { return m_styleSheetId.isJust() ? m_styleSheetId.fromJust() : defaultValue; }
|
|
631
|
+
void setStyleSheetId(const String& value) { m_styleSheetId = value; }
|
|
632
|
+
|
|
633
|
+
protocol::CSS::SelectorList* getSelectorList() { return m_selectorList.get(); }
|
|
634
|
+
void setSelectorList(std::unique_ptr<protocol::CSS::SelectorList> value) { m_selectorList = std::move(value); }
|
|
635
|
+
|
|
636
|
+
String getOrigin() { return m_origin; }
|
|
637
|
+
void setOrigin(const String& value) { m_origin = value; }
|
|
638
|
+
|
|
639
|
+
protocol::CSS::CSSStyle* getStyle() { return m_style.get(); }
|
|
640
|
+
void setStyle(std::unique_ptr<protocol::CSS::CSSStyle> value) { m_style = std::move(value); }
|
|
641
|
+
|
|
642
|
+
bool hasMedia() { return m_media.isJust(); }
|
|
643
|
+
protocol::Array<protocol::CSS::CSSMedia>* getMedia(protocol::Array<protocol::CSS::CSSMedia>* defaultValue) { return m_media.isJust() ? m_media.fromJust() : defaultValue; }
|
|
644
|
+
void setMedia(std::unique_ptr<protocol::Array<protocol::CSS::CSSMedia>> value) { m_media = std::move(value); }
|
|
645
|
+
|
|
646
|
+
template<int STATE>
|
|
647
|
+
class CSSRuleBuilder {
|
|
648
|
+
public:
|
|
649
|
+
enum {
|
|
650
|
+
NoFieldsSet = 0,
|
|
651
|
+
SelectorListSet = 1 << 1,
|
|
652
|
+
OriginSet = 1 << 2,
|
|
653
|
+
StyleSet = 1 << 3,
|
|
654
|
+
AllFieldsSet = (SelectorListSet | OriginSet | StyleSet | 0)};
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
CSSRuleBuilder<STATE>& setStyleSheetId(const String& value)
|
|
658
|
+
{
|
|
659
|
+
m_result->setStyleSheetId(value);
|
|
660
|
+
return *this;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
CSSRuleBuilder<STATE | SelectorListSet>& setSelectorList(std::unique_ptr<protocol::CSS::SelectorList> value)
|
|
664
|
+
{
|
|
665
|
+
static_assert(!(STATE & SelectorListSet), "property selectorList should not be set yet");
|
|
666
|
+
m_result->setSelectorList(std::move(value));
|
|
667
|
+
return castState<SelectorListSet>();
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
CSSRuleBuilder<STATE | OriginSet>& setOrigin(const String& value)
|
|
671
|
+
{
|
|
672
|
+
static_assert(!(STATE & OriginSet), "property origin should not be set yet");
|
|
673
|
+
m_result->setOrigin(value);
|
|
674
|
+
return castState<OriginSet>();
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
CSSRuleBuilder<STATE | StyleSet>& setStyle(std::unique_ptr<protocol::CSS::CSSStyle> value)
|
|
678
|
+
{
|
|
679
|
+
static_assert(!(STATE & StyleSet), "property style should not be set yet");
|
|
680
|
+
m_result->setStyle(std::move(value));
|
|
681
|
+
return castState<StyleSet>();
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
CSSRuleBuilder<STATE>& setMedia(std::unique_ptr<protocol::Array<protocol::CSS::CSSMedia>> value)
|
|
685
|
+
{
|
|
686
|
+
m_result->setMedia(std::move(value));
|
|
687
|
+
return *this;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
std::unique_ptr<CSSRule> build()
|
|
691
|
+
{
|
|
692
|
+
static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
|
|
693
|
+
return std::move(m_result);
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
private:
|
|
697
|
+
friend class CSSRule;
|
|
698
|
+
CSSRuleBuilder() : m_result(new CSSRule()) { }
|
|
699
|
+
|
|
700
|
+
template<int STEP> CSSRuleBuilder<STATE | STEP>& castState()
|
|
701
|
+
{
|
|
702
|
+
return *reinterpret_cast<CSSRuleBuilder<STATE | STEP>*>(this);
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
std::unique_ptr<protocol::CSS::CSSRule> m_result;
|
|
706
|
+
};
|
|
707
|
+
|
|
708
|
+
static CSSRuleBuilder<0> create()
|
|
709
|
+
{
|
|
710
|
+
return CSSRuleBuilder<0>();
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
private:
|
|
714
|
+
DECLARE_SERIALIZATION_SUPPORT();
|
|
715
|
+
|
|
716
|
+
CSSRule()
|
|
717
|
+
{
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
Maybe<String> m_styleSheetId;
|
|
721
|
+
std::unique_ptr<protocol::CSS::SelectorList> m_selectorList;
|
|
722
|
+
String m_origin;
|
|
723
|
+
std::unique_ptr<protocol::CSS::CSSStyle> m_style;
|
|
724
|
+
Maybe<protocol::Array<protocol::CSS::CSSMedia>> m_media;
|
|
725
|
+
};
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
class RuleUsage : public ::v8_crdtp::ProtocolObject<RuleUsage> {
|
|
729
|
+
public:
|
|
730
|
+
~RuleUsage() override { }
|
|
731
|
+
|
|
732
|
+
String getStyleSheetId() { return m_styleSheetId; }
|
|
733
|
+
void setStyleSheetId(const String& value) { m_styleSheetId = value; }
|
|
734
|
+
|
|
735
|
+
double getStartOffset() { return m_startOffset; }
|
|
736
|
+
void setStartOffset(double value) { m_startOffset = value; }
|
|
737
|
+
|
|
738
|
+
double getEndOffset() { return m_endOffset; }
|
|
739
|
+
void setEndOffset(double value) { m_endOffset = value; }
|
|
740
|
+
|
|
741
|
+
bool getUsed() { return m_used; }
|
|
742
|
+
void setUsed(bool value) { m_used = value; }
|
|
743
|
+
|
|
744
|
+
template<int STATE>
|
|
745
|
+
class RuleUsageBuilder {
|
|
746
|
+
public:
|
|
747
|
+
enum {
|
|
748
|
+
NoFieldsSet = 0,
|
|
749
|
+
StyleSheetIdSet = 1 << 1,
|
|
750
|
+
StartOffsetSet = 1 << 2,
|
|
751
|
+
EndOffsetSet = 1 << 3,
|
|
752
|
+
UsedSet = 1 << 4,
|
|
753
|
+
AllFieldsSet = (StyleSheetIdSet | StartOffsetSet | EndOffsetSet | UsedSet | 0)};
|
|
754
|
+
|
|
755
|
+
|
|
756
|
+
RuleUsageBuilder<STATE | StyleSheetIdSet>& setStyleSheetId(const String& value)
|
|
757
|
+
{
|
|
758
|
+
static_assert(!(STATE & StyleSheetIdSet), "property styleSheetId should not be set yet");
|
|
759
|
+
m_result->setStyleSheetId(value);
|
|
760
|
+
return castState<StyleSheetIdSet>();
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
RuleUsageBuilder<STATE | StartOffsetSet>& setStartOffset(double value)
|
|
764
|
+
{
|
|
765
|
+
static_assert(!(STATE & StartOffsetSet), "property startOffset should not be set yet");
|
|
766
|
+
m_result->setStartOffset(value);
|
|
767
|
+
return castState<StartOffsetSet>();
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
RuleUsageBuilder<STATE | EndOffsetSet>& setEndOffset(double value)
|
|
771
|
+
{
|
|
772
|
+
static_assert(!(STATE & EndOffsetSet), "property endOffset should not be set yet");
|
|
773
|
+
m_result->setEndOffset(value);
|
|
774
|
+
return castState<EndOffsetSet>();
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
RuleUsageBuilder<STATE | UsedSet>& setUsed(bool value)
|
|
778
|
+
{
|
|
779
|
+
static_assert(!(STATE & UsedSet), "property used should not be set yet");
|
|
780
|
+
m_result->setUsed(value);
|
|
781
|
+
return castState<UsedSet>();
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
std::unique_ptr<RuleUsage> build()
|
|
785
|
+
{
|
|
786
|
+
static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
|
|
787
|
+
return std::move(m_result);
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
private:
|
|
791
|
+
friend class RuleUsage;
|
|
792
|
+
RuleUsageBuilder() : m_result(new RuleUsage()) { }
|
|
793
|
+
|
|
794
|
+
template<int STEP> RuleUsageBuilder<STATE | STEP>& castState()
|
|
795
|
+
{
|
|
796
|
+
return *reinterpret_cast<RuleUsageBuilder<STATE | STEP>*>(this);
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
std::unique_ptr<protocol::CSS::RuleUsage> m_result;
|
|
800
|
+
};
|
|
801
|
+
|
|
802
|
+
static RuleUsageBuilder<0> create()
|
|
803
|
+
{
|
|
804
|
+
return RuleUsageBuilder<0>();
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
private:
|
|
808
|
+
DECLARE_SERIALIZATION_SUPPORT();
|
|
809
|
+
|
|
810
|
+
RuleUsage()
|
|
811
|
+
{
|
|
812
|
+
m_startOffset = 0;
|
|
813
|
+
m_endOffset = 0;
|
|
814
|
+
m_used = false;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
String m_styleSheetId;
|
|
818
|
+
double m_startOffset;
|
|
819
|
+
double m_endOffset;
|
|
820
|
+
bool m_used;
|
|
821
|
+
};
|
|
822
|
+
|
|
823
|
+
|
|
824
|
+
class SourceRange : public ::v8_crdtp::ProtocolObject<SourceRange> {
|
|
825
|
+
public:
|
|
826
|
+
~SourceRange() override { }
|
|
827
|
+
|
|
828
|
+
int getStartLine() { return m_startLine; }
|
|
829
|
+
void setStartLine(int value) { m_startLine = value; }
|
|
830
|
+
|
|
831
|
+
int getStartColumn() { return m_startColumn; }
|
|
832
|
+
void setStartColumn(int value) { m_startColumn = value; }
|
|
833
|
+
|
|
834
|
+
int getEndLine() { return m_endLine; }
|
|
835
|
+
void setEndLine(int value) { m_endLine = value; }
|
|
836
|
+
|
|
837
|
+
int getEndColumn() { return m_endColumn; }
|
|
838
|
+
void setEndColumn(int value) { m_endColumn = value; }
|
|
839
|
+
|
|
840
|
+
template<int STATE>
|
|
841
|
+
class SourceRangeBuilder {
|
|
842
|
+
public:
|
|
843
|
+
enum {
|
|
844
|
+
NoFieldsSet = 0,
|
|
845
|
+
StartLineSet = 1 << 1,
|
|
846
|
+
StartColumnSet = 1 << 2,
|
|
847
|
+
EndLineSet = 1 << 3,
|
|
848
|
+
EndColumnSet = 1 << 4,
|
|
849
|
+
AllFieldsSet = (StartLineSet | StartColumnSet | EndLineSet | EndColumnSet | 0)};
|
|
850
|
+
|
|
851
|
+
|
|
852
|
+
SourceRangeBuilder<STATE | StartLineSet>& setStartLine(int value)
|
|
853
|
+
{
|
|
854
|
+
static_assert(!(STATE & StartLineSet), "property startLine should not be set yet");
|
|
855
|
+
m_result->setStartLine(value);
|
|
856
|
+
return castState<StartLineSet>();
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
SourceRangeBuilder<STATE | StartColumnSet>& setStartColumn(int value)
|
|
860
|
+
{
|
|
861
|
+
static_assert(!(STATE & StartColumnSet), "property startColumn should not be set yet");
|
|
862
|
+
m_result->setStartColumn(value);
|
|
863
|
+
return castState<StartColumnSet>();
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
SourceRangeBuilder<STATE | EndLineSet>& setEndLine(int value)
|
|
867
|
+
{
|
|
868
|
+
static_assert(!(STATE & EndLineSet), "property endLine should not be set yet");
|
|
869
|
+
m_result->setEndLine(value);
|
|
870
|
+
return castState<EndLineSet>();
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
SourceRangeBuilder<STATE | EndColumnSet>& setEndColumn(int value)
|
|
874
|
+
{
|
|
875
|
+
static_assert(!(STATE & EndColumnSet), "property endColumn should not be set yet");
|
|
876
|
+
m_result->setEndColumn(value);
|
|
877
|
+
return castState<EndColumnSet>();
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
std::unique_ptr<SourceRange> build()
|
|
881
|
+
{
|
|
882
|
+
static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
|
|
883
|
+
return std::move(m_result);
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
private:
|
|
887
|
+
friend class SourceRange;
|
|
888
|
+
SourceRangeBuilder() : m_result(new SourceRange()) { }
|
|
889
|
+
|
|
890
|
+
template<int STEP> SourceRangeBuilder<STATE | STEP>& castState()
|
|
891
|
+
{
|
|
892
|
+
return *reinterpret_cast<SourceRangeBuilder<STATE | STEP>*>(this);
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
std::unique_ptr<protocol::CSS::SourceRange> m_result;
|
|
896
|
+
};
|
|
897
|
+
|
|
898
|
+
static SourceRangeBuilder<0> create()
|
|
899
|
+
{
|
|
900
|
+
return SourceRangeBuilder<0>();
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
private:
|
|
904
|
+
DECLARE_SERIALIZATION_SUPPORT();
|
|
905
|
+
|
|
906
|
+
SourceRange()
|
|
907
|
+
{
|
|
908
|
+
m_startLine = 0;
|
|
909
|
+
m_startColumn = 0;
|
|
910
|
+
m_endLine = 0;
|
|
911
|
+
m_endColumn = 0;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
int m_startLine;
|
|
915
|
+
int m_startColumn;
|
|
916
|
+
int m_endLine;
|
|
917
|
+
int m_endColumn;
|
|
918
|
+
};
|
|
919
|
+
|
|
920
|
+
|
|
921
|
+
class ShorthandEntry : public ::v8_crdtp::ProtocolObject<ShorthandEntry> {
|
|
922
|
+
public:
|
|
923
|
+
~ShorthandEntry() override { }
|
|
924
|
+
|
|
925
|
+
String getName() { return m_name; }
|
|
926
|
+
void setName(const String& value) { m_name = value; }
|
|
927
|
+
|
|
928
|
+
String getValue() { return m_value; }
|
|
929
|
+
void setValue(const String& value) { m_value = value; }
|
|
930
|
+
|
|
931
|
+
bool hasImportant() { return m_important.isJust(); }
|
|
932
|
+
bool getImportant(bool defaultValue) { return m_important.isJust() ? m_important.fromJust() : defaultValue; }
|
|
933
|
+
void setImportant(bool value) { m_important = value; }
|
|
934
|
+
|
|
935
|
+
template<int STATE>
|
|
936
|
+
class ShorthandEntryBuilder {
|
|
937
|
+
public:
|
|
938
|
+
enum {
|
|
939
|
+
NoFieldsSet = 0,
|
|
940
|
+
NameSet = 1 << 1,
|
|
941
|
+
ValueSet = 1 << 2,
|
|
942
|
+
AllFieldsSet = (NameSet | ValueSet | 0)};
|
|
943
|
+
|
|
944
|
+
|
|
945
|
+
ShorthandEntryBuilder<STATE | NameSet>& setName(const String& value)
|
|
946
|
+
{
|
|
947
|
+
static_assert(!(STATE & NameSet), "property name should not be set yet");
|
|
948
|
+
m_result->setName(value);
|
|
949
|
+
return castState<NameSet>();
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
ShorthandEntryBuilder<STATE | ValueSet>& setValue(const String& value)
|
|
953
|
+
{
|
|
954
|
+
static_assert(!(STATE & ValueSet), "property value should not be set yet");
|
|
955
|
+
m_result->setValue(value);
|
|
956
|
+
return castState<ValueSet>();
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
ShorthandEntryBuilder<STATE>& setImportant(bool value)
|
|
960
|
+
{
|
|
961
|
+
m_result->setImportant(value);
|
|
962
|
+
return *this;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
std::unique_ptr<ShorthandEntry> build()
|
|
966
|
+
{
|
|
967
|
+
static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
|
|
968
|
+
return std::move(m_result);
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
private:
|
|
972
|
+
friend class ShorthandEntry;
|
|
973
|
+
ShorthandEntryBuilder() : m_result(new ShorthandEntry()) { }
|
|
974
|
+
|
|
975
|
+
template<int STEP> ShorthandEntryBuilder<STATE | STEP>& castState()
|
|
976
|
+
{
|
|
977
|
+
return *reinterpret_cast<ShorthandEntryBuilder<STATE | STEP>*>(this);
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
std::unique_ptr<protocol::CSS::ShorthandEntry> m_result;
|
|
981
|
+
};
|
|
982
|
+
|
|
983
|
+
static ShorthandEntryBuilder<0> create()
|
|
984
|
+
{
|
|
985
|
+
return ShorthandEntryBuilder<0>();
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
private:
|
|
989
|
+
DECLARE_SERIALIZATION_SUPPORT();
|
|
990
|
+
|
|
991
|
+
ShorthandEntry()
|
|
992
|
+
{
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
String m_name;
|
|
996
|
+
String m_value;
|
|
997
|
+
Maybe<bool> m_important;
|
|
998
|
+
};
|
|
999
|
+
|
|
1000
|
+
|
|
1001
|
+
class CSSComputedStyleProperty : public ::v8_crdtp::ProtocolObject<CSSComputedStyleProperty> {
|
|
1002
|
+
public:
|
|
1003
|
+
~CSSComputedStyleProperty() override { }
|
|
1004
|
+
|
|
1005
|
+
String getName() { return m_name; }
|
|
1006
|
+
void setName(const String& value) { m_name = value; }
|
|
1007
|
+
|
|
1008
|
+
String getValue() { return m_value; }
|
|
1009
|
+
void setValue(const String& value) { m_value = value; }
|
|
1010
|
+
|
|
1011
|
+
template<int STATE>
|
|
1012
|
+
class CSSComputedStylePropertyBuilder {
|
|
1013
|
+
public:
|
|
1014
|
+
enum {
|
|
1015
|
+
NoFieldsSet = 0,
|
|
1016
|
+
NameSet = 1 << 1,
|
|
1017
|
+
ValueSet = 1 << 2,
|
|
1018
|
+
AllFieldsSet = (NameSet | ValueSet | 0)};
|
|
1019
|
+
|
|
1020
|
+
|
|
1021
|
+
CSSComputedStylePropertyBuilder<STATE | NameSet>& setName(const String& value)
|
|
1022
|
+
{
|
|
1023
|
+
static_assert(!(STATE & NameSet), "property name should not be set yet");
|
|
1024
|
+
m_result->setName(value);
|
|
1025
|
+
return castState<NameSet>();
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
CSSComputedStylePropertyBuilder<STATE | ValueSet>& setValue(const String& value)
|
|
1029
|
+
{
|
|
1030
|
+
static_assert(!(STATE & ValueSet), "property value should not be set yet");
|
|
1031
|
+
m_result->setValue(value);
|
|
1032
|
+
return castState<ValueSet>();
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
std::unique_ptr<CSSComputedStyleProperty> build()
|
|
1036
|
+
{
|
|
1037
|
+
static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
|
|
1038
|
+
return std::move(m_result);
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
private:
|
|
1042
|
+
friend class CSSComputedStyleProperty;
|
|
1043
|
+
CSSComputedStylePropertyBuilder() : m_result(new CSSComputedStyleProperty()) { }
|
|
1044
|
+
|
|
1045
|
+
template<int STEP> CSSComputedStylePropertyBuilder<STATE | STEP>& castState()
|
|
1046
|
+
{
|
|
1047
|
+
return *reinterpret_cast<CSSComputedStylePropertyBuilder<STATE | STEP>*>(this);
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
std::unique_ptr<protocol::CSS::CSSComputedStyleProperty> m_result;
|
|
1051
|
+
};
|
|
1052
|
+
|
|
1053
|
+
static CSSComputedStylePropertyBuilder<0> create()
|
|
1054
|
+
{
|
|
1055
|
+
return CSSComputedStylePropertyBuilder<0>();
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
private:
|
|
1059
|
+
DECLARE_SERIALIZATION_SUPPORT();
|
|
1060
|
+
|
|
1061
|
+
CSSComputedStyleProperty()
|
|
1062
|
+
{
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
String m_name;
|
|
1066
|
+
String m_value;
|
|
1067
|
+
};
|
|
1068
|
+
|
|
1069
|
+
|
|
1070
|
+
class CSSStyle : public ::v8_crdtp::ProtocolObject<CSSStyle> {
|
|
1071
|
+
public:
|
|
1072
|
+
~CSSStyle() override { }
|
|
1073
|
+
|
|
1074
|
+
bool hasStyleSheetId() { return m_styleSheetId.isJust(); }
|
|
1075
|
+
String getStyleSheetId(const String& defaultValue) { return m_styleSheetId.isJust() ? m_styleSheetId.fromJust() : defaultValue; }
|
|
1076
|
+
void setStyleSheetId(const String& value) { m_styleSheetId = value; }
|
|
1077
|
+
|
|
1078
|
+
protocol::Array<protocol::CSS::CSSProperty>* getCssProperties() { return m_cssProperties.get(); }
|
|
1079
|
+
void setCssProperties(std::unique_ptr<protocol::Array<protocol::CSS::CSSProperty>> value) { m_cssProperties = std::move(value); }
|
|
1080
|
+
|
|
1081
|
+
protocol::Array<protocol::CSS::ShorthandEntry>* getShorthandEntries() { return m_shorthandEntries.get(); }
|
|
1082
|
+
void setShorthandEntries(std::unique_ptr<protocol::Array<protocol::CSS::ShorthandEntry>> value) { m_shorthandEntries = std::move(value); }
|
|
1083
|
+
|
|
1084
|
+
bool hasCssText() { return m_cssText.isJust(); }
|
|
1085
|
+
String getCssText(const String& defaultValue) { return m_cssText.isJust() ? m_cssText.fromJust() : defaultValue; }
|
|
1086
|
+
void setCssText(const String& value) { m_cssText = value; }
|
|
1087
|
+
|
|
1088
|
+
bool hasRange() { return m_range.isJust(); }
|
|
1089
|
+
protocol::CSS::SourceRange* getRange(protocol::CSS::SourceRange* defaultValue) { return m_range.isJust() ? m_range.fromJust() : defaultValue; }
|
|
1090
|
+
void setRange(std::unique_ptr<protocol::CSS::SourceRange> value) { m_range = std::move(value); }
|
|
1091
|
+
|
|
1092
|
+
template<int STATE>
|
|
1093
|
+
class CSSStyleBuilder {
|
|
1094
|
+
public:
|
|
1095
|
+
enum {
|
|
1096
|
+
NoFieldsSet = 0,
|
|
1097
|
+
CssPropertiesSet = 1 << 1,
|
|
1098
|
+
ShorthandEntriesSet = 1 << 2,
|
|
1099
|
+
AllFieldsSet = (CssPropertiesSet | ShorthandEntriesSet | 0)};
|
|
1100
|
+
|
|
1101
|
+
|
|
1102
|
+
CSSStyleBuilder<STATE>& setStyleSheetId(const String& value)
|
|
1103
|
+
{
|
|
1104
|
+
m_result->setStyleSheetId(value);
|
|
1105
|
+
return *this;
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
CSSStyleBuilder<STATE | CssPropertiesSet>& setCssProperties(std::unique_ptr<protocol::Array<protocol::CSS::CSSProperty>> value)
|
|
1109
|
+
{
|
|
1110
|
+
static_assert(!(STATE & CssPropertiesSet), "property cssProperties should not be set yet");
|
|
1111
|
+
m_result->setCssProperties(std::move(value));
|
|
1112
|
+
return castState<CssPropertiesSet>();
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
CSSStyleBuilder<STATE | ShorthandEntriesSet>& setShorthandEntries(std::unique_ptr<protocol::Array<protocol::CSS::ShorthandEntry>> value)
|
|
1116
|
+
{
|
|
1117
|
+
static_assert(!(STATE & ShorthandEntriesSet), "property shorthandEntries should not be set yet");
|
|
1118
|
+
m_result->setShorthandEntries(std::move(value));
|
|
1119
|
+
return castState<ShorthandEntriesSet>();
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
CSSStyleBuilder<STATE>& setCssText(const String& value)
|
|
1123
|
+
{
|
|
1124
|
+
m_result->setCssText(value);
|
|
1125
|
+
return *this;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
CSSStyleBuilder<STATE>& setRange(std::unique_ptr<protocol::CSS::SourceRange> value)
|
|
1129
|
+
{
|
|
1130
|
+
m_result->setRange(std::move(value));
|
|
1131
|
+
return *this;
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
std::unique_ptr<CSSStyle> build()
|
|
1135
|
+
{
|
|
1136
|
+
static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
|
|
1137
|
+
return std::move(m_result);
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
private:
|
|
1141
|
+
friend class CSSStyle;
|
|
1142
|
+
CSSStyleBuilder() : m_result(new CSSStyle()) { }
|
|
1143
|
+
|
|
1144
|
+
template<int STEP> CSSStyleBuilder<STATE | STEP>& castState()
|
|
1145
|
+
{
|
|
1146
|
+
return *reinterpret_cast<CSSStyleBuilder<STATE | STEP>*>(this);
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
std::unique_ptr<protocol::CSS::CSSStyle> m_result;
|
|
1150
|
+
};
|
|
1151
|
+
|
|
1152
|
+
static CSSStyleBuilder<0> create()
|
|
1153
|
+
{
|
|
1154
|
+
return CSSStyleBuilder<0>();
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
private:
|
|
1158
|
+
DECLARE_SERIALIZATION_SUPPORT();
|
|
1159
|
+
|
|
1160
|
+
CSSStyle()
|
|
1161
|
+
{
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
Maybe<String> m_styleSheetId;
|
|
1165
|
+
std::unique_ptr<protocol::Array<protocol::CSS::CSSProperty>> m_cssProperties;
|
|
1166
|
+
std::unique_ptr<protocol::Array<protocol::CSS::ShorthandEntry>> m_shorthandEntries;
|
|
1167
|
+
Maybe<String> m_cssText;
|
|
1168
|
+
Maybe<protocol::CSS::SourceRange> m_range;
|
|
1169
|
+
};
|
|
1170
|
+
|
|
1171
|
+
|
|
1172
|
+
class CSSProperty : public ::v8_crdtp::ProtocolObject<CSSProperty> {
|
|
1173
|
+
public:
|
|
1174
|
+
~CSSProperty() override { }
|
|
1175
|
+
|
|
1176
|
+
String getName() { return m_name; }
|
|
1177
|
+
void setName(const String& value) { m_name = value; }
|
|
1178
|
+
|
|
1179
|
+
String getValue() { return m_value; }
|
|
1180
|
+
void setValue(const String& value) { m_value = value; }
|
|
1181
|
+
|
|
1182
|
+
bool hasImportant() { return m_important.isJust(); }
|
|
1183
|
+
bool getImportant(bool defaultValue) { return m_important.isJust() ? m_important.fromJust() : defaultValue; }
|
|
1184
|
+
void setImportant(bool value) { m_important = value; }
|
|
1185
|
+
|
|
1186
|
+
bool hasImplicit() { return m_implicit.isJust(); }
|
|
1187
|
+
bool getImplicit(bool defaultValue) { return m_implicit.isJust() ? m_implicit.fromJust() : defaultValue; }
|
|
1188
|
+
void setImplicit(bool value) { m_implicit = value; }
|
|
1189
|
+
|
|
1190
|
+
bool hasText() { return m_text.isJust(); }
|
|
1191
|
+
String getText(const String& defaultValue) { return m_text.isJust() ? m_text.fromJust() : defaultValue; }
|
|
1192
|
+
void setText(const String& value) { m_text = value; }
|
|
1193
|
+
|
|
1194
|
+
bool hasParsedOk() { return m_parsedOk.isJust(); }
|
|
1195
|
+
bool getParsedOk(bool defaultValue) { return m_parsedOk.isJust() ? m_parsedOk.fromJust() : defaultValue; }
|
|
1196
|
+
void setParsedOk(bool value) { m_parsedOk = value; }
|
|
1197
|
+
|
|
1198
|
+
bool hasDisabled() { return m_disabled.isJust(); }
|
|
1199
|
+
bool getDisabled(bool defaultValue) { return m_disabled.isJust() ? m_disabled.fromJust() : defaultValue; }
|
|
1200
|
+
void setDisabled(bool value) { m_disabled = value; }
|
|
1201
|
+
|
|
1202
|
+
bool hasRange() { return m_range.isJust(); }
|
|
1203
|
+
protocol::CSS::SourceRange* getRange(protocol::CSS::SourceRange* defaultValue) { return m_range.isJust() ? m_range.fromJust() : defaultValue; }
|
|
1204
|
+
void setRange(std::unique_ptr<protocol::CSS::SourceRange> value) { m_range = std::move(value); }
|
|
1205
|
+
|
|
1206
|
+
template<int STATE>
|
|
1207
|
+
class CSSPropertyBuilder {
|
|
1208
|
+
public:
|
|
1209
|
+
enum {
|
|
1210
|
+
NoFieldsSet = 0,
|
|
1211
|
+
NameSet = 1 << 1,
|
|
1212
|
+
ValueSet = 1 << 2,
|
|
1213
|
+
AllFieldsSet = (NameSet | ValueSet | 0)};
|
|
1214
|
+
|
|
1215
|
+
|
|
1216
|
+
CSSPropertyBuilder<STATE | NameSet>& setName(const String& value)
|
|
1217
|
+
{
|
|
1218
|
+
static_assert(!(STATE & NameSet), "property name should not be set yet");
|
|
1219
|
+
m_result->setName(value);
|
|
1220
|
+
return castState<NameSet>();
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
CSSPropertyBuilder<STATE | ValueSet>& setValue(const String& value)
|
|
1224
|
+
{
|
|
1225
|
+
static_assert(!(STATE & ValueSet), "property value should not be set yet");
|
|
1226
|
+
m_result->setValue(value);
|
|
1227
|
+
return castState<ValueSet>();
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
CSSPropertyBuilder<STATE>& setImportant(bool value)
|
|
1231
|
+
{
|
|
1232
|
+
m_result->setImportant(value);
|
|
1233
|
+
return *this;
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
CSSPropertyBuilder<STATE>& setImplicit(bool value)
|
|
1237
|
+
{
|
|
1238
|
+
m_result->setImplicit(value);
|
|
1239
|
+
return *this;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
CSSPropertyBuilder<STATE>& setText(const String& value)
|
|
1243
|
+
{
|
|
1244
|
+
m_result->setText(value);
|
|
1245
|
+
return *this;
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
CSSPropertyBuilder<STATE>& setParsedOk(bool value)
|
|
1249
|
+
{
|
|
1250
|
+
m_result->setParsedOk(value);
|
|
1251
|
+
return *this;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
CSSPropertyBuilder<STATE>& setDisabled(bool value)
|
|
1255
|
+
{
|
|
1256
|
+
m_result->setDisabled(value);
|
|
1257
|
+
return *this;
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
CSSPropertyBuilder<STATE>& setRange(std::unique_ptr<protocol::CSS::SourceRange> value)
|
|
1261
|
+
{
|
|
1262
|
+
m_result->setRange(std::move(value));
|
|
1263
|
+
return *this;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
std::unique_ptr<CSSProperty> build()
|
|
1267
|
+
{
|
|
1268
|
+
static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
|
|
1269
|
+
return std::move(m_result);
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
private:
|
|
1273
|
+
friend class CSSProperty;
|
|
1274
|
+
CSSPropertyBuilder() : m_result(new CSSProperty()) { }
|
|
1275
|
+
|
|
1276
|
+
template<int STEP> CSSPropertyBuilder<STATE | STEP>& castState()
|
|
1277
|
+
{
|
|
1278
|
+
return *reinterpret_cast<CSSPropertyBuilder<STATE | STEP>*>(this);
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
std::unique_ptr<protocol::CSS::CSSProperty> m_result;
|
|
1282
|
+
};
|
|
1283
|
+
|
|
1284
|
+
static CSSPropertyBuilder<0> create()
|
|
1285
|
+
{
|
|
1286
|
+
return CSSPropertyBuilder<0>();
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
private:
|
|
1290
|
+
DECLARE_SERIALIZATION_SUPPORT();
|
|
1291
|
+
|
|
1292
|
+
CSSProperty()
|
|
1293
|
+
{
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
String m_name;
|
|
1297
|
+
String m_value;
|
|
1298
|
+
Maybe<bool> m_important;
|
|
1299
|
+
Maybe<bool> m_implicit;
|
|
1300
|
+
Maybe<String> m_text;
|
|
1301
|
+
Maybe<bool> m_parsedOk;
|
|
1302
|
+
Maybe<bool> m_disabled;
|
|
1303
|
+
Maybe<protocol::CSS::SourceRange> m_range;
|
|
1304
|
+
};
|
|
1305
|
+
|
|
1306
|
+
|
|
1307
|
+
class CSSMedia : public ::v8_crdtp::ProtocolObject<CSSMedia> {
|
|
1308
|
+
public:
|
|
1309
|
+
~CSSMedia() override { }
|
|
1310
|
+
|
|
1311
|
+
String getText() { return m_text; }
|
|
1312
|
+
void setText(const String& value) { m_text = value; }
|
|
1313
|
+
|
|
1314
|
+
struct SourceEnum {
|
|
1315
|
+
static const char* MediaRule;
|
|
1316
|
+
static const char* ImportRule;
|
|
1317
|
+
static const char* LinkedSheet;
|
|
1318
|
+
static const char* InlineSheet;
|
|
1319
|
+
}; // SourceEnum
|
|
1320
|
+
|
|
1321
|
+
String getSource() { return m_source; }
|
|
1322
|
+
void setSource(const String& value) { m_source = value; }
|
|
1323
|
+
|
|
1324
|
+
bool hasSourceURL() { return m_sourceURL.isJust(); }
|
|
1325
|
+
String getSourceURL(const String& defaultValue) { return m_sourceURL.isJust() ? m_sourceURL.fromJust() : defaultValue; }
|
|
1326
|
+
void setSourceURL(const String& value) { m_sourceURL = value; }
|
|
1327
|
+
|
|
1328
|
+
bool hasRange() { return m_range.isJust(); }
|
|
1329
|
+
protocol::CSS::SourceRange* getRange(protocol::CSS::SourceRange* defaultValue) { return m_range.isJust() ? m_range.fromJust() : defaultValue; }
|
|
1330
|
+
void setRange(std::unique_ptr<protocol::CSS::SourceRange> value) { m_range = std::move(value); }
|
|
1331
|
+
|
|
1332
|
+
bool hasStyleSheetId() { return m_styleSheetId.isJust(); }
|
|
1333
|
+
String getStyleSheetId(const String& defaultValue) { return m_styleSheetId.isJust() ? m_styleSheetId.fromJust() : defaultValue; }
|
|
1334
|
+
void setStyleSheetId(const String& value) { m_styleSheetId = value; }
|
|
1335
|
+
|
|
1336
|
+
bool hasMediaList() { return m_mediaList.isJust(); }
|
|
1337
|
+
protocol::Array<protocol::CSS::MediaQuery>* getMediaList(protocol::Array<protocol::CSS::MediaQuery>* defaultValue) { return m_mediaList.isJust() ? m_mediaList.fromJust() : defaultValue; }
|
|
1338
|
+
void setMediaList(std::unique_ptr<protocol::Array<protocol::CSS::MediaQuery>> value) { m_mediaList = std::move(value); }
|
|
1339
|
+
|
|
1340
|
+
template<int STATE>
|
|
1341
|
+
class CSSMediaBuilder {
|
|
1342
|
+
public:
|
|
1343
|
+
enum {
|
|
1344
|
+
NoFieldsSet = 0,
|
|
1345
|
+
TextSet = 1 << 1,
|
|
1346
|
+
SourceSet = 1 << 2,
|
|
1347
|
+
AllFieldsSet = (TextSet | SourceSet | 0)};
|
|
1348
|
+
|
|
1349
|
+
|
|
1350
|
+
CSSMediaBuilder<STATE | TextSet>& setText(const String& value)
|
|
1351
|
+
{
|
|
1352
|
+
static_assert(!(STATE & TextSet), "property text should not be set yet");
|
|
1353
|
+
m_result->setText(value);
|
|
1354
|
+
return castState<TextSet>();
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
CSSMediaBuilder<STATE | SourceSet>& setSource(const String& value)
|
|
1358
|
+
{
|
|
1359
|
+
static_assert(!(STATE & SourceSet), "property source should not be set yet");
|
|
1360
|
+
m_result->setSource(value);
|
|
1361
|
+
return castState<SourceSet>();
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
CSSMediaBuilder<STATE>& setSourceURL(const String& value)
|
|
1365
|
+
{
|
|
1366
|
+
m_result->setSourceURL(value);
|
|
1367
|
+
return *this;
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
CSSMediaBuilder<STATE>& setRange(std::unique_ptr<protocol::CSS::SourceRange> value)
|
|
1371
|
+
{
|
|
1372
|
+
m_result->setRange(std::move(value));
|
|
1373
|
+
return *this;
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
CSSMediaBuilder<STATE>& setStyleSheetId(const String& value)
|
|
1377
|
+
{
|
|
1378
|
+
m_result->setStyleSheetId(value);
|
|
1379
|
+
return *this;
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
CSSMediaBuilder<STATE>& setMediaList(std::unique_ptr<protocol::Array<protocol::CSS::MediaQuery>> value)
|
|
1383
|
+
{
|
|
1384
|
+
m_result->setMediaList(std::move(value));
|
|
1385
|
+
return *this;
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
std::unique_ptr<CSSMedia> build()
|
|
1389
|
+
{
|
|
1390
|
+
static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
|
|
1391
|
+
return std::move(m_result);
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
private:
|
|
1395
|
+
friend class CSSMedia;
|
|
1396
|
+
CSSMediaBuilder() : m_result(new CSSMedia()) { }
|
|
1397
|
+
|
|
1398
|
+
template<int STEP> CSSMediaBuilder<STATE | STEP>& castState()
|
|
1399
|
+
{
|
|
1400
|
+
return *reinterpret_cast<CSSMediaBuilder<STATE | STEP>*>(this);
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
std::unique_ptr<protocol::CSS::CSSMedia> m_result;
|
|
1404
|
+
};
|
|
1405
|
+
|
|
1406
|
+
static CSSMediaBuilder<0> create()
|
|
1407
|
+
{
|
|
1408
|
+
return CSSMediaBuilder<0>();
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
private:
|
|
1412
|
+
DECLARE_SERIALIZATION_SUPPORT();
|
|
1413
|
+
|
|
1414
|
+
CSSMedia()
|
|
1415
|
+
{
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
String m_text;
|
|
1419
|
+
String m_source;
|
|
1420
|
+
Maybe<String> m_sourceURL;
|
|
1421
|
+
Maybe<protocol::CSS::SourceRange> m_range;
|
|
1422
|
+
Maybe<String> m_styleSheetId;
|
|
1423
|
+
Maybe<protocol::Array<protocol::CSS::MediaQuery>> m_mediaList;
|
|
1424
|
+
};
|
|
1425
|
+
|
|
1426
|
+
|
|
1427
|
+
class MediaQuery : public ::v8_crdtp::ProtocolObject<MediaQuery> {
|
|
1428
|
+
public:
|
|
1429
|
+
~MediaQuery() override { }
|
|
1430
|
+
|
|
1431
|
+
protocol::Array<protocol::CSS::MediaQueryExpression>* getExpressions() { return m_expressions.get(); }
|
|
1432
|
+
void setExpressions(std::unique_ptr<protocol::Array<protocol::CSS::MediaQueryExpression>> value) { m_expressions = std::move(value); }
|
|
1433
|
+
|
|
1434
|
+
bool getActive() { return m_active; }
|
|
1435
|
+
void setActive(bool value) { m_active = value; }
|
|
1436
|
+
|
|
1437
|
+
template<int STATE>
|
|
1438
|
+
class MediaQueryBuilder {
|
|
1439
|
+
public:
|
|
1440
|
+
enum {
|
|
1441
|
+
NoFieldsSet = 0,
|
|
1442
|
+
ExpressionsSet = 1 << 1,
|
|
1443
|
+
ActiveSet = 1 << 2,
|
|
1444
|
+
AllFieldsSet = (ExpressionsSet | ActiveSet | 0)};
|
|
1445
|
+
|
|
1446
|
+
|
|
1447
|
+
MediaQueryBuilder<STATE | ExpressionsSet>& setExpressions(std::unique_ptr<protocol::Array<protocol::CSS::MediaQueryExpression>> value)
|
|
1448
|
+
{
|
|
1449
|
+
static_assert(!(STATE & ExpressionsSet), "property expressions should not be set yet");
|
|
1450
|
+
m_result->setExpressions(std::move(value));
|
|
1451
|
+
return castState<ExpressionsSet>();
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
MediaQueryBuilder<STATE | ActiveSet>& setActive(bool value)
|
|
1455
|
+
{
|
|
1456
|
+
static_assert(!(STATE & ActiveSet), "property active should not be set yet");
|
|
1457
|
+
m_result->setActive(value);
|
|
1458
|
+
return castState<ActiveSet>();
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1461
|
+
std::unique_ptr<MediaQuery> build()
|
|
1462
|
+
{
|
|
1463
|
+
static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
|
|
1464
|
+
return std::move(m_result);
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
private:
|
|
1468
|
+
friend class MediaQuery;
|
|
1469
|
+
MediaQueryBuilder() : m_result(new MediaQuery()) { }
|
|
1470
|
+
|
|
1471
|
+
template<int STEP> MediaQueryBuilder<STATE | STEP>& castState()
|
|
1472
|
+
{
|
|
1473
|
+
return *reinterpret_cast<MediaQueryBuilder<STATE | STEP>*>(this);
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
std::unique_ptr<protocol::CSS::MediaQuery> m_result;
|
|
1477
|
+
};
|
|
1478
|
+
|
|
1479
|
+
static MediaQueryBuilder<0> create()
|
|
1480
|
+
{
|
|
1481
|
+
return MediaQueryBuilder<0>();
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
private:
|
|
1485
|
+
DECLARE_SERIALIZATION_SUPPORT();
|
|
1486
|
+
|
|
1487
|
+
MediaQuery()
|
|
1488
|
+
{
|
|
1489
|
+
m_active = false;
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
std::unique_ptr<protocol::Array<protocol::CSS::MediaQueryExpression>> m_expressions;
|
|
1493
|
+
bool m_active;
|
|
1494
|
+
};
|
|
1495
|
+
|
|
1496
|
+
|
|
1497
|
+
class MediaQueryExpression : public ::v8_crdtp::ProtocolObject<MediaQueryExpression> {
|
|
1498
|
+
public:
|
|
1499
|
+
~MediaQueryExpression() override { }
|
|
1500
|
+
|
|
1501
|
+
double getValue() { return m_value; }
|
|
1502
|
+
void setValue(double value) { m_value = value; }
|
|
1503
|
+
|
|
1504
|
+
String getUnit() { return m_unit; }
|
|
1505
|
+
void setUnit(const String& value) { m_unit = value; }
|
|
1506
|
+
|
|
1507
|
+
String getFeature() { return m_feature; }
|
|
1508
|
+
void setFeature(const String& value) { m_feature = value; }
|
|
1509
|
+
|
|
1510
|
+
bool hasValueRange() { return m_valueRange.isJust(); }
|
|
1511
|
+
protocol::CSS::SourceRange* getValueRange(protocol::CSS::SourceRange* defaultValue) { return m_valueRange.isJust() ? m_valueRange.fromJust() : defaultValue; }
|
|
1512
|
+
void setValueRange(std::unique_ptr<protocol::CSS::SourceRange> value) { m_valueRange = std::move(value); }
|
|
1513
|
+
|
|
1514
|
+
bool hasComputedLength() { return m_computedLength.isJust(); }
|
|
1515
|
+
double getComputedLength(double defaultValue) { return m_computedLength.isJust() ? m_computedLength.fromJust() : defaultValue; }
|
|
1516
|
+
void setComputedLength(double value) { m_computedLength = value; }
|
|
1517
|
+
|
|
1518
|
+
template<int STATE>
|
|
1519
|
+
class MediaQueryExpressionBuilder {
|
|
1520
|
+
public:
|
|
1521
|
+
enum {
|
|
1522
|
+
NoFieldsSet = 0,
|
|
1523
|
+
ValueSet = 1 << 1,
|
|
1524
|
+
UnitSet = 1 << 2,
|
|
1525
|
+
FeatureSet = 1 << 3,
|
|
1526
|
+
AllFieldsSet = (ValueSet | UnitSet | FeatureSet | 0)};
|
|
1527
|
+
|
|
1528
|
+
|
|
1529
|
+
MediaQueryExpressionBuilder<STATE | ValueSet>& setValue(double value)
|
|
1530
|
+
{
|
|
1531
|
+
static_assert(!(STATE & ValueSet), "property value should not be set yet");
|
|
1532
|
+
m_result->setValue(value);
|
|
1533
|
+
return castState<ValueSet>();
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
MediaQueryExpressionBuilder<STATE | UnitSet>& setUnit(const String& value)
|
|
1537
|
+
{
|
|
1538
|
+
static_assert(!(STATE & UnitSet), "property unit should not be set yet");
|
|
1539
|
+
m_result->setUnit(value);
|
|
1540
|
+
return castState<UnitSet>();
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
MediaQueryExpressionBuilder<STATE | FeatureSet>& setFeature(const String& value)
|
|
1544
|
+
{
|
|
1545
|
+
static_assert(!(STATE & FeatureSet), "property feature should not be set yet");
|
|
1546
|
+
m_result->setFeature(value);
|
|
1547
|
+
return castState<FeatureSet>();
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
MediaQueryExpressionBuilder<STATE>& setValueRange(std::unique_ptr<protocol::CSS::SourceRange> value)
|
|
1551
|
+
{
|
|
1552
|
+
m_result->setValueRange(std::move(value));
|
|
1553
|
+
return *this;
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
MediaQueryExpressionBuilder<STATE>& setComputedLength(double value)
|
|
1557
|
+
{
|
|
1558
|
+
m_result->setComputedLength(value);
|
|
1559
|
+
return *this;
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
std::unique_ptr<MediaQueryExpression> build()
|
|
1563
|
+
{
|
|
1564
|
+
static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
|
|
1565
|
+
return std::move(m_result);
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
private:
|
|
1569
|
+
friend class MediaQueryExpression;
|
|
1570
|
+
MediaQueryExpressionBuilder() : m_result(new MediaQueryExpression()) { }
|
|
1571
|
+
|
|
1572
|
+
template<int STEP> MediaQueryExpressionBuilder<STATE | STEP>& castState()
|
|
1573
|
+
{
|
|
1574
|
+
return *reinterpret_cast<MediaQueryExpressionBuilder<STATE | STEP>*>(this);
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
std::unique_ptr<protocol::CSS::MediaQueryExpression> m_result;
|
|
1578
|
+
};
|
|
1579
|
+
|
|
1580
|
+
static MediaQueryExpressionBuilder<0> create()
|
|
1581
|
+
{
|
|
1582
|
+
return MediaQueryExpressionBuilder<0>();
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
private:
|
|
1586
|
+
DECLARE_SERIALIZATION_SUPPORT();
|
|
1587
|
+
|
|
1588
|
+
MediaQueryExpression()
|
|
1589
|
+
{
|
|
1590
|
+
m_value = 0;
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
double m_value;
|
|
1594
|
+
String m_unit;
|
|
1595
|
+
String m_feature;
|
|
1596
|
+
Maybe<protocol::CSS::SourceRange> m_valueRange;
|
|
1597
|
+
Maybe<double> m_computedLength;
|
|
1598
|
+
};
|
|
1599
|
+
|
|
1600
|
+
|
|
1601
|
+
class PlatformFontUsage : public ::v8_crdtp::ProtocolObject<PlatformFontUsage> {
|
|
1602
|
+
public:
|
|
1603
|
+
~PlatformFontUsage() override { }
|
|
1604
|
+
|
|
1605
|
+
String getFamilyName() { return m_familyName; }
|
|
1606
|
+
void setFamilyName(const String& value) { m_familyName = value; }
|
|
1607
|
+
|
|
1608
|
+
bool getIsCustomFont() { return m_isCustomFont; }
|
|
1609
|
+
void setIsCustomFont(bool value) { m_isCustomFont = value; }
|
|
1610
|
+
|
|
1611
|
+
double getGlyphCount() { return m_glyphCount; }
|
|
1612
|
+
void setGlyphCount(double value) { m_glyphCount = value; }
|
|
1613
|
+
|
|
1614
|
+
template<int STATE>
|
|
1615
|
+
class PlatformFontUsageBuilder {
|
|
1616
|
+
public:
|
|
1617
|
+
enum {
|
|
1618
|
+
NoFieldsSet = 0,
|
|
1619
|
+
FamilyNameSet = 1 << 1,
|
|
1620
|
+
IsCustomFontSet = 1 << 2,
|
|
1621
|
+
GlyphCountSet = 1 << 3,
|
|
1622
|
+
AllFieldsSet = (FamilyNameSet | IsCustomFontSet | GlyphCountSet | 0)};
|
|
1623
|
+
|
|
1624
|
+
|
|
1625
|
+
PlatformFontUsageBuilder<STATE | FamilyNameSet>& setFamilyName(const String& value)
|
|
1626
|
+
{
|
|
1627
|
+
static_assert(!(STATE & FamilyNameSet), "property familyName should not be set yet");
|
|
1628
|
+
m_result->setFamilyName(value);
|
|
1629
|
+
return castState<FamilyNameSet>();
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
PlatformFontUsageBuilder<STATE | IsCustomFontSet>& setIsCustomFont(bool value)
|
|
1633
|
+
{
|
|
1634
|
+
static_assert(!(STATE & IsCustomFontSet), "property isCustomFont should not be set yet");
|
|
1635
|
+
m_result->setIsCustomFont(value);
|
|
1636
|
+
return castState<IsCustomFontSet>();
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
PlatformFontUsageBuilder<STATE | GlyphCountSet>& setGlyphCount(double value)
|
|
1640
|
+
{
|
|
1641
|
+
static_assert(!(STATE & GlyphCountSet), "property glyphCount should not be set yet");
|
|
1642
|
+
m_result->setGlyphCount(value);
|
|
1643
|
+
return castState<GlyphCountSet>();
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
std::unique_ptr<PlatformFontUsage> build()
|
|
1647
|
+
{
|
|
1648
|
+
static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
|
|
1649
|
+
return std::move(m_result);
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
private:
|
|
1653
|
+
friend class PlatformFontUsage;
|
|
1654
|
+
PlatformFontUsageBuilder() : m_result(new PlatformFontUsage()) { }
|
|
1655
|
+
|
|
1656
|
+
template<int STEP> PlatformFontUsageBuilder<STATE | STEP>& castState()
|
|
1657
|
+
{
|
|
1658
|
+
return *reinterpret_cast<PlatformFontUsageBuilder<STATE | STEP>*>(this);
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1661
|
+
std::unique_ptr<protocol::CSS::PlatformFontUsage> m_result;
|
|
1662
|
+
};
|
|
1663
|
+
|
|
1664
|
+
static PlatformFontUsageBuilder<0> create()
|
|
1665
|
+
{
|
|
1666
|
+
return PlatformFontUsageBuilder<0>();
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1669
|
+
private:
|
|
1670
|
+
DECLARE_SERIALIZATION_SUPPORT();
|
|
1671
|
+
|
|
1672
|
+
PlatformFontUsage()
|
|
1673
|
+
{
|
|
1674
|
+
m_isCustomFont = false;
|
|
1675
|
+
m_glyphCount = 0;
|
|
1676
|
+
}
|
|
1677
|
+
|
|
1678
|
+
String m_familyName;
|
|
1679
|
+
bool m_isCustomFont;
|
|
1680
|
+
double m_glyphCount;
|
|
1681
|
+
};
|
|
1682
|
+
|
|
1683
|
+
|
|
1684
|
+
class FontFace : public ::v8_crdtp::ProtocolObject<FontFace> {
|
|
1685
|
+
public:
|
|
1686
|
+
~FontFace() override { }
|
|
1687
|
+
|
|
1688
|
+
String getFontFamily() { return m_fontFamily; }
|
|
1689
|
+
void setFontFamily(const String& value) { m_fontFamily = value; }
|
|
1690
|
+
|
|
1691
|
+
String getFontStyle() { return m_fontStyle; }
|
|
1692
|
+
void setFontStyle(const String& value) { m_fontStyle = value; }
|
|
1693
|
+
|
|
1694
|
+
String getFontVariant() { return m_fontVariant; }
|
|
1695
|
+
void setFontVariant(const String& value) { m_fontVariant = value; }
|
|
1696
|
+
|
|
1697
|
+
String getFontWeight() { return m_fontWeight; }
|
|
1698
|
+
void setFontWeight(const String& value) { m_fontWeight = value; }
|
|
1699
|
+
|
|
1700
|
+
String getFontStretch() { return m_fontStretch; }
|
|
1701
|
+
void setFontStretch(const String& value) { m_fontStretch = value; }
|
|
1702
|
+
|
|
1703
|
+
String getUnicodeRange() { return m_unicodeRange; }
|
|
1704
|
+
void setUnicodeRange(const String& value) { m_unicodeRange = value; }
|
|
1705
|
+
|
|
1706
|
+
String getSrc() { return m_src; }
|
|
1707
|
+
void setSrc(const String& value) { m_src = value; }
|
|
1708
|
+
|
|
1709
|
+
String getPlatformFontFamily() { return m_platformFontFamily; }
|
|
1710
|
+
void setPlatformFontFamily(const String& value) { m_platformFontFamily = value; }
|
|
1711
|
+
|
|
1712
|
+
template<int STATE>
|
|
1713
|
+
class FontFaceBuilder {
|
|
1714
|
+
public:
|
|
1715
|
+
enum {
|
|
1716
|
+
NoFieldsSet = 0,
|
|
1717
|
+
FontFamilySet = 1 << 1,
|
|
1718
|
+
FontStyleSet = 1 << 2,
|
|
1719
|
+
FontVariantSet = 1 << 3,
|
|
1720
|
+
FontWeightSet = 1 << 4,
|
|
1721
|
+
FontStretchSet = 1 << 5,
|
|
1722
|
+
UnicodeRangeSet = 1 << 6,
|
|
1723
|
+
SrcSet = 1 << 7,
|
|
1724
|
+
PlatformFontFamilySet = 1 << 8,
|
|
1725
|
+
AllFieldsSet = (FontFamilySet | FontStyleSet | FontVariantSet | FontWeightSet | FontStretchSet | UnicodeRangeSet | SrcSet | PlatformFontFamilySet | 0)};
|
|
1726
|
+
|
|
1727
|
+
|
|
1728
|
+
FontFaceBuilder<STATE | FontFamilySet>& setFontFamily(const String& value)
|
|
1729
|
+
{
|
|
1730
|
+
static_assert(!(STATE & FontFamilySet), "property fontFamily should not be set yet");
|
|
1731
|
+
m_result->setFontFamily(value);
|
|
1732
|
+
return castState<FontFamilySet>();
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
FontFaceBuilder<STATE | FontStyleSet>& setFontStyle(const String& value)
|
|
1736
|
+
{
|
|
1737
|
+
static_assert(!(STATE & FontStyleSet), "property fontStyle should not be set yet");
|
|
1738
|
+
m_result->setFontStyle(value);
|
|
1739
|
+
return castState<FontStyleSet>();
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
FontFaceBuilder<STATE | FontVariantSet>& setFontVariant(const String& value)
|
|
1743
|
+
{
|
|
1744
|
+
static_assert(!(STATE & FontVariantSet), "property fontVariant should not be set yet");
|
|
1745
|
+
m_result->setFontVariant(value);
|
|
1746
|
+
return castState<FontVariantSet>();
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
FontFaceBuilder<STATE | FontWeightSet>& setFontWeight(const String& value)
|
|
1750
|
+
{
|
|
1751
|
+
static_assert(!(STATE & FontWeightSet), "property fontWeight should not be set yet");
|
|
1752
|
+
m_result->setFontWeight(value);
|
|
1753
|
+
return castState<FontWeightSet>();
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
FontFaceBuilder<STATE | FontStretchSet>& setFontStretch(const String& value)
|
|
1757
|
+
{
|
|
1758
|
+
static_assert(!(STATE & FontStretchSet), "property fontStretch should not be set yet");
|
|
1759
|
+
m_result->setFontStretch(value);
|
|
1760
|
+
return castState<FontStretchSet>();
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
FontFaceBuilder<STATE | UnicodeRangeSet>& setUnicodeRange(const String& value)
|
|
1764
|
+
{
|
|
1765
|
+
static_assert(!(STATE & UnicodeRangeSet), "property unicodeRange should not be set yet");
|
|
1766
|
+
m_result->setUnicodeRange(value);
|
|
1767
|
+
return castState<UnicodeRangeSet>();
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1770
|
+
FontFaceBuilder<STATE | SrcSet>& setSrc(const String& value)
|
|
1771
|
+
{
|
|
1772
|
+
static_assert(!(STATE & SrcSet), "property src should not be set yet");
|
|
1773
|
+
m_result->setSrc(value);
|
|
1774
|
+
return castState<SrcSet>();
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
FontFaceBuilder<STATE | PlatformFontFamilySet>& setPlatformFontFamily(const String& value)
|
|
1778
|
+
{
|
|
1779
|
+
static_assert(!(STATE & PlatformFontFamilySet), "property platformFontFamily should not be set yet");
|
|
1780
|
+
m_result->setPlatformFontFamily(value);
|
|
1781
|
+
return castState<PlatformFontFamilySet>();
|
|
1782
|
+
}
|
|
1783
|
+
|
|
1784
|
+
std::unique_ptr<FontFace> build()
|
|
1785
|
+
{
|
|
1786
|
+
static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
|
|
1787
|
+
return std::move(m_result);
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
private:
|
|
1791
|
+
friend class FontFace;
|
|
1792
|
+
FontFaceBuilder() : m_result(new FontFace()) { }
|
|
1793
|
+
|
|
1794
|
+
template<int STEP> FontFaceBuilder<STATE | STEP>& castState()
|
|
1795
|
+
{
|
|
1796
|
+
return *reinterpret_cast<FontFaceBuilder<STATE | STEP>*>(this);
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
std::unique_ptr<protocol::CSS::FontFace> m_result;
|
|
1800
|
+
};
|
|
1801
|
+
|
|
1802
|
+
static FontFaceBuilder<0> create()
|
|
1803
|
+
{
|
|
1804
|
+
return FontFaceBuilder<0>();
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
private:
|
|
1808
|
+
DECLARE_SERIALIZATION_SUPPORT();
|
|
1809
|
+
|
|
1810
|
+
FontFace()
|
|
1811
|
+
{
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1814
|
+
String m_fontFamily;
|
|
1815
|
+
String m_fontStyle;
|
|
1816
|
+
String m_fontVariant;
|
|
1817
|
+
String m_fontWeight;
|
|
1818
|
+
String m_fontStretch;
|
|
1819
|
+
String m_unicodeRange;
|
|
1820
|
+
String m_src;
|
|
1821
|
+
String m_platformFontFamily;
|
|
1822
|
+
};
|
|
1823
|
+
|
|
1824
|
+
|
|
1825
|
+
class CSSKeyframesRule : public ::v8_crdtp::ProtocolObject<CSSKeyframesRule> {
|
|
1826
|
+
public:
|
|
1827
|
+
~CSSKeyframesRule() override { }
|
|
1828
|
+
|
|
1829
|
+
protocol::CSS::Value* getAnimationName() { return m_animationName.get(); }
|
|
1830
|
+
void setAnimationName(std::unique_ptr<protocol::CSS::Value> value) { m_animationName = std::move(value); }
|
|
1831
|
+
|
|
1832
|
+
protocol::Array<protocol::CSS::CSSKeyframeRule>* getKeyframes() { return m_keyframes.get(); }
|
|
1833
|
+
void setKeyframes(std::unique_ptr<protocol::Array<protocol::CSS::CSSKeyframeRule>> value) { m_keyframes = std::move(value); }
|
|
1834
|
+
|
|
1835
|
+
template<int STATE>
|
|
1836
|
+
class CSSKeyframesRuleBuilder {
|
|
1837
|
+
public:
|
|
1838
|
+
enum {
|
|
1839
|
+
NoFieldsSet = 0,
|
|
1840
|
+
AnimationNameSet = 1 << 1,
|
|
1841
|
+
KeyframesSet = 1 << 2,
|
|
1842
|
+
AllFieldsSet = (AnimationNameSet | KeyframesSet | 0)};
|
|
1843
|
+
|
|
1844
|
+
|
|
1845
|
+
CSSKeyframesRuleBuilder<STATE | AnimationNameSet>& setAnimationName(std::unique_ptr<protocol::CSS::Value> value)
|
|
1846
|
+
{
|
|
1847
|
+
static_assert(!(STATE & AnimationNameSet), "property animationName should not be set yet");
|
|
1848
|
+
m_result->setAnimationName(std::move(value));
|
|
1849
|
+
return castState<AnimationNameSet>();
|
|
1850
|
+
}
|
|
1851
|
+
|
|
1852
|
+
CSSKeyframesRuleBuilder<STATE | KeyframesSet>& setKeyframes(std::unique_ptr<protocol::Array<protocol::CSS::CSSKeyframeRule>> value)
|
|
1853
|
+
{
|
|
1854
|
+
static_assert(!(STATE & KeyframesSet), "property keyframes should not be set yet");
|
|
1855
|
+
m_result->setKeyframes(std::move(value));
|
|
1856
|
+
return castState<KeyframesSet>();
|
|
1857
|
+
}
|
|
1858
|
+
|
|
1859
|
+
std::unique_ptr<CSSKeyframesRule> build()
|
|
1860
|
+
{
|
|
1861
|
+
static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
|
|
1862
|
+
return std::move(m_result);
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1865
|
+
private:
|
|
1866
|
+
friend class CSSKeyframesRule;
|
|
1867
|
+
CSSKeyframesRuleBuilder() : m_result(new CSSKeyframesRule()) { }
|
|
1868
|
+
|
|
1869
|
+
template<int STEP> CSSKeyframesRuleBuilder<STATE | STEP>& castState()
|
|
1870
|
+
{
|
|
1871
|
+
return *reinterpret_cast<CSSKeyframesRuleBuilder<STATE | STEP>*>(this);
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
std::unique_ptr<protocol::CSS::CSSKeyframesRule> m_result;
|
|
1875
|
+
};
|
|
1876
|
+
|
|
1877
|
+
static CSSKeyframesRuleBuilder<0> create()
|
|
1878
|
+
{
|
|
1879
|
+
return CSSKeyframesRuleBuilder<0>();
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
private:
|
|
1883
|
+
DECLARE_SERIALIZATION_SUPPORT();
|
|
1884
|
+
|
|
1885
|
+
CSSKeyframesRule()
|
|
1886
|
+
{
|
|
1887
|
+
}
|
|
1888
|
+
|
|
1889
|
+
std::unique_ptr<protocol::CSS::Value> m_animationName;
|
|
1890
|
+
std::unique_ptr<protocol::Array<protocol::CSS::CSSKeyframeRule>> m_keyframes;
|
|
1891
|
+
};
|
|
1892
|
+
|
|
1893
|
+
|
|
1894
|
+
class CSSKeyframeRule : public ::v8_crdtp::ProtocolObject<CSSKeyframeRule> {
|
|
1895
|
+
public:
|
|
1896
|
+
~CSSKeyframeRule() override { }
|
|
1897
|
+
|
|
1898
|
+
bool hasStyleSheetId() { return m_styleSheetId.isJust(); }
|
|
1899
|
+
String getStyleSheetId(const String& defaultValue) { return m_styleSheetId.isJust() ? m_styleSheetId.fromJust() : defaultValue; }
|
|
1900
|
+
void setStyleSheetId(const String& value) { m_styleSheetId = value; }
|
|
1901
|
+
|
|
1902
|
+
String getOrigin() { return m_origin; }
|
|
1903
|
+
void setOrigin(const String& value) { m_origin = value; }
|
|
1904
|
+
|
|
1905
|
+
protocol::CSS::Value* getKeyText() { return m_keyText.get(); }
|
|
1906
|
+
void setKeyText(std::unique_ptr<protocol::CSS::Value> value) { m_keyText = std::move(value); }
|
|
1907
|
+
|
|
1908
|
+
protocol::CSS::CSSStyle* getStyle() { return m_style.get(); }
|
|
1909
|
+
void setStyle(std::unique_ptr<protocol::CSS::CSSStyle> value) { m_style = std::move(value); }
|
|
1910
|
+
|
|
1911
|
+
template<int STATE>
|
|
1912
|
+
class CSSKeyframeRuleBuilder {
|
|
1913
|
+
public:
|
|
1914
|
+
enum {
|
|
1915
|
+
NoFieldsSet = 0,
|
|
1916
|
+
OriginSet = 1 << 1,
|
|
1917
|
+
KeyTextSet = 1 << 2,
|
|
1918
|
+
StyleSet = 1 << 3,
|
|
1919
|
+
AllFieldsSet = (OriginSet | KeyTextSet | StyleSet | 0)};
|
|
1920
|
+
|
|
1921
|
+
|
|
1922
|
+
CSSKeyframeRuleBuilder<STATE>& setStyleSheetId(const String& value)
|
|
1923
|
+
{
|
|
1924
|
+
m_result->setStyleSheetId(value);
|
|
1925
|
+
return *this;
|
|
1926
|
+
}
|
|
1927
|
+
|
|
1928
|
+
CSSKeyframeRuleBuilder<STATE | OriginSet>& setOrigin(const String& value)
|
|
1929
|
+
{
|
|
1930
|
+
static_assert(!(STATE & OriginSet), "property origin should not be set yet");
|
|
1931
|
+
m_result->setOrigin(value);
|
|
1932
|
+
return castState<OriginSet>();
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1935
|
+
CSSKeyframeRuleBuilder<STATE | KeyTextSet>& setKeyText(std::unique_ptr<protocol::CSS::Value> value)
|
|
1936
|
+
{
|
|
1937
|
+
static_assert(!(STATE & KeyTextSet), "property keyText should not be set yet");
|
|
1938
|
+
m_result->setKeyText(std::move(value));
|
|
1939
|
+
return castState<KeyTextSet>();
|
|
1940
|
+
}
|
|
1941
|
+
|
|
1942
|
+
CSSKeyframeRuleBuilder<STATE | StyleSet>& setStyle(std::unique_ptr<protocol::CSS::CSSStyle> value)
|
|
1943
|
+
{
|
|
1944
|
+
static_assert(!(STATE & StyleSet), "property style should not be set yet");
|
|
1945
|
+
m_result->setStyle(std::move(value));
|
|
1946
|
+
return castState<StyleSet>();
|
|
1947
|
+
}
|
|
1948
|
+
|
|
1949
|
+
std::unique_ptr<CSSKeyframeRule> build()
|
|
1950
|
+
{
|
|
1951
|
+
static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
|
|
1952
|
+
return std::move(m_result);
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
|
+
private:
|
|
1956
|
+
friend class CSSKeyframeRule;
|
|
1957
|
+
CSSKeyframeRuleBuilder() : m_result(new CSSKeyframeRule()) { }
|
|
1958
|
+
|
|
1959
|
+
template<int STEP> CSSKeyframeRuleBuilder<STATE | STEP>& castState()
|
|
1960
|
+
{
|
|
1961
|
+
return *reinterpret_cast<CSSKeyframeRuleBuilder<STATE | STEP>*>(this);
|
|
1962
|
+
}
|
|
1963
|
+
|
|
1964
|
+
std::unique_ptr<protocol::CSS::CSSKeyframeRule> m_result;
|
|
1965
|
+
};
|
|
1966
|
+
|
|
1967
|
+
static CSSKeyframeRuleBuilder<0> create()
|
|
1968
|
+
{
|
|
1969
|
+
return CSSKeyframeRuleBuilder<0>();
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
private:
|
|
1973
|
+
DECLARE_SERIALIZATION_SUPPORT();
|
|
1974
|
+
|
|
1975
|
+
CSSKeyframeRule()
|
|
1976
|
+
{
|
|
1977
|
+
}
|
|
1978
|
+
|
|
1979
|
+
Maybe<String> m_styleSheetId;
|
|
1980
|
+
String m_origin;
|
|
1981
|
+
std::unique_ptr<protocol::CSS::Value> m_keyText;
|
|
1982
|
+
std::unique_ptr<protocol::CSS::CSSStyle> m_style;
|
|
1983
|
+
};
|
|
1984
|
+
|
|
1985
|
+
|
|
1986
|
+
class StyleDeclarationEdit : public ::v8_crdtp::ProtocolObject<StyleDeclarationEdit> {
|
|
1987
|
+
public:
|
|
1988
|
+
~StyleDeclarationEdit() override { }
|
|
1989
|
+
|
|
1990
|
+
String getStyleSheetId() { return m_styleSheetId; }
|
|
1991
|
+
void setStyleSheetId(const String& value) { m_styleSheetId = value; }
|
|
1992
|
+
|
|
1993
|
+
protocol::CSS::SourceRange* getRange() { return m_range.get(); }
|
|
1994
|
+
void setRange(std::unique_ptr<protocol::CSS::SourceRange> value) { m_range = std::move(value); }
|
|
1995
|
+
|
|
1996
|
+
String getText() { return m_text; }
|
|
1997
|
+
void setText(const String& value) { m_text = value; }
|
|
1998
|
+
|
|
1999
|
+
template<int STATE>
|
|
2000
|
+
class StyleDeclarationEditBuilder {
|
|
2001
|
+
public:
|
|
2002
|
+
enum {
|
|
2003
|
+
NoFieldsSet = 0,
|
|
2004
|
+
StyleSheetIdSet = 1 << 1,
|
|
2005
|
+
RangeSet = 1 << 2,
|
|
2006
|
+
TextSet = 1 << 3,
|
|
2007
|
+
AllFieldsSet = (StyleSheetIdSet | RangeSet | TextSet | 0)};
|
|
2008
|
+
|
|
2009
|
+
|
|
2010
|
+
StyleDeclarationEditBuilder<STATE | StyleSheetIdSet>& setStyleSheetId(const String& value)
|
|
2011
|
+
{
|
|
2012
|
+
static_assert(!(STATE & StyleSheetIdSet), "property styleSheetId should not be set yet");
|
|
2013
|
+
m_result->setStyleSheetId(value);
|
|
2014
|
+
return castState<StyleSheetIdSet>();
|
|
2015
|
+
}
|
|
2016
|
+
|
|
2017
|
+
StyleDeclarationEditBuilder<STATE | RangeSet>& setRange(std::unique_ptr<protocol::CSS::SourceRange> value)
|
|
2018
|
+
{
|
|
2019
|
+
static_assert(!(STATE & RangeSet), "property range should not be set yet");
|
|
2020
|
+
m_result->setRange(std::move(value));
|
|
2021
|
+
return castState<RangeSet>();
|
|
2022
|
+
}
|
|
2023
|
+
|
|
2024
|
+
StyleDeclarationEditBuilder<STATE | TextSet>& setText(const String& value)
|
|
2025
|
+
{
|
|
2026
|
+
static_assert(!(STATE & TextSet), "property text should not be set yet");
|
|
2027
|
+
m_result->setText(value);
|
|
2028
|
+
return castState<TextSet>();
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
std::unique_ptr<StyleDeclarationEdit> build()
|
|
2032
|
+
{
|
|
2033
|
+
static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
|
|
2034
|
+
return std::move(m_result);
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
private:
|
|
2038
|
+
friend class StyleDeclarationEdit;
|
|
2039
|
+
StyleDeclarationEditBuilder() : m_result(new StyleDeclarationEdit()) { }
|
|
2040
|
+
|
|
2041
|
+
template<int STEP> StyleDeclarationEditBuilder<STATE | STEP>& castState()
|
|
2042
|
+
{
|
|
2043
|
+
return *reinterpret_cast<StyleDeclarationEditBuilder<STATE | STEP>*>(this);
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
std::unique_ptr<protocol::CSS::StyleDeclarationEdit> m_result;
|
|
2047
|
+
};
|
|
2048
|
+
|
|
2049
|
+
static StyleDeclarationEditBuilder<0> create()
|
|
2050
|
+
{
|
|
2051
|
+
return StyleDeclarationEditBuilder<0>();
|
|
2052
|
+
}
|
|
2053
|
+
|
|
2054
|
+
private:
|
|
2055
|
+
DECLARE_SERIALIZATION_SUPPORT();
|
|
2056
|
+
|
|
2057
|
+
StyleDeclarationEdit()
|
|
2058
|
+
{
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2061
|
+
String m_styleSheetId;
|
|
2062
|
+
std::unique_ptr<protocol::CSS::SourceRange> m_range;
|
|
2063
|
+
String m_text;
|
|
2064
|
+
};
|
|
2065
|
+
|
|
2066
|
+
|
|
2067
|
+
// ------------- Backend interface.
|
|
2068
|
+
|
|
2069
|
+
class Backend {
|
|
2070
|
+
public:
|
|
2071
|
+
virtual ~Backend() { }
|
|
2072
|
+
|
|
2073
|
+
virtual DispatchResponse addRule(const String& in_styleSheetId, const String& in_ruleText, std::unique_ptr<protocol::CSS::SourceRange> in_location, std::unique_ptr<protocol::CSS::CSSRule>* out_rule) = 0;
|
|
2074
|
+
virtual DispatchResponse collectClassNames(const String& in_styleSheetId, std::unique_ptr<protocol::Array<String>>* out_classNames) = 0;
|
|
2075
|
+
virtual DispatchResponse createStyleSheet(const String& in_frameId, String* out_styleSheetId) = 0;
|
|
2076
|
+
virtual DispatchResponse disable() = 0;
|
|
2077
|
+
class EnableCallback {
|
|
2078
|
+
public:
|
|
2079
|
+
virtual void sendSuccess() = 0;
|
|
2080
|
+
virtual void sendFailure(const DispatchResponse&) = 0;
|
|
2081
|
+
virtual void fallThrough() = 0;
|
|
2082
|
+
virtual ~EnableCallback() { }
|
|
2083
|
+
};
|
|
2084
|
+
virtual void enable(std::unique_ptr<EnableCallback> callback) = 0;
|
|
2085
|
+
virtual DispatchResponse forcePseudoState(int in_nodeId, std::unique_ptr<protocol::Array<String>> in_forcedPseudoClasses) = 0;
|
|
2086
|
+
virtual DispatchResponse getBackgroundColors(int in_nodeId, Maybe<protocol::Array<String>>* out_backgroundColors, Maybe<String>* out_computedFontSize, Maybe<String>* out_computedFontWeight) = 0;
|
|
2087
|
+
virtual DispatchResponse getComputedStyleForNode(int in_nodeId, std::unique_ptr<protocol::Array<protocol::CSS::CSSComputedStyleProperty>>* out_computedStyle) = 0;
|
|
2088
|
+
virtual DispatchResponse getInlineStylesForNode(int in_nodeId, Maybe<protocol::CSS::CSSStyle>* out_inlineStyle, Maybe<protocol::CSS::CSSStyle>* out_attributesStyle) = 0;
|
|
2089
|
+
virtual DispatchResponse getMatchedStylesForNode(int in_nodeId, Maybe<protocol::CSS::CSSStyle>* out_inlineStyle, Maybe<protocol::CSS::CSSStyle>* out_attributesStyle, Maybe<protocol::Array<protocol::CSS::RuleMatch>>* out_matchedCSSRules, Maybe<protocol::Array<protocol::CSS::PseudoElementMatches>>* out_pseudoElements, Maybe<protocol::Array<protocol::CSS::InheritedStyleEntry>>* out_inherited, Maybe<protocol::Array<protocol::CSS::CSSKeyframesRule>>* out_cssKeyframesRules) = 0;
|
|
2090
|
+
virtual DispatchResponse getMediaQueries(std::unique_ptr<protocol::Array<protocol::CSS::CSSMedia>>* out_medias) = 0;
|
|
2091
|
+
virtual DispatchResponse getPlatformFontsForNode(int in_nodeId, std::unique_ptr<protocol::Array<protocol::CSS::PlatformFontUsage>>* out_fonts) = 0;
|
|
2092
|
+
virtual DispatchResponse getStyleSheetText(const String& in_styleSheetId, String* out_text) = 0;
|
|
2093
|
+
virtual DispatchResponse setEffectivePropertyValueForNode(int in_nodeId, const String& in_propertyName, const String& in_value) = 0;
|
|
2094
|
+
virtual DispatchResponse setKeyframeKey(const String& in_styleSheetId, std::unique_ptr<protocol::CSS::SourceRange> in_range, const String& in_keyText, std::unique_ptr<protocol::CSS::Value>* out_keyText) = 0;
|
|
2095
|
+
virtual DispatchResponse setMediaText(const String& in_styleSheetId, std::unique_ptr<protocol::CSS::SourceRange> in_range, const String& in_text, std::unique_ptr<protocol::CSS::CSSMedia>* out_media) = 0;
|
|
2096
|
+
virtual DispatchResponse setRuleSelector(const String& in_styleSheetId, std::unique_ptr<protocol::CSS::SourceRange> in_range, const String& in_selector, std::unique_ptr<protocol::CSS::SelectorList>* out_selectorList) = 0;
|
|
2097
|
+
virtual DispatchResponse setStyleSheetText(const String& in_styleSheetId, const String& in_text, Maybe<String>* out_sourceMapURL) = 0;
|
|
2098
|
+
virtual DispatchResponse setStyleTexts(std::unique_ptr<protocol::Array<protocol::CSS::StyleDeclarationEdit>> in_edits, std::unique_ptr<protocol::Array<protocol::CSS::CSSStyle>>* out_styles) = 0;
|
|
2099
|
+
virtual DispatchResponse startRuleUsageTracking() = 0;
|
|
2100
|
+
virtual DispatchResponse stopRuleUsageTracking(std::unique_ptr<protocol::Array<protocol::CSS::RuleUsage>>* out_ruleUsage) = 0;
|
|
2101
|
+
virtual DispatchResponse takeCoverageDelta(std::unique_ptr<protocol::Array<protocol::CSS::RuleUsage>>* out_coverage) = 0;
|
|
2102
|
+
|
|
2103
|
+
};
|
|
2104
|
+
|
|
2105
|
+
// ------------- Frontend interface.
|
|
2106
|
+
|
|
2107
|
+
class Frontend {
|
|
2108
|
+
public:
|
|
2109
|
+
explicit Frontend(FrontendChannel* frontend_channel) : frontend_channel_(frontend_channel) {}
|
|
2110
|
+
void fontsUpdated(Maybe<protocol::CSS::FontFace> font = Maybe<protocol::CSS::FontFace>());
|
|
2111
|
+
void mediaQueryResultChanged();
|
|
2112
|
+
void styleSheetAdded(std::unique_ptr<protocol::CSS::CSSStyleSheetHeader> header);
|
|
2113
|
+
void styleSheetChanged(const String& styleSheetId);
|
|
2114
|
+
void styleSheetRemoved(const String& styleSheetId);
|
|
2115
|
+
|
|
2116
|
+
void flush();
|
|
2117
|
+
void sendRawNotification(std::unique_ptr<Serializable>);
|
|
2118
|
+
private:
|
|
2119
|
+
FrontendChannel* frontend_channel_;
|
|
2120
|
+
};
|
|
2121
|
+
|
|
2122
|
+
// ------------- Dispatcher.
|
|
2123
|
+
|
|
2124
|
+
class Dispatcher {
|
|
2125
|
+
public:
|
|
2126
|
+
static void wire(UberDispatcher*, Backend*);
|
|
2127
|
+
|
|
2128
|
+
private:
|
|
2129
|
+
Dispatcher() { }
|
|
2130
|
+
};
|
|
2131
|
+
|
|
2132
|
+
// ------------- Metainfo.
|
|
2133
|
+
|
|
2134
|
+
class Metainfo {
|
|
2135
|
+
public:
|
|
2136
|
+
using BackendClass = Backend;
|
|
2137
|
+
using FrontendClass = Frontend;
|
|
2138
|
+
using DispatcherClass = Dispatcher;
|
|
2139
|
+
static const char domainName[];
|
|
2140
|
+
static const char commandPrefix[];
|
|
2141
|
+
static const char version[];
|
|
2142
|
+
};
|
|
2143
|
+
|
|
2144
|
+
} // namespace CSS
|
|
2145
|
+
} // namespace v8_inspector
|
|
2146
|
+
} // namespace protocol
|
|
2147
|
+
|
|
2148
|
+
#endif // !defined(v8_inspector_protocol_CSS_h)
|