1 |
polynomial-c 11/01/05 15:03:43 |
2 |
|
3 |
Added: 1001-seamonkey-fix-jemalloc-vs-aslr.patch |
4 |
1002-gecko-1.9.1-cairo-1.8.10-crash-fix.patch |
5 |
1003-sparc-build.patch 1004-arm-xul191.patch |
6 |
1005-fix_disable_printing-v1.2.patch |
7 |
1006-seamonkey-2.0-gtk+-2.21.patch |
8 |
1007-seamonkey-respect-ldflags.patch |
9 |
1008-seamonkey-cups-1.4.4-fixup.patch |
10 |
2000-seamonkey_gentoo_install_dirs.patch |
11 |
2001-fix-system-hunspell-dict-detections.patch |
12 |
3000-dont-reset-user-prefs-on-upgrade.patch README |
13 |
Log: |
14 |
New seamonkey patchset |
15 |
|
16 |
Revision Changes Path |
17 |
1.1 src/patchsets/seamonkey/2.0.11/1001-seamonkey-fix-jemalloc-vs-aslr.patch |
18 |
|
19 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/seamonkey/2.0.11/1001-seamonkey-fix-jemalloc-vs-aslr.patch?rev=1.1&view=markup |
20 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/seamonkey/2.0.11/1001-seamonkey-fix-jemalloc-vs-aslr.patch?rev=1.1&content-type=text/plain |
21 |
|
22 |
Index: 1001-seamonkey-fix-jemalloc-vs-aslr.patch |
23 |
=================================================================== |
24 |
--- mozilla/memory/jemalloc/jemalloc.c |
25 |
+++ mozilla/memory/jemalloc/jemalloc.c |
26 |
@@ -392,7 +392,7 @@ __FBSDID("$FreeBSD: head/lib/libc/stdlib |
27 |
static const bool __isthreaded = true; |
28 |
#endif |
29 |
|
30 |
-#if defined(MOZ_MEMORY_SOLARIS) && defined(MAP_ALIGN) && !defined(JEMALLOC_NEVER_USES_MAP_ALIGN) |
31 |
+#if defined(MOZ_MEMORY_SOLARIS) || defined(MOZ_MEMORY_LINUX) || defined(MOZ_MEMORY_BSD) |
32 |
#define JEMALLOC_USES_MAP_ALIGN /* Required on Solaris 10. Might improve performance elsewhere. */ |
33 |
#endif |
34 |
|
35 |
@@ -2305,20 +2305,31 @@ pages_map_align(size_t size, int pfd, si |
36 |
* We don't use MAP_FIXED here, because it can cause the *replacement* |
37 |
* of existing mappings, and we only want to create new mappings. |
38 |
*/ |
39 |
-#ifdef MALLOC_PAGEFILE |
40 |
- if (pfd != -1) { |
41 |
- ret = mmap((void *)alignment, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | |
42 |
- MAP_NOSYNC | MAP_ALIGN, pfd, 0); |
43 |
- } else |
44 |
-#endif |
45 |
- { |
46 |
- ret = mmap((void *)alignment, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | |
47 |
- MAP_NOSYNC | MAP_ALIGN | MAP_ANON, -1, 0); |
48 |
- } |
49 |
+ ret = mmap(NULL, size + alignment, PROT_READ | PROT_WRITE, MAP_PRIVATE | |
50 |
+ MAP_NOSYNC| MAP_ANON, -1, 0); |
51 |
assert(ret != NULL); |
52 |
|
53 |
if (ret == MAP_FAILED) |
54 |
ret = NULL; |
55 |
+ else { |
56 |
+ uintptr_t aligned_ret; |
57 |
+ size_t extra_size; |
58 |
+ |
59 |
+ aligned_ret = (uintptr_t)ret + alignment - 1; |
60 |
+ aligned_ret &= ~(alignment - 1); |
61 |
+ extra_size = aligned_ret - (uintptr_t)ret; |
62 |
+ munmap(ret, extra_size); |
63 |
+ munmap(ret + extra_size + size, alignment - extra_size); |
64 |
+ ret = (void *)aligned_ret; |
65 |
+#ifdef MALLOC_PAGEFILE |
66 |
+ if (pfd != -1) { |
67 |
+ ret = mmap(ret, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | |
68 |
+ MAP_NOSYNC | MAP_FIXED, pfd, 0); |
69 |
+ } |
70 |
+ if (ret == MAP_FAILED) |
71 |
+ ret = NULL; |
72 |
+#endif |
73 |
+ } |
74 |
return (ret); |
75 |
} |
76 |
#endif |
77 |
|
78 |
|
79 |
|
80 |
|
81 |
1.1 src/patchsets/seamonkey/2.0.11/1002-gecko-1.9.1-cairo-1.8.10-crash-fix.patch |
82 |
|
83 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/seamonkey/2.0.11/1002-gecko-1.9.1-cairo-1.8.10-crash-fix.patch?rev=1.1&view=markup |
84 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/seamonkey/2.0.11/1002-gecko-1.9.1-cairo-1.8.10-crash-fix.patch?rev=1.1&content-type=text/plain |
85 |
|
86 |
Index: 1002-gecko-1.9.1-cairo-1.8.10-crash-fix.patch |
87 |
=================================================================== |
88 |
# https://bugzilla.mozilla.org/show_bug.cgi?id=522635 |
89 |
|
90 |
--- mozilla/widget/src/gtk2/Makefile.in |
91 |
+++ mozilla/widget/src/gtk2/Makefile.in |
92 |
@@ -78,7 +78,6 @@ endif |
93 |
|
94 |
CSRCS = \ |
95 |
mozcontainer.c \ |
96 |
- mozdrawingarea.c \ |
97 |
keysym2ucs.c \ |
98 |
nsPrintdGTK.c \ |
99 |
$(NULL) |
100 |
@@ -152,7 +151,6 @@ endif |
101 |
EXPORTS = \ |
102 |
nsGTKToolkit.h \ |
103 |
nsIImageToPixbuf.h \ |
104 |
- mozdrawingarea.h \ |
105 |
mozcontainer.h \ |
106 |
$(NULL) |
107 |
|
108 |
--- mozilla/widget/src/gtk2/mozcontainer.c |
109 |
+++ mozilla/widget/src/gtk2/mozcontainer.c |
110 |
@@ -294,8 +294,15 @@ moz_container_realize (GtkWidget *widget) |
111 |
|
112 |
/* create the shell window */ |
113 |
|
114 |
- attributes.event_mask = gtk_widget_get_events (widget); |
115 |
- attributes.event_mask |= (GDK_EXPOSURE_MASK | GDK_STRUCTURE_MASK); |
116 |
+ attributes.event_mask = (gtk_widget_get_events (widget) | |
117 |
+ GDK_EXPOSURE_MASK | GDK_STRUCTURE_MASK | |
118 |
+ GDK_VISIBILITY_NOTIFY_MASK | |
119 |
+ GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | |
120 |
+ GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | |
121 |
+#ifdef HAVE_GTK_MOTION_HINTS |
122 |
+ GDK_POINTER_MOTION_HINT_MASK | |
123 |
+#endif |
124 |
+ GDK_POINTER_MOTION_MASK); |
125 |
attributes.x = widget->allocation.x; |
126 |
attributes.y = widget->allocation.y; |
127 |
attributes.width = widget->allocation.width; |
128 |
--- mozilla/widget/src/gtk2/mozcontainer.h |
129 |
+++ mozilla/widget/src/gtk2/mozcontainer.h |
130 |
@@ -40,6 +40,7 @@ |
131 |
#define __MOZ_CONTAINER_H__ |
132 |
|
133 |
#include <gtk/gtkcontainer.h> |
134 |
+#include <gtk/gtkversion.h> |
135 |
|
136 |
#ifdef __cplusplus |
137 |
extern "C" { |
138 |
@@ -83,6 +84,11 @@ extern "C" { |
139 |
#define IS_MOZ_CONTAINER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), MOZ_CONTAINER_TYPE)) |
140 |
#define MOZ_CONAINTER_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), MOZ_CONTAINER_TYPE, MozContainerClass)) |
141 |
|
142 |
+#if (GTK_CHECK_VERSION(2, 12, 0) || \ |
143 |
+ (GTK_CHECK_VERSION(2, 10, 0) && defined(MOZ_PLATFORM_HILDON))) |
144 |
+#define HAVE_GTK_MOTION_HINTS |
145 |
+#endif |
146 |
+ |
147 |
typedef struct _MozContainer MozContainer; |
148 |
typedef struct _MozContainerClass MozContainerClass; |
149 |
|
150 |
deleted file mode 100644 |
151 |
--- mozilla/widget/src/gtk2/mozdrawingarea.c |
152 |
+++ /dev/null |
153 |
@@ -1,241 +0,0 @@ |
154 |
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
155 |
-/* vim:expandtab:shiftwidth=4:tabstop=4: |
156 |
- */ |
157 |
-/* ***** BEGIN LICENSE BLOCK ***** |
158 |
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
159 |
- * |
160 |
- * The contents of this file are subject to the Mozilla Public License Version |
161 |
- * 1.1 (the "License"); you may not use this file except in compliance with |
162 |
- * the License. You may obtain a copy of the License at |
163 |
- * http://www.mozilla.org/MPL/ |
164 |
- * |
165 |
- * Software distributed under the License is distributed on an "AS IS" basis, |
166 |
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License |
167 |
- * for the specific language governing rights and limitations under the |
168 |
- * License. |
169 |
- * |
170 |
- * The Original Code is mozilla.org code. |
171 |
- * |
172 |
- * The Initial Developer of the Original Code is Christopher Blizzard |
173 |
- * <blizzard@×××××××.org>. Portions created by the Initial Developer |
174 |
- * are Copyright (C) 2001 the Initial Developer. All Rights Reserved. |
175 |
- * |
176 |
- * Contributor(s): |
177 |
- * |
178 |
- * Alternatively, the contents of this file may be used under the terms of |
179 |
- * either the GNU General Public License Version 2 or later (the "GPL"), or |
180 |
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), |
181 |
- * in which case the provisions of the GPL or the LGPL are applicable instead |
182 |
- * of those above. If you wish to allow use of your version of this file only |
183 |
- * under the terms of either the GPL or the LGPL, and not to allow others to |
184 |
- * use your version of this file under the terms of the MPL, indicate your |
185 |
- * decision by deleting the provisions above and replace them with the notice |
186 |
- * and other provisions required by the GPL or the LGPL. If you do not delete |
187 |
- * the provisions above, a recipient may use your version of this file under |
188 |
- * the terms of any one of the MPL, the GPL or the LGPL. |
189 |
- * |
190 |
- * ***** END LICENSE BLOCK ***** */ |
191 |
- |
192 |
-#include "mozdrawingarea.h" |
193 |
- |
194 |
-/* init methods */ |
195 |
-static void moz_drawingarea_class_init (MozDrawingareaClass *klass); |
196 |
-static void moz_drawingarea_init (MozDrawingarea *drawingarea); |
197 |
- |
198 |
-/* static methods */ |
199 |
-static void moz_drawingarea_create_windows (MozDrawingarea *drawingarea, |
200 |
- GdkWindow *parent, |
201 |
- GtkWidget *widget, |
202 |
- GdkVisual *visual); |
203 |
- |
204 |
-static void moz_drawingarea_finalize (GObject *object); |
205 |
- |
206 |
-static GObjectClass *parent_class = NULL; |
207 |
- |
208 |
-GtkType |
209 |
-moz_drawingarea_get_type(void) |
210 |
-{ |
211 |
- static GtkType moz_drawingarea_type = 0; |
212 |
- |
213 |
- if (!moz_drawingarea_type) { |
214 |
- static GTypeInfo moz_drawingarea_info = { |
215 |
- sizeof(MozDrawingareaClass), /* class size */ |
216 |
- NULL, /* base_init */ |
217 |
- NULL, /* base_finalize */ |
218 |
- (GClassInitFunc) moz_drawingarea_class_init, /* class_init */ |
219 |
- NULL, /* class_destroy */ |
220 |
- NULL, /* class_data */ |
221 |
- sizeof(MozDrawingarea), /* instance_size */ |
222 |
- 0, /* n_preallocs */ |
223 |
- (GInstanceInitFunc) moz_drawingarea_init, /* instance_init */ |
224 |
- NULL, /* value_table */ |
225 |
- }; |
226 |
- moz_drawingarea_type = |
227 |
- g_type_register_static (G_TYPE_OBJECT, |
228 |
- "MozDrawingarea", |
229 |
- &moz_drawingarea_info, 0); |
230 |
- } |
231 |
- |
232 |
- return moz_drawingarea_type; |
233 |
-} |
234 |
- |
235 |
-MozDrawingarea * |
236 |
-moz_drawingarea_new (MozDrawingarea *parent, MozContainer *widget_parent, |
237 |
- GdkVisual *visual) |
238 |
-{ |
239 |
- MozDrawingarea *drawingarea; |
240 |
- |
241 |
- drawingarea = g_object_new(MOZ_DRAWINGAREA_TYPE, NULL); |
242 |
- |
243 |
- if (!parent) |
244 |
- moz_drawingarea_create_windows(drawingarea, |
245 |
- GTK_WIDGET(widget_parent)->window, |
246 |
- GTK_WIDGET(widget_parent), |
247 |
- visual); |
248 |
- else |
249 |
- moz_drawingarea_create_windows(drawingarea, |
250 |
- parent->inner_window, |
251 |
- GTK_WIDGET(widget_parent), |
252 |
- visual); |
253 |
- |
254 |
- return drawingarea; |
255 |
-} |
256 |
- |
257 |
-void |
258 |
-moz_drawingarea_class_init (MozDrawingareaClass *klass) |
259 |
-{ |
260 |
- GObjectClass *object_class = G_OBJECT_CLASS (klass); |
261 |
- |
262 |
- object_class->finalize = moz_drawingarea_finalize; |
263 |
- |
264 |
- parent_class = g_type_class_peek_parent(klass); |
265 |
-} |
266 |
- |
267 |
-void |
268 |
-moz_drawingarea_init (MozDrawingarea *drawingarea) |
269 |
-{ |
270 |
- |
271 |
-} |
272 |
- |
273 |
-void |
274 |
-moz_drawingarea_reparent (MozDrawingarea *drawingarea, GdkWindow *aNewParent) |
275 |
-{ |
276 |
- gdk_window_reparent(drawingarea->clip_window, |
277 |
- aNewParent, 0, 0); |
278 |
-} |
279 |
- |
280 |
-void |
281 |
-moz_drawingarea_create_windows (MozDrawingarea *drawingarea, GdkWindow *parent, |
282 |
- GtkWidget *widget, GdkVisual *visual) |
283 |
-{ |
284 |
- GdkWindowAttr attributes; |
285 |
- gint attributes_mask = 0; |
286 |
- |
287 |
- /* create the clipping window */ |
288 |
- attributes.event_mask = 0; |
289 |
- attributes.x = 0; |
290 |
- attributes.y = 0; |
291 |
- attributes.width = 1; |
292 |
- attributes.height = 1; |
293 |
- attributes.wclass = GDK_INPUT_OUTPUT; |
294 |
- attributes.window_type = GDK_WINDOW_CHILD; |
295 |
- if (!visual) { |
296 |
- attributes.visual = gtk_widget_get_visual (widget); |
297 |
- attributes.colormap = gtk_widget_get_colormap (widget); |
298 |
- } else { |
299 |
- attributes.visual = visual; |
300 |
- attributes.colormap = gdk_colormap_new(visual, 0); |
301 |
- } |
302 |
- |
303 |
- attributes_mask |= GDK_WA_VISUAL | GDK_WA_COLORMAP | |
304 |
- GDK_WA_X | GDK_WA_Y; |
305 |
- |
306 |
- drawingarea->clip_window = gdk_window_new (parent, &attributes, |
307 |
- attributes_mask); |
308 |
- gdk_window_set_user_data(drawingarea->clip_window, widget); |
309 |
- |
310 |
- /* set the default pixmap to None so that you don't end up with the |
311 |
- gtk default which is BlackPixel. */ |
312 |
- gdk_window_set_back_pixmap(drawingarea->clip_window, NULL, FALSE); |
313 |
- |
314 |
- attributes.event_mask = (GDK_EXPOSURE_MASK | GDK_STRUCTURE_MASK | |
315 |
- GDK_VISIBILITY_NOTIFY_MASK | |
316 |
- GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | |
317 |
- GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | |
318 |
-#ifdef HAVE_GTK_MOTION_HINTS |
319 |
- GDK_POINTER_MOTION_HINT_MASK | |
320 |
-#endif |
321 |
- GDK_POINTER_MOTION_MASK); |
322 |
- /* create the inner window */ |
323 |
- drawingarea->inner_window = gdk_window_new (drawingarea->clip_window, |
324 |
- &attributes, attributes_mask); |
325 |
- gdk_window_set_user_data(drawingarea->inner_window, widget); |
326 |
- |
327 |
- /* set the default pixmap to None so that you don't end up with the |
328 |
- gtk default which is BlackPixel. */ |
329 |
- gdk_window_set_back_pixmap(drawingarea->inner_window, NULL, FALSE); |
330 |
- |
331 |
- if (visual) { |
332 |
- g_object_unref(attributes.colormap); |
333 |
- } |
334 |
-} |
335 |
- |
336 |
-void |
337 |
-moz_drawingarea_finalize (GObject *object) |
338 |
-{ |
339 |
- MozDrawingarea *drawingarea; |
340 |
- gpointer user_data; |
341 |
- |
342 |
- g_return_if_fail(IS_MOZ_DRAWINGAREA(object)); |
343 |
- |
344 |
- drawingarea = MOZ_DRAWINGAREA(object); |
345 |
- |
346 |
- gdk_window_destroy(drawingarea->inner_window); |
347 |
- gdk_window_destroy(drawingarea->clip_window); |
348 |
- |
349 |
- (* parent_class->finalize) (object); |
350 |
-} |
351 |
- |
352 |
-void |
353 |
-moz_drawingarea_move (MozDrawingarea *drawingarea, |
354 |
- gint x, gint y) |
355 |
-{ |
356 |
- gdk_window_move(drawingarea->clip_window, x, y); |
357 |
-} |
358 |
- |
359 |
-void |
360 |
-moz_drawingarea_resize (MozDrawingarea *drawingarea, |
361 |
- gint width, gint height) |
362 |
-{ |
363 |
- gdk_window_resize(drawingarea->clip_window, width, height); |
364 |
- gdk_window_resize(drawingarea->inner_window, width, height); |
365 |
-} |
366 |
- |
367 |
-void |
368 |
-moz_drawingarea_move_resize (MozDrawingarea *drawingarea, |
369 |
- gint x, gint y, gint width, gint height) |
370 |
-{ |
371 |
- gdk_window_resize(drawingarea->inner_window, width, height); |
372 |
- gdk_window_move_resize(drawingarea->clip_window, x, y, width, height); |
373 |
-} |
374 |
- |
375 |
-void |
376 |
-moz_drawingarea_set_visibility (MozDrawingarea *drawingarea, |
377 |
- gboolean visibility) |
378 |
-{ |
379 |
- if (visibility) { |
380 |
- gdk_window_show_unraised(drawingarea->inner_window); |
381 |
- gdk_window_show_unraised(drawingarea->clip_window); |
382 |
- } |
383 |
- else { |
384 |
- gdk_window_hide(drawingarea->clip_window); |
385 |
- gdk_window_hide(drawingarea->inner_window); |
386 |
- } |
387 |
-} |
388 |
- |
389 |
-void |
390 |
-moz_drawingarea_scroll (MozDrawingarea *drawingarea, |
391 |
- gint x, gint y) |
392 |
-{ |
393 |
- gdk_window_scroll(drawingarea->inner_window, x, y); |
394 |
-} |
395 |
deleted file mode 100644 |
396 |
--- mozilla/widget/src/gtk2/mozdrawingarea.h |
397 |
+++ /dev/null |
398 |
@@ -1,101 +0,0 @@ |
399 |
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
400 |
-/* vim:expandtab:shiftwidth=4:tabstop=4: |
401 |
- */ |
402 |
-/* ***** BEGIN LICENSE BLOCK ***** |
403 |
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
404 |
- * |
405 |
- * The contents of this file are subject to the Mozilla Public License Version |
406 |
- * 1.1 (the "License"); you may not use this file except in compliance with |
407 |
- * the License. You may obtain a copy of the License at |
408 |
- * http://www.mozilla.org/MPL/ |
409 |
- * |
410 |
- * Software distributed under the License is distributed on an "AS IS" basis, |
411 |
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License |
412 |
- * for the specific language governing rights and limitations under the |
413 |
- * License. |
414 |
- * |
415 |
- * The Original Code is mozilla.org code. |
416 |
- * |
417 |
- * The Initial Developer of the Original Code is Christopher Blizzard |
418 |
- * <blizzard@×××××××.org>. Portions created by the Initial Developer |
419 |
- * are Copyright (C) 2001 the Initial Developer. All Rights Reserved. |
420 |
- * |
421 |
- * Contributor(s): |
422 |
- * |
423 |
- * Alternatively, the contents of this file may be used under the terms of |
424 |
- * either the GNU General Public License Version 2 or later (the "GPL"), or |
425 |
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), |
426 |
- * in which case the provisions of the GPL or the LGPL are applicable instead |
427 |
- * of those above. If you wish to allow use of your version of this file only |
428 |
- * under the terms of either the GPL or the LGPL, and not to allow others to |
429 |
- * use your version of this file under the terms of the MPL, indicate your |
430 |
- * decision by deleting the provisions above and replace them with the notice |
431 |
- * and other provisions required by the GPL or the LGPL. If you do not delete |
432 |
- * the provisions above, a recipient may use your version of this file under |
433 |
- * the terms of any one of the MPL, the GPL or the LGPL. |
434 |
- * |
435 |
- * ***** END LICENSE BLOCK ***** */ |
436 |
- |
437 |
-#ifndef __MOZ_DRAWINGAREA_H__ |
438 |
-#define __MOZ_DRAWINGAREA_H__ |
439 |
- |
440 |
-#include <gdk/gdkwindow.h> |
441 |
-#include <gtk/gtkversion.h> |
442 |
-#include "mozcontainer.h" |
443 |
- |
444 |
-#ifdef __cplusplus |
445 |
-extern "C" { |
446 |
-#endif /* __cplusplus */ |
447 |
- |
448 |
-#define MOZ_DRAWINGAREA_TYPE (moz_drawingarea_get_type()) |
449 |
-#define MOZ_DRAWINGAREA(obj) (GTK_CHECK_CAST((obj), MOZ_DRAWINGAREA_TYPE, MozDrawingarea)) |
450 |
-#define MOZ_DRAWINGAREA_CLASS(klass) (GTK_CHECK_CLASS_CAST((klass), MOZ_DRAWINGAREA_TYPE, MozDrawingareaClass)) |
451 |
-#define IS_MOZ_DRAWINGAREA(obj) (GTK_CHECK_TYPE((obj), MOZ_DRAWINGAREA_TYPE)) |
452 |
-#define IS_MOZ_DRAWINGAREA_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), MOZ_DRAWINGAREA_TYPE)) |
453 |
-#define MOZ_DRAWINGAREA_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), MOZ_DRAWINGAREA_TYPE, MozDrawingareaClass)) |
454 |
- |
455 |
-#if (GTK_CHECK_VERSION(2, 12, 0) || \ |
456 |
- (GTK_CHECK_VERSION(2, 10, 0) && defined(MOZ_PLATFORM_HILDON))) |
457 |
-#define HAVE_GTK_MOTION_HINTS |
458 |
-#endif |
459 |
- |
460 |
-typedef struct _MozDrawingarea MozDrawingarea; |
461 |
-typedef struct _MozDrawingareaClass MozDrawingareaClass; |
462 |
- |
463 |
-struct _MozDrawingarea |
464 |
-{ |
465 |
- GObject parent_instance; |
466 |
- /* AFAIK this clip_window (and thus this whole class) exists solely to |
467 |
- * make gdk_window_scroll() smooth for nsIWidget::Scroll(). */ |
468 |
- GdkWindow *clip_window; |
469 |
- GdkWindow *inner_window; |
470 |
-}; |
471 |
- |
472 |
-struct _MozDrawingareaClass |
473 |
-{ |
474 |
- GObjectClass parent_class; |
475 |
-}; |
476 |
- |
477 |
-GtkType moz_drawingarea_get_type (void); |
478 |
-MozDrawingarea *moz_drawingarea_new (MozDrawingarea *parent, |
479 |
- MozContainer *widget_parent, |
480 |
- GdkVisual *visual); |
481 |
-void moz_drawingarea_reparent (MozDrawingarea *drawingarea, |
482 |
- GdkWindow *aNewParent); |
483 |
-void moz_drawingarea_move (MozDrawingarea *drawingarea, |
484 |
- gint x, gint y); |
485 |
-void moz_drawingarea_resize (MozDrawingarea *drawingarea, |
486 |
- gint width, gint height); |
487 |
-void moz_drawingarea_move_resize (MozDrawingarea *drawingarea, |
488 |
- gint x, gint y, |
489 |
- gint width, gint height); |
490 |
-void moz_drawingarea_set_visibility (MozDrawingarea *drawingarea, |
491 |
- gboolean visibility); |
492 |
-void moz_drawingarea_scroll (MozDrawingarea *drawingarea, |
493 |
- gint x, gint y); |
494 |
- |
495 |
-#ifdef __cplusplus |
496 |
-} |
497 |
-#endif /* __cplusplus */ |
498 |
- |
499 |
-#endif /* __MOZ_DRAWINGAREA_H__ */ |
500 |
--- mozilla/widget/src/gtk2/nsWindow.cpp |
501 |
+++ mozilla/widget/src/gtk2/nsWindow.cpp |
502 |
@@ -368,7 +368,7 @@ nsWindow::nsWindow() |
503 |
mPreferredWidth = 0; |
504 |
mPreferredHeight = 0; |
505 |
mContainer = nsnull; |
506 |
- mDrawingarea = nsnull; |
507 |
+ mGdkWindow = nsnull; |
508 |
mShell = nsnull; |
509 |
mWindowGroup = nsnull; |
510 |
mContainerGotFocus = PR_FALSE; |
511 |
@@ -673,9 +673,7 @@ CheckDestroyInvisibleContainer() |
512 |
|
513 |
// Change the containing GtkWidget on a sub-hierarchy of GdkWindows belonging |
514 |
// to aOldWidget and rooted at aWindow, and reparent any child GtkWidgets of |
515 |
-// the GdkWindow hierarchy. If aNewWidget is NULL, the reference to |
516 |
-// aOldWidget is removed from its GdkWindows, and child GtkWidgets are |
517 |
-// destroyed. |
518 |
+// the GdkWindow hierarchy to aNewWidget. |
519 |
static void |
520 |
SetWidgetForHierarchy(GdkWindow *aWindow, |
521 |
GtkWidget *aOldWidget, |
522 |
@@ -694,13 +692,7 @@ SetWidgetForHierarchy(GdkWindow *aWindow, |
523 |
|
524 |
// This window belongs to a child widget, which will no longer be a |
525 |
// child of aOldWidget. |
526 |
- if (aNewWidget) { |
527 |
- gtk_widget_reparent(widget, aNewWidget); |
528 |
- } else { |
529 |
- // aNewWidget == NULL indicates that the window is about to be |
530 |
- // destroyed. |
531 |
- gtk_widget_destroy(widget); |
532 |
- } |
533 |
+ gtk_widget_reparent(widget, aNewWidget); |
534 |
|
535 |
return; |
536 |
} |
537 |
@@ -714,6 +706,30 @@ SetWidgetForHierarchy(GdkWindow *aWindow, |
538 |
gdk_window_set_user_data(aWindow, aNewWidget); |
539 |
} |
540 |
|
541 |
+// Walk the list of child windows and call destroy on them. |
542 |
+void |
543 |
+nsWindow::DestroyChildWindows() |
544 |
+{ |
545 |
+ if (!mGdkWindow) |
546 |
+ return; |
547 |
+ |
548 |
+ while (GList *children = gdk_window_peek_children(mGdkWindow)) { |
549 |
+ GdkWindow *child = GDK_WINDOW(children->data); |
550 |
+ nsWindow *kid = get_window_for_gdk_window(child); |
551 |
+ if (kid) { |
552 |
+ kid->Destroy(); |
553 |
+ } else { |
554 |
+ // This child is not an nsWindow. |
555 |
+ // Destroy the child GtkWidget. |
556 |
+ gpointer data; |
557 |
+ gdk_window_get_user_data(child, &data); |
558 |
+ if (GTK_IS_WIDGET(data)) { |
559 |
+ gtk_widget_destroy(static_cast<GtkWidget*>(data)); |
560 |
+ } |
561 |
+ } |
562 |
+ } |
563 |
+} |
564 |
+ |
565 |
NS_IMETHODIMP |
566 |
nsWindow::Destroy(void) |
567 |
{ |
568 |
@@ -751,15 +767,6 @@ nsWindow::Destroy(void) |
569 |
|
570 |
NativeShow(PR_FALSE); |
571 |
|
572 |
- // walk the list of children and call destroy on them. Have to be |
573 |
- // careful, though -- calling destroy on a kid may actually remove |
574 |
- // it from our child list, losing its sibling links. |
575 |
- for (nsIWidget* kid = mFirstChild; kid; ) { |
576 |
- nsIWidget* next = kid->GetNextSibling(); |
577 |
- kid->Destroy(); |
578 |
- kid = next; |
579 |
- } |
580 |
- |
581 |
#ifdef USE_XIM |
582 |
IMEDestroyContext(); |
583 |
#endif |
584 |
@@ -796,35 +803,26 @@ nsWindow::Destroy(void) |
585 |
gtk_widget_destroy(mShell); |
586 |
mShell = nsnull; |
587 |
mContainer = nsnull; |
588 |
+ NS_ABORT_IF_FALSE(!mGdkWindow, |
589 |
+ "mGdkWindow should be NULL when mContainer is destroyed"); |
590 |
} |
591 |
else if (mContainer) { |
592 |
gtk_widget_destroy(GTK_WIDGET(mContainer)); |
593 |
mContainer = nsnull; |
594 |
+ NS_ABORT_IF_FALSE(!mGdkWindow, |
595 |
+ "mGdkWindow should be NULL when mContainer is destroyed"); |
596 |
} |
597 |
- else if (owningWidget) { |
598 |
- // Remove references from GdkWindows back to their container |
599 |
- // widget while the GdkWindow hierarchy is still available. |
600 |
- // (OnContainerUnrealize does this when the MozContainer widget is |
601 |
- // destroyed.) |
602 |
- SetWidgetForHierarchy(mDrawingarea->clip_window, owningWidget, NULL); |
603 |
- } |
604 |
- |
605 |
- if (mDrawingarea) { |
606 |
- g_object_set_data(G_OBJECT(mDrawingarea->clip_window), |
607 |
- "nsWindow", NULL); |
608 |
- g_object_set_data(G_OBJECT(mDrawingarea->inner_window), |
609 |
- "nsWindow", NULL); |
610 |
- |
611 |
- g_object_set_data(G_OBJECT(mDrawingarea->clip_window), |
612 |
- "mozdrawingarea", NULL); |
613 |
- g_object_set_data(G_OBJECT(mDrawingarea->inner_window), |
614 |
- "mozdrawingarea", NULL); |
615 |
- |
616 |
- NS_ASSERTION(!get_gtk_widget_for_gdk_window(mDrawingarea->inner_window), |
617 |
- "widget reference not removed"); |
618 |
+ else if (mGdkWindow) { |
619 |
+ // Destroy child windows to ensure that their mThebesSurfaces are |
620 |
+ // released and to remove references from GdkWindows back to their |
621 |
+ // container widget. (OnContainerUnrealize() does this when the |
622 |
+ // MozContainer widget is destroyed.) |
623 |
+ DestroyChildWindows(); |
624 |
|
625 |
- g_object_unref(mDrawingarea); |
626 |
- mDrawingarea = nsnull; |
627 |
+ gdk_window_set_user_data(mGdkWindow, NULL); |
628 |
+ g_object_set_data(G_OBJECT(mGdkWindow), "nsWindow", NULL); |
629 |
+ gdk_window_destroy(mGdkWindow); |
630 |
+ mGdkWindow = nsnull; |
631 |
} |
632 |
|
633 |
if (gInvisibleContainer && owningWidget == gInvisibleContainer) { |
634 |
@@ -851,7 +849,7 @@ nsWindow::GetParent(void) |
635 |
NS_IMETHODIMP |
636 |
nsWindow::SetParent(nsIWidget *aNewParent) |
637 |
{ |
638 |
- if (mContainer || !mDrawingarea || !mParent) { |
639 |
+ if (mContainer || !mGdkWindow || !mParent) { |
640 |
NS_NOTREACHED("nsWindow::SetParent - reparenting a non-child window"); |
641 |
return NS_ERROR_NOT_IMPLEMENTED; |
642 |
} |
643 |
@@ -866,12 +864,12 @@ nsWindow::SetParent(nsIWidget *aNewParent) |
644 |
if (!oldContainer) { |
645 |
// The GdkWindows have been destroyed so there is nothing else to |
646 |
// reparent. |
647 |
- NS_ABORT_IF_FALSE(GDK_WINDOW_OBJECT(mDrawingarea->inner_window)->destroyed, |
648 |
+ NS_ABORT_IF_FALSE(GDK_WINDOW_OBJECT(mGdkWindow)->destroyed, |
649 |
"live GdkWindow with no widget"); |
650 |
return NS_OK; |
651 |
} |
652 |
|
653 |
- NS_ABORT_IF_FALSE(!GDK_WINDOW_OBJECT(mDrawingarea->inner_window)->destroyed, |
654 |
+ NS_ABORT_IF_FALSE(!GDK_WINDOW_OBJECT(mGdkWindow)->destroyed, |
655 |
"destroyed GdkWindow with widget"); |
656 |
|
657 |
GdkWindow* newParentWindow = NULL; |
658 |
@@ -901,11 +899,10 @@ nsWindow::SetParent(nsIWidget *aNewParent) |
659 |
if (newContainer != oldContainer) { |
660 |
NS_ABORT_IF_FALSE(!GDK_WINDOW_OBJECT(newParentWindow)->destroyed, |
661 |
"destroyed GdkWindow with widget"); |
662 |
- SetWidgetForHierarchy(mDrawingarea->clip_window, oldContainer, |
663 |
- newContainer); |
664 |
+ SetWidgetForHierarchy(mGdkWindow, oldContainer, newContainer); |
665 |
} |
666 |
|
667 |
- moz_drawingarea_reparent(mDrawingarea, newParentWindow); |
668 |
+ gdk_window_reparent(mGdkWindow, newParentWindow, 0, 0); |
669 |
} |
670 |
|
671 |
return NS_OK; |
672 |
@@ -1216,8 +1213,8 @@ nsWindow::Move(PRInt32 aX, PRInt32 aY) |
673 |
if (mIsTopLevel) { |
674 |
gtk_window_move(GTK_WINDOW(mShell), aX, aY); |
675 |
} |
676 |
- else if (mDrawingarea) { |
677 |
- moz_drawingarea_move(mDrawingarea, aX, aY); |
678 |
+ else if (mGdkWindow) { |
679 |
+ gdk_window_move(mGdkWindow, aX, aY); |
680 |
} |
681 |
|
682 |
return NS_OK; |
683 |
@@ -1244,19 +1241,19 @@ nsWindow::SetZIndex(PRInt32 aZIndex) |
684 |
|
685 |
NS_ASSERTION(!mContainer, "Expected Mozilla child widget"); |
686 |
|
687 |
- // We skip the nsWindows that don't have mDrawingareas. |
688 |
+ // We skip the nsWindows that don't have mGdkWindows. |
689 |
// These are probably in the process of being destroyed. |
690 |
|
691 |
if (!GetNextSibling()) { |
692 |
// We're to be on top. |
693 |
- if (mDrawingarea) |
694 |
- gdk_window_raise(mDrawingarea->clip_window); |
695 |
+ if (mGdkWindow) |
696 |
+ gdk_window_raise(mGdkWindow); |
697 |
} else { |
698 |
// All the siblings before us need to be below our widget. |
699 |
for (nsWindow* w = this; w; |
700 |
w = static_cast<nsWindow*>(w->GetPrevSibling())) { |
701 |
- if (w->mDrawingarea) |
702 |
- gdk_window_lower(w->mDrawingarea->clip_window); |
703 |
+ if (w->mGdkWindow) |
704 |
+ gdk_window_lower(w->mGdkWindow); |
705 |
} |
706 |
} |
707 |
return NS_OK; |
708 |
@@ -1500,7 +1497,7 @@ nsWindow::SetCursor(nsCursor aCursor) |
709 |
{ |
710 |
// if we're not the toplevel window pass up the cursor request to |
711 |
// the toplevel window to handle it. |
712 |
- if (!mContainer && mDrawingarea) { |
713 |
+ if (!mContainer && mGdkWindow) { |
714 |
nsWindow *window = GetContainerWindow(); |
715 |
if (!window) |
716 |
return NS_ERROR_FAILURE; |
717 |
@@ -1583,7 +1580,7 @@ nsWindow::SetCursor(imgIContainer* aCursor, |
718 |
{ |
719 |
// if we're not the toplevel window pass up the cursor request to |
720 |
// the toplevel window to handle it. |
721 |
- if (!mContainer && mDrawingarea) { |
722 |
+ if (!mContainer && mGdkWindow) { |
723 |
nsWindow *window = GetContainerWindow(); |
724 |
if (!window) |
725 |
return NS_ERROR_FAILURE; |
726 |
@@ -1710,10 +1707,10 @@ nsWindow::Validate() |
727 |
{ |
728 |
// Get the update for this window and, well, just drop it on the |
729 |
// floor. |
730 |
- if (!mDrawingarea) |
731 |
+ if (!mGdkWindow) |
732 |
return NS_OK; |
733 |
|
734 |
- GdkRegion *region = gdk_window_get_update_area(mDrawingarea->inner_window); |
735 |
+ GdkRegion *region = gdk_window_get_update_area(mGdkWindow); |
736 |
|
737 |
if (region) |
738 |
gdk_region_destroy(region); |
739 |
@@ -1724,6 +1721,9 @@ nsWindow::Validate() |
740 |
NS_IMETHODIMP |
741 |
nsWindow::Invalidate(PRBool aIsSynchronous) |
742 |
{ |
743 |
+ if (!mGdkWindow) |
744 |
+ return NS_OK; |
745 |
+ |
746 |
GdkRectangle rect; |
747 |
|
748 |
rect.x = mBounds.x; |
749 |
@@ -1734,13 +1734,9 @@ nsWindow::Invalidate(PRBool aIsSynchronous) |
750 |
LOGDRAW(("Invalidate (all) [%p]: %d %d %d %d\n", (void *)this, |
751 |
rect.x, rect.y, rect.width, rect.height)); |
752 |
|
753 |
- if (!mDrawingarea) |
754 |
- return NS_OK; |
755 |
- |
756 |
- gdk_window_invalidate_rect(mDrawingarea->inner_window, |
757 |
- &rect, FALSE); |
758 |
+ gdk_window_invalidate_rect(mGdkWindow, &rect, FALSE); |
759 |
if (aIsSynchronous) |
760 |
- gdk_window_process_updates(mDrawingarea->inner_window, FALSE); |
761 |
+ gdk_window_process_updates(mGdkWindow, FALSE); |
762 |
|
763 |
return NS_OK; |
764 |
} |
765 |
@@ -1749,6 +1745,9 @@ NS_IMETHODIMP |
766 |
nsWindow::Invalidate(const nsRect &aRect, |
767 |
PRBool aIsSynchronous) |
768 |
{ |
769 |
+ if (!mGdkWindow) |
770 |
+ return NS_OK; |
771 |
+ |
772 |
GdkRectangle rect; |
773 |
|
774 |
rect.x = aRect.x; |
775 |
@@ -1759,13 +1758,9 @@ nsWindow::Invalidate(const nsRect &aRect, |
776 |
LOGDRAW(("Invalidate (rect) [%p]: %d %d %d %d (sync: %d)\n", (void *)this, |
777 |
rect.x, rect.y, rect.width, rect.height, aIsSynchronous)); |
778 |
|
779 |
- if (!mDrawingarea) |
780 |
- return NS_OK; |
781 |
- |
782 |
- gdk_window_invalidate_rect(mDrawingarea->inner_window, |
783 |
- &rect, FALSE); |
784 |
+ gdk_window_invalidate_rect(mGdkWindow, &rect, FALSE); |
785 |
if (aIsSynchronous) |
786 |
- gdk_window_process_updates(mDrawingarea->inner_window, FALSE); |
787 |
+ gdk_window_process_updates(mGdkWindow, FALSE); |
788 |
|
789 |
return NS_OK; |
790 |
} |
791 |
@@ -1777,7 +1772,7 @@ nsWindow::InvalidateRegion(const nsIRegion* aRegion, |
792 |
GdkRegion *region = nsnull; |
793 |
aRegion->GetNativeRegion((void *&)region); |
794 |
|
795 |
- if (region && mDrawingarea) { |
796 |
+ if (region && mGdkWindow) { |
797 |
GdkRectangle rect; |
798 |
gdk_region_get_clipbox(region, &rect); |
799 |
|
800 |
@@ -1785,7 +1780,7 @@ nsWindow::InvalidateRegion(const nsIRegion* aRegion, |
801 |
(void *)this, |
802 |
rect.x, rect.y, rect.width, rect.height, aIsSynchronous)); |
803 |
|
804 |
- gdk_window_invalidate_region(mDrawingarea->inner_window, |
805 |
+ gdk_window_invalidate_region(mGdkWindow, |
806 |
region, FALSE); |
807 |
} |
808 |
else { |
809 |
@@ -1799,10 +1794,10 @@ nsWindow::InvalidateRegion(const nsIRegion* aRegion, |
810 |
NS_IMETHODIMP |
811 |
nsWindow::Update() |
812 |
{ |
813 |
- if (!mDrawingarea) |
814 |
+ if (!mGdkWindow) |
815 |
return NS_OK; |
816 |
|
817 |
- gdk_window_process_updates(mDrawingarea->inner_window, FALSE); |
818 |
+ gdk_window_process_updates(mGdkWindow, FALSE); |
819 |
return NS_OK; |
820 |
} |
821 |
|
822 |
@@ -1817,7 +1812,7 @@ nsWindow::Scroll(PRInt32 aDx, |
823 |
PRInt32 aDy, |
824 |
nsRect *aClipRect) |
825 |
{ |
826 |
- if (!mDrawingarea) |
827 |
+ if (!mGdkWindow) |
828 |
return NS_OK; |
829 |
|
830 |
D_DEBUG_AT( ns_Window, "%s( %4d,%4d )\n", __FUNCTION__, aDx, aDy ); |
831 |
@@ -1827,7 +1822,7 @@ nsWindow::Scroll(PRInt32 aDx, |
832 |
aClipRect->x, aClipRect->y, aClipRect->width, aClipRect->height ); |
833 |
} |
834 |
|
835 |
- moz_drawingarea_scroll(mDrawingarea, aDx, aDy); |
836 |
+ gdk_window_scroll(mGdkWindow, aDx, aDy); |
837 |
|
838 |
// Update bounds on our child windows |
839 |
for (nsIWidget* kid = mFirstChild; kid; kid = kid->GetNextSibling()) { |
840 |
@@ -1847,10 +1842,10 @@ NS_IMETHODIMP |
841 |
nsWindow::ScrollWidgets(PRInt32 aDx, |
842 |
PRInt32 aDy) |
843 |
{ |
844 |
- if (!mDrawingarea) |
845 |
+ if (!mGdkWindow) |
846 |
return NS_OK; |
847 |
|
848 |
- moz_drawingarea_scroll(mDrawingarea, aDx, aDy); |
849 |
+ gdk_window_scroll(mGdkWindow, aDx, aDy); |
850 |
return NS_OK; |
851 |
} |
852 |
|
853 |
@@ -1868,10 +1863,10 @@ nsWindow::GetNativeData(PRUint32 aDataType) |
854 |
switch (aDataType) { |
855 |
case NS_NATIVE_WINDOW: |
856 |
case NS_NATIVE_WIDGET: { |
857 |
- if (!mDrawingarea) |
858 |
+ if (!mGdkWindow) |
859 |
return nsnull; |
860 |
|
861 |
- return mDrawingarea->inner_window; |
862 |
+ return mGdkWindow; |
863 |
break; |
864 |
} |
865 |
|
866 |
@@ -1991,8 +1986,8 @@ nsWindow::WidgetToScreen(const nsRect& aOldRect, nsRect& aNewRect) |
867 |
&x, &y); |
868 |
LOG(("WidgetToScreen (container) %d %d\n", x, y)); |
869 |
} |
870 |
- else if (mDrawingarea) { |
871 |
- gdk_window_get_origin(mDrawingarea->inner_window, &x, &y); |
872 |
+ else if (mGdkWindow) { |
873 |
+ gdk_window_get_origin(mGdkWindow, &x, &y); |
874 |
LOG(("WidgetToScreen (drawing) %d %d\n", x, y)); |
875 |
} |
876 |
|
877 |
@@ -2013,8 +2008,8 @@ nsWindow::ScreenToWidget(const nsRect& aOldRect, nsRect& aNewRect) |
878 |
gdk_window_get_root_origin(GTK_WIDGET(mContainer)->window, |
879 |
&x, &y); |
880 |
} |
881 |
- else if (mDrawingarea) { |
882 |
- gdk_window_get_origin(mDrawingarea->inner_window, &x, &y); |
883 |
+ else if (mGdkWindow) { |
884 |
+ gdk_window_get_origin(mGdkWindow, &x, &y); |
885 |
} |
886 |
|
887 |
aNewRect.x = aOldRect.x - x; |
888 |
@@ -2065,7 +2060,7 @@ nsWindow::CaptureMouse(PRBool aCapture) |
889 |
{ |
890 |
LOG(("CaptureMouse %p\n", (void *)this)); |
891 |
|
892 |
- if (!mDrawingarea) |
893 |
+ if (!mGdkWindow) |
894 |
return NS_OK; |
895 |
|
896 |
GtkWidget *widget = GetMozContainerWidget(); |
897 |
@@ -2089,7 +2084,7 @@ nsWindow::CaptureRollupEvents(nsIRollupListener *aListener, |
898 |
PRBool aDoCapture, |
899 |
PRBool aConsumeRollupEvent) |
900 |
{ |
901 |
- if (!mDrawingarea) |
902 |
+ if (!mGdkWindow) |
903 |
return NS_OK; |
904 |
|
905 |
GtkWidget *widget = GetMozContainerWidget(); |
906 |
@@ -2271,11 +2266,7 @@ nsWindow::OnExposeEvent(GtkWidget *aWidget, GdkEventExpose *aEvent) |
907 |
return FALSE; |
908 |
} |
909 |
|
910 |
- if (!mDrawingarea) |
911 |
- return FALSE; |
912 |
- |
913 |
- // handle exposes for the inner window only |
914 |
- if (aEvent->window != mDrawingarea->inner_window) |
915 |
+ if (!mGdkWindow) |
916 |
return FALSE; |
917 |
|
918 |
static NS_DEFINE_CID(kRegionCID, NS_REGION_CID); |
919 |
@@ -2320,7 +2311,7 @@ nsWindow::OnExposeEvent(GtkWidget *aWidget, GdkEventExpose *aEvent) |
920 |
nsRefPtr<gfxContext> ctx = rc->ThebesContext(); |
921 |
|
922 |
gfxPlatformGtk::GetPlatform()->SetGdkDrawable(ctx->OriginalSurface(), |
923 |
- GDK_DRAWABLE(mDrawingarea->inner_window)); |
924 |
+ GDK_DRAWABLE(mGdkWindow)); |
925 |
|
926 |
// clip to the update region |
927 |
ctx->Save(); |
928 |
@@ -2381,7 +2372,7 @@ nsWindow::OnExposeEvent(GtkWidget *aWidget, GdkEventExpose *aEvent) |
929 |
if (gForce24bpp) { |
930 |
depth = 24; // 24 always |
931 |
} else { |
932 |
- depth = gdk_drawable_get_depth(GDK_DRAWABLE(mDrawingarea->inner_window)); |
933 |
+ depth = gdk_drawable_get_depth(GDK_DRAWABLE(mGdkWindow)); |
934 |
} |
935 |
|
936 |
if (!gUseBufferPixmap || |
937 |
@@ -2390,7 +2381,7 @@ nsWindow::OnExposeEvent(GtkWidget *aWidget, GdkEventExpose *aEvent) |
938 |
{ |
939 |
// create a one-off always if we're not using the global pixmap |
940 |
// if gUseBufferPixmap == TRUE, who's redrawing an area bigger than the screen? |
941 |
- bufferPixmap = gdk_pixmap_new(GDK_DRAWABLE(mDrawingarea->inner_window), |
942 |
+ bufferPixmap = gdk_pixmap_new(GDK_DRAWABLE(mGdkWindow), |
943 |
boundsRect.width, boundsRect.height, |
944 |
depth); |
945 |
bufferPixmapSize.width = boundsRect.width; |
946 |
@@ -2405,7 +2396,7 @@ nsWindow::OnExposeEvent(GtkWidget *aWidget, GdkEventExpose *aEvent) |
947 |
gBufferPixmapSize.width = PR_MAX(gBufferPixmapSize.width, boundsRect.width); |
948 |
gBufferPixmapSize.height = PR_MAX(gBufferPixmapSize.height, boundsRect.height); |
949 |
|
950 |
- gBufferPixmap = gdk_pixmap_new(GDK_DRAWABLE(mDrawingarea->inner_window), |
951 |
+ gBufferPixmap = gdk_pixmap_new(GDK_DRAWABLE(mGdkWindow), |
952 |
gBufferPixmapSize.width, gBufferPixmapSize.height, |
953 |
depth); |
954 |
|
955 |
@@ -2575,8 +2566,11 @@ nsWindow::OnContainerUnrealize(GtkWidget *aWidget) |
956 |
NS_ASSERTION(mContainer == MOZ_CONTAINER(aWidget), |
957 |
"unexpected \"unrealize\" signal"); |
958 |
|
959 |
- if (mDrawingarea) { |
960 |
- SetWidgetForHierarchy(mDrawingarea->clip_window, aWidget, NULL); |
961 |
+ if (mGdkWindow) { |
962 |
+ DestroyChildWindows(); |
963 |
+ |
964 |
+ g_object_set_data(G_OBJECT(mGdkWindow), "nsWindow", NULL); |
965 |
+ mGdkWindow = NULL; |
966 |
} |
967 |
} |
968 |
|
969 |
@@ -2595,11 +2589,9 @@ nsWindow::OnSizeAllocate(GtkWidget *aWidget, GtkAllocation *aAllocation) |
970 |
mBounds.width = rect.width; |
971 |
mBounds.height = rect.height; |
972 |
|
973 |
- if (!mDrawingarea) |
974 |
+ if (!mGdkWindow) |
975 |
return; |
976 |
|
977 |
- moz_drawingarea_resize (mDrawingarea, rect.width, rect.height); |
978 |
- |
979 |
if (mTransparencyBitmap) { |
980 |
ApplyTransparencyBitmap(); |
981 |
} |
982 |
@@ -2668,7 +2660,7 @@ nsWindow::OnLeaveNotifyEvent(GtkWidget *aWidget, GdkEventCrossing *aEvent) |
983 |
|
984 |
event.time = aEvent->time; |
985 |
|
986 |
- event.exit = is_top_level_mouse_exit(mDrawingarea->inner_window, aEvent) |
987 |
+ event.exit = is_top_level_mouse_exit(mGdkWindow, aEvent) |
988 |
? nsMouseEvent::eTopLevel : nsMouseEvent::eChild; |
989 |
|
990 |
LOG(("OnLeaveNotify: %p\n", (void *)this)); |
991 |
@@ -2797,7 +2789,7 @@ nsWindow::OnMotionNotifyEvent(GtkWidget *aWidget, GdkEventMotion *aEvent) |
992 |
} |
993 |
else { |
994 |
// XXX see OnScrollEvent() |
995 |
- if (aEvent->window == mDrawingarea->inner_window) { |
996 |
+ if (aEvent->window == mGdkWindow) { |
997 |
event.refPoint.x = nscoord(aEvent->x); |
998 |
event.refPoint.y = nscoord(aEvent->y); |
999 |
} else { |
1000 |
@@ -2828,7 +2820,7 @@ nsWindow::InitButtonEvent(nsMouseEvent &aEvent, |
1001 |
GdkEventButton *aGdkEvent) |
1002 |
{ |
1003 |
// XXX see OnScrollEvent() |
1004 |
- if (aGdkEvent->window == mDrawingarea->inner_window) { |
1005 |
+ if (aGdkEvent->window == mGdkWindow) { |
1006 |
aEvent.refPoint.x = nscoord(aGdkEvent->x); |
1007 |
aEvent.refPoint.y = nscoord(aGdkEvent->y); |
1008 |
} else { |
1009 |
@@ -3373,7 +3365,7 @@ nsWindow::OnScrollEvent(GtkWidget *aWidget, GdkEventScroll *aEvent) |
1010 |
break; |
1011 |
} |
1012 |
|
1013 |
- if (aEvent->window == mDrawingarea->inner_window) { |
1014 |
+ if (aEvent->window == mGdkWindow) { |
1015 |
// we are the window that the event happened on so no need for expensive ScreenToWidget |
1016 |
event.refPoint.x = nscoord(aEvent->x); |
1017 |
event.refPoint.y = nscoord(aEvent->y); |
1018 |
@@ -3469,12 +3461,12 @@ nsWindow::ThemeChanged() |
1019 |
nsEventStatus status = nsEventStatus_eIgnore; |
1020 |
DispatchEvent(&event, status); |
1021 |
|
1022 |
- if (!mDrawingarea || NS_UNLIKELY(mIsDestroyed)) |
1023 |
+ if (!mGdkWindow || NS_UNLIKELY(mIsDestroyed)) |
1024 |
return; |
1025 |
|
1026 |
// Dispatch NS_THEMECHANGED to all child windows |
1027 |
GList *children = |
1028 |
- gdk_window_peek_children(mDrawingarea->inner_window); |
1029 |
+ gdk_window_peek_children(mGdkWindow); |
1030 |
while (children) { |
1031 |
GdkWindow *gdkWin = GDK_WINDOW(children->data); |
1032 |
|
1033 |
@@ -3823,6 +3815,38 @@ GetBrandName(nsXPIDLString& brandName) |
1034 |
brandName.Assign(NS_LITERAL_STRING("Mozilla")); |
1035 |
} |
1036 |
|
1037 |
+static GdkWindow * |
1038 |
+CreateGdkWindow(GdkWindow *parent, GtkWidget *widget) |
1039 |
+{ |
1040 |
+ GdkWindowAttr attributes; |
1041 |
+ gint attributes_mask = GDK_WA_VISUAL | GDK_WA_COLORMAP; |
1042 |
+ |
1043 |
+ attributes.event_mask = (GDK_EXPOSURE_MASK | GDK_STRUCTURE_MASK | |
1044 |
+ GDK_VISIBILITY_NOTIFY_MASK | |
1045 |
+ GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | |
1046 |
+ GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | |
1047 |
+#ifdef HAVE_GTK_MOTION_HINTS |
1048 |
+ GDK_POINTER_MOTION_HINT_MASK | |
1049 |
+#endif |
1050 |
+ GDK_POINTER_MOTION_MASK); |
1051 |
+ |
1052 |
+ attributes.width = 1; |
1053 |
+ attributes.height = 1; |
1054 |
+ attributes.wclass = GDK_INPUT_OUTPUT; |
1055 |
+ attributes.visual = gtk_widget_get_visual(widget); |
1056 |
+ attributes.colormap = gtk_widget_get_colormap(widget); |
1057 |
+ attributes.window_type = GDK_WINDOW_CHILD; |
1058 |
+ |
1059 |
+ GdkWindow *window = gdk_window_new(parent, &attributes, attributes_mask); |
1060 |
+ gdk_window_set_user_data(window, widget); |
1061 |
+ |
1062 |
+ /* set the default pixmap to None so that you don't end up with the |
1063 |
+ gtk default which is BlackPixel. */ |
1064 |
+ gdk_window_set_back_pixmap(window, NULL, FALSE); |
1065 |
+ |
1066 |
+ return window; |
1067 |
+} |
1068 |
+ |
1069 |
nsresult |
1070 |
nsWindow::NativeCreate(nsIWidget *aParent, |
1071 |
nsNativeWidget aNativeParent, |
1072 |
@@ -3866,8 +3890,7 @@ nsWindow::NativeCreate(nsIWidget *aParent, |
1073 |
} |
1074 |
|
1075 |
// figure out our parent window |
1076 |
- MozDrawingarea *parentArea = nsnull; |
1077 |
- MozContainer *parentMozContainer = nsnull; |
1078 |
+ GtkWidget *parentMozContainer = nsnull; |
1079 |
GtkContainer *parentGtkContainer = nsnull; |
1080 |
GdkWindow *parentGdkWindow = nsnull; |
1081 |
GtkWindow *topLevelParent = nsnull; |
1082 |
@@ -3880,28 +3903,10 @@ nsWindow::NativeCreate(nsIWidget *aParent, |
1083 |
parentGtkContainer = GTK_CONTAINER(aNativeParent); |
1084 |
|
1085 |
if (parentGdkWindow) { |
1086 |
- // find the mozarea on that window |
1087 |
- gpointer user_data = nsnull; |
1088 |
- user_data = g_object_get_data(G_OBJECT(parentGdkWindow), |
1089 |
- "mozdrawingarea"); |
1090 |
- parentArea = MOZ_DRAWINGAREA(user_data); |
1091 |
- |
1092 |
- NS_ASSERTION(parentArea, "no drawingarea for parent widget!\n"); |
1093 |
- if (!parentArea) |
1094 |
- return NS_ERROR_FAILURE; |
1095 |
- |
1096 |
- // get the user data for the widget - it should be a container |
1097 |
- user_data = nsnull; |
1098 |
- gdk_window_get_user_data(parentArea->inner_window, &user_data); |
1099 |
- NS_ASSERTION(user_data, "no user data for parentArea\n"); |
1100 |
- if (!user_data) |
1101 |
- return NS_ERROR_FAILURE; |
1102 |
+ // get the widget for the window - it should be a moz container |
1103 |
+ parentMozContainer = get_gtk_widget_for_gdk_window(parentGdkWindow); |
1104 |
|
1105 |
- // Get the parent moz container |
1106 |
- parentMozContainer = MOZ_CONTAINER(user_data); |
1107 |
- NS_ASSERTION(parentMozContainer, |
1108 |
- "owning widget is not a mozcontainer!\n"); |
1109 |
- if (!parentMozContainer) |
1110 |
+ if (!IS_MOZ_CONTAINER(parentMozContainer)) |
1111 |
return NS_ERROR_FAILURE; |
1112 |
|
1113 |
// get the toplevel window just in case someone needs to use it |
1114 |
@@ -3910,8 +3915,6 @@ nsWindow::NativeCreate(nsIWidget *aParent, |
1115 |
GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(parentMozContainer))); |
1116 |
} |
1117 |
|
1118 |
- GdkVisual* visual = nsnull; |
1119 |
- |
1120 |
// ok, create our windows |
1121 |
switch (mWindowType) { |
1122 |
case eWindowType_dialog: |
1123 |
@@ -3939,11 +3942,11 @@ nsWindow::NativeCreate(nsIWidget *aParent, |
1124 |
GdkWindow* dialoglead = mShell->window; |
1125 |
gdk_window_set_group(dialoglead, dialoglead); |
1126 |
} |
1127 |
- if (parentArea) { |
1128 |
+ if (parentGdkWindow) { |
1129 |
nsWindow *parentnsWindow = |
1130 |
- get_window_for_gdk_window(parentArea->inner_window); |
1131 |
+ get_window_for_gdk_window(parentGdkWindow); |
1132 |
NS_ASSERTION(parentnsWindow, |
1133 |
- "no nsWindow for parentArea!"); |
1134 |
+ "no nsWindow for parentGdkWindow!"); |
1135 |
if (parentnsWindow && parentnsWindow->mWindowGroup) { |
1136 |
gtk_window_group_add_window(parentnsWindow->mWindowGroup, |
1137 |
GTK_WINDOW(mShell)); |
1138 |
@@ -4009,15 +4012,16 @@ nsWindow::NativeCreate(nsIWidget *aParent, |
1139 |
} |
1140 |
|
1141 |
// create our container |
1142 |
- mContainer = MOZ_CONTAINER(moz_container_new()); |
1143 |
- gtk_container_add(GTK_CONTAINER(mShell), GTK_WIDGET(mContainer)); |
1144 |
- gtk_widget_realize(GTK_WIDGET(mContainer)); |
1145 |
+ GtkWidget *container = moz_container_new(); |
1146 |
+ mContainer = MOZ_CONTAINER(container); |
1147 |
+ gtk_container_add(GTK_CONTAINER(mShell), container); |
1148 |
+ gtk_widget_realize(container); |
1149 |
|
1150 |
// make sure this is the focus widget in the container |
1151 |
- gtk_window_set_focus(GTK_WINDOW(mShell), GTK_WIDGET(mContainer)); |
1152 |
+ gtk_window_set_focus(GTK_WINDOW(mShell), container); |
1153 |
|
1154 |
// and the drawing area |
1155 |
- mDrawingarea = moz_drawingarea_new(nsnull, mContainer, visual); |
1156 |
+ mGdkWindow = container->window; |
1157 |
|
1158 |
if (mWindowType == eWindowType_popup) { |
1159 |
// gdk does not automatically set the cursor for "temporary" |
1160 |
@@ -4033,14 +4037,15 @@ nsWindow::NativeCreate(nsIWidget *aParent, |
1161 |
break; |
1162 |
case eWindowType_child: { |
1163 |
if (parentMozContainer) { |
1164 |
- mDrawingarea = moz_drawingarea_new(parentArea, parentMozContainer, visual); |
1165 |
+ mGdkWindow = CreateGdkWindow(parentGdkWindow, parentMozContainer); |
1166 |
} |
1167 |
else if (parentGtkContainer) { |
1168 |
- mContainer = MOZ_CONTAINER(moz_container_new()); |
1169 |
- gtk_container_add(parentGtkContainer, GTK_WIDGET(mContainer)); |
1170 |
- gtk_widget_realize(GTK_WIDGET(mContainer)); |
1171 |
+ GtkWidget *container = moz_container_new(); |
1172 |
+ mContainer = MOZ_CONTAINER(container); |
1173 |
+ gtk_container_add(parentGtkContainer, container); |
1174 |
+ gtk_widget_realize(container); |
1175 |
|
1176 |
- mDrawingarea = moz_drawingarea_new(nsnull, mContainer, visual); |
1177 |
+ mGdkWindow = container->window; |
1178 |
} |
1179 |
else { |
1180 |
NS_WARNING("Warning: tried to create a new child widget with no parent!"); |
1181 |
@@ -4061,17 +4066,8 @@ nsWindow::NativeCreate(nsIWidget *aParent, |
1182 |
gtk_widget_set_double_buffered (GTK_WIDGET(mContainer),FALSE); |
1183 |
#endif |
1184 |
|
1185 |
- // label the drawing area with this object so we can find our way |
1186 |
- // home |
1187 |
- g_object_set_data(G_OBJECT(mDrawingarea->clip_window), "nsWindow", |
1188 |
- this); |
1189 |
- g_object_set_data(G_OBJECT(mDrawingarea->inner_window), "nsWindow", |
1190 |
- this); |
1191 |
- |
1192 |
- g_object_set_data(G_OBJECT(mDrawingarea->clip_window), "mozdrawingarea", |
1193 |
- mDrawingarea); |
1194 |
- g_object_set_data(G_OBJECT(mDrawingarea->inner_window), "mozdrawingarea", |
1195 |
- mDrawingarea); |
1196 |
+ // label the drawing window with this object so we can find our way home |
1197 |
+ g_object_set_data(G_OBJECT(mGdkWindow), "nsWindow", this); |
1198 |
|
1199 |
if (mContainer) |
1200 |
g_object_set_data(G_OBJECT(mContainer), "nsWindow", this); |
1201 |
@@ -4161,13 +4157,9 @@ nsWindow::NativeCreate(nsIWidget *aParent, |
1202 |
(void *)GTK_WIDGET(mContainer)->window, |
1203 |
GDK_WINDOW_XWINDOW(GTK_WIDGET(mContainer)->window))); |
1204 |
} |
1205 |
- |
1206 |
- if (mDrawingarea) { |
1207 |
- LOG(("\tmDrawingarea %p %p %p %lx %lx\n", (void *)mDrawingarea, |
1208 |
- (void *)mDrawingarea->clip_window, |
1209 |
- (void *)mDrawingarea->inner_window, |
1210 |
- GDK_WINDOW_XWINDOW(mDrawingarea->clip_window), |
1211 |
- GDK_WINDOW_XWINDOW(mDrawingarea->inner_window))); |
1212 |
+ else if (mGdkWindow) { |
1213 |
+ LOG(("\tmGdkWindow %p %lx\n", (void *)mGdkWindow, |
1214 |
+ GDK_WINDOW_XWINDOW(mGdkWindow))); |
1215 |
} |
1216 |
|
1217 |
// resize so that everything is set to the right dimensions |
1218 |
@@ -4325,16 +4317,16 @@ nsWindow::NativeResize(PRInt32 aWidth, PRInt32 aHeight, PRBool aRepaint) |
1219 |
gtk_window_resize(GTK_WINDOW(mShell), aWidth, aHeight); |
1220 |
} |
1221 |
else if (mContainer) { |
1222 |
+ GtkWidget *widget = GTK_WIDGET(mContainer); |
1223 |
GtkAllocation allocation; |
1224 |
- allocation.x = 0; |
1225 |
- allocation.y = 0; |
1226 |
+ allocation.x = widget->allocation.x; |
1227 |
+ allocation.y = widget->allocation.y; |
1228 |
allocation.width = aWidth; |
1229 |
allocation.height = aHeight; |
1230 |
- gtk_widget_size_allocate(GTK_WIDGET(mContainer), &allocation); |
1231 |
+ gtk_widget_size_allocate(widget, &allocation); |
1232 |
} |
1233 |
- |
1234 |
- if (mDrawingarea) { |
1235 |
- moz_drawingarea_resize (mDrawingarea, aWidth, aHeight); |
1236 |
+ else if (mGdkWindow) { |
1237 |
+ gdk_window_resize(mGdkWindow, aWidth, aHeight); |
1238 |
} |
1239 |
} |
1240 |
|
1241 |
@@ -4360,19 +4352,18 @@ nsWindow::NativeResize(PRInt32 aX, PRInt32 aY, |
1242 |
gtk_window_move(GTK_WINDOW(mShell), aX, aY); |
1243 |
|
1244 |
gtk_window_resize(GTK_WINDOW(mShell), aWidth, aHeight); |
1245 |
- moz_drawingarea_resize(mDrawingarea, aWidth, aHeight); |
1246 |
+ gdk_window_resize(mGdkWindow, aWidth, aHeight); |
1247 |
} |
1248 |
else if (mContainer) { |
1249 |
GtkAllocation allocation; |
1250 |
- allocation.x = 0; |
1251 |
- allocation.y = 0; |
1252 |
+ allocation.x = aX; |
1253 |
+ allocation.y = aY; |
1254 |
allocation.width = aWidth; |
1255 |
allocation.height = aHeight; |
1256 |
gtk_widget_size_allocate(GTK_WIDGET(mContainer), &allocation); |
1257 |
- moz_drawingarea_move_resize(mDrawingarea, aX, aY, aWidth, aHeight); |
1258 |
} |
1259 |
- else if (mDrawingarea) { |
1260 |
- moz_drawingarea_move_resize(mDrawingarea, aX, aY, aWidth, aHeight); |
1261 |
+ else if (mGdkWindow) { |
1262 |
+ gdk_window_move_resize(mGdkWindow, aX, aY, aWidth, aHeight); |
1263 |
} |
1264 |
} |
1265 |
|
1266 |
@@ -4401,16 +4392,14 @@ nsWindow::NativeShow (PRBool aAction) |
1267 |
SetUserTimeAndStartupIDForActivatedWindow(mShell); |
1268 |
} |
1269 |
|
1270 |
- moz_drawingarea_set_visibility(mDrawingarea, aAction); |
1271 |
gtk_widget_show(GTK_WIDGET(mContainer)); |
1272 |
gtk_widget_show(mShell); |
1273 |
} |
1274 |
else if (mContainer) { |
1275 |
- moz_drawingarea_set_visibility(mDrawingarea, TRUE); |
1276 |
gtk_widget_show(GTK_WIDGET(mContainer)); |
1277 |
} |
1278 |
- else if (mDrawingarea) { |
1279 |
- moz_drawingarea_set_visibility(mDrawingarea, TRUE); |
1280 |
+ else if (mGdkWindow) { |
1281 |
+ gdk_window_show_unraised(mGdkWindow); |
1282 |
} |
1283 |
} |
1284 |
else { |
1285 |
@@ -4420,10 +4409,9 @@ nsWindow::NativeShow (PRBool aAction) |
1286 |
} |
1287 |
else if (mContainer) { |
1288 |
gtk_widget_hide(GTK_WIDGET(mContainer)); |
1289 |
- moz_drawingarea_set_visibility(mDrawingarea, FALSE); |
1290 |
} |
1291 |
- if (mDrawingarea) { |
1292 |
- moz_drawingarea_set_visibility(mDrawingarea, FALSE); |
1293 |
+ else if (mGdkWindow) { |
1294 |
+ gdk_window_hide(mGdkWindow); |
1295 |
} |
1296 |
} |
1297 |
} |
1298 |
@@ -4684,11 +4672,11 @@ nsWindow::GrabPointer(void) |
1299 |
return; |
1300 |
} |
1301 |
|
1302 |
- if (!mDrawingarea) |
1303 |
+ if (!mGdkWindow) |
1304 |
return; |
1305 |
|
1306 |
gint retval; |
1307 |
- retval = gdk_pointer_grab(mDrawingarea->inner_window, TRUE, |
1308 |
+ retval = gdk_pointer_grab(mGdkWindow, TRUE, |
1309 |
(GdkEventMask)(GDK_BUTTON_PRESS_MASK | |
1310 |
GDK_BUTTON_RELEASE_MASK | |
1311 |
GDK_ENTER_NOTIFY_MASK | |
1312 |
@@ -4730,8 +4718,8 @@ nsWindow::GrabKeyboard(void) |
1313 |
|
1314 |
if (mTransientParent) |
1315 |
grabWindow = GTK_WIDGET(mTransientParent)->window; |
1316 |
- else if (mDrawingarea) |
1317 |
- grabWindow = mDrawingarea->inner_window; |
1318 |
+ else if (mGdkWindow) |
1319 |
+ grabWindow = mGdkWindow; |
1320 |
else |
1321 |
return; |
1322 |
|
1323 |
@@ -4777,11 +4765,11 @@ nsWindow::GetToplevelWidget(GtkWidget **aWidget) |
1324 |
GtkWidget * |
1325 |
nsWindow::GetMozContainerWidget() |
1326 |
{ |
1327 |
- if (!mDrawingarea) |
1328 |
+ if (!mGdkWindow) |
1329 |
return NULL; |
1330 |
|
1331 |
GtkWidget *owningWidget = |
1332 |
- get_gtk_widget_for_gdk_window(mDrawingarea->inner_window); |
1333 |
+ get_gtk_widget_for_gdk_window(mGdkWindow); |
1334 |
return owningWidget; |
1335 |
} |
1336 |
|
1337 |
@@ -4821,10 +4809,10 @@ nsWindow::SetUrgencyHint(GtkWidget *top_window, PRBool state) |
1338 |
void * |
1339 |
nsWindow::SetupPluginPort(void) |
1340 |
{ |
1341 |
- if (!mDrawingarea) |
1342 |
+ if (!mGdkWindow) |
1343 |
return nsnull; |
1344 |
|
1345 |
- if (GDK_WINDOW_OBJECT(mDrawingarea->inner_window)->destroyed == TRUE) |
1346 |
+ if (GDK_WINDOW_OBJECT(mGdkWindow)->destroyed == TRUE) |
1347 |
return nsnull; |
1348 |
|
1349 |
// we have to flush the X queue here so that any plugins that |
1350 |
@@ -4832,22 +4820,19 @@ nsWindow::SetupPluginPort(void) |
1351 |
// this window in case it was just created |
1352 |
#ifdef MOZ_X11 |
1353 |
XWindowAttributes xattrs; |
1354 |
- XGetWindowAttributes(GDK_DISPLAY (), |
1355 |
- GDK_WINDOW_XWINDOW(mDrawingarea->inner_window), |
1356 |
+ XGetWindowAttributes(GDK_DISPLAY(), GDK_WINDOW_XWINDOW(mGdkWindow), |
1357 |
&xattrs); |
1358 |
XSelectInput (GDK_DISPLAY (), |
1359 |
- GDK_WINDOW_XWINDOW(mDrawingarea->inner_window), |
1360 |
+ GDK_WINDOW_XWINDOW(mGdkWindow), |
1361 |
xattrs.your_event_mask | |
1362 |
SubstructureNotifyMask); |
1363 |
|
1364 |
- gdk_window_add_filter(mDrawingarea->inner_window, |
1365 |
- plugin_window_filter_func, |
1366 |
- this); |
1367 |
+ gdk_window_add_filter(mGdkWindow, plugin_window_filter_func, this); |
1368 |
|
1369 |
XSync(GDK_DISPLAY(), False); |
1370 |
#endif /* MOZ_X11 */ |
1371 |
|
1372 |
- return (void *)GDK_WINDOW_XWINDOW(mDrawingarea->inner_window); |
1373 |
+ return (void *)GDK_WINDOW_XWINDOW(mGdkWindow); |
1374 |
} |
1375 |
|
1376 |
nsresult |
1377 |
@@ -4907,14 +4892,13 @@ nsWindow::SetNonXEmbedPluginFocus() |
1378 |
Window curFocusWindow; |
1379 |
int focusState; |
1380 |
|
1381 |
- XGetInputFocus(GDK_WINDOW_XDISPLAY(mDrawingarea->inner_window), |
1382 |
+ XGetInputFocus(GDK_WINDOW_XDISPLAY(mGdkWindow), |
1383 |
&curFocusWindow, |
1384 |
&focusState); |
1385 |
|
1386 |
LOGFOCUS(("\t curFocusWindow=%p\n", curFocusWindow)); |
1387 |
|
1388 |
- GdkWindow* toplevel = gdk_window_get_toplevel |
1389 |
- (mDrawingarea->inner_window); |
1390 |
+ GdkWindow* toplevel = gdk_window_get_toplevel(mGdkWindow); |
1391 |
GdkWindow *gdkfocuswin = gdk_window_lookup(curFocusWindow); |
1392 |
|
1393 |
// lookup with the focus proxy window is supposed to get the |
1394 |
@@ -4926,11 +4910,11 @@ nsWindow::SetNonXEmbedPluginFocus() |
1395 |
|
1396 |
// switch the focus from the focus proxy to the plugin window |
1397 |
mOldFocusWindow = curFocusWindow; |
1398 |
- XRaiseWindow(GDK_WINDOW_XDISPLAY(mDrawingarea->inner_window), |
1399 |
- GDK_WINDOW_XWINDOW(mDrawingarea->inner_window)); |
1400 |
+ XRaiseWindow(GDK_WINDOW_XDISPLAY(mGdkWindow), |
1401 |
+ GDK_WINDOW_XWINDOW(mGdkWindow)); |
1402 |
gdk_error_trap_push(); |
1403 |
- XSetInputFocus(GDK_WINDOW_XDISPLAY(mDrawingarea->inner_window), |
1404 |
- GDK_WINDOW_XWINDOW(mDrawingarea->inner_window), |
1405 |
+ XSetInputFocus(GDK_WINDOW_XDISPLAY(mGdkWindow), |
1406 |
+ GDK_WINDOW_XWINDOW(mGdkWindow), |
1407 |
RevertToNone, |
1408 |
CurrentTime); |
1409 |
gdk_flush(); |
1410 |
@@ -4939,8 +4923,7 @@ nsWindow::SetNonXEmbedPluginFocus() |
1411 |
gdk_window_add_filter(NULL, plugin_client_message_filter, this); |
1412 |
|
1413 |
LOGFOCUS(("nsWindow::SetNonXEmbedPluginFocus oldfocus=%p new=%p\n", |
1414 |
- mOldFocusWindow, |
1415 |
- GDK_WINDOW_XWINDOW(mDrawingarea->inner_window))); |
1416 |
+ mOldFocusWindow, GDK_WINDOW_XWINDOW(mGdkWindow))); |
1417 |
} |
1418 |
|
1419 |
void |
1420 |
@@ -4957,7 +4940,7 @@ nsWindow::LoseNonXEmbedPluginFocus() |
1421 |
Window curFocusWindow; |
1422 |
int focusState; |
1423 |
|
1424 |
- XGetInputFocus(GDK_WINDOW_XDISPLAY(mDrawingarea->inner_window), |
1425 |
+ XGetInputFocus(GDK_WINDOW_XDISPLAY(mGdkWindow), |
1426 |
&curFocusWindow, |
1427 |
&focusState); |
1428 |
|
1429 |
@@ -4966,12 +4949,12 @@ nsWindow::LoseNonXEmbedPluginFocus() |
1430 |
// event filter that blocks the WM_TAKE_FOCUS is enough. WM and gtk2 |
1431 |
// will take care of the focus later. |
1432 |
if (!curFocusWindow || |
1433 |
- curFocusWindow == GDK_WINDOW_XWINDOW(mDrawingarea->inner_window)) { |
1434 |
+ curFocusWindow == GDK_WINDOW_XWINDOW(mGdkWindow)) { |
1435 |
|
1436 |
gdk_error_trap_push(); |
1437 |
- XRaiseWindow(GDK_WINDOW_XDISPLAY(mDrawingarea->inner_window), |
1438 |
+ XRaiseWindow(GDK_WINDOW_XDISPLAY(mGdkWindow), |
1439 |
mOldFocusWindow); |
1440 |
- XSetInputFocus(GDK_WINDOW_XDISPLAY(mDrawingarea->inner_window), |
1441 |
+ XSetInputFocus(GDK_WINDOW_XDISPLAY(mGdkWindow), |
1442 |
mOldFocusWindow, |
1443 |
RevertToParent, |
1444 |
CurrentTime); |
1445 |
@@ -6655,13 +6638,11 @@ nsWindow::IMESetCursorPosition(const nsTextEventReply& aReply) |
1446 |
|
1447 |
// Get the position of the refWindow in screen. |
1448 |
gint refX, refY; |
1449 |
- gdk_window_get_origin(refWindow->mDrawingarea->inner_window, |
1450 |
- &refX, &refY); |
1451 |
+ gdk_window_get_origin(refWindow->mGdkWindow, &refX, &refY); |
1452 |
|
1453 |
// Get the position of IM context owner window in screen. |
1454 |
gint ownerX, ownerY; |
1455 |
- gdk_window_get_origin(ownerWindow->mDrawingarea->inner_window, |
1456 |
- &ownerX, &ownerY); |
1457 |
+ gdk_window_get_origin(ownerWindow->mGdkWindow, &ownerX, &ownerY); |
1458 |
|
1459 |
// Compute the caret position in the IM owner window. |
1460 |
GdkRectangle area; |
1461 |
@@ -6807,7 +6788,7 @@ nsWindow::GetToggledKeyState(PRUint32 aKeyCode, PRBool* aLEDState) |
1462 |
GdkModifierType modifiers = gdk_keyboard_get_modifiers(); |
1463 |
PRUint32 capsLockMask, numLockMask, scrollLockMask; |
1464 |
PRBool foundMasks = gdk_keyboard_get_modmap_masks( |
1465 |
- GDK_WINDOW_XDISPLAY(mDrawingarea->inner_window), |
1466 |
+ GDK_WINDOW_XDISPLAY(mGdkWindow), |
1467 |
&capsLockMask, &numLockMask, &scrollLockMask); |
1468 |
if (!foundMasks) |
1469 |
return NS_ERROR_NOT_IMPLEMENTED; |
1470 |
@@ -7138,10 +7119,12 @@ nsWindow::GetSurfaceForGdkDrawable(GdkDrawable* aDrawable, |
1471 |
gfxASurface* |
1472 |
nsWindow::GetThebesSurface() |
1473 |
{ |
1474 |
+ if (!mGdkWindow) |
1475 |
+ return nsnull; |
1476 |
+ |
1477 |
GdkDrawable* d; |
1478 |
gint x_offset, y_offset; |
1479 |
- gdk_window_get_internal_paint_info(mDrawingarea->inner_window, |
1480 |
- &d, &x_offset, &y_offset); |
1481 |
+ gdk_window_get_internal_paint_info(mGdkWindow, &d, &x_offset, &y_offset); |
1482 |
|
1483 |
#ifdef MOZ_X11 |
1484 |
gint width, height; |
1485 |
@@ -7217,7 +7200,7 @@ nsWindow::BeginResizeDrag(nsGUIEvent* aEvent, PRInt32 aHorizontal, PRInt32 aVert |
1486 |
} |
1487 |
|
1488 |
// get the gdk window for this widget |
1489 |
- GdkWindow* gdk_window = mDrawingarea->inner_window; |
1490 |
+ GdkWindow* gdk_window = mGdkWindow; |
1491 |
if (!GDK_IS_WINDOW(gdk_window)) { |
1492 |
return NS_ERROR_FAILURE; |
1493 |
} |
1494 |
--- mozilla/widget/src/gtk2/nsWindow.h |
1495 |
+++ mozilla/widget/src/gtk2/nsWindow.h |
1496 |
@@ -43,7 +43,6 @@ |
1497 |
#include "nsAutoPtr.h" |
1498 |
|
1499 |
#include "mozcontainer.h" |
1500 |
-#include "mozdrawingarea.h" |
1501 |
#include "nsWeakReference.h" |
1502 |
|
1503 |
#include "nsIDragService.h" |
1504 |
@@ -480,6 +479,7 @@ protected: |
1505 |
PRUint32 mPreferredHeight; |
1506 |
|
1507 |
private: |
1508 |
+ void DestroyChildWindows(); |
1509 |
void GetToplevelWidget(GtkWidget **aWidget); |
1510 |
GtkWidget *GetMozContainerWidget(); |
1511 |
nsWindow *GetContainerWindow(); |
1512 |
@@ -492,7 +492,7 @@ private: |
1513 |
|
1514 |
GtkWidget *mShell; |
1515 |
MozContainer *mContainer; |
1516 |
- MozDrawingarea *mDrawingarea; |
1517 |
+ GdkWindow *mGdkWindow; |
1518 |
|
1519 |
GtkWindowGroup *mWindowGroup; |
1520 |
|
1521 |
|
1522 |
|
1523 |
|
1524 |
1.1 src/patchsets/seamonkey/2.0.11/1003-sparc-build.patch |
1525 |
|
1526 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/seamonkey/2.0.11/1003-sparc-build.patch?rev=1.1&view=markup |
1527 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/seamonkey/2.0.11/1003-sparc-build.patch?rev=1.1&content-type=text/plain |
1528 |
|
1529 |
Index: 1003-sparc-build.patch |
1530 |
=================================================================== |
1531 |
--- mozilla/js/src/nanojit/Assembler.cpp |
1532 |
+++ mozilla/js/src/nanojit/Assembler.cpp |
1533 |
@@ -50,8 +50,20 @@ |
1534 |
#endif |
1535 |
|
1536 |
#ifdef AVMPLUS_SPARC |
1537 |
+#ifdef __linux__ // bugzilla 502369 |
1538 |
+void sync_instruction_memory(caddr_t v, u_int len) |
1539 |
+{ |
1540 |
+ caddr_t end = v + len; |
1541 |
+ caddr_t p = v; |
1542 |
+ while (p < end) { |
1543 |
+ asm("flush %0" : : "r" (p)); |
1544 |
+ p += 32; |
1545 |
+ } |
1546 |
+} |
1547 |
+#else |
1548 |
extern "C" void sync_instruction_memory(caddr_t v, u_int len); |
1549 |
#endif |
1550 |
+#endif |
1551 |
|
1552 |
namespace nanojit |
1553 |
{ |
1554 |
|
1555 |
|
1556 |
|
1557 |
1.1 src/patchsets/seamonkey/2.0.11/1004-arm-xul191.patch |
1558 |
|
1559 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/seamonkey/2.0.11/1004-arm-xul191.patch?rev=1.1&view=markup |
1560 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/seamonkey/2.0.11/1004-arm-xul191.patch?rev=1.1&content-type=text/plain |
1561 |
|
1562 |
Index: 1004-arm-xul191.patch |
1563 |
=================================================================== |
1564 |
--- comm-1.9.1/configure.in |
1565 |
+++ comm-1.9.1/configure.in |
1566 |
@@ -1487,6 +1487,9 @@ |
1567 |
x86_64 | ia64) |
1568 |
CPU_ARCH="$OS_TEST" |
1569 |
;; |
1570 |
+arm*) |
1571 |
+ CPU_ARCH="arm" |
1572 |
+ ;; |
1573 |
esac |
1574 |
|
1575 |
if test -z "$OS_TARGET"; then |
1576 |
--- comm-1.9.1/mozilla/js/src/configure.in |
1577 |
+++ comm-1.9.1/mozilla/js/src/configure.in |
1578 |
@@ -1221,6 +1221,9 @@ |
1579 |
x86_64 | ia64) |
1580 |
CPU_ARCH="$OS_TEST" |
1581 |
;; |
1582 |
+arm*) |
1583 |
+ CPU_ARCH="arm" |
1584 |
+ ;; |
1585 |
esac |
1586 |
|
1587 |
if test -z "$OS_TARGET"; then |
1588 |
|
1589 |
|
1590 |
1.1 src/patchsets/seamonkey/2.0.11/1005-fix_disable_printing-v1.2.patch |
1591 |
|
1592 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/seamonkey/2.0.11/1005-fix_disable_printing-v1.2.patch?rev=1.1&view=markup |
1593 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/seamonkey/2.0.11/1005-fix_disable_printing-v1.2.patch?rev=1.1&content-type=text/plain |
1594 |
|
1595 |
Index: 1005-fix_disable_printing-v1.2.patch |
1596 |
=================================================================== |
1597 |
--- comm-1.9.1/mailnews/base/build/nsMsgFactory.cpp |
1598 |
+++ comm-1.9.1/mailnews/base/build/nsMsgFactory.cpp |
1599 |
@@ -110,7 +110,9 @@ |
1600 |
#include "nsSubscribeDataSource.h" |
1601 |
#include "nsSubscribableServer.h" |
1602 |
|
1603 |
+#ifdef NS_PRINTING |
1604 |
#include "nsMsgPrintEngine.h" |
1605 |
+#endif |
1606 |
#include "nsMsgSearchSession.h" |
1607 |
#include "nsMsgSearchTerm.h" |
1608 |
#include "nsMsgSearchAdapter.h" |
1609 |
@@ -178,7 +180,9 @@ |
1610 |
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMsgServiceProviderService, Init) |
1611 |
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSubscribeDataSource, Init) |
1612 |
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSubscribableServer, Init) |
1613 |
+#ifdef NS_PRINTING |
1614 |
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgPrintEngine) |
1615 |
+#endif |
1616 |
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFolderCompactState) |
1617 |
NS_GENERIC_FACTORY_CONSTRUCTOR(nsOfflineStoreCompactState) |
1618 |
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgThreadedDBView) |
1619 |
@@ -376,10 +380,12 @@ |
1620 |
NS_MSGWINDOW_CONTRACTID, |
1621 |
nsMsgWindowConstructor, |
1622 |
}, |
1623 |
+#ifdef NS_PRINTING |
1624 |
{ "Mail/News Print Engine", NS_MSG_PRINTENGINE_CID, |
1625 |
NS_MSGPRINTENGINE_CONTRACTID, |
1626 |
nsMsgPrintEngineConstructor, |
1627 |
}, |
1628 |
+#endif |
1629 |
{ "Mail/News Service Provider Service", NS_MSGSERVICEPROVIDERSERVICE_CID, |
1630 |
NS_MSGSERVICEPROVIDERSERVICE_CONTRACTID, |
1631 |
nsMsgServiceProviderServiceConstructor, |
1632 |
--- comm-1.9.1/mailnews/base/src/Makefile.in |
1633 |
+++ comm-1.9.1/mailnews/base/src/Makefile.in |
1634 |
@@ -115,7 +115,6 @@ |
1635 |
nsMsgServiceProvider.cpp \ |
1636 |
nsSubscribeDataSource.cpp \ |
1637 |
nsSubscribableServer.cpp \ |
1638 |
- nsMsgPrintEngine.cpp \ |
1639 |
nsStatusBarBiffManager.cpp \ |
1640 |
nsMsgDBView.cpp \ |
1641 |
nsMsgThreadedDBView.cpp \ |
1642 |
@@ -137,6 +136,12 @@ |
1643 |
nsMailDirProvider.cpp\ |
1644 |
$(NULL) |
1645 |
|
1646 |
+ifdef NS_PRINTING |
1647 |
+CPPSRCS += \ |
1648 |
+ nsMsgPrintEngine.cpp \ |
1649 |
+ $(NULL) |
1650 |
+endif |
1651 |
+ |
1652 |
ifneq (,$(filter cocoa mac, $(MOZ_WIDGET_TOOLKIT))) |
1653 |
CMMSRCS = nsMessengerOSXIntegration.mm |
1654 |
endif |
1655 |
--- comm-1.9.1/mailnews/base/src/nsMessenger.cpp |
1656 |
+++ comm-1.9.1/mailnews/base/src/nsMessenger.cpp |
1657 |
@@ -79,7 +79,10 @@ |
1658 |
#include "nsIContentViewer.h" |
1659 |
|
1660 |
// embedding |
1661 |
+#ifdef NS_PRINTING |
1662 |
#include "nsIWebBrowserPrint.h" |
1663 |
+#include "nsMsgPrintEngine.h" |
1664 |
+#endif |
1665 |
|
1666 |
/* for access to docshell */ |
1667 |
#include "nsPIDOMWindow.h" |
1668 |
@@ -124,9 +127,6 @@ |
1669 |
#include "nsMsgMimeCID.h" |
1670 |
#include "nsIMimeConverter.h" |
1671 |
|
1672 |
-// Printing |
1673 |
-#include "nsMsgPrintEngine.h" |
1674 |
- |
1675 |
// Save As |
1676 |
#include "nsIFilePicker.h" |
1677 |
#include "nsIStringBundle.h" |
1678 |
--- comm-1.9.1/mailnews/build/nsMailModule.cpp |
1679 |
+++ comm-1.9.1/mailnews/build/nsMailModule.cpp |
1680 |
@@ -109,7 +109,9 @@ |
1681 |
#include "nsMsgServiceProvider.h" |
1682 |
#include "nsSubscribeDataSource.h" |
1683 |
#include "nsSubscribableServer.h" |
1684 |
+#ifdef NS_PRINTING |
1685 |
#include "nsMsgPrintEngine.h" |
1686 |
+#endif |
1687 |
#include "nsMsgSearchSession.h" |
1688 |
#include "nsMsgSearchTerm.h" |
1689 |
#include "nsMsgSearchAdapter.h" |
1690 |
@@ -351,7 +353,9 @@ |
1691 |
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMsgServiceProviderService, Init) |
1692 |
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSubscribeDataSource, Init) |
1693 |
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSubscribableServer, Init) |
1694 |
+#ifdef NS_PRINTING |
1695 |
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgPrintEngine) |
1696 |
+#endif |
1697 |
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFolderCompactState) |
1698 |
NS_GENERIC_FACTORY_CONSTRUCTOR(nsOfflineStoreCompactState) |
1699 |
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgThreadedDBView) |
1700 |
@@ -805,10 +809,12 @@ |
1701 |
NS_MSGWINDOW_CONTRACTID, |
1702 |
nsMsgWindowConstructor, |
1703 |
}, |
1704 |
+#ifdef NS_PRINTING |
1705 |
{ "Mail/News Print Engine", NS_MSG_PRINTENGINE_CID, |
1706 |
NS_MSGPRINTENGINE_CONTRACTID, |
1707 |
nsMsgPrintEngineConstructor, |
1708 |
}, |
1709 |
+#endif |
1710 |
{ "Mail/News Service Provider Service", NS_MSGSERVICEPROVIDERSERVICE_CID, |
1711 |
NS_MSGSERVICEPROVIDERSERVICE_CONTRACTID, |
1712 |
nsMsgServiceProviderServiceConstructor, |
1713 |
|
1714 |
|
1715 |
|
1716 |
1.1 src/patchsets/seamonkey/2.0.11/1006-seamonkey-2.0-gtk+-2.21.patch |
1717 |
|
1718 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/seamonkey/2.0.11/1006-seamonkey-2.0-gtk+-2.21.patch?rev=1.1&view=markup |
1719 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/seamonkey/2.0.11/1006-seamonkey-2.0-gtk+-2.21.patch?rev=1.1&content-type=text/plain |
1720 |
|
1721 |
Index: 1006-seamonkey-2.0-gtk+-2.21.patch |
1722 |
=================================================================== |
1723 |
--- mozilla/toolkit/system/gnome/Makefile.in |
1724 |
+++ mozilla/toolkit/system/gnome/Makefile.in |
1725 |
@@ -72,6 +72,7 @@ |
1726 |
include $(topsrcdir)/config/rules.mk |
1727 |
|
1728 |
CXXFLAGS += \ |
1729 |
+ $(MOZ_GTK2_CFLAGS) \ |
1730 |
$(MOZ_GCONF_CFLAGS) \ |
1731 |
$(MOZ_GNOMEVFS_CFLAGS) \ |
1732 |
$(MOZ_LIBGNOME_CFLAGS) \ |
1733 |
|
1734 |
|
1735 |
|
1736 |
1.1 src/patchsets/seamonkey/2.0.11/1007-seamonkey-respect-ldflags.patch |
1737 |
|
1738 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/seamonkey/2.0.11/1007-seamonkey-respect-ldflags.patch?rev=1.1&view=markup |
1739 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/seamonkey/2.0.11/1007-seamonkey-respect-ldflags.patch?rev=1.1&content-type=text/plain |
1740 |
|
1741 |
Index: 1007-seamonkey-respect-ldflags.patch |
1742 |
=================================================================== |
1743 |
--- a/directory/c-sdk/build.mk |
1744 |
+++ b/directory/c-sdk/build.mk |
1745 |
@@ -488,21 +488,21 @@ |
1746 |
LINK_LIB2 = $(RM) $@; $(AR) $@ $(OBJS2); $(RANLIB) $@ |
1747 |
ifneq ($(LD),$(CC)) |
1748 |
ifdef SONAMEFLAG_PREFIX |
1749 |
-LINK_DLL = $(LD) $(DSO_LDOPTS) $(LDRPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) \ |
1750 |
+LINK_DLL = $(LD) $(DSO_LDOPTS) $(LDRPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) $(OS_LDFLAGS)\ |
1751 |
$(DLL_LDFLAGS) $(DLL_EXPORT_FLAGS) \ |
1752 |
-o $@ $(SONAMEFLAG_PREFIX)$(notdir $@) $(OBJS) |
1753 |
else # SONAMEFLAG_PREFIX |
1754 |
-LINK_DLL = $(LD) $(DSO_LDOPTS) $(LDRPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) \ |
1755 |
+LINK_DLL = $(LD) $(DSO_LDOPTS) $(LDRPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) $(OS_LDFLAGS)\ |
1756 |
$(DLL_LDFLAGS) $(DLL_EXPORT_FLAGS) \ |
1757 |
-o $@ $(OBJS) |
1758 |
endif # SONAMEFLAG_PREFIX |
1759 |
else # $(CC) is used to link libs |
1760 |
ifdef SONAMEFLAG_PREFIX |
1761 |
-LINK_DLL = $(LD) $(DSO_LDOPTS) $(RPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) \ |
1762 |
+LINK_DLL = $(LD) $(DSO_LDOPTS) $(RPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) $(OS_LDFLAGS)\ |
1763 |
$(DLL_LDFLAGS) $(DLL_EXPORT_FLAGS) \ |
1764 |
-o $@ $(SONAMEFLAG_PREFIX)$(notdir $@) $(OBJS) |
1765 |
else # SONAMEFLAG_PREFIX |
1766 |
-LINK_DLL = $(LD) $(DSO_LDOPTS) $(RPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) \ |
1767 |
+LINK_DLL = $(LD) $(DSO_LDOPTS) $(RPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) $(OS_LDFLAGS)\ |
1768 |
$(DLL_LDFLAGS) $(DLL_EXPORT_FLAGS) \ |
1769 |
-o $@ $(OBJS) |
1770 |
endif # SONAMEFLAG_PREFIX |
1771 |
|
1772 |
|
1773 |
|
1774 |
1.1 src/patchsets/seamonkey/2.0.11/1008-seamonkey-cups-1.4.4-fixup.patch |
1775 |
|
1776 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/seamonkey/2.0.11/1008-seamonkey-cups-1.4.4-fixup.patch?rev=1.1&view=markup |
1777 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/seamonkey/2.0.11/1008-seamonkey-cups-1.4.4-fixup.patch?rev=1.1&content-type=text/plain |
1778 |
|
1779 |
Index: 1008-seamonkey-cups-1.4.4-fixup.patch |
1780 |
=================================================================== |
1781 |
# HG changeset patch |
1782 |
# Parent 0dfacbde17b4d297b632f806ddc5e274f853b5a5 |
1783 |
|
1784 |
--- a/mozilla/gfx/src/psshared/nsCUPSShim.cpp |
1785 |
+++ b/mozilla/gfx/src/psshared/nsCUPSShim.cpp |
1786 |
@@ -83,14 +83,8 @@ nsCUPSShim::Init() |
1787 |
#endif |
1788 |
PR_UnloadLibrary(mCupsLib); |
1789 |
mCupsLib = nsnull; |
1790 |
return PR_FALSE; |
1791 |
} |
1792 |
} |
1793 |
return PR_TRUE; |
1794 |
} |
1795 |
- |
1796 |
-nsCUPSShim::~nsCUPSShim() |
1797 |
-{ |
1798 |
- if (mCupsLib) |
1799 |
- PR_UnloadLibrary(mCupsLib); |
1800 |
-} |
1801 |
--- a/mozilla/gfx/src/psshared/nsCUPSShim.h |
1802 |
+++ b/mozilla/gfx/src/psshared/nsCUPSShim.h |
1803 |
@@ -81,17 +81,16 @@ typedef int (PR_CALLBACK *CupsAddOptionT |
1804 |
int num_options, |
1805 |
cups_option_t **options); |
1806 |
|
1807 |
struct PRLibrary; |
1808 |
|
1809 |
class NS_PSSHARED nsCUPSShim { |
1810 |
public: |
1811 |
nsCUPSShim() : mCupsLib(nsnull) { } |
1812 |
- ~nsCUPSShim(); |
1813 |
|
1814 |
/** |
1815 |
* Initialize this object. Attempt to load the CUPS shared |
1816 |
* library and find function pointers for the supported |
1817 |
* functions (see below). |
1818 |
* @return PR_FALSE if the shared library could not be loaded, or if |
1819 |
* any of the functions could not be found. |
1820 |
* PR_TRUE for successful initialization. |
1821 |
--- a/mozilla/gfx/src/psshared/nsPSPrinters.cpp |
1822 |
+++ b/mozilla/gfx/src/psshared/nsPSPrinters.cpp |
1823 |
@@ -51,32 +51,34 @@ |
1824 |
#include "plstr.h" |
1825 |
|
1826 |
#define NS_CUPS_PRINTER "CUPS/" |
1827 |
#define NS_CUPS_PRINTER_LEN (sizeof(NS_CUPS_PRINTER) - 1) |
1828 |
|
1829 |
/* dummy printer name for the gfx/src/ps driver */ |
1830 |
#define NS_POSTSCRIPT_DRIVER_NAME "PostScript/" |
1831 |
|
1832 |
+nsCUPSShim gCupsShim; |
1833 |
+ |
1834 |
/* Initialize the printer manager object */ |
1835 |
nsresult |
1836 |
nsPSPrinterList::Init() |
1837 |
{ |
1838 |
nsresult rv; |
1839 |
|
1840 |
mPrefSvc = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv); |
1841 |
if (NS_SUCCEEDED(rv)) |
1842 |
rv = mPrefSvc->GetBranch("print.", getter_AddRefs(mPref)); |
1843 |
NS_ENSURE_SUCCESS(rv, NS_ERROR_NOT_INITIALIZED); |
1844 |
|
1845 |
// Should we try cups? |
1846 |
PRBool useCups = PR_TRUE; |
1847 |
rv = mPref->GetBoolPref("postscript.cups.enabled", &useCups); |
1848 |
- if (useCups) |
1849 |
- mCups.Init(); |
1850 |
+ if (useCups && !gCupsShim.IsInitialized()) |
1851 |
+ gCupsShim.Init(); |
1852 |
return NS_OK; |
1853 |
} |
1854 |
|
1855 |
|
1856 |
/* Check whether the PostScript module has been disabled at runtime */ |
1857 |
PRBool |
1858 |
nsPSPrinterList::Enabled() |
1859 |
{ |
1860 |
@@ -94,35 +96,35 @@ nsPSPrinterList::Enabled() |
1861 |
/* Fetch a list of printers handled by the PostsScript module */ |
1862 |
void |
1863 |
nsPSPrinterList::GetPrinterList(nsCStringArray& aList) |
1864 |
{ |
1865 |
aList.Clear(); |
1866 |
|
1867 |
// Query CUPS for a printer list. The default printer goes to the |
1868 |
// head of the output list; others are appended. |
1869 |
- if (mCups.IsInitialized()) { |
1870 |
+ if (gCupsShim.IsInitialized()) { |
1871 |
cups_dest_t *dests; |
1872 |
|
1873 |
- int num_dests = (mCups.mCupsGetDests)(&dests); |
1874 |
+ int num_dests = (gCupsShim.mCupsGetDests)(&dests); |
1875 |
if (num_dests) { |
1876 |
for (int i = 0; i < num_dests; i++) { |
1877 |
nsCAutoString fullName(NS_CUPS_PRINTER); |
1878 |
fullName.Append(dests[i].name); |
1879 |
if (dests[i].instance != NULL) { |
1880 |
fullName.Append("/"); |
1881 |
fullName.Append(dests[i].instance); |
1882 |
} |
1883 |
if (dests[i].is_default) |
1884 |
aList.InsertCStringAt(fullName, 0); |
1885 |
else |
1886 |
aList.AppendCString(fullName); |
1887 |
} |
1888 |
} |
1889 |
- (mCups.mCupsFreeDests)(num_dests, dests); |
1890 |
+ (gCupsShim.mCupsFreeDests)(num_dests, dests); |
1891 |
} |
1892 |
|
1893 |
// Build the "classic" list of printers -- those accessed by running |
1894 |
// an opaque command. This list always contains a printer named "default". |
1895 |
// In addition, we look for either an environment variable |
1896 |
// MOZILLA_POSTSCRIPT_PRINTER_LIST or a preference setting |
1897 |
// print.printer_list, which contains a space-separated list of printer |
1898 |
// names. |
1899 |
--- a/mozilla/gfx/src/psshared/nsPSPrinters.h |
1900 |
+++ b/mozilla/gfx/src/psshared/nsPSPrinters.h |
1901 |
@@ -37,17 +37,16 @@ |
1902 |
* ***** END LICENSE BLOCK ***** */ |
1903 |
|
1904 |
#ifndef nsPSPrinters_h___ |
1905 |
#define nsPSPrinters_h___ |
1906 |
|
1907 |
#include "nsString.h" |
1908 |
#include "nsVoidArray.h" |
1909 |
#include "prtypes.h" |
1910 |
-#include "nsCUPSShim.h" |
1911 |
#include "psSharedCore.h" |
1912 |
|
1913 |
class nsIPrefService; |
1914 |
class nsIPrefBranch; |
1915 |
class nsCUPSShim; |
1916 |
|
1917 |
class NS_PSSHARED nsPSPrinterList { |
1918 |
public: |
1919 |
@@ -91,12 +90,11 @@ class NS_PSSHARED nsPSPrinterList { |
1920 |
* the <type> portion as described for GetPrinterList(). |
1921 |
* @return The PrinterType value for this name. |
1922 |
*/ |
1923 |
static PrinterType GetPrinterType(const nsACString& aName); |
1924 |
|
1925 |
private: |
1926 |
nsCOMPtr<nsIPrefService> mPrefSvc; |
1927 |
nsCOMPtr<nsIPrefBranch> mPref; |
1928 |
- nsCUPSShim mCups; |
1929 |
}; |
1930 |
|
1931 |
#endif /* nsPSPrinters_h___ */ |
1932 |
|
1933 |
|
1934 |
|
1935 |
1.1 src/patchsets/seamonkey/2.0.11/2000-seamonkey_gentoo_install_dirs.patch |
1936 |
|
1937 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/seamonkey/2.0.11/2000-seamonkey_gentoo_install_dirs.patch?rev=1.1&view=markup |
1938 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/seamonkey/2.0.11/2000-seamonkey_gentoo_install_dirs.patch?rev=1.1&content-type=text/plain |
1939 |
|
1940 |
Index: 2000-seamonkey_gentoo_install_dirs.patch |
1941 |
=================================================================== |
1942 |
--- work/config/autoconf.mk.in |
1943 |
+++ work/config/autoconf.mk.in |
1944 |
@@ -60,14 +60,14 @@ |
1945 |
prefix = @prefix@ |
1946 |
exec_prefix = @exec_prefix@ |
1947 |
bindir = @bindir@ |
1948 |
-includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) |
1949 |
+includedir = @includedir@/$(MOZ_APP_NAME) |
1950 |
libdir = @libdir@ |
1951 |
datadir = @datadir@ |
1952 |
mandir = @mandir@ |
1953 |
-idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) |
1954 |
+idldir = $(datadir)/idl/$(MOZ_APP_NAME) |
1955 |
|
1956 |
-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) |
1957 |
-sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) |
1958 |
+installdir = $(libdir)/$(MOZ_APP_NAME) |
1959 |
+sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel |
1960 |
|
1961 |
MOZDEPTH = $(DEPTH)/mozilla |
1962 |
DIST = $(MOZDEPTH)/dist |
1963 |
|
1964 |
|
1965 |
|
1966 |
1.1 src/patchsets/seamonkey/2.0.11/2001-fix-system-hunspell-dict-detections.patch |
1967 |
|
1968 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/seamonkey/2.0.11/2001-fix-system-hunspell-dict-detections.patch?rev=1.1&view=markup |
1969 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/seamonkey/2.0.11/2001-fix-system-hunspell-dict-detections.patch?rev=1.1&content-type=text/plain |
1970 |
|
1971 |
Index: 2001-fix-system-hunspell-dict-detections.patch |
1972 |
=================================================================== |
1973 |
--- a/mozilla/extensions/spellcheck/Makefile.in |
1974 |
+++ b/mozilla/extensions/spellcheck/Makefile.in |
1975 |
@@ -42,13 +42,19 @@ |
1976 |
include $(DEPTH)/config/autoconf.mk |
1977 |
|
1978 |
MODULE = spellchecker |
1979 |
+ifndef MOZ_NATIVE_HUNSPELL |
1980 |
DIRS = idl locales |
1981 |
+else |
1982 |
+DIRS = idl |
1983 |
+endif |
1984 |
|
1985 |
ifeq (camino,$(MOZ_BUILD_APP)) |
1986 |
DIRS += osxspell |
1987 |
else |
1988 |
+ifndef MOZ_NATIVE_HUNSPELL |
1989 |
DIRS += hunspell |
1990 |
endif |
1991 |
+endif |
1992 |
|
1993 |
DIRS += src |
1994 |
|
1995 |
--- a/mozilla/extensions/spellcheck/hunspell/src/mozHunspell.cpp |
1996 |
+++ b/mozilla/extensions/spellcheck/hunspell/src/mozHunspell.cpp |
1997 |
@@ -63,6 +63,9 @@ |
1998 |
#include "nsISimpleEnumerator.h" |
1999 |
#include "nsIDirectoryEnumerator.h" |
2000 |
#include "nsIFile.h" |
2001 |
+#ifdef MOZ_NATIVE_HUNSPELL |
2002 |
+#include "nsILocalFile.h" |
2003 |
+#endif |
2004 |
#include "nsDirectoryServiceUtils.h" |
2005 |
#include "nsDirectoryServiceDefs.h" |
2006 |
#include "mozISpellI18NManager.h" |
2007 |
@@ -307,7 +310,16 @@ |
2008 |
return; |
2009 |
|
2010 |
nsCOMPtr<nsIFile> dictDir; |
2011 |
- rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY, |
2012 |
+ #ifdef MOZ_NATIVE_HUNSPELL |
2013 |
+ nsCOMPtr<nsILocalFile> localFile; |
2014 |
+ rv = NS_NewNativeLocalFile(nsDependentCString("/usr/share/myspell"),PR_TRUE, getter_AddRefs(localFile)); |
2015 |
+ if (localFile && NS_SUCCEEDED(rv)) { |
2016 |
+ localFile->QueryInterface(NS_GET_IID(nsIFile), getter_AddRefs(dictDir)); |
2017 |
+ LoadDictionariesFromDir(dictDir); |
2018 |
+ } |
2019 |
+ else { |
2020 |
+ #endif |
2021 |
+ rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY, |
2022 |
NS_GET_IID(nsIFile), getter_AddRefs(dictDir)); |
2023 |
if (NS_SUCCEEDED(rv)) { |
2024 |
LoadDictionariesFromDir(dictDir); |
2025 |
@@ -332,6 +344,9 @@ |
2026 |
LoadDictionariesFromDir(appDir); |
2027 |
} |
2028 |
} |
2029 |
+#ifdef MOZ_NATIVE_HUNSPELL |
2030 |
+ } |
2031 |
+#endif |
2032 |
|
2033 |
nsCOMPtr<nsISimpleEnumerator> dictDirs; |
2034 |
rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY_LIST, |
2035 |
--- a/mozilla/extensions/spellcheck/src/Makefile.in |
2036 |
+++ b/mozilla/extensions/spellcheck/src/Makefile.in |
2037 |
@@ -63,9 +63,15 @@ |
2038 |
txtsvc \ |
2039 |
uconv \ |
2040 |
unicharutil \ |
2041 |
+ xulapp \ |
2042 |
$(NULL) |
2043 |
|
2044 |
-CPPSRCS = \ |
2045 |
+ifdef MOZ_NATIVE_HUNSPELL |
2046 |
+CPPSRCS += mozHunspell.cpp \ |
2047 |
+ mozHunspellDirProvider.cpp |
2048 |
+endif |
2049 |
+ |
2050 |
+CPPSRCS += \ |
2051 |
mozSpellCheckerFactory.cpp \ |
2052 |
mozSpellChecker.cpp \ |
2053 |
mozPersonalDictionary.cpp \ |
2054 |
@@ -80,8 +86,15 @@ |
2055 |
SHARED_LIBRARY_LIBS += ../osxspell/src/$(LIB_PREFIX)osxspell_s.$(LIB_SUFFIX) |
2056 |
LOCAL_INCLUDES += -I$(srcdir)/../osxspell/src |
2057 |
else |
2058 |
+ifndef MOZ_NATIVE_HUNSPELL |
2059 |
SHARED_LIBRARY_LIBS += ../hunspell/src/$(LIB_PREFIX)hunspell_s.$(LIB_SUFFIX) |
2060 |
LOCAL_INCLUDES += -I$(srcdir)/../hunspell/src |
2061 |
+else |
2062 |
+LOCAL_INCLUDES += $(MOZ_HUNSPELL_CFLAGS) \ |
2063 |
+ -I$(srcdir)/../hunspell/src \ |
2064 |
+ -DMOZ_NATIVE_HUNSPELL \ |
2065 |
+ $(NULL) |
2066 |
+endif |
2067 |
endif |
2068 |
|
2069 |
EXTRA_DSO_LDOPTS = \ |
2070 |
@@ -96,3 +109,11 @@ |
2071 |
LOCAL_INCLUDES += \ |
2072 |
-I$(topsrcdir)/xpcom/io \ |
2073 |
$(NULL) |
2074 |
+ |
2075 |
+ifdef MOZ_NATIVE_HUNSPELL |
2076 |
+export:: $(srcdir)/../hunspell/src/mozHunspell.cpp $(srcdir)/../hunspell/src/mozHunspellDirProvider.cpp |
2077 |
+ $(INSTALL) $(srcdir)/../hunspell/src/mozHunspell.* $(srcdir)/../hunspell/src/mozHunspellDirProvider.* . |
2078 |
+GARBAGE += mozHunspell.$(OBJ_SUFFIX) mozHunspell.cpp mozHunspellDirProvider.$(OBJ_SUFFIX) mozHunspellDirProvider.cpp |
2079 |
+clean:: |
2080 |
+ rm -f mozHunspell.* mozHunspellDirProvider.* |
2081 |
+endif |
2082 |
|
2083 |
|
2084 |
|
2085 |
1.1 src/patchsets/seamonkey/2.0.11/3000-dont-reset-user-prefs-on-upgrade.patch |
2086 |
|
2087 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/seamonkey/2.0.11/3000-dont-reset-user-prefs-on-upgrade.patch?rev=1.1&view=markup |
2088 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/seamonkey/2.0.11/3000-dont-reset-user-prefs-on-upgrade.patch?rev=1.1&content-type=text/plain |
2089 |
|
2090 |
Index: 3000-dont-reset-user-prefs-on-upgrade.patch |
2091 |
=================================================================== |
2092 |
|
2093 |
This bug is due to the fact, applications are restarted before extension |
2094 |
defaults are loaded. |
2095 |
|
2096 |
To reproduce, choose any preference and set the values like: |
2097 |
system default: |
2098 |
pref("prefkey",systemvalue); |
2099 |
extension default: |
2100 |
pref("prefkey", extensiondefault); |
2101 |
user pref: |
2102 |
user_pref("prefkey", systemvalue); |
2103 |
|
2104 |
Next, trigger application behaviour similar to upgrade by removing compreg.dat |
2105 |
from profile and start the application. |
2106 |
|
2107 |
Result: |
2108 |
User sees extensiondefault after upgrade, because the user_pref has been |
2109 |
eliminated ... which is definitly not what the user expects because he explicitly |
2110 |
had *systemvalue* set before the upgrade. |
2111 |
|
2112 |
Evaluation: |
2113 |
The bug happens because restart is performed *before* extension defaults have been |
2114 |
loaded and the prefapi.cpp always eliminate user preference if the user preference |
2115 |
is equal to the actual default (which happens to be extensiondefault normally - so |
2116 |
no reset, but is systemvalue during restart). |
2117 |
|
2118 |
Fix: |
2119 |
1. savePrefs should not try to be smart ... this patch removes the heuristic that guesses |
2120 |
whether a setting can be eliminated or not; it should be sufficient to only eliminate |
2121 |
prefs in hashPrefs. |
2122 |
|
2123 |
2. This patch prevents hashPrefs from eliminating the user pref in case we are in |
2124 |
*startup* ... unfortunately no such state info exists, which lets us guess that |
2125 |
we are in startup for the previously not dealt case: !set_default && |
2126 |
!pref_ValueChanged(pref->defaultPref, value, type) && !PREF_HAS_USER_VALUE(pref). |
2127 |
|
2128 |
If is the case we explicitly remember that this setting is a user-pref ... |
2129 |
even though it might be temporarily equal to the default pref. |
2130 |
|
2131 |
--- |
2132 |
modules/libpref/src/prefapi.cpp | 20 ++++++++++++++------ |
2133 |
1 file changed, 14 insertions(+), 6 deletions(-) |
2134 |
|
2135 |
Index: mozilla/modules/libpref/src/prefapi.cpp |
2136 |
=================================================================== |
2137 |
--- mozilla/modules/libpref/src/prefapi.cpp |
2138 |
+++ mozilla/modules/libpref/src/prefapi.cpp |
2139 |
@@ -324,23 +324,20 @@ |
2140 |
if (!pref) |
2141 |
return PL_DHASH_NEXT; |
2142 |
|
2143 |
nsCAutoString prefValue; |
2144 |
|
2145 |
// where we're getting our pref from |
2146 |
PrefValue* sourcePref; |
2147 |
|
2148 |
- if (PREF_HAS_USER_VALUE(pref) && |
2149 |
- pref_ValueChanged(pref->defaultPref, |
2150 |
- pref->userPref, |
2151 |
- (PrefType) PREF_TYPE(pref))) |
2152 |
- sourcePref = &pref->userPref; |
2153 |
- else if (PREF_IS_LOCKED(pref)) |
2154 |
+ if (PREF_IS_LOCKED(pref)) |
2155 |
sourcePref = &pref->defaultPref; |
2156 |
+ else if (PREF_HAS_USER_VALUE(pref)) |
2157 |
+ sourcePref = &pref->userPref; |
2158 |
else |
2159 |
// do not save default prefs that haven't changed |
2160 |
return PL_DHASH_NEXT; |
2161 |
|
2162 |
// strings are in quotes! |
2163 |
if (pref->flags & PREF_STRING) { |
2164 |
prefValue = '\"'; |
2165 |
str_escape(sourcePref->stringVal, prefValue); |
2166 |
@@ -742,16 +739,27 @@ |
2167 |
Otherwise, set the user value only if it has changed */ |
2168 |
if ( !pref_ValueChanged(pref->defaultPref, value, type) ) |
2169 |
{ |
2170 |
if (PREF_HAS_USER_VALUE(pref)) |
2171 |
{ |
2172 |
pref->flags &= ~PREF_USERSET; |
2173 |
if (!PREF_IS_LOCKED(pref)) |
2174 |
valueChanged = PR_TRUE; |
2175 |
+ } else { |
2176 |
+ // this is tricky: we have !set_default ... |
2177 |
+ // thus we are setting a user pref; however the user |
2178 |
+ // pref set is same as *current default*; this normally |
2179 |
+ // means to un-set ... however since we have |
2180 |
+ // !PREF_HAS_USER_VALUE(pref) this can only be during |
2181 |
+ // startup |
2182 |
+ pref_SetValue(&pref->userPref, value, type); |
2183 |
+ pref->flags |= PREF_USERSET; |
2184 |
+ if (!PREF_IS_LOCKED(pref)) |
2185 |
+ valueChanged = PR_TRUE; |
2186 |
} |
2187 |
} |
2188 |
else if ( !PREF_HAS_USER_VALUE(pref) || |
2189 |
pref_ValueChanged(pref->userPref, value, type) ) |
2190 |
{ |
2191 |
pref_SetValue(&pref->userPref, value, type); |
2192 |
pref->flags |= PREF_USERSET; |
2193 |
if (!PREF_IS_LOCKED(pref)) |
2194 |
|
2195 |
|
2196 |
|
2197 |
1.1 src/patchsets/seamonkey/2.0.11/README |
2198 |
|
2199 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/seamonkey/2.0.11/README?rev=1.1&view=markup |
2200 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/seamonkey/2.0.11/README?rev=1.1&content-type=text/plain |
2201 |
|
2202 |
Index: README |
2203 |
=================================================================== |
2204 |
1000 - upstream patches |
2205 |
2000 - gentoo specific patches |
2206 |
2010 - prefix specific patches |
2207 |
3000 - other distro patches |