Gentoo Archives: gentoo-commits

From: "Romain Perier (mrpouet)" <mrpouet@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-client/epiphany-extensions/files: epiphany-extensions-2.28.1-auto-scroller-broken.patch
Date: Sat, 02 Jan 2010 20:33:57
Message-Id: E1NRAfa-00041G-7P@stork.gentoo.org
1 mrpouet 10/01/02 20:33:54
2
3 Added:
4 epiphany-extensions-2.28.1-auto-scroller-broken.patch
5 Log:
6 Fix auto-scroller broken with middle click, per bug #294712. Patch imported from upstream bug #589560.
7 (Portage version: 2.2_rc61/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 www-client/epiphany-extensions/files/epiphany-extensions-2.28.1-auto-scroller-broken.patch
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/epiphany-extensions/files/epiphany-extensions-2.28.1-auto-scroller-broken.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/epiphany-extensions/files/epiphany-extensions-2.28.1-auto-scroller-broken.patch?rev=1.1&content-type=text/plain
14
15 Index: epiphany-extensions-2.28.1-auto-scroller-broken.patch
16 ===================================================================
17 From c3584c630ac8ec80288f56bdb3ecc350b533d07e Mon Sep 17 00:00:00 2001
18 From: Xan Lopez <xan@×××××.org>
19 Date: Tue, 22 Sep 2009 10:43:09 +0000
20 Subject: Fix auto-scroller extension to use the new WebKitHitTestResult stuff
21
22 Upstream Bug #589560,#600140
23 Dowstream Bug #294712
24
25 ---
26 diff --git a/extensions/auto-scroller/ephy-auto-scroller-extension.c b/extensions/auto-scroller/ephy-auto-scroller-extension.c
27 index 188cc44..f6c54fa 100644
28 --- a/extensions/auto-scroller/ephy-auto-scroller-extension.c
29 +++ b/extensions/auto-scroller/ephy-auto-scroller-extension.c
30 @@ -55,21 +55,23 @@ ensure_auto_scroller (EphyWindow *window)
31 return scroller;
32 }
33
34 -#if 0
35 static gboolean
36 -dom_mouse_down_cb (EphyEmbed *embed,
37 - EphyEmbedEvent *event,
38 +dom_mouse_down_cb (EphyWebView *view,
39 + GdkEventButton *event,
40 EphyWindow *window)
41 {
42 EphyAutoScroller *scroller;
43 - EphyEmbedEventContext context;
44 + guint context;
45 guint button, x, y;
46 + WebKitHitTestResult *hit_test;
47
48 - button = ephy_embed_event_get_button (event);
49 - context = ephy_embed_event_get_context (event);
50 + button = event->button;
51 + hit_test = webkit_web_view_get_hit_test_result (WEBKIT_WEB_VIEW (view), event);
52 + g_object_get (hit_test, "context", &context, NULL);
53 + g_object_unref (hit_test);
54
55 - if (button != 2 || (context & EPHY_EMBED_CONTEXT_INPUT) ||
56 - (context & EPHY_EMBED_CONTEXT_LINK))
57 + if (button != 2 || (context & WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE) ||
58 + (context & WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK))
59 {
60 return FALSE;
61 }
62 @@ -77,31 +79,9 @@ dom_mouse_down_cb (EphyEmbed *embed,
63 scroller = ensure_auto_scroller (window);
64 g_return_val_if_fail (scroller != NULL, FALSE);
65
66 - ephy_embed_event_get_coords (event, &x, &y);
67 - ephy_auto_scroller_start (scroller, embed, x, y);
68 -
69 - return TRUE;
70 -}
71 -#endif
72 -
73 -static gboolean
74 -button_press_cb (GtkWidget *widget,
75 - GdkEventButton *event,
76 - EphyWindow *window)
77 -{
78 - EphyAutoScroller *scroller;
79 - EphyEmbed *embed = (EphyEmbed*) gtk_widget_get_parent (widget);
80 -
81 - // FIXME: This will swallow middle clicks on inputs and links.
82 - if (event->button != 2)
83 - {
84 - return FALSE;
85 - }
86 -
87 - scroller = ensure_auto_scroller (window);
88 - g_return_val_if_fail (scroller != NULL, FALSE);
89 -
90 - ephy_auto_scroller_start (scroller, embed, event->x_root, event->y_root);
91 + x = (guint)event->x_root;
92 + y = (guint)event->y_root;
93 + ephy_auto_scroller_start (scroller, EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW (view), x, y);
94
95 return TRUE;
96 }
97 @@ -123,14 +103,9 @@ impl_attach_tab (EphyExtension *ext,
98
99 g_return_if_fail (embed != NULL);
100
101 -#if 0
102 - g_signal_connect_object (embed, "ge-dom-mouse-down",
103 - G_CALLBACK (dom_mouse_down_cb), window, 0);
104 -#endif
105 -
106 web_view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed);
107 - g_signal_connect_object (web_view, "button_press_event",
108 - G_CALLBACK (button_press_cb), window, 0);
109 + g_signal_connect_object (web_view, "button-press-event",
110 + G_CALLBACK (dom_mouse_down_cb), window, 0);
111 }
112
113 static void
114 @@ -143,14 +118,9 @@ impl_detach_tab (EphyExtension *ext,
115
116 g_return_if_fail (embed != NULL);
117
118 -#if 0
119 - g_signal_handlers_disconnect_by_func
120 - (embed, G_CALLBACK (dom_mouse_down_cb), window);
121 -#endif
122 -
123 web_view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed);
124 g_signal_handlers_disconnect_by_func
125 - (web_view, G_CALLBACK (button_press_cb), window);
126 + (web_view, G_CALLBACK (dom_mouse_down_cb), window);
127 }
128
129 static void
130 --
131 cgit v0.8.3.1