Changeset 238853 in webkit
- Timestamp:
- Dec 4, 2018 8:33:22 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 10 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r238809 r238853 1 2018-12-04 Carlos Eduardo Ramalho <cadubentzen@gmail.com> 2 3 [WPE] Add gtk-doc 4 https://bugs.webkit.org/show_bug.cgi?id=178900 5 6 Reviewed by Michael Catanzaro. 7 8 Add gtk-doc to WPE port. This patch tries to reuse as much code from 9 WebKitGTK+ as possible. 10 11 * Source/PlatformGTK.cmake: include GtkDoc.cmake instead of defining macro. 12 * Source/PlatformWPE.cmake: Added documentation generation. 13 * Source/cmake/GtkDoc.cmake: Added. 14 * Source/cmake/OptionsWPE.cmake: Added ENABLE_GTKDOC build option and added pkg-config path variables. 15 1 16 2018-12-03 Don Olmstead <don.olmstead@sony.com> 2 17 -
trunk/Source/PlatformGTK.cmake
r231631 r238853 1 include(GtkDoc) 1 2 include(WebKitDist) 2 3 … … 26 27 endif () 27 28 28 macro(ADD_GTKDOC_GENERATOR _stamp_name _extra_args) 29 add_custom_command( 30 OUTPUT "${CMAKE_BINARY_DIR}/${_stamp_name}" 31 DEPENDS ${DocumentationDependencies} 32 COMMAND ${CMAKE_COMMAND} -E env "CC=${CMAKE_C_COMPILER}" "CFLAGS=${CMAKE_C_FLAGS} -Wno-unused-parameter" ${CMAKE_SOURCE_DIR}/Tools/gtk/generate-gtkdoc ${_extra_args} 33 COMMAND touch ${_stamp_name} 34 WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" 35 VERBATIM 36 ) 37 endmacro() 38 39 ADD_GTKDOC_GENERATOR("docs-build.stamp" "") 29 ADD_GTKDOC_GENERATOR("docs-build.stamp" "--gtk") 40 30 if (ENABLE_GTKDOC) 41 31 add_custom_target(gtkdoc ALL DEPENDS "${CMAKE_BINARY_DIR}/docs-build.stamp") … … 47 37 # the course of development. 48 38 if (DEVELOPER_MODE) 49 ADD_GTKDOC_GENERATOR("docs-build-no-html.stamp" "-- skip-html")39 ADD_GTKDOC_GENERATOR("docs-build-no-html.stamp" "--gtk;--skip-html") 50 40 add_custom_target(gtkdoc-no-html ALL DEPENDS "${CMAKE_BINARY_DIR}/docs-build-no-html.stamp") 51 41 endif () -
trunk/Source/PlatformWPE.cmake
r224410 r238853 1 include(GtkDoc) 1 2 include(WebKitDist) 2 3 4 list(APPEND DocumentationDependencies 5 WebKit 6 "${CMAKE_SOURCE_DIR}/Source/WebKit/UIProcess/API/wpe/docs/wpe-docs.sgml" 7 "${CMAKE_SOURCE_DIR}/Source/WebKit/WebProcess/InjectedBundle/API/wpe/docs/wpe-webextensions-docs.sgml" 8 "${CMAKE_SOURCE_DIR}/Source/WebKit/UIProcess/API/wpe/docs/wpe-${WPE_API_VERSION}-sections.txt" 9 "${CMAKE_SOURCE_DIR}/Source/WebKit/WebProcess/InjectedBundle/API/wpe/docs/wpe-webextensions-${WPE_API_VERSION}-sections.txt" 10 ) 11 12 if (ENABLE_GTKDOC) 13 install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/wpe-${WPE_API_VERSION}/html/wpe-${WPE_API_VERSION} 14 DESTINATION "${CMAKE_INSTALL_DATADIR}/gtk-doc/html" 15 ) 16 install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/wpe-webextensions-${WPE_API_VERSION}/html/wpe-webextensions-${WPE_API_VERSION} 17 DESTINATION "${CMAKE_INSTALL_DATADIR}/gtk-doc/html" 18 ) 19 endif () 20 21 ADD_GTKDOC_GENERATOR("docs-build.stamp" "--wpe") 22 if (ENABLE_GTKDOC) 23 add_custom_target(gtkdoc ALL DEPENDS "${CMAKE_BINARY_DIR}/docs-build.stamp") 24 elseif (NOT ENABLED_COMPILER_SANITIZERS AND NOT CMAKE_CROSSCOMPILING AND NOT APPLE) 25 add_custom_target(gtkdoc DEPENDS "${CMAKE_BINARY_DIR}/docs-build.stamp") 26 27 # Add a default build step which check that documentation does not have any warnings 28 # or errors. This is useful to prevent breaking documentation inadvertently during 29 # the course of development. 30 if (DEVELOPER_MODE) 31 ADD_GTKDOC_GENERATOR("docs-build-no-html.stamp" "--wpe;--skip-html") 32 add_custom_target(gtkdoc-no-html ALL DEPENDS "${CMAKE_BINARY_DIR}/docs-build-no-html.stamp") 33 endif () 34 endif () 35 3 36 if (DEVELOPER_MODE) 4 # FIXME: This should depend on a gtkdoc target 5 add_custom_target(Documentation) 37 add_custom_target(Documentation DEPENDS gtkdoc) 6 38 WEBKIT_DECLARE_DIST_TARGETS(WPE wpewebkit ${TOOLS_DIR}/wpe/manifest.txt.in) 7 39 endif () -
trunk/Source/WebKit/ChangeLog
r238851 r238853 1 2018-12-04 Carlos Eduardo Ramalho <cadubentzen@gmail.com> 2 3 [WPE] Add gtk-doc 4 https://bugs.webkit.org/show_bug.cgi?id=178900 5 6 Reviewed by Michael Catanzaro. 7 8 Add gtk-doc to WPE port. This patch tries to reuse as much code from 9 WebKitGTK+ as possible. 10 11 * PlatformWPE.cmake: Write variables to gtkdoc-wpe.cfg and gtkdoc-webextensions that is used by python script later. 12 * UIProcess/API/wpe/WebKitWebContext.h: Placed sandbox functions in the same location as in the WebKitGTK+ for consistency. 13 * UIProcess/API/wpe/docs/wpe-0.1-sections.txt: Added. 14 * UIProcess/API/wpe/docs/wpe-docs.sgml: Added. 15 * WebProcess/InjectedBundle/API/wpe/WebKitWebPage.h: Placed webkit_web_page_get_dom_document 16 in the same position as in the WebKitGTK+ for consistency. 17 * WebProcess/InjectedBundle/API/wpe/docs/wpe-webextensions-0.1-sections.txt: Added. 18 * WebProcess/InjectedBundle/API/wpe/docs/wpe-webextensions-docs.sgml: Added. 19 1 20 2018-12-04 Carlos Garcia Campos <cgarcia@igalia.com> 2 21 -
trunk/Source/WebKit/PlatformWPE.cmake
r238552 r238853 11 11 12 12 configure_file(UIProcess/API/wpe/WebKitVersion.h.in ${DERIVED_SOURCES_WPE_API_DIR}/WebKitVersion.h) 13 configure_file(wpe/wpe-webkit.pc.in ${ CMAKE_BINARY_DIR}/wpe-webkit-${WPE_API_VERSION}.pc@ONLY)14 configure_file(wpe/wpe-web-extension.pc.in ${ CMAKE_BINARY_DIR}/wpe-web-extension-${WPE_API_VERSION}.pc@ONLY)13 configure_file(wpe/wpe-webkit.pc.in ${WPE_PKGCONFIG_FILE} @ONLY) 14 configure_file(wpe/wpe-web-extension.pc.in ${WPEWebExtension_PKGCONFIG_FILE} @ONLY) 15 15 16 16 add_definitions(-DWEBKIT2_COMPILATION) … … 332 332 COMPONENT "Development" 333 333 ) 334 335 file(WRITE ${CMAKE_BINARY_DIR}/gtkdoc-wpe.cfg 336 "[wpe-${WPE_API_VERSION}]\n" 337 "pkgconfig_file=${WPE_PKGCONFIG_FILE}\n" 338 "decorator=WEBKIT_API|WEBKIT_DEPRECATED|WEBKIT_DEPRECATED_FOR\\(.+\\)\n" 339 "deprecation_guard=WEBKIT_DISABLE_DEPRECATED\n" 340 "namespace=webkit\n" 341 "cflags=-I${CMAKE_SOURCE_DIR}/Source\n" 342 " -I${WEBKIT_DIR}/Shared/API/glib\n" 343 " -I${WEBKIT_DIR}/UIProcess/API/glib\n" 344 " -I${WEBKIT_DIR}/UIProcess/API/wpe\n" 345 " -I${FORWARDING_HEADERS_WPE_DIR}\n" 346 "doc_dir=${WEBKIT_DIR}/UIProcess/API/wpe/docs\n" 347 "source_dirs=${WEBKIT_DIR}/Shared/API/glib\n" 348 " ${WEBKIT_DIR}/UIProcess/API/glib\n" 349 " ${WEBKIT_DIR}/UIProcess/API/wpe\n" 350 " ${DERIVED_SOURCES_WPE_API_DIR}\n" 351 "headers=${WPE_ENUM_GENERATION_HEADERS}\n" 352 "main_sgml_file=wpe-docs.sgml\n" 353 ) 354 355 file(WRITE ${CMAKE_BINARY_DIR}/gtkdoc-webextensions.cfg 356 "[wpe-webextensions-${WPE_API_VERSION}]\n" 357 "pkgconfig_file=${WPEWebExtension_PKGCONFIG_FILE}\n" 358 "decorator=WEBKIT_API|WEBKIT_DEPRECATED|WEBKIT_DEPRECATED_FOR\\(.+\\)\n" 359 "deprecation_guard=WEBKIT_DISABLE_DEPRECATED\n" 360 "namespace=webkit_webextensions\n" 361 "cflags=-I${CMAKE_SOURCE_DIR}/Source\n" 362 " -I${WEBKIT_DIR}/WebProcess/InjectedBundle/API/wpe\n" 363 " -I${WEBKIT_DIR}/WebProcess/InjectedBundle/API/wpe/DOM\n" 364 " -I${FORWARDING_HEADERS_WPE_DIR}\n" 365 "doc_dir=${WEBKIT_DIR}/WebProcess/InjectedBundle/API/wpe/docs\n" 366 "source_dirs=${WEBKIT_DIR}/WebProcess/InjectedBundle/API/glib\n" 367 " ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/glib/DOM\n" 368 " ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/wpe\n" 369 " ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/wpe/DOM\n" 370 "headers=${WPE_WEB_EXTENSION_API_INSTALLED_HEADERS}\n" 371 "main_sgml_file=wpe-webextensions-docs.sgml\n" 372 ) -
trunk/Source/WebKit/UIProcess/API/wpe/WebKitWebContext.h
r237107 r238853 248 248 GDestroyNotify user_data_destroy_func); 249 249 250 WEBKIT_API void 251 webkit_web_context_set_sandbox_enabled (WebKitWebContext *context, 252 gboolean enabled); 253 254 WEBKIT_API gboolean 255 webkit_web_context_get_sandbox_enabled (WebKitWebContext *context); 256 250 257 WEBKIT_API gboolean 251 258 webkit_web_context_get_spell_checking_enabled (WebKitWebContext *context); … … 298 305 299 306 WEBKIT_API void 300 webkit_web_context_set_sandbox_enabled (WebKitWebContext *context,301 gboolean enabled);302 303 WEBKIT_API gboolean304 webkit_web_context_get_sandbox_enabled (WebKitWebContext *context);305 306 WEBKIT_API void307 307 webkit_web_context_initialize_notification_permissions 308 308 (WebKitWebContext *context, -
trunk/Source/WebKit/WebProcess/InjectedBundle/API/wpe/WebKitWebPage.h
r229973 r238853 75 75 webkit_web_page_get_type (void); 76 76 77 WEBKIT_API WebKitDOMDocument * 78 webkit_web_page_get_dom_document (WebKitWebPage *web_page); 79 77 80 WEBKIT_API guint64 78 81 webkit_web_page_get_id (WebKitWebPage *web_page); … … 87 90 webkit_web_page_get_editor (WebKitWebPage *web_page); 88 91 89 WEBKIT_API WebKitDOMDocument *90 webkit_web_page_get_dom_document (WebKitWebPage *web_page);91 92 92 G_END_DECLS 93 93 -
trunk/Source/cmake/OptionsWPE.cmake
r238754 r238853 44 44 # there is a strong reason we should support changing the value of the option, 45 45 # and the option is not relevant to any other WebKit ports. 46 WEBKIT_OPTION_DEFINE(ENABLE_GTKDOC "Whether or not to use generate gtkdoc." PUBLIC OFF) 46 47 WEBKIT_OPTION_DEFINE(USE_WOFF2 "Whether to enable support for WOFF2 Web Fonts." PUBLIC ON) 47 48 … … 135 136 SET_AND_EXPOSE_TO_BUILD(USE_NICOSIA TRUE) 136 137 138 # Override the cached variable, gtk-doc does not really work when cross-building or building on Mac. 139 if (CMAKE_CROSSCOMPILING OR APPLE) 140 set(ENABLE_GTKDOC OFF) 141 endif () 142 137 143 set(FORWARDING_HEADERS_DIR ${DERIVED_SOURCES_DIR}/ForwardingHeaders) 138 144 set(FORWARDING_HEADERS_WPE_DIR ${FORWARDING_HEADERS_DIR}/wpe) … … 143 149 set(DERIVED_SOURCES_WPE_API_DIR ${DERIVED_SOURCES_WEBKIT_DIR}/wpe) 144 150 151 set(WPE_PKGCONFIG_FILE ${CMAKE_BINARY_DIR}/wpe-webkit-${WPE_API_VERSION}.pc) 152 set(WPEWebExtension_PKGCONFIG_FILE ${CMAKE_BINARY_DIR}/wpe-web-extension-${WPE_API_VERSION}.pc) 153 145 154 include(GStreamerChecks) -
trunk/Tools/ChangeLog
r238851 r238853 1 2018-12-04 Carlos Eduardo Ramalho <cadubentzen@gmail.com> 2 3 [WPE] Add gtk-doc 4 https://bugs.webkit.org/show_bug.cgi?id=178900 5 6 Reviewed by Michael Catanzaro. 7 8 Add gtk-doc to WPE port. This patch tries to reuse as much code from 9 WebKitGTK+ as possible. 10 11 * gtkdoc/generate-gtkdoc: Renamed from Tools/gtk/generate-gtkdoc. 12 (get_gtkdoc_module_paths): Add GDK and GTK only if building for GTK. 13 (prepare_environment_for_gtkdoc_generation): 14 (build_gtkdoc_for_wpe): Code to generate doc for WPE. 15 (build_gtkdoc_for_wkgtk): Code to generate doc for WebKitGTK+. Moved from main. 16 * gtkdoc/gtkdoc.py: Renamed from Tools/gtk/gtkdoc.py. 17 (GTKDoc.__init__): Initialized required variables according to pylint. 18 (GTKDoc.api_missing_documentation): 19 * wpe/install-dependencies: Add gtkdoc dependency. 20 1 21 2018-12-04 Carlos Garcia Campos <cgarcia@igalia.com> 2 22 -
trunk/Tools/gtkdoc/generate-gtkdoc
r238851 r238853 49 49 dependent_packages = { 50 50 'glib-2.0' : ['glib', 'gobject', 'gio'], 51 'libsoup-2.4' : ['libsoup-2.4'], 52 'gdk-pixbuf-2.0': ['gdk-pixbuf'], 53 'gtk+-3.0' : ['gtk3', 'gdk3'] 51 'libsoup-2.4' : ['libsoup-2.4'] 54 52 } 53 54 if arguments.gtk: 55 dependent_packages['gdk-pixbuf-2.0'] = ['gdk-pixbuf'] 56 dependent_packages['gtk+-3.0'] = ['gtk3', 'gdk3'] 55 57 56 58 paths = [] … … 178 180 os.chdir(common.build_path()) 179 181 182 def build_gtkdoc_for_wpe(arguments): 183 webextensions_generator = get_generator_for_config(common.build_path('gtkdoc-webextensions.cfg'), arguments.virtual_root) 184 if not webextensions_generator: 185 print("gtkdoc-webextensions.cfg does not exist! Skipping that documentation") 186 sys.exit(1) 187 saw_warnings = generate_documentation(webextensions_generator) 188 if saw_warnings: 189 sys.exit(saw_warnings) 190 191 wpe_generator = get_generator_for_config(common.build_path('gtkdoc-wpe.cfg'), arguments.virtual_root) 192 if not wpe_generator: 193 print("gtkdoc-wpe.cfg does not exist! Skipping that documentation") 194 sys.exit(1) 195 saw_warnings = generate_documentation(wpe_generator) 196 sys.exit(saw_warnings) 197 198 def build_gtkdoc_for_wkgtk(arguments): 199 jsc_generator = get_generator_for_config(common.build_path('gtkdoc-jsc-glib.cfg'), arguments.virtual_root) 200 if not jsc_generator: 201 print("gtkdoc-jsc-glib.cfg does not exist! Skipping that documentation") 202 sys.exit(1) 203 saw_warnings = generate_documentation(jsc_generator) 204 if saw_warnings: 205 sys.exit(saw_warnings) 206 207 webkitdom_generator = get_generator_for_config(common.build_path('gtkdoc-webkitdom.cfg'), arguments.virtual_root, [jsc_generator.module_name]) 208 if not webkitdom_generator: 209 print("gtkdoc-webkitdom.cfg does not exist! Skipping that documentation") 210 sys.exit(1) 211 saw_warnings = generate_documentation(webkitdom_generator) 212 if saw_warnings: 213 sys.exit(saw_warnings) 214 215 webkit2_generator = get_generator_for_config(common.build_path('gtkdoc-webkit2gtk.cfg'), arguments.virtual_root, [webkitdom_generator.module_name, jsc_generator.module_name]) 216 if not webkit2_generator: 217 print("gtkdoc-webkit2gtk.cfg does not exist! Skipping that documentation") 218 sys.exit(1) 219 saw_warnings = generate_documentation(webkit2_generator) 220 sys.exit(saw_warnings) 221 180 222 if __name__ == "__main__": 181 223 parser = argparse.ArgumentParser(description='Generate gtkdoc for WebKit.') … … 192 234 'make install as DESTDIR.') 193 235 236 parser.add_argument('--gtk', action='store_true', 237 help='Build documentation for WebKitGTK+') 238 parser.add_argument('--wpe', action='store_true', 239 help='Build documentation for WPE') 240 194 241 arguments = parser.parse_args() 195 242 configure_logging(arguments.verbose) … … 197 244 prepare_environment_for_gtkdoc_generation() 198 245 199 jsc_generator = get_generator_for_config(common.build_path('gtkdoc-jsc-glib.cfg'), arguments.virtual_root) 200 if not jsc_generator: 201 print("gtkdoc-jsc-glib.cfg does not exist! Skipping that documentation") 202 sys.exit(1) 203 saw_warnings = generate_documentation(jsc_generator) 204 if saw_warnings: 205 sys.exit(saw_warnings) 206 207 webkitdom_generator = get_generator_for_config(common.build_path('gtkdoc-webkitdom.cfg'), arguments.virtual_root, [jsc_generator.module_name]) 208 if not webkitdom_generator: 209 print("gtkdoc-webkitdom.cfg does not exist! Skipping that documentation") 210 sys.exit(1) 211 saw_warnings = generate_documentation(webkitdom_generator) 212 if saw_warnings: 213 sys.exit(saw_warnings) 214 215 webkit2_generator = get_generator_for_config(common.build_path('gtkdoc-webkit2gtk.cfg'), arguments.virtual_root, [webkitdom_generator.module_name, jsc_generator.module_name]) 216 if not webkit2_generator: 217 print("gtkdoc-webkit2gtk.cfg does not exist! Skipping that documentation") 218 sys.exit(1) 219 saw_warnings = generate_documentation(webkit2_generator) 220 221 sys.exit(saw_warnings) 246 if arguments.wpe: 247 build_gtkdoc_for_wpe(arguments) 248 elif arguments.gtk: 249 build_gtkdoc_for_wkgtk(arguments) 250 else: 251 print('Please choose a WebKit port with --gtk or --wpe') 252 sys.exit(1) -
trunk/Tools/gtkdoc/gtkdoc.py
r238851 r238853 88 88 89 89 def __init__(self, args): 90 self.version = '' 91 self.virtual_root = '' 92 self.prefix = '' 90 93 91 94 # Parameters specific to scanning. … … 416 419 return open(unused_doc_file).read().splitlines() 417 420 421 418 422 class PkgConfigGTKDoc(GTKDoc): 419 423 -
trunk/Tools/wpe/install-dependencies
r236657 r238853 66 66 gcc \ 67 67 gperf \ 68 gtk-doc-tools \ 68 69 intltool \ 69 70 itstool \ … … 156 157 gnutls \ 157 158 gperf \ 159 gtk-doc \ 158 160 grep \ 159 161 groff \ … … 254 256 gstreamer1-plugins-bad-free-devel \ 255 257 gstreamer1-plugins-base-devel \ 258 gtk-doc \ 256 259 intltool \ 257 260 itstool \
Note: See TracChangeset
for help on using the changeset viewer.