Skip to content

Commit

Permalink
2011-01-29 Dan Winship <danw@gnome.org>
Browse files Browse the repository at this point in the history
        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  <danw@gnome.org>

        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  <danw@gnome.org>

        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  <danw@gnome.org>

        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: http://svn.webkit.org/repository/webkit/trunk@77061 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
commit-queue@webkit.org committed Jan 29, 2011
1 parent 115b6bb commit ff9e75c
Show file tree
Hide file tree
Showing 11 changed files with 64 additions and 66 deletions.
12 changes: 12 additions & 0 deletions ChangeLog
@@ -1,3 +1,15 @@
2011-01-29 Dan Winship <danw@gnome.org>

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 <mrobinson@igalia.com>

[GTK] Build failure with --enable-indexed-database
Expand Down
20 changes: 20 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,23 @@
2011-01-29 Dan Winship <danw@gnome.org>

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 <abarth@webkit.org>

Reviewed by Daniel Bates.
Expand Down
8 changes: 0 additions & 8 deletions Source/WebCore/platform/network/soup/CookieJarSoup.cpp
Expand Up @@ -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;
Expand All @@ -67,18 +65,12 @@ void setCookies(Document* document, const KURL& url, const String& value)

GOwnPtr<SoupURI> origin(soup_uri_new(url.string().utf8().data()));

#ifdef HAVE_LIBSOUP_2_29_90
GOwnPtr<SoupURI> 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)
Expand Down
6 changes: 0 additions & 6 deletions Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp
Expand Up @@ -147,12 +147,10 @@ ResourceHandle::~ResourceHandle()

void ResourceHandle::prepareForURL(const KURL &url)
{
#ifdef HAVE_LIBSOUP_2_29_90
GOwnPtr<SoupURI> 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
Expand Down Expand Up @@ -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<SoupURI> 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);
Expand Down Expand Up @@ -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<SoupURI> 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()) {
Expand Down
6 changes: 0 additions & 6 deletions Source/WebCore/platform/network/soup/ResourceRequestSoup.cpp
Expand Up @@ -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<SoupURI> firstParty(soup_uri_new(firstPartyString.utf8().data()));
soup_message_set_first_party(soupMessage, firstParty.get());
}
#endif

soup_message_set_flags(soupMessage, m_soupFlags);
}
Expand All @@ -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<SoupURI> firstParty(soup_uri_new(firstPartyString.utf8().data()));
soup_message_set_first_party(soupMessage, firstParty.get());
}
#endif

soup_message_set_flags(soupMessage, m_soupFlags);

Expand All @@ -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);

Expand Down
13 changes: 13 additions & 0 deletions Source/WebKit/efl/ChangeLog
@@ -1,3 +1,16 @@
2011-01-29 Dan Winship <danw@gnome.org>

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 <mitz@apple.com>

Reviewed by Sam Weinig.
Expand Down
6 changes: 0 additions & 6 deletions Source/WebKit/efl/ewk/ewk_cookies.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -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;

Expand All @@ -206,7 +203,6 @@ EAPI void ewk_cookies_policy_set(Ewk_Cookie_Policy p)

soup_cookie_jar_set_accept_policy(cookieJar, policy);
#endif
#endif
}

/*
Expand All @@ -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;

Expand All @@ -234,7 +229,6 @@ EAPI Ewk_Cookie_Policy ewk_cookies_policy_get()
ewk_policy = EWK_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY;
break;
}
#endif
#endif

return ewk_policy;
Expand Down
15 changes: 15 additions & 0 deletions Source/WebKit/gtk/ChangeLog
@@ -1,3 +1,18 @@
2011-01-29 Dan Winship <danw@gnome.org>

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 <mitz@apple.com>

Reviewed by Sam Weinig.
Expand Down
2 changes: 0 additions & 2 deletions Source/WebKit/gtk/GNUmakefile.am
Expand Up @@ -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 \
Expand Down
18 changes: 3 additions & 15 deletions Source/autotools/webkit.m4
Expand Up @@ -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],
Expand Down
24 changes: 1 addition & 23 deletions configure.ac
Expand Up @@ -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
Expand All @@ -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",
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"])

Expand Down

0 comments on commit ff9e75c

Please sign in to comment.