aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authorkwm <kwm@FreeBSD.org>2009-12-24 04:17:31 +0800
committerkwm <kwm@FreeBSD.org>2009-12-24 04:17:31 +0800
commit8f6055b1645868077a11b7d60cc06fc5e40c42d0 (patch)
treeccf3a7fd4dd0d90c3587deadbe578f458aaa2556 /www
parent45b65cc855dc81070b2fe3b38205c7bd3294d355 (diff)
downloadfreebsd-ports-gnome-8f6055b1645868077a11b7d60cc06fc5e40c42d0.tar.gz
freebsd-ports-gnome-8f6055b1645868077a11b7d60cc06fc5e40c42d0.tar.zst
freebsd-ports-gnome-8f6055b1645868077a11b7d60cc06fc5e40c42d0.zip
Look in LOCALBASE for flex, so we don't pick up the version from base. [1]
Add networkreponce support from upstream. [2] Add a patch from upstream, to use the gzip encoding support in libsoup 2.28.2. However if a website still displays junk. This means that it usesing deflate which is not working in libsoup right now (like cvsweb.freebsd.org) [2] PR: ports/141859 [1] Submitted by: Carlos A. M. dos Santos <unixmania@gmail.com> Obtained from: Webkit svn trunk.
Diffstat (limited to 'www')
-rw-r--r--www/webkit-gtk2/Makefile3
-rw-r--r--www/webkit-gtk2/files/patch-add-gzip35
-rw-r--r--www/webkit-gtk2/files/patch-webkitnetworkresponse215
3 files changed, 252 insertions, 1 deletions
diff --git a/www/webkit-gtk2/Makefile b/www/webkit-gtk2/Makefile
index ad2f4c734c48..38612b6714d0 100644
--- a/www/webkit-gtk2/Makefile
+++ b/www/webkit-gtk2/Makefile
@@ -8,6 +8,7 @@
PORTNAME= webkit
PORTVERSION= 1.1.15.4
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= http://webkitgtk.org/
PKGNAMESUFFIX= -gtk2
@@ -15,7 +16,7 @@ PKGNAMESUFFIX= -gtk2
MAINTAINER= gnome@FreeBSD.org
COMMENT= An opensource browser engine
-BUILD_DEPENDS= flex:${PORTSDIR}/textproc/flex
+BUILD_DEPENDS= ${LOCALBASE}/bin/flex:${PORTSDIR}/textproc/flex
LIB_DEPENDS= icutu.38:${PORTSDIR}/devel/icu \
enchant.1:${PORTSDIR}/textproc/enchant \
curl.5:${PORTSDIR}/ftp/curl \
diff --git a/www/webkit-gtk2/files/patch-add-gzip b/www/webkit-gtk2/files/patch-add-gzip
new file mode 100644
index 000000000000..47ad365a3f08
--- /dev/null
+++ b/www/webkit-gtk2/files/patch-add-gzip
@@ -0,0 +1,35 @@
+Committed to webkit trunk. Use libsoup 2.28.2 gzip encoding.
+http://trac.webkit.org/changeset/52208
+
+diff --git a/WebCore/platform/network/soup/ResourceHandleSoup.cpp b/WebCore/platform/network/soup/ResourceHandleSoup.cpp
+index 6367a3e..5a229b8 100644
+--- WebCore/platform/network/soup/ResourceHandleSoup.cpp
++++ WebCore/platform/network/soup/ResourceHandleSoup.cpp
+@@ -548,12 +548,6 @@ static bool startHttp(ResourceHandle* handle)
+ // balanced by a deref() in finishedCallback, which should always run
+ handle->ref();
+
+- // FIXME: For now, we cannot accept content encoded in anything
+- // other than identity, so force servers to do it our way. When
+- // libsoup gets proper Content-Encoding support we will want to
+- // use it here instead.
+- soup_message_headers_replace(d->m_msg->request_headers, "Accept-Encoding", "identity");
+-
+ // Balanced in ResourceHandleInternal's destructor; we need to
+ // keep our own ref, because after queueing the message, the
+ // session owns the initial reference.
+
+diff --git a/WebKit/gtk/webkit/webkitprivate.cpp b/WebKit/gtk/webkit/webkitprivate.cpp
+index c80160c..95a5717 100644
+--- WebKit/gtk/webkit/webkitprivate.cpp
++++ WebKit/gtk/webkit/webkitprivate.cpp
+@@ -280,6 +280,8 @@ void webkit_init()
+ SoupSessionFeature* sniffer = static_cast<SoupSessionFeature*>(g_object_new(SOUP_TYPE_CONTENT_SNIFFER, NULL));
+ soup_session_add_feature(session, sniffer);
+ g_object_unref(sniffer);
++
++ soup_session_add_feature_by_type(session, SOUP_TYPE_CONTENT_DECODER);
+ }
+
+ void webkit_white_list_access_from_origin(const gchar* sourceOrigin, const gchar* destinationProtocol, const gchar* destinationHost, bool allowDestinationSubdomains)
+
diff --git a/www/webkit-gtk2/files/patch-webkitnetworkresponse b/www/webkit-gtk2/files/patch-webkitnetworkresponse
new file mode 100644
index 000000000000..7b17a498200b
--- /dev/null
+++ b/www/webkit-gtk2/files/patch-webkitnetworkresponse
@@ -0,0 +1,215 @@
+From d42f4dd5b4ead39771d8822ac4c67a0d48a41040 Mon Sep 17 00:00:00 2001
+From: Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+Date: Sun, 25 Oct 2009 18:29:35 -0200
+Subject: [PATCH] Use WebKitNetworkResponse
+
+ WebKit/gtk/ChangeLog | 26 +++++++++++++
+ WebKit/gtk/webkit/webkitdownload.cpp | 67 +++++++++++++++++++++++++++++-----
+ WebKit/gtk/webkit/webkitdownload.h | 3 ++
+ 3 files changed, 86 insertions(+), 10 deletions(-)
+
+2009-10-25 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by NOBODY (OOPS!).
+
+ https://bugs.webkit.org/show_bug.cgi?id=30759
+ [GTK] Should use WebKitNetworkResponse, and expose it
+
+ WebKitDownload now uses our WebKitNetworkResponse instead of using
+ ResourceResponse directly. By exposing the response, like we do
+ with the request, we give our users the ability to look at the
+ response headers, status code, and so on, through the SoupMessage
+ object.
+
+ * webkit/webkitdownload.cpp:
+ (webkit_download_dispose):
+ (webkit_download_finalize):
+ (webkit_download_get_property):
+ (webkit_download_set_property):
+ (webkit_download_class_init):
+ (webkit_download_get_network_response):
+ (webkit_download_set_response):
+ (webkit_download_get_total_size):
+ (webkit_download_get_progress):
+ (webkit_download_received_data):
+ * webkit/webkitdownload.h:
+
+---
+diff --git a/WebKit/gtk/webkit/webkitdownload.cpp b/WebKit/gtk/webkit/webkitdownload.cpp
+index 568378c..dd6629b 100644
+--- WebKit/gtk/webkit/webkitdownload.cpp
++++ WebKit/gtk/webkit/webkitdownload.cpp
+@@ -31,6 +31,7 @@
+ #include "webkitdownload.h"
+ #include "webkitenumtypes.h"
+ #include "webkitmarshal.h"
++#include "webkitnetworkresponse.h"
+ #include "webkitprivate.h"
+
+ #include <glib/gstdio.h>
+@@ -74,7 +75,7 @@ struct _WebKitDownloadPrivate {
+ GFileOutputStream* outputStream;
+ DownloadClient* downloadClient;
+ WebKitNetworkRequest* networkRequest;
+- ResourceResponse* networkResponse;
++ WebKitNetworkResponse* networkResponse;
+ RefPtr<ResourceHandle> resourceHandle;
+ };
+
+@@ -95,7 +96,8 @@ enum {
+ PROP_PROGRESS,
+ PROP_STATUS,
+ PROP_CURRENT_SIZE,
+- PROP_TOTAL_SIZE
++ PROP_TOTAL_SIZE,
++ PROP_NETWORK_RESPONSE
+ };
+
+ G_DEFINE_TYPE(WebKitDownload, webkit_download, G_TYPE_OBJECT);
+@@ -119,6 +121,11 @@ static void webkit_download_dispose(GObject* object)
+ priv->networkRequest = NULL;
+ }
+
++ if (priv->networkResponse) {
++ g_object_unref(priv->networkResponse);
++ priv->networkResponse = NULL;
++ }
++
+ G_OBJECT_CLASS(webkit_download_parent_class)->dispose(object);
+ }
+
+@@ -138,7 +145,6 @@ static void webkit_download_finalize(GObject* object)
+ }
+
+ delete priv->downloadClient;
+- delete priv->networkResponse;
+
+ // The download object may never have _start called on it, so we
+ // need to make sure timer is non-NULL.
+@@ -159,6 +165,9 @@ static void webkit_download_get_property(GObject* object, guint prop_id, GValue*
+ case PROP_NETWORK_REQUEST:
+ g_value_set_object(value, webkit_download_get_network_request(download));
+ break;
++ case PROP_NETWORK_RESPONSE:
++ g_value_set_object(value, webkit_download_get_network_response(download));
++ break;
+ case PROP_DESTINATION_URI:
+ g_value_set_string(value, webkit_download_get_destination_uri(download));
+ break;
+@@ -191,6 +200,9 @@ static void webkit_download_set_property(GObject* object, guint prop_id, const G
+ case PROP_NETWORK_REQUEST:
+ priv->networkRequest = WEBKIT_NETWORK_REQUEST(g_value_dup_object(value));
+ break;
++ case PROP_NETWORK_RESPONSE:
++ priv->networkResponse = WEBKIT_NETWORK_RESPONSE(g_value_dup_object(value));
++ break;
+ case PROP_DESTINATION_URI:
+ webkit_download_set_destination_uri(download, g_value_get_string(value));
+ break;
+@@ -252,6 +264,21 @@ static void webkit_download_class_init(WebKitDownloadClass* downloadClass)
+ (GParamFlags)(WEBKIT_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)));
+
+ /**
++ * WebKitDownload:network-response
++ *
++ * The #WebKitNetworkResponse instance associated with the download.
++ *
++ * Since: 1.1.16
++ */
++ g_object_class_install_property(objectClass,
++ PROP_NETWORK_RESPONSE,
++ g_param_spec_object("network-response",
++ _("Network Response"),
++ _("The network response for the URI that should be downloaded"),
++ WEBKIT_TYPE_NETWORK_RESPONSE,
++ (GParamFlags)(WEBKIT_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)));
++
++ /**
+ * WebKitDownload:destination-uri
+ *
+ * The URI of the save location for this download.
+@@ -530,11 +557,29 @@ WebKitNetworkRequest* webkit_download_get_network_request(WebKitDownload* downlo
+ return priv->networkRequest;
+ }
+
++/**
++ * webkit_download_get_network_response:
++ * @download: the #WebKitDownload
++ *
++ * Retrieves the #WebKitNetworkResponse object that backs the download
++ * process.
++ *
++ * Returns: the #WebKitNetworkResponse instance
++ *
++ * Since: 1.1.16
++ */
++WebKitNetworkResponse* webkit_download_get_network_response(WebKitDownload* download)
++{
++ g_return_val_if_fail(WEBKIT_IS_DOWNLOAD(download), NULL);
++
++ WebKitDownloadPrivate* priv = download->priv;
++ return priv->networkResponse;
++}
++
+ static void webkit_download_set_response(WebKitDownload* download, const ResourceResponse& response)
+ {
+- // FIXME Use WebKitNetworkResponse when it's merged.
+ WebKitDownloadPrivate* priv = download->priv;
+- priv->networkResponse = new ResourceResponse(response);
++ priv->networkResponse = webkit_network_response_new_with_core_response(response);
+
+ if (!response.isNull() && !response.suggestedFilename().isEmpty())
+ webkit_download_set_suggested_filename(download, response.suggestedFilename().utf8().data());
+@@ -704,10 +749,12 @@ guint64 webkit_download_get_total_size(WebKitDownload* download)
+ g_return_val_if_fail(WEBKIT_IS_DOWNLOAD(download), 0);
+
+ WebKitDownloadPrivate* priv = download->priv;
+- if (!priv->networkResponse)
++ SoupMessage* message = priv->networkResponse ? webkit_network_response_get_message(priv->networkResponse) : NULL;
++
++ if (!message)
+ return 0;
+
+- return MAX(priv->currentSize, priv->networkResponse->expectedContentLength());
++ return MAX(priv->currentSize, soup_message_headers_get_content_length(message->response_headers));
+ }
+
+ /**
+@@ -744,9 +791,9 @@ gdouble webkit_download_get_progress(WebKitDownload* download)
+
+ WebKitDownloadPrivate* priv = download->priv;
+ if (!priv->networkResponse)
+- return 0;
++ return 0.0;
+
+- gdouble total_size = (gdouble)priv->networkResponse->expectedContentLength();
++ gdouble total_size = static_cast<gdouble>(webkit_download_get_total_size(download));
+
+ if (total_size == 0)
+ return 1.0;
+@@ -803,7 +850,7 @@ static void webkit_download_received_data(WebKitDownload* download, const gchar*
+ g_object_notify(G_OBJECT(download), "current-size");
+
+ ASSERT(priv->networkResponse);
+- if (priv->currentSize > priv->networkResponse->expectedContentLength())
++ if (priv->currentSize > webkit_download_get_total_size(download))
+ g_object_notify(G_OBJECT(download), "total-size");
+
+ gdouble lastProgress = webkit_download_get_progress(download);
+diff --git a/WebKit/gtk/webkit/webkitdownload.h b/WebKit/gtk/webkit/webkitdownload.h
+index 6e7f38b..a732a57 100644
+--- WebKit/gtk/webkit/webkitdownload.h
++++ WebKit/gtk/webkit/webkitdownload.h
+@@ -84,6 +84,9 @@ webkit_download_get_uri (WebKitDownload *download);
+ WEBKIT_API WebKitNetworkRequest*
+ webkit_download_get_network_request (WebKitDownload *download);
+
++WEBKIT_API WebKitNetworkResponse*
++webkit_download_get_network_response (WebKitDownload *download);
++
+ WEBKIT_API const gchar*
+ webkit_download_get_suggested_filename (WebKitDownload *download);
+
+--
+1.6.5
+