.:
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 May 2015 20:29:45 +0000 (20:29 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 May 2015 20:29:45 +0000 (20:29 +0000)
015-05-08  Michael Catanzaro  <mcatanzaro@igalia.com>, Martin Robinson <mrobinson@igalia.com>

[GTK] Checks for DEVELOPMENT_BUILD are all wrong
https://bugs.webkit.org/show_bug.cgi?id=144746

Reviewed by Carlos Garcia Campos.

Don't set DEVELOPMENT_BUILD. We check whether it is defined for conditional compilation, not
what it is defined to, so defining it to 0 effectively turned it on always. Instead set
ENABLE_DEVELOPER_MODE so that we can use the ENABLE macro inside WebKit source code.

* Source/cmake/OptionsGTK.cmake:

Source/WebCore:
[GTK] Checks for DEVELOPMENT_BUILD are all wrong
https://bugs.webkit.org/show_bug.cgi?id=144746

Reviewed by Carlos Garcia Campos.

Use ENABLE(DEVELOPER_MODE) rather than DEVELOPMENT_BUILD.

* platform/gtk/GtkUtilities.cpp:
* platform/gtk/GtkUtilities.h:
* platform/text/gtk/HyphenationLibHyphen.cpp:
(WebCore::availableLocales):

Source/WebKit2:
[GTK] Checks for DEVELOPMENT_BUILD are all wrong
https://bugs.webkit.org/show_bug.cgi?id=144746

Reviewed by Carlos Garcia Campos.

Use ENABLE(DEVELOPER_MODE) rather than DEVELOPMENT_BUILD.

* Shared/gtk/ProcessExecutablePathGtk.cpp:
(WebKit::findWebKitProcess):
* UIProcess/API/gtk/WebKitWebContext.cpp:
(injectedBundleDirectory):
* UIProcess/gtk/TextCheckerGtk.cpp:
(WebKit::enchantTextChecker):

Tools:
015-05-08  Michael Catanzaro  <mcatanzaro@igalia.com>, Martin Robinson <mrobinson@igalia.com>

[GTK] Checks for DEVELOPMENT_BUILD are all wrong
https://bugs.webkit.org/show_bug.cgi?id=144746

Reviewed by Carlos Garcia Campos.

Use ENABLE_DEVELOPER_MODE rather than DEVELOPMENT_BUILD.

* MiniBrowser/gtk/main.c:
(main):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184010 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/platform/gtk/GtkUtilities.cpp
Source/WebCore/platform/gtk/GtkUtilities.h
Source/WebCore/platform/text/gtk/HyphenationLibHyphen.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/gtk/ProcessExecutablePathGtk.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
Source/WebKit2/UIProcess/gtk/TextCheckerGtk.cpp
Source/cmake/OptionsGTK.cmake
Tools/ChangeLog
Tools/MiniBrowser/gtk/main.c

index f2fa7fc..085e5a4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+015-05-08  Michael Catanzaro  <mcatanzaro@igalia.com>, Martin Robinson <mrobinson@igalia.com>
+
+        [GTK] Checks for DEVELOPMENT_BUILD are all wrong
+        https://bugs.webkit.org/show_bug.cgi?id=144746
+
+        Reviewed by Carlos Garcia Campos.
+
+        Don't set DEVELOPMENT_BUILD. We check whether it is defined for conditional compilation, not
+        what it is defined to, so defining it to 0 effectively turned it on always. Instead set
+        ENABLE_DEVELOPER_MODE so that we can use the ENABLE macro inside WebKit source code.
+
+        * Source/cmake/OptionsGTK.cmake:
+
 2015-05-08  Daniel Bates  <dabates@apple.com>
 
         [iOS] WebSQL operations are not performed after device is locked
index e0f9264..a2c0267 100644 (file)
@@ -1,3 +1,17 @@
+2015-05-08  Michael Catanzaro  <mcatanzaro@igalia.com>, Martin Robinson <mrobinson@igalia.com>
+
+        [GTK] Checks for DEVELOPMENT_BUILD are all wrong
+        https://bugs.webkit.org/show_bug.cgi?id=144746
+
+        Reviewed by Carlos Garcia Campos.
+
+        Use ENABLE(DEVELOPER_MODE) rather than DEVELOPMENT_BUILD.
+
+        * platform/gtk/GtkUtilities.cpp:
+        * platform/gtk/GtkUtilities.h:
+        * platform/text/gtk/HyphenationLibHyphen.cpp:
+        (WebCore::availableLocales):
+
 2015-05-08  Alexey Proskuryakov  <ap@apple.com>
 
         Crashes in SocketStreamHandleBase::close
index 0c6a32c..acdaf4e 100644 (file)
@@ -54,7 +54,7 @@ bool widgetIsOnscreenToplevelWindow(GtkWidget* widget)
     return gtk_widget_is_toplevel(widget) && GTK_IS_WINDOW(widget) && !GTK_IS_OFFSCREEN_WINDOW(widget);
 }
 
-#if defined(DEVELOPMENT_BUILD)
+#if ENABLE(DEVELOPER_MODE)
 static CString topLevelPath()
 {
     if (const char* topLevelDirectory = g_getenv("WEBKIT_TOP_LEVEL"))
index c2a4385..032dfd3 100644 (file)
@@ -28,7 +28,7 @@ class IntPoint;
 IntPoint convertWidgetPointToScreenPoint(GtkWidget*, const IntPoint&);
 bool widgetIsOnscreenToplevelWindow(GtkWidget*);
 
-#if defined(DEVELOPMENT_BUILD)
+#if ENABLE(DEVELOPER_MODE)
 CString webkitBuildDirectory();
 #endif
 
index 6f06f61..0234291 100644 (file)
@@ -63,7 +63,7 @@ static void scanDirectoryForDicionaries(const char* directoryPath, HashMap<Atomi
         availableLocales.set(AtomicString(extractLocaleFromDictionaryFilePath(filePath)), filePath);
 }
 
-#if defined(DEVELOPMENT_BUILD)
+#if ENABLE(DEVELOPER_MODE)
 static void scanTestDictionariesDirectoryIfNecessary(HashMap<AtomicString, String>& availableLocales)
 {
     // It's unfortunate that we need to look for the dictionaries this way, but
@@ -91,7 +91,7 @@ static HashMap<AtomicString, String>& availableLocales()
         for (size_t i = 0; i < WTF_ARRAY_LENGTH(gDictionaryDirectories); i++)
             scanDirectoryForDicionaries(gDictionaryDirectories[i], availableLocales);
 
-#if defined(DEVELOPMENT_BUILD)
+#if ENABLE(DEVELOPER_MODE)
         scanTestDictionariesDirectoryIfNecessary(availableLocales);
 #endif
 
index f512903..73ce9d5 100644 (file)
@@ -1,3 +1,19 @@
+2015-05-08  Michael Catanzaro  <mcatanzaro@igalia.com>, Martin Robinson <mrobinson@igalia.com>
+
+        [GTK] Checks for DEVELOPMENT_BUILD are all wrong
+        https://bugs.webkit.org/show_bug.cgi?id=144746
+
+        Reviewed by Carlos Garcia Campos.
+
+        Use ENABLE(DEVELOPER_MODE) rather than DEVELOPMENT_BUILD.
+
+        * Shared/gtk/ProcessExecutablePathGtk.cpp:
+        (WebKit::findWebKitProcess):
+        * UIProcess/API/gtk/WebKitWebContext.cpp:
+        (injectedBundleDirectory):
+        * UIProcess/gtk/TextCheckerGtk.cpp:
+        (WebKit::enchantTextChecker):
+
 2015-05-08  Anders Carlsson  <andersca@apple.com>
 
         Fix ProcessLauncher port leak
index 81bac45..3fe80f4 100644 (file)
@@ -30,7 +30,7 @@
 #include <WebCore/FileSystem.h>
 #include <glib.h>
 
-#if defined(DEVELOPMENT_BUILD)
+#if ENABLE(DEVELOPER_MODE)
 #include <wtf/gobject/GlibUtilities.h>
 #endif
 
@@ -38,7 +38,7 @@ using namespace WebCore;
 
 namespace WebKit {
 
-#if defined(DEVELOPMENT_BUILD)
+#if ENABLE(DEVELOPER_MODE)
 static String getExecutablePath()
 {
     CString executablePath = getCurrentExecutablePath();
@@ -50,7 +50,7 @@ static String getExecutablePath()
 
 static String findWebKitProcess(const char* processName)
 {
-#if defined(DEVELOPMENT_BUILD)
+#if ENABLE(DEVELOPER_MODE)
     static const char* execDirectory = g_getenv("WEBKIT_EXEC_PATH");
     if (execDirectory) {
         String processPath = pathByAppendingComponent(filenameToString(execDirectory), processName);
index e44c173..0cd600d 100644 (file)
@@ -216,7 +216,7 @@ static inline WebKitProcessModel toWebKitProcessModel(WebKit::ProcessModel proce
 
 static const char* injectedBundleDirectory()
 {
-#if defined(DEVELOPMENT_BUILD)
+#if ENABLE(DEVELOPER_MODE)
     const char* bundleDirectory = g_getenv("WEBKIT_INJECTED_BUNDLE_PATH");
     if (bundleDirectory && g_file_test(bundleDirectory, G_FILE_TEST_IS_DIR))
         return bundleDirectory;
index bf45e5b..292d253 100644 (file)
@@ -44,7 +44,7 @@ static WebCore::TextCheckerEnchant& enchantTextChecker()
 {
     static NeverDestroyed<WebCore::TextCheckerEnchant> checker;
 
-#if defined(DEVELOPMENT_BUILD)
+#if ENABLE(DEVELOPER_MODE)
     // This is a bit of a hack, but ensures that for testing purposes,
     // spell checking is properly initialized in WebKitTestRunner while
     // running layout tests. We should consider replacing this with some
index d1b3381..2cf0284 100644 (file)
@@ -76,8 +76,7 @@ WEBKIT_OPTION_DEPEND(USE_GSTREAMER_GL ENABLE_OPENGL)
 WEBKIT_OPTION_DEPEND(USE_GSTREAMER_GL ENABLE_VIDEO)
 WEBKIT_OPTION_DEPEND(USE_GSTREAMER_MPEGTS ENABLE_VIDEO)
 
-# FIXME: There is no reason these should be different.
-SET_AND_EXPOSE_TO_BUILD(DEVELOPMENT_BUILD ${DEVELOPER_MODE})
+SET_AND_EXPOSE_TO_BUILD(ENABLE_DEVELOPER_MODE ${DEVELOPER_MODE})
 if (DEVELOPER_MODE)
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MINIBROWSER PUBLIC ON)
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_API_TESTS PRIVATE ON)
index 4d74653..3460481 100644 (file)
@@ -1,3 +1,15 @@
+015-05-08  Michael Catanzaro  <mcatanzaro@igalia.com>, Martin Robinson <mrobinson@igalia.com>
+
+        [GTK] Checks for DEVELOPMENT_BUILD are all wrong
+        https://bugs.webkit.org/show_bug.cgi?id=144746
+
+        Reviewed by Carlos Garcia Campos.
+
+        Use ENABLE_DEVELOPER_MODE rather than DEVELOPMENT_BUILD.
+
+        * MiniBrowser/gtk/main.c:
+        (main):
+
 2015-05-08  Commit Queue  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r183996.
index bcc082c..a456ac6 100644 (file)
@@ -256,7 +256,7 @@ aboutURISchemeRequestCallback(WebKitURISchemeRequest *request, gpointer userData
 int main(int argc, char *argv[])
 {
     gtk_init(&argc, &argv);
-#if defined(DEVELOPMENT_BUILD)
+#if ENABLE_DEVELOPER_MODE
     g_setenv("WEBKIT_INJECTED_BUNDLE_PATH", WEBKIT_INJECTED_BUNDLE_PATH, FALSE);
 #endif