From nobody@FreeBSD.org  Sun Aug 28 08:38:47 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F3243106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 28 Aug 2011 08:38:47 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id C82DF8FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 28 Aug 2011 08:38:47 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p7S8clER070562
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 28 Aug 2011 08:38:47 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p7S8clxh070561;
	Sun, 28 Aug 2011 08:38:47 GMT
	(envelope-from nobody)
Message-Id: <201108280838.p7S8clxh070561@red.freebsd.org>
Date: Sun, 28 Aug 2011 08:38:47 GMT
From: Olivier Duchateau <duchateau.olivier@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] www/webkit-gtk2 to avoid Midori's crash when we add bookmark on Speed Dial page
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         160251
>Category:       ports
>Synopsis:       [PATCH] www/webkit-gtk2 to avoid Midori's crash when we add bookmark on Speed Dial page
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnome
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 28 08:40:10 UTC 2011
>Closed-Date:    Fri Oct 14 16:09:48 UTC 2011
>Last-Modified:  Fri Oct 14 16:10:07 UTC 2011
>Originator:     Olivier Duchateau
>Release:        FreeBSD 8.2-RELEASE
>Organization:
>Environment:
FreeBSD bornem.errements.net 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 02:24:46 UTC 2011     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
With Midori (any version), when we want to add bookmark on speed dial page, It crashes.

It's known bug:
- https://bugs.launchpad.net/midori/+bug/736427
- https://bugzilla.redhat.com/show_bug.cgi?id=657683

Upstream (WebKit folk) made a patch, https://bugs.webkit.org/show_bug.cgi?id=50173 to fix this issue.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -urN /usr/ports/www/webkit-gtk2/Makefile webkit-gtk2/Makefile
--- /usr/ports/www/webkit-gtk2/Makefile	2011-08-23 20:32:20.000000000 +0200
+++ webkit-gtk2/Makefile	2011-08-28 10:18:13.000000000 +0200
@@ -8,7 +8,7 @@
 
 PORTNAME=	webkit
 PORTVERSION=	1.4.2
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	www
 MASTER_SITES=	http://webkitgtk.org/
 PKGNAMESUFFIX=	-gtk2
@@ -40,10 +40,8 @@
 		LDFLAGS="-L${LOCALBASE}/lib" \
 		ac_cv_path_FLEX="${LOCALBASE}/bin/flex" \
 		ac_cv_path_DOLT_BASH=""
-CONFIGURE_ARGS=	--enable-icon-database \
+CONFIGURE_ARGS=	--enable-directory-upload \
 		--with-gtk=2.0 \
-		--enable-svg \
-		--enable-svg-fonts \
 		--enable-introspection
 MAKEFILE=	GNUmakefile
 GLIB_SCHEMAS=	org.webkitgtk-1.0.gschema.xml
diff -urN /usr/ports/www/webkit-gtk2/files/patch-Source_WebKit_gtk_webkit_webkitwebview.cpp webkit-gtk2/files/patch-Source_WebKit_gtk_webkit_webkitwebview.cpp
--- /usr/ports/www/webkit-gtk2/files/patch-Source_WebKit_gtk_webkit_webkitwebview.cpp	1970-01-01 01:00:00.000000000 +0100
+++ webkit-gtk2/files/patch-Source_WebKit_gtk_webkit_webkitwebview.cpp	2011-08-28 10:18:42.000000000 +0200
@@ -0,0 +1,20 @@
+--- Source/WebKit/gtk/webkit/webkitwebview.cpp.orig	2011-06-14 02:10:55.000000000 +0200
++++ Source/WebKit/gtk/webkit/webkitwebview.cpp	2011-08-27 10:48:52.000000000 +0200
+@@ -4939,6 +4939,8 @@
+ 
+     priv->mainResource = adoptGRef(webResource);
+     priv->mainResourceIdentifier = identifier;
++
++    g_object_ref(webView);
+ }
+ 
+ void webkit_web_view_add_resource(WebKitWebView* webView, const char* identifier, WebKitWebResource* webResource)
+@@ -4955,6 +4957,8 @@
+         priv->mainResource = 0;
+     } else
+       g_hash_table_remove(priv->subResources.get(), identifier);
++
++      g_object_unref(webView);
+ }
+ 
+ WebKitWebResource* webkit_web_view_get_resource(WebKitWebView* webView, char* identifier)


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->gnome 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun Aug 28 08:40:20 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=160251 

From: Olivier Duchateau <duchateau.olivier@gmail.com>
To: bug-followup <bug-followup@freebsd.org>
Cc:  
Subject: Re: ports/160251: [PATCH] www/webkit-gtk2 to avoid Midori's crash
 when we add bookmark on Speed Dial page
Date: Sun, 28 Aug 2011 11:23:07 +0200

 Oops, In my previous post, I forgot to mention, that I clean
 CONFIGURE_ARGS macros, because some options are enabled by default
 like icon-database, and svg related stuff.
 
 
 2011/8/28, edwin@freebsd.org <edwin@freebsd.org>:
 > Synopsis: [PATCH] www/webkit-gtk2 to avoid Midori's crash when we add
 > bookmark on Speed Dial page
 >
 > Responsible-Changed-From-To: freebsd-ports-bugs->gnome
 > Responsible-Changed-By: edwin
 > Responsible-Changed-When: Sun Aug 28 08:40:20 UTC 2011
 > Responsible-Changed-Why:
 > Over to maintainer (via the GNATS Auto Assign Tool)
 >
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=160251
 > _______________________________________________
 > freebsd-gnome@freebsd.org mailing list
 > http://lists.freebsd.org/mailman/listinfo/freebsd-gnome
 > To unsubscribe, send any mail to "freebsd-gnome-unsubscribe@freebsd.org"
 >
 
 
 -- 
 olivier

From: Olivier Duchateau <duchateau.olivier@gmail.com>
To: bug-followup <bug-followup@freebsd.org>
Cc:  
Subject: Re: ports/160251: [PATCH] www/webkit-gtk2 to avoid Midori's crash
 when we add bookmark on Speed Dial page
Date: Sat, 3 Sep 2011 14:37:37 +0200

 This patch is also necessary with newer version of webkitgtk (1.4.3).
 
 -- 
 olivier

From: Koop Mast <kwm@rainbow-runner.nl>
To: bug-followup@FreeBSD.org, duchateau.olivier@gmail.com
Cc:  
Subject: Re: ports/160251: [PATCH] www/webkit-gtk2 to avoid Midori&#39;s
 crash when we add bookmark on Speed Dial page
Date: Thu, 15 Sep 2011 12:13:19 +0200

 I only found some developer discussion about the directory upload
 feature, before it was committed to the webkit repo? Do you have a
 specific reason why we should enable it?
 

From: Olivier Duchateau <duchateau.olivier@gmail.com>
To: Koop Mast <kwm@rainbow-runner.nl>
Cc: bug-followup@freebsd.org
Subject: Re: ports/160251: [PATCH] www/webkit-gtk2 to avoid Midori&#39;s crash
 when we add bookmark on Speed Dial page
Date: Fri, 16 Sep 2011 06:27:25 +0200

 I don't have a specific reason, I thought, Midori uses this functionnality.
 
 2011/9/15 Koop Mast <kwm@rainbow-runner.nl>:
 > I only found some developer discussion about the directory upload
 > feature, before it was committed to the webkit repo? Do you have a
 > specific reason why we should enable it?
 >
 >
 
 
 
 -- 
 olivier
State-Changed-From-To: open->closed 
State-Changed-By: kwm 
State-Changed-When: Fri Oct 14 16:09:33 UTC 2011 
State-Changed-Why:  
Committed thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=160251 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/160251: commit references a PR
Date: Fri, 14 Oct 2011 16:08:24 +0000 (UTC)

 kwm         2011-10-14 16:08:10 UTC
 
   FreeBSD ports repository
 
   Modified files:
     www/webkit-gtk2      Makefile distinfo 
   Added files:
     www/webkit-gtk2/files 
                           patch-Source_WebCore_plugins_gtk_PluginViewGtk.cpp 
                           patch-Source_WebKit_gtk_webkit_webkitwebview.cpp 
   Log:
   Update to 1.4.3.
   
   Fix a crash in midori [1]
   Fix build with clang [2]
   
   PR:             ports/160251 [1]
                   ports/160538 [2]
   Reported by:    rene@ [2]
   Submitted by:   Olivier Duchateau <duchateau.olivier@gmail.com> [1]
                   Andrei Lavreniyuk <andy.lavr@gmail.com> [2]
   Obtained from:  https://bugs.webkit.org/show_bug.cgi?id=50173 [1]
   
   Revision  Changes    Path
   1.44      +2 -5      ports/www/webkit-gtk2/Makefile
   1.12      +2 -2      ports/www/webkit-gtk2/distinfo
   1.1       +18 -0     ports/www/webkit-gtk2/files/patch-Source_WebCore_plugins_gtk_PluginViewGtk.cpp (new)
   1.1       +22 -0     ports/www/webkit-gtk2/files/patch-Source_WebKit_gtk_webkit_webkitwebview.cpp (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
