[GTK] Stop generating UserAgentGtk.h
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 24 Feb 2013 19:01:20 +0000 (19:01 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 24 Feb 2013 19:01:20 +0000 (19:01 +0000)
https://bugs.webkit.org/show_bug.cgi?id=110582

Reviewed by Martin Robinson.

.:

* configure.ac: Provide the USER_AGENT_GTK_(MAJOR|MINOR)_VERSION defines in the autotoolsconfig.h
header, containing the user agent versions that are to be used in the user agent string. The
WEBKIT_USER_AGENT_(MAJOR|MINOR)_VERSION name is avoided as the same defines are specified in the
webkitversion.h API header (but are not accessible from the WebCore layer). The UserAgentGtk.h
header is also not generated anymore from the input file.

Source/WebCore:

No new tests - no new functionality.

* GNUmakefile.list.am: Move the UserAgentGtk.h build target from the derived sources list to
the list of the WebCore platform sources.
* platform/gtk/UserAgentGtk.cpp:
(WebCore::standardUserAgent): Rename WEBKIT_USER_AGENT_(MAJOR|MINOR)_VERSION to
USER_AGENT_GTK_(MAJOR|MINOR)_VERSION.
* platform/gtk/UserAgentGtk.h: Renamed from Source/WebCore/platform/gtk/UserAgentGtk.h.in.
Same as the input file expect for removed WEBKIT_USER_AGENT_(MAJOR|MINOR)_VERSION defines that
are now replaced by using the USER_AGENT_GTK_(MAJOR|MINOR)_VERSION defines placed in autotoolsconfig.h.

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

ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/platform/gtk/UserAgentGtk.cpp
Source/WebCore/platform/gtk/UserAgentGtk.h [moved from Source/WebCore/platform/gtk/UserAgentGtk.h.in with 91% similarity]
configure.ac

index 24e7e9c..40f1529 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2013-02-24  Zan Dobersek  <zdobersek@igalia.com>
+
+        [GTK] Stop generating UserAgentGtk.h
+        https://bugs.webkit.org/show_bug.cgi?id=110582
+
+        Reviewed by Martin Robinson.
+
+        * configure.ac: Provide the USER_AGENT_GTK_(MAJOR|MINOR)_VERSION defines in the autotoolsconfig.h
+        header, containing the user agent versions that are to be used in the user agent string. The
+        WEBKIT_USER_AGENT_(MAJOR|MINOR)_VERSION name is avoided as the same defines are specified in the
+        webkitversion.h API header (but are not accessible from the WebCore layer). The UserAgentGtk.h
+        header is also not generated anymore from the input file.
+
 2013-02-21  Tony Chang  <tony@chromium.org>
 
         Autogenerate Settings that call setNeedsRecalcStyleInAllFrames when set
index 6e4d886..d7687b0 100644 (file)
@@ -1,3 +1,21 @@
+2013-02-24  Zan Dobersek  <zdobersek@igalia.com>
+
+        [GTK] Stop generating UserAgentGtk.h
+        https://bugs.webkit.org/show_bug.cgi?id=110582
+
+        Reviewed by Martin Robinson.
+
+        No new tests - no new functionality.
+
+        * GNUmakefile.list.am: Move the UserAgentGtk.h build target from the derived sources list to
+        the list of the WebCore platform sources.
+        * platform/gtk/UserAgentGtk.cpp:
+        (WebCore::standardUserAgent): Rename WEBKIT_USER_AGENT_(MAJOR|MINOR)_VERSION to
+        USER_AGENT_GTK_(MAJOR|MINOR)_VERSION.
+        * platform/gtk/UserAgentGtk.h: Renamed from Source/WebCore/platform/gtk/UserAgentGtk.h.in.
+        Same as the input file expect for removed WEBKIT_USER_AGENT_(MAJOR|MINOR)_VERSION defines that
+        are now replaced by using the USER_AGENT_GTK_(MAJOR|MINOR)_VERSION defines placed in autotoolsconfig.h.
+
 2013-02-24  Gustavo Noronha Silva  <gns@gnome.org>
 
         [GTK] GTK+ 2 build broken since GTK_API_VERSION_2 moved to autoconfig.h
index 8ae2f4f..4dac58e 100644 (file)
@@ -870,7 +870,6 @@ webcore_built_sources += \
        DerivedSources/WebCore/MathMLNames.cpp \
        DerivedSources/WebCore/MathMLNames.h \
        DerivedSources/WebCore/SettingsMacros.h \
-       DerivedSources/WebCore/UserAgentGtk.h \
        DerivedSources/WebCore/UserAgentStyleSheetsData.cpp \
        DerivedSources/WebCore/UserAgentStyleSheets.h \
        DerivedSources/WebCore/WebKitFontFamilyNames.cpp \
@@ -5740,6 +5739,7 @@ webcore_platform_sources += \
        Source/WebCore/platform/gtk/MIMETypeRegistryGtk.cpp \
        Source/WebCore/platform/gtk/SharedBufferGtk.cpp \
        Source/WebCore/platform/gtk/UserAgentGtk.cpp \
+       Source/WebCore/platform/gtk/UserAgentGtk.h \
        Source/WebCore/platform/gtk/TemporaryLinkStubs.cpp \
        Source/WebCore/platform/HostWindow.h \
        Source/WebCore/platform/KillRing.h \
index f3bc733..44b6761 100644 (file)
@@ -87,7 +87,7 @@ String standardUserAgent(const String& applicationName, const String& applicatio
     // browsers that are "Safari" but not running on OS X are the Safari iOS browser, so we
     // also claim to be  Chromium. Getting this wrong can cause sites to load the wrong JavaScript,
     // CSS, or custom fonts. In some cases sites won't load resources at all.
-    DEFINE_STATIC_LOCAL(const CString, uaVersion, (String::format("%i.%i", WEBKIT_USER_AGENT_MAJOR_VERSION, WEBKIT_USER_AGENT_MINOR_VERSION).utf8()));
+    DEFINE_STATIC_LOCAL(const CString, uaVersion, (String::format("%i.%i", USER_AGENT_GTK_MAJOR_VERSION, USER_AGENT_GTK_MINOR_VERSION).utf8()));
     DEFINE_STATIC_LOCAL(const String, staticUA, (String::format("Mozilla/5.0 (%s; %s) AppleWebKit/%s (KHTML, like Gecko) "
                                                                 "Chromium/25.0.1349.2 Chrome/25.0.1349.2 Safari/%s",
                                                                 platformForUAString(), platformVersionForUAString().utf8().data(),
similarity index 91%
rename from Source/WebCore/platform/gtk/UserAgentGtk.h.in
rename to Source/WebCore/platform/gtk/UserAgentGtk.h
index 5a50b7a..6c17533 100644 (file)
@@ -29,9 +29,6 @@
 #include <wtf/text/CString.h>
 #include <wtf/text/WTFString.h>
 
-#define WEBKIT_USER_AGENT_MAJOR_VERSION (@WEBKIT_USER_AGENT_MAJOR_VERSION@)
-#define WEBKIT_USER_AGENT_MINOR_VERSION (@WEBKIT_USER_AGENT_MINOR_VERSION@)
-
 namespace WebCore {
 
 String standardUserAgent(const String& applicationName = "", const String& applicationVersion = "");
index 5ecf82d..18faf86 100644 (file)
@@ -19,6 +19,8 @@ AC_SUBST(WEBKIT_MINOR_VERSION)
 AC_SUBST(WEBKIT_MICRO_VERSION)
 AC_SUBST(WEBKIT_USER_AGENT_MAJOR_VERSION)
 AC_SUBST(WEBKIT_USER_AGENT_MINOR_VERSION)
+AC_DEFINE([USER_AGENT_GTK_MAJOR_VERSION], [webkit_user_agent_major_version], [The major version used in user agent string])
+AC_DEFINE([USER_AGENT_GTK_MINOR_VERSION], [webkit_user_agent_minor_version], [The minor version used in user agent string])
 
 m4_include([Source/autotools/CheckSystemAndBasicDependencies.m4])
 m4_include([Source/autotools/SetupLibtool.m4])
@@ -37,7 +39,6 @@ m4_include([Source/autotools/SetupAutomake.m4])
 ######################################################################################
 
 AC_CONFIG_FILES([GNUmakefile])
-AC_CONFIG_FILES([DerivedSources/WebCore/UserAgentGtk.h:Source/WebCore/platform/gtk/UserAgentGtk.h.in])
 AC_CONFIG_FILES(
     [Source/JavaScriptCore/javascriptcoregtk-${WEBKITGTK_API_VERSION}.pc:Source/JavaScriptCore/javascriptcoregtk.pc.in
         Source/WebKit/gtk/JSCore-${WEBKITGTK_API_VERSION}.gir:Source/WebKit/gtk/JSCore.gir.in],