From d82681f8c4f4bfe0c233597bc177c89a638ace0e Mon Sep 17 00:00:00 2001 From: "commit-queue@webkit.org" Date: Sat, 29 Jan 2011 11:39:57 +0000 Subject: [PATCH] 2011-01-29 Dan Winship Reviewed by Xan Lopez. [GTK] Require the latest glib and libsoup, and remove conditional support for older versions https://bugs.webkit.org/show_bug.cgi?id=50675 * autotools/webkit.m4: use AM_PATH_GLIB_2_0 rather than doing basically the same work by hand * configure.ac: 2011-01-29 Dan Winship Reviewed by Xan Lopez. [GTK] Remove HAVE_LIBSOUP_2_29_90 conditionals; we depend on libsoup 2.33.1 now. https://bugs.webkit.org/show_bug.cgi?id=50675 * platform/network/soup/CookieJarSoup.cpp: (WebCore::defaultCookieJar): (WebCore::setCookies): * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::ResourceHandle::prepareForURL): (WebCore::restartedCallback): (WebCore::startHttp): * platform/network/soup/ResourceRequestSoup.cpp: (WebCore::ResourceRequest::updateSoupMessage): (WebCore::ResourceRequest::toSoupMessage): (WebCore::ResourceRequest::updateFromSoupMessage): 2011-01-29 Dan Winship Reviewed by Xan Lopez. [GTK] Remove HAVE_LIBSOUP_2_29_90 conditionals; we depend on libsoup 2.33.1 now. https://bugs.webkit.org/show_bug.cgi?id=50675 * ewk/ewk_cookies.cpp: (ewk_cookies_file_set): (ewk_cookies_policy_set): (ewk_cookies_policy_get): 2011-01-29 Dan Winship Reviewed by Xan Lopez. [GTK] Remove HAVE_LIBSOUP_2_29_90 and HAVE_GSETTINGS conditionals; we depend on glib 2.27.4 and libsoup 2.33.1 now. https://bugs.webkit.org/show_bug.cgi?id=50675 * GNUmakefile.am: * WebCoreSupport/InspectorClientGtk.cpp: (WebKit::InspectorClient::storeSetting): * webkit/webkitprivate.cpp: (inspectorGSettings): * webkit/webkitprivate.h: git-svn-id: https://svn.webkit.org/repository/webkit/trunk@77061 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- ChangeLog | 12 +++++++++++ Source/WebCore/ChangeLog | 20 ++++++++++++++++++ .../platform/network/soup/CookieJarSoup.cpp | 8 -------- .../platform/network/soup/ResourceHandleSoup.cpp | 6 ------ .../platform/network/soup/ResourceRequestSoup.cpp | 6 ------ Source/WebKit/efl/ChangeLog | 13 ++++++++++++ Source/WebKit/efl/ewk/ewk_cookies.cpp | 6 ------ Source/WebKit/gtk/ChangeLog | 15 ++++++++++++++ Source/WebKit/gtk/GNUmakefile.am | 2 -- Source/autotools/webkit.m4 | 18 +++------------- configure.ac | 24 +--------------------- 11 files changed, 64 insertions(+), 66 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8c97238..914c6b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2011-01-29 Dan Winship + + Reviewed by Xan Lopez. + + [GTK] Require the latest glib and libsoup, and remove conditional + support for older versions + https://bugs.webkit.org/show_bug.cgi?id=50675 + + * autotools/webkit.m4: use AM_PATH_GLIB_2_0 rather than doing + basically the same work by hand + * configure.ac: + 2011-01-28 Martin Robinson [GTK] Build failure with --enable-indexed-database diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index d3e8398..7ee9b7a 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,23 @@ +2011-01-29 Dan Winship + + Reviewed by Xan Lopez. + + [GTK] Remove HAVE_LIBSOUP_2_29_90 conditionals; we depend on + libsoup 2.33.1 now. + https://bugs.webkit.org/show_bug.cgi?id=50675 + + * platform/network/soup/CookieJarSoup.cpp: + (WebCore::defaultCookieJar): + (WebCore::setCookies): + * platform/network/soup/ResourceHandleSoup.cpp: + (WebCore::ResourceHandle::prepareForURL): + (WebCore::restartedCallback): + (WebCore::startHttp): + * platform/network/soup/ResourceRequestSoup.cpp: + (WebCore::ResourceRequest::updateSoupMessage): + (WebCore::ResourceRequest::toSoupMessage): + (WebCore::ResourceRequest::updateFromSoupMessage): + 2011-01-29 Adam Barth Reviewed by Daniel Bates. diff --git a/Source/WebCore/platform/network/soup/CookieJarSoup.cpp b/Source/WebCore/platform/network/soup/CookieJarSoup.cpp index ba29622..e2c2f05 100644 --- a/Source/WebCore/platform/network/soup/CookieJarSoup.cpp +++ b/Source/WebCore/platform/network/soup/CookieJarSoup.cpp @@ -38,9 +38,7 @@ SoupCookieJar* defaultCookieJar() cookiesInitialized = true; cookieJar = soup_cookie_jar_new(); -#ifdef HAVE_LIBSOUP_2_29_90 soup_cookie_jar_set_accept_policy(cookieJar, SOUP_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY); -#endif } return cookieJar; @@ -67,18 +65,12 @@ void setCookies(Document* document, const KURL& url, const String& value) GOwnPtr origin(soup_uri_new(url.string().utf8().data())); -#ifdef HAVE_LIBSOUP_2_29_90 GOwnPtr firstParty(soup_uri_new(document->firstPartyForCookies().string().utf8().data())); soup_cookie_jar_set_cookie_with_first_party(jar, origin.get(), firstParty.get(), value.utf8().data()); -#else - soup_cookie_jar_set_cookie(jar, - origin.get(), - value.utf8().data()); -#endif } String cookies(const Document* /*document*/, const KURL& url) diff --git a/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp b/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp index 47a7c58..843cf07 100644 --- a/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp +++ b/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp @@ -147,12 +147,10 @@ ResourceHandle::~ResourceHandle() void ResourceHandle::prepareForURL(const KURL &url) { -#ifdef HAVE_LIBSOUP_2_29_90 GOwnPtr soupURI(soup_uri_new(url.prettyURL().utf8().data())); if (!soupURI) return; soup_session_prepare_for_uri(ResourceHandle::defaultSession(), soupURI.get()); -#endif } // All other kinds of redirections, except for the *304* status code @@ -206,14 +204,12 @@ static void restartedCallback(SoupMessage* msg, gpointer data) if (d->m_cancelled) return; -#ifdef HAVE_LIBSOUP_2_29_90 // Update the first party in case the base URL changed with the redirect String firstPartyString = request.firstPartyForCookies().string(); if (!firstPartyString.isEmpty()) { GOwnPtr firstParty(soup_uri_new(firstPartyString.utf8().data())); soup_message_set_first_party(d->m_soupMessage.get(), firstParty.get()); } -#endif } static void contentSniffedCallback(SoupMessage*, const char*, GHashTable*, gpointer); @@ -611,13 +607,11 @@ static bool startHttp(ResourceHandle* handle) g_signal_connect(soupMessage, "got-headers", G_CALLBACK(gotHeadersCallback), handle); d->m_gotChunkHandler = g_signal_connect(soupMessage, "got-chunk", G_CALLBACK(gotChunkCallback), handle); -#ifdef HAVE_LIBSOUP_2_29_90 String firstPartyString = request.firstPartyForCookies().string(); if (!firstPartyString.isEmpty()) { GOwnPtr firstParty(soup_uri_new(firstPartyString.utf8().data())); soup_message_set_first_party(soupMessage, firstParty.get()); } -#endif FormData* httpBody = d->m_firstRequest.httpBody(); if (httpBody && !httpBody->isEmpty()) { diff --git a/Source/WebCore/platform/network/soup/ResourceRequestSoup.cpp b/Source/WebCore/platform/network/soup/ResourceRequestSoup.cpp index d46e47b..5016bf1 100644 --- a/Source/WebCore/platform/network/soup/ResourceRequestSoup.cpp +++ b/Source/WebCore/platform/network/soup/ResourceRequestSoup.cpp @@ -46,13 +46,11 @@ void ResourceRequest::updateSoupMessage(SoupMessage* soupMessage) const soup_message_headers_append(soupHeaders, it->first.string().utf8().data(), it->second.utf8().data()); } -#ifdef HAVE_LIBSOUP_2_29_90 String firstPartyString = firstPartyForCookies().string(); if (!firstPartyString.isEmpty()) { GOwnPtr firstParty(soup_uri_new(firstPartyString.utf8().data())); soup_message_set_first_party(soupMessage, firstParty.get()); } -#endif soup_message_set_flags(soupMessage, m_soupFlags); } @@ -71,13 +69,11 @@ SoupMessage* ResourceRequest::toSoupMessage() const soup_message_headers_append(soupHeaders, it->first.string().utf8().data(), it->second.utf8().data()); } -#ifdef HAVE_LIBSOUP_2_29_90 String firstPartyString = firstPartyForCookies().string(); if (!firstPartyString.isEmpty()) { GOwnPtr firstParty(soup_uri_new(firstPartyString.utf8().data())); soup_message_set_first_party(soupMessage, firstParty.get()); } -#endif soup_message_set_flags(soupMessage, m_soupFlags); @@ -104,11 +100,9 @@ void ResourceRequest::updateFromSoupMessage(SoupMessage* soupMessage) if (soupMessage->request_body->data) m_httpBody = FormData::create(soupMessage->request_body->data, soupMessage->request_body->length); -#ifdef HAVE_LIBSOUP_2_29_90 SoupURI* firstParty = soup_message_get_first_party(soupMessage); if (firstParty) m_firstPartyForCookies = soupURIToKURL(firstParty); -#endif m_soupFlags = soup_message_get_flags(soupMessage); diff --git a/Source/WebKit/efl/ChangeLog b/Source/WebKit/efl/ChangeLog index e83d1ce..d617048 100644 --- a/Source/WebKit/efl/ChangeLog +++ b/Source/WebKit/efl/ChangeLog @@ -1,3 +1,16 @@ +2011-01-29 Dan Winship + + Reviewed by Xan Lopez. + + [GTK] Remove HAVE_LIBSOUP_2_29_90 conditionals; we depend on + libsoup 2.33.1 now. + https://bugs.webkit.org/show_bug.cgi?id=50675 + + * ewk/ewk_cookies.cpp: + (ewk_cookies_file_set): + (ewk_cookies_policy_set): + (ewk_cookies_policy_get): + 2011-01-28 Dan Bernstein Reviewed by Sam Weinig. diff --git a/Source/WebKit/efl/ewk/ewk_cookies.cpp b/Source/WebKit/efl/ewk/ewk_cookies.cpp index 421f8dc..2564fc7 100644 --- a/Source/WebKit/efl/ewk/ewk_cookies.cpp +++ b/Source/WebKit/efl/ewk/ewk_cookies.cpp @@ -57,9 +57,7 @@ EAPI Eina_Bool ewk_cookies_file_set(const char *filename) if (!cookieJar) return EINA_FALSE; -#ifdef HAVE_LIBSOUP_2_29_90 soup_cookie_jar_set_accept_policy(cookieJar, SOUP_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY); -#endif SoupSession* session = WebCore::ResourceHandle::defaultSession(); SoupSessionFeature* oldjar = soup_session_get_feature(session, SOUP_TYPE_COOKIE_JAR); @@ -187,7 +185,6 @@ EAPI void ewk_cookies_cookie_free(Ewk_Cookie *cookie) EAPI void ewk_cookies_policy_set(Ewk_Cookie_Policy p) { #ifdef WTF_USE_SOUP -#ifdef HAVE_LIBSOUP_2_29_90 SoupCookieJar* cookieJar = WebCore::defaultCookieJar(); SoupCookieJarAcceptPolicy policy; @@ -206,7 +203,6 @@ EAPI void ewk_cookies_policy_set(Ewk_Cookie_Policy p) soup_cookie_jar_set_accept_policy(cookieJar, policy); #endif -#endif } /* @@ -218,7 +214,6 @@ EAPI Ewk_Cookie_Policy ewk_cookies_policy_get() { Ewk_Cookie_Policy ewk_policy = EWK_COOKIE_JAR_ACCEPT_ALWAYS; #ifdef WTF_USE_SOUP -#ifdef HAVE_LIBSOUP_2_29_90 SoupCookieJar* cookieJar = WebCore::defaultCookieJar(); SoupCookieJarAcceptPolicy policy; @@ -235,7 +230,6 @@ EAPI Ewk_Cookie_Policy ewk_cookies_policy_get() break; } #endif -#endif return ewk_policy; } diff --git a/Source/WebKit/gtk/ChangeLog b/Source/WebKit/gtk/ChangeLog index ca5840e..2fd0868 100644 --- a/Source/WebKit/gtk/ChangeLog +++ b/Source/WebKit/gtk/ChangeLog @@ -1,3 +1,18 @@ +2011-01-29 Dan Winship + + Reviewed by Xan Lopez. + + [GTK] Remove HAVE_LIBSOUP_2_29_90 and HAVE_GSETTINGS conditionals; + we depend on glib 2.27.4 and libsoup 2.33.1 now. + https://bugs.webkit.org/show_bug.cgi?id=50675 + + * GNUmakefile.am: + * WebCoreSupport/InspectorClientGtk.cpp: + (WebKit::InspectorClient::storeSetting): + * webkit/webkitprivate.cpp: + (inspectorGSettings): + * webkit/webkitprivate.h: + 2011-01-28 Dan Bernstein Reviewed by Sam Weinig. diff --git a/Source/WebKit/gtk/GNUmakefile.am b/Source/WebKit/gtk/GNUmakefile.am index c69d6ea..cf68f01 100644 --- a/Source/WebKit/gtk/GNUmakefile.am +++ b/Source/WebKit/gtk/GNUmakefile.am @@ -349,10 +349,8 @@ $(GENSOURCES_WEBKIT)/webkitenumtypes.cpp: $(webkitgtk_h_api) $(WebKit)/GNUmakefi && rm -f xgen-gtc # GSettings -if USE_GSETTINGS gsettings_SCHEMAS = $(top_builddir)/Source/WebKit/gtk/org.webkitgtk-@WEBKITGTK_API_VERSION@.gschema.xml @GSETTINGS_RULES@ -endif EXTRA_DIST += \ $(WebKit)/ChangeLog \ diff --git a/Source/autotools/webkit.m4 b/Source/autotools/webkit.m4 index 4d8cf74..c2f2263 100644 --- a/Source/autotools/webkit.m4 +++ b/Source/autotools/webkit.m4 @@ -108,24 +108,12 @@ AC_DEFUN_ONCE([_WEBKIT_CHECK_GLIB], [dnl dnl check for glib # Version requirements -GLIB_REQUIRED_VERSION=2.24 -GOBJECT_REQUIRED_VERSION=2.0 -GTHREAD_REQUIRED_VERSION=2.0 - -PKG_CHECK_MODULES([GLIB], - [glib-2.0 >= $GLIB_REQUIRED_VERSION - gobject-2.0 >= $GOBJECT_REQUIRED_VERSION - gthread-2.0 >= $GTHREAD_REQUIRED_VERSION]) -AC_SUBST([GLIB_CFLAGS]) -AC_SUBST([GLIB_LIBS]) - -# GTK+ port only -# Check for glib-genmarshal and glib-mkenums -AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal]) -AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums]) +GLIB_REQUIRED_VERSION=2.27.90 +AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION) if test -z "$GLIB_GENMARSHAL" || test -z "$GLIB_MKENUMS"; then AC_MSG_ERROR([You need the GLib dev tools in your path]) fi +GLIB_GSETTINGS ]) AC_DEFUN_ONCE([_WEBKIT_CHECK_UNICODE], diff --git a/configure.ac b/configure.ac index 15c0850..c0a796e 100644 --- a/configure.ac +++ b/configure.ac @@ -247,7 +247,7 @@ if test "$with_hildon" = "yes"; then fi # minimum base dependencies -LIBSOUP_REQUIRED_VERSION=2.28.2 +LIBSOUP_REQUIRED_VERSION=2.33.4 CAIRO_REQUIRED_VERSION=1.6 FONTCONFIG_REQUIRED_VERSION=2.4 FREETYPE2_REQUIRED_VERSION=9.0 @@ -271,16 +271,6 @@ ENCHANT_REQUIRED_VERSION=0.22 # todo: webcore gtk WEBKIT_CHECK_DEPENDENCIES([glib unicode]) -# Check if we can use GSettings -PKG_CHECK_MODULES([GSETTINGS], - [gio-2.0 >= 2.25.0], - [have_gsettings=yes], - [have_gsettings=no]) -if test "$have_gsettings" = "yes"; then - AC_DEFINE([HAVE_GSETTINGS], 1, [Whether we can use GSettings]) - GLIB_GSETTINGS -fi - GETTEXT_PACKAGE=$PACKAGE-$GTK_API_VERSION AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", @@ -824,15 +814,6 @@ PKG_CHECK_MODULES([LIBSOUP], AC_SUBST([LIBSOUP_CFLAGS]) AC_SUBST([LIBSOUP_LIBS]) -# check if we can use libSoup 2.29.90 features -PKG_CHECK_MODULES([LIBSOUP_2_29_90], - [libsoup-2.4 >= 2.29.90], - [have_libsoup_2_29_90=yes], - [have_libsoup_2_29_90=no]) -if test "$have_libsoup_2_29_90" = "yes"; then - AC_DEFINE([HAVE_LIBSOUP_2_29_90], 1, [Whether libSoup 2.29.90 features are available]) -fi - # check if FreeType/FontConfig are available if test "$with_font_backend" = "freetype"; then if test "$with_target" = "directfb"; then @@ -954,9 +935,6 @@ AM_CONDITIONAL([USE_GLIB_UNICODE], [test "$with_unicode_backend" = "glib"]) AM_CONDITIONAL([USE_FREETYPE], [test "$with_font_backend" = "freetype"]) AM_CONDITIONAL([USE_PANGO], [test "$with_font_backend" = "pango"]) -# GLib/GIO feature conditionals -AM_CONDITIONAL([USE_GSETTINGS], [test "$have_gsettings" = "yes"]) - # GStreamer feature conditional AM_CONDITIONAL([USE_GSTREAMER], [test "$have_gstreamer" = "yes"]) -- 1.8.3.1