<!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>[172144] 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/172144">172144</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2014-08-06 08:01:29 -0700 (Wed, 06 Aug 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[GTK] Be able to disable gtk2 dependency
https://bugs.webkit.org/show_bug.cgi?id=135505

Reviewed by Gustavo Noronha Silva.

.:

Add ENABLE_PLUGIN_PROCESS_GTK2 compile option. GTK+2 is only
required when it's enabled. It's enabled by default.

* Source/cmake/OptionsGTK.cmake:

Source/WebCore:

Do not build WebCorePlatformGTK2 when ENABLE_PLUGIN_PROCESS_GTK2
is OFF.

* PlatformGTK.cmake:

Source/WebKit2:

* PlatformGTK.cmake: Only build WebKitPluginProcess2 when
ENABLE_PLUGIN_PROCESS_GTK2 is ON.
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess): Do not try to launch
WebKitPluginProcess2 executable when ENABLE_PLUGIN_PROCESS_GTK2 is OFF.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkChangeLog">trunk/ChangeLog</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="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2PlatformGTKcmake">trunk/Source/WebKit2/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebKit2UIProcessLaunchergtkProcessLauncherGtkcpp">trunk/Source/WebKit2/UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp</a></li>
<li><a href="#trunkSourcecmakeOptionsGTKcmake">trunk/Source/cmake/OptionsGTK.cmake</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/ChangeLog (172143 => 172144)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/ChangeLog        2014-08-06 13:45:43 UTC (rev 172143)
+++ trunk/ChangeLog        2014-08-06 15:01:29 UTC (rev 172144)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2014-08-06  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
+        [GTK] Be able to disable gtk2 dependency
+        https://bugs.webkit.org/show_bug.cgi?id=135505
+
+        Reviewed by Gustavo Noronha Silva.
+
+        Add ENABLE_PLUGIN_PROCESS_GTK2 compile option. GTK+2 is only
+        required when it's enabled. It's enabled by default.
+
+        * Source/cmake/OptionsGTK.cmake:
+
</ins><span class="cx"> 2014-08-05  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         More work on CMake.
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (172143 => 172144)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-08-06 13:45:43 UTC (rev 172143)
+++ trunk/Source/WebCore/ChangeLog        2014-08-06 15:01:29 UTC (rev 172144)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2014-08-06  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
+        [GTK] Be able to disable gtk2 dependency
+        https://bugs.webkit.org/show_bug.cgi?id=135505
+
+        Reviewed by Gustavo Noronha Silva.
+
+        Do not build WebCorePlatformGTK2 when ENABLE_PLUGIN_PROCESS_GTK2
+        is OFF.
+
+        * PlatformGTK.cmake:
+
</ins><span class="cx"> 2014-08-06  Mark Lam  &lt;mark.lam@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Gardening: fix bindings test breakage for for r170564 merged in r172129.
</span></span></pre></div>
<a id="trunkSourceWebCorePlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/PlatformGTK.cmake (172143 => 172144)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/PlatformGTK.cmake        2014-08-06 13:45:43 UTC (rev 172143)
+++ trunk/Source/WebCore/PlatformGTK.cmake        2014-08-06 15:01:29 UTC (rev 172144)
</span><span class="lines">@@ -382,8 +382,8 @@
</span><span class="cx">     )
</span><span class="cx"> endif ()
</span><span class="cx"> 
</span><del>-if (ENABLE_WEBKIT2)
-    # WebKit2 needs a version of WebCore compiled against GTK+2, so we've isolated all the GTK+
</del><ins>+if (ENABLE_PLUGIN_PROCESS_GTK2)
+    # WebKitPluginProcess2 needs a version of WebCore compiled against GTK+2, so we've isolated all the GTK+
</ins><span class="cx">     # dependent files into a separate library which can be used to construct a GTK+2 WebCore
</span><span class="cx">     # for the plugin process.
</span><span class="cx">     add_library(WebCorePlatformGTK2 ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (172143 => 172144)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-08-06 13:45:43 UTC (rev 172143)
+++ trunk/Source/WebKit2/ChangeLog        2014-08-06 15:01:29 UTC (rev 172144)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2014-08-06  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
+        [GTK] Be able to disable gtk2 dependency
+        https://bugs.webkit.org/show_bug.cgi?id=135505
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * PlatformGTK.cmake: Only build WebKitPluginProcess2 when
+        ENABLE_PLUGIN_PROCESS_GTK2 is ON.
+        * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
+        (WebKit::ProcessLauncher::launchProcess): Do not try to launch
+        WebKitPluginProcess2 executable when ENABLE_PLUGIN_PROCESS_GTK2 is OFF.
+
</ins><span class="cx"> 2014-08-05  Tim Horton  &lt;timothy_horton@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION (r164337): Pages are sometimes cut off/oriented incorrectly after using WKThumbnailView
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformGTK.cmake (172143 => 172144)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformGTK.cmake        2014-08-06 13:45:43 UTC (rev 172143)
+++ trunk/Source/WebKit2/PlatformGTK.cmake        2014-08-06 15:01:29 UTC (rev 172144)
</span><span class="lines">@@ -397,6 +397,7 @@
</span><span class="cx"> )
</span><span class="cx"> 
</span><span class="cx"> list(APPEND WebKit2_INCLUDE_DIRECTORIES
</span><ins>+    &quot;${WEBKIT2_DIR}/PluginProcess/unix&quot;
</ins><span class="cx">     &quot;${WEBCORE_DIR}/platform/cairo&quot;
</span><span class="cx">     &quot;${WEBCORE_DIR}/platform/gtk&quot;
</span><span class="cx">     &quot;${WEBCORE_DIR}/platform/graphics/cairo&quot;
</span><span class="lines">@@ -571,14 +572,9 @@
</span><span class="cx">      webkit2gtk-forwarding-headers
</span><span class="cx"> )
</span><span class="cx"> 
</span><del>-if (ENABLE_PLUGIN_PROCESS)
</del><ins>+if (ENABLE_PLUGIN_PROCESS_GTK2)
</ins><span class="cx">     set(PluginProcessGTK2_EXECUTABLE_NAME WebKitPluginProcess2)
</span><del>-    list(APPEND PluginProcessGTK2_INCLUDE_DIRECTORIES
-        &quot;${WEBKIT2_DIR}/PluginProcess/unix&quot;
-    )
</del><span class="cx"> 
</span><del>-    include_directories(${PluginProcessGTK2_INCLUDE_DIRECTORIES})
-
</del><span class="cx">     # FIXME: We should figure out a way to avoid compiling files that are common between the plugin
</span><span class="cx">     # process and WebKit2 only once instead of recompiling them for the plugin process.
</span><span class="cx">     list(APPEND PluginProcessGTK2_SOURCES
</span><span class="lines">@@ -710,14 +706,13 @@
</span><span class="cx">     add_dependencies(WebKitPluginProcess2 WebKit2)
</span><span class="cx"> 
</span><span class="cx">     install(TARGETS WebKitPluginProcess2 DESTINATION &quot;${LIBEXEC_INSTALL_DIR}&quot;)
</span><ins>+endif () # ENABLE_PLUGIN_PROCESS_GTK2
</ins><span class="cx"> 
</span><del>-    # GTK3 PluginProcess
-    list(APPEND PluginProcess_SOURCES
-        PluginProcess/EntryPoint/unix/PluginProcessMain.cpp
-    )
</del><ins>+# GTK3 PluginProcess
+list(APPEND PluginProcess_SOURCES
+    PluginProcess/EntryPoint/unix/PluginProcessMain.cpp
+)
</ins><span class="cx"> 
</span><del>-endif () # ENABLE_PLUGIN_PROCESS
-
</del><span class="cx"> # Commands for building the built-in injected bundle.
</span><span class="cx"> include_directories(
</span><span class="cx">     &quot;${WEBKIT2_DIR}/Platform&quot;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessLaunchergtkProcessLauncherGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp (172143 => 172144)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp        2014-08-06 13:45:43 UTC (rev 172143)
+++ trunk/Source/WebKit2/UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp        2014-08-06 15:01:29 UTC (rev 172144)
</span><span class="lines">@@ -67,8 +67,10 @@
</span><span class="cx">         break;
</span><span class="cx">     case PluginProcess:
</span><span class="cx">         executablePath = executablePathOfPluginProcess();
</span><ins>+#if ENABLE(PLUGIN_PROCESS_GTK2)
</ins><span class="cx">         if (m_launchOptions.extraInitializationData.contains(&quot;requires-gtk2&quot;))
</span><span class="cx">             executablePath.append('2');
</span><ins>+#endif
</ins><span class="cx">         pluginPath = m_launchOptions.extraInitializationData.get(&quot;plugin-path&quot;);
</span><span class="cx">         realPluginPath = fileSystemRepresentation(pluginPath);
</span><span class="cx">         break;
</span></span></pre></div>
<a id="trunkSourcecmakeOptionsGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/cmake/OptionsGTK.cmake (172143 => 172144)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/cmake/OptionsGTK.cmake        2014-08-06 13:45:43 UTC (rev 172143)
+++ trunk/Source/cmake/OptionsGTK.cmake        2014-08-06 15:01:29 UTC (rev 172144)
</span><span class="lines">@@ -29,8 +29,6 @@
</span><span class="cx"> find_package(Cairo 1.10.2 REQUIRED)
</span><span class="cx"> find_package(Fontconfig 2.8.0 REQUIRED)
</span><span class="cx"> find_package(Freetype2 2.4.2 REQUIRED)
</span><del>-find_package(GTK2 2.24.10 REQUIRED)
-find_package(GDK2 2.24.10 REQUIRED)
</del><span class="cx"> find_package(HarfBuzz 0.9.2 REQUIRED)
</span><span class="cx"> find_package(ICU REQUIRED)
</span><span class="cx"> find_package(JPEG REQUIRED)
</span><span class="lines">@@ -59,6 +57,8 @@
</span><span class="cx"> endif ()
</span><span class="cx"> 
</span><span class="cx"> WEBKIT_OPTION_BEGIN()
</span><ins>+WEBKIT_OPTION_DEFINE(ENABLE_PLUGIN_PROCESS_GTK2 &quot;Whether to build WebKitPluginProcess2 to load GTK2 based plugins.&quot; ON)
+
</ins><span class="cx"> if (OPENGL_FOUND AND (GLX_FOUND OR EGL_FOUND))
</span><span class="cx">     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBGL ON)
</span><span class="cx"> 
</span><span class="lines">@@ -152,6 +152,12 @@
</span><span class="cx"> WEBKIT_OPTION_DEFAULT_PORT_VALUE(WTF_USE_TILED_BACKING_STORE OFF)
</span><span class="cx"> WEBKIT_OPTION_END()
</span><span class="cx"> 
</span><ins>+if (ENABLE_PLUGIN_PROCESS_GTK2)
+    find_package(GTK2 2.24.10 REQUIRED)
+    find_package(GDK2 2.24.10 REQUIRED)
+    add_definitions(-DENABLE_PLUGIN_PROCESS_GTK2=1)
+endif ()
+
</ins><span class="cx"> if (ENABLE_X11_TARGET)
</span><span class="cx">     add_definitions(-DWTF_PLATFORM_X11=1)
</span><span class="cx">     add_definitions(-DMOZ_X11=1)
</span></span></pre>
</div>
</div>

</body>
</html>