| /* |
| * Copyright (c) 2015, Canon Inc. All rights reserved. |
| * Copyright (C) 2018-2020 Apple Inc. All rights reserved. |
| * |
| * Redistribution and use in source and binary forms, with or without |
| * modification, are permitted provided that the following conditions |
| * are met: |
| * 1. Redistributions of source code must retain the above copyright |
| * notice, this list of conditions and the following disclaimer. |
| * 2. Redistributions in binary form must reproduce the above copyright |
| * notice, this list of conditions and the following disclaimer in the |
| * documentation and/or other materials provided with the distribution. |
| * 3. Neither the name of Canon Inc. nor the names of |
| * its contributors may be used to endorse or promote products derived |
| * from this software without specific prior written permission. |
| * THIS SOFTWARE IS PROVIDED BY CANON INC. AND ITS CONTRIBUTORS "AS IS" AND ANY |
| * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| * DISCLAIMED. IN NO EVENT SHALL CANON INC. AND ITS CONTRIBUTORS BE LIABLE FOR |
| * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| */ |
| |
| #pragma once |
| |
| #include <JavaScriptCore/BuiltinUtils.h> |
| |
| #if USE(APPLE_INTERNAL_SDK) |
| #include <WebKitAdditions/WebCoreBuiltinNamesAdditions.h> |
| #endif |
| |
| namespace WebCore { |
| |
| #if !defined(WEBCORE_ADDITIONAL_PRIVATE_IDENTIFIERS) |
| #define WEBCORE_ADDITIONAL_PRIVATE_IDENTIFIERS(macro) |
| #endif |
| |
| #define WEBCORE_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(macro) \ |
| macro(AbortSignal) \ |
| macro(AbstractRange) \ |
| macro(Animation) \ |
| macro(AnimationEffect) \ |
| macro(AnimationPlaybackEvent) \ |
| macro(AnimationTimeline) \ |
| macro(ApplePaySession) \ |
| macro(ApplePaySetup) \ |
| macro(ApplePaySetupFeature) \ |
| macro(AttachmentElement) \ |
| macro(Audio) \ |
| macro(AudioBufferSourceNode) \ |
| macro(AudioContext) \ |
| macro(AudioListener) \ |
| macro(AudioParamMap) \ |
| macro(AudioWorklet) \ |
| macro(AudioWorkletGlobalScope) \ |
| macro(AudioWorkletNode) \ |
| macro(AuthenticatorAssertionResponse) \ |
| macro(AuthenticatorAttestationResponse) \ |
| macro(AuthenticatorResponse) \ |
| macro(BaseAudioContext) \ |
| macro(BeforeLoadEvent) \ |
| macro(BlobEvent) \ |
| macro(BroadcastChannel) \ |
| macro(Cache) \ |
| macro(CacheStorage) \ |
| macro(Client) \ |
| macro(Clients) \ |
| macro(Clipboard) \ |
| macro(ClipboardItem) \ |
| macro(ConstantSourceNode) \ |
| macro(ContactsManager) \ |
| macro(Credential) \ |
| macro(CredentialsContainer) \ |
| macro(CryptoKey) \ |
| macro(CSSAnimation) \ |
| macro(CSSCounterStyleRule) \ |
| macro(CSSImageValue) \ |
| macro(CSSKeywordValue) \ |
| macro(CSSMathInvert) \ |
| macro(CSSMathMax) \ |
| macro(CSSMathMin) \ |
| macro(CSSMathNegate) \ |
| macro(CSSMathProduct) \ |
| macro(CSSMathSum) \ |
| macro(CSSMathValue) \ |
| macro(CSSMatrixComponent) \ |
| macro(CSSNumericArray) \ |
| macro(CSSNumericValue) \ |
| macro(CSSPaintSize) \ |
| macro(CSSPerspective) \ |
| macro(CSSRotate) \ |
| macro(CSSScale) \ |
| macro(CSSSkew) \ |
| macro(CSSSkewX) \ |
| macro(CSSSkewY) \ |
| macro(CSSStyleValue) \ |
| macro(CSSTransformComponent) \ |
| macro(CSSTransformValue) \ |
| macro(CSSTransition) \ |
| macro(CSSTranslate) \ |
| macro(CSSUnitValue) \ |
| macro(CSSUnparsedValue) \ |
| macro(CSSVariableReferenceValue) \ |
| macro(CustomElementRegistry) \ |
| macro(Database) \ |
| macro(DataTransferItem) \ |
| macro(DataTransferItemList) \ |
| macro(DocumentTimeline) \ |
| macro(EnterPictureInPictureEvent) \ |
| macro(ExtendableEvent) \ |
| macro(ExtendableMessageEvent) \ |
| macro(FakeXRDevice) \ |
| macro(FakeXRInputController) \ |
| macro(FetchEvent) \ |
| macro(FileSystem) \ |
| macro(FileSystemDirectoryEntry) \ |
| macro(FileSystemDirectoryHandle) \ |
| macro(FileSystemDirectoryHandleIterator) \ |
| macro(FileSystemDirectoryReader) \ |
| macro(FileSystemEntry) \ |
| macro(FileSystemFileEntry) \ |
| macro(FileSystemFileHandle) \ |
| macro(FileSystemHandle) \ |
| macro(FileSystemSyncAccessHandle) \ |
| macro(Gamepad) \ |
| macro(GamepadButton) \ |
| macro(GamepadEvent) \ |
| macro(HighlightRegister) \ |
| macro(Highlight) \ |
| macro(HTMLAttachmentElement) \ |
| macro(HTMLAudioElement) \ |
| macro(HTMLDialogElement) \ |
| macro(HTMLDataListElement) \ |
| macro(HTMLMenuItemElement) \ |
| macro(HTMLModelElement) \ |
| macro(HTMLKeygenElement) \ |
| macro(HTMLSlotElement) \ |
| macro(Headers) \ |
| macro(IDBCursor) \ |
| macro(IDBCursorWithValue) \ |
| macro(IDBDatabase) \ |
| macro(IDBFactory) \ |
| macro(IDBIndex) \ |
| macro(IDBKeyRange) \ |
| macro(IDBObjectStore) \ |
| macro(IDBOpenDBRequest) \ |
| macro(IDBRequest) \ |
| macro(IDBTransaction) \ |
| macro(IDBVersionChangeEvent) \ |
| macro(IIRFilterNode) \ |
| macro(ImageBitmap) \ |
| macro(ImageBitmapRenderingContext) \ |
| macro(IdleDeadline) \ |
| macro(InputEvent) \ |
| macro(IntersectionObserver) \ |
| macro(IntersectionObserverEntry) \ |
| macro(KeyframeEffect) \ |
| macro(MediaCapabilities) \ |
| macro(MediaCapabilitiesInfo) \ |
| macro(MediaDevices) \ |
| macro(MediaEncryptedEvent) \ |
| macro(MediaKeyMessageEvent) \ |
| macro(MediaKeySession) \ |
| macro(MediaKeyStatusMap) \ |
| macro(MediaKeySystemAccess) \ |
| macro(MediaKeys) \ |
| macro(MediaQueryListEvent) \ |
| macro(MediaRecorder) \ |
| macro(MediaRecorderErrorEvent) \ |
| macro(MediaSessionCoordinator) \ |
| macro(MediaSource) \ |
| macro(MediaStream) \ |
| macro(MediaStreamTrack) \ |
| macro(MerchantValidationEvent) \ |
| macro(MockRTCRtpTransform) \ |
| macro(NavigatorCredentials) \ |
| macro(NavigatorMediaDevices) \ |
| macro(NavigatorPermissions) \ |
| macro(NavigatorUserMedia) \ |
| macro(OfflineAudioContext) \ |
| macro(OffscreenCanvas) \ |
| macro(OffscreenCanvasRenderingContext2D) \ |
| macro(OscillatorNode) \ |
| macro(PaintRenderingContext2D) \ |
| macro(PannerNode) \ |
| macro(PaymentAddress) \ |
| macro(PaymentMethodChangeEvent) \ |
| macro(PaymentRequest) \ |
| macro(PaymentRequestUpdateEvent) \ |
| macro(PaymentResponse) \ |
| macro(PerformanceNavigationTiming) \ |
| macro(PictureInPictureWindow) \ |
| macro(PaintWorkletGlobalScope) \ |
| macro(PerformanceEntry) \ |
| macro(PerformanceEntryList) \ |
| macro(PerformanceMark) \ |
| macro(PerformanceMeasure) \ |
| macro(PerformanceObserver) \ |
| macro(PerformanceObserverEntryList) \ |
| macro(PerformancePaintTiming) \ |
| macro(PerformanceResourceTiming) \ |
| macro(PerformanceServerTiming) \ |
| macro(PermissionDescriptor) \ |
| macro(PermissionStatus) \ |
| macro(Permissions) \ |
| macro(PointerEvent) \ |
| macro(PublicKeyCredential) \ |
| macro(PushEvent) \ |
| macro(PushManager) \ |
| macro(PushMessageData) \ |
| macro(PushSubscription) \ |
| macro(PushSubscriptionOptions) \ |
| macro(ResizeObserver) \ |
| macro(ResizeObserverEntry) \ |
| macro(RTCCertificate) \ |
| macro(RTCDTMFSender) \ |
| macro(RTCDTMFToneChangeEvent) \ |
| macro(RTCDataChannel) \ |
| macro(RTCDataChannelEvent) \ |
| macro(RTCDtlsTransport) \ |
| macro(RTCEncodedAudioFrame) \ |
| macro(RTCEncodedVideoFrame) \ |
| macro(RTCError) \ |
| macro(RTCErrorEvent) \ |
| macro(RTCIceCandidate) \ |
| macro(RTCIceTransport) \ |
| macro(RTCPeerConnection) \ |
| macro(RTCPeerConnectionIceEvent) \ |
| macro(RTCPeerConnectionIceErrorEvent) \ |
| macro(RTCRtpReceiver) \ |
| macro(RTCRtpScriptTransform) \ |
| macro(RTCRtpScriptTransformer) \ |
| macro(RTCRtpScriptTransformerContext) \ |
| macro(RTCRtpSender) \ |
| macro(RTCRtpTransceiver) \ |
| macro(RTCRtpTransform) \ |
| macro(RTCSctpTransport) \ |
| macro(RTCSessionDescription) \ |
| macro(RTCStatsReport) \ |
| macro(RTCTrackEvent) \ |
| macro(RTCTransformEvent) \ |
| macro(ReadableByteStreamController) \ |
| macro(ReadableStream) \ |
| macro(ReadableStreamBYOBReader) \ |
| macro(ReadableStreamBYOBRequest) \ |
| macro(ReadableStreamDefaultController) \ |
| macro(ReadableStreamDefaultReader) \ |
| macro(RemotePlayback) \ |
| macro(Request) \ |
| macro(Response) \ |
| macro(SFrameTransform) \ |
| macro(SFrameTransformErrorEvent) \ |
| macro(SQLError) \ |
| macro(SQLResultSet) \ |
| macro(SQLResultSetRowList) \ |
| macro(SQLTransaction) \ |
| macro(ScreenLuminance) \ |
| macro(ServiceWorker) \ |
| macro(ServiceWorkerContainer) \ |
| macro(ServiceWorkerGlobalScope) \ |
| macro(ServiceWorkerRegistration) \ |
| macro(ShadowRoot) \ |
| macro(SharedWorker) \ |
| macro(SharedWorkerGlobalScope) \ |
| macro(SpeechRecognition) \ |
| macro(SpeechRecognitionAlternative) \ |
| macro(SpeechRecognitionErrorEvent) \ |
| macro(SpeechRecognitionEvent) \ |
| macro(SpeechRecognitionResult) \ |
| macro(SpeechRecognitionResultList) \ |
| macro(SourceBuffer) \ |
| macro(SourceBufferList) \ |
| macro(StaticRange) \ |
| macro(StereoPannerNode) \ |
| macro(StylePropertyMapReadOnly) \ |
| macro(StylePropertyMap) \ |
| macro(StorageManager) \ |
| macro(StorageManagerFileSystemAccess) \ |
| macro(SubtleCrypto) \ |
| macro(TextDecoderStream) \ |
| macro(TextDecoderStreamDecoder) \ |
| macro(TextEncoderStream) \ |
| macro(TextEncoderStreamEncoder) \ |
| macro(TextTrackCue) \ |
| macro(TextTrackCueGeneric) \ |
| macro(TransformStream) \ |
| macro(TransformStreamDefaultController) \ |
| macro(UndoItem) \ |
| macro(UndoManager) \ |
| macro(VisualViewport) \ |
| macro(WebGL2RenderingContext) \ |
| macro(WebGLVertexArrayObject) \ |
| macro(WebGLTransformFeedback) \ |
| macro(WebKitMediaKeyError) \ |
| macro(WebKitMediaKeyMessageEvent) \ |
| macro(WebKitMediaKeyNeededEvent) \ |
| macro(WebKitMediaKeySession) \ |
| macro(WebKitMediaKeys) \ |
| macro(WebSocket) \ |
| macro(WindowClient) \ |
| macro(Worklet) \ |
| macro(WorkletGlobalScope) \ |
| macro(WritableStream) \ |
| macro(WritableStreamDefaultController) \ |
| macro(WritableStreamDefaultWriter) \ |
| macro(XMLHttpRequest) \ |
| macro(XRBoundedReferenceSpace) \ |
| macro(XRFrame) \ |
| macro(XRInputSource) \ |
| macro(XRInputSourceArray) \ |
| macro(XRInputSourceEvent) \ |
| macro(XRInputSourcesChangeEvent) \ |
| macro(XRLayer) \ |
| macro(XRPose) \ |
| macro(XRReferenceSpace) \ |
| macro(XRReferenceSpaceEvent) \ |
| macro(XRRenderState) \ |
| macro(XRRigidTransform) \ |
| macro(XRSession) \ |
| macro(XRSessionEvent) \ |
| macro(XRSpace) \ |
| macro(XRSystem) \ |
| macro(XRTest) \ |
| macro(XRView) \ |
| macro(XRViewerPose) \ |
| macro(XRViewport) \ |
| macro(XRWebGLLayer) \ |
| macro(abortAlgorithm) \ |
| macro(abortSteps) \ |
| macro(appendFromJS) \ |
| macro(associatedReadableByteStreamController) \ |
| macro(autoAllocateChunkSize) \ |
| macro(backingMap) \ |
| macro(backingSet) \ |
| macro(backpressure) \ |
| macro(backpressureChangePromise) \ |
| macro(blur) \ |
| macro(body) \ |
| macro(byobRequest) \ |
| macro(caches) \ |
| macro(cancel) \ |
| macro(cancelAlgorithm) \ |
| macro(cancelAnimationFrame) \ |
| macro(cancelIdleCallback) \ |
| macro(cloneArrayBuffer) \ |
| macro(close) \ |
| macro(closeAlgorithm) \ |
| macro(closeRequest) \ |
| macro(closeRequested) \ |
| macro(closed) \ |
| macro(closedPromise) \ |
| macro(closedPromiseCapability) \ |
| macro(collectMatchingElementsInFlatTree) \ |
| macro(consume) \ |
| macro(consumeChunk) \ |
| macro(controlledReadableStream) \ |
| macro(controller) \ |
| macro(createImageBitmap) \ |
| macro(createReadableStream) \ |
| macro(createWritableStreamFromInternal) \ |
| macro(crossOriginIsolated) \ |
| macro(customElements) \ |
| macro(decode) \ |
| macro(disturbed) \ |
| macro(document) \ |
| macro(encode) \ |
| macro(encoding) \ |
| macro(errorSteps) \ |
| macro(failureKind) \ |
| macro(fatal) \ |
| macro(fetch) \ |
| macro(fetchRequest) \ |
| macro(fillFromJS) \ |
| macro(finishConsumingStream) \ |
| macro(flush) \ |
| macro(flushAlgorithm) \ |
| macro(focus) \ |
| macro(frames) \ |
| macro(getInternalWritableStream) \ |
| macro(getTracks) \ |
| macro(getUserMedia) \ |
| macro(gpu) \ |
| macro(header) \ |
| macro(highWaterMark) \ |
| macro(href) \ |
| macro(ignoreBOM) \ |
| macro(inFlightCloseRequest) \ |
| macro(inFlightWriteRequest) \ |
| macro(indexedDB) \ |
| macro(initializeWith) \ |
| macro(internalStream) \ |
| macro(internalWritable) \ |
| macro(isAbortSignal) \ |
| macro(isDisturbed) \ |
| macro(isLoading) \ |
| macro(isSecureContext) \ |
| macro(kind) \ |
| macro(language) \ |
| macro(localStreams) \ |
| macro(location) \ |
| macro(makeDOMException) \ |
| macro(makeGetterTypeError) \ |
| macro(makeThisTypeError) \ |
| macro(matchingElementInFlatTree) \ |
| macro(mediaStreamTrackConstraints) \ |
| macro(onpush) \ |
| macro(onrtctransform) \ |
| macro(ontouchcancel) \ |
| macro(ontouchend) \ |
| macro(ontouchmove) \ |
| macro(ontouchstart) \ |
| macro(ontouchforcechange) \ |
| macro(onuncapturederror) \ |
| macro(onvrdisplayactivate) \ |
| macro(onvrdisplayblur) \ |
| macro(onvrdisplayconnect) \ |
| macro(onvrdisplaydeactivate) \ |
| macro(onvrdisplaydisconnect) \ |
| macro(onvrdisplayfocus) \ |
| macro(onvrdisplaypresentchange) \ |
| macro(openDatabase) \ |
| macro(opener) \ |
| macro(operations) \ |
| macro(ownerReadableStream) \ |
| macro(parent) \ |
| macro(pendingPullIntos) \ |
| macro(postMessage) \ |
| macro(privateGetStats) \ |
| macro(pull) \ |
| macro(pullAgain) \ |
| macro(pullAlgorithm) \ |
| macro(pulling) \ |
| macro(queue) \ |
| macro(queuedAddIceCandidate) \ |
| macro(queuedCreateAnswer) \ |
| macro(queuedCreateOffer) \ |
| macro(queuedSetLocalDescription) \ |
| macro(queuedSetRemoteDescription) \ |
| macro(readable) \ |
| macro(readIntoRequests) \ |
| macro(readRequests) \ |
| macro(readableByteStreamAPIEnabled) \ |
| macro(readableStreamController) \ |
| macro(reader) \ |
| macro(readyPromise) \ |
| macro(readyPromiseCapability) \ |
| macro(requestAnimationFrame) \ |
| macro(requestIdleCallback) \ |
| macro(response) \ |
| macro(responseCacheIsValid) \ |
| macro(retrieveResponse) \ |
| macro(self) \ |
| macro(setBody) \ |
| macro(setBodyFromInputRequest) \ |
| macro(setStatus) \ |
| macro(showModalDialog) \ |
| macro(size) \ |
| macro(start) \ |
| macro(startConsumingStream) \ |
| macro(started) \ |
| macro(startedPromise) \ |
| macro(state) \ |
| macro(storedError) \ |
| macro(strategy) \ |
| macro(strategyHWM) \ |
| macro(strategySizeAlgorithm) \ |
| macro(stream) \ |
| macro(streamClosed) \ |
| macro(streamClosing) \ |
| macro(streamErrored) \ |
| macro(streamReadable) \ |
| macro(streamWaiting) \ |
| macro(streamWritable) \ |
| macro(structuredCloneForStream) \ |
| macro(timeline) \ |
| macro(top) \ |
| macro(textDecoderStreamDecoder) \ |
| macro(textDecoderStreamTransform) \ |
| macro(textEncoderStreamEncoder) \ |
| macro(textEncoderStreamTransform) \ |
| macro(transformAlgorithm) \ |
| macro(underlyingByteSource) \ |
| macro(underlyingSink) \ |
| macro(underlyingSource) \ |
| macro(view) \ |
| macro(visualViewport) \ |
| macro(webkit) \ |
| macro(webkitAudioContext) \ |
| macro(webkitAudioPannerNode) \ |
| macro(webkitIDBCursor) \ |
| macro(webkitIDBDatabase) \ |
| macro(webkitIDBFactory) \ |
| macro(webkitIDBIndex) \ |
| macro(webkitIDBKeyRange) \ |
| macro(webkitIDBObjectStore) \ |
| macro(webkitIDBRequest) \ |
| macro(webkitIDBTransaction) \ |
| macro(webkitIndexedDB) \ |
| macro(webkitOfflineAudioContext) \ |
| macro(webkitOscillatorNode) \ |
| macro(webkitSpeechRecognition) \ |
| macro(whenSignalAborted) \ |
| macro(window) \ |
| macro(writable) \ |
| macro(writeAlgorithm) \ |
| macro(writing) \ |
| macro(writer) \ |
| macro(pendingAbortRequest) \ |
| macro(writeRequests) \ |
| WEBCORE_ADDITIONAL_PRIVATE_IDENTIFIERS(macro) \ |
| |
| class WebCoreBuiltinNames { |
| public: |
| // FIXME: Remove the __attribute__((nodebug)) when <rdar://68246686> is fixed. |
| #if COMPILER(CLANG) |
| __attribute__((nodebug)) |
| #endif |
| explicit WebCoreBuiltinNames(JSC::VM& vm) |
| : m_vm(vm) |
| WEBCORE_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(INITIALIZE_BUILTIN_NAMES) |
| { |
| #define EXPORT_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName()); |
| WEBCORE_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(EXPORT_NAME) |
| #undef EXPORT_NAME |
| } |
| |
| WEBCORE_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR) |
| |
| private: |
| JSC::VM& m_vm; |
| WEBCORE_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(DECLARE_BUILTIN_NAMES) |
| }; |
| |
| } // namespace WebCore |