1 | /* |
2 | * THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT. |
3 | * |
4 | * Copyright (C) 2011 Google Inc. All rights reserved. |
5 | * |
6 | * Redistribution and use in source and binary forms, with or without |
7 | * modification, are permitted provided that the following conditions |
8 | * are met: |
9 | * 1. Redistributions of source code must retain the above copyright |
10 | * notice, this list of conditions and the following disclaimer. |
11 | * 2. Redistributions in binary form must reproduce the above copyright |
12 | * notice, this list of conditions and the following disclaimer in the |
13 | * documentation and/or other materials provided with the distribution. |
14 | * |
15 | * THIS SOFTWARE IS PROVIDED BY GOOGLE, INC. ``AS IS'' AND ANY |
16 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
17 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
18 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR |
19 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
22 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
23 | * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (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 | #include "config.h" |
29 | #include "EventHeaders.h" |
30 | |
31 | #include "JSDOMGlobalObject.h" |
32 | #include <JavaScriptCore/StructureInlines.h> |
33 | |
34 | namespace WebCore { |
35 | |
36 | JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref<Event>&& impl) |
37 | { |
38 | switch (impl->eventInterface()) { |
39 | case AnimationEventInterfaceType: |
40 | return createWrapper<AnimationEvent>(globalObject, WTFMove(impl)); |
41 | case AnimationPlaybackEventInterfaceType: |
42 | return createWrapper<AnimationPlaybackEvent>(globalObject, WTFMove(impl)); |
43 | #if ENABLE(APPLE_PAY) |
44 | case ApplePayPaymentAuthorizedEventInterfaceType: |
45 | return createWrapper<ApplePayPaymentAuthorizedEvent>(globalObject, WTFMove(impl)); |
46 | #endif |
47 | #if ENABLE(APPLE_PAY) |
48 | case ApplePayPaymentMethodSelectedEventInterfaceType: |
49 | return createWrapper<ApplePayPaymentMethodSelectedEvent>(globalObject, WTFMove(impl)); |
50 | #endif |
51 | #if ENABLE(APPLE_PAY) |
52 | case ApplePayShippingContactSelectedEventInterfaceType: |
53 | return createWrapper<ApplePayShippingContactSelectedEvent>(globalObject, WTFMove(impl)); |
54 | #endif |
55 | #if ENABLE(APPLE_PAY) |
56 | case ApplePayShippingMethodSelectedEventInterfaceType: |
57 | return createWrapper<ApplePayShippingMethodSelectedEvent>(globalObject, WTFMove(impl)); |
58 | #endif |
59 | #if ENABLE(APPLE_PAY) |
60 | case ApplePayValidateMerchantEventInterfaceType: |
61 | return createWrapper<ApplePayValidateMerchantEvent>(globalObject, WTFMove(impl)); |
62 | #endif |
63 | #if ENABLE(WEB_AUDIO) |
64 | case AudioProcessingEventInterfaceType: |
65 | return createWrapper<AudioProcessingEvent>(globalObject, WTFMove(impl)); |
66 | #endif |
67 | case BeforeLoadEventInterfaceType: |
68 | return createWrapper<BeforeLoadEvent>(globalObject, WTFMove(impl)); |
69 | case BeforeUnloadEventInterfaceType: |
70 | return createWrapper<BeforeUnloadEvent>(globalObject, WTFMove(impl)); |
71 | #if ENABLE(MEDIA_STREAM) |
72 | case BlobEventInterfaceType: |
73 | return createWrapper<BlobEvent>(globalObject, WTFMove(impl)); |
74 | #endif |
75 | case ClipboardEventInterfaceType: |
76 | return createWrapper<ClipboardEvent>(globalObject, WTFMove(impl)); |
77 | case CloseEventInterfaceType: |
78 | return createWrapper<CloseEvent>(globalObject, WTFMove(impl)); |
79 | case CompositionEventInterfaceType: |
80 | return createWrapper<CompositionEvent>(globalObject, WTFMove(impl)); |
81 | case CustomEventInterfaceType: |
82 | return createWrapper<CustomEvent>(globalObject, WTFMove(impl)); |
83 | #if ENABLE(DEVICE_ORIENTATION) |
84 | case DeviceMotionEventInterfaceType: |
85 | return createWrapper<DeviceMotionEvent>(globalObject, WTFMove(impl)); |
86 | #endif |
87 | #if ENABLE(DEVICE_ORIENTATION) |
88 | case DeviceOrientationEventInterfaceType: |
89 | return createWrapper<DeviceOrientationEvent>(globalObject, WTFMove(impl)); |
90 | #endif |
91 | case ErrorEventInterfaceType: |
92 | return createWrapper<ErrorEvent>(globalObject, WTFMove(impl)); |
93 | case EventInterfaceType: |
94 | return createWrapper<Event>(globalObject, WTFMove(impl)); |
95 | #if ENABLE(SERVICE_WORKER) |
96 | case ExtendableEventInterfaceType: |
97 | return createWrapper<ExtendableEvent>(globalObject, WTFMove(impl)); |
98 | #endif |
99 | #if ENABLE(SERVICE_WORKER) |
100 | case ExtendableMessageEventInterfaceType: |
101 | return createWrapper<ExtendableMessageEvent>(globalObject, WTFMove(impl)); |
102 | #endif |
103 | #if ENABLE(SERVICE_WORKER) |
104 | case FetchEventInterfaceType: |
105 | return createWrapper<FetchEvent>(globalObject, WTFMove(impl)); |
106 | #endif |
107 | case FocusEventInterfaceType: |
108 | return createWrapper<FocusEvent>(globalObject, WTFMove(impl)); |
109 | #if ENABLE(GAMEPAD) |
110 | case GamepadEventInterfaceType: |
111 | return createWrapper<GamepadEvent>(globalObject, WTFMove(impl)); |
112 | #endif |
113 | #if ENABLE(IOS_GESTURE_EVENTS) || ENABLE(MAC_GESTURE_EVENTS) |
114 | case GestureEventInterfaceType: |
115 | return createWrapper<GestureEvent>(globalObject, WTFMove(impl)); |
116 | #endif |
117 | case HashChangeEventInterfaceType: |
118 | return createWrapper<HashChangeEvent>(globalObject, WTFMove(impl)); |
119 | #if ENABLE(INDEXED_DATABASE) |
120 | case IDBVersionChangeEventInterfaceType: |
121 | return createWrapper<IDBVersionChangeEvent>(globalObject, WTFMove(impl)); |
122 | #endif |
123 | case InputEventInterfaceType: |
124 | return createWrapper<InputEvent>(globalObject, WTFMove(impl)); |
125 | case KeyboardEventInterfaceType: |
126 | return createWrapper<KeyboardEvent>(globalObject, WTFMove(impl)); |
127 | #if ENABLE(ENCRYPTED_MEDIA) |
128 | case MediaEncryptedEventInterfaceType: |
129 | return createWrapper<MediaEncryptedEvent>(globalObject, WTFMove(impl)); |
130 | #endif |
131 | #if ENABLE(ENCRYPTED_MEDIA) |
132 | case MediaKeyMessageEventInterfaceType: |
133 | return createWrapper<MediaKeyMessageEvent>(globalObject, WTFMove(impl)); |
134 | #endif |
135 | #if ENABLE(MEDIA_STREAM) |
136 | case MediaRecorderErrorEventInterfaceType: |
137 | return createWrapper<MediaRecorderErrorEvent>(globalObject, WTFMove(impl)); |
138 | #endif |
139 | #if ENABLE(MEDIA_STREAM) |
140 | case MediaStreamTrackEventInterfaceType: |
141 | return createWrapper<MediaStreamTrackEvent>(globalObject, WTFMove(impl)); |
142 | #endif |
143 | #if ENABLE(PAYMENT_REQUEST) |
144 | case MerchantValidationEventInterfaceType: |
145 | return createWrapper<MerchantValidationEvent>(globalObject, WTFMove(impl)); |
146 | #endif |
147 | case MessageEventInterfaceType: |
148 | return createWrapper<MessageEvent>(globalObject, WTFMove(impl)); |
149 | case MouseEventInterfaceType: |
150 | return createWrapper<MouseEvent>(globalObject, WTFMove(impl)); |
151 | case MutationEventInterfaceType: |
152 | return createWrapper<MutationEvent>(globalObject, WTFMove(impl)); |
153 | #if ENABLE(WEB_AUDIO) |
154 | case OfflineAudioCompletionEventInterfaceType: |
155 | return createWrapper<OfflineAudioCompletionEvent>(globalObject, WTFMove(impl)); |
156 | #endif |
157 | #if ENABLE(MEDIA_STREAM) |
158 | case OverconstrainedErrorEventInterfaceType: |
159 | return createWrapper<OverconstrainedErrorEvent>(globalObject, WTFMove(impl)); |
160 | #endif |
161 | case OverflowEventInterfaceType: |
162 | return createWrapper<OverflowEvent>(globalObject, WTFMove(impl)); |
163 | case PageTransitionEventInterfaceType: |
164 | return createWrapper<PageTransitionEvent>(globalObject, WTFMove(impl)); |
165 | #if ENABLE(PAYMENT_REQUEST) |
166 | case PaymentMethodChangeEventInterfaceType: |
167 | return createWrapper<PaymentMethodChangeEvent>(globalObject, WTFMove(impl)); |
168 | #endif |
169 | #if ENABLE(PAYMENT_REQUEST) |
170 | case PaymentRequestUpdateEventInterfaceType: |
171 | return createWrapper<PaymentRequestUpdateEvent>(globalObject, WTFMove(impl)); |
172 | #endif |
173 | #if ENABLE(POINTER_EVENTS) |
174 | case PointerEventInterfaceType: |
175 | return createWrapper<PointerEvent>(globalObject, WTFMove(impl)); |
176 | #endif |
177 | case PopStateEventInterfaceType: |
178 | return createWrapper<PopStateEvent>(globalObject, WTFMove(impl)); |
179 | case ProgressEventInterfaceType: |
180 | return createWrapper<ProgressEvent>(globalObject, WTFMove(impl)); |
181 | case PromiseRejectionEventInterfaceType: |
182 | return createWrapper<PromiseRejectionEvent>(globalObject, WTFMove(impl)); |
183 | #if ENABLE(WEB_RTC_DTMF) |
184 | case RTCDTMFToneChangeEventInterfaceType: |
185 | return createWrapper<RTCDTMFToneChangeEvent>(globalObject, WTFMove(impl)); |
186 | #endif |
187 | #if ENABLE(WEB_RTC) |
188 | case RTCDataChannelEventInterfaceType: |
189 | return createWrapper<RTCDataChannelEvent>(globalObject, WTFMove(impl)); |
190 | #endif |
191 | #if ENABLE(WEB_RTC) |
192 | case RTCPeerConnectionIceEventInterfaceType: |
193 | return createWrapper<RTCPeerConnectionIceEvent>(globalObject, WTFMove(impl)); |
194 | #endif |
195 | #if ENABLE(WEB_RTC) |
196 | case RTCTrackEventInterfaceType: |
197 | return createWrapper<RTCTrackEvent>(globalObject, WTFMove(impl)); |
198 | #endif |
199 | case SVGZoomEventInterfaceType: |
200 | return createWrapper<SVGZoomEvent>(globalObject, WTFMove(impl)); |
201 | case SecurityPolicyViolationEventInterfaceType: |
202 | return createWrapper<SecurityPolicyViolationEvent>(globalObject, WTFMove(impl)); |
203 | #if ENABLE(SPEECH_SYNTHESIS) |
204 | case SpeechSynthesisEventInterfaceType: |
205 | return createWrapper<SpeechSynthesisEvent>(globalObject, WTFMove(impl)); |
206 | #endif |
207 | case StorageEventInterfaceType: |
208 | return createWrapper<StorageEvent>(globalObject, WTFMove(impl)); |
209 | case TextEventInterfaceType: |
210 | return createWrapper<TextEvent>(globalObject, WTFMove(impl)); |
211 | #if ENABLE(TOUCH_EVENTS) |
212 | case TouchEventInterfaceType: |
213 | return createWrapper<TouchEvent>(globalObject, WTFMove(impl)); |
214 | #endif |
215 | #if ENABLE(VIDEO_TRACK) |
216 | case TrackEventInterfaceType: |
217 | return createWrapper<TrackEvent>(globalObject, WTFMove(impl)); |
218 | #endif |
219 | case TransitionEventInterfaceType: |
220 | return createWrapper<TransitionEvent>(globalObject, WTFMove(impl)); |
221 | case UIEventInterfaceType: |
222 | return createWrapper<UIEvent>(globalObject, WTFMove(impl)); |
223 | case VRDisplayEventInterfaceType: |
224 | return createWrapper<VRDisplayEvent>(globalObject, WTFMove(impl)); |
225 | #if ENABLE(WEBGL) |
226 | case WebGLContextEventInterfaceType: |
227 | return createWrapper<WebGLContextEvent>(globalObject, WTFMove(impl)); |
228 | #endif |
229 | case WebKitAnimationEventInterfaceType: |
230 | return createWrapper<WebKitAnimationEvent>(globalObject, WTFMove(impl)); |
231 | #if ENABLE(LEGACY_ENCRYPTED_MEDIA) |
232 | case WebKitMediaKeyMessageEventInterfaceType: |
233 | return createWrapper<WebKitMediaKeyMessageEvent>(globalObject, WTFMove(impl)); |
234 | #endif |
235 | #if ENABLE(LEGACY_ENCRYPTED_MEDIA) |
236 | case WebKitMediaKeyNeededEventInterfaceType: |
237 | return createWrapper<WebKitMediaKeyNeededEvent>(globalObject, WTFMove(impl)); |
238 | #endif |
239 | #if ENABLE(WIRELESS_PLAYBACK_TARGET) |
240 | case WebKitPlaybackTargetAvailabilityEventInterfaceType: |
241 | return createWrapper<WebKitPlaybackTargetAvailabilityEvent>(globalObject, WTFMove(impl)); |
242 | #endif |
243 | case WebKitTransitionEventInterfaceType: |
244 | return createWrapper<WebKitTransitionEvent>(globalObject, WTFMove(impl)); |
245 | case WheelEventInterfaceType: |
246 | return createWrapper<WheelEvent>(globalObject, WTFMove(impl)); |
247 | case XMLHttpRequestProgressEventInterfaceType: |
248 | return createWrapper<XMLHttpRequestProgressEvent>(globalObject, WTFMove(impl)); |
249 | } |
250 | return createWrapper<Event>(globalObject, WTFMove(impl)); |
251 | } |
252 | |
253 | } // namespace WebCore |
254 | |