[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.2.5-1-1-g0ecfd13
Michael Gilbert
michael.s.gilbert at gmail.com
Tue Oct 19 02:01:51 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 0ecfd136702278c1e00a11afb6a71cb198f66917
Author: Michael Gilbert <michael.s.gilbert at gmail.com>
Date: Mon Oct 18 22:03:22 2010 -0400
unapply patches from git since they will be applied at build time
diff --git a/JavaScriptCore/wtf/ListHashSet.h b/JavaScriptCore/wtf/ListHashSet.h
index 28a3ff6..54ed36b 100644
--- a/JavaScriptCore/wtf/ListHashSet.h
+++ b/JavaScriptCore/wtf/ListHashSet.h
@@ -127,7 +127,7 @@ namespace WTF {
: m_freeList(pool())
, m_isDoneWithInitialFreeList(false)
{
- memset(m_pool, 0, sizeof(m_pool));
+ memset(m_pool.pool, 0, sizeof(m_pool.pool));
}
Node* allocate()
@@ -171,7 +171,7 @@ namespace WTF {
}
private:
- Node* pool() { return reinterpret_cast<Node*>(m_pool); }
+ Node* pool() { return reinterpret_cast<Node*>(m_pool.pool); }
Node* pastPool() { return pool() + m_poolSize; }
bool inPool(Node* node)
@@ -182,7 +182,10 @@ namespace WTF {
Node* m_freeList;
bool m_isDoneWithInitialFreeList;
static const size_t m_poolSize = 256;
- uint32_t m_pool[(sizeof(Node) * m_poolSize + sizeof(uint32_t) - 1) / sizeof(uint32_t)];
+ union {
+ char pool[sizeof(Node) * m_poolSize];
+ double forAlignment;
+ } m_pool;
};
template<typename ValueArg> struct ListHashSetNode {
diff --git a/WebCore/platform/text/AtomicString.cpp b/WebCore/platform/text/AtomicString.cpp
index 75a3aff..c313f7f 100644
--- a/WebCore/platform/text/AtomicString.cpp
+++ b/WebCore/platform/text/AtomicString.cpp
@@ -103,9 +103,9 @@ static inline bool equal(StringImpl* string, const UChar* characters, unsigned l
if (string->length() != length)
return false;
-#if CPU(ARM) || CPU(SPARC) || CPU(SH4)
// FIXME: perhaps we should have a more abstract macro that indicates when
// going 4 bytes at a time is unsafe
+#if CPU(ARM) || CPU(SH4)
const UChar* stringCharacters = string->characters();
for (unsigned i = 0; i != length; ++i) {
if (*stringCharacters++ != *characters++)
diff --git a/WebCore/platform/text/StringHash.h b/WebCore/platform/text/StringHash.h
index 2f2c6ba..e6c548a 100644
--- a/WebCore/platform/text/StringHash.h
+++ b/WebCore/platform/text/StringHash.h
@@ -54,13 +54,13 @@ namespace WebCore {
// FIXME: perhaps we should have a more abstract macro that indicates when
// going 4 bytes at a time is unsafe
-#if CPU(ARM) || CPU(SPARC) || CPU(SH4)
+#if CPU(ARM) || CPU(SH4)
const UChar* aChars = a->characters();
const UChar* bChars = b->characters();
- for (unsigned i = 0; i != aLength; ++i)
+ for (unsigned i = 0; i != aLength; ++i) {
if (*aChars++ != *bChars++)
return false;
-
+ }
return true;
#else
/* Do it 4-bytes-at-a-time on architectures where it's safe */
diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
index ee79f70..7187244 100644
--- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
@@ -47,7 +47,6 @@
#include "MIMETypeRegistry.h"
#include "MouseEvent.h"
#include "NotImplemented.h"
-#include "Page.h"
#include "PlatformString.h"
#include "PluginDatabase.h"
#include "RenderPart.h"
@@ -92,117 +91,9 @@ FrameLoaderClient::~FrameLoaderClient()
g_object_unref(m_policyDecision);
}
-typedef HashSet<String> GoogleDomainsSet;
-
-static void initializeDomainsList(GoogleDomainsSet& googleDomains)
-{
- // Google search domains.
- googleDomains.add("biz");
- googleDomains.add("com");
- googleDomains.add("net");
- googleDomains.add("org");
- googleDomains.add("ae");
- googleDomains.add("ag");
- googleDomains.add("am");
- googleDomains.add("at");
- googleDomains.add("az");
- googleDomains.add("be");
- googleDomains.add("bi");
- googleDomains.add("ca");
- googleDomains.add("cc");
- googleDomains.add("cd");
- googleDomains.add("cg");
- googleDomains.add("ch");
- googleDomains.add("cl");
- googleDomains.add("com.br");
- googleDomains.add("co.uk");
- googleDomains.add("co.jp");
- googleDomains.add("de");
- googleDomains.add("dj");
- googleDomains.add("dk");
- googleDomains.add("es");
- googleDomains.add("fi");
- googleDomains.add("fm");
- googleDomains.add("fr");
- googleDomains.add("gg");
- googleDomains.add("gl");
- googleDomains.add("gm");
- googleDomains.add("gs");
- googleDomains.add("hn");
- googleDomains.add("hu");
- googleDomains.add("ie");
- googleDomains.add("it");
- googleDomains.add("je");
- googleDomains.add("kz");
- googleDomains.add("li");
- googleDomains.add("lt");
- googleDomains.add("lu");
- googleDomains.add("lv");
- googleDomains.add("ma");
- googleDomains.add("ms");
- googleDomains.add("mu");
- googleDomains.add("mw");
- googleDomains.add("nl");
- googleDomains.add("no");
- googleDomains.add("nu");
- googleDomains.add("pl");
- googleDomains.add("pn");
- googleDomains.add("pt");
- googleDomains.add("ru");
- googleDomains.add("rw");
- googleDomains.add("sh");
- googleDomains.add("sk");
- googleDomains.add("sm");
- googleDomains.add("st");
- googleDomains.add("td");
- googleDomains.add("tk");
- googleDomains.add("tp");
- googleDomains.add("tv");
- googleDomains.add("us");
- googleDomains.add("uz");
- googleDomains.add("ws");
-}
-
-static bool isGoogleDomain(String host)
-{
- DEFINE_STATIC_LOCAL(HashSet<String>, googleDomains, ());
- DEFINE_STATIC_LOCAL(Vector<String>, otherGoogleDomains, ());
-
- if (googleDomains.isEmpty()) {
- otherGoogleDomains.append("gmail.com");
- otherGoogleDomains.append("youtube.com");
- otherGoogleDomains.append("gstatic.com");
- otherGoogleDomains.append("ytimg.com");
-
- initializeDomainsList(googleDomains);
- }
-
- // First check if this is one of the various google.com international domains.
- int position = host.find(".google.");
- if (position > 0 && googleDomains.contains(host.substring(position + sizeof(".google."))))
- return true;
-
- // Then we check the possibility of it being one of the other, .com-only google domains.
- for (unsigned int i = 0; i < otherGoogleDomains.size(); i++) {
- if (host.endsWith(otherGoogleDomains.at(i)))
- return true;
- }
-
- return false;
-}
-
-String FrameLoaderClient::userAgent(const KURL& url)
+String FrameLoaderClient::userAgent(const KURL&)
{
WebKitWebSettings* settings = webkit_web_view_get_settings(getViewFromFrame(m_frame));
-
- gboolean useQuirks;
- g_object_get(settings, "enable-site-specific-quirks", &useQuirks, NULL);
-
- // For Google domains, drop the browser's custom User Agent string, and use the standard
- // WebKit/Safari one, so they don't give us a broken experience.
- if (useQuirks && isGoogleDomain(url.host()))
- return webkitUserAgent();
-
return String::fromUTF8(webkit_web_settings_get_user_agent(settings));
}
diff --git a/WebKit/gtk/webkit/webkitprivate.h b/WebKit/gtk/webkit/webkitprivate.h
index 3bebcb5..d51d681 100644
--- a/WebKit/gtk/webkit/webkitprivate.h
+++ b/WebKit/gtk/webkit/webkitprivate.h
@@ -55,7 +55,6 @@
#include "HistoryItem.h"
#include "Settings.h"
#include "Page.h"
-#include "PlatformString.h"
#include "Frame.h"
#include "InspectorClientGtk.h"
#include "FrameLoaderClient.h"
@@ -214,9 +213,6 @@ extern "C" {
WebKitWebResource*
webkit_web_resource_new_with_core_resource(PassRefPtr<WebCore::ArchiveResource>);
- WebCore::String
- webkitUserAgent();
-
void
webkit_web_resource_init_with_core_resource(WebKitWebResource*, PassRefPtr<WebCore::ArchiveResource>);
diff --git a/WebKit/gtk/webkit/webkitwebsettings.cpp b/WebKit/gtk/webkit/webkitwebsettings.cpp
index 89bc546..19c4168 100644
--- a/WebKit/gtk/webkit/webkitwebsettings.cpp
+++ b/WebKit/gtk/webkit/webkitwebsettings.cpp
@@ -163,65 +163,56 @@ enum {
// Create a default user agent string
// This is a liberal interpretation of http://www.mozilla.org/build/revised-user-agent-strings.html
// See also http://developer.apple.com/internet/safari/faq.html#anchor2
-static String webkitPlatform()
+static String webkit_get_user_agent()
{
+ gchar* platform;
+ gchar* osVersion;
+
#if PLATFORM(X11)
- DEFINE_STATIC_LOCAL(const String, uaPlatform, (String("X11")));
+ platform = g_strdup("X11");
#elif OS(WINDOWS)
- DEFINE_STATIC_LOCAL(const String, uaPlatform, (String("Windows")));
+ platform = g_strdup("Windows");
#elif PLATFORM(MAC)
- DEFINE_STATIC_LOCAL(const String, uaPlatform, (String("Macintosh")));
+ platform = g_strdup("Macintosh");
#elif defined(GDK_WINDOWING_DIRECTFB)
- DEFINE_STATIC_LOCAL(const String, uaPlatform, (String("DirectFB")));
+ platform = g_strdup("DirectFB");
#else
- DEFINE_STATIC_LOCAL(const String, uaPlatform, (String("Unknown")));
+ platform = g_strdup("Unknown");
#endif
- return uaPlatform;
-}
-
-static String webkitOSVersion()
-{
// FIXME: platform/version detection can be shared.
#if OS(DARWIN)
#if CPU(X86)
- DEFINE_STATIC_LOCAL(const String, uaOSVersion, (String("Intel Mac OS X")));
+ osVersion = g_strdup("Intel Mac OS X");
#else
- DEFINE_STATIC_LOCAL(const String, uaOSVersion, (String("PPC Mac OS X")));
+ osVersion = g_strdup("PPC Mac OS X");
#endif
#elif OS(UNIX)
- DEFINE_STATIC_LOCAL(String, uaOSVersion, (String()));
-
- if (!uaOSVersion.isEmpty())
- return uaOSVersion;
-
struct utsname name;
- GOwnPtr<gchar> osVersion;
if (uname(&name) != -1)
- osVersion.set(g_strdup_printf("%s %s", name.sysname, name.machine));
+ osVersion = g_strdup_printf("%s %s", name.sysname, name.machine);
else
- osVersion.set(g_strdup("Unknown"));
+ osVersion = g_strdup("Unknown");
- uaOSVersion = String::fromUTF8(osVersion.get());
#elif OS(WINDOWS)
- DEFINE_STATIC_LOCAL(const String, uaOSVersion, (String("Windows")));
+ // FIXME: Compute the Windows version
+ osVersion = g_strdup("Windows");
+
#else
- DEFINE_STATIC_LOCAL(const String, uaOSVersion, (String("Unknown")));
+ osVersion = g_strdup("Unknown");
#endif
- return uaOSVersion;
-}
-
-String webkitUserAgent()
-{
// We mention Safari since many broken sites check for it (OmniWeb does this too)
// We re-use the WebKit version, though it doesn't seem to matter much in practice
DEFINE_STATIC_LOCAL(const String, uaVersion, (String::format("%d.%d+", WEBKIT_USER_AGENT_MAJOR_VERSION, WEBKIT_USER_AGENT_MINOR_VERSION)));
- DEFINE_STATIC_LOCAL(const String, staticUA, (String::format("Mozilla/5.0 (%s; U; %s; %s) AppleWebKit/%s (KHTML, like Gecko) Version/5.0 Safari/%s",
- webkitPlatform().utf8().data(), webkitOSVersion().utf8().data(), defaultLanguage().utf8().data(), uaVersion.utf8().data(), uaVersion.utf8().data())));
+ DEFINE_STATIC_LOCAL(const String, staticUA, (String::format("Mozilla/5.0 (%s; U; %s; %s) AppleWebKit/%s (KHTML, like Gecko) Safari/%s",
+ platform, osVersion, defaultLanguage().utf8().data(), uaVersion.utf8().data(), uaVersion.utf8().data())));
+
+ g_free(osVersion);
+ g_free(platform);
return staticUA;
}
@@ -616,7 +607,7 @@ static void webkit_web_settings_class_init(WebKitWebSettingsClass* klass)
g_param_spec_string("user-agent",
_("User Agent"),
_("The User-Agent string used by WebKitGtk"),
- webkitUserAgent().utf8().data(),
+ webkit_get_user_agent().utf8().data(),
flags));
/**
@@ -1043,7 +1034,7 @@ static void webkit_web_settings_set_property(GObject* object, guint prop_id, con
case PROP_USER_AGENT:
g_free(priv->user_agent);
if (!g_value_get_string(value) || !strlen(g_value_get_string(value)))
- priv->user_agent = g_strdup(webkitUserAgent().utf8().data());
+ priv->user_agent = g_strdup(webkit_get_user_agent().utf8().data());
else
priv->user_agent = g_strdup(g_value_get_string(value));
break;
diff --git a/debian/changelog b/debian/changelog
index df3a807..abe6a53 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+webkit (1.2.5-2) UNRELEASED; urgency=high
+
+ * Unapply 02-pool-fixup-and-sparc-support.patch and
+ 04-spoof-user-agent-to-google.patch in git. This prevents the
+ creation of an unwanted debian-changes patch.
+
+ -- Michael Gilbert <michael.s.gilbert at gmail.com> Mon, 18 Oct 2010 22:00:36 -0400
+
webkit (1.2.5-1) unstable; urgency=high
[ Gustavo Noronha Silva ]
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list