[BlackBerry] Tie up the scrolling machinery to the graphics tree when applicable...
[WebKit-https.git] / Source / WebKit / PlatformBlackBerry.cmake
1 LIST(INSERT WebKit_INCLUDE_DIRECTORIES 0
2     "${BLACKBERRY_THIRD_PARTY_DIR}" # For <unicode.h>, which is included from <sys/keycodes.h>.
3     "${BLACKBERRY_THIRD_PARTY_DIR}/icu"
4 )
5
6 LIST(APPEND WebKit_INCLUDE_DIRECTORIES
7     "${JAVASCRIPTCORE_DIR}/wtf/text"
8     "${WEBCORE_DIR}/bindings/cpp"
9     "${WEBCORE_DIR}/history/blackberry"
10     "${WEBCORE_DIR}/html/canvas"
11     "${WEBCORE_DIR}/html/parser" # For HTMLParserIdioms.h
12     "${WEBCORE_DIR}/loader/appcache"
13     "${WEBCORE_DIR}/notifications"
14     "${WEBCORE_DIR}/platform/blackberry"
15     "${WEBCORE_DIR}/platform/graphics/blackberry"
16     "${WEBCORE_DIR}/platform/graphics/blackberry/skia"
17     "${WEBCORE_DIR}/platform/graphics/skia"
18     "${WEBCORE_DIR}/platform/network/blackberry"
19     "${WEBCORE_DIR}/Modules/websockets"
20     "${WEBCORE_DIR}/Modules/geolocation"
21     "${WEBCORE_DIR}/Modules/vibration"
22     "${WEBKIT_DIR}/blackberry/Api"
23     "${WEBKIT_DIR}/blackberry/WebCoreSupport"
24     "${WEBKIT_DIR}/blackberry/WebKitSupport"
25     "${CMAKE_SOURCE_DIR}/Source" # For JavaScriptCore API headers
26 )
27 IF (NOT PUBLIC_BUILD)
28     LIST(APPEND WebKit_INCLUDE_DIRECTORIES
29         # needed for DRT for now
30         "${JAVASCRIPTCORE_DIR}/wtf"
31         "${WEBCORE_DIR}/platform/mock"
32         "${WEBCORE_DIR}/svg/animation"
33         "${WEBCORE_DIR}/workers"
34         "${TOOLS_DIR}"
35         "${TOOLS_DIR}/DumpRenderTree"
36         "${TOOLS_DIR}/DumpRenderTree/blackberry"
37     )
38 ENDIF ()
39
40 IF (ENABLE_BATTERY_STATUS)
41     LIST(APPEND WebKit_INCLUDE_DIRECTORIES ${WEBCORE_DIR}/Modules/battery)
42     LIST(APPEND WebKit_SOURCES blackberry/WebCoreSupport/BatteryClientBlackBerry.cpp)
43 ENDIF ()
44
45 IF (ENABLE_MEDIA_STREAM)
46     LIST(APPEND WebKit_INCLUDE_DIRECTORIES
47         "${WEBCORE_DIR}/Modules/mediastream"
48         "${WEBCORE_DIR}/platform/mediastream"
49     )
50     LIST(APPEND WebKit_SOURCES
51         blackberry/WebCoreSupport/UserMediaClientImpl.cpp
52     )
53 ENDIF ()
54
55 ADD_DEFINITIONS(-DUSER_PROCESSES)
56
57 LIST(APPEND WebKit_SOURCES
58     blackberry/Api/BackingStore.cpp
59     blackberry/Api/BlackBerryGlobal.cpp
60     blackberry/Api/InRegionScroller.cpp
61     blackberry/Api/WebAnimation.cpp
62     blackberry/Api/WebKitMIMETypeConverter.cpp
63     blackberry/Api/WebKitTextCodec.cpp
64     blackberry/Api/WebOverlay.cpp
65     blackberry/Api/WebOverlayOverride.cpp
66     blackberry/Api/WebPage.cpp
67     blackberry/Api/WebPageCompositor.cpp
68     blackberry/Api/WebPageGroupLoadDeferrer.cpp
69     blackberry/Api/WebSettings.cpp
70     blackberry/Api/WebString.cpp
71     blackberry/Api/WebViewportArguments.cpp
72     blackberry/WebCoreSupport/AutofillManager.cpp
73     blackberry/WebCoreSupport/CacheClientBlackBerry.cpp
74     blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp
75     blackberry/WebCoreSupport/ClientExtension.cpp
76     blackberry/WebCoreSupport/ContextMenuClientBlackBerry.cpp
77     blackberry/WebCoreSupport/CredentialManager.cpp
78     blackberry/WebCoreSupport/CredentialTransformData.cpp
79     blackberry/WebCoreSupport/DeviceMotionClientBlackBerry.cpp
80     blackberry/WebCoreSupport/DeviceOrientationClientBlackBerry.cpp
81     blackberry/WebCoreSupport/DragClientBlackBerry.cpp
82     blackberry/WebCoreSupport/EditorClientBlackBerry.cpp
83     blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp
84     blackberry/WebCoreSupport/FrameNetworkingContextBlackBerry.cpp
85     blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp
86     blackberry/WebCoreSupport/IconDatabaseClientBlackBerry.cpp
87     blackberry/WebCoreSupport/InspectorClientBlackBerry.cpp
88     blackberry/WebCoreSupport/JavaScriptDebuggerBlackBerry.cpp
89     blackberry/WebCoreSupport/NotificationPresenterImpl.cpp
90     blackberry/WebCoreSupport/VibrationClientBlackBerry.cpp
91     blackberry/WebCoreSupport/PagePopupBlackBerry.cpp
92     blackberry/WebCoreSupport/SelectPopupClient.cpp
93     blackberry/WebCoreSupport/DatePickerClient.cpp
94     blackberry/WebKitSupport/AboutData.cpp
95     blackberry/WebKitSupport/BackingStoreCompositingSurface.cpp
96     blackberry/WebKitSupport/BackingStoreTile.cpp
97     blackberry/WebKitSupport/BackingStoreClient.cpp
98     blackberry/WebKitSupport/DefaultTapHighlight.cpp
99     blackberry/WebKitSupport/DOMSupport.cpp
100     blackberry/WebKitSupport/FrameLayers.cpp
101     blackberry/WebKitSupport/InPageSearchManager.cpp
102     blackberry/WebKitSupport/InputHandler.cpp
103     blackberry/WebKitSupport/InRegionScrollableArea.cpp
104     blackberry/WebKitSupport/InspectorOverlay.cpp
105     blackberry/WebKitSupport/RenderQueue.cpp
106     blackberry/WebKitSupport/SelectionHandler.cpp
107     blackberry/WebKitSupport/SelectionOverlay.cpp
108     blackberry/WebKitSupport/SurfacePool.cpp
109     blackberry/WebKitSupport/TouchEventHandler.cpp
110     blackberry/WebKitSupport/FatFingers.cpp
111 )
112
113 IF (ENABLE_WEBGL)
114     ADD_DEFINITIONS (-DWTF_USE_OPENGL_ES_2=1)
115     LIST(APPEND WebKit_INCLUDE_DIRECTORIES
116         ${OPENGL_INCLUDE_DIR}
117         ${THIRDPARTY_DIR}/ANGLE/src
118         ${THIRDPARTY_DIR}/ANGLE/include/GLSLANG
119     )
120     LIST(APPEND WebKit_LIBRARIES
121         ${OPENGL_gl_LIBRARY}
122     )
123 ENDIF (ENABLE_WEBGL)
124
125 IF (NOT PUBLIC_BUILD)
126     # DumpRenderTree sources
127     LIST(APPEND WebKit_SOURCES
128         blackberry/WebKitSupport/DumpRenderTreeSupport.cpp
129         ${TOOLS_DIR}/DumpRenderTree/blackberry/AccessibilityControllerBlackBerry.cpp
130         ${TOOLS_DIR}/DumpRenderTree/blackberry/AccessibilityUIElementBlackBerry.cpp
131         ${TOOLS_DIR}/DumpRenderTree/blackberry/DumpRenderTree.cpp
132         ${TOOLS_DIR}/DumpRenderTree/blackberry/EventSender.cpp
133         ${TOOLS_DIR}/DumpRenderTree/blackberry/GCControllerBlackBerry.cpp
134         ${TOOLS_DIR}/DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp
135         ${TOOLS_DIR}/DumpRenderTree/blackberry/PixelDumpSupportBlackBerry.cpp
136         ${TOOLS_DIR}/DumpRenderTree/blackberry/PNGImageEncoder.cpp
137         ${TOOLS_DIR}/DumpRenderTree/blackberry/WorkQueueItemBlackBerry.cpp
138         ${TOOLS_DIR}/DumpRenderTree/AccessibilityController.cpp
139         ${TOOLS_DIR}/DumpRenderTree/AccessibilityUIElement.cpp
140         ${TOOLS_DIR}/DumpRenderTree/AccessibilityTextMarker.cpp
141         ${TOOLS_DIR}/DumpRenderTree/LayoutTestController.cpp
142         ${TOOLS_DIR}/DumpRenderTree/CyclicRedundancyCheck.cpp
143         ${TOOLS_DIR}/DumpRenderTree/PixelDumpSupport.cpp
144         ${TOOLS_DIR}/DumpRenderTree/WorkQueue.cpp
145         ${TOOLS_DIR}/DumpRenderTree/GCController.cpp
146     )
147 ENDIF ()
148
149 SET(WebKit_LINK_FLAGS ${BLACKBERRY_LINK_FLAGS})
150
151 LIST(APPEND WebKit_LIBRARIES
152     ${AOI_LIBRARY}
153     ${CLIPBOARD_LIBRARY}
154     ${CURL_LIBRARY}
155     ${Crypto_LIBRARY}
156     ${FONTCONFIG_LIBRARY}
157     ${FREETYPE_LIBRARY}
158     ${HARFBUZZ_LIBRARY}
159     ${ICUData_LIBRARY}
160     ${ICUI18N_LIBRARY}
161     ${ICUUC_LIBRARY}
162     ${INTL_LIBRARY}
163     ${Iconv_LIBRARY}
164     ${JPEG_LIBRARY}
165     ${JavaScriptCore_LIBRARY_NAME}
166     ${MD_LIBRARY}
167     ${MMR_LIBRARY}
168     ${M_LIBRARY}
169     ${NBUTIL_LIBRARY}
170     ${OTS_LIBRARY}
171     ${PNG_LIBRARY}
172     ${PPSCache_LIBRARY}
173     ${SQLITE3_LIBRARY}
174     ${SSL_LIBRARY}
175     ${STRM_LIBRARY}
176     ${Screen_LIBRARY}
177     ${Skia_LIBRARY}
178     ${Skia_QNX_LIBRARY}
179     ${Socket_LIBRARY}
180     ${UUID_LIBRARY}
181     ${WebKitPlatform_LIBRARY}
182     ${XML2_LIBRARY}
183     ${XSLT_LIBRARY}
184     ${Z_LIBRARY}
185 )
186
187 IF (PROFILING)
188     LIST(APPEND WebKit_LIBRARIES
189         ${PROFILING_LIBRARY}
190     )
191 ENDIF ()
192
193 IF (WTF_USE_ACCELERATED_COMPOSITING)
194     LIST(APPEND WebKit_SOURCES
195         blackberry/WebKitSupport/GLES2Context.cpp
196     )
197     LIST(APPEND WebKit_INCLUDE_DIRECTORIES
198         "${WEBCORE_DIR}/platform/graphics/gles2"
199     )
200     LIST(APPEND WebKit_LIBRARIES
201         ${GLESv2_LIBRARY}
202         ${EGL_LIBRARY}
203     )
204 ENDIF ()
205
206 FILE(GLOB BBWebKit_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/blackberry/Api/*.h")
207
208 INSTALL(FILES ${BBWebKit_HEADERS} DESTINATION usr/include/browser/webkit)
209
210 IF (NOT PUBLIC_BUILD)
211     INSTALL(FILES ${TOOLS_DIR}/DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h
212             DESTINATION usr/include/browser/webkit)
213 ENDIF ()
214
215 SET(WebKit_INSTALL_DIR "${CMAKE_SYSTEM_PROCESSOR}/usr/lib/torch-webkit")
216
217 # Get the JavaScript file names from inspector.html, in order to keep the JavaScript files
218 # generated in the correct order, and to keep the file names in-sync with the changes of inspector.html
219 FILE (STRINGS ${WEBCORE_DIR}/inspector/front-end/inspector.html SCRIPT_TAGS REGEX "<script.* src=\".*js\".*></script>")
220 FOREACH (_line IN LISTS SCRIPT_TAGS)
221     STRING (STRIP ${_line} _stripped_line)
222     STRING (REGEX REPLACE "<script.* src=\"(.*\\.js)\".*></script>" "\\1" _js_file ${_stripped_line})
223     STRING (COMPARE EQUAL ${_js_file} "InspectorBackendCommands.js" _comp_result)
224     IF ( ${_comp_result} )
225         # InspectorBackendCommands.js was generated with the build, should get it from DERIVED_SOURCES_WEBCORE_DIR.
226         SET (_js_file "${DERIVED_SOURCES_WEBCORE_DIR}/${_js_file}")
227     ELSE ()
228         SET (_js_file "${WEBCORE_DIR}/inspector/front-end/${_js_file}")
229     ENDIF ()
230     SET (JS_FILES ${JS_FILES} ${_js_file})
231 ENDFOREACH ()
232 SET (JS_FILES ${JS_FILES} ${WEBKIT_DIR}/blackberry/WebCoreSupport/inspectorBB.js)
233
234 ADD_CUSTOM_TARGET (
235     inspector ALL
236     COMMAND cat ${JS_FILES} > ${DERIVED_SOURCES_WEBCORE_DIR}/javascript.js
237     DEPENDS ${WebCore_LIBRARY_NAME}
238     COMMENT "Web Inspector resources building..."
239 )
240
241 # Generate contents for AboutData.cpp
242 ADD_CUSTOM_COMMAND(
243     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataHaveFeatures.cpp
244     MAIN_DEPENDENCY ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataHaveFeatures.in ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl
245     COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl HAVE ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataHaveFeatures.in ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataHaveFeatures.cpp
246 )
247
248 ADD_CUSTOM_COMMAND(
249     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataEnableFeatures.cpp
250     MAIN_DEPENDENCY ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataEnableFeatures.in ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl
251     COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl ENABLE ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataEnableFeatures.in ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataEnableFeatures.cpp
252 )
253
254 ADD_CUSTOM_COMMAND(
255     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataUseFeatures.cpp
256     MAIN_DEPENDENCY ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataUseFeatures.in ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl
257     COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/blackberry/WebCoreSupport/generateAboutDataFeatures.pl USE ${WEBKIT_DIR}/blackberry/WebCoreSupport/AboutDataUseFeatures.in ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataUseFeatures.cpp
258 )
259
260 ADD_CUSTOM_TARGET(
261     aboutFeatures ALL
262     DEPENDS ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataHaveFeatures.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataEnableFeatures.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/AboutDataUseFeatures.cpp
263 )