<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[164076] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/164076">164076</a></dd>
<dt>Author</dt> <dd>gns@gnome.org</dd>
<dt>Date</dt> <dd>2014-02-13 16:35:24 -0800 (Thu, 13 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[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):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkChangeLog">trunk/ChangeLog</a></li>
<li><a href="#trunkSourcePlatformGTKcmake">trunk/Source/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorePlatformGTKcmake">trunk/Source/WebCore/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebCorebindingsgobjectGNUmakefileam">trunk/Source/WebCore/bindings/gobject/GNUmakefile.am</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkToolsgtkcheckgdomsymbols">trunk/Tools/gtk/check-gdom-symbols</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/ChangeLog (164075 => 164076)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/ChangeLog        2014-02-14 00:30:15 UTC (rev 164075)
+++ trunk/ChangeLog        2014-02-14 00:35:24 UTC (rev 164076)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2014-02-04  Gustavo Noronha Silva  &lt;gns@gnome.org&gt;
+
+        [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.
+
</ins><span class="cx"> 2014-02-13  Xabier Rodriguez Calvar  &lt;calvaris@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] MEDIA_CONTROLS_SCRIPT support
</span></span></pre></div>
<a id="trunkSourcePlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/PlatformGTK.cmake (164075 => 164076)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -4,6 +4,7 @@
</span><span class="cx"> add_custom_target(gir ALL DEPENDS ${GObjectIntrospectionTargets})
</span><span class="cx"> 
</span><span class="cx"> set(DocumentationDependencies
</span><ins>+    generate-gdom-symbols-file
</ins><span class="cx">     &quot;${CMAKE_SOURCE_DIR}/Source/WebKit/gtk/docs/webkitenvironment.xml&quot;
</span><span class="cx"> )
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (164075 => 164076)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -2735,7 +2735,10 @@
</span><span class="cx">     )
</span><span class="cx"> endif ()
</span><span class="cx"> 
</span><del>-if (ENABLE_QUOTA)
</del><ins>+# 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 &quot;GTK&quot;)
</ins><span class="cx">     list(APPEND WebCore_SOURCES
</span><span class="cx">         Modules/quota/DOMWindowQuota.cpp
</span><span class="cx">         Modules/quota/NavigatorStorageQuota.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (164075 => 164076)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2014-02-04  Gustavo Noronha Silva  &lt;gns@gnome.org&gt;
+
+        [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.
+
</ins><span class="cx"> 2014-02-13  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         text-decoration-skip: ink skips randomly when using SVG fonts
</span></span></pre></div>
<a id="trunkSourceWebCorePlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/PlatformGTK.cmake (164075 => 164076)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -667,11 +667,15 @@
</span><span class="cx">          ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/webkitdom.h
</span><span class="cx">          ${WEBCORE_DIR}/bindings/gobject/WebKitDOMCustom.h
</span><span class="cx">     )
</span><ins>+    file(GLOB GObjectDOMBindingsSymbolsFiles
+        &quot;${WEBCORE_DIR}/bindings/gobject/WebKitDOM*.symbols&quot;
+    )
</ins><span class="cx"> 
</span><span class="cx">     foreach (file ${GObjectDOMBindings_IDL_FILES})
</span><span class="cx">         get_filename_component(classname ${file} NAME_WE)
</span><span class="cx">         list(APPEND GObjectDOMBindings_CLASS_LIST ${classname})
</span><span class="cx">         list(APPEND GObjectDOMBindings_INSTALLED_HEADERS ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/WebKitDOM${classname}.h)
</span><ins>+        list(APPEND GObjectDOMBindingsSymbolsFiles ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}/WebKitDOM${classname}.symbols)
</ins><span class="cx">     endforeach ()
</span><span class="cx"> 
</span><span class="cx">     # Propagate this variable to the parent scope, so that it can be used in other parts of the build.
</span><span class="lines">@@ -694,7 +698,7 @@
</span><span class="cx">     )
</span><span class="cx"> 
</span><span class="cx">     add_custom_target(fake-installed-webkitdom-headers
</span><del>-        COMMAND ln -n -s -f ${WEBCORE_DIR}/bindings/gobject/* ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}
</del><ins>+        COMMAND ln -n -s -f ${WEBCORE_DIR}/bindings/gobject/*.h ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}
</ins><span class="cx">     )
</span><span class="cx"> 
</span><span class="cx">     GENERATE_BINDINGS(GObjectDOMBindings_SOURCES
</span><span class="lines">@@ -728,5 +732,16 @@
</span><span class="cx">                   bindings/gobject/WebKitDOMObject.h
</span><span class="cx">             DESTINATION &quot;${WEBKITGTK_HEADER_INSTALL_DIR}/webkitdom&quot;
</span><span class="cx">     )
</span><ins>+
+    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
+    )
</ins><span class="cx"> endif ()
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsgobjectGNUmakefileam"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/gobject/GNUmakefile.am (164075 => 164076)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -501,10 +501,8 @@
</span><span class="cx"> DerivedSources/webkitdom/WebKitDOM%.symbols: DerivedSources/webkitdom/WebKitDOM%.h
</span><span class="cx">         @true
</span><span class="cx"> 
</span><del>-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) &gt; gdom-gen-symbols \
-        &amp;&amp; $(PYTHON) $(WebCore)/bindings/scripts/gobject-run-api-break-test $(WebCore)/bindings/gobject/webkitdom.symbols gdom-gen-symbols \
-        &amp;&amp; mv gdom-gen-symbols $@
</del><ins>+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
</ins><span class="cx"> 
</span><span class="cx"> EXTRA_DIST += \
</span><span class="cx">         $(WebCore)/bindings/gobject/WebKitDOMCustom.symbols \
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (164075 => 164076)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-02-14 00:30:15 UTC (rev 164075)
+++ trunk/Tools/ChangeLog        2014-02-14 00:35:24 UTC (rev 164076)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2014-02-04  Gustavo Noronha Silva  &lt;gns@gnome.org&gt;
+
+        [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):
+
</ins><span class="cx"> 2014-02-13  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Create some latched scrolling tests.
</span></span></pre></div>
<a id="trunkToolsgtkcheckgdomsymbols"></a>
<div class="addfile"><h4>Added: trunk/Tools/gtk/check-gdom-symbols (0 => 164076)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/gtk/check-gdom-symbols                                (rev 0)
+++ trunk/Tools/gtk/check-gdom-symbols        2014-02-14 00:35:24 UTC (rev 164076)
</span><span class="lines">@@ -0,0 +1,63 @@
</span><ins>+#!/usr/bin/env python
+# Copyright (C) 2013 Gustavo Noronha Silva &lt;gns@gnome.org&gt;
+#
+# 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()
</ins><span class="cx">Property changes on: trunk/Tools/gtk/check-gdom-symbols
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnexecutable"></a>
<div class="addfile"><h4>Added: svn:executable</h4></div>
</div>

</body>
</html>