IndexedDB: Implement custom bindings for parsing options
[WebKit-https.git] / Source / WebCore / UseJSC.cmake
1 list(APPEND WebCore_INCLUDE_DIRECTORIES
2     "${WEBCORE_DIR}/bindings/js"
3     "${WEBCORE_DIR}/bridge/jsc"
4 )
5
6 list(APPEND WebCoreTestSupport_INCLUDE_DIRECTORIES
7     "${WEBCORE_DIR}/testing/js"
8 )
9
10 list(APPEND WebCore_IDL_INCLUDES
11     bindings/js
12 )
13
14 if (PORT MATCHES "BlackBerry")
15     list(APPEND WebCore_IDL_INCLUDES
16         testing/js
17     )
18     list(APPEND WebCore_IDL_FILES
19         testing/Internals.idl
20         testing/InternalSettings.idl
21     )
22 endif ()
23
24 list(APPEND WebCore_SOURCES
25     bindings/js/ArrayValue.cpp
26     bindings/js/BindingState.cpp
27     bindings/js/CallbackFunction.cpp
28     bindings/js/DOMObjectHashTableMap.cpp
29     bindings/js/DOMWrapperWorld.cpp
30     bindings/js/Dictionary.cpp
31     bindings/js/GCController.cpp
32     bindings/js/JSArrayBufferCustom.cpp
33     bindings/js/JSAttrCustom.cpp
34     bindings/js/JSBlobCustom.cpp
35     bindings/js/JSCDATASectionCustom.cpp
36     bindings/js/JSDataViewCustom.cpp
37     bindings/js/JSCSSFontFaceRuleCustom.cpp
38     bindings/js/JSCSSImportRuleCustom.cpp
39     bindings/js/JSCSSMediaRuleCustom.cpp
40     bindings/js/JSCSSPageRuleCustom.cpp
41     bindings/js/JSCSSRuleCustom.cpp
42     bindings/js/JSCSSRuleListCustom.cpp
43     bindings/js/JSCSSStyleDeclarationCustom.cpp
44     bindings/js/JSCSSStyleRuleCustom.cpp
45     bindings/js/JSCSSValueCustom.cpp
46     bindings/js/JSCallbackData.cpp
47     bindings/js/JSCanvasRenderingContext2DCustom.cpp
48     bindings/js/JSCanvasRenderingContextCustom.cpp
49     bindings/js/JSClipboardCustom.cpp
50     bindings/js/JSConsoleCustom.cpp
51     bindings/js/JSCoordinatesCustom.cpp
52     bindings/js/JSCustomXPathNSResolver.cpp
53     bindings/js/JSDictionary.cpp
54     bindings/js/JSDOMBinding.cpp
55     bindings/js/JSDOMFormDataCustom.cpp
56     bindings/js/JSDOMGlobalObject.cpp
57     bindings/js/JSDOMImplementationCustom.cpp
58     bindings/js/JSDOMMimeTypeArrayCustom.cpp
59     bindings/js/JSDOMPluginArrayCustom.cpp
60     bindings/js/JSDOMPluginCustom.cpp
61     bindings/js/JSDOMStringListCustom.cpp
62     bindings/js/JSDOMStringMapCustom.cpp
63     bindings/js/JSDOMTokenListCustom.cpp
64     bindings/js/JSDOMWindowBase.cpp
65     bindings/js/JSDOMWindowCustom.cpp
66     bindings/js/JSDOMWindowShell.cpp
67     bindings/js/JSDOMWindowWebAudioCustom.cpp
68     bindings/js/JSDOMWindowWebSocketCustom.cpp
69     bindings/js/JSDOMWrapper.cpp
70     bindings/js/JSDeviceMotionEventCustom.cpp
71     bindings/js/JSDeviceOrientationEventCustom.cpp
72     bindings/js/JSDocumentCustom.cpp
73     bindings/js/JSElementCustom.cpp
74     bindings/js/JSErrorHandler.cpp
75     bindings/js/JSEventCustom.cpp
76     bindings/js/JSEventListener.cpp
77     bindings/js/JSEventTargetCustom.cpp
78     bindings/js/JSExceptionBase.cpp
79     bindings/js/JSGeolocationCustom.cpp
80     bindings/js/JSHTMLAllCollectionCustom.cpp
81     bindings/js/JSHTMLAppletElementCustom.cpp
82     bindings/js/JSHTMLCanvasElementCustom.cpp
83     bindings/js/JSHTMLCollectionCustom.cpp
84     bindings/js/JSHTMLDocumentCustom.cpp
85     bindings/js/JSHTMLElementCustom.cpp
86     bindings/js/JSHTMLEmbedElementCustom.cpp
87     bindings/js/JSHTMLFormControlsCollectionCustom.cpp
88     bindings/js/JSHTMLFormElementCustom.cpp
89     bindings/js/JSHTMLFrameElementCustom.cpp
90     bindings/js/JSHTMLFrameSetElementCustom.cpp
91     bindings/js/JSHTMLInputElementCustom.cpp
92     bindings/js/JSHTMLLinkElementCustom.cpp
93     bindings/js/JSHTMLMediaElementCustom.cpp
94     bindings/js/JSHTMLObjectElementCustom.cpp
95     bindings/js/JSHTMLOptionsCollectionCustom.cpp
96     bindings/js/JSHTMLOutputElementCustom.cpp
97     bindings/js/JSHTMLSelectElementCustom.cpp
98     bindings/js/JSHTMLStyleElementCustom.cpp
99     bindings/js/JSHTMLTemplateElementCustom.cpp
100     bindings/js/JSHistoryCustom.cpp
101     bindings/js/JSImageConstructor.cpp
102     bindings/js/JSImageDataCustom.cpp
103     bindings/js/JSInjectedScriptHostCustom.cpp
104     bindings/js/JSInjectedScriptManager.cpp
105     bindings/js/JSInspectorFrontendHostCustom.cpp
106     bindings/js/JSJavaScriptCallFrameCustom.cpp
107     bindings/js/JSLazyEventListener.cpp
108     bindings/js/JSLocationCustom.cpp
109     bindings/js/JSMainThreadExecState.cpp
110     bindings/js/JSMediaListCustom.cpp
111     bindings/js/JSMemoryInfoCustom.cpp
112     bindings/js/JSMessageChannelCustom.cpp
113     bindings/js/JSMessageEventCustom.cpp
114     bindings/js/JSMessagePortCustom.cpp
115     bindings/js/JSMicroDataItemValueCustom.cpp
116     bindings/js/JSMutationCallbackCustom.cpp
117     bindings/js/JSMutationObserverCustom.cpp
118     bindings/js/JSNamedNodeMapCustom.cpp
119     bindings/js/JSNodeCustom.cpp
120     bindings/js/JSNodeFilterCondition.cpp
121     bindings/js/JSNodeFilterCustom.cpp
122     bindings/js/JSNodeIteratorCustom.cpp
123     bindings/js/JSNodeListCustom.cpp
124     bindings/js/JSNotificationCustom.cpp
125     bindings/js/JSPluginElementFunctions.cpp
126     bindings/js/JSPopStateEventCustom.cpp
127     bindings/js/JSProcessingInstructionCustom.cpp
128     bindings/js/JSStorageCustom.cpp
129     bindings/js/JSStyleSheetCustom.cpp
130     bindings/js/JSStyleSheetListCustom.cpp
131     bindings/js/JSTextCustom.cpp
132     bindings/js/JSTouchCustom.cpp
133     bindings/js/JSTouchListCustom.cpp
134     bindings/js/JSTreeWalkerCustom.cpp
135     bindings/js/JSWebKitCSSKeyframeRuleCustom.cpp
136     bindings/js/JSWebKitCSSKeyframesRuleCustom.cpp
137     bindings/js/JSWebKitPointCustom.cpp
138     bindings/js/JSXMLHttpRequestCustom.cpp
139     bindings/js/JSXMLHttpRequestUploadCustom.cpp
140     bindings/js/JSXPathResultCustom.cpp
141     bindings/js/JSXSLTProcessorCustom.cpp
142     bindings/js/JavaScriptCallFrame.cpp
143     bindings/js/PageScriptDebugServer.cpp
144     bindings/js/ScheduledAction.cpp
145     bindings/js/ScriptCachedFrameData.cpp
146     bindings/js/ScriptCallStackFactory.cpp
147     bindings/js/ScriptController.cpp
148     bindings/js/ScriptDebugServer.cpp
149     bindings/js/ScriptEventListener.cpp
150     bindings/js/ScriptFunctionCall.cpp
151     bindings/js/ScriptGCEvent.cpp
152     bindings/js/ScriptObject.cpp
153     bindings/js/ScriptProfile.cpp
154     bindings/js/ScriptProfiler.cpp
155     bindings/js/ScriptState.cpp
156     bindings/js/ScriptValue.cpp
157     bindings/js/SerializedScriptValue.cpp
158
159     bridge/IdentifierRep.cpp
160     bridge/NP_jsobject.cpp
161     bridge/npruntime.cpp
162     bridge/runtime_array.cpp
163     bridge/runtime_method.cpp
164     bridge/runtime_object.cpp
165     bridge/runtime_root.cpp
166
167     bridge/c/CRuntimeObject.cpp
168     bridge/c/c_class.cpp
169     bridge/c/c_instance.cpp
170     bridge/c/c_runtime.cpp
171     bridge/c/c_utility.cpp
172
173     bridge/jsc/BridgeJSC.cpp
174 )
175
176 list(APPEND WebCoreTestSupport_SOURCES
177     testing/js/WebCoreTestSupport.cpp
178 )
179
180 if (ENABLE_BLOB)
181     list(APPEND WebCore_SOURCES
182         bindings/js/JSFileReaderCustom.cpp
183     )
184 endif ()
185
186 if (ENABLE_REQUEST_ANIMATION_FRAME)
187     list(APPEND WebCore_SOURCES
188         bindings/js/JSRequestAnimationFrameCallbackCustom.cpp
189     )
190 endif ()
191
192 if (ENABLE_SQL_DATABASE)
193     list(APPEND WebCore_SOURCES
194         bindings/js/JSCustomSQLStatementErrorCallback.cpp
195         bindings/js/JSSQLResultSetRowListCustom.cpp
196         bindings/js/JSSQLTransactionCustom.cpp
197         bindings/js/JSSQLTransactionSyncCustom.cpp
198     )
199 endif ()
200
201 if (ENABLE_INDEXED_DATABASE)
202     list(APPEND WebCore_SOURCES
203         bindings/js/IDBBindingUtilities.cpp
204         bindings/js/JSIDBAnyCustom.cpp
205         bindings/js/JSIDBDatabaseCustom.cpp
206         bindings/js/JSIDBKeyCustom.cpp
207         bindings/js/JSIDBObjectStoreCustom.cpp
208     )
209 endif ()
210
211 if (ENABLE_WEB_SOCKETS)
212     list(APPEND WebCore_SOURCES
213         bindings/js/JSWebSocketCustom.cpp
214     )
215 endif ()
216
217 if (ENABLE_WORKERS)
218     list(APPEND WebCore_SOURCES
219         bindings/js/JSDedicatedWorkerContextCustom.cpp
220         bindings/js/JSWorkerContextBase.cpp
221         bindings/js/JSWorkerContextCustom.cpp
222         bindings/js/JSWorkerCustom.cpp
223         bindings/js/WorkerScriptController.cpp
224         bindings/js/WorkerScriptDebugServer.cpp
225     )
226 endif ()
227
228 if (ENABLE_VIDEO_TRACK)
229     list(APPEND WebCore_SOURCES
230         bindings/js/JSTextTrackCueCustom.cpp
231         bindings/js/JSTextTrackCustom.cpp
232         bindings/js/JSTextTrackListCustom.cpp
233         bindings/js/JSTrackCustom.cpp
234         bindings/js/JSTrackEventCustom.cpp
235     )
236 endif ()
237
238 if (ENABLE_SHARED_WORKERS)
239     list(APPEND WebCore_SOURCES
240         bindings/js/JSSharedWorkerCustom.cpp
241     )
242 endif ()
243
244 if (ENABLE_NOTIFICATIONS)
245     list(APPEND WebCore_SOURCES
246         bindings/js/JSDesktopNotificationsCustom.cpp
247         bindings/js/JSNotificationCustom.cpp
248     )
249 endif ()
250
251 if (ENABLE_FILE_SYSTEM)
252     list(APPEND WebCore_SOURCES
253         bindings/js/JSEntryCustom.cpp
254         bindings/js/JSEntrySyncCustom.cpp
255     )
256 endif ()
257
258 if (ENABLE_SVG)
259     list(APPEND WebCore_SOURCES
260         bindings/js/JSSVGElementInstanceCustom.cpp
261         bindings/js/JSSVGLengthCustom.cpp
262         bindings/js/JSSVGPathSegCustom.cpp
263     )
264 endif ()
265
266 if (ENABLE_WEBGL)
267     list(APPEND WebCore_SOURCES
268         bindings/js/JSWebGLRenderingContextCustom.cpp
269     )
270 endif ()
271
272 if (ENABLE_WEB_AUDIO)
273     list(APPEND WebCore_SOURCES
274         bindings/js/JSAudioBufferSourceNodeCustom.cpp
275         bindings/js/JSAudioContextCustom.cpp
276         bindings/js/JSScriptProcessorNodeCustom.cpp
277     )
278 endif ()
279
280 if (ENABLE_WEB_INTENTS)
281     list(APPEND WebCore_SOURCES
282         bindings/js/JSIntentConstructor.cpp
283     )
284 endif ()
285
286 list(APPEND SCRIPTS_BINDINGS
287     ${WEBCORE_DIR}/bindings/scripts/CodeGenerator.pm
288     ${WEBCORE_DIR}/bindings/scripts/CodeGeneratorJS.pm
289 )
290
291 set(IDL_INCLUDES "")
292 foreach (_include ${WebCore_IDL_INCLUDES})
293     list(APPEND IDL_INCLUDES --include=${WEBCORE_DIR}/${_include})
294 endforeach ()
295
296 foreach (_include ${WebCoreTestSupport_IDL_INCLUDES})
297     list(APPEND IDL_INCLUDES --include=${WEBCORE_DIR}/${_include})
298 endforeach ()
299
300 set(FEATURE_DEFINES_JAVASCRIPT "LANGUAGE_JAVASCRIPT=1 ${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}")
301
302 # Create JavaScript C++ code given an IDL input
303 foreach (_idl ${WebCore_IDL_FILES})
304     set(IDL_FILES_LIST "${IDL_FILES_LIST}${WEBCORE_DIR}/${_idl}\n")
305 endforeach ()
306
307 foreach (_idl ${WebCoreTestSupport_IDL_FILES})
308     set(IDL_FILES_LIST "${IDL_FILES_LIST}${WEBCORE_DIR}/${_idl}\n")
309 endforeach ()
310
311 file(WRITE ${IDL_FILES_TMP} ${IDL_FILES_LIST})
312
313 add_custom_command(
314     OUTPUT ${SUPPLEMENTAL_DEPENDENCY_FILE}
315     DEPENDS ${WEBCORE_DIR}/bindings/scripts/preprocess-idls.pl ${SCRIPTS_PREPROCESS_IDLS} ${WebCore_IDL_FILES} ${WebCoreTestSupport_IDL_FILES} ${IDL_ATTRIBUTES_FILE}
316     COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/bindings/scripts/preprocess-idls.pl --defines "${FEATURE_DEFINES_JAVASCRIPT}" --idlFilesList ${IDL_FILES_TMP} --preprocessor "${CODE_GENERATOR_PREPROCESSOR}" --supplementalDependencyFile ${SUPPLEMENTAL_DEPENDENCY_FILE} --idlAttributesFile ${IDL_ATTRIBUTES_FILE}
317     VERBATIM)
318
319 GENERATE_BINDINGS(WebCore_SOURCES
320     "${WebCore_IDL_FILES}"
321     "${WEBCORE_DIR}"
322     "${IDL_INCLUDES}"
323     "${FEATURE_DEFINES_JAVASCRIPT}"
324     ${DERIVED_SOURCES_WEBCORE_DIR} JS JS
325     ${SUPPLEMENTAL_DEPENDENCY_FILE})
326
327 GENERATE_BINDINGS(WebCoreTestSupport_SOURCES
328     "${WebCoreTestSupport_IDL_FILES}"
329     "${WEBCORE_DIR}"
330     "${IDL_INCLUDES}"
331     "${FEATURE_DEFINES_JAVASCRIPT}"
332     ${DERIVED_SOURCES_WEBCORE_DIR} JS JS
333     ${SUPPLEMENTAL_DEPENDENCY_FILE})