[GTK] Missing API detected in GObject DOM bindings after r176630
[WebKit-https.git] / Source / WebCore / PlatformGTK.cmake
1 list(APPEND WebCore_INCLUDE_DIRECTORIES
2     "${WEBCORE_DIR}/accessibility/atk"
3     "${WEBCORE_DIR}/editing/atk"
4     "${WEBCORE_DIR}/page/gtk"
5     "${WEBCORE_DIR}/platform/cairo"
6     "${WEBCORE_DIR}/platform/geoclue"
7     "${WEBCORE_DIR}/platform/gtk"
8     "${WEBCORE_DIR}/platform/graphics/cairo"
9     "${WEBCORE_DIR}/platform/graphics/egl"
10     "${WEBCORE_DIR}/platform/graphics/glx"
11     "${WEBCORE_DIR}/platform/graphics/gtk"
12     "${WEBCORE_DIR}/platform/graphics/freetype"
13     "${WEBCORE_DIR}/platform/graphics/harfbuzz/"
14     "${WEBCORE_DIR}/platform/graphics/harfbuzz/ng"
15     "${WEBCORE_DIR}/platform/graphics/opengl"
16     "${WEBCORE_DIR}/platform/graphics/opentype"
17     "${WEBCORE_DIR}/platform/graphics/wayland"
18     "${WEBCORE_DIR}/platform/linux"
19     "${WEBCORE_DIR}/platform/mediastream/gstreamer"
20     "${WEBCORE_DIR}/platform/mock/mediasource"
21     "${WEBCORE_DIR}/platform/network/gtk"
22     "${WEBCORE_DIR}/platform/network/soup"
23     "${WEBCORE_DIR}/platform/text/gtk"
24     "${WEBCORE_DIR}/platform/text/icu"
25 )
26
27 list(APPEND WebCore_SOURCES
28     accessibility/atk/AXObjectCacheAtk.cpp
29     accessibility/atk/AccessibilityObjectAtk.cpp
30     accessibility/atk/WebKitAccessibleHyperlink.cpp
31     accessibility/atk/WebKitAccessibleInterfaceAction.cpp
32     accessibility/atk/WebKitAccessibleInterfaceComponent.cpp
33     accessibility/atk/WebKitAccessibleInterfaceDocument.cpp
34     accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp
35     accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp
36     accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp
37     accessibility/atk/WebKitAccessibleInterfaceImage.cpp
38     accessibility/atk/WebKitAccessibleInterfaceSelection.cpp
39     accessibility/atk/WebKitAccessibleInterfaceTable.cpp
40     accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp
41     accessibility/atk/WebKitAccessibleInterfaceText.cpp
42     accessibility/atk/WebKitAccessibleInterfaceValue.cpp
43     accessibility/atk/WebKitAccessibleUtil.cpp
44     accessibility/atk/WebKitAccessibleWrapperAtk.cpp
45
46     editing/atk/FrameSelectionAtk.cpp
47     editing/SmartReplace.cpp
48
49     loader/soup/CachedRawResourceSoup.cpp
50     loader/soup/SubresourceLoaderSoup.cpp
51
52     platform/Cursor.cpp
53     platform/PlatformStrategies.cpp
54
55     platform/audio/gtk/AudioBusGtk.cpp
56
57     platform/audio/gstreamer/AudioDestinationGStreamer.cpp
58     platform/audio/gstreamer/AudioFileReaderGStreamer.cpp
59     platform/audio/gstreamer/FFTFrameGStreamer.cpp
60     platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp
61
62     platform/geoclue/GeolocationProviderGeoclue1.cpp
63     platform/geoclue/GeolocationProviderGeoclue2.cpp
64
65     platform/graphics/GraphicsContext3DPrivate.cpp
66     platform/graphics/ImageSource.cpp
67     platform/graphics/OpenGLShims.cpp
68     platform/graphics/WOFFFileFormat.cpp
69
70     platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp
71     platform/graphics/cairo/BackingStoreBackendCairoX11.cpp
72     platform/graphics/cairo/BitmapImageCairo.cpp
73     platform/graphics/cairo/CairoUtilities.cpp
74     platform/graphics/cairo/DrawingBufferCairo.cpp
75     platform/graphics/cairo/FloatRectCairo.cpp
76     platform/graphics/cairo/FontCairo.cpp
77     platform/graphics/cairo/FontCairoHarfbuzzNG.cpp
78     platform/graphics/cairo/GradientCairo.cpp
79     platform/graphics/cairo/GraphicsContext3DCairo.cpp
80     platform/graphics/cairo/GraphicsContextCairo.cpp
81     platform/graphics/cairo/ImageBufferCairo.cpp
82     platform/graphics/cairo/ImageCairo.cpp
83     platform/graphics/cairo/IntRectCairo.cpp
84     platform/graphics/cairo/OwnPtrCairo.cpp
85     platform/graphics/cairo/PathCairo.cpp
86     platform/graphics/cairo/PatternCairo.cpp
87     platform/graphics/cairo/PlatformContextCairo.cpp
88     platform/graphics/cairo/PlatformPathCairo.cpp
89     platform/graphics/cairo/RefPtrCairo.cpp
90     platform/graphics/cairo/TransformationMatrixCairo.cpp
91
92     platform/graphics/freetype/FontCacheFreeType.cpp
93     platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp
94     platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp
95     platform/graphics/freetype/SimpleFontDataFreeType.cpp
96
97     platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp
98     platform/graphics/gstreamer/GRefPtrGStreamer.cpp
99     platform/graphics/gstreamer/GStreamerUtilities.cpp
100     platform/graphics/gstreamer/ImageGStreamerCairo.cpp
101     platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp
102     platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
103     platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
104     platform/graphics/gstreamer/MediaSourceGStreamer.cpp
105     platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp
106     platform/graphics/gstreamer/TextCombinerGStreamer.cpp
107     platform/graphics/gstreamer/TextSinkGStreamer.cpp
108     platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp
109     platform/graphics/gstreamer/VideoSinkGStreamer.cpp
110     platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp
111     platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp
112     platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
113
114     platform/graphics/harfbuzz/HarfBuzzFace.cpp
115     platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp
116     platform/graphics/harfbuzz/HarfBuzzShaper.cpp
117
118     platform/graphics/opengl/Extensions3DOpenGL.cpp
119     platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
120     platform/graphics/opengl/Extensions3DOpenGLES.cpp
121     platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
122     platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
123     platform/graphics/opengl/TemporaryOpenGLSetting.cpp
124
125     platform/graphics/opentype/OpenTypeVerticalData.cpp
126
127     platform/gtk/ErrorsGtk.cpp
128     platform/gtk/EventLoopGtk.cpp
129     platform/gtk/FileSystemGtk.cpp
130     platform/gtk/GamepadsGtk.cpp
131     platform/gtk/LanguageGtk.cpp
132     platform/gtk/LoggingGtk.cpp
133     platform/gtk/MIMETypeRegistryGtk.cpp
134     platform/gtk/SharedBufferGtk.cpp
135     platform/gtk/SharedTimerGtk.cpp
136     platform/gtk/TemporaryLinkStubs.cpp
137     platform/gtk/UserAgentGtk.cpp
138
139     platform/image-decoders/ImageDecoder.cpp
140
141     platform/image-decoders/cairo/ImageDecoderCairo.cpp
142
143     platform/image-decoders/gif/GIFImageDecoder.cpp
144     platform/image-decoders/gif/GIFImageReader.cpp
145
146     platform/image-decoders/ico/ICOImageDecoder.cpp
147
148     platform/image-decoders/jpeg/JPEGImageDecoder.cpp
149
150     platform/image-decoders/bmp/BMPImageDecoder.cpp
151     platform/image-decoders/bmp/BMPImageReader.cpp
152
153     platform/image-decoders/png/PNGImageDecoder.cpp
154
155     platform/image-decoders/webp/WEBPImageDecoder.cpp
156
157     platform/linux/GamepadDeviceLinux.cpp
158
159     platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp
160
161     platform/network/soup/AuthenticationChallengeSoup.cpp
162     platform/network/soup/CertificateInfo.cpp
163     platform/network/soup/CookieJarSoup.cpp
164     platform/network/soup/CookieStorageSoup.cpp
165     platform/network/soup/CredentialStorageSoup.cpp
166     platform/network/soup/DNSSoup.cpp
167     platform/network/soup/NetworkStorageSessionSoup.cpp
168     platform/network/soup/ProxyServerSoup.cpp
169     platform/network/soup/ResourceErrorSoup.cpp
170     platform/network/soup/ResourceHandleSoup.cpp
171     platform/network/soup/ResourceRequestSoup.cpp
172     platform/network/soup/ResourceResponseSoup.cpp
173     platform/network/soup/SocketStreamHandleSoup.cpp
174     platform/network/soup/SoupNetworkSession.cpp
175     platform/network/soup/SynchronousLoaderClientSoup.cpp
176
177     platform/soup/SharedBufferSoup.cpp
178     platform/soup/URLSoup.cpp
179
180     platform/text/icu/UTextProvider.cpp
181     platform/text/icu/UTextProviderLatin1.cpp
182     platform/text/icu/UTextProviderUTF16.cpp
183     platform/text/LocaleICU.cpp
184     platform/text/TextCodecICU.cpp
185     platform/text/TextEncodingDetectorICU.cpp
186
187     platform/text/enchant/TextCheckerEnchant.cpp
188
189     platform/text/gtk/TextBreakIteratorInternalICUGtk.cpp
190
191     platform/network/gtk/CredentialBackingStore.cpp
192
193     plugins/PluginPackageNone.cpp
194     plugins/PluginViewNone.cpp
195 )
196
197 list(APPEND WebCorePlatformGTK_SOURCES
198     editing/gtk/EditorGtk.cpp
199
200     page/gtk/DragControllerGtk.cpp
201     page/gtk/EventHandlerGtk.cpp
202
203     platform/graphics/GLContext.cpp
204
205     platform/graphics/egl/GLContextEGL.cpp
206
207     platform/graphics/freetype/FontPlatformDataFreeType.cpp
208
209     platform/graphics/glx/GLContextGLX.cpp
210
211     platform/graphics/gtk/ColorGtk.cpp
212     platform/graphics/gtk/GdkCairoUtilities.cpp
213     platform/graphics/gtk/IconGtk.cpp
214     platform/graphics/gtk/ImageBufferGtk.cpp
215     platform/graphics/gtk/ImageGtk.cpp
216
217     platform/gtk/ContextMenuGtk.cpp
218     platform/gtk/ContextMenuItemGtk.cpp
219     platform/gtk/CursorGtk.cpp
220     platform/gtk/DataObjectGtk.cpp
221     platform/gtk/DragDataGtk.cpp
222     platform/gtk/DragIcon.cpp
223     platform/gtk/DragImageGtk.cpp
224     platform/gtk/GRefPtrGtk.cpp
225     platform/gtk/GtkClickCounter.cpp
226     platform/gtk/GtkUtilities.cpp
227     platform/gtk/GtkVersioning.c
228     platform/gtk/KeyBindingTranslator.cpp
229     platform/gtk/LocalizedStringsGtk.cpp
230     platform/gtk/PasteboardGtk.cpp
231     platform/gtk/PasteboardHelper.cpp
232     platform/gtk/PlatformKeyboardEventGtk.cpp
233     platform/gtk/PlatformMouseEventGtk.cpp
234     platform/gtk/PlatformScreenGtk.cpp
235     platform/gtk/PlatformWheelEventGtk.cpp
236     platform/gtk/ScrollbarThemeGtk.cpp
237     platform/gtk/SoundGtk.cpp
238     platform/gtk/WidgetGtk.cpp
239
240     rendering/RenderThemeGtk.cpp
241 )
242
243 if (WTF_USE_GEOCLUE2)
244     list(APPEND WebCore_SOURCES
245         ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c
246     )
247     execute_process(COMMAND pkg-config --variable dbus_interface geoclue-2.0 OUTPUT_VARIABLE GEOCLUE_DBUS_INTERFACE)
248     add_custom_command(
249          OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.h
250          COMMAND gdbus-codegen --interface-prefix org.freedesktop.GeoClue2. --c-namespace Geoclue --generate-c-code ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface ${GEOCLUE_DBUS_INTERFACE}
251     )
252 endif ()
253
254 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
255     ${WEBCORE_DIR}/css/mediaControlsGtk.css
256 )
257
258 set(WebCore_USER_AGENT_SCRIPTS
259     ${WEBCORE_DIR}/English.lproj/mediaControlsLocalizedStrings.js
260     ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsBase.js
261     ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsGtk.js
262 )
263
264 set(WebCore_USER_AGENT_SCRIPTS_DEPENDENCIES ${WEBCORE_DIR}/platform/gtk/RenderThemeGtk.cpp)
265
266 list(APPEND WebCore_LIBRARIES
267     ${ATK_LIBRARIES}
268     ${CAIRO_LIBRARIES}
269     ${ENCHANT_LIBRARIES}
270     ${FONTCONFIG_LIBRARIES}
271     ${FREETYPE2_LIBRARIES}
272     ${GEOCLUE_LIBRARIES}
273     ${GLIB_GIO_LIBRARIES}
274     ${GLIB_GMODULE_LIBRARIES}
275     ${GLIB_GOBJECT_LIBRARIES}
276     ${GLIB_LIBRARIES}
277     ${GUDEV_LIBRARIES}
278     ${HARFBUZZ_LIBRARIES}
279     ${ICU_LIBRARIES}
280     ${JPEG_LIBRARIES}
281     ${LIBSECRET_LIBRARIES}
282     ${LIBSOUP_LIBRARIES}
283     ${LIBXML2_LIBRARIES}
284     ${LIBXSLT_LIBRARIES}
285     ${PNG_LIBRARIES}
286     ${SQLITE_LIBRARIES}
287     ${WEBP_LIBRARIES}
288     ${X11_X11_LIB}
289     ${X11_Xcomposite_LIB}
290     ${X11_Xdamage_LIB}
291     ${X11_Xrender_LIB}
292     ${X11_Xt_LIB}
293     ${ZLIB_LIBRARIES}
294 )
295
296 list(APPEND WebCore_INCLUDE_DIRECTORIES
297     ${ATK_INCLUDE_DIRS}
298     ${CAIRO_INCLUDE_DIRS}
299     ${ENCHANT_INCLUDE_DIRS}
300     ${FREETYPE2_INCLUDE_DIRS}
301     ${GEOCLUE_INCLUDE_DIRS}
302     ${GIO_UNIX_INCLUDE_DIRS}
303     ${GLIB_INCLUDE_DIRS}
304     ${GUDEV_INCLUDE_DIRS}
305     ${HARFBUZZ_INCLUDE_DIRS}
306     ${ICU_INCLUDE_DIRS}
307     ${LIBSECRET_INCLUDE_DIRS}
308     ${LIBSOUP_INCLUDE_DIRS}
309     ${LIBXML2_INCLUDE_DIR}
310     ${LIBXSLT_INCLUDE_DIR}
311     ${SQLITE_INCLUDE_DIR}
312     ${WEBP_INCLUDE_DIRS}
313     ${ZLIB_INCLUDE_DIRS}
314 )
315
316 if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
317     list(APPEND WebCore_INCLUDE_DIRECTORIES
318         ${WEBCORE_DIR}/platform/graphics/gstreamer
319         ${GSTREAMER_INCLUDE_DIRS}
320         ${GSTREAMER_BASE_INCLUDE_DIRS}
321         ${GSTREAMER_APP_INCLUDE_DIRS}
322         ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
323     )
324
325     list(APPEND WebCore_LIBRARIES
326         ${GSTREAMER_APP_LIBRARIES}
327         ${GSTREAMER_BASE_LIBRARIES}
328         ${GSTREAMER_LIBRARIES}
329         ${GSTREAMER_PBUTILS_LIBRARIES}
330     )
331     # Avoiding a GLib deprecation warning due to GStreamer API using deprecated classes.
332     set_source_files_properties(platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp PROPERTIES COMPILE_DEFINITIONS "GLIB_DISABLE_DEPRECATION_WARNINGS=1")
333 endif ()
334
335 if (ENABLE_VIDEO)
336     list(APPEND WebCore_INCLUDE_DIRECTORIES
337         ${GSTREAMER_TAG_INCLUDE_DIRS}
338         ${GSTREAMER_VIDEO_INCLUDE_DIRS}
339     )
340     list(APPEND WebCore_LIBRARIES
341         ${GSTREAMER_TAG_LIBRARIES}
342         ${GSTREAMER_VIDEO_LIBRARIES}
343     )
344
345     if (USE_GSTREAMER_MPEGTS)
346         list(APPEND WebCore_INCLUDE_DIRECTORIES
347             ${GSTREAMER_MPEGTS_INCLUDE_DIRS}
348         )
349
350         list(APPEND WebCore_LIBRARIES
351             ${GSTREAMER_MPEGTS_LIBRARIES}
352         )
353     endif ()
354 endif ()
355
356 if (ENABLE_WEB_AUDIO)
357     list(APPEND WebCore_INCLUDE_DIRECTORIES
358         ${WEBCORE_DIR}/platform/audio/gstreamer
359         ${GSTREAMER_AUDIO_INCLUDE_DIRS}
360         ${GSTREAMER_FFT_INCLUDE_DIRS}
361     )
362     list(APPEND WebCore_LIBRARIES
363         ${GSTREAMER_AUDIO_LIBRARIES}
364         ${GSTREAMER_FFT_LIBRARIES}
365     )
366 endif ()
367
368 if (ENABLE_TEXTURE_MAPPER)
369     list(APPEND WebCore_INCLUDE_DIRECTORIES
370         "${WEBCORE_DIR}/platform/graphics/texmap"
371     )
372     list(APPEND WebCore_SOURCES
373         platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
374         platform/graphics/texmap/TextureMapperGL.cpp
375         platform/graphics/texmap/TextureMapperShaderProgram.cpp
376     )
377 endif ()
378
379 if (WTF_USE_EGL)
380     list(APPEND WebCore_LIBRARIES
381         ${EGL_LIBRARY}
382     )
383 endif ()
384
385 if (ENABLE_PLUGIN_PROCESS_GTK2)
386     # WebKitPluginProcess2 needs a version of WebCore compiled against GTK+2, so we've isolated all the GTK+
387     # dependent files into a separate library which can be used to construct a GTK+2 WebCore
388     # for the plugin process.
389     add_library(WebCorePlatformGTK2 ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
390     add_dependencies(WebCorePlatformGTK2 WebCore)
391     WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCorePlatformGTK2)
392     set_property(TARGET WebCorePlatformGTK2
393         APPEND
394         PROPERTY COMPILE_DEFINITIONS GTK_API_VERSION_2=1
395     )
396     set_property(
397         TARGET WebCorePlatformGTK2
398         APPEND
399         PROPERTY INCLUDE_DIRECTORIES
400             ${WebCore_INCLUDE_DIRECTORIES}
401             ${GTK2_INCLUDE_DIRS}
402             ${GDK2_INCLUDE_DIRS}
403     )
404     target_link_libraries(WebCorePlatformGTK2
405          ${WebCore_LIBRARIES}
406          ${GTK2_LIBRARIES}
407          ${GDK2_LIBRARIES}
408     )
409 endif ()
410
411 # Wayland protocol extension.
412 add_custom_command(
413     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitGtkWaylandClientProtocol.c
414     DEPENDS ${WEBCORE_DIR}/platform/graphics/wayland/WebKitGtkWaylandClientProtocol.xml
415     COMMAND wayland-scanner server-header < ${WEBCORE_DIR}/platform/graphics/wayland/WebKitGtkWaylandClientProtocol.xml > ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitGtkWaylandServerProtocol.h
416     COMMAND wayland-scanner client-header < ${WEBCORE_DIR}/platform/graphics/wayland/WebKitGtkWaylandClientProtocol.xml > ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitGtkWaylandClientProtocol.h
417     COMMAND wayland-scanner code < ${WEBCORE_DIR}/platform/graphics/wayland/WebKitGtkWaylandClientProtocol.xml > ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitGtkWaylandClientProtocol.c
418 )
419
420 if (ENABLE_WAYLAND_TARGET)
421     list(APPEND WebCorePlatformGTK_SOURCES
422         platform/graphics/wayland/WaylandDisplay.cpp
423         platform/graphics/wayland/WaylandEventSource.cpp
424         platform/graphics/wayland/WaylandSurface.cpp
425
426         ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitGtkWaylandClientProtocol.c
427     )
428
429     list(APPEND WebCore_INCLUDE_DIRECTORIES
430         ${WAYLAND_INCLUDE_DIRECTORIES}
431     )
432     list(APPEND WebCore_LIBRARIES
433         ${WAYLAND_LIBRARIES}
434     )
435 endif ()
436
437 add_library(WebCorePlatformGTK ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
438 add_dependencies(WebCorePlatformGTK WebCore)
439 WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCorePlatformGTK)
440 set_property(
441     TARGET WebCorePlatformGTK
442     APPEND
443     PROPERTY INCLUDE_DIRECTORIES
444         ${WebCore_INCLUDE_DIRECTORIES}
445         ${GTK_INCLUDE_DIRS}
446         ${GDK_INCLUDE_DIRS}
447 )
448 target_link_libraries(WebCorePlatformGTK
449     ${WebCore_LIBRARIES}
450     ${GTK_LIBRARIES}
451     ${GDK_LIBRARIES}
452 )
453
454 include_directories(
455     ${WebCore_INCLUDE_DIRECTORIES}
456     "${WEBCORE_DIR}/bindings/gobject/"
457     "${DERIVED_SOURCES_DIR}"
458     "${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}"
459 )
460
461 list(APPEND GObjectDOMBindings_SOURCES
462     bindings/gobject/ConvertToUTF8String.cpp
463     bindings/gobject/DOMObjectCache.cpp
464     bindings/gobject/GObjectEventListener.cpp
465     bindings/gobject/GObjectNodeFilterCondition.cpp
466     bindings/gobject/GObjectXPathNSResolver.cpp
467     bindings/gobject/WebKitDOMCustom.cpp
468     bindings/gobject/WebKitDOMDeprecated.cpp
469     bindings/gobject/WebKitDOMEventTarget.cpp
470     bindings/gobject/WebKitDOMHTMLPrivate.cpp
471     bindings/gobject/WebKitDOMNodeFilter.cpp
472     bindings/gobject/WebKitDOMObject.cpp
473     bindings/gobject/WebKitDOMPrivate.cpp
474     bindings/gobject/WebKitDOMXPathNSResolver.cpp
475     ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines.h
476     ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines-unstable.h
477     ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdom.h
478 )
479
480 list(APPEND GObjectDOMBindingsStable_IDL_FILES
481     css/CSSRule.idl
482     css/CSSRuleList.idl
483     css/CSSStyleDeclaration.idl
484     css/CSSStyleSheet.idl
485     css/CSSValue.idl
486     css/MediaList.idl
487     css/StyleSheet.idl
488     css/StyleSheetList.idl
489
490     dom/Attr.idl
491     dom/CDATASection.idl
492     dom/CharacterData.idl
493     dom/Comment.idl
494     dom/DOMImplementation.idl
495     dom/Document.idl
496     dom/DocumentFragment.idl
497     dom/DocumentType.idl
498     dom/Element.idl
499     dom/EntityReference.idl
500     dom/Event.idl
501     dom/KeyboardEvent.idl
502     dom/MouseEvent.idl
503     dom/NamedNodeMap.idl
504     dom/Node.idl
505     dom/NodeIterator.idl
506     dom/NodeList.idl
507     dom/ProcessingInstruction.idl
508     dom/Range.idl
509     dom/Text.idl
510     dom/TreeWalker.idl
511     dom/UIEvent.idl
512     dom/WheelEvent.idl
513
514     fileapi/Blob.idl
515     fileapi/File.idl
516     fileapi/FileList.idl
517
518     html/HTMLAnchorElement.idl
519     html/HTMLAppletElement.idl
520     html/HTMLAreaElement.idl
521     html/HTMLBRElement.idl
522     html/HTMLBaseElement.idl
523     html/HTMLBaseFontElement.idl
524     html/HTMLBodyElement.idl
525     html/HTMLButtonElement.idl
526     html/HTMLCanvasElement.idl
527     html/HTMLCollection.idl
528     html/HTMLDListElement.idl
529     html/HTMLDirectoryElement.idl
530     html/HTMLDivElement.idl
531     html/HTMLDocument.idl
532     html/HTMLElement.idl
533     html/HTMLEmbedElement.idl
534     html/HTMLFieldSetElement.idl
535     html/HTMLFontElement.idl
536     html/HTMLFormElement.idl
537     html/HTMLFrameElement.idl
538     html/HTMLFrameSetElement.idl
539     html/HTMLHRElement.idl
540     html/HTMLHeadElement.idl
541     html/HTMLHeadingElement.idl
542     html/HTMLHtmlElement.idl
543     html/HTMLIFrameElement.idl
544     html/HTMLImageElement.idl
545     html/HTMLInputElement.idl
546     html/HTMLLIElement.idl
547     html/HTMLLabelElement.idl
548     html/HTMLLegendElement.idl
549     html/HTMLLinkElement.idl
550     html/HTMLMapElement.idl
551     html/HTMLMarqueeElement.idl
552     html/HTMLMenuElement.idl
553     html/HTMLMetaElement.idl
554     html/HTMLModElement.idl
555     html/HTMLOListElement.idl
556     html/HTMLObjectElement.idl
557     html/HTMLOptGroupElement.idl
558     html/HTMLOptionElement.idl
559     html/HTMLOptionsCollection.idl
560     html/HTMLParagraphElement.idl
561     html/HTMLParamElement.idl
562     html/HTMLPreElement.idl
563     html/HTMLQuoteElement.idl
564     html/HTMLScriptElement.idl
565     html/HTMLSelectElement.idl
566     html/HTMLStyleElement.idl
567     html/HTMLTableCaptionElement.idl
568     html/HTMLTableCellElement.idl
569     html/HTMLTableColElement.idl
570     html/HTMLTableElement.idl
571     html/HTMLTableRowElement.idl
572     html/HTMLTableSectionElement.idl
573     html/HTMLTextAreaElement.idl
574     html/HTMLTitleElement.idl
575     html/HTMLUListElement.idl
576
577     page/DOMWindow.idl
578
579     xml/XPathExpression.idl
580     xml/XPathResult.idl
581 )
582
583 list(APPEND GObjectDOMBindingsUnstable_IDL_FILES
584     Modules/battery/BatteryManager.idl
585
586     Modules/gamepad/deprecated/Gamepad.idl
587     Modules/gamepad/deprecated/GamepadList.idl
588
589     Modules/geolocation/Geolocation.idl
590
591     Modules/mediasource/VideoPlaybackQuality.idl
592
593     Modules/quota/StorageInfo.idl
594     Modules/quota/StorageQuota.idl
595
596     Modules/speech/DOMWindowSpeechSynthesis.idl
597     Modules/speech/SpeechSynthesis.idl
598     Modules/speech/SpeechSynthesisEvent.idl
599     Modules/speech/SpeechSynthesisUtterance.idl
600     Modules/speech/SpeechSynthesisVoice.idl
601
602     Modules/webdatabase/Database.idl
603
604     css/DOMWindowCSS.idl
605     css/MediaQueryList.idl
606     css/StyleMedia.idl
607
608     dom/DOMNamedFlowCollection.idl
609     dom/DOMStringList.idl
610     dom/DOMStringMap.idl
611     dom/MessagePort.idl
612     dom/Touch.idl
613     dom/WebKitNamedFlow.idl
614
615     html/DOMSettableTokenList.idl
616     html/DOMTokenList.idl
617     html/HTMLDetailsElement.idl
618     html/HTMLKeygenElement.idl
619     html/HTMLMediaElement.idl
620     html/MediaController.idl
621     html/MediaError.idl
622     html/TimeRanges.idl
623     html/ValidityState.idl
624
625     loader/appcache/DOMApplicationCache.idl
626
627     page/BarProp.idl
628     page/DOMSecurityPolicy.idl
629     page/DOMSelection.idl
630     page/History.idl
631     page/Location.idl
632     page/Navigator.idl
633     page/Performance.idl
634     page/PerformanceEntry.idl
635     page/PerformanceEntryList.idl
636     page/PerformanceNavigation.idl
637     page/PerformanceTiming.idl
638     page/Screen.idl
639     page/UserMessageHandler.idl
640     page/UserMessageHandlersNamespace.idl
641     page/WebKitPoint.idl
642     page/WebKitNamespace.idl
643
644     plugins/DOMMimeType.idl
645     plugins/DOMMimeTypeArray.idl
646     plugins/DOMPlugin.idl
647     plugins/DOMPluginArray.idl
648
649     storage/Storage.idl
650 )
651
652 if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
653     list(APPEND GObjectDOMBindingsUnstable_IDL_FILES
654         html/HTMLAudioElement.idl
655         html/HTMLVideoElement.idl
656
657         html/track/AudioTrack.idl
658         html/track/AudioTrackList.idl
659         html/track/DataCue.idl
660         html/track/TextTrack.idl
661         html/track/TextTrackCue.idl
662         html/track/TextTrackCueList.idl
663         html/track/TextTrackList.idl
664         html/track/TrackEvent.idl
665         html/track/VTTCue.idl
666         html/track/VideoTrack.idl
667         html/track/VideoTrackList.idl
668     )
669 endif ()
670
671 if (ENABLE_QUOTA)
672     list(APPEND GObjectDOMBindingsUnstable_IDL_FILES
673         Modules/quota/DOMWindowQuota.idl
674         Modules/quota/NavigatorStorageQuota.idl
675         Modules/quota/StorageErrorCallback.idl
676         Modules/quota/StorageInfo.idl
677         Modules/quota/StorageQuota.idl
678         Modules/quota/StorageQuotaCallback.idl
679         Modules/quota/StorageUsageCallback.idl
680         Modules/quota/WorkerNavigatorStorageQuota.idl
681     )
682 endif ()
683
684 set(GObjectDOMBindings_STATIC_CLASS_LIST Custom Deprecated EventTarget NodeFilter Object XPathNSResolver)
685
686 set(GObjectDOMBindingsStable_CLASS_LIST ${GObjectDOMBindings_STATIC_CLASS_LIST})
687 set(GObjectDOMBindingsStable_INSTALLED_HEADERS
688      ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines.h
689      ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdom.h
690      ${WEBCORE_DIR}/bindings/gobject/WebKitDOMCustom.h
691      ${WEBCORE_DIR}/bindings/gobject/WebKitDOMDeprecated.h
692      ${WEBCORE_DIR}/bindings/gobject/WebKitDOMEventTarget.h
693      ${WEBCORE_DIR}/bindings/gobject/WebKitDOMNodeFilter.h
694      ${WEBCORE_DIR}/bindings/gobject/WebKitDOMObject.h
695      ${WEBCORE_DIR}/bindings/gobject/WebKitDOMXPathNSResolver.h
696 )
697
698 set(GObjectDOMBindingsUnstable_INSTALLED_HEADERS
699      ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines-unstable.h
700      ${WEBCORE_DIR}/bindings/gobject/WebKitDOMCustomUnstable.h
701 )
702
703 foreach (file ${GObjectDOMBindingsStable_IDL_FILES})
704     get_filename_component(classname ${file} NAME_WE)
705     list(APPEND GObjectDOMBindingsStable_CLASS_LIST ${classname})
706     list(APPEND GObjectDOMBindingsStable_INSTALLED_HEADERS ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/WebKitDOM${classname}.h)
707     list(APPEND GObjectDOMBindingsUnstable_INSTALLED_HEADERS ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/WebKitDOM${classname}Unstable.h)
708 endforeach ()
709
710 foreach (file ${GObjectDOMBindingsUnstable_IDL_FILES})
711     get_filename_component(classname ${file} NAME_WE)
712     list(APPEND GObjectDOMBindingsUnstable_CLASS_LIST ${classname})
713     list(APPEND GObjectDOMBindingsUnstable_INSTALLED_HEADERS ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/WebKitDOM${classname}.h)
714 endforeach ()
715
716 set(GOBJECT_DOM_BINDINGS_FEATURES_DEFINES "LANGUAGE_GOBJECT=1 ${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}")
717 string(REPLACE "ENABLE_INDEXED_DATABASE=1" "" GOBJECT_DOM_BINDINGS_FEATURES_DEFINES ${GOBJECT_DOM_BINDINGS_FEATURES_DEFINES})
718 string(REPLACE REGEX "ENABLE_SVG[A-Z_]+=1" "" GOBJECT_DOM_BINDINGS_FEATURES_DEFINES ${GOBJECT_DOM_BINDINGS_FEATURES_DEFINES})
719
720 file(MAKE_DIRECTORY ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR})
721
722 add_custom_command(
723     OUTPUT ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines.h
724     DEPENDS ${WEBCORE_DIR}/bindings/scripts/gobject-generate-headers.pl
725     COMMAND echo ${GObjectDOMBindingsStable_CLASS_LIST} | ${PERL_EXECUTABLE} ${WEBCORE_DIR}/bindings/scripts/gobject-generate-headers.pl defines > ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines.h
726 )
727
728 add_custom_command(
729     OUTPUT ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines-unstable.h
730     DEPENDS ${WEBCORE_DIR}/bindings/scripts/gobject-generate-headers.pl
731     COMMAND echo ${GObjectDOMBindingsUnstable_CLASS_LIST} | ${PERL_EXECUTABLE} ${WEBCORE_DIR}/bindings/scripts/gobject-generate-headers.pl defines-unstable > ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdomdefines-unstable.h
732 )
733
734 add_custom_command(
735     OUTPUT ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdom.h
736     DEPENDS ${WEBCORE_DIR}/bindings/scripts/gobject-generate-headers.pl
737     COMMAND echo ${GObjectDOMBindingsStable_CLASS_LIST} | ${PERL_EXECUTABLE} ${WEBCORE_DIR}/bindings/scripts/gobject-generate-headers.pl gdom > ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdom.h
738 )
739
740 # Some of the static headers are included by generated public headers with include <webkitdom/WebKitDOMFoo.h>.
741 # We need those headers in the derived sources to be in webkitdom directory.
742 set(GObjectDOMBindings_STATIC_HEADER_NAMES ${GObjectDOMBindings_STATIC_CLASS_LIST} CustomUnstable)
743 foreach (classname ${GObjectDOMBindings_STATIC_HEADER_NAMES})
744     add_custom_command(
745         OUTPUT ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/WebKitDOM${classname}.h
746         DEPENDS ${WEBCORE_DIR}/bindings/gobject/WebKitDOM${classname}.h
747         COMMAND ln -n -s -f ${WEBCORE_DIR}/bindings/gobject/WebKitDOM${classname}.h ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}
748     )
749     list(APPEND GObjectDOMBindings_STATIC_GENERATED_SOURCES ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/WebKitDOM${classname}.h)
750 endforeach ()
751
752 add_custom_target(fake-generated-webkitdom-headers
753     DEPENDS ${GObjectDOMBindings_STATIC_GENERATED_SOURCES}
754 )
755
756 set(GObjectDOMBindings_IDL_FILES ${GObjectDOMBindingsStable_IDL_FILES} ${GObjectDOMBindingsUnstable_IDL_FILES})
757 set(ADDITIONAL_BINDINGS_DEPENDENCIES
758     ${WEBCORE_DIR}/bindings/gobject/webkitdom.symbols
759     ${WINDOW_CONSTRUCTORS_FILE}
760     ${WORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
761     ${SHAREDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
762     ${DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
763 )
764 GENERATE_BINDINGS(GObjectDOMBindings_SOURCES
765     "${GObjectDOMBindings_IDL_FILES}"
766     "${WEBCORE_DIR}"
767     "${IDL_INCLUDES}"
768     "${GOBJECT_DOM_BINDINGS_FEATURES_DEFINES}"
769     ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}
770     WebKitDOM GObject cpp
771     ${IDL_ATTRIBUTES_FILE}
772     ${SUPPLEMENTAL_DEPENDENCY_FILE}
773     ${ADDITIONAL_BINDINGS_DEPENDENCIES})
774
775 add_definitions(-DBUILDING_WEBKIT)
776 add_definitions(-DWEBKIT_DOM_USE_UNSTABLE_API)
777
778 add_library(GObjectDOMBindings STATIC ${GObjectDOMBindings_SOURCES})
779
780 WEBKIT_SET_EXTRA_COMPILER_FLAGS(GObjectDOMBindings)
781
782 add_dependencies(GObjectDOMBindings
783     WebCore
784     fake-generated-webkitdom-headers
785 )
786
787 file(WRITE ${CMAKE_BINARY_DIR}/gtkdoc-webkitdom.cfg
788     "[webkitdomgtk]\n"
789     "pkgconfig_file=${WebKit2_PKGCONFIG_FILE}\n"
790     "namespace=webkit_dom\n"
791     "cflags=-I${CMAKE_SOURCE_DIR}/Source\n"
792     "       -I${WEBCORE_DIR}/bindings\n"
793     "       -I${WEBCORE_DIR}/bindings/gobject\n"
794     "       -I${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}\n"
795     "doc_dir=${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/docs\n"
796     "source_dirs=${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}\n"
797     "            ${WEBCORE_DIR}/bindings/gobject\n"
798     "headers=${GObjectDOMBindingsStable_INSTALLED_HEADERS}\n"
799 )
800
801 install(FILES ${GObjectDOMBindingsStable_INSTALLED_HEADERS}
802         DESTINATION "${WEBKITGTK_HEADER_INSTALL_DIR}/webkitdom"
803 )
804
805 # Make unstable header optional if they don't exist
806 install(FILES ${GObjectDOMBindingsUnstable_INSTALLED_HEADERS}
807         DESTINATION "${WEBKITGTK_HEADER_INSTALL_DIR}/webkitdom"
808         OPTIONAL
809 )
810
811 # Some installed headers are not on the list of headers used for gir generation.
812 set(GObjectDOMBindings_GIR_HEADERS ${GObjectDOMBindingsStable_INSTALLED_HEADERS})
813 list(REMOVE_ITEM GObjectDOMBindings_GIR_HEADERS
814      bindings/gobject/WebKitDOMEventTarget.h
815      bindings/gobject/WebKitDOMNodeFilter.h
816      bindings/gobject/WebKitDOMObject.h
817      bindings/gobject/WebKitDOMXPathNSResolver.h
818 )
819
820 # Propagate this variable to the parent scope, so that it can be used in other parts of the build.
821 set(GObjectDOMBindings_GIR_HEADERS ${GObjectDOMBindings_GIR_HEADERS} PARENT_SCOPE)
822
823 if (ENABLE_SUBTLE_CRYPTO)
824     list(APPEND WebCore_SOURCES
825         crypto/CryptoAlgorithm.cpp
826         crypto/CryptoAlgorithmDescriptionBuilder.cpp
827         crypto/CryptoAlgorithmRegistry.cpp
828         crypto/CryptoKey.cpp
829         crypto/CryptoKeyPair.cpp
830         crypto/SubtleCrypto.cpp
831         crypto/algorithms/CryptoAlgorithmAES_CBC.cpp
832         crypto/algorithms/CryptoAlgorithmAES_KW.cpp
833         crypto/algorithms/CryptoAlgorithmHMAC.cpp
834         crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp
835         crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp
836         crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp
837         crypto/algorithms/CryptoAlgorithmSHA1.cpp
838         crypto/algorithms/CryptoAlgorithmSHA224.cpp
839         crypto/algorithms/CryptoAlgorithmSHA256.cpp
840         crypto/algorithms/CryptoAlgorithmSHA384.cpp
841         crypto/algorithms/CryptoAlgorithmSHA512.cpp
842
843         crypto/gnutls/CryptoAlgorithmRegistryGnuTLS.cpp
844         crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp
845         crypto/gnutls/CryptoAlgorithmAES_KWGnuTLS.cpp
846         crypto/gnutls/CryptoAlgorithmHMACGnuTLS.cpp
847         crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp
848         crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp
849         crypto/gnutls/CryptoAlgorithmRSASSA_PKCS1_v1_5GnuTLS.cpp
850         crypto/gnutls/CryptoDigestGnuTLS.cpp
851         crypto/gnutls/CryptoKeyRSAGnuTLS.cpp
852         crypto/gnutls/SerializedCryptoKeyWrapGnuTLS.cpp
853
854         crypto/keys/CryptoKeyAES.cpp
855         crypto/keys/CryptoKeyDataOctetSequence.cpp
856         crypto/keys/CryptoKeyDataRSAComponents.cpp
857         crypto/keys/CryptoKeyHMAC.cpp
858         crypto/keys/CryptoKeySerializationRaw.cpp
859     )
860
861     list(APPEND WebCore_INCLUDE_DIRECTORIES
862         ${GNUTLS_INCLUDE_DIRS}
863     )
864     list(APPEND WebCore_LIBRARIES
865         ${GNUTLS_LIBRARIES}
866     )
867 endif ()