REGRESSION(r192459): [GTK] User agent string is broken after r192459
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Nov 2015 07:48:06 +0000 (07:48 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Nov 2015 07:48:06 +0000 (07:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=151347

Reviewed by Žan Doberšek.

.:

Pass UA version numbers as strings to the build.

* Source/cmake/OptionsGTK.cmake:

Source/WebCore:

Remove the incorrect macro and simply use the given values
USER_AGENT_GTK_MAJOR_VERSION and USER_AGENT_GTK_MINOR_VERSION that
are now strings.

* platform/gtk/UserAgentGtk.cpp:
(WebCore::versionForUAString):
(WebCore::buildUserAgentString):

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

ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/platform/gtk/UserAgentGtk.cpp
Source/cmake/OptionsGTK.cmake

index 6ea574a..24b05cc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2015-11-17  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        REGRESSION(r192459): [GTK] User agent string is broken after r192459
+        https://bugs.webkit.org/show_bug.cgi?id=151347
+
+        Reviewed by Žan Doberšek.
+
+        Pass UA version numbers as strings to the build.
+
+        * Source/cmake/OptionsGTK.cmake:
+
 2015-11-16  Alex Christensen  <achristensen@webkit.org>
 
         Fix CMake build and make PluginProcess executable
index 0ea8589..c7847f8 100644 (file)
@@ -1,3 +1,18 @@
+2015-11-17  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        REGRESSION(r192459): [GTK] User agent string is broken after r192459
+        https://bugs.webkit.org/show_bug.cgi?id=151347
+
+        Reviewed by Žan Doberšek.
+
+        Remove the incorrect macro and simply use the given values
+        USER_AGENT_GTK_MAJOR_VERSION and USER_AGENT_GTK_MINOR_VERSION that
+        are now strings.
+
+        * platform/gtk/UserAgentGtk.cpp:
+        (WebCore::versionForUAString):
+        (WebCore::buildUserAgentString):
+
 2015-11-17  Zalan Bujtas  <zalan@apple.com>
 
         Simple line layout: Add letter-spacing support.
index 1850dd5..0685fc5 100644 (file)
@@ -113,9 +113,7 @@ static const String platformVersionForUAString()
 
 static const char* versionForUAString()
 {
-#define MAKE_VERSION(major, minor) #major "." #minor
-    return MAKE_VERSION(USER_AGENT_GTK_MAJOR_VERSION, USER_AGENT_GTK_MINOR_VERSION);
-#undef MAKE_VERSION
+    return USER_AGENT_GTK_MAJOR_VERSION "." USER_AGENT_GTK_MINOR_VERSION;
 }
 
 static String buildUserAgentString(const UserAgentQuirks& quirks)
index 8f8705e..986afff 100644 (file)
@@ -215,8 +215,8 @@ set(ENABLE_PLUGIN_PROCESS ${ENABLE_X11_TARGET})
 add_definitions(-DBUILDING_GTK__=1)
 add_definitions(-DGETTEXT_PACKAGE="WebKit2GTK-${WEBKITGTK_API_VERSION}")
 add_definitions(-DDATA_DIR="${CMAKE_INSTALL_DATADIR}")
-add_definitions(-DUSER_AGENT_GTK_MAJOR_VERSION=602)
-add_definitions(-DUSER_AGENT_GTK_MINOR_VERSION=1)
+add_definitions(-DUSER_AGENT_GTK_MAJOR_VERSION="602")
+add_definitions(-DUSER_AGENT_GTK_MINOR_VERSION="1")
 add_definitions(-DWEBKITGTK_API_VERSION_STRING="${WEBKITGTK_API_VERSION}")
 
 set(GTK_LIBRARIES ${GTK3_LIBRARIES})