<!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>[168894] 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/168894">168894</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2014-05-15 01:06:29 -0700 (Thu, 15 May 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>[GTK] Compile all installed resources as GResources
https://bugs.webkit.org/show_bug.cgi?id=131099
Reviewed by Philippe Normand.
Source/WebCore:
* PlatformGTK.cmake: Do not install the resources.
* platform/audio/gtk/AudioBusGtk.cpp:
(WebCore::AudioBus::loadPlatformResource): Load the audio resource
from GResources and use createBusFromInMemoryAudioFile().
* platform/graphics/Image.h: Remove unsued function loadPlatformThemeIcon.
* platform/graphics/gtk/ImageGtk.cpp:
(WebCore::loadImageFromGResource): Load the given icon name from GResources.
(WebCore::loadResourceSharedBuffer): Use char* instead of CString.
(WebCore::loadMissingImageIconFromTheme): Try to load the missing
icon from the current GTK icon theme.
(WebCore::Image::loadPlatformResource): Call
loadMissingImageIconFromTheme for missing icon or
loadImageFromGResource for any other icon name.
(WebCore::getPathToImageResource): Deleted.
(WebCore::getThemeIconFileName): Deleted.
(WebCore::loadImageFromFile): Deleted.
(WebCore::Image::loadPlatformThemeIcon): Deleted.
Source/WebKit2:
It avoids conflicts with old WebKit versions, and resources are
always found even without installing or using environment variables.
* PlatformGTK.cmake: Add rules to write the xml file with the
resources depending on the configure options and to generate and
build the GResources file.
Tools:
* Scripts/webkitpy/port/gtk.py:
(GtkPort.setup_environ_for_server): Removed now unneeded
AUDIO_RESOURCES_PATH env var.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorePlatformGTKcmake">trunk/Source/WebCore/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebCoreplatformaudiogtkAudioBusGtkcpp">trunk/Source/WebCore/platform/audio/gtk/AudioBusGtk.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsImageh">trunk/Source/WebCore/platform/graphics/Image.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgtkImageGtkcpp">trunk/Source/WebCore/platform/graphics/gtk/ImageGtk.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2PlatformGTKcmake">trunk/Source/WebKit2/PlatformGTK.cmake</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsScriptswebkitpyportgtkpy">trunk/Tools/Scripts/webkitpy/port/gtk.py</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (168893 => 168894)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-05-15 05:40:53 UTC (rev 168893)
+++ trunk/Source/WebCore/ChangeLog        2014-05-15 08:06:29 UTC (rev 168894)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2014-05-15 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Compile all installed resources as GResources
+ https://bugs.webkit.org/show_bug.cgi?id=131099
+
+ Reviewed by Philippe Normand.
+
+ * PlatformGTK.cmake: Do not install the resources.
+ * platform/audio/gtk/AudioBusGtk.cpp:
+ (WebCore::AudioBus::loadPlatformResource): Load the audio resource
+ from GResources and use createBusFromInMemoryAudioFile().
+ * platform/graphics/Image.h: Remove unsued function loadPlatformThemeIcon.
+ * platform/graphics/gtk/ImageGtk.cpp:
+ (WebCore::loadImageFromGResource): Load the given icon name from GResources.
+ (WebCore::loadResourceSharedBuffer): Use char* instead of CString.
+ (WebCore::loadMissingImageIconFromTheme): Try to load the missing
+ icon from the current GTK icon theme.
+ (WebCore::Image::loadPlatformResource): Call
+ loadMissingImageIconFromTheme for missing icon or
+ loadImageFromGResource for any other icon name.
+ (WebCore::getPathToImageResource): Deleted.
+ (WebCore::getThemeIconFileName): Deleted.
+ (WebCore::loadImageFromFile): Deleted.
+ (WebCore::Image::loadPlatformThemeIcon): Deleted.
+
</ins><span class="cx"> 2014-05-14 Beth Dakin <bdakin@apple.com>
</span><span class="cx">
</span><span class="cx"> Tiled scrolling indicator needs to take topContentInset into account
</span></span></pre></div>
<a id="trunkSourceWebCorePlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/PlatformGTK.cmake (168893 => 168894)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/PlatformGTK.cmake        2014-05-15 05:40:53 UTC (rev 168893)
+++ trunk/Source/WebCore/PlatformGTK.cmake        2014-05-15 08:06:29 UTC (rev 168894)
</span><span class="lines">@@ -385,22 +385,6 @@
</span><span class="cx"> )
</span><span class="cx"> endif ()
</span><span class="cx">
</span><del>-install(FILES "${WEBCORE_DIR}/Resources/textAreaResizeCorner.png"
- "${WEBCORE_DIR}/Resources/nullPlugin.png"
- "${WEBCORE_DIR}/Resources/urlIcon.png"
- "${WEBCORE_DIR}/Resources/missingImage.png"
- "${WEBCORE_DIR}/Resources/panIcon.png"
- "${WEBCORE_DIR}/Resources/deleteButton.png"
- "${WEBCORE_DIR}/Resources/inputSpeech.png"
- DESTINATION "${DATA_INSTALL_DIR}/images"
-)
-
-if (ENABLE_WEB_AUDIO)
- install(FILES "${WEBCORE_DIR}/platform/audio/resources/Composite.wav"
- DESTINATION "${DATA_INSTALL_DIR}/resources/audio"
- )
-endif ()
-
</del><span class="cx"> if (ENABLE_WEBKIT2)
</span><span class="cx"> # WebKit2 needs a version of WebCore compiled against GTK+2, so we've isolated all the GTK+
</span><span class="cx"> # dependent files into a separate library which can be used to construct a GTK+2 WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformaudiogtkAudioBusGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/audio/gtk/AudioBusGtk.cpp (168893 => 168894)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/audio/gtk/AudioBusGtk.cpp        2014-05-15 05:40:53 UTC (rev 168893)
+++ trunk/Source/WebCore/platform/audio/gtk/AudioBusGtk.cpp        2014-05-15 08:06:29 UTC (rev 168894)
</span><span class="lines">@@ -23,23 +23,18 @@
</span><span class="cx"> #include "AudioBus.h"
</span><span class="cx">
</span><span class="cx"> #include "AudioFileReader.h"
</span><del>-#include "FileSystem.h"
-#include <glib.h>
</del><ins>+#include <gio/gio.h>
+#include <wtf/gobject/GRefPtr.h>
</ins><span class="cx"> #include <wtf/gobject/GUniquePtr.h>
</span><del>-#include <wtf/text/CString.h>
</del><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> PassRefPtr<AudioBus> AudioBus::loadPlatformResource(const char* name, float sampleRate)
</span><span class="cx"> {
</span><del>- GUniquePtr<gchar> filename(g_strdup_printf("%s.wav", name));
- const char* environmentPath = getenv("AUDIO_RESOURCES_PATH");
- GUniquePtr<gchar> absoluteFilename;
- if (environmentPath)
- absoluteFilename.reset(g_build_filename(environmentPath, filename.get(), NULL));
- else
- absoluteFilename.reset(g_build_filename(sharedResourcesPath().data(), "resources", "audio", filename.get(), NULL));
- return createBusFromAudioFile(absoluteFilename.get(), false, sampleRate);
</del><ins>+ GUniquePtr<char> path(g_strdup_printf("/org/webkitgtk/resources/audio/%s", name));
+ GRefPtr<GBytes> data = adoptGRef(g_resources_lookup_data(path.get(), G_RESOURCE_LOOKUP_FLAGS_NONE, nullptr));
+ ASSERT(data);
+ return createBusFromInMemoryAudioFile(g_bytes_get_data(data.get(), nullptr), g_bytes_get_size(data.get()), false, sampleRate);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsImageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Image.h (168893 => 168894)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Image.h        2014-05-15 05:40:53 UTC (rev 168893)
+++ trunk/Source/WebCore/platform/graphics/Image.h        2014-05-15 08:06:29 UTC (rev 168894)
</span><span class="lines">@@ -152,7 +152,6 @@
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx"> virtual GdkPixbuf* getGdkPixbuf() { return 0; }
</span><del>- static PassRefPtr<Image> loadPlatformThemeIcon(const char* name, int size);
</del><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(EFL)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgtkImageGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/gtk/ImageGtk.cpp (168893 => 168894)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gtk/ImageGtk.cpp        2014-05-15 05:40:53 UTC (rev 168893)
+++ trunk/Source/WebCore/platform/graphics/gtk/ImageGtk.cpp        2014-05-15 08:06:29 UTC (rev 168894)
</span><span class="lines">@@ -26,49 +26,31 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx">
</span><span class="cx"> #include "BitmapImage.h"
</span><del>-#include "FileSystem.h"
</del><span class="cx"> #include "GUniquePtrGtk.h"
</span><span class="cx"> #include "GdkCairoUtilities.h"
</span><span class="cx"> #include "SharedBuffer.h"
</span><del>-#include <wtf/gobject/GUniquePtr.h>
-#include <wtf/text/CString.h>
</del><span class="cx"> #include <cairo.h>
</span><span class="cx"> #include <gtk/gtk.h>
</span><ins>+#include <wtf/gobject/GRefPtr.h>
+#include <wtf/gobject/GUniquePtr.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-static char* getPathToImageResource(char* resource)
</del><ins>+static PassRefPtr<Image> loadImageFromGResource(const char* iconName)
</ins><span class="cx"> {
</span><del>- if (g_getenv("WEBKIT_TOP_LEVEL"))
- return g_build_filename(g_getenv("WEBKIT_TOP_LEVEL"), "Source", "WebCore", "Resources", resource, NULL);
-
- return g_build_filename(sharedResourcesPath().data(), "images", resource, NULL);
</del><ins>+ RefPtr<BitmapImage> icon = BitmapImage::create();
+ GUniquePtr<char> path(g_strdup_printf("/org/webkitgtk/resources/images/%s", iconName));
+ GRefPtr<GBytes> data = adoptGRef(g_resources_lookup_data(path.get(), G_RESOURCE_LOOKUP_FLAGS_NONE, nullptr));
+ ASSERT(data);
+ icon->setData(SharedBuffer::create(static_cast<const unsigned char*>(g_bytes_get_data(data.get(), nullptr)), g_bytes_get_size(data.get())), true);
+ return icon.release();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-static CString getThemeIconFileName(const char* name, int size)
</del><ins>+static PassRefPtr<SharedBuffer> loadResourceSharedBuffer(const char* filename)
</ins><span class="cx"> {
</span><del>- GtkIconInfo* iconInfo = gtk_icon_theme_lookup_icon(gtk_icon_theme_get_default(),
- name, size, GTK_ICON_LOOKUP_NO_SVG);
- // Try to fallback on MISSING_IMAGE.
- if (!iconInfo)
- iconInfo = gtk_icon_theme_lookup_icon(gtk_icon_theme_get_default(),
- GTK_STOCK_MISSING_IMAGE, size,
- GTK_ICON_LOOKUP_NO_SVG);
- if (iconInfo) {
- GUniquePtr<GtkIconInfo> info(iconInfo);
- return CString(gtk_icon_info_get_filename(info.get()));
- }
-
- // No icon was found, this can happen if not GTK theme is set. In
- // that case an empty Image will be created.
- return CString();
-}
-
-static PassRefPtr<SharedBuffer> loadResourceSharedBuffer(CString name)
-{
</del><span class="cx"> GUniqueOutPtr<gchar> content;
</span><span class="cx"> gsize length;
</span><del>- if (!g_file_get_contents(name.data(), &content.outPtr(), &length, 0))
</del><ins>+ if (!g_file_get_contents(filename, &content.outPtr(), &length, nullptr))
</ins><span class="cx"> return SharedBuffer::create();
</span><span class="cx">
</span><span class="cx"> return SharedBuffer::create(content.get(), length);
</span><span class="lines">@@ -78,35 +60,24 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<Image> loadImageFromFile(CString fileName)
</del><ins>+static PassRefPtr<Image> loadMissingImageIconFromTheme()
</ins><span class="cx"> {
</span><del>- RefPtr<BitmapImage> img = BitmapImage::create();
- if (!fileName.isNull()) {
- RefPtr<SharedBuffer> buffer = loadResourceSharedBuffer(fileName);
- img->setData(buffer.release(), true);
</del><ins>+ RefPtr<BitmapImage> icon = BitmapImage::create();
+ GUniquePtr<GtkIconInfo> iconInfo(gtk_icon_theme_lookup_icon(gtk_icon_theme_get_default(), GTK_STOCK_MISSING_IMAGE, 16, GTK_ICON_LOOKUP_NO_SVG));
+ if (iconInfo) {
+ RefPtr<SharedBuffer> buffer = loadResourceSharedBuffer(gtk_icon_info_get_filename(iconInfo.get()));
+ icon->setData(buffer.release(), true);
+ return icon.release();
</ins><span class="cx"> }
</span><del>- return img.release();
</del><ins>+
+ return loadImageFromGResource("missingImage");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PassRefPtr<Image> Image::loadPlatformResource(const char* name)
</span><span class="cx"> {
</span><del>- CString fileName;
- if (!strcmp("missingImage", name))
- fileName = getThemeIconFileName(GTK_STOCK_MISSING_IMAGE, 16);
- if (fileName.isNull()) {
- GUniquePtr<gchar> imageName(g_strdup_printf("%s.png", name));
- GUniquePtr<gchar> glibFileName(getPathToImageResource(imageName.get()));
- fileName = glibFileName.get();
- }
-
- return loadImageFromFile(fileName);
</del><ins>+ return !strcmp("missingImage", name) ? loadMissingImageIconFromTheme() : loadImageFromGResource(name);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<Image> Image::loadPlatformThemeIcon(const char* name, int size)
-{
- return loadImageFromFile(getThemeIconFileName(name, size));
-}
-
</del><span class="cx"> GdkPixbuf* BitmapImage::getGdkPixbuf()
</span><span class="cx"> {
</span><span class="cx"> RefPtr<cairo_surface_t> surface = nativeImageForCurrentFrame();
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (168893 => 168894)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-05-15 05:40:53 UTC (rev 168893)
+++ trunk/Source/WebKit2/ChangeLog        2014-05-15 08:06:29 UTC (rev 168894)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-05-15 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Compile all installed resources as GResources
+ https://bugs.webkit.org/show_bug.cgi?id=131099
+
+ Reviewed by Philippe Normand.
+
+ It avoids conflicts with old WebKit versions, and resources are
+ always found even without installing or using environment variables.
+
+ * PlatformGTK.cmake: Add rules to write the xml file with the
+ resources depending on the configure options and to generate and
+ build the GResources file.
+
</ins><span class="cx"> 2014-05-14 Gyuyoung Kim <gyuyoung.kim@samsung.com>
</span><span class="cx">
</span><span class="cx"> [EFL][WK2] Fix an unit test of ewk_context_url_scheme_register()
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformGTK.cmake (168893 => 168894)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformGTK.cmake        2014-05-15 05:40:53 UTC (rev 168893)
+++ trunk/Source/WebKit2/PlatformGTK.cmake        2014-05-15 08:06:29 UTC (rev 168894)
</span><span class="lines">@@ -17,6 +17,7 @@
</span><span class="cx"> list(APPEND WebKit2_SOURCES
</span><span class="cx"> ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.c
</span><span class="cx"> ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2InspectorGResourceBundle.c
</span><ins>+ ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2ResourcesGResourceBundle.c
</ins><span class="cx">
</span><span class="cx"> ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.cpp
</span><span class="cx"> ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.cpp
</span><span class="lines">@@ -504,6 +505,47 @@
</span><span class="cx"> VERBATIM
</span><span class="cx"> )
</span><span class="cx">
</span><ins>+set(WebKit2Resources
+ " <file alias=\"images/deleteButton\">deleteButton.png</file>\n"
+ " <file alias=\"images/missingImage\">missingImage.png</file>\n"
+ " <file alias=\"images/panIcon\">panIcon.png</file>\n"
+ " <file alias=\"images/textAreaResizeCorner\">textAreaResizeCorner.png</file>\n"
+)
+
+if (ENABLE_ICONDATABASE)
+ list(APPEND WebKit2Resources
+ " <file alias=\"images/urlIcon\">urlIcon.png</file>\n"
+ )
+endif ()
+
+if (ENABLE_INPUT_SPEECH)
+ list(APPEND WebKit2Resources
+ " <file alias=\"images/inputSpeech\">inputSpeech.png</file>\n"
+ )
+endif ()
+
+if (ENABLE_WEB_AUDIO)
+ list(APPEND WebKit2Resources
+ " <file alias=\"audio/Composite\">Composite.wav</file>\n"
+ )
+endif ()
+
+file(WRITE ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2ResourcesGResourceBundle.xml
+ "<?xml version=1.0 encoding=UTF-8?>\n"
+ "<gresources>\n"
+ " <gresource prefix=\"/org/webkitgtk/resources\">\n"
+ ${WebKit2Resources}
+ " </gresource>\n"
+ "</gresources>\n"
+)
+
+add_custom_command(
+ OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2ResourcesGResourceBundle.c
+ DEPENDS ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2ResourcesGResourceBundle.xml
+ COMMAND glib-compile-resources --generate --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebCore/Resources --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebCore/platform/audio/resources --target=${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2ResourcesGResourceBundle.c ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2ResourcesGResourceBundle.xml
+ VERBATIM
+)
+
</ins><span class="cx"> add_custom_target(webkit2gtk-forwarding-headers
</span><span class="cx"> COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${FORWARDING_HEADERS_DIR} gtk
</span><span class="cx"> COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${FORWARDING_HEADERS_DIR} soup
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (168893 => 168894)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-05-15 05:40:53 UTC (rev 168893)
+++ trunk/Tools/ChangeLog        2014-05-15 08:06:29 UTC (rev 168894)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2014-05-15 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Compile all installed resources as GResources
+ https://bugs.webkit.org/show_bug.cgi?id=131099
+
+ Reviewed by Philippe Normand.
+
+ * Scripts/webkitpy/port/gtk.py:
+ (GtkPort.setup_environ_for_server): Removed now unneeded
+ AUDIO_RESOURCES_PATH env var.
+
</ins><span class="cx"> 2014-05-14 Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com>
</span><span class="cx">
</span><span class="cx"> Remove CSS_STICKY_POSITION guards
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpyportgtkpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/port/gtk.py (168893 => 168894)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/port/gtk.py        2014-05-15 05:40:53 UTC (rev 168893)
+++ trunk/Tools/Scripts/webkitpy/port/gtk.py        2014-05-15 08:06:29 UTC (rev 168894)
</span><span class="lines">@@ -102,7 +102,6 @@
</span><span class="cx"> environment['LIBOVERLAY_SCROLLBAR'] = '0'
</span><span class="cx"> environment['TEST_RUNNER_INJECTED_BUNDLE_FILENAME'] = self._build_path('lib', 'libTestRunnerInjectedBundle.so')
</span><span class="cx"> environment['TEST_RUNNER_TEST_PLUGIN_PATH'] = self._build_path('lib')
</span><del>- environment['AUDIO_RESOURCES_PATH'] = self.path_from_webkit_base('Source', 'WebCore', 'platform', 'audio', 'resources')
</del><span class="cx"> self._copy_value_from_environ_if_set(environment, 'WEBKIT_OUTPUTDIR')
</span><span class="cx"> if self.get_option("leaks"):
</span><span class="cx"> # Turn off GLib memory optimisations https://wiki.gnome.org/Valgrind.
</span></span></pre>
</div>
</div>
</body>
</html>