From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RATd3-00010y-9R for garchives@archives.gentoo.org; Sun, 02 Oct 2011 21:31:21 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0B1EB21C110; Sun, 2 Oct 2011 21:31:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id CA72921C0C8 for ; Sun, 2 Oct 2011 21:31:11 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 423401B4008 for ; Sun, 2 Oct 2011 21:31:11 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 2166) id 0AC462004C; Sun, 2 Oct 2011 21:31:10 +0000 (UTC) From: "Samuli Suominen (ssuominen)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, ssuominen@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in www-client/midori/files: midori-0.4.0-webkit151.patch X-VCS-Repository: gentoo-x86 X-VCS-Files: midori-0.4.0-webkit151.patch X-VCS-Directories: www-client/midori/files X-VCS-Committer: ssuominen X-VCS-Committer-Name: Samuli Suominen Content-Type: text/plain; charset=utf8 Message-Id: <20111002213110.0AC462004C@flycatcher.gentoo.org> Date: Sun, 2 Oct 2011 21:31:10 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: f145343830c33438c2e542a5aec4d706 ssuominen 11/10/02 21:31:10 Added: midori-0.4.0-webkit151.patch Log: Fix building with webkit-gtk >=3D 1.5.1 wrt #385371 by Hanno Meyer-Thur= ow =20 (Portage version: 2.2.0_alpha60/cvs/Linux x86_64) Revision Changes Path 1.1 www-client/midori/files/midori-0.4.0-webkit151.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/midori/= files/midori-0.4.0-webkit151.patch?rev=3D1.1&view=3Dmarkup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/midori/= files/midori-0.4.0-webkit151.patch?rev=3D1.1&content-type=3Dtext/plain Index: midori-0.4.0-webkit151.patch =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >From 648d869e4ff69f121da97484a0fd553b005ca751 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Wed, 21 Sep 2011 21:50:51 +0000 Subject: Use DOM API to get selected text in WebKitGTK+ 1.5.1 Fixes: https://bugs.launchpad.net/midori/+bug/799603 --- diff --git a/midori/midori-view.c b/midori/midori-view.c index 0d7a96e..e426e7f 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -39,9 +39,11 @@ #include #endif =20 +#if !WEBKIT_CHECK_VERSION (1, 5, 1) /* This is unstable API, so we need to declare it */ gchar* webkit_web_view_get_selected_text (WebKitWebView* web_view); +#endif =20 static void midori_view_construct_web_view (MidoriView* view); @@ -4167,10 +4169,33 @@ midori_view_get_link_uri (MidoriView* view) gboolean midori_view_has_selection (MidoriView* view) { +#if WEBKIT_CHECK_VERSION (1, 5, 1) + WebKitDOMDocument* doc; + WebKitDOMDOMWindow* window; + WebKitDOMDOMSelection* selection; + WebKitDOMRange* range; +#endif + g_return_val_if_fail (MIDORI_IS_VIEW (view), FALSE); =20 + +#if WEBKIT_CHECK_VERSION (1, 5, 1) + doc =3D webkit_web_view_get_dom_document (WEBKIT_WEB_VIEW (view->web= _view)); + window =3D webkit_dom_document_get_default_view (doc); + selection =3D webkit_dom_dom_window_get_selection (window); + if (selection =3D=3D NULL) + return FALSE; + + range =3D webkit_dom_dom_selection_get_range_at (selection, 0, NULL)= ; + if (range =3D=3D NULL) + return FALSE; + + katze_assign (view->selected_text, webkit_dom_range_get_text (range)= ); +#else katze_assign (view->selected_text, webkit_web_view_get_selected_text= ( WEBKIT_WEB_VIEW (view->web_view))); +#endif + if (view->selected_text && *view->selected_text) return TRUE; else -- cgit=20