1 | /* |
2 | * Copyright (c) 2015, Canon Inc. All rights reserved. |
3 | * Copyright (C) 2018 Apple Inc. All rights reserved. |
4 | * |
5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions |
7 | * are met: |
8 | * 1. Redistributions of source code must retain the above copyright |
9 | * notice, this list of conditions and the following disclaimer. |
10 | * 2. Redistributions in binary form must reproduce the above copyright |
11 | * notice, this list of conditions and the following disclaimer in the |
12 | * documentation and/or other materials provided with the distribution. |
13 | * 3. Neither the name of Canon Inc. nor the names of |
14 | * its contributors may be used to endorse or promote products derived |
15 | * from this software without specific prior written permission. |
16 | * THIS SOFTWARE IS PROVIDED BY CANON INC. AND ITS CONTRIBUTORS "AS IS" AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL CANON INC. AND ITS CONTRIBUTORS BE LIABLE FOR |
20 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
23 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
24 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
25 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ |
27 | |
28 | #pragma once |
29 | |
30 | #include <JavaScriptCore/BuiltinUtils.h> |
31 | |
32 | #if USE(APPLE_INTERNAL_SDK) |
33 | #include <WebKitAdditions/WebCoreBuiltinNamesAdditions.h> |
34 | #endif |
35 | |
36 | namespace WebCore { |
37 | |
38 | #if !defined(WEBCORE_ADDITIONAL_PRIVATE_IDENTIFIERS) |
39 | #define WEBCORE_ADDITIONAL_PRIVATE_IDENTIFIERS(macro) |
40 | #endif |
41 | |
42 | #define WEBCORE_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(macro) \ |
43 | macro(Animation) \ |
44 | macro(AnimationEffect) \ |
45 | macro(AnimationPlaybackEvent) \ |
46 | macro(AnimationTimeline) \ |
47 | macro(ApplePaySession) \ |
48 | macro(AttachmentElement) \ |
49 | macro(Audio) \ |
50 | macro(AuthenticatorAssertionResponse) \ |
51 | macro(AuthenticatorAttestationResponse) \ |
52 | macro(AuthenticatorResponse) \ |
53 | macro(BlobEvent) \ |
54 | macro(Cache) \ |
55 | macro(CacheStorage) \ |
56 | macro(Client) \ |
57 | macro(Clients) \ |
58 | macro(Credential) \ |
59 | macro(CredentialsContainer) \ |
60 | macro(CSSAnimation) \ |
61 | macro(CSSImageValue) \ |
62 | macro(CSSNumericValue) \ |
63 | macro(CSSPaintSize) \ |
64 | macro(CSSStyleValue) \ |
65 | macro(CSSTransition) \ |
66 | macro(CSSUnitValue) \ |
67 | macro(CSSUnparsedValue) \ |
68 | macro(CustomElementRegistry) \ |
69 | macro(Database) \ |
70 | macro(DataTransferItem) \ |
71 | macro(DataTransferItemList) \ |
72 | macro(DocumentTimeline) \ |
73 | macro(ExtendableEvent) \ |
74 | macro(ExtendableMessageEvent) \ |
75 | macro(FetchEvent) \ |
76 | macro(FileSystem) \ |
77 | macro(FileSystemDirectoryEntry) \ |
78 | macro(FileSystemDirectoryReader) \ |
79 | macro(FileSystemEntry) \ |
80 | macro(FileSystemFileEntry) \ |
81 | macro(Gamepad) \ |
82 | macro(GamepadButton) \ |
83 | macro(GamepadEvent) \ |
84 | macro(GPU) \ |
85 | macro(GPUAdapter) \ |
86 | macro(GPUBindGroup) \ |
87 | macro(GPUBindGroupLayout) \ |
88 | macro(GPUBuffer) \ |
89 | macro(GPUBufferUsage) \ |
90 | macro(GPUCanvasContext) \ |
91 | macro(GPUColorWriteBits) \ |
92 | macro(GPUCommandBuffer) \ |
93 | macro(GPUCommandEncoder) \ |
94 | macro(GPUComputePassEncoder) \ |
95 | macro(GPUComputePipeline) \ |
96 | macro(GPUDevice) \ |
97 | macro(GPUPipelineLayout) \ |
98 | macro(GPUProgrammablePassEncoder) \ |
99 | macro(GPUQueue) \ |
100 | macro(GPURenderPassEncoder) \ |
101 | macro(GPURenderPipeline) \ |
102 | macro(GPUSampler) \ |
103 | macro(GPUShaderModule) \ |
104 | macro(GPUShaderStageBit) \ |
105 | macro(GPUSwapChain) \ |
106 | macro(GPUTexture) \ |
107 | macro(GPUTextureUsage) \ |
108 | macro(GPUTextureView) \ |
109 | macro(HTMLAttachmentElement) \ |
110 | macro(HTMLAudioElement) \ |
111 | macro(HTMLDataListElement) \ |
112 | macro(HTMLMenuItemElement) \ |
113 | macro(HTMLSlotElement) \ |
114 | macro(Headers) \ |
115 | macro(IDBCursor) \ |
116 | macro(IDBCursorWithValue) \ |
117 | macro(IDBDatabase) \ |
118 | macro(IDBFactory) \ |
119 | macro(IDBIndex) \ |
120 | macro(IDBKeyRange) \ |
121 | macro(IDBObjectStore) \ |
122 | macro(IDBOpenDBRequest) \ |
123 | macro(IDBRequest) \ |
124 | macro(IDBTransaction) \ |
125 | macro(IDBVersionChangeEvent) \ |
126 | macro(ImageBitmap) \ |
127 | macro(ImageBitmapRenderingContext) \ |
128 | macro(InputEvent) \ |
129 | macro(IntersectionObserver) \ |
130 | macro(IntersectionObserverEntry) \ |
131 | macro(KeyframeEffect) \ |
132 | macro(MediaCapabilities) \ |
133 | macro(MediaCapabilitiesInfo) \ |
134 | macro(MediaEncryptedEvent) \ |
135 | macro(MediaKeyMessageEvent) \ |
136 | macro(MediaKeySession) \ |
137 | macro(MediaKeyStatusMap) \ |
138 | macro(MediaKeySystemAccess) \ |
139 | macro(MediaKeys) \ |
140 | macro(MediaRecorder) \ |
141 | macro(MediaRecorderErrorEvent) \ |
142 | macro(MediaSource) \ |
143 | macro(MediaStream) \ |
144 | macro(MediaStreamTrack) \ |
145 | macro(MerchantValidationEvent) \ |
146 | macro(ModernMediaControls) \ |
147 | macro(NavigatorCredentials) \ |
148 | macro(NavigatorMediaDevices) \ |
149 | macro(NavigatorUserMedia) \ |
150 | macro(OffscreenCanvas) \ |
151 | macro(OffscreenCanvasRenderingContext2D) \ |
152 | macro(PaintRenderingContext2D) \ |
153 | macro(PaymentAddress) \ |
154 | macro(PaymentMethodChangeEvent) \ |
155 | macro(PaymentRequest) \ |
156 | macro(PaymentRequestUpdateEvent) \ |
157 | macro(PaymentResponse) \ |
158 | macro(SQLError) \ |
159 | macro(SQLResultSet) \ |
160 | macro(SQLResultSetRowList) \ |
161 | macro(SQLTransaction) \ |
162 | macro(PaintWorkletGlobalScope) \ |
163 | macro(PerformanceEntry) \ |
164 | macro(PerformanceEntryList) \ |
165 | macro(PerformanceMark) \ |
166 | macro(PerformanceMeasure) \ |
167 | macro(PerformanceObserver) \ |
168 | macro(PerformanceObserverEntryList) \ |
169 | macro(PerformanceResourceTiming) \ |
170 | macro(PerformanceServerTiming) \ |
171 | macro(PointerEvent) \ |
172 | macro(PublicKeyCredential) \ |
173 | macro(ResizeObserver) \ |
174 | macro(ResizeObserverEntry) \ |
175 | macro(RTCCertificate) \ |
176 | macro(RTCDTMFSender) \ |
177 | macro(RTCDTMFToneChangeEvent) \ |
178 | macro(RTCDataChannel) \ |
179 | macro(RTCDataChannelEvent) \ |
180 | macro(RTCIceCandidate) \ |
181 | macro(RTCIceTransport) \ |
182 | macro(RTCPeerConnection) \ |
183 | macro(RTCPeerConnectionIceEvent) \ |
184 | macro(RTCRtpReceiver) \ |
185 | macro(RTCRtpSender) \ |
186 | macro(RTCRtpTransceiver) \ |
187 | macro(RTCSessionDescription) \ |
188 | macro(RTCStatsReport) \ |
189 | macro(RTCTrackEvent) \ |
190 | macro(ReadableByteStreamController) \ |
191 | macro(ReadableStream) \ |
192 | macro(ReadableStreamBYOBReader) \ |
193 | macro(ReadableStreamBYOBRequest) \ |
194 | macro(ReadableStreamDefaultController) \ |
195 | macro(ReadableStreamDefaultReader) \ |
196 | macro(Request) \ |
197 | macro(Response) \ |
198 | macro(ScreenLuminance) \ |
199 | macro(ServiceWorker) \ |
200 | macro(ServiceWorkerContainer) \ |
201 | macro(ServiceWorkerGlobalScope) \ |
202 | macro(ServiceWorkerRegistration) \ |
203 | macro(ShadowRoot) \ |
204 | macro(SpectreGadget) \ |
205 | macro(StaticRange) \ |
206 | macro(StylePropertyMapReadOnly) \ |
207 | macro(StylePropertyMap) \ |
208 | macro(UndoItem) \ |
209 | macro(UndoManager) \ |
210 | macro(VRDisplay) \ |
211 | macro(VRDisplayCapabilities) \ |
212 | macro(VRDisplayEvent) \ |
213 | macro(VREyeParameters) \ |
214 | macro(VRFieldOfView) \ |
215 | macro(VRFrameData) \ |
216 | macro(VRStageParameters) \ |
217 | macro(VisualViewport) \ |
218 | macro(WebGL2RenderingContext) \ |
219 | macro(WebGLVertexArrayObject) \ |
220 | macro(WebKitMediaKeyError) \ |
221 | macro(WebKitMediaKeyMessageEvent) \ |
222 | macro(WebKitMediaKeyNeededEvent) \ |
223 | macro(WebKitMediaKeySession) \ |
224 | macro(WebKitMediaKeys) \ |
225 | macro(WebSocket) \ |
226 | macro(WindowClient) \ |
227 | macro(Worklet) \ |
228 | macro(WorkletGlobalScope) \ |
229 | macro(WritableStream) \ |
230 | macro(XMLHttpRequest) \ |
231 | macro(appendFromJS) \ |
232 | macro(associatedReadableByteStreamController) \ |
233 | macro(autoAllocateChunkSize) \ |
234 | macro(backingMap) \ |
235 | macro(blur) \ |
236 | macro(body) \ |
237 | macro(byobRequest) \ |
238 | macro(caches) \ |
239 | macro(cancel) \ |
240 | macro(cloneArrayBuffer) \ |
241 | macro(close) \ |
242 | macro(closeRequested) \ |
243 | macro(closed) \ |
244 | macro(closedPromiseCapability) \ |
245 | macro(collectMatchingElementsInFlatTree) \ |
246 | macro(consume) \ |
247 | macro(consumeChunk) \ |
248 | macro(controlledReadableStream) \ |
249 | macro(controller) \ |
250 | macro(createImageBitmap) \ |
251 | macro(createReadableStream) \ |
252 | macro(customElements) \ |
253 | macro(disturbed) \ |
254 | macro(document) \ |
255 | macro(failureKind) \ |
256 | macro(fetch) \ |
257 | macro(fetchRequest) \ |
258 | macro(fillFromJS) \ |
259 | macro(finishConsumingStream) \ |
260 | macro(focus) \ |
261 | macro(frames) \ |
262 | macro(getTracks) \ |
263 | macro(getUserMedia) \ |
264 | macro(gpu) \ |
265 | macro(header) \ |
266 | macro(href) \ |
267 | macro(indexedDB) \ |
268 | macro(initializeWith) \ |
269 | macro(isDisturbed) \ |
270 | macro(isLoading) \ |
271 | macro(isSecureContext) \ |
272 | macro(localStreams) \ |
273 | macro(location) \ |
274 | macro(makeGetterTypeError) \ |
275 | macro(makeThisTypeError) \ |
276 | macro(matchingElementInFlatTree) \ |
277 | macro(mediaStreamTrackConstraints) \ |
278 | macro(openDatabase) \ |
279 | macro(onvrdisplayactivate) \ |
280 | macro(onvrdisplayblur) \ |
281 | macro(onvrdisplayconnect) \ |
282 | macro(onvrdisplaydeactivate) \ |
283 | macro(onvrdisplaydisconnect) \ |
284 | macro(onvrdisplayfocus) \ |
285 | macro(onvrdisplaypresentchange) \ |
286 | macro(opener) \ |
287 | macro(operations) \ |
288 | macro(ownerReadableStream) \ |
289 | macro(parent) \ |
290 | macro(pendingPullIntos) \ |
291 | macro(postMessage) \ |
292 | macro(privateGetStats) \ |
293 | macro(pull) \ |
294 | macro(pullAgain) \ |
295 | macro(pulling) \ |
296 | macro(queue) \ |
297 | macro(queuedAddIceCandidate) \ |
298 | macro(queuedCreateAnswer) \ |
299 | macro(queuedCreateOffer) \ |
300 | macro(queuedSetLocalDescription) \ |
301 | macro(queuedSetRemoteDescription) \ |
302 | macro(readIntoRequests) \ |
303 | macro(readRequests) \ |
304 | macro(readableByteStreamAPIEnabled) \ |
305 | macro(readableStreamController) \ |
306 | macro(reader) \ |
307 | macro(readyPromiseCapability) \ |
308 | macro(response) \ |
309 | macro(responseCacheIsValid) \ |
310 | macro(retrieveResponse) \ |
311 | macro(self) \ |
312 | macro(setBody) \ |
313 | macro(setBodyFromInputRequest) \ |
314 | macro(setStatus) \ |
315 | macro(showModalDialog) \ |
316 | macro(startConsumingStream) \ |
317 | macro(started) \ |
318 | macro(startedPromise) \ |
319 | macro(state) \ |
320 | macro(storedError) \ |
321 | macro(strategy) \ |
322 | macro(strategyHWM) \ |
323 | macro(streamClosed) \ |
324 | macro(streamClosing) \ |
325 | macro(streamErrored) \ |
326 | macro(streamReadable) \ |
327 | macro(streamWaiting) \ |
328 | macro(streamWritable) \ |
329 | macro(structuredCloneArrayBuffer) \ |
330 | macro(structuredCloneArrayBufferView) \ |
331 | macro(top) \ |
332 | macro(underlyingByteSource) \ |
333 | macro(underlyingSink) \ |
334 | macro(underlyingSource) \ |
335 | macro(view) \ |
336 | macro(visualViewport) \ |
337 | macro(webkit) \ |
338 | macro(webkitAudioContext) \ |
339 | macro(webkitIDBCursor) \ |
340 | macro(webkitIDBDatabase) \ |
341 | macro(webkitIDBFactory) \ |
342 | macro(webkitIDBIndex) \ |
343 | macro(webkitIDBKeyRange) \ |
344 | macro(webkitIDBObjectStore) \ |
345 | macro(webkitIDBRequest) \ |
346 | macro(webkitIDBTransaction) \ |
347 | macro(webkitIndexedDB) \ |
348 | macro(window) \ |
349 | macro(writing) \ |
350 | WEBCORE_ADDITIONAL_PRIVATE_IDENTIFIERS(macro) \ |
351 | |
352 | class WebCoreBuiltinNames { |
353 | public: |
354 | explicit WebCoreBuiltinNames(JSC::VM* vm) |
355 | : m_vm(*vm) |
356 | WEBCORE_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(INITIALIZE_BUILTIN_NAMES) |
357 | { |
358 | #define EXPORT_NAME(name) m_vm.propertyNames->appendExternalName(name##PublicName(), name##PrivateName()); |
359 | WEBCORE_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(EXPORT_NAME) |
360 | #undef EXPORT_NAME |
361 | } |
362 | |
363 | WEBCORE_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(DECLARE_BUILTIN_IDENTIFIER_ACCESSOR) |
364 | |
365 | private: |
366 | JSC::VM& m_vm; |
367 | WEBCORE_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(DECLARE_BUILTIN_NAMES) |
368 | }; |
369 | |
370 | } // namespace WebCore |
371 | |