- Revision
- 164076
- Author
- g...@gnome.org
- Date
- 2014-02-13 16:35:24 -0800 (Thu, 13 Feb 2014)
Log Message
[GTK][CMake] Generate GObject DOM bindings .symbols files
https://bugs.webkit.org/show_bug.cgi?id=126210
Reviewed by Martin Robinson.
.:
* Source/PlatformGTK.cmake: add checking DOM bindings API as a dependency
for documentation generation.
Source/WebCore:
No new tests. Build change only.
* CMakeLists.txt: list Quota module files and IDLs even if the feature
is disabled, for GTK, since we rely on that for our DOM bindings.
* PlatformGTK.cmake: add a new target to check for DOM symbols API by
running the new python script.
* bindings/gobject/GNUmakefile.am: call the new python script instead
of using a custom rule.
Tools:
* gtk/check-gdom-symbols: Added. Checks symbols compatibility.
(should_update_symbols_file):
Modified Paths
Added Paths
Diff
Modified: trunk/ChangeLog (164075 => 164076)
--- trunk/ChangeLog 2014-02-14 00:30:15 UTC (rev 164075)
+++ trunk/ChangeLog 2014-02-14 00:35:24 UTC (rev 164076)
@@ -1,3 +1,13 @@
+2014-02-04 Gustavo Noronha Silva <g...@gnome.org>
+
+ [GTK][CMake] Generate GObject DOM bindings .symbols files
+ https://bugs.webkit.org/show_bug.cgi?id=126210
+
+ Reviewed by Martin Robinson.
+
+ * Source/PlatformGTK.cmake: add checking DOM bindings API as a dependency
+ for documentation generation.
+
2014-02-13 Xabier Rodriguez Calvar <calva...@igalia.com>
[GTK] MEDIA_CONTROLS_SCRIPT support
Modified: trunk/Source/PlatformGTK.cmake (164075 => 164076)
--- trunk/Source/PlatformGTK.cmake 2014-02-14 00:30:15 UTC (rev 164075)
+++ trunk/Source/PlatformGTK.cmake 2014-02-14 00:35:24 UTC (rev 164076)
@@ -4,6 +4,7 @@
add_custom_target(gir ALL DEPENDS ${GObjectIntrospectionTargets})
set(DocumentationDependencies
+ generate-gdom-symbols-file
"${CMAKE_SOURCE_DIR}/Source/WebKit/gtk/docs/webkitenvironment.xml"
)
Modified: trunk/Source/WebCore/CMakeLists.txt (164075 => 164076)
--- trunk/Source/WebCore/CMakeLists.txt 2014-02-14 00:30:15 UTC (rev 164075)
+++ trunk/Source/WebCore/CMakeLists.txt 2014-02-14 00:35:24 UTC (rev 164076)
@@ -2735,7 +2735,10 @@
)
endif ()
-if (ENABLE_QUOTA)
+# On the GTK+ autotools build we used to add these files even if QUOTA is disabled, and
+# because of that we generate GObject bindings for some of the objects. We need to do
+# the same for the cmake build, for now.
+if (ENABLE_QUOTA OR PORT STREQUAL "GTK")
list(APPEND WebCore_SOURCES
Modules/quota/DOMWindowQuota.cpp
Modules/quota/NavigatorStorageQuota.cpp
Modified: trunk/Source/WebCore/ChangeLog (164075 => 164076)
--- trunk/Source/WebCore/ChangeLog 2014-02-14 00:30:15 UTC (rev 164075)
+++ trunk/Source/WebCore/ChangeLog 2014-02-14 00:35:24 UTC (rev 164076)
@@ -1,3 +1,19 @@
+2014-02-04 Gustavo Noronha Silva <g...@gnome.org>
+
+ [GTK][CMake] Generate GObject DOM bindings .symbols files
+ https://bugs.webkit.org/show_bug.cgi?id=126210
+
+ Reviewed by Martin Robinson.
+
+ No new tests. Build change only.
+
+ * CMakeLists.txt: list Quota module files and IDLs even if the feature
+ is disabled, for GTK, since we rely on that for our DOM bindings.
+ * PlatformGTK.cmake: add a new target to check for DOM symbols API by
+ running the new python script.
+ * bindings/gobject/GNUmakefile.am: call the new python script instead
+ of using a custom rule.
+
2014-02-13 Myles C. Maxfield <mmaxfi...@apple.com>
text-decoration-skip: ink skips randomly when using SVG fonts
Modified: trunk/Source/WebCore/PlatformGTK.cmake (164075 => 164076)
--- trunk/Source/WebCore/PlatformGTK.cmake 2014-02-14 00:30:15 UTC (rev 164075)
+++ trunk/Source/WebCore/PlatformGTK.cmake 2014-02-14 00:35:24 UTC (rev 164076)
@@ -667,11 +667,15 @@
${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdom.h
${WEBCORE_DIR}/bindings/gobject/WebKitDOMCustom.h
)
+ file(GLOB GObjectDOMBindingsSymbolsFiles
+ "${WEBCORE_DIR}/bindings/gobject/WebKitDOM*.symbols"
+ )
foreach (file ${GObjectDOMBindings_IDL_FILES})
get_filename_component(classname ${file} NAME_WE)
list(APPEND GObjectDOMBindings_CLASS_LIST ${classname})
list(APPEND GObjectDOMBindings_INSTALLED_HEADERS ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/WebKitDOM${classname}.h)
+ list(APPEND GObjectDOMBindingsSymbolsFiles ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/WebKitDOM${classname}.symbols)
endforeach ()
# Propagate this variable to the parent scope, so that it can be used in other parts of the build.
@@ -694,7 +698,7 @@
)
add_custom_target(fake-installed-webkitdom-headers
- COMMAND ln -n -s -f ${WEBCORE_DIR}/bindings/gobject/* ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}
+ COMMAND ln -n -s -f ${WEBCORE_DIR}/bindings/gobject/*.h ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}
)
GENERATE_BINDINGS(GObjectDOMBindings_SOURCES
@@ -728,5 +732,16 @@
bindings/gobject/WebKitDOMObject.h
DESTINATION "${WEBKITGTK_HEADER_INSTALL_DIR}/webkitdom"
)
+
+ add_custom_command(
+ OUTPUT ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdom.symbols
+ DEPENDS ${GObjectDOMBindingsSymbolsFiles} ${CMAKE_SOURCE_DIR}/Tools/gtk/check-gdom-symbols
+ COMMAND ln -n -s -f ${WEBCORE_DIR}/bindings/gobject/WebKitDOM*.symbols ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}
+ COMMAND ${CMAKE_SOURCE_DIR}/Tools/gtk/check-gdom-symbols
+ )
+
+ add_custom_target(generate-gdom-symbols-file
+ DEPENDS GObjectDOMBindings ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdom.symbols
+ )
endif ()
Modified: trunk/Source/WebCore/bindings/gobject/GNUmakefile.am (164075 => 164076)
--- trunk/Source/WebCore/bindings/gobject/GNUmakefile.am 2014-02-14 00:30:15 UTC (rev 164075)
+++ trunk/Source/WebCore/bindings/gobject/GNUmakefile.am 2014-02-14 00:35:24 UTC (rev 164076)
@@ -501,10 +501,8 @@
DerivedSources/webkitdom/WebKitDOM%.symbols: DerivedSources/webkitdom/WebKitDOM%.h
@true
-DerivedSources/webkitdom/webkitdom.symbols: $(gdom_symbol_files) $(WebCore)/bindings/gobject/webkitdom.symbols $(WebCore)/bindings/scripts/gobject-run-api-break-test
- $(AM_V_GEN)cat $(gdom_symbol_files) > gdom-gen-symbols \
- && $(PYTHON) $(WebCore)/bindings/scripts/gobject-run-api-break-test $(WebCore)/bindings/gobject/webkitdom.symbols gdom-gen-symbols \
- && mv gdom-gen-symbols $@
+DerivedSources/webkitdom/webkitdom.symbols: $(gdom_symbol_files) $(WebCore)/bindings/gobject/webkitdom.symbols $(WebCore)/bindings/scripts/gobject-run-api-break-test $(srcdir)/Tools/gtk/check-gdom-symbols
+ $(AM_V_GEN)$(srcdir)/Tools/gtk/check-gdom-symbols
EXTRA_DIST += \
$(WebCore)/bindings/gobject/WebKitDOMCustom.symbols \
Modified: trunk/Tools/ChangeLog (164075 => 164076)
--- trunk/Tools/ChangeLog 2014-02-14 00:30:15 UTC (rev 164075)
+++ trunk/Tools/ChangeLog 2014-02-14 00:35:24 UTC (rev 164076)
@@ -1,3 +1,13 @@
+2014-02-04 Gustavo Noronha Silva <g...@gnome.org>
+
+ [GTK][CMake] Generate GObject DOM bindings .symbols files
+ https://bugs.webkit.org/show_bug.cgi?id=126210
+
+ Reviewed by Martin Robinson.
+
+ * gtk/check-gdom-symbols: Added. Checks symbols compatibility.
+ (should_update_symbols_file):
+
2014-02-13 Brent Fulgham <bfulg...@apple.com>
Create some latched scrolling tests.
Added: trunk/Tools/gtk/check-gdom-symbols (0 => 164076)
--- trunk/Tools/gtk/check-gdom-symbols (rev 0)
+++ trunk/Tools/gtk/check-gdom-symbols 2014-02-14 00:35:24 UTC (rev 164076)
@@ -0,0 +1,63 @@
+#!/usr/bin/env python
+# Copyright (C) 2013 Gustavo Noronha Silva <g...@gnome.org>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+import common
+import glob
+import os
+import subprocess
+import sys
+import tempfile
+
+
+def should_update_symbols_file(new, old):
+ if not os.path.exists(old):
+ return False
+
+ new = open(new).read()
+ old = open(old).read()
+
+ if len(new) != len(old):
+ return False
+
+ for i, byte in enumerate(new):
+ if byte != old[i]:
+ return False
+
+ return True
+
+if __name__ == '__main__':
+ with tempfile.NamedTemporaryFile() as tmp:
+ for file_path in glob.glob(os.path.join(common.build_path('DerivedSources'), 'webkitdom', '*.h')):
+ if not os.path.basename(file_path).startswith('WebKit') or file_path.endswith('Private.h'):
+ continue
+
+ file_path = file_path.replace('.h', '.symbols')
+ with open(file_path) as file_handle:
+ tmp.write(file_handle.read())
+ tmp.flush()
+
+ gdom_source_path = common.top_level_path('Source', 'WebCore', 'bindings')
+ api_break_test_path = os.path.join(gdom_source_path, 'scripts', 'gobject-run-api-break-test')
+ subprocess.call([sys.executable, api_break_test_path, os.path.join(gdom_source_path, 'gobject', 'webkitdom.symbols'), tmp.name])
+
+ generated_gdom_symbols_path = os.path.join(common.build_path('DerivedSources'), 'webkitdom', 'webkitdom.symbols')
+ if not should_update_symbols_file(tmp.name, generated_gdom_symbols_path):
+ source = open(tmp.name, 'r')
+ destination = open(generated_gdom_symbols_path, 'w')
+ destination.write(source.read())
+ destination.close()
+ source.close()
Property changes on: trunk/Tools/gtk/check-gdom-symbols
___________________________________________________________________
Added: svn:executable