Gentoo Archives: gentoo-commits

From: "Raul Porcel (armin76)" <armin76@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/mozilla-firefox/2.0.0.8: 0009_firefox-gdkpango.patch 000_flex-configure-LANG.patch 001_firefox-arm.patch 002_firefox-libdeps.patch 003_firefox-bus-error.patch 004_mozilla-hppa.patch 005_mozilla-firefox-1.5-ia64.patch 006_mips-asm.patch 007_mozilla-firefox-1.5-asneeded.patch 008_firefox-pkgconfig-1.patch 032_firefox-2.0_ppc64-1.patch 033_firefox-2.0_ppc_powerpc.patch 050_respect-host-variable.patch 055_firefox-2.0_gfbsd-pthreads.patch 060_embed-typeaheadfind-1.patch 063_firefox-rpath-3.patch 064_firefox-nsplugins-v2.patch 401_firefox-1.5-theme-change.patch 402_firefox-2.0-pango-cursor.patch 803_fbsd-3.patch
Date: Sun, 21 Oct 2007 11:47:22
Message-Id: E1IjZ6f-0006tY-40@stork.gentoo.org
1 armin76 07/10/21 11:36:33
2
3 Added: 0009_firefox-gdkpango.patch
4 000_flex-configure-LANG.patch 001_firefox-arm.patch
5 002_firefox-libdeps.patch
6 003_firefox-bus-error.patch 004_mozilla-hppa.patch
7 005_mozilla-firefox-1.5-ia64.patch
8 006_mips-asm.patch
9 007_mozilla-firefox-1.5-asneeded.patch
10 008_firefox-pkgconfig-1.patch
11 032_firefox-2.0_ppc64-1.patch
12 033_firefox-2.0_ppc_powerpc.patch
13 050_respect-host-variable.patch
14 055_firefox-2.0_gfbsd-pthreads.patch
15 060_embed-typeaheadfind-1.patch
16 063_firefox-rpath-3.patch
17 064_firefox-nsplugins-v2.patch
18 401_firefox-1.5-theme-change.patch
19 402_firefox-2.0-pango-cursor.patch 803_fbsd-3.patch
20 Log:
21 Add patches for 2.0.0.8
22
23 Revision Changes Path
24 1.1 src/patchsets/mozilla-firefox/2.0.0.8/0009_firefox-gdkpango.patch
25
26 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/0009_firefox-gdkpango.patch?rev=1.1&view=markup
27 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/0009_firefox-gdkpango.patch?rev=1.1&content-type=text/plain
28
29 Index: 0009_firefox-gdkpango.patch
30 ===================================================================
31 --- config/system-headers.orig 2007-10-19 21:38:00.000000000 +0200
32 +++ config/system-headers 2007-10-19 21:38:41.000000000 +0200
33 @@ -208,6 +208,7 @@
34 gdk/gdkevents.h
35 gdk/gdk.h
36 gdk/gdkkeysyms.h
37 +gdk/gdkpango.h
38 gdk/gdkprivate.h
39 gdk/gdkregion.h
40 gdk/gdkwindow.h
41
42
43
44 1.1 src/patchsets/mozilla-firefox/2.0.0.8/000_flex-configure-LANG.patch
45
46 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/000_flex-configure-LANG.patch?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/000_flex-configure-LANG.patch?rev=1.1&content-type=text/plain
48
49 Index: 000_flex-configure-LANG.patch
50 ===================================================================
51 The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in
52 option parsing, it may break.
53
54 http://bugs.gentoo.org/103483
55
56 --- configure
57 +++ configure
58 @@ -54,6 +54,16 @@
59 infodir='${prefix}/info'
60 mandir='${prefix}/man'
61
62 +# NLS nuisances.
63 +# Only set these to C if already set. These must not be set unconditionally
64 +# because not all systems understand e.g. LANG=C (notably SCO).
65 +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
66 +# Non-C LC_CTYPE values break the ctype check.
67 +if test "${LANG+set}" = set; then LANG=C; export LANG; fi
68 +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
69 +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
70 +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
71 +
72 # Initialize some other variables.
73 subdirs=
74 MFLAGS= MAKEFLAGS=
75 @@ -452,16 +463,6 @@
76 esac
77 done
78
79 -# NLS nuisances.
80 -# Only set these to C if already set. These must not be set unconditionally
81 -# because not all systems understand e.g. LANG=C (notably SCO).
82 -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
83 -# Non-C LC_CTYPE values break the ctype check.
84 -if test "${LANG+set}" = set; then LANG=C; export LANG; fi
85 -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
86 -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
87 -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
88 -
89 # confdefs.h avoids OS command line length limits that DEFS can exceed.
90 rm -rf conftest* confdefs.h
91 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
92
93
94
95 1.1 src/patchsets/mozilla-firefox/2.0.0.8/001_firefox-arm.patch
96
97 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/001_firefox-arm.patch?rev=1.1&view=markup
98 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/001_firefox-arm.patch?rev=1.1&content-type=text/plain
99
100 Index: 001_firefox-arm.patch
101 ===================================================================
102 # Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=336183
103
104 --- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp 2006-05-17 02:02:51.000000000 -0400
105 +++ mozilla-16052006/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp 2006-05-17 01:17:16.000000000 -0400
106 @@ -39,18 +39,31 @@
107 /* Implement shared vtbl methods. */
108
109 #include "xptcprivate.h"
110
111 #if !defined(LINUX) || !defined(__arm__)
112 #error "This code is for Linux ARM only. Please check if it works for you, too.\nDepends strongly on gcc behaviour."
113 #endif
114
115 +#if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))
116 +/* This tells gcc3.4+ not to optimize away symbols.
117 + * @see http://gcc.gnu.org/gcc-3.4/changes.html
118 + */
119 +#define DONT_DROP_OR_WARN __attribute__((used))
120 +#else
121 +/* This tells older gccs not to warn about unused vairables.
122 + * @see http://docs.freebsd.org/info/gcc/gcc.info.Variable_Attributes.html
123 + */
124 +#define DONT_DROP_OR_WARN __attribute__((unused))
125 +#endif
126 +
127 /* Specify explicitly a symbol for this function, don't try to guess the c++ mangled symbol. */
128 -static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) asm("_PrepareAndDispatch");
129 +static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) asm("_PrepareAndDispatch")
130 +DONT_DROP_OR_WARN;
131
132 static nsresult
133 PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args)
134 {
135 #define PARAM_BUFFER_COUNT 16
136
137 nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
138 nsXPTCMiniVariant* dispatchParams = NULL;
139
140
141
142 1.1 src/patchsets/mozilla-firefox/2.0.0.8/002_firefox-libdeps.patch
143
144 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/002_firefox-libdeps.patch?rev=1.1&view=markup
145 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/002_firefox-libdeps.patch?rev=1.1&content-type=text/plain
146
147 Index: 002_firefox-libdeps.patch
148 ===================================================================
149 # Linking issue with pango
150 #
151 # https://bugzilla.mozilla.org/show_bug.cgi?id=344821
152
153 --- mozilla/layout/build/Makefile.in.orig 2006-07-16 00:24:51.000000000 +1000
154 +++ mozilla/layout/build/Makefile.in 2006-07-16 00:35:51.000000000 +1000
155 @@ -213,6 +213,12 @@
156 $(NULL)
157 endif
158
159 +ifdef MOZ_ENABLE_CANVAS
160 +ifdef MOZ_ENABLE_XFT
161 +EXTRA_DSO_LDOPTS += $(MOZ_XFT_LIBS)
162 +endif
163 +endif
164 +
165 ifdef NS_TRACE_MALLOC
166 EXTRA_DSO_LIBS += tracemalloc
167 endif
168
169
170
171 1.1 src/patchsets/mozilla-firefox/2.0.0.8/003_firefox-bus-error.patch
172
173 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/003_firefox-bus-error.patch?rev=1.1&view=markup
174 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/003_firefox-bus-error.patch?rev=1.1&content-type=text/plain
175
176 Index: 003_firefox-bus-error.patch
177 ===================================================================
178 diff -aur a/gfx/src/gtk/nsFontMetricsPango.cpp b/gfx/src/gtk/nsFontMetricsPango.cpp
179 --- a/gfx/src/gtk/nsFontMetricsPango.cpp 2006-02-23 13:01:42.000000000 -0800
180 +++ b/gfx/src/gtk/nsFontMetricsPango.cpp 2006-05-20 20:27:50.000000000 -0700
181 @@ -535,8 +535,13 @@
182
183 PangoLayout *layout = pango_layout_new(mPangoContext);
184
185 - gchar *text = g_utf16_to_utf8(aString, aLength,
186 + // Just copy the aString to ensure the alignment,
187 + // it is not used anywhere else.
188 + PRUnichar* dummy = new PRUnichar[aLength];
189 + memcpy(dummy, aString, aLength*sizeof(PRUnichar));
190 + gchar *text = g_utf16_to_utf8(dummy, aLength,
191 NULL, NULL, NULL);
192 + delete [] dummy;
193
194 if (!text) {
195 #ifdef DEBUG
196 diff -aur a/intl/lwbrk/src/nsJISx4501LineBreaker.cpp b/intl/lwbrk/src/nsJISx4501LineBreaker.cpp
197 --- a/intl/lwbrk/src/nsJISx4501LineBreaker.cpp 2004-04-18 07:21:07.000000000 -0700
198 +++ b/intl/lwbrk/src/nsJISx4501LineBreaker.cpp 2006-05-20 20:27:51.000000000 -0700
199 @@ -487,13 +487,13 @@
200 PRUint32 cur;
201 for (cur = aPos; cur < aLen; ++cur)
202 {
203 - if (IS_SPACE(aText[cur]))
204 + if (IS_SPACE(GetUnichar(&aText[cur])))
205 {
206 *oNext = cur;
207 *oNeedMoreText = PR_FALSE;
208 return NS_OK;
209 }
210 - if (IS_CJK_CHAR(aText[cur]))
211 + if (IS_CJK_CHAR(GetUnichar(&aText[cur])))
212 goto ROUTE_CJK_NEXT;
213 }
214 *oNext = aLen;
215 @@ -503,13 +503,13 @@
216 ROUTE_CJK_NEXT:
217 PRInt8 c1, c2;
218 cur = aPos;
219 - if(NEED_CONTEXTUAL_ANALYSIS(aText[cur]))
220 + if(NEED_CONTEXTUAL_ANALYSIS(GetUnichar(&aText[cur])))
221 {
222 - c1 = this->ContextualAnalysis((cur>0)?aText[cur-1]:0,
223 - aText[cur],
224 - (cur<(aLen-1)) ?aText[cur+1]:0);
225 + c1 = this->ContextualAnalysis((cur>0)?GetUnichar(&aText[cur-1]):0,
226 + GetUnichar(&aText[cur]),
227 + (cur<(aLen-1)) ?GetUnichar(&aText[cur+1]):0);
228 } else {
229 - c1 = this->GetClass(aText[cur]);
230 + c1 = this->GetClass(GetUnichar(&aText[cur]));
231 }
232
233 if(CLASS_THAI == c1)
234 @@ -521,13 +521,13 @@
235
236 for(cur++; cur <aLen; cur++)
237 {
238 - if(NEED_CONTEXTUAL_ANALYSIS(aText[cur]))
239 + if(NEED_CONTEXTUAL_ANALYSIS(GetUnichar(&aText[cur])))
240 {
241 - c2= this->ContextualAnalysis((cur>0)?aText[cur-1]:0,
242 - aText[cur],
243 - (cur<(aLen-1)) ?aText[cur+1]:0);
244 + c2= this->ContextualAnalysis((cur>0)?GetUnichar(&aText[cur-1]):0,
245 + GetUnichar(&aText[cur]),
246 + (cur<(aLen-1)) ?GetUnichar(&aText[cur+1]):0);
247 } else {
248 - c2 = this->GetClass(aText[cur]);
249 + c2 = this->GetClass(GetUnichar(&aText[cur]));
250 }
251
252 if(GetPair(c1, c2)) {
253 diff -aur a/intl/unicharutil/util/nsUnicharUtils.cpp b/intl/unicharutil/util/nsUnicharUtils.cpp
254 --- a/intl/unicharutil/util/nsUnicharUtils.cpp 2005-04-21 15:30:21.000000000 -0700
255 +++ b/intl/unicharutil/util/nsUnicharUtils.cpp 2006-05-20 20:27:50.000000000 -0700
256 @@ -340,3 +340,28 @@
257 return result;
258 }
259
260 +PRUnichar
261 +GetUnichar(const void *ptr)
262 +{
263 + PRUnichar result;
264 +#if defined(__sparc__) || defined(__alpha__)
265 + *((char *) &result) = *((char *) ptr);
266 + *((char *) &result + 1) = *((char *) ptr + 1);
267 +#else
268 + result = *((PRUnichar *) ptr);
269 +#endif
270 + return result;
271 +}
272 +
273 +void
274 +SetUnichar(void *ptr, PRUnichar aChar)
275 +{
276 +#if defined(__sparc__) || defined(__alpha__)
277 + *((char *) ptr) = *((char *) &aChar);
278 + *((char *) ptr + 1) = *((char *) &aChar + 1);
279 +#else
280 + *((PRUnichar *) ptr) = aChar;
281 +#endif
282 +}
283 +
284 +
285 diff -aur a/intl/unicharutil/util/nsUnicharUtils.h b/intl/unicharutil/util/nsUnicharUtils.h
286 --- a/intl/unicharutil/util/nsUnicharUtils.h 2005-02-24 07:50:57.000000000 -0800
287 +++ b/intl/unicharutil/util/nsUnicharUtils.h 2006-05-20 20:27:50.000000000 -0700
288 @@ -81,6 +81,8 @@
289
290 PRUnichar ToUpperCase(PRUnichar);
291 PRUnichar ToLowerCase(PRUnichar);
292 +PRUnichar GetUnichar(const void *);
293 +void SetUnichar(void *, PRUnichar);
294
295 inline PRBool IsUpperCase(PRUnichar c) {
296 return ToLowerCase(c) != c;
297 diff -aur a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp
298 --- a/layout/generic/nsTextFrame.cpp 2006-02-13 18:05:07.000000000 -0800
299 +++ b/layout/generic/nsTextFrame.cpp 2006-05-20 20:27:50.000000000 -0700
300 @@ -5101,8 +5101,8 @@
301
302 while (aNumChars-- > 0) {
303 // XXX: If you crash here then you may see the issue described
304 - // in http://bugzilla.mozilla.org/show_bug.cgi?id=36146#c44
305 - *cp2-- = PRUnichar(*cp1--);
306 + // in http://bugzilla.mozilla.org/show_bug.cgi?id=161826
307 + SetUnichar(cp2--, PRUnichar(*cp1--));
308 }
309 }
310
311 @@ -6199,9 +6199,9 @@
312 {
313 PRUnichar* end = aBuffer + aWordLen;
314 for (; aBuffer < end; aBuffer++) {
315 - PRUnichar ch = *aBuffer;
316 + PRUnichar ch = GetUnichar(aBuffer);
317 if (ch == ' ') {
318 - *aBuffer = CH_NBSP;
319 + SetUnichar(aBuffer, CH_NBSP);
320 }
321 }
322 }
323
324
325
326 1.1 src/patchsets/mozilla-firefox/2.0.0.8/004_mozilla-hppa.patch
327
328 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/004_mozilla-hppa.patch?rev=1.1&view=markup
329 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/004_mozilla-hppa.patch?rev=1.1&content-type=text/plain
330
331 Index: 004_mozilla-hppa.patch
332 ===================================================================
333 # Original patch just cleaned up, Author on original patch was Randolph Chung (tausq@××××××.org)
334 # Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=287150
335
336 Index: xpcom/reflect/xptcall/src/md/unix/Makefile.in
337 ===================================================================
338 RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in,v
339 retrieving revision 1.92
340 diff -u -B -u -8 -p -r1.92 Makefile.in
341 --- xpcom/reflect/xptcall/src/md/unix/Makefile.in 14 Dec 2006 19:13:43 -0000 1.92
342 +++ xpcom/reflect/xptcall/src/md/unix/Makefile.in 3 Jan 2007 18:20:44 -0000
343 @@ -185,16 +185,29 @@ CPPSRCS := xptcinvoke_ipf32.cpp xptcstu
344 ASFILES := xptcstubs_asm_ipf32.s xptcinvoke_asm_ipf32.s
345 endif
346
347 # #18875 Building the CPP's (CXX) optimized causes a crash
348 CXXFLAGS := $(filter-out $(MOZ_OPTIMIZE_FLAGS), $(CXXFLAGS))
349 endif
350 endif
351
352 +#
353 +# Linux/HPPA/gcc
354 +#
355 +ifeq ($(OS_ARCH),Linux)
356 +ifneq (,$(filter parisc parisc64,$(OS_TEST)))
357 +#ifeq ($(CC),gcc) # Do not check for gcc since there is only this compiler on linux for hppa
358 +CPPSRCS := xptcinvoke_pa32.cpp xptcstubs_pa32.cpp
359 +ASFILES := xptcstubs_asm_parisc_linux.s xptcinvoke_asm_parisc_linux.s
360 +#endif
361 +endif
362 +endif
363 +
364 +
365 ######################################################################
366 # M68k
367 ######################################################################
368 #
369 # NetBSD/m68k
370 #
371 ifeq ($(OS_ARCH),NetBSD)
372 ifneq (,$(filter amiga atari hp300 mac68k mvme68k next68k sun3 sun3x x68k,$(OS_TEST)))
373 Index: xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s
374 ===================================================================
375 RCS file: xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s
376 diff -N xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s
377 --- /dev/null 1 Jan 1970 00:00:00 -0000
378 +++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s 3 Jan 2007 18:20:44 -0000
379 @@ -0,0 +1,102 @@
380 +
381 + .LEVEL 1.1
382 + .text
383 + .align 4
384 +
385 +framesz:
386 + .equ 128
387 +
388 +.globl XPTC_InvokeByIndex
389 + .type XPTC_InvokeByIndex, @function
390 +
391 +
392 +XPTC_InvokeByIndex:
393 + .PROC
394 + .CALLINFO FRAME=72, CALLER,SAVE_RP, SAVE_SP, ENTRY_GR=3
395 + .ENTRY
396 +
397 + ; frame marker takes 48 bytes,
398 + ; register spill area takes 8 bytes,
399 + ; local stack area takes 72 bytes result in 128 bytes total
400 +
401 + STW %rp,-20(%sp)
402 + STW,MA %r3,128(%sp)
403 +
404 + LDO -framesz(%r30),%r28
405 + STW %r28,-4(%r30) ; save previous sp
406 + STW %r19,-32(%r30)
407 +
408 + STW %r26,-36-framesz(%r30) ; save argument registers in
409 + STW %r25,-40-framesz(%r30) ; in PREVIOUS frame
410 + STW %r24,-44-framesz(%r30) ;
411 + STW %r23,-48-framesz(%r30) ;
412 +
413 + .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR ;in=24,25,26;out=28
414 + BL invoke_count_bytes,%r31
415 + COPY %r31,%r2
416 +
417 + CMPIB,>= 0,%r28, .+76
418 + COPY %r30,%r3 ; copy stack ptr to saved stack ptr
419 + ADD %r30,%r28,%r30 ; extend stack frame
420 + LDW -4(%r3),%r28 ; move frame
421 + STW %r28,-4(%r30)
422 + LDW -8(%r3),%r28
423 + STW %r28,-8(%r30)
424 + LDW -12(%r3),%r28
425 + STW %r28,-12(%r30)
426 + LDW -16(%r3),%r28
427 + STW %r28,-16(%r30)
428 + LDW -20(%r3),%r28
429 + STW %r28,-20(%r30)
430 + LDW -24(%r3),%r28
431 + STW %r28,-24(%r30)
432 + LDW -28(%r3),%r28
433 + STW %r28,-28(%r30)
434 + LDW -32(%r3),%r28
435 + STW %r28,-32(%r30)
436 +
437 + LDO -40(%r30),%r26 ; load copy address
438 + LDW -44-framesz(%r3),%r25 ; load rest of 2 arguments
439 + LDW -48-framesz(%r3),%r24 ;
440 +
441 + LDW -32(%r30),%r19 ; shared lib call destroys r19; reload
442 + .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR ;in=24,25,26
443 + BL invoke_copy_to_stack,%r31
444 + COPY %r31,%r2
445 +
446 + LDO -48(%r30),%r20
447 + EXTRW,U,= %r28,31,1,%r22
448 + FLDD 0(%r20),%fr7 ; load double arg 1
449 + EXTRW,U,= %r28,30,1,%r22
450 + FLDW 8(%r20),%fr5L ; load float arg 1
451 + EXTRW,U,= %r28,29,1,%r22
452 + FLDW 4(%r20),%fr6L ; load float arg 2
453 + EXTRW,U,= %r28,28,1,%r22
454 + FLDW 0(%r20),%fr7L ; load float arg 3
455 +
456 + LDW -36-framesz(%r3),%r26 ; load ptr to 'that'
457 + LDW -40(%r30),%r25 ; load the rest of dispatch argument registers
458 + LDW -44(%r30),%r24
459 + LDW -48(%r30),%r23
460 +
461 + LDW -36-framesz(%r3),%r20 ; load vtable addr
462 + LDW -40-framesz(%r3),%r28 ; load index
463 + LDW 0(%r20),%r20 ; follow vtable
464 + SH2ADDL %r28,%r20,%r28 ; add 4*index to vtable entry
465 + LDW 0(%r28),%r22 ; load vtable entry
466 +
467 + .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR ;in=22-26;out=28;
468 + BL $$dyncall,%r31
469 + COPY %r31,%r2
470 +
471 + LDW -32(%r30),%r19
472 + COPY %r3,%r30 ; restore saved stack ptr
473 +
474 + LDW -148(%sp),%rp
475 + LDWM -128(%sp),%r3
476 + BV,N (%rp)
477 + NOP
478 + .EXIT
479 + .PROCEND ;in=23,24,25,26;
480 + .SIZE XPTC_InvokeByIndex, .-XPTC_InvokeByIndex
481 +
482 Index: xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s
483 ===================================================================
484 RCS file: xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s
485 diff -N xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s
486 --- /dev/null 1 Jan 1970 00:00:00 -0000
487 +++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s 3 Jan 2007 18:20:44 -0000
488 @@ -0,0 +1,66 @@
489 + .LEVEL 1.1
490 + .TEXT
491 + .ALIGN 4
492 +
493 +curframesz:
494 + .EQU 128
495 +
496 +
497 +; SharedStub has stack size of 128 bytes
498 +
499 +lastframesz:
500 + .EQU 64
501 +
502 +; the StubN C++ function has a small stack size of 64 bytes
503 +
504 +
505 +.globl SharedStub
506 + .type SharedStub, @function
507 +
508 +SharedStub:
509 + .PROC
510 + .CALLINFO CALLER,FRAME=80,SAVE_RP
511 +
512 + .ENTRY
513 + STW %rp,-20(%sp)
514 + LDO 128(%sp),%sp
515 +
516 + STW %r19,-32(%r30)
517 + STW %r26,-36-curframesz(%r30) ; save arg0 in previous frame
518 +
519 + LDO -80(%r30),%r28
520 + FSTD,MA %fr5,8(%r28) ; save darg0
521 + FSTD,MA %fr7,8(%r28) ; save darg1
522 + FSTW,MA %fr4L,4(%r28) ; save farg0
523 + FSTW,MA %fr5L,4(%r28) ; save farg1
524 + FSTW,MA %fr6L,4(%r28) ; save farg2
525 + FSTW,MA %fr7L,4(%r28) ; save farg3
526 +
527 + ; Former value of register 26 is already properly saved by StubN,
528 + ; but register 25-23 are not because of the arguments mismatch
529 + STW %r25,-40-curframesz-lastframesz(%r30) ; save r25
530 + STW %r24,-44-curframesz-lastframesz(%r30) ; save r24
531 + STW %r23,-48-curframesz-lastframesz(%r30) ; save r23
532 + COPY %r26,%r25 ; method index is arg1
533 + LDW -36-curframesz-lastframesz(%r30),%r26 ; self is arg0
534 + LDO -40-curframesz-lastframesz(%r30),%r24 ; normal args is arg2
535 + LDO -80(%r30),%r23 ; floating args is arg3
536 +
537 + .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR ;in=23-26;out=28;
538 + BL PrepareAndDispatch, %r31
539 + COPY %r31,%r2
540 +
541 + LDW -32(%r30),%r19
542 +
543 + LDW -148(%sp),%rp
544 + LDO -128(%sp),%sp
545 +
546 +
547 + BV,N (%rp)
548 + NOP
549 + NOP
550 +
551 + .EXIT
552 + .PROCEND ;in=26;out=28;
553 +
554 + .SIZE SharedStub, .-SharedStub
555
556
557
558 1.1 src/patchsets/mozilla-firefox/2.0.0.8/005_mozilla-firefox-1.5-ia64.patch
559
560 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/005_mozilla-firefox-1.5-ia64.patch?rev=1.1&view=markup
561 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/005_mozilla-firefox-1.5-ia64.patch?rev=1.1&content-type=text/plain
562
563 Index: 005_mozilla-firefox-1.5-ia64.patch
564 ===================================================================
565 # Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=289394
566
567 --- mozilla.orig/extensions/transformiix/source/base/Double.cpp
568 +++ mozilla/extensions/transformiix/source/base/Double.cpp
569 @@ -75,14 +75,7 @@
570 #define CPU_IS_ARM
571 #endif
572
573 -#if (__GNUC__ == 2 && __GNUC_MINOR__ > 95) || __GNUC__ > 2
574 -/**
575 - * This version of the macros is safe for the alias optimizations
576 - * that gcc does, but uses gcc-specific extensions.
577 - */
578 -
579 typedef union txdpun {
580 - PRFloat64 d;
581 struct {
582 #if defined(IS_LITTLE_ENDIAN) && !defined(CPU_IS_ARM)
583 PRUint32 lo, hi;
584 @@ -90,8 +83,14 @@
585 PRUint32 hi, lo;
586 #endif
587 } s;
588 + PRFloat64 d;
589 } txdpun;
590
591 +#if (__GNUC__ == 2 && __GNUC_MINOR__ > 95) || __GNUC__ > 2
592 +/**
593 + * This version of the macros is safe for the alias optimizations
594 + * that gcc does, but uses gcc-specific extensions.
595 + */
596 #define TX_DOUBLE_HI32(x) (__extension__ ({ txdpun u; u.d = (x); u.s.hi; }))
597 #define TX_DOUBLE_LO32(x) (__extension__ ({ txdpun u; u.d = (x); u.s.lo; }))
598
599 @@ -117,20 +116,20 @@
600
601 //-- Initialize Double related constants
602 #ifdef IS_BIG_ENDIAN
603 -const PRUint32 nanMask[2] = {TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK,
604 - 0xffffffff};
605 -const PRUint32 infMask[2] = {TX_DOUBLE_HI32_EXPMASK, 0};
606 -const PRUint32 negInfMask[2] = {TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT, 0};
607 +const txdpun nanMask = {TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK,
608 + 0xffffffff};
609 +const txdpun infMask = {TX_DOUBLE_HI32_EXPMASK, 0};
610 +const txdpun negInfMask = {TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT, 0};
611 #else
612 -const PRUint32 nanMask[2] = {0xffffffff,
613 - TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK};
614 -const PRUint32 infMask[2] = {0, TX_DOUBLE_HI32_EXPMASK};
615 -const PRUint32 negInfMask[2] = {0, TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT};
616 +const txdpun nanMask = {0xffffffff,
617 + TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK};
618 +const txdpun infMask = {0, TX_DOUBLE_HI32_EXPMASK};
619 +const txdpun negInfMask = {0, TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT};
620 #endif
621
622 -const double Double::NaN = *((double*)nanMask);
623 -const double Double::POSITIVE_INFINITY = *((double*)infMask);
624 -const double Double::NEGATIVE_INFINITY = *((double*)negInfMask);
625 +const double Double::NaN = nanMask.d;
626 +const double Double::POSITIVE_INFINITY = infMask.d;
627 +const double Double::NEGATIVE_INFINITY = negInfMask.d;
628
629 /*
630 * Determines whether the given double represents positive or negative
631 --- mozilla.orig/js/src/fdlibm/fdlibm.h
632
633
634
635 1.1 src/patchsets/mozilla-firefox/2.0.0.8/006_mips-asm.patch
636
637 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/006_mips-asm.patch?rev=1.1&view=markup
638 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/006_mips-asm.patch?rev=1.1&content-type=text/plain
639
640 Index: 006_mips-asm.patch
641 ===================================================================
642 Upstream Bug: http://bugzilla.mozilla.org/show_bug.cgi?id=258429
643
644 This patch is required to fix build issues with Mozilla on MIPS architectures.
645 The out-of-the-box code is coded to build on a PlayStation 2 game console, which
646 is a highly specialised MIPS machine based around the Toshiba TX5900. This CPU
647 is very non-standard, causing problems with generic MIPS machines like Silicon
648 Graphics workstations.
649
650 The following patch fixes the assembly language routines for generic MIPS
651 machines. In the case where it is being compiled for a PlayStation 2, the older
652 PS2-specific implementation is used instead.
653
654 Patch $Revision: 1.1 $
655 Index: mozilla/configure.in
656 ===================================================================
657 RCS file: /cvsroot/mozilla/configure.in,v
658 retrieving revision 1.1819
659 diff -p -u -r1.1819 configure.in
660 --- mozilla/configure.in 24 May 2007 17:45:55 -0000 1.1819
661 +++ mozilla/configure.in 30 May 2007 09:08:10 -0000
662 @@ -1706,6 +1706,12 @@ case "$target" in
663 MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS=1
664 ;;
665 mips*)
666 + if test -z "$CROSS_COMPILE" ; then
667 + if grep -c -E '^system type\W*:.*EE PS2' /proc/cpuinfo >/dev/null; then
668 + OS_TEST="mipsEE"
669 + fi
670 + fi
671 +
672 CFLAGS="$CFLAGS -Wa,-xgot"
673 CXXFLAGS="$CXXFLAGS -Wa,-xgot"
674 ;;
675 Index: mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in
676 ===================================================================
677 RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in,v
678 retrieving revision 1.92
679 diff -p -u -r1.92 Makefile.in
680 --- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 14 Dec 2006 19:13:43 -0000 1.92
681 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 30 May 2007 09:08:10 -0000
682 @@ -229,16 +229,28 @@ endif
683 endif
684 endif
685
686 +#
687 +# Linux/MIPS
688 +#
689 ifeq ($(OS_ARCH),Linux)
690 -ifneq (,$(findstring mips, $(OS_TEST)))
691 -CPPSRCS := xptcinvoke_mips.cpp xptcstubs_mips.cpp
692 -ASFILES := xptcinvoke_asm_mips.s xptcstubs_asm_mips.s
693 -#xptcstubs_mips.cpp
694 -# xptcstubs_asm_mips.s
695 +
696 +# PlayStation2 Linux
697 +ifneq (,$(findstring mipsEE, $(OS_TEST)))
698 +CPPSRCS := xptcinvoke_ps2mips.cpp xptcstubs_ps2mips.cpp
699 +ASFILES := xptcinvoke_asm_ps2mips.s xptcstubs_asm_ps2mips.s
700 ifdef GNU_CC
701 ASFLAGS += $(INCLUDES) -x assembler-with-cpp -D__GNUC__
702 endif
703 +else
704 +
705 +endif
706 +# Generic 32-bit Linux
707 +ifneq (,$(findstring mips, $(OS_TEST)))
708 +CPPSRCS := xptcinvoke_mips.cpp xptcstubs_mips.cpp
709 +ASFILES := xptcinvoke_asm_mips.s xptcstubs_asm_mips.s
710 +AS := $(CC) $(CFLAGS) $(INCLUDES) -c -x assembler-with-cpp
711 endif
712 +
713 endif
714
715 ######################################################################
716 @@ -386,14 +398,24 @@ LOCAL_INCLUDES += \
717 $(NULL)
718
719 ifeq ($(OS_ARCH),Linux)
720 +
721 +# PlayStation 2 Linux
722 +ifneq (,$(findstring mipsEE, $(OS_TEST)))
723 +xptcstubs_asm_ps2mips.o: xptcstubs_asm_ps2mips.s.m4 $(PUBLIC)/xptcstubsdef.inc
724 + m4 $(INCLUDES) $< > ./xptcstubs_asm_ps2mips.s && \
725 + $(AS) -o $@ $(ASFLAGS) $(AS_DASH_C_FLAG) ./xptcstubs_asm_ps2mips.s
726 + $(RM) -f ./xptcstubs_asm_ps2mips.s
727 +else
728 +
729 +# Generic Linux
730 ifneq (,$(findstring mips, $(OS_TEST)))
731 -xptcstubs_asm_mips.o: xptcstubs_asm_mips.s.m4 $(PUBLIC)/xptcstubsdef.inc
732 - m4 $(INCLUDES) $< > ./xptcstubs_asm_mips.s && \
733 - $(AS) -o $@ $(ASFLAGS) $(AS_DASH_C_FLAG) ./xptcstubs_asm_mips.s
734 - $(RM) -f ./xptcstubs_asm_mips.s
735 +xptcstubs_asm_mips.o: xptcstubs_asm_mips.s $(PUBLIC)/xptcstubsdef.inc
736 + $(AS) -o $@ $<
737 endif
738 endif
739
740 +endif
741 +
742 ifeq ($(OS_ARCH),Darwin)
743 xptcstubs_asm_ppc_darwin.o: xptcstubs_asm_ppc_darwin.s.m4 $(PUBLIC)/xptcstubsdef.inc Makefile
744 gm4 $(INCLUDES) $< > ./xptcstubs_asm_ppc_darwin.s && \
745 Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s
746 ===================================================================
747 RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s,v
748 retrieving revision 1.3
749 diff -p -u -r1.3 xptcinvoke_asm_mips.s
750 --- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s.orig 2007-07-09 09:02:07 +1000
751 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s 2007-07-09 09:04:37 +1000
752 @@ -21,6 +21,7 @@
753 * Contributor(s):
754 * Brendan Eich <brendan@×××××××.org>
755 * Stuart Parmenter <pavlov@××××××××.com>
756 + * Thiemo Seufer <seufer@×××××××××××××××××××××.de>
757 */
758
759 /* This code is for MIPS using the O32 ABI. */
760 @@ -28,139 +29,123 @@
761 #include <sys/regdef.h>
762 #include <sys/asm.h>
763
764 -.text
765 -.globl invoke_count_words
766 -.globl invoke_copy_to_stack
767 -
768 -# We need a variable number of words allocated from the stack for copies of
769 -# the params, and this space must come between the high frame (where ra, gp,
770 -# and s0 are saved) and the low frame (where a0-a3 are saved by the callee
771 -# functions we invoke).
772 -
773 -LOCALSZ=4 # s0, s1, ra, gp
774 -NARGSAVE=4 # a0, a1, a2, a3
775 -HIFRAMESZ=(LOCALSZ*SZREG)
776 -LOFRAMESZ=(NARGSAVE*SZREG)
777 -FRAMESZ=(HIFRAMESZ+LOFRAMESZ+ALSZ)&ALMASK
778 -
779 -# XXX these 2*SZREG, etc. are very magic -- we *know* that ALSZ&ALMASK cause
780 -# FRAMESZ to be 0 mod 8, in this case to be 16 and not 12.
781 -RAOFF=FRAMESZ - (2*SZREG)
782 -GPOFF=FRAMESZ - (3*SZREG)
783 -S0OFF=FRAMESZ - (4*SZREG)
784 -S1OFF=FRAMESZ - (5*SZREG)
785 -
786 -# These are not magic -- they are just our argsave slots in the caller frame.
787 -A0OFF=FRAMESZ
788 -A1OFF=FRAMESZ + (1*SZREG)
789 -A2OFF=FRAMESZ + (2*SZREG)
790 -A3OFF=FRAMESZ + (3*SZREG)
791 -
792 - #
793 - # _XPTC_InvokeByIndex(that, methodIndex, paramCount, params)
794 - # a0 a1 a2 a3
795 -
796 -NESTED(_XPTC_InvokeByIndex, FRAMESZ, ra)
797 -
798 - .set noreorder
799 - .cpload t9
800 - .set reorder
801 -
802 +# NARGSAVE is the argument space in the callers frame, including extra
803 +# 'shadowed' space for the argument registers. The minimum of 4
804 +# argument slots is sometimes predefined in the header files.
805 +#ifndef NARGSAVE
806 +#define NARGSAVE 4
807 +#endif
808 +
809 +#define LOCALSZ 3 /* gp, fp, ra */
810 +#define FRAMESZ ((((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK)
811 +
812 +#define RAOFF (FRAMESZ - (1*SZREG))
813 +#define FPOFF (FRAMESZ - (2*SZREG))
814 +#define GPOFF (FRAMESZ - (3*SZREG))
815 +
816 +#define A0OFF (FRAMESZ + (0*SZREG))
817 +#define A1OFF (FRAMESZ + (1*SZREG))
818 +#define A2OFF (FRAMESZ + (2*SZREG))
819 +#define A3OFF (FRAMESZ + (3*SZREG))
820 +
821 + .text
822 +
823 +#
824 +# _XPTC_InvokeByIndex(that, methodIndex, paramCount, params)
825 +# a0 a1 a2 a3
826 +
827 + .globl _XPTC_InvokeByIndex
828 + .align 2
829 + .type _XPTC_InvokeByIndex,@function
830 + .ent _XPTC_InvokeByIndex,0
831 + .frame fp, FRAMESZ, ra
832 +_XPTC_InvokeByIndex:
833 + SETUP_GP
834 subu sp, FRAMESZ
835
836 - # specify the save register mask -- XXX do we want the a0-a3 here, given
837 - # our "split" frame where the args are saved below a dynamicly allocated
838 - # region under the high frame?
839 - #
840 - # 10010000000000010000000011110000
841 - .mask 0x900100F0, -((NARGSAVE+LOCALSZ)*SZREG)
842 -
843 - # thou shalt not use .cprestore if yer frame has variable size...
844 - # .cprestore GPOFF
845 -
846 - REG_S ra, RAOFF(sp)
847 -
848 - # this happens automatically with .cprestore, but we cannot use that op...
849 - REG_S gp, GPOFF(sp)
850 - REG_S s0, S0OFF(sp)
851 - REG_S s1, S1OFF(sp)
852 -
853 - REG_S a0, A0OFF(sp)
854 - REG_S a1, A1OFF(sp)
855 - REG_S a2, A2OFF(sp)
856 - REG_S a3, A3OFF(sp)
857 + # specify the save register mask for gp, fp, ra, a3 - a0
858 + .mask 0xD00000F0, RAOFF-FRAMESZ
859
860 - # invoke_count_words(paramCount, params)
861 - move a0, a2
862 - move a1, a3
863 + sw ra, RAOFF(sp)
864 + sw fp, FPOFF(sp)
865
866 - jal invoke_count_words
867 - lw gp, GPOFF(sp)
868 + # we can't use .cprestore in a variable stack frame
869 + sw gp, GPOFF(sp)
870
871 - # save the old sp so we can pop the param area and any "low frame"
872 - # needed as an argsave area below the param block for callees that
873 - # we invoke.
874 - move s0, sp
875 -
876 - REG_L a1, A2OFF(sp) # a1 = paramCount
877 - REG_L a2, A3OFF(sp) # a2 = params
878 -
879 - # we define a word as 4 bytes, period end of story!
880 - sll v0, 2 # 4 bytes * result of invoke_copy_words
881 - subu v0, LOFRAMESZ # but we take back the argsave area built into
882 - # our stack frame -- SWEET!
883 - subu sp, sp, v0 # make room
884 - move a0, sp # a0 = param stack address
885 - move s1, a0 # save it for later -- it should be safe here
886 -
887 - # the old sp is still saved in s0, but we now need another argsave
888 - # area ("low frame") for the invoke_copy_to_stack call.
889 - subu sp, sp, LOFRAMESZ
890 + sw a0, A0OFF(sp)
891 + sw a1, A1OFF(sp)
892 + sw a2, A2OFF(sp)
893 + sw a3, A3OFF(sp)
894 +
895 + # save bottom of fixed frame
896 + move fp, sp
897 +
898 + # extern "C" uint32
899 + # invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s);
900 + la t9, invoke_count_words
901 + move a0, a2
902 + move a1, a3
903 + jalr t9
904 + lw gp, GPOFF(fp)
905
906 - # copy the param into the stack areas
907 + # allocate variable stack, with a size of:
908 + # wordsize (of 4 bytes) * result (already aligned to dword)
909 + # but a minimum of 16 byte
910 + sll v0, 2
911 + slt t0, v0, 16
912 + beqz t0, 1f
913 + li v0, 16
914 +1: subu sp, v0
915 +
916 + # let a0 point to the bottom of the variable stack, allocate
917 + # another fixed stack for:
918 + # extern "C" void
919 # invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount,
920 - # nsXPTCVariant* s)
921 - jal invoke_copy_to_stack
922 - lw gp, GPOFF(s0)
923 -
924 - move sp, s0 # get orig sp back, popping params and argsave
925 -
926 - REG_L a0, A0OFF(sp) # a0 = set "that" to be "this"
927 - REG_L a1, A1OFF(sp) # a1 = methodIndex
928 -
929 - # t1 = methodIndex * 4
930 - # (use shift instead of mult)
931 - sll t1, a1, 2
932 -
933 - # calculate the function we need to jump to,
934 - # which must then be saved in t9
935 + # nsXPTCVariant* s);
936 + la t9, invoke_copy_to_stack
937 + move a0, sp
938 + lw a1, A2OFF(fp)
939 + lw a2, A3OFF(fp)
940 + subu sp, 16
941 + jalr t9
942 + lw gp, GPOFF(fp)
943 +
944 + # back to the variable stack frame
945 + addu sp, 16
946 +
947 + # calculate the function we need to jump to, which must then be
948 + # stored in t9
949 + lw a0, A0OFF(fp) # a0 = set "that" to be "this"
950 + lw t0, A1OFF(fp) # a1 = methodIndex
951 lw t9, 0(a0)
952 - addu t9, t9, t1
953 - lw t9, 8(t9)
954 -
955 - # a1..a3 and f13..f14 should now be set to what
956 - # invoke_copy_to_stack told us. skip a0 and f12
957 - # because that is the "this" pointer
958 -
959 - REG_L a1, 1*SZREG(s1)
960 - REG_L a2, 2*SZREG(s1)
961 - REG_L a3, 3*SZREG(s1)
962 -
963 - l.d $f13, 8(s1)
964 - l.d $f14, 16(s1)
965 -
966 - # Create the stack pointer for the function, which must have 4 words
967 - # of space for callee-saved args. invoke_count_words allocated space
968 - # for a0 starting at s1, so we just move s1 into sp.
969 - move sp, s1
970 + # t0 = methodIndex << PTRLOG
971 + sll t0, t0, PTRLOG
972 + addu t9, t0
973 +#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
974 + lw t9, (t9)
975 +#else /* not G++ V3 ABI */
976 + lw t9, 2*PTRSIZE(t9)
977 +#endif /* G++ V3 ABI */
978 +
979 + # Set a1-a3 to what invoke_copy_to_stack told us. a0 is already
980 + # the "this" pointer. We don't have to care about floating
981 + # point arguments, the non-FP "this" pointer as first argument
982 + # means they'll never be used.
983 + lw a1, 1*SZREG(sp)
984 + lw a2, 2*SZREG(sp)
985 + lw a3, 3*SZREG(sp)
986 +
987 + jalr t9
988 + # Micro-optimization: There's no gp usage below this point, so
989 + # we don't reload.
990 + # lw gp, GPOFF(fp)
991
992 - jalr ra, t9
993 - lw gp, GPOFF(s0)
994 + # leave variable stack frame
995 + move sp, fp
996
997 - move sp, s0
998 + lw ra, RAOFF(sp)
999 + lw fp, FPOFF(sp)
1000
1001 - REG_L ra, RAOFF(sp)
1002 - REG_L s0, S0OFF(sp)
1003 - addu sp, FRAMESZ
1004 + addiu sp, FRAMESZ
1005 j ra
1006 -.end _XPTC_InvokeByIndex
1007 +END(_XPTC_InvokeByIndex)
1008 Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ps2mips.s
1009 ===================================================================
1010 RCS file: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ps2mips.s
1011 diff -N mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ps2mips.s
1012 --- /dev/null 1 Jan 1970 00:00:00 -0000
1013 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ps2mips.s 30 May 2007 09:08:10 -0000
1014 @@ -0,0 +1,166 @@
1015 +/* -*- Mode: asm; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
1016 + * Version: MPL 1.1
1017 + *
1018 + * The contents of this file are subject to the Mozilla Public License Version
1019 + * 1.1 (the "License"); you may not use this file except in compliance with
1020 + * the License. You may obtain a copy of the License at
1021 + * http://www.mozilla.org/MPL/
1022 + *
1023 + * Software distributed under the License is distributed on an "AS IS" basis,
1024 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1025 + * for the specific language governing rights and limitations under the
1026 + * License.
1027 + *
1028 + * The Original Code is mozilla.org code.
1029 + *
1030 + * The Initial Developer of the Original Code is
1031 + * Netscape Communications Corp, Inc.
1032 + * Portions created by the Initial Developer are Copyright (C) 2001
1033 + * the Initial Developer. All Rights Reserved.
1034 + *
1035 + * Contributor(s):
1036 + * Brendan Eich <brendan@×××××××.org>
1037 + * Stuart Parmenter <pavlov@××××××××.com>
1038 + */
1039 +
1040 +/* This code is for MIPS using the O32 ABI. */
1041 +
1042 +#include <sys/regdef.h>
1043 +#include <sys/asm.h>
1044 +
1045 +.text
1046 +.globl invoke_count_words
1047 +.globl invoke_copy_to_stack
1048 +
1049 +# We need a variable number of words allocated from the stack for copies of
1050 +# the params, and this space must come between the high frame (where ra, gp,
1051 +# and s0 are saved) and the low frame (where a0-a3 are saved by the callee
1052 +# functions we invoke).
1053 +
1054 +LOCALSZ=4 # s0, s1, ra, gp
1055 +NARGSAVE=4 # a0, a1, a2, a3
1056 +HIFRAMESZ=(LOCALSZ*SZREG)
1057 +LOFRAMESZ=(NARGSAVE*SZREG)
1058 +FRAMESZ=(HIFRAMESZ+LOFRAMESZ+ALSZ)&ALMASK
1059 +
1060 +# XXX these 2*SZREG, etc. are very magic -- we *know* that ALSZ&ALMASK cause
1061 +# FRAMESZ to be 0 mod 8, in this case to be 16 and not 12.
1062 +RAOFF=FRAMESZ - (2*SZREG)
1063 +GPOFF=FRAMESZ - (3*SZREG)
1064 +S0OFF=FRAMESZ - (4*SZREG)
1065 +S1OFF=FRAMESZ - (5*SZREG)
1066 +
1067 +# These are not magic -- they are just our argsave slots in the caller frame.
1068 +A0OFF=FRAMESZ
1069 +A1OFF=FRAMESZ + (1*SZREG)
1070 +A2OFF=FRAMESZ + (2*SZREG)
1071 +A3OFF=FRAMESZ + (3*SZREG)
1072 +
1073 + #
1074 + # _XPTC_InvokeByIndex(that, methodIndex, paramCount, params)
1075 + # a0 a1 a2 a3
1076 +
1077 +NESTED(_XPTC_InvokeByIndex, FRAMESZ, ra)
1078 +
1079 + .set noreorder
1080 + .cpload t9
1081 + .set reorder
1082 +
1083 + subu sp, FRAMESZ
1084 +
1085 + # specify the save register mask -- XXX do we want the a0-a3 here, given
1086 + # our "split" frame where the args are saved below a dynamicly allocated
1087 + # region under the high frame?
1088 + #
1089 + # 10010000000000010000000011110000
1090 + .mask 0x900100F0, -((NARGSAVE+LOCALSZ)*SZREG)
1091 +
1092 + # thou shalt not use .cprestore if yer frame has variable size...
1093 + # .cprestore GPOFF
1094 +
1095 + REG_S ra, RAOFF(sp)
1096 +
1097 + # this happens automatically with .cprestore, but we cannot use that op...
1098 + REG_S gp, GPOFF(sp)
1099 + REG_S s0, S0OFF(sp)
1100 + REG_S s1, S1OFF(sp)
1101 +
1102 + REG_S a0, A0OFF(sp)
1103 + REG_S a1, A1OFF(sp)
1104 + REG_S a2, A2OFF(sp)
1105 + REG_S a3, A3OFF(sp)
1106 +
1107 + # invoke_count_words(paramCount, params)
1108 + move a0, a2
1109 + move a1, a3
1110 +
1111 + jal invoke_count_words
1112 + lw gp, GPOFF(sp)
1113 +
1114 + # save the old sp so we can pop the param area and any "low frame"
1115 + # needed as an argsave area below the param block for callees that
1116 + # we invoke.
1117 + move s0, sp
1118 +
1119 + REG_L a1, A2OFF(sp) # a1 = paramCount
1120 + REG_L a2, A3OFF(sp) # a2 = params
1121 +
1122 + # we define a word as 4 bytes, period end of story!
1123 + sll v0, 2 # 4 bytes * result of invoke_copy_words
1124 + subu v0, LOFRAMESZ # but we take back the argsave area built into
1125 + # our stack frame -- SWEET!
1126 + subu sp, sp, v0 # make room
1127 + move a0, sp # a0 = param stack address
1128 + move s1, a0 # save it for later -- it should be safe here
1129 +
1130 + # the old sp is still saved in s0, but we now need another argsave
1131 + # area ("low frame") for the invoke_copy_to_stack call.
1132 + subu sp, sp, LOFRAMESZ
1133 +
1134 + # copy the param into the stack areas
1135 + # invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount,
1136 + # nsXPTCVariant* s)
1137 + jal invoke_copy_to_stack
1138 + lw gp, GPOFF(s0)
1139 +
1140 + move sp, s0 # get orig sp back, popping params and argsave
1141 +
1142 + REG_L a0, A0OFF(sp) # a0 = set "that" to be "this"
1143 + REG_L a1, A1OFF(sp) # a1 = methodIndex
1144 +
1145 + # t1 = methodIndex * 4
1146 + # (use shift instead of mult)
1147 + sll t1, a1, 2
1148 +
1149 + # calculate the function we need to jump to,
1150 + # which must then be saved in t9
1151 + lw t9, 0(a0)
1152 + addu t9, t9, t1
1153 + lw t9, 8(t9)
1154 +
1155 + # a1..a3 and f13..f14 should now be set to what
1156 + # invoke_copy_to_stack told us. skip a0 and f12
1157 + # because that is the "this" pointer
1158 +
1159 + REG_L a1, 1*SZREG(s1)
1160 + REG_L a2, 2*SZREG(s1)
1161 + REG_L a3, 3*SZREG(s1)
1162 +
1163 + l.d $f13, 8(s1)
1164 + l.d $f14, 16(s1)
1165 +
1166 + # Create the stack pointer for the function, which must have 4 words
1167 + # of space for callee-saved args. invoke_count_words allocated space
1168 + # for a0 starting at s1, so we just move s1 into sp.
1169 + move sp, s1
1170 +
1171 + jalr ra, t9
1172 + lw gp, GPOFF(s0)
1173 +
1174 + move sp, s0
1175 +
1176 + REG_L ra, RAOFF(sp)
1177 + REG_L s0, S0OFF(sp)
1178 + addu sp, FRAMESZ
1179 + j ra
1180 +.end _XPTC_InvokeByIndex
1181 Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp
1182 ===================================================================
1183 RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp,v
1184 retrieving revision 1.2
1185 diff -p -u -r1.2 xptcinvoke_mips.cpp
1186 --- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp 18 Apr 2004 14:18:18 -0000 1.2
1187 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp 30 May 2007 09:08:10 -0000
1188 @@ -1,6 +1,4 @@
1189 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
1190 - * Version: MPL 1.1
1191 - *
1192 * ***** BEGIN LICENSE BLOCK *****
1193 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1194 *
1195 @@ -24,6 +22,7 @@
1196 * Contributor(s):
1197 * Stuart Parmenter <pavlov@××××××××.com>
1198 * Brendan Eich <brendan@×××××××.org>
1199 + * Thiemo Seufer <seufer@×××××××××××××××××××××.de>
1200 *
1201 * Alternatively, the contents of this file may be used under the terms of
1202 * either of the GNU General Public License Version 2 or later (the "GPL"),
1203 @@ -52,10 +51,8 @@ invoke_count_words(PRUint32 paramCount,
1204 // Count a word for a0 even though it's never stored or loaded
1205 // We do this only for alignment of register pairs.
1206 PRUint32 result = 1;
1207 - for (PRUint32 i = 0; i < paramCount; i++, s++)
1208 + for (PRUint32 i = 0; i < paramCount; i++, result++, s++)
1209 {
1210 - result++;
1211 -
1212 if (s->IsPtrData())
1213 continue;
1214
1215 @@ -68,6 +65,9 @@ invoke_count_words(PRUint32 paramCount,
1216 result++;
1217 result++;
1218 break;
1219 +
1220 + default:
1221 + break;
1222 }
1223 }
1224 return (result + 1) & ~(PRUint32)1;
1225 @@ -88,8 +88,6 @@ invoke_copy_to_stack(PRUint32* d, PRUint
1226 continue;
1227 }
1228
1229 - *((void**)d) = s->val.p;
1230 -
1231 switch(s->type)
1232 {
1233 case nsXPTType::T_I64 :
1234 @@ -104,6 +102,9 @@ invoke_copy_to_stack(PRUint32* d, PRUint
1235 if ((PRWord)d & 4) d++;
1236 *((double*) d) = s->val.d; d++;
1237 break;
1238 + default:
1239 + *((void**)d) = s->val.p;
1240 + break;
1241 }
1242 }
1243 }
1244 @@ -118,5 +119,4 @@ XPTC_InvokeByIndex(nsISupports* that, PR
1245 PRUint32 paramCount, nsXPTCVariant* params)
1246 {
1247 return _XPTC_InvokeByIndex(that, methodIndex, paramCount, params);
1248 -}
1249 -
1250 +}
1251 Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ps2mips.cpp
1252 ===================================================================
1253 RCS file: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ps2mips.cpp
1254 diff -N mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ps2mips.cpp
1255 --- /dev/null 1 Jan 1970 00:00:00 -0000
1256 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ps2mips.cpp 30 May 2007 09:08:10 -0000
1257 @@ -0,0 +1,122 @@
1258 +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
1259 + * Version: MPL 1.1
1260 + *
1261 + * ***** BEGIN LICENSE BLOCK *****
1262 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1263 + *
1264 + * The contents of this file are subject to the Mozilla Public License Version
1265 + * 1.1 (the "License"); you may not use this file except in compliance with
1266 + * the License. You may obtain a copy of the License at
1267 + * http://www.mozilla.org/MPL/
1268 + *
1269 + * Software distributed under the License is distributed on an "AS IS" basis,
1270 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1271 + * for the specific language governing rights and limitations under the
1272 + * License.
1273 + *
1274 + * The Original Code is mozilla.org code.
1275 + *
1276 + * The Initial Developer of the Original Code is
1277 + * Netscape Communications Corp, Inc.
1278 + * Portions created by the Initial Developer are Copyright (C) 2001
1279 + * the Initial Developer. All Rights Reserved.
1280 + *
1281 + * Contributor(s):
1282 + * Stuart Parmenter <pavlov@××××××××.com>
1283 + * Brendan Eich <brendan@×××××××.org>
1284 + *
1285 + * Alternatively, the contents of this file may be used under the terms of
1286 + * either of the GNU General Public License Version 2 or later (the "GPL"),
1287 + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1288 + * in which case the provisions of the GPL or the LGPL are applicable instead
1289 + * of those above. If you wish to allow use of your version of this file only
1290 + * under the terms of either the GPL or the LGPL, and not to allow others to
1291 + * use your version of this file under the terms of the MPL, indicate your
1292 + * decision by deleting the provisions above and replace them with the notice
1293 + * and other provisions required by the GPL or the LGPL. If you do not delete
1294 + * the provisions above, a recipient may use your version of this file under
1295 + * the terms of any one of the MPL, the GPL or the LGPL.
1296 + *
1297 + * ***** END LICENSE BLOCK ***** */
1298 +
1299 +/* This code is for MIPS using the O32 ABI. */
1300 +
1301 +/* Platform specific code to invoke XPCOM methods on native objects */
1302 +
1303 +#include "xptcprivate.h"
1304 +
1305 +
1306 +extern "C" uint32
1307 +invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
1308 +{
1309 + // Count a word for a0 even though it's never stored or loaded
1310 + // We do this only for alignment of register pairs.
1311 + PRUint32 result = 1;
1312 + for (PRUint32 i = 0; i < paramCount; i++, s++)
1313 + {
1314 + result++;
1315 +
1316 + if (s->IsPtrData())
1317 + continue;
1318 +
1319 + switch(s->type)
1320 + {
1321 + case nsXPTType::T_I64 :
1322 + case nsXPTType::T_U64 :
1323 + case nsXPTType::T_DOUBLE :
1324 + if (result & 1)
1325 + result++;
1326 + result++;
1327 + break;
1328 + }
1329 + }
1330 + return (result + 1) & ~(PRUint32)1;
1331 +}
1332 +
1333 +extern "C" void
1334 +invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount,
1335 + nsXPTCVariant* s)
1336 +{
1337 + // Skip the unused a0 slot, which we keep only for register pair alignment.
1338 + d++;
1339 +
1340 + for (PRUint32 i = 0; i < paramCount; i++, d++, s++)
1341 + {
1342 + if (s->IsPtrData())
1343 + {
1344 + *((void**)d) = s->ptr;
1345 + continue;
1346 + }
1347 +
1348 + *((void**)d) = s->val.p;
1349 +
1350 + switch(s->type)
1351 + {
1352 + case nsXPTType::T_I64 :
1353 + if ((PRWord)d & 4) d++;
1354 + *((PRInt64*) d) = s->val.i64; d++;
1355 + break;
1356 + case nsXPTType::T_U64 :
1357 + if ((PRWord)d & 4) d++;
1358 + *((PRUint64*) d) = s->val.u64; d++;
1359 + break;
1360 + case nsXPTType::T_DOUBLE :
1361 + if ((PRWord)d & 4) d++;
1362 + *((double*) d) = s->val.d; d++;
1363 + break;
1364 + }
1365 + }
1366 +}
1367 +
1368 +extern "C" nsresult _XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
1369 + PRUint32 paramCount,
1370 + nsXPTCVariant* params);
1371 +
1372 +extern "C"
1373 +XPTC_PUBLIC_API(nsresult)
1374 +XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
1375 + PRUint32 paramCount, nsXPTCVariant* params)
1376 +{
1377 + return _XPTC_InvokeByIndex(that, methodIndex, paramCount, params);
1378 +}
1379 +
1380 Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ps2mips.cpp
1381 ===================================================================
1382 RCS file: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ps2mips.cpp
1383 diff -N mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ps2mips.cpp
1384 --- /dev/null 1 Jan 1970 00:00:00 -0000
1385 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ps2mips.cpp 30 May 2007 09:08:10 -0000
1386 @@ -0,0 +1,131 @@
1387 +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
1388 + * Version: MPL 1.1
1389 + *
1390 + * ***** BEGIN LICENSE BLOCK *****
1391 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1392 + *
1393 + * The contents of this file are subject to the Mozilla Public License Version
1394 + * 1.1 (the "License"); you may not use this file except in compliance with
1395 + * the License. You may obtain a copy of the License at
1396 + * http://www.mozilla.org/MPL/
1397 + *
1398 + * Software distributed under the License is distributed on an "AS IS" basis,
1399 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1400 + * for the specific language governing rights and limitations under the
1401 + * License.
1402 + *
1403 + * The Original Code is mozilla.org code.
1404 + *
1405 + * The Initial Developer of the Original Code is
1406 + * Netscape Communications Corp, Inc.
1407 + * Portions created by the Initial Developer are Copyright (C) 2001
1408 + * the Initial Developer. All Rights Reserved.
1409 + *
1410 + * Contributor(s):
1411 + * Stuart Parmenter <pavlov@××××××××.com>
1412 + *
1413 + * Alternatively, the contents of this file may be used under the terms of
1414 + * either of the GNU General Public License Version 2 or later (the "GPL"),
1415 + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1416 + * in which case the provisions of the GPL or the LGPL are applicable instead
1417 + * of those above. If you wish to allow use of your version of this file only
1418 + * under the terms of either the GPL or the LGPL, and not to allow others to
1419 + * use your version of this file under the terms of the MPL, indicate your
1420 + * decision by deleting the provisions above and replace them with the notice
1421 + * and other provisions required by the GPL or the LGPL. If you do not delete
1422 + * the provisions above, a recipient may use your version of this file under
1423 + * the terms of any one of the MPL, the GPL or the LGPL.
1424 + *
1425 + * ***** END LICENSE BLOCK ***** */
1426 +
1427 +#include "xptcprivate.h"
1428 +
1429 +/*
1430 + * This is for MIPS O32 ABI
1431 + * Args contains a0-3 and then the stack.
1432 + * Because a0 is 'this', we want to skip it
1433 + */
1434 +extern "C" nsresult
1435 +PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint32* args)
1436 +{
1437 + args++; // always skip over a0
1438 +
1439 +#define PARAM_BUFFER_COUNT 16
1440 +
1441 + nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
1442 + nsXPTCMiniVariant* dispatchParams = NULL;
1443 + nsIInterfaceInfo* iface_info = NULL;
1444 + const nsXPTMethodInfo* info;
1445 + PRUint8 paramCount;
1446 + PRUint8 i;
1447 + nsresult result = NS_ERROR_FAILURE;
1448 +
1449 + NS_ASSERTION(self,"no self");
1450 +
1451 + self->GetInterfaceInfo(&iface_info);
1452 + NS_ASSERTION(iface_info,"no interface info");
1453 +
1454 + iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
1455 + NS_ASSERTION(info,"no interface info");
1456 +
1457 + paramCount = info->GetParamCount();
1458 +
1459 + // setup variant array pointer
1460 + if(paramCount > PARAM_BUFFER_COUNT)
1461 + dispatchParams = new nsXPTCMiniVariant[paramCount];
1462 + else
1463 + dispatchParams = paramBuffer;
1464 + NS_ASSERTION(dispatchParams,"no place for params");
1465 +
1466 + PRUint32* ap = args;
1467 + for(i = 0; i < paramCount; i++, ap++)
1468 + {
1469 + const nsXPTParamInfo& param = info->GetParam(i);
1470 + const nsXPTType& type = param.GetType();
1471 + nsXPTCMiniVariant* dp = &dispatchParams[i];
1472 +
1473 + if(param.IsOut() || !type.IsArithmetic())
1474 + {
1475 + dp->val.p = (void*) *ap;
1476 + continue;
1477 + }
1478 +
1479 + dp->val.p = (void*) *ap;
1480 +
1481 + switch(type)
1482 + {
1483 + case nsXPTType::T_I64 :
1484 + if ((PRWord)ap & 4) ap++;
1485 + dp->val.i64 = *((PRInt64*) ap); ap++;
1486 + break;
1487 + case nsXPTType::T_U64 :
1488 + if ((PRWord)ap & 4) ap++;
1489 + dp->val.u64 = *((PRInt64*) ap); ap++;
1490 + break;
1491 + case nsXPTType::T_DOUBLE:
1492 + if ((PRWord)ap & 4) ap++;
1493 + dp->val.d = *((double*) ap); ap++;
1494 + break;
1495 + }
1496 + }
1497 +
1498 + result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
1499 +
1500 + NS_RELEASE(iface_info);
1501 +
1502 + if(dispatchParams != paramBuffer)
1503 + delete [] dispatchParams;
1504 +
1505 + return result;
1506 +}
1507 +
1508 +#define STUB_ENTRY(n) // done in the .s file
1509 +
1510 +#define SENTINEL_ENTRY(n) \
1511 +nsresult nsXPTCStubBase::Sentinel##n() \
1512 +{ \
1513 + NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
1514 + return NS_ERROR_NOT_IMPLEMENTED; \
1515 +}
1516 +
1517 +#include "xptcstubsdef.inc"
1518 diff -urN mozilla.old/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s
1519 --- mozilla.old/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s 1970-01-01 10:00:00 +1000
1520 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s 2007-01-17 15:33:47 +1000
1521 @@ -0,0 +1,142 @@
1522 +/* -*- Mode: asm; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
1523 + * Version: MPL 1.1
1524 + *
1525 + * The contents of this file are subject to the Mozilla Public License Version
1526 + * 1.1 (the "License"); you may not use this file except in compliance with
1527 + * the License. You may obtain a copy of the License at
1528 + * http://www.mozilla.org/MPL/
1529 + *
1530 + * Software distributed under the License is distributed on an "AS IS" basis,
1531 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1532 + * for the specific language governing rights and limitations under the
1533 + * License.
1534 + *
1535 + * The Original Code is mozilla.org code.
1536 + *
1537 + * The Initial Developer of the Original Code is
1538 + * Netscape Communications Corp, Inc.
1539 + * Portions created by the Initial Developer are Copyright (C) 2001
1540 + * the Initial Developer. All Rights Reserved.
1541 + *
1542 + * Contributor(s):
1543 + * Stuart Parmenter <pavlov@××××××××.com>
1544 + * Chris Waterson <waterson@××××××××.com>
1545 + * Thiemo Seufer <seufer@×××××××××××××××××××××.de>
1546 + */
1547 +
1548 +/* This code is for MIPS using the O32 ABI. */
1549 +
1550 +#include <sys/regdef.h>
1551 +#include <sys/asm.h>
1552 +
1553 +# NARGSAVE is the argument space in the callers frame, including extra
1554 +# 'shadowed' space for the argument registers. The minimum of 4
1555 +# argument slots is sometimes predefined in the header files.
1556 +#ifndef NARGSAVE
1557 +#define NARGSAVE 4
1558 +#endif
1559 +
1560 +#define LOCALSZ 2 /* gp, ra */
1561 +#define FRAMESZ ((((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK)
1562 +
1563 +#define RAOFF (FRAMESZ - (1*SZREG))
1564 +#define GPOFF (FRAMESZ - (2*SZREG))
1565 +
1566 +#define A0OFF (FRAMESZ + (0*SZREG))
1567 +#define A1OFF (FRAMESZ + (1*SZREG))
1568 +#define A2OFF (FRAMESZ + (2*SZREG))
1569 +#define A3OFF (FRAMESZ + (3*SZREG))
1570 +
1571 + .text
1572 +
1573 +#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
1574 +#define STUB_ENTRY(x) \
1575 + .if x < 10; \
1576 + .globl _ZN14nsXPTCStubBase5Stub ##x ##Ev; \
1577 + .type _ZN14nsXPTCStubBase5Stub ##x ##Ev,@function; \
1578 + .aent _ZN14nsXPTCStubBase5Stub ##x ##Ev,0; \
1579 +_ZN14nsXPTCStubBase5Stub ##x ##Ev:; \
1580 + SETUP_GP; \
1581 + li t0,x; \
1582 + b sharedstub; \
1583 + .elseif x < 100; \
1584 + .globl _ZN14nsXPTCStubBase6Stub ##x ##Ev; \
1585 + .type _ZN14nsXPTCStubBase6Stub ##x ##Ev,@function; \
1586 + .aent _ZN14nsXPTCStubBase6Stub ##x ##Ev,0; \
1587 +_ZN14nsXPTCStubBase6Stub ##x ##Ev:; \
1588 + SETUP_GP; \
1589 + li t0,x; \
1590 + b sharedstub; \
1591 + .elseif x < 1000; \
1592 + .globl _ZN14nsXPTCStubBase7Stub ##x ##Ev; \
1593 + .type _ZN14nsXPTCStubBase7Stub ##x ##Ev,@function; \
1594 + .aent _ZN14nsXPTCStubBase7Stub ##x ##Ev,0; \
1595 +_ZN14nsXPTCStubBase7Stub ##x ##Ev:; \
1596 + SETUP_GP; \
1597 + li t0,x; \
1598 + b sharedstub; \
1599 + .else; \
1600 + .err; \
1601 + .endif
1602 +#else /* not G++ V3 ABI */
1603 +#define STUB_ENTRY(x) \
1604 + .globl Stub ##x ##__14nsXPTCStubBase; \
1605 + .type Stub ##x ##__14nsXPTCStubBase,@function; \
1606 + .aent Stub ##x ##__14nsXPTCStubBase,0; \
1607 +Stub ##x ##__14nsXPTCStubBase:; \
1608 + SETUP_GP; \
1609 + li t0,x; \
1610 + b sharedstub
1611 +#endif /* G++ V3 ABI */
1612 +
1613 +# SENTINEL_ENTRY is handled in the cpp file.
1614 +#define SENTINEL_ENTRY(x)
1615 +
1616 +#
1617 +# open a dummy frame for the function entries
1618 +#
1619 + .align 2
1620 + .type dummy,@function
1621 + .ent dummy, 0
1622 + .frame sp, FRAMESZ, ra
1623 +dummy:
1624 + SETUP_GP
1625 +
1626 +#include "xptcstubsdef.inc"
1627 +
1628 +sharedstub:
1629 + subu sp, FRAMESZ
1630 +
1631 + # specify the save register mask for gp, ra, a0-a3
1632 + .mask 0x900000F0, RAOFF-FRAMESZ
1633 +
1634 + sw ra, RAOFF(sp)
1635 + SAVE_GP(GPOFF)
1636 +
1637 + # Micro-optimization: a0 is already loaded, and its slot gets
1638 + # ignored by PrepareAndDispatch, so no need to save it here.
1639 + # sw a0, A0OFF(sp)
1640 + sw a1, A1OFF(sp)
1641 + sw a2, A2OFF(sp)
1642 + sw a3, A3OFF(sp)
1643 +
1644 + la t9, PrepareAndDispatch
1645 +
1646 + # t0 is methodIndex
1647 + move a1, t0
1648 + # have a2 point to the begin of the argument space on stack
1649 + addiu a2, sp, FRAMESZ
1650 +
1651 + # PrepareAndDispatch(that, methodIndex, args)
1652 + jalr t9
1653 +
1654 + # Micro-optimization: Using jalr explicitly has the side-effect
1655 + # of not triggering .cprestore. This is ok because we have no
1656 + # gp reference below this point. It also allows better
1657 + # instruction sscheduling.
1658 + # lw gp, GPOFF(fp)
1659 +
1660 + lw ra, RAOFF(sp)
1661 + addiu sp, FRAMESZ
1662 + j ra
1663 + END(dummy)
1664
1665
1666
1667 1.1 src/patchsets/mozilla-firefox/2.0.0.8/007_mozilla-firefox-1.5-asneeded.patch
1668
1669 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/007_mozilla-firefox-1.5-asneeded.patch?rev=1.1&view=markup
1670 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/007_mozilla-firefox-1.5-asneeded.patch?rev=1.1&content-type=text/plain
1671
1672 Index: 007_mozilla-firefox-1.5-asneeded.patch
1673 ===================================================================
1674 # Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=311236
1675
1676 --- mozilla/embedding/browser/gtk/tests/Makefile.in.orig 2005-02-04 00:01:41.000000000 +0100
1677 +++ mozilla/embedding/browser/gtk/tests/Makefile.in 2006-04-28 05:21:10.000000000 +0200
1678 @@ -75,6 +75,8 @@
1679 endif
1680 endif
1681
1682 +OS_LDFLAGS += -Wl,-rpath-link,'$(DEPTH)/dist/bin'
1683 +
1684 ifdef MOZ_ENABLE_GTK
1685 LIBS += \
1686 -lgtkembedmoz \
1687
1688
1689
1690 1.1 src/patchsets/mozilla-firefox/2.0.0.8/008_firefox-pkgconfig-1.patch
1691
1692 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/008_firefox-pkgconfig-1.patch?rev=1.1&view=markup
1693 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/008_firefox-pkgconfig-1.patch?rev=1.1&content-type=text/plain
1694
1695 Index: 008_firefox-pkgconfig-1.patch
1696 ===================================================================
1697 # Fixup pkgconfig files for broken out NSPR and NSS. Patch from Fedora.
1698 # Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=221823
1699
1700 --- mozilla/config/autoconf.mk.in.orig 2006-06-14 22:16:08.000000000 +0200
1701 +++ mozilla/config/autoconf.mk.in 2006-07-20 11:00:13.000000000 +0200
1702 @@ -57,13 +57,13 @@
1703 prefix = @prefix@
1704 exec_prefix = @exec_prefix@
1705 bindir = @bindir@
1706 -includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
1707 +includedir = $(mozappdir)/include
1708 libdir = @libdir@
1709 datadir = @datadir@
1710 mandir = @mandir@
1711 -idldir = @datadir@/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
1712 +idldir = $(mozappdir)/idl
1713
1714 -mozappdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
1715 +mozappdir = $(libdir)/mozilla-$(MOZ_APP_NAME)
1716 mredir = $(libdir)/mre/mre-$(MOZ_APP_VERSION)
1717 mrelibdir = $(mredir)/lib
1718
1719 --- mozilla/build/unix/Makefile.in.orig 2005-07-07 20:24:39.000000000 +0200
1720 +++ mozilla/build/unix/Makefile.in 2006-07-20 11:00:13.000000000 +0200
1721 @@ -61,6 +61,19 @@
1722 NSPR_VERSION=$(shell $(DEPTH)/nsprpub/config/nspr-config --version)
1723 endif
1724
1725 +# Hack to make sure that mozilla-nss.pc has the proper nss dependencies
1726 +ifdef MOZ_NATIVE_NSS
1727 +FULL_NSS_CFLAGS=$(shell $(NSS_CONFIG) --cflags)
1728 +FULL_NSS_LIBS=$(shell $(NSS_CONFIG) --libs)
1729 +NSS_NAME=nss
1730 +NSS_VERSION=$(shell $(NSS_CONFIG) --version)
1731 +else
1732 +FULL_NSS_CFLAGS=-I$(includedir)/nss
1733 +FULL_NSS_LIBS=-L$(mozappdir)/nss -lnss3 -lsmime3 -lssl3 -lsoftokn3
1734 +NSS_NAME=$(MOZ_APP_NAME)-nss
1735 +NSS_VERSION=$(MOZ_APP_VERSION)
1736 +endif
1737 +
1738 ifdef MOZ_ENABLE_GTK
1739 SUPERWIN_LIBS=-lgtksuperwin
1740 endif
1741 @@ -83,7 +96,8 @@
1742 -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \
1743 -e "s|%DEFS%|$(_DEFS)|" \
1744 -e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
1745 - -e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" > $@
1746 + -e 's|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|' \
1747 + -e 's|\(echo -L.*\)\($$\)|\1 -Wl,-R$(mozappdir)\2|' > $@
1748
1749 $(MOZ_APP_NAME)-%.pc : mozilla-%.pc.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk
1750 cat $< | sed \
1751 @@ -99,7 +113,12 @@
1752 -e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
1753 -e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" \
1754 -e "s|%NSPR_NAME%|$(NSPR_NAME)|" \
1755 - -e "s|%NSPR_VERSION%|$(NSPR_VERSION)|" > $@
1756 + -e "s|%NSPR_VERSION%|$(NSPR_VERSION)|" \
1757 + -e "s|%FULL_NSS_LIBS%|$(FULL_NSS_LIBS)|" \
1758 + -e "s|%FULL_NSS_CFLAGS%|$(FULL_NSS_CFLAGS)|" \
1759 + -e "s|%NSS_NAME%|$(NSS_NAME)|" \
1760 + -e "s|%NSS_VERSION%|$(NSS_VERSION)|" \
1761 + -e "s|\(^Libs: -L.*\)|\1 -Wl,-R\$$\{libdir}|" > $@
1762
1763 libs:: $(MOZ_APP_NAME)-config
1764 chmod 755 $<
1765 --- mozilla/build/unix/mozilla-js.pc.in.orig 2006-07-20 10:58:48.000000000 +0200
1766 +++ mozilla/build/unix/mozilla-js.pc.in 2006-07-20 11:00:13.000000000 +0200
1767 @@ -6,6 +6,6 @@
1768 Name: JavaScript
1769 Description: The Mozilla JavaScript Library
1770 Version: %MOZILLA_VERSION%
1771 -Requires: %NSPR_NAME% >= %NSPR_VERSION%
1772 +Requires: %MOZ_APP_NAME%-%NSPR_NAME% >= %NSPR_VERSION%
1773 Libs: -L${libdir} -lmozjs
1774 Cflags: -I${includedir}/js -DXP_UNIX
1775 --- mozilla/build/unix/mozilla-nspr.pc.in.orig 2006-07-20 10:59:11.000000000 +0200
1776 +++ mozilla/build/unix/mozilla-nspr.pc.in 2006-07-20 11:00:13.000000000 +0200
1777 @@ -1,12 +1,5 @@
1778 -prefix=%prefix%
1779 -exec_prefix=%exec_prefix%
1780 -libdir=%libdir%
1781 -includedir=%includedir%
1782 -
1783 Name: NSPR
1784 Description: The Netscape Portable Runtime
1785 Version: %NSPR_VERSION%
1786 -Libs: %FULL_NSPR_LIBS%
1787 -Cflags: %FULL_NSPR_CFLAGS%
1788 -
1789 +Requires: %NSPR_NAME% >= %NSPR_VERSION%
1790
1791 --- mozilla/build/unix/mozilla-xpcom.pc.in.orig 2006-07-20 10:59:32.000000000 +0200
1792 +++ mozilla/build/unix/mozilla-xpcom.pc.in 2006-07-20 11:00:13.000000000 +0200
1793 @@ -7,6 +7,6 @@
1794 Name: XPCOM
1795 Description: The Mozilla Cross Platform Component Library
1796 Version: %MOZILLA_VERSION%
1797 -Requires: %NSPR_NAME% >= %NSPR_VERSION%
1798 +Requires: %MOZ_APP_NAME%-%NSPR_NAME% >= %NSPR_VERSION%
1799 Libs: -L${libdir} -lxpcom
1800 Cflags: -I${includedir} -I${includedir}/xpcom -I${includedir}/string
1801 --- mozilla/build/unix/mozilla-nss.pc.in.orig 2006-07-20 10:59:41.000000000 +0200
1802 +++ mozilla/build/unix/mozilla-nss.pc.in 2006-07-20 11:00:13.000000000 +0200
1803 @@ -1,11 +1,4 @@
1804 -prefix=%prefix%
1805 -exec_prefix=%exec_prefix%
1806 -libdir=%libdir%
1807 -includedir=%includedir%
1808 -
1809 Name: NSS
1810 Description: Mozilla Network Security Services
1811 -Version: %MOZILLA_VERSION%
1812 -Requires: %NSPR_NAME% >= %NSPR_VERSION%
1813 -Libs: -L${libdir} -lnss3 -lsmime3 -lssl3 -lsoftokn3
1814 -Cflags: -I${includedir}/nss
1815 +Version: %NSS_VERSION%
1816 +Requires: %NSS_NAME% >= %NSS_VERSION%
1817
1818
1819
1820 1.1 src/patchsets/mozilla-firefox/2.0.0.8/032_firefox-2.0_ppc64-1.patch
1821
1822 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/032_firefox-2.0_ppc64-1.patch?rev=1.1&view=markup
1823 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/032_firefox-2.0_ppc64-1.patch?rev=1.1&content-type=text/plain
1824
1825 Index: 032_firefox-2.0_ppc64-1.patch
1826 ===================================================================
1827 # Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=361415
1828
1829 unchanged:
1830 --- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2006-11-21 17:09:28.000000000 +0000
1831 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2006-11-20 10:13:38.000000000 +0000
1832 @@ -267,6 +267,11 @@
1833 ASFILES := xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s
1834 AS := $(CC) -c -x assembler-with-cpp
1835 endif
1836 +ifeq ($(OS_ARCH)$(OS_TEST),Linuxppc64)
1837 +CPPSRCS := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp
1838 +ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s
1839 +AS := $(CC) -c -x assembler-with-cpp
1840 +endif
1841
1842 #
1843 # NetBSD/PPC
1844 diff -u mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s
1845 --- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s 2006-11-21 14:01:45.000000000 +0000
1846 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s 2006-11-22 10:43:26.000000000 +0000
1847 @@ -0,0 +1,154 @@
1848 +// -*- Mode: Asm -*-
1849 +//
1850 +// The contents of this file are subject to the Netscape Public
1851 +// License Version 1.1 (the "License"); you may not use this file
1852 +// except in compliance with the License. You may obtain a copy of
1853 +// the License at http://www.mozilla.org/NPL/
1854 +//
1855 +// Software distributed under the License is distributed on an "AS
1856 +// IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
1857 +// implied. See the License for the specific language governing
1858 +// rights and limitations under the License.
1859 +//
1860 +// The Original Code is mozilla.org code.
1861 +//
1862 +// The Initial Developer of the Original Code is Netscape
1863 +// Communications Corporation. Portions created by Netscape are
1864 +// Copyright (C) 1999 Netscape Communications Corporation. All
1865 +// Rights Reserved.
1866 +//
1867 +// Contributor(s):
1868 +// dwmw2@×××××××××.org (David Woodhouse)
1869 +// Franz.Sirl-kernel@××××××××××.com (Franz Sirl)
1870 +// beard@××××××××.com (Patrick Beard)
1871 +// waterson@××××××××.com (Chris Waterson)
1872 +//
1873 +
1874 +.set r0,0; .set r1,1; .set r2,2; .set r3,3; .set r4,4
1875 +.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
1876 +.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
1877 +.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
1878 +.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
1879 +.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
1880 +.set r30,30; .set r31,31
1881 +.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4
1882 +.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9
1883 +.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14
1884 +.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19
1885 +.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24
1886 +.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29
1887 +.set f30,30; .set f31,31
1888 +
1889 +
1890 +//
1891 +// XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
1892 +// PRUint32 paramCount, nsXPTCVariant* params)
1893 +//
1894 +
1895 + .section ".toc","aw"
1896 + .section ".text"
1897 + .align 2
1898 + .globl XPTC_InvokeByIndex
1899 + .section ".opd","aw"
1900 + .align 3
1901 +XPTC_InvokeByIndex:
1902 + .quad .XPTC_InvokeByIndex,.TOC.@tocbase
1903 + .previous
1904 + .type XPTC_InvokeByIndex,@function
1905 +.XPTC_InvokeByIndex:
1906 + mflr 0
1907 + std 0,16(r1)
1908 +
1909 + std r29,-24(r1)
1910 + std r30,-16(r1)
1911 + std r31,-8(r1)
1912 +
1913 + mr r29,r3 // Save 'that' in r29
1914 + mr r30,r4 // Save 'methodIndex' in r30
1915 + mr r31,r1 // Save old frame
1916 +
1917 + // Allocate stack frame with space for params. Since at least the
1918 + // first 7 parameters (not including 'that') will be in registers,
1919 + // we don't actually need stack space for those. We must ensure
1920 + // that the stack remains 16-byte aligned.
1921 + //
1922 + // | ..128-byte stack frame.. | | 7 GP | 13 FP | 3 NV |
1923 + // | |(params)........| regs | regs | regs |
1924 + // (r1)...........(+112)....(+128)
1925 + // (-23*8).(-16*8).(-3*8)..(r31)
1926 +
1927 + // +stack frame, -unused stack params, +regs storage, +1 for alignment
1928 + addi r7,r5,((112/8)-7+7+13+3+1)
1929 + rldicr r7,r7,3,59 // multiply by 8 and mask with ~15
1930 + neg r7,r7
1931 + stdux r1,r1,r7
1932 +
1933 +
1934 + // Call invoke_copy_to_stack(PRUint64* gpregs, double* fpregs,
1935 + // PRUint32 paramCount, nsXPTCVariant* s,
1936 + // PRUint64* d))
1937 +
1938 + // r5, r6 are passed through intact (paramCount, params)
1939 + // r7 (d) has to be r1+112 -- where parameters are passed on the stack.
1940 + // r3, r4 are above that, easier to address from r31 than from r1
1941 +
1942 + subi r3,r31,(23*8) // r3 --> GPRS
1943 + subi r4,r31,(16*8) // r4 --> FPRS
1944 + addi r7,r1,112 // r7 --> params
1945 + bl invoke_copy_to_stack
1946 + nop
1947 +
1948 + // Set up to invoke function
1949 +
1950 + ld r9,0(r29) // vtable (r29 is 'that')
1951 + mr r3,r29 // self is first arg, obviously
1952 +
1953 + sldi r30,r30,3 // Find function descriptor
1954 + add r9,r9,r30
1955 + ld r9,0(r9)
1956 +
1957 + ld r0,0(r9) // Actual address from fd.
1958 + std r2,40(r1) // Save r2 (TOC pointer)
1959 +
1960 + mtctr 0
1961 + ld r11,16(r9) // Environment pointer from fd.
1962 + ld r2,8(r9) // TOC pointer from fd.
1963 +
1964 + // Load FP and GP registers as required
1965 + ld r4, -(23*8)(r31)
1966 + ld r5, -(22*8)(r31)
1967 + ld r6, -(21*8)(r31)
1968 + ld r7, -(20*8)(r31)
1969 + ld r8, -(19*8)(r31)
1970 + ld r9, -(18*8)(r31)
1971 + ld r10, -(17*8)(r31)
1972 +
1973 + lfd f1, -(16*8)(r31)
1974 + lfd f2, -(15*8)(r31)
1975 + lfd f3, -(14*8)(r31)
1976 + lfd f4, -(13*8)(r31)
1977 + lfd f5, -(12*8)(r31)
1978 + lfd f6, -(11*8)(r31)
1979 + lfd f7, -(10*8)(r31)
1980 + lfd f8, -(9*8)(r31)
1981 + lfd f9, -(8*8)(r31)
1982 + lfd f10, -(7*8)(r31)
1983 + lfd f11, -(6*8)(r31)
1984 + lfd f12, -(5*8)(r31)
1985 + lfd f13, -(4*8)(r31)
1986 +
1987 + bctrl // Do it
1988 +
1989 + ld r2,40(r1) // Load our own TOC pointer
1990 + ld r1,0(r1) // Revert stack frame
1991 + ld 0,16(r1) // Reload lr
1992 + ld 29,-24(r1) // Restore NVGPRS
1993 + ld 30,-16(r1)
1994 + ld 31,-8(r1)
1995 + mtlr 0
1996 + blr
1997 +
1998 + .size XPTC_InvokeByIndex,.-.XPTC_InvokeByIndex
1999 +
2000 + /* Magic indicating no need for an executable stack */
2001 + .section .note.GNU-stack, "", @progbits ; .previous
2002 --- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp 1970-01-01 01:00:00.000000000 +0100
2003 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp 2006-11-21 17:00:06.000000000 +0000
2004 @@ -0,0 +1,127 @@
2005 +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2006 +/* ***** BEGIN LICENSE BLOCK *****
2007 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
2008 + *
2009 + * The contents of this file are subject to the Mozilla Public License Version
2010 + * 1.1 (the "License"); you may not use this file except in compliance with
2011 + * the License. You may obtain a copy of the License at
2012 + * http://www.mozilla.org/MPL/
2013 + *
2014 + * Software distributed under the License is distributed on an "AS IS" basis,
2015 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
2016 + * for the specific language governing rights and limitations under the
2017 + * License.
2018 + *
2019 + * The Original Code is mozilla.org code.
2020 + *
2021 + * The Initial Developer of the Original Code is
2022 + * Netscape Communications Corporation.
2023 + * Portions created by the Initial Developer are Copyright (C) 1998
2024 + * the Initial Developer. All Rights Reserved.
2025 + *
2026 + * Contributor(s):
2027 + * dwmw2@×××××××××.org (David Woodhouse)
2028 + * Franz.Sirl-kernel@××××××××××.com (Franz Sirl)
2029 + * beard@××××××××.com (Patrick Beard)
2030 + * waterson@××××××××.com (Chris Waterson)
2031 + *
2032 + * Alternatively, the contents of this file may be used under the terms of
2033 + * either of the GNU General Public License Version 2 or later (the "GPL"),
2034 + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
2035 + * in which case the provisions of the GPL or the LGPL are applicable instead
2036 + * of those above. If you wish to allow use of your version of this file only
2037 + * under the terms of either the GPL or the LGPL, and not to allow others to
2038 + * use your version of this file under the terms of the MPL, indicate your
2039 + * decision by deleting the provisions above and replace them with the notice
2040 + * and other provisions required by the GPL or the LGPL. If you do not delete
2041 + * the provisions above, a recipient may use your version of this file under
2042 + * the terms of any one of the MPL, the GPL or the LGPL.
2043 + *
2044 + * ***** END LICENSE BLOCK ***** */
2045 +
2046 +// Platform specific code to invoke XPCOM methods on native objects
2047 +
2048 +// The purpose of XPTC_InvokeByIndex() is to map a platform
2049 +// independent call to the platform ABI. To do that,
2050 +// XPTC_InvokeByIndex() has to determine the method to call via vtable
2051 +// access. The parameters for the method are read from the
2052 +// nsXPTCVariant* and prepared for the native ABI.
2053 +
2054 +#include <stdio.h>
2055 +#include "xptcprivate.h"
2056 +
2057 +// 8 integral parameters are passed in registers, not including 'that'
2058 +#define GPR_COUNT 7
2059 +
2060 +// 8 floating point parameters are passed in registers, floats are
2061 +// promoted to doubles when passed in registers
2062 +#define FPR_COUNT 13
2063 +
2064 +extern "C" PRUint32
2065 +invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
2066 +{
2067 + return PRUint32(((paramCount * 2) + 3) & ~3);
2068 +}
2069 +
2070 +extern "C" void
2071 +invoke_copy_to_stack(PRUint64* gpregs,
2072 + double* fpregs,
2073 + PRUint32 paramCount,
2074 + nsXPTCVariant* s,
2075 + PRUint64* d)
2076 +{
2077 + PRUint64 tempu64;
2078 +
2079 + for(uint32 i = 0; i < paramCount; i++, s++) {
2080 + if(s->IsPtrData())
2081 + tempu64 = (PRUint64) s->ptr;
2082 + else {
2083 + switch(s->type) {
2084 + case nsXPTType::T_FLOAT: break;
2085 + case nsXPTType::T_DOUBLE: break;
2086 + case nsXPTType::T_I8: tempu64 = s->val.i8; break;
2087 + case nsXPTType::T_I16: tempu64 = s->val.i16; break;
2088 + case nsXPTType::T_I32: tempu64 = s->val.i32; break;
2089 + case nsXPTType::T_I64: tempu64 = s->val.i64; break;
2090 + case nsXPTType::T_U8: tempu64 = s->val.u8; break;
2091 + case nsXPTType::T_U16: tempu64 = s->val.u16; break;
2092 + case nsXPTType::T_U32: tempu64 = s->val.u32; break;
2093 + case nsXPTType::T_U64: tempu64 = s->val.u64; break;
2094 + case nsXPTType::T_BOOL: tempu64 = s->val.b; break;
2095 + case nsXPTType::T_CHAR: tempu64 = s->val.c; break;
2096 + case nsXPTType::T_WCHAR: tempu64 = s->val.wc; break;
2097 + default: tempu64 = (PRUint64) s->val.p; break;
2098 + }
2099 + }
2100 +
2101 + if (!s->IsPtrData() && s->type == nsXPTType::T_DOUBLE) {
2102 + if (i < FPR_COUNT)
2103 + fpregs[i] = s->val.d;
2104 + else
2105 + *(double *)d = s->val.d;
2106 + }
2107 + else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) {
2108 + if (i < FPR_COUNT) {
2109 + fpregs[i] = s->val.f; // if passed in registers, floats are promoted to doubles
2110 + } else {
2111 + float *p = (float *)d;
2112 + p++;
2113 + *p = s->val.f;
2114 + }
2115 + }
2116 + else {
2117 + if (i < GPR_COUNT)
2118 + gpregs[i] = tempu64;
2119 + else
2120 + *d = tempu64;
2121 + }
2122 + if (i >= 7)
2123 + d++;
2124 + }
2125 +}
2126 +
2127 +extern "C"
2128 +XPTC_PUBLIC_API(nsresult)
2129 +XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
2130 + PRUint32 paramCount, nsXPTCVariant* params);
2131 +
2132 diff -u mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s
2133 --- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s 2006-11-21 16:38:52.000000000 +0000
2134 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s 2006-11-22 10:51:14.000000000 +0000
2135 @@ -0,0 +1,102 @@
2136 +// -*- Mode: Asm -*-
2137 +//
2138 +// The contents of this file are subject to the Netscape Public
2139 +// License Version 1.1 (the "License"); you may not use this file
2140 +// except in compliance with the License. You may obtain a copy of
2141 +// the License at http://www.mozilla.org/NPL/
2142 +//
2143 +// Software distributed under the License is distributed on an "AS
2144 +// IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
2145 +// implied. See the License for the specific language governing
2146 +// rights and limitations under the License.
2147 +//
2148 +// The Original Code is mozilla.org code.
2149 +//
2150 +// The Initial Developer of the Original Code is Netscape
2151 +// Communications Corporation. Portions created by Netscape are
2152 +// Copyright (C) 1999 Netscape Communications Corporation. All
2153 +// Rights Reserved.
2154 +//
2155 +// Contributor(s):
2156 +// dwmw2@×××××××××.org (David Woodhouse)
2157 +// Franz.Sirl-kernel@××××××××××.com (Franz Sirl)
2158 +// beard@××××××××.com (Patrick Beard)
2159 +// waterson@××××××××.com (Chris Waterson)
2160 +//
2161 +
2162 +.set r0,0; .set r1,1; .set RTOC,2; .set r3,3; .set r4,4
2163 +.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
2164 +.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
2165 +.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
2166 +.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
2167 +.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
2168 +.set r30,30; .set r31,31
2169 +.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4
2170 +.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9
2171 +.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14
2172 +.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19
2173 +.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24
2174 +.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29
2175 +.set f30,30; .set f31,31
2176 +
2177 + .section ".text"
2178 + .align 2
2179 + .globl SharedStub
2180 + .section ".opd","aw"
2181 + .align 3
2182 +
2183 +SharedStub:
2184 + .quad .SharedStub,.TOC.@tocbase
2185 + .previous
2186 + .type SharedStub,@function
2187 +
2188 +.SharedStub:
2189 + mflr r0
2190 +
2191 + std r4, -56(r1) // Save all GPRS
2192 + std r5, -48(r1)
2193 + std r6, -40(r1)
2194 + std r7, -32(r1)
2195 + std r8, -24(r1)
2196 + std r9, -16(r1)
2197 + std r10, -8(r1)
2198 +
2199 + stfd f13, -64(r1) // ... and FPRS
2200 + stfd f12, -72(r1)
2201 + stfd f11, -80(r1)
2202 + stfd f10, -88(r1)
2203 + stfd f9, -96(r1)
2204 + stfd f8, -104(r1)
2205 + stfd f7, -112(r1)
2206 + stfd f6, -120(r1)
2207 + stfd f5, -128(r1)
2208 + stfd f4, -136(r1)
2209 + stfd f3, -144(r1)
2210 + stfd f2, -152(r1)
2211 + stfd f1, -160(r1)
2212 +
2213 + subi r6,r1,56 // r6 --> gprData
2214 + subi r7,r1,160 // r7 --> fprData
2215 + addi r5,r1,112 // r5 --> extra stack args
2216 +
2217 + std r0, 16(r1)
2218 +
2219 + stdu r1,-288(r1)
2220 + // r3 has the 'self' pointer already
2221 +
2222 + mr r4,r11 // r4 is methodIndex selector, passed
2223 + // via r11 in the nsXPTCStubBase::StubXX() call
2224 +
2225 + bl PrepareAndDispatch
2226 + nop
2227 +
2228 + ld 1,0(r1) // restore stack
2229 + ld r0,16(r1) // restore LR
2230 + mtlr r0
2231 + blr
2232 +
2233 + .size SharedStub,.-.SharedStub
2234 +
2235 +
2236 +/* Magic indicating no need for an executable stack */
2237 +.section .note.GNU-stack, "", @progbits ; .previous
2238 unchanged:
2239 --- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp 1970-01-01 01:00:00.000000000 +0100
2240 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp 2006-11-21 16:59:46.000000000 +0000
2241 @@ -0,0 +1,247 @@
2242 +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2243 +/* ***** BEGIN LICENSE BLOCK *****
2244 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
2245 + *
2246 + * The contents of this file are subject to the Mozilla Public License Version
2247 + * 1.1 (the "License"); you may not use this file except in compliance with
2248 + * the License. You may obtain a copy of the License at
2249 + * http://www.mozilla.org/MPL/
2250 + *
2251 + * Software distributed under the License is distributed on an "AS IS" basis,
2252 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
2253 + * for the specific language governing rights and limitations under the
2254 + * License.
2255 + *
2256 + * The Original Code is mozilla.org code.
2257 + *
2258 + * The Initial Developer of the Original Code is
2259 + * Netscape Communications Corporation.
2260 + * Portions created by the Initial Developer are Copyright (C) 1999
2261 + * the Initial Developer. All Rights Reserved.
2262 + *
2263 + * Contributor(s):
2264 + * dwmw2@×××××××××.org (David Woodhouse)
2265 + * Franz.Sirl-kernel@××××××××××.com (Franz Sirl)
2266 + * beard@××××××××.com (Patrick Beard)
2267 + * waterson@××××××××.com (Chris Waterson)
2268 + *
2269 + * Alternatively, the contents of this file may be used under the terms of
2270 + * either of the GNU General Public License Version 2 or later (the "GPL"),
2271 + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
2272 + * in which case the provisions of the GPL or the LGPL are applicable instead
2273 + * of those above. If you wish to allow use of your version of this file only
2274 + * under the terms of either the GPL or the LGPL, and not to allow others to
2275 + * use your version of this file under the terms of the MPL, indicate your
2276 + * decision by deleting the provisions above and replace them with the notice
2277 + * and other provisions required by the GPL or the LGPL. If you do not delete
2278 + * the provisions above, a recipient may use your version of this file under
2279 + * the terms of any one of the MPL, the GPL or the LGPL.
2280 + *
2281 + * ***** END LICENSE BLOCK ***** */
2282 +
2283 +// Implement shared vtbl methods.
2284 +
2285 +#include "xptcprivate.h"
2286 +
2287 +// The Linux/PPC ABI (aka PPC/SYSV ABI) passes the first 8 integral
2288 +// parameters and the first 13 floating point parameters in registers
2289 +// (r3-r10 and f1-f13), no stack space is allocated for these by the
2290 +// caller. The rest of the parameters are passed in the callers stack
2291 +// area. The stack pointer has to retain 16-byte alignment, longlongs
2292 +// and doubles are aligned on 8-byte boundaries.
2293 +
2294 +#define PARAM_BUFFER_COUNT 16
2295 +#define GPR_COUNT 7
2296 +#define FPR_COUNT 13
2297 +
2298 +// PrepareAndDispatch() is called by SharedStub() and calls the actual method.
2299 +//
2300 +// - 'args[]' contains the arguments passed on stack
2301 +// - 'gprData[]' contains the arguments passed in integer registers
2302 +// - 'fprData[]' contains the arguments passed in floating point registers
2303 +//
2304 +// The parameters are mapped into an array of type 'nsXPTCMiniVariant'
2305 +// and then the method gets called.
2306 +#include <stdio.h>
2307 +extern "C" nsresult
2308 +PrepareAndDispatch(nsXPTCStubBase* self,
2309 + PRUint64 methodIndex,
2310 + PRUint64* args,
2311 + PRUint64 *gprData,
2312 + double *fprData)
2313 +{
2314 + nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
2315 + nsXPTCMiniVariant* dispatchParams = NULL;
2316 + nsIInterfaceInfo* iface_info = NULL;
2317 + const nsXPTMethodInfo* info;
2318 + PRUint32 paramCount;
2319 + PRUint32 i;
2320 + nsresult result = NS_ERROR_FAILURE;
2321 +
2322 + NS_ASSERTION(self,"no self");
2323 +
2324 + self->GetInterfaceInfo(&iface_info);
2325 + NS_ASSERTION(iface_info,"no interface info");
2326 + if (! iface_info)
2327 + return NS_ERROR_UNEXPECTED;
2328 +
2329 + iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
2330 + NS_ASSERTION(info,"no method info");
2331 + if (! info)
2332 + return NS_ERROR_UNEXPECTED;
2333 +
2334 + paramCount = info->GetParamCount();
2335 +
2336 + // setup variant array pointer
2337 + if(paramCount > PARAM_BUFFER_COUNT)
2338 + dispatchParams = new nsXPTCMiniVariant[paramCount];
2339 + else
2340 + dispatchParams = paramBuffer;
2341 +
2342 + NS_ASSERTION(dispatchParams,"no place for params");
2343 + if (! dispatchParams)
2344 + return NS_ERROR_OUT_OF_MEMORY;
2345 +
2346 + PRUint64* ap = args;
2347 + PRUint64 tempu64;
2348 +
2349 + for(i = 0; i < paramCount; i++) {
2350 + const nsXPTParamInfo& param = info->GetParam(i);
2351 + const nsXPTType& type = param.GetType();
2352 + nsXPTCMiniVariant* dp = &dispatchParams[i];
2353 +
2354 + if (!param.IsOut() && type == nsXPTType::T_DOUBLE) {
2355 + if (i < FPR_COUNT)
2356 + dp->val.d = fprData[i];
2357 + else
2358 + dp->val.d = *(double*) ap;
2359 + } else if (!param.IsOut() && type == nsXPTType::T_FLOAT) {
2360 + if (i < FPR_COUNT)
2361 + dp->val.f = (float) fprData[i]; // in registers floats are passed as doubles
2362 + else {
2363 + float *p = (float *)ap;
2364 + p++;
2365 + dp->val.f = *p;
2366 + }
2367 + } else { /* integer type or pointer */
2368 + if (i < GPR_COUNT)
2369 + tempu64 = gprData[i];
2370 + else
2371 + tempu64 = *ap;
2372 +
2373 + if (param.IsOut() || !type.IsArithmetic())
2374 + dp->val.p = (void*) tempu64;
2375 + else if (type ==nsXPTType::T_I8)
2376 + dp->val.i8 = (PRInt8) tempu64;
2377 + else if (type ==nsXPTType::T_I16)
2378 + dp->val.i16 = (PRInt16) tempu64;
2379 + else if (type ==nsXPTType::T_I32)
2380 + dp->val.i32 = (PRInt32) tempu64;
2381 + else if (type ==nsXPTType::T_I64)
2382 + dp->val.i64 = (PRInt64) tempu64;
2383 + else if (type ==nsXPTType::T_U8)
2384 + dp->val.u8 = (PRUint8) tempu64;
2385 + else if (type ==nsXPTType::T_U16)
2386 + dp->val.u16 = (PRUint16) tempu64;
2387 + else if (type ==nsXPTType::T_U32)
2388 + dp->val.u32 = (PRUint32) tempu64;
2389 + else if (type ==nsXPTType::T_U64)
2390 + dp->val.u64 = (PRUint64) tempu64;
2391 + else if (type ==nsXPTType::T_BOOL)
2392 + dp->val.b = (PRBool) tempu64;
2393 + else if (type ==nsXPTType::T_CHAR)
2394 + dp->val.c = (char) tempu64;
2395 + else if (type ==nsXPTType::T_WCHAR)
2396 + dp->val.wc = (wchar_t) tempu64;
2397 + else
2398 + NS_ASSERTION(0, "bad type");
2399 + }
2400 +
2401 + if (i >= 7)
2402 + ap++;
2403 + }
2404 +
2405 + result = self->CallMethod((PRUint16) methodIndex, info, dispatchParams);
2406 +
2407 + NS_RELEASE(iface_info);
2408 +
2409 + if (dispatchParams != paramBuffer)
2410 + delete [] dispatchParams;
2411 +
2412 + return result;
2413 +}
2414 +
2415 +// Load r11 with the constant 'n' and branch to SharedStub().
2416 +//
2417 +// XXX Yes, it's ugly that we're relying on gcc's name-mangling here;
2418 +// however, it's quick, dirty, and'll break when the ABI changes on
2419 +// us, which is what we want ;-).
2420 +
2421 +#if __GXX_ABI_VERSION < 100
2422 +#error Prehistoric GCC not supported here
2423 +#else
2424 +// gcc-3 version
2425 +//
2426 +// As G++3 ABI contains the length of the functionname in the mangled
2427 +// name, it is difficult to get a generic assembler mechanism like
2428 +// in the G++ 2.95 case.
2429 +// Create names would be like:
2430 +// _ZN14nsXPTCStubBase5Stub1Ev
2431 +// _ZN14nsXPTCStubBase6Stub12Ev
2432 +// _ZN14nsXPTCStubBase7Stub123Ev
2433 +// _ZN14nsXPTCStubBase8Stub1234Ev
2434 +// etc.
2435 +// Use assembler directives to get the names right...
2436 +
2437 +# define STUB_ENTRY(n) \
2438 +__asm__ ( \
2439 + ".section \".toc\",\"aw\" \n\t" \
2440 + ".section \".text\" \n\t" \
2441 + ".align 2 \n\t" \
2442 + ".if "#n" < 10 \n\t" \
2443 + ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \
2444 + ".section \".opd\",\"aw\" \n\t" \
2445 + ".align 3 \n\t" \
2446 +"_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \
2447 + ".quad ._ZN14nsXPTCStubBase5Stub"#n"Ev,.TOC.@tocbase \n\t" \
2448 + ".previous \n\t" \
2449 + ".type _ZN14nsXPTCStubBase5Stub"#n"Ev,@function \n\n" \
2450 +"._ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \
2451 + \
2452 + ".elseif "#n" < 100 \n\t" \
2453 + ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \
2454 + ".section \".opd\",\"aw\" \n\t" \
2455 + ".align 3 \n\t" \
2456 +"_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \
2457 + ".quad ._ZN14nsXPTCStubBase6Stub"#n"Ev,.TOC.@tocbase \n\t" \
2458 + ".previous \n\t" \
2459 + ".type _ZN14nsXPTCStubBase6Stub"#n"Ev,@function \n\n" \
2460 +"._ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \
2461 + \
2462 + ".elseif "#n" < 1000 \n\t" \
2463 + ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \
2464 + ".section \".opd\",\"aw\" \n\t" \
2465 + ".align 3 \n\t" \
2466 +"_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \
2467 + ".quad ._ZN14nsXPTCStubBase7Stub"#n"Ev,.TOC.@tocbase \n\t" \
2468 + ".previous \n\t" \
2469 + ".type _ZN14nsXPTCStubBase7Stub"#n"Ev,@function \n\n" \
2470 +"._ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \
2471 + \
2472 + ".else \n\t" \
2473 + ".err \"stub number "#n" >= 1000 not yet supported\"\n" \
2474 + ".endif \n\t" \
2475 + \
2476 + "li 11,"#n" \n\t" \
2477 + "b SharedStub \n" \
2478 +);
2479 +#endif
2480 +
2481 +#define SENTINEL_ENTRY(n) \
2482 +nsresult nsXPTCStubBase::Sentinel##n() \
2483 +{ \
2484 + NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
2485 + return NS_ERROR_NOT_IMPLEMENTED; \
2486 +}
2487 +
2488 +#include "xptcstubsdef.inc"
2489
2490
2491
2492 1.1 src/patchsets/mozilla-firefox/2.0.0.8/033_firefox-2.0_ppc_powerpc.patch
2493
2494 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/033_firefox-2.0_ppc_powerpc.patch?rev=1.1&view=markup
2495 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/033_firefox-2.0_ppc_powerpc.patch?rev=1.1&content-type=text/plain
2496
2497 Index: 033_firefox-2.0_ppc_powerpc.patch
2498 ===================================================================
2499 --- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2007-03-05 13:46:38.000000000 +0100
2500 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2007-03-05 13:47:30.000000000 +0100
2501 @@ -288,12 +288,12 @@
2502 #
2503 # Linux/PPC
2504 #
2505 -ifeq ($(OS_ARCH)$(OS_TEST),Linuxppc)
2506 +ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc)
2507 CPPSRCS := xptcinvoke_ppc_linux.cpp xptcstubs_ppc_linux.cpp
2508 ASFILES := xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s
2509 AS := $(CC) -c -x assembler-with-cpp
2510 endif
2511 -ifeq ($(OS_ARCH)$(OS_TEST),Linuxppc64)
2512 +ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc64)
2513 CPPSRCS := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp
2514 ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s
2515 AS := $(CC) -c -x assembler-with-cpp
2516
2517
2518
2519 1.1 src/patchsets/mozilla-firefox/2.0.0.8/050_respect-host-variable.patch
2520
2521 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/050_respect-host-variable.patch?rev=1.1&view=markup
2522 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/050_respect-host-variable.patch?rev=1.1&content-type=text/plain
2523
2524 Index: 050_respect-host-variable.patch
2525 ===================================================================
2526 # https://bugs.gentoo.org/show_bug.cgi?id=168893
2527
2528 --- mozilla/configure.in.old 2007-03-02 23:28:27.000000000 +0200
2529 +++ mozilla/configure.in 2007-03-02 23:29:23.000000000 +0200
2530 @@ -825,7 +825,6 @@
2531 OS_TARGET="${target_os}"
2532 OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
2533 OS_RELEASE=
2534 - OS_TEST="${target_cpu}"
2535 case "${target_os}" in
2536 linux*) OS_ARCH=Linux ;;
2537 solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;;
2538 @@ -837,8 +836,10 @@
2539 OS_TARGET=`uname -s`
2540 OS_ARCH=`uname -s | sed -e 's|/|_|g'`
2541 OS_RELEASE=`uname -r`
2542 - OS_TEST=`uname -m`
2543 fi
2544 +
2545 +OS_TEST="${target_cpu}"
2546 +
2547 _COMPILER_PREFIX=
2548
2549 HOST_OS_ARCH=`echo $host_os | sed -e 's|/|_|g'`
2550
2551
2552
2553 1.1 src/patchsets/mozilla-firefox/2.0.0.8/055_firefox-2.0_gfbsd-pthreads.patch
2554
2555 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/055_firefox-2.0_gfbsd-pthreads.patch?rev=1.1&view=markup
2556 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/055_firefox-2.0_gfbsd-pthreads.patch?rev=1.1&content-type=text/plain
2557
2558 Index: 055_firefox-2.0_gfbsd-pthreads.patch
2559 ===================================================================
2560 # https://bugs.gentoo.org/show_bug.cgi?id=169825
2561
2562 --- mozilla/config/rules.mk.orig Thu Sep 14 14:07:03 2006
2563 +++ mozilla/config/rules.mk Wed Oct 18 11:00:09 2006
2564 @@ -442,9 +442,7 @@
2565 endif
2566
2567 ifeq ($(OS_ARCH),FreeBSD)
2568 -ifdef IS_COMPONENT
2569 -EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
2570 -endif
2571 +EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic -lc
2572 endif
2573
2574 ifeq ($(OS_ARCH),NetBSD)
2575 --- mozilla/configure.in.orig 2007-02-06 02:37:37 -0300
2576 +++ mozilla/configure.in 2007-03-07 15:35:41 -0300
2577 @@ -2667,7 +2667,7 @@
2578 *-hpux11.*)
2579 ;;
2580 *)
2581 - AC_CHECK_LIB(c_r, gethostbyname_r)
2582 + AC_SEARCH_LIBS([gethostbyname_r], [c_r])
2583 ;;
2584 esac
2585 AC_CHECK_LIB(m, atan)
2586 --- mozilla/configure.in.orig 2007-02-06 02:37:37 -0300
2587 +++ mozilla/configure.in 2007-03-07 13:59:53 -0300
2588 @@ -2839,11 +2839,12 @@
2589 *-*-freebsd*)
2590 AC_DEFINE(_REENTRANT)
2591 AC_DEFINE(_THREAD_SAFE)
2592 - dnl -pthread links in -lc_r, so don't specify it explicitly.
2593 - if test "$ac_cv_have_dash_pthread" = "yes"; then
2594 - _PTHREAD_LDFLAGS="-pthread"
2595 + dnl use the environment PTHREAD_LIBS
2596 + if test -n "$PTHREAD_LIBS"; then
2597 + _PTHREAD_LDFLAGS="$PTHREAD_LIBS"
2598 else
2599 - _PTHREAD_LDFLAGS="-lc_r"
2600 + _PTHREAD_LDFLAGS="-lpthread"
2601 fi
2602 + LDFLAGS="${_PTHREAD_LDFLAGS} ${LDFLAGS}"
2603 ;;
2604
2605
2606
2607 1.1 src/patchsets/mozilla-firefox/2.0.0.8/060_embed-typeaheadfind-1.patch
2608
2609 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/060_embed-typeaheadfind-1.patch?rev=1.1&view=markup
2610 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/060_embed-typeaheadfind-1.patch?rev=1.1&content-type=text/plain
2611
2612 Index: 060_embed-typeaheadfind-1.patch
2613 ===================================================================
2614 # Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=273524
2615
2616 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/Makefile.in mozilla/extensions/typeaheadfind/Makefile.in
2617 --- mozilla.orig/extensions/typeaheadfind/Makefile.in 2005-03-26 00:12:02.000000000 -0500
2618 +++ mozilla/extensions/typeaheadfind/Makefile.in 2005-03-26 11:39:29.000000000 -0500
2619 @@ -31,7 +31,7 @@
2620
2621 include $(DEPTH)/config/autoconf.mk
2622
2623 -MODULE = typeaheadfind
2624 +MODULE = typeaheadfindsea
2625 DIRS = public src resources
2626
2627 include $(topsrcdir)/config/rules.mk
2628 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/public/Makefile.in mozilla/extensions/typeaheadfind/public/Makefile.in
2629 --- mozilla.orig/extensions/typeaheadfind/public/Makefile.in 2005-03-26 00:12:02.000000000 -0500
2630 +++ mozilla/extensions/typeaheadfind/public/Makefile.in 2005-03-26 11:39:29.000000000 -0500
2631 @@ -31,11 +31,11 @@
2632
2633 include $(DEPTH)/config/autoconf.mk
2634
2635 -MODULE=typeaheadfind
2636 -XPIDL_MODULE=typeaheadfind
2637 +MODULE=typeaheadfindsea
2638 +XPIDL_MODULE=typeaheadfindsea
2639 GRE_MODULE = 1
2640
2641 -XPIDLSRCS= ./nsITypeAheadFind.idl \
2642 +XPIDLSRCS= ./nsITypeAheadFindSea.idl \
2643 $(NULL)
2644
2645
2646 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/public/nsITypeAheadFind.idl mozilla/extensions/typeaheadfind/public/nsITypeAheadFind.idl
2647 --- mozilla.orig/extensions/typeaheadfind/public/nsITypeAheadFind.idl 2005-03-26 00:12:02.000000000 -0500
2648 +++ mozilla/extensions/typeaheadfind/public/nsITypeAheadFind.idl 1969-12-31 19:00:00.000000000 -0500
2649 @@ -1,88 +0,0 @@
2650 -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2651 -/* ***** BEGIN LICENSE BLOCK *****
2652 - * Version: MPL 1.1/GPL 2.0/LGPL 2.1
2653 - *
2654 - * The contents of this file are subject to the Mozilla Public License Version
2655 - * 1.1 (the "License"); you may not use this file except in compliance with
2656 - * the License. You may obtain a copy of the License at
2657 - * http://www.mozilla.org/MPL/
2658 - *
2659 - * Software distributed under the License is distributed on an "AS IS" basis,
2660 - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
2661 - * for the specific language governing rights and limitations under the
2662 - * License.
2663 - *
2664 - * The Original Code is mozilla.org code.
2665 - *
2666 - * The Initial Developer of the Original Code is
2667 - * Netscape Communications Corporation.
2668 - * Portions created by the Initial Developer are Copyright (C) 1998
2669 - * the Initial Developer. All Rights Reserved.
2670 - *
2671 - * Contributor(s):
2672 - * Original Author: Aaron Leventhal (aaronl@××××××××.com)
2673 - *
2674 - * Alternatively, the contents of this file may be used under the terms of
2675 - * either the GNU General Public License Version 2 or later (the "GPL"), or
2676 - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
2677 - * in which case the provisions of the GPL or the LGPL are applicable instead
2678 - * of those above. If you wish to allow use of your version of this file only
2679 - * under the terms of either the GPL or the LGPL, and not to allow others to
2680 - * use your version of this file under the terms of the MPL, indicate your
2681 - * decision by deleting the provisions above and replace them with the notice
2682 - * and other provisions required by the GPL or the LGPL. If you do not delete
2683 - * the provisions above, a recipient may use your version of this file under
2684 - * the terms of any one of the MPL, the GPL or the LGPL.
2685 - *
2686 - * ***** END LICENSE BLOCK ***** */
2687 -
2688 -#include "nsISupports.idl"
2689 -#include "domstubs.idl"
2690 -#include "nsISupportsPrimitives.idl"
2691 -
2692 -%{ C++
2693 - #include "nsIDOMEvent.h"
2694 -
2695 - #define NS_TYPEAHEADFIND_CID \
2696 - {0x46590685, 0xbc00, 0x4aac, {0xab, 0xed, 0x2c, 0x10, 0xa5, 0xb9, 0x45, 0xa4}}
2697 -
2698 - #define NS_TYPEAHEADFIND_CONTRACTID "@mozilla.org/typeaheadfind;1"
2699 -%}
2700 -
2701 -interface nsIDOMEvent;
2702 -
2703 -[scriptable, uuid(AD1C62CC-72F4-4c5b-BE78-503854F9E0D8)]
2704 -interface nsITypeAheadFind : nsISupports
2705 -{
2706 - /** Is type ahead find mode currently on? */
2707 - readonly attribute boolean isActive;
2708 -
2709 - /** Manually start type ahead find mode */
2710 - void startNewFind(in nsIDOMWindow aWindow, in boolean aLinksOnly);
2711 -
2712 - /** Manually cancel type ahead find mode */
2713 - void cancelFind();
2714 -
2715 - /**
2716 - * Will find as you type start automatically if the user
2717 - * types with the focus on page content other than a textfield or select?
2718 - * If autostart is off, the startNewFind() method can be used to enact
2719 - * type ahead find, as well as cmd_findTypeLinks or cmd_findTypeText.
2720 - */
2721 - void setAutoStart(in nsIDOMWindow aWindow, in boolean aIsAutoStartOn);
2722 - boolean getAutoStart(in nsIDOMWindow aWindow);
2723 -
2724 - /**
2725 - * Find next recurrence if typeaheadfind was the last used find,
2726 - * as opposed to regular find. Returns false in nsISupportsPRBool if we
2727 - * don't handle the request.
2728 - */
2729 - void findNext(in boolean aReverse, in nsISupportsInterfacePointer aCallerWindowSupports);
2730 -
2731 - /*
2732 - * Go back and remove one character from find string
2733 - * Returns true if backspace used
2734 - */
2735 - boolean backOneChar();
2736 -};
2737 -
2738 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/public/nsITypeAheadFindSea.idl mozilla/extensions/typeaheadfind/public/nsITypeAheadFindSea.idl
2739 --- mozilla.orig/extensions/typeaheadfind/public/nsITypeAheadFindSea.idl 1969-12-31 19:00:00.000000000 -0500
2740 +++ mozilla/extensions/typeaheadfind/public/nsITypeAheadFindSea.idl 2005-03-26 11:39:29.000000000 -0500
2741 @@ -0,0 +1,88 @@
2742 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2743 +/* ***** BEGIN LICENSE BLOCK *****
2744 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
2745 + *
2746 + * The contents of this file are subject to the Mozilla Public License Version
2747 + * 1.1 (the "License"); you may not use this file except in compliance with
2748 + * the License. You may obtain a copy of the License at
2749 + * http://www.mozilla.org/MPL/
2750 + *
2751 + * Software distributed under the License is distributed on an "AS IS" basis,
2752 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
2753 + * for the specific language governing rights and limitations under the
2754 + * License.
2755 + *
2756 + * The Original Code is mozilla.org code.
2757 + *
2758 + * The Initial Developer of the Original Code is
2759 + * Netscape Communications Corporation.
2760 + * Portions created by the Initial Developer are Copyright (C) 1998
2761 + * the Initial Developer. All Rights Reserved.
2762 + *
2763 + * Contributor(s):
2764 + * Original Author: Aaron Leventhal (aaronl@××××××××.com)
2765 + *
2766 + * Alternatively, the contents of this file may be used under the terms of
2767 + * either the GNU General Public License Version 2 or later (the "GPL"), or
2768 + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
2769 + * in which case the provisions of the GPL or the LGPL are applicable instead
2770 + * of those above. If you wish to allow use of your version of this file only
2771 + * under the terms of either the GPL or the LGPL, and not to allow others to
2772 + * use your version of this file under the terms of the MPL, indicate your
2773 + * decision by deleting the provisions above and replace them with the notice
2774 + * and other provisions required by the GPL or the LGPL. If you do not delete
2775 + * the provisions above, a recipient may use your version of this file under
2776 + * the terms of any one of the MPL, the GPL or the LGPL.
2777 + *
2778 + * ***** END LICENSE BLOCK ***** */
2779 +
2780 +#include "nsISupports.idl"
2781 +#include "domstubs.idl"
2782 +#include "nsISupportsPrimitives.idl"
2783 +
2784 +%{ C++
2785 + #include "nsIDOMEvent.h"
2786 +
2787 + #define NS_TYPEAHEADFINDSEA_CID \
2788 + {0x46590685, 0xbc00, 0x4aac, {0xab, 0xed, 0x2c, 0x10, 0xa5, 0xb9, 0x45, 0xa4}}
2789 +
2790 + #define NS_TYPEAHEADFINDSEA_CONTRACTID "@mozilla.org/typeaheadfindsea;1"
2791 +%}
2792 +
2793 +interface nsIDOMEvent;
2794 +
2795 +[scriptable, uuid(AD1C62CC-72F4-4c5b-BE78-503854F9E0D8)]
2796 +interface nsITypeAheadFindSea : nsISupports
2797 +{
2798 + /** Is type ahead find mode currently on? */
2799 + readonly attribute boolean isActive;
2800 +
2801 + /** Manually start type ahead find mode */
2802 + void startNewFind(in nsIDOMWindow aWindow, in boolean aLinksOnly);
2803 +
2804 + /** Manually cancel type ahead find mode */
2805 + void cancelFind();
2806 +
2807 + /**
2808 + * Will find as you type start automatically if the user
2809 + * types with the focus on page content other than a textfield or select?
2810 + * If autostart is off, the startNewFind() method can be used to enact
2811 + * type ahead find, as well as cmd_findTypeLinks or cmd_findTypeText.
2812 + */
2813 + void setAutoStart(in nsIDOMWindow aWindow, in boolean aIsAutoStartOn);
2814 + boolean getAutoStart(in nsIDOMWindow aWindow);
2815 +
2816 + /**
2817 + * Find next recurrence if typeaheadfindsea was the last used find,
2818 + * as opposed to regular find. Returns false in nsISupportsPRBool if we
2819 + * don't handle the request.
2820 + */
2821 + void findNext(in boolean aReverse, in nsISupportsInterfacePointer aCallerWindowSupports);
2822 +
2823 + /*
2824 + * Go back and remove one character from find string
2825 + * Returns true if backspace used
2826 + */
2827 + boolean backOneChar();
2828 +};
2829 +
2830 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/resources/content/prefs/typeaheadfind.js mozilla/extensions/typeaheadfind/resources/content/prefs/typeaheadfind.js
2831 --- mozilla.orig/extensions/typeaheadfind/resources/content/prefs/typeaheadfind.js 2005-03-26 00:12:02.000000000 -0500
2832 +++ mozilla/extensions/typeaheadfind/resources/content/prefs/typeaheadfind.js 2005-03-26 11:39:29.000000000 -0500
2833 @@ -36,7 +36,7 @@
2834 *
2835 * ***** END LICENSE BLOCK ***** */
2836
2837 -pref("accessibility.typeaheadfind", true);
2838 -pref("accessibility.typeaheadfind.linksonly", true);
2839 -pref("accessibility.typeaheadfind.startlinksonly", false);
2840 -pref("accessibility.typeaheadfind.timeout", 5000);
2841 +pref("accessibility.typeaheadfindsea", true);
2842 +pref("accessibility.typeaheadfindsea.linksonly", true);
2843 +pref("accessibility.typeaheadfindsea.startlinksonly", false);
2844 +pref("accessibility.typeaheadfindsea.timeout", 5000);
2845 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/resources/jar.mn mozilla/extensions/typeaheadfind/resources/jar.mn
2846 --- mozilla.orig/extensions/typeaheadfind/resources/jar.mn 2005-03-26 00:12:02.000000000 -0500
2847 +++ mozilla/extensions/typeaheadfind/resources/jar.mn 2005-03-26 11:39:29.000000000 -0500
2848 @@ -1,5 +1,5 @@
2849 en-US.jar:
2850 - locale/en-US/global/typeaheadfind.properties (locale/en-US/typeaheadfind.properties)
2851 + locale/en-US/global/typeaheadfindsea.properties (locale/en-US/typeaheadfindsea.properties)
2852
2853 toolkit.jar:
2854 content/global/notfound.wav (content/notfound.wav)
2855 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/resources/locale/en-US/typeaheadfind.properties mozilla/extensions/typeaheadfind/resources/locale/en-US/typeaheadfind.properties
2856 --- mozilla.orig/extensions/typeaheadfind/resources/locale/en-US/typeaheadfind.properties 2005-03-26 00:12:02.000000000 -0500
2857 +++ mozilla/extensions/typeaheadfind/resources/locale/en-US/typeaheadfind.properties 1969-12-31 19:00:00.000000000 -0500
2858 @@ -1,13 +0,0 @@
2859 -openparen = (
2860 -closeparen = )
2861 -textfound = Text found: "
2862 -textnotfound = Text not found: "
2863 -linkfound = Link found: "
2864 -linknotfound = Link not found: "
2865 -closequote = "
2866 -stopfind = Find stopped.
2867 -starttextfind = Starting -- find text as you type
2868 -startlinkfind = Starting -- find links as you type
2869 -repeated = repeated
2870 -nextmatch = - next match
2871 -prevmatch = - previous match
2872 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/resources/locale/en-US/typeaheadfindsea.properties mozilla/extensions/typeaheadfind/resources/locale/en-US/typeaheadfindsea.properties
2873 --- mozilla.orig/extensions/typeaheadfind/resources/locale/en-US/typeaheadfindsea.properties 1969-12-31 19:00:00.000000000 -0500
2874 +++ mozilla/extensions/typeaheadfind/resources/locale/en-US/typeaheadfindsea.properties 2005-03-26 11:39:29.000000000 -0500
2875 @@ -0,0 +1,13 @@
2876 +openparen = (
2877 +closeparen = )
2878 +textfound = Text found: "
2879 +textnotfound = Text not found: "
2880 +linkfound = Link found: "
2881 +linknotfound = Link not found: "
2882 +closequote = "
2883 +stopfind = Find stopped.
2884 +starttextfind = Starting -- find text as you type
2885 +startlinkfind = Starting -- find links as you type
2886 +repeated = repeated
2887 +nextmatch = - next match
2888 +prevmatch = - previous match
2889 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/Makefile.in mozilla/extensions/typeaheadfind/src/Makefile.in
2890 --- mozilla.orig/extensions/typeaheadfind/src/Makefile.in 2005-03-26 00:12:02.000000000 -0500
2891 +++ mozilla/extensions/typeaheadfind/src/Makefile.in 2005-03-26 11:39:29.000000000 -0500
2892 @@ -31,15 +31,15 @@
2893
2894 include $(DEPTH)/config/autoconf.mk
2895
2896 -MODULE = typeaheadfind
2897 -LIBRARY_NAME = typeaheadfind
2898 +MODULE = typeaheadfindsea
2899 +LIBRARY_NAME = typeaheadfindsea
2900 ifneq ($(OS_ARCH),WINNT)
2901 -SHORT_LIBNAME = typahead
2902 +SHORT_LIBNAME = typaheadsea
2903 endif
2904 GRE_MODULE = 1
2905 MOZILLA_INTERNAL_API = 1
2906
2907 -PACKAGE_FILE = typeaheadfind.pkg
2908 +PACKAGE_FILE = typeaheadfindsea.pkg
2909
2910 REQUIRES = appcomps \
2911 embedcomponents \
2912 @@ -66,7 +66,7 @@
2913
2914 EXPORT_LIBRARY = 1
2915 IS_COMPONENT = 1
2916 -MODULE_NAME = nsTypeAheadFind
2917 +MODULE_NAME = nsTypeAheadFindSea
2918
2919 CPPSRCS = \
2920 nsTypeAheadFind.cpp \
2921 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFind.cpp mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp
2922 --- mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFind.cpp 2005-03-26 00:12:02.000000000 -0500
2923 +++ mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp 2005-03-26 11:39:29.000000000 -0500
2924 @@ -114,8 +114,8 @@
2925 ////////////////////////////////////////////////////////////////////////
2926
2927
2928 -NS_INTERFACE_MAP_BEGIN(nsTypeAheadFind)
2929 - NS_INTERFACE_MAP_ENTRY(nsITypeAheadFind)
2930 +NS_INTERFACE_MAP_BEGIN(nsTypeAheadFindSea)
2931 + NS_INTERFACE_MAP_ENTRY(nsITypeAheadFindSea)
2932 NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
2933 NS_INTERFACE_MAP_ENTRY(nsITimerCallback)
2934 NS_INTERFACE_MAP_ENTRY(nsIScrollPositionListener)
2935 @@ -128,8 +128,8 @@
2936 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsIDOMEventListener, nsIDOMKeyListener)
2937 NS_INTERFACE_MAP_END
2938
2939 -NS_IMPL_ADDREF(nsTypeAheadFind)
2940 -NS_IMPL_RELEASE(nsTypeAheadFind)
2941 +NS_IMPL_ADDREF(nsTypeAheadFindSea)
2942 +NS_IMPL_RELEASE(nsTypeAheadFindSea)
2943
2944 static NS_DEFINE_IID(kRangeCID, NS_RANGE_CID);
2945 static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
2946 @@ -138,11 +138,11 @@
2947
2948 #define NS_FIND_CONTRACTID "@mozilla.org/embedcomp/rangefind;1"
2949
2950 -nsTypeAheadFind* nsTypeAheadFind::sInstance = nsnull;
2951 -PRInt32 nsTypeAheadFind::sAccelKey = -1; // magic value of -1 when unitialized
2952 +nsTypeAheadFindSea* nsTypeAheadFindSea::sInstance = nsnull;
2953 +PRInt32 nsTypeAheadFindSea::sAccelKey = -1; // magic value of -1 when unitialized
2954
2955
2956 -nsTypeAheadFind::nsTypeAheadFind():
2957 +nsTypeAheadFindSea::nsTypeAheadFindSea():
2958 mIsFindAllowedInWindow(PR_FALSE), mAutoStartPref(PR_FALSE),
2959 mLinksOnlyPref(PR_FALSE), mStartLinksOnlyPref(PR_FALSE),
2960 mLinksOnly(PR_FALSE), mIsTypeAheadOn(PR_FALSE), mCaretBrowsingOn(PR_FALSE),
2961 @@ -161,25 +161,25 @@
2962 static PRInt32 gInstanceCount;
2963 ++gInstanceCount;
2964 NS_ASSERTION(gInstanceCount == 1,
2965 - "There should be only 1 instance of nsTypeAheadFind!");
2966 + "There should be only 1 instance of nsTypeAheadFindSea!");
2967 #endif
2968 }
2969
2970
2971 -nsTypeAheadFind::~nsTypeAheadFind()
2972 +nsTypeAheadFindSea::~nsTypeAheadFindSea()
2973 {
2974 RemoveDocListeners();
2975 mTimer = nsnull;
2976
2977 nsCOMPtr<nsIPrefBranch2> prefInternal(do_GetService(NS_PREFSERVICE_CONTRACTID));
2978 if (prefInternal) {
2979 - prefInternal->RemoveObserver("accessibility.typeaheadfind", this);
2980 + prefInternal->RemoveObserver("accessibility.typeaheadfindsea", this);
2981 prefInternal->RemoveObserver("accessibility.browsewithcaret", this);
2982 }
2983 }
2984
2985 nsresult
2986 -nsTypeAheadFind::Init()
2987 +nsTypeAheadFindSea::Init()
2988 {
2989 nsresult rv = NS_NewISupportsArray(getter_AddRefs(mManualFindWindows));
2990 NS_ENSURE_SUCCESS(rv, rv);
2991 @@ -196,7 +196,7 @@
2992 }
2993
2994 // ----------- Listen to prefs ------------------
2995 - rv = prefInternal->AddObserver("accessibility.typeaheadfind", this, PR_FALSE);
2996 + rv = prefInternal->AddObserver("accessibility.typeaheadfindsea", this, PR_FALSE);
2997 NS_ENSURE_SUCCESS(rv, rv);
2998
2999 rv = prefInternal->AddObserver("accessibility.browsewithcaret", this, PR_FALSE);
3000 @@ -217,11 +217,11 @@
3001 return rv;
3002 }
3003
3004 -nsTypeAheadFind *
3005 -nsTypeAheadFind::GetInstance()
3006 +nsTypeAheadFindSea *
3007 +nsTypeAheadFindSea::GetInstance()
3008 {
3009 if (!sInstance) {
3010 - sInstance = new nsTypeAheadFind();
3011 + sInstance = new nsTypeAheadFindSea();
3012 if (!sInstance)
3013 return nsnull;
3014
3015 @@ -241,14 +241,14 @@
3016
3017
3018 void
3019 -nsTypeAheadFind::ReleaseInstance()
3020 +nsTypeAheadFindSea::ReleaseInstance()
3021 {
3022 NS_IF_RELEASE(sInstance);
3023 }
3024
3025
3026 void
3027 -nsTypeAheadFind::Shutdown()
3028 +nsTypeAheadFindSea::Shutdown()
3029 {
3030 // Application shutdown
3031 mTimer = nsnull;
3032 @@ -264,14 +264,14 @@
3033 // ------- Pref Callbacks (2) ---------------
3034
3035 nsresult
3036 -nsTypeAheadFind::PrefsReset()
3037 +nsTypeAheadFindSea::PrefsReset()
3038 {
3039 nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));
3040 NS_ENSURE_TRUE(prefBranch, NS_ERROR_FAILURE);
3041
3042 PRBool wasTypeAheadOn = mIsTypeAheadOn;
3043
3044 - prefBranch->GetBoolPref("accessibility.typeaheadfind", &mIsTypeAheadOn);
3045 + prefBranch->GetBoolPref("accessibility.typeaheadfindsea", &mIsTypeAheadOn);
3046
3047 if (mIsTypeAheadOn != wasTypeAheadOn) {
3048 if (!mIsTypeAheadOn) {
3049 @@ -291,7 +291,7 @@
3050 do_GetService(kStringBundleServiceCID);
3051
3052 if (stringBundleService)
3053 - stringBundleService->CreateBundle(TYPEAHEADFIND_BUNDLE_URL,
3054 + stringBundleService->CreateBundle(TYPEAHEADFINDSEA_BUNDLE_URL,
3055 getter_AddRefs(mStringBundle));
3056
3057 // Observe find again commands. We'll handle them if we were the last find
3058 @@ -306,34 +306,34 @@
3059 }
3060
3061 PRBool oldAutoStartPref = mAutoStartPref;
3062 - prefBranch->GetBoolPref("accessibility.typeaheadfind.autostart",
3063 + prefBranch->GetBoolPref("accessibility.typeaheadfindsea.autostart",
3064 &mAutoStartPref);
3065 if (mAutoStartPref != oldAutoStartPref) {
3066 ResetGlobalAutoStart(mAutoStartPref);
3067 }
3068
3069 - prefBranch->GetBoolPref("accessibility.typeaheadfind.linksonly",
3070 + prefBranch->GetBoolPref("accessibility.typeaheadfindsea.linksonly",
3071 &mLinksOnlyPref);
3072
3073 - prefBranch->GetBoolPref("accessibility.typeaheadfind.startlinksonly",
3074 + prefBranch->GetBoolPref("accessibility.typeaheadfindsea.startlinksonly",
3075 &mStartLinksOnlyPref);
3076
3077 PRBool isSoundEnabled = PR_TRUE;
3078 - prefBranch->GetBoolPref("accessibility.typeaheadfind.enablesound",
3079 + prefBranch->GetBoolPref("accessibility.typeaheadfindsea.enablesound",
3080 &isSoundEnabled);
3081 nsXPIDLCString soundStr;
3082 if (isSoundEnabled) {
3083 - prefBranch->GetCharPref("accessibility.typeaheadfind.soundURL",
3084 + prefBranch->GetCharPref("accessibility.typeaheadfindsea.soundURL",
3085 getter_Copies(soundStr));
3086 }
3087 mNotFoundSoundURL = soundStr;
3088
3089 PRBool isTimeoutEnabled = PR_FALSE;
3090 - prefBranch->GetBoolPref("accessibility.typeaheadfind.enabletimeout",
3091 + prefBranch->GetBoolPref("accessibility.typeaheadfindsea.enabletimeout",
3092 &isTimeoutEnabled);
3093 PRInt32 timeoutLength = 0;
3094 if (isTimeoutEnabled) {
3095 - prefBranch->GetIntPref("accessibility.typeaheadfind.timeout",
3096 + prefBranch->GetIntPref("accessibility.typeaheadfindsea.timeout",
3097 &timeoutLength);
3098 }
3099 mTimeoutLength = timeoutLength;
3100 @@ -349,7 +349,7 @@
3101 // ------- nsITimer Methods (1) ---------------
3102
3103 NS_IMETHODIMP
3104 -nsTypeAheadFind::Notify(nsITimer *timer)
3105 +nsTypeAheadFindSea::Notify(nsITimer *timer)
3106 {
3107 CancelFind();
3108 return NS_OK;
3109 @@ -358,7 +358,7 @@
3110 // ----------- nsIObserver Methods (1) -------------------
3111
3112 NS_IMETHODIMP
3113 -nsTypeAheadFind::Observe(nsISupports *aSubject, const char *aTopic,
3114 +nsTypeAheadFindSea::Observe(nsISupports *aSubject, const char *aTopic,
3115 const PRUnichar *aData)
3116 {
3117 PRBool isOpening;
3118 @@ -476,7 +476,7 @@
3119
3120
3121 nsresult
3122 -nsTypeAheadFind::UseInWindow(nsIDOMWindow *aDOMWin)
3123 +nsTypeAheadFindSea::UseInWindow(nsIDOMWindow *aDOMWin)
3124 {
3125 NS_ENSURE_ARG_POINTER(aDOMWin);
3126
3127 @@ -529,7 +529,7 @@
3128 // ------- nsIDOMEventListener Methods (1) ---------------
3129
3130 NS_IMETHODIMP
3131 -nsTypeAheadFind::HandleEvent(nsIDOMEvent* aEvent)
3132 +nsTypeAheadFindSea::HandleEvent(nsIDOMEvent* aEvent)
3133 {
3134 nsAutoString eventType;
3135 aEvent->GetType(eventType);
3136 @@ -589,21 +589,21 @@
3137 // ------- nsIDOMKeyListener Methods (3) ---------------
3138
3139 NS_IMETHODIMP
3140 -nsTypeAheadFind::KeyDown(nsIDOMEvent* aEvent)
3141 +nsTypeAheadFindSea::KeyDown(nsIDOMEvent* aEvent)
3142 {
3143 return NS_OK;
3144 }
3145
3146
3147 NS_IMETHODIMP
3148 -nsTypeAheadFind::KeyUp(nsIDOMEvent* aEvent)
3149 +nsTypeAheadFindSea::KeyUp(nsIDOMEvent* aEvent)
3150 {
3151 return NS_OK;
3152 }
3153
3154
3155 NS_IMETHODIMP
3156 -nsTypeAheadFind::KeyPress(nsIDOMEvent* aEvent)
3157 +nsTypeAheadFindSea::KeyPress(nsIDOMEvent* aEvent)
3158 {
3159 if (!mIsTypeAheadOn || mIsMenuBarActive || mIsMenuPopupActive) {
3160 return NS_OK;
3161 @@ -733,7 +733,7 @@
3162
3163
3164 NS_IMETHODIMP
3165 -nsTypeAheadFind::BackOneChar(PRBool *aIsBackspaceUsed)
3166 +nsTypeAheadFindSea::BackOneChar(PRBool *aIsBackspaceUsed)
3167 {
3168 if (!mFocusedDocSelection) {
3169 *aIsBackspaceUsed = PR_FALSE;
3170 @@ -863,7 +863,7 @@
3171
3172
3173 nsresult
3174 -nsTypeAheadFind::HandleChar(PRUnichar aChar)
3175 +nsTypeAheadFindSea::HandleChar(PRUnichar aChar)
3176 {
3177 // Add a printable char to mTypeAheadBuffer, then search for buffer contents
3178
3179 @@ -1039,7 +1039,7 @@
3180
3181
3182 void
3183 -nsTypeAheadFind::SaveFind()
3184 +nsTypeAheadFindSea::SaveFind()
3185 {
3186 // Store find string for find-next
3187 mFindNextBuffer = mTypeAheadBuffer;
3188 @@ -1060,14 +1060,14 @@
3189 mFindService->SetSearchString(mFindNextBuffer);
3190 }
3191
3192 - // --- If accessibility.typeaheadfind.timeout is set,
3193 + // --- If accessibility.typeaheadfindsea.timeout is set,
3194 // cancel find after specified # milliseconds ---
3195 StartTimeout();
3196 }
3197
3198
3199 void
3200 -nsTypeAheadFind::PlayNotFoundSound()
3201 +nsTypeAheadFindSea::PlayNotFoundSound()
3202 {
3203 if (mNotFoundSoundURL.IsEmpty()) // no sound
3204 return;
3205 @@ -1097,7 +1097,7 @@
3206
3207
3208 NS_IMETHODIMP
3209 -nsTypeAheadFind::HandleText(nsIDOMEvent* aTextEvent)
3210 +nsTypeAheadFindSea::HandleText(nsIDOMEvent* aTextEvent)
3211 {
3212 // This is called multiple times in the middle of an
3213 // IME composition
3214 @@ -1145,7 +1145,7 @@
3215
3216
3217 NS_IMETHODIMP
3218 -nsTypeAheadFind::HandleStartComposition(nsIDOMEvent* aCompositionEvent)
3219 +nsTypeAheadFindSea::HandleStartComposition(nsIDOMEvent* aCompositionEvent)
3220 {
3221 // This is called once at the start of an IME composition
3222
3223 @@ -1167,7 +1167,7 @@
3224
3225
3226 NS_IMETHODIMP
3227 -nsTypeAheadFind::HandleEndComposition(nsIDOMEvent* aCompositionEvent)
3228 +nsTypeAheadFindSea::HandleEndComposition(nsIDOMEvent* aCompositionEvent)
3229 {
3230 // This is called once at the end of an IME composition
3231
3232 @@ -1198,28 +1198,28 @@
3233
3234
3235 NS_IMETHODIMP
3236 -nsTypeAheadFind::HandleQueryComposition(nsIDOMEvent* aCompositionEvent)
3237 +nsTypeAheadFindSea::HandleQueryComposition(nsIDOMEvent* aCompositionEvent)
3238 {
3239 return NS_OK;
3240 }
3241
3242
3243 NS_IMETHODIMP
3244 -nsTypeAheadFind::HandleQueryReconversion(nsIDOMEvent* aCompositionEvent)
3245 +nsTypeAheadFindSea::HandleQueryReconversion(nsIDOMEvent* aCompositionEvent)
3246 {
3247 return NS_OK;
3248 }
3249
3250
3251 NS_IMETHODIMP
3252 -nsTypeAheadFind::HandleQueryCaretRect(nsIDOMEvent* aCompositionEvent)
3253 +nsTypeAheadFindSea::HandleQueryCaretRect(nsIDOMEvent* aCompositionEvent)
3254 {
3255 return NS_OK;
3256 }
3257
3258
3259 nsresult
3260 -nsTypeAheadFind::FindItNow(nsIPresShell *aPresShell,
3261 +nsTypeAheadFindSea::FindItNow(nsIPresShell *aPresShell,
3262 PRBool aIsRepeatingSameChar, PRBool aIsLinksOnly,
3263 PRBool aIsFirstVisiblePreferred)
3264 {
3265 @@ -1241,7 +1241,7 @@
3266
3267 nsCOMPtr<nsISupports> startingContainer = presContext->GetContainer();
3268 nsCOMPtr<nsIDocShellTreeItem> treeItem(do_QueryInterface(startingContainer));
3269 - NS_ASSERTION(treeItem, "Bug 175321 Crashes with Type Ahead Find [@ nsTypeAheadFind::FindItNow]");
3270 + NS_ASSERTION(treeItem, "Bug 175321 Crashes with Type Ahead Find [@ nsTypeAheadFindSea::FindItNow]");
3271 if (!treeItem) {
3272 return NS_ERROR_FAILURE;
3273 }
3274 @@ -1465,7 +1465,7 @@
3275
3276
3277 nsresult
3278 -nsTypeAheadFind::GetSearchContainers(nsISupports *aContainer,
3279 +nsTypeAheadFindSea::GetSearchContainers(nsISupports *aContainer,
3280 PRBool aIsRepeatingSameChar,
3281 PRBool aIsFirstVisiblePreferred,
3282 PRBool aCanUseDocSelection,
3283 @@ -1573,7 +1573,7 @@
3284
3285
3286 void
3287 -nsTypeAheadFind::RangeStartsInsideLink(nsIDOMRange *aRange,
3288 +nsTypeAheadFindSea::RangeStartsInsideLink(nsIDOMRange *aRange,
3289 nsIPresShell *aPresShell,
3290 PRBool *aIsInsideLink,
3291 PRBool *aIsStartingLink)
3292 @@ -1680,7 +1680,7 @@
3293
3294
3295 NS_IMETHODIMP
3296 -nsTypeAheadFind::ScrollPositionWillChange(nsIScrollableView *aView,
3297 +nsTypeAheadFindSea::ScrollPositionWillChange(nsIScrollableView *aView,
3298 nscoord aX, nscoord aY)
3299 {
3300 return NS_OK;
3301 @@ -1688,7 +1688,7 @@
3302
3303
3304 NS_IMETHODIMP
3305 -nsTypeAheadFind::ScrollPositionDidChange(nsIScrollableView *aScrollableView,
3306 +nsTypeAheadFindSea::ScrollPositionDidChange(nsIScrollableView *aScrollableView,
3307 nscoord aX, nscoord aY)
3308 {
3309 if (!mIsFindingText)
3310 @@ -1699,7 +1699,7 @@
3311
3312
3313 NS_IMETHODIMP
3314 -nsTypeAheadFind::NotifySelectionChanged(nsIDOMDocument *aDoc,
3315 +nsTypeAheadFindSea::NotifySelectionChanged(nsIDOMDocument *aDoc,
3316 nsISelection *aSel, PRInt16 aReason)
3317 {
3318 if (!mIsFindingText) {
3319 @@ -1716,10 +1716,10 @@
3320 }
3321
3322
3323 -// ---------------- nsITypeAheadFind --------------------
3324 +// ---------------- nsITypeAheadFindSea --------------------
3325
3326 NS_IMETHODIMP
3327 -nsTypeAheadFind::FindNext(PRBool aFindBackwards, nsISupportsInterfacePointer *aCallerWindowSupports)
3328 +nsTypeAheadFindSea::FindNext(PRBool aFindBackwards, nsISupportsInterfacePointer *aCallerWindowSupports)
3329 {
3330 NS_ENSURE_TRUE(aCallerWindowSupports, NS_ERROR_FAILURE);
3331
3332 @@ -1731,7 +1731,7 @@
3333 return NS_OK;
3334 }
3335
3336 - // Compare the top level content pres shell of typeaheadfind
3337 + // Compare the top level content pres shell of typeaheadfindsea
3338 // with the top level content pres shell window where find next is happening
3339 // If they're different, exit so that webbrowswerfind can handle FindNext()
3340
3341 @@ -1764,7 +1764,7 @@
3342 NS_ENSURE_TRUE(callerPresShell, NS_OK);
3343
3344 if (callerPresShell != typeAheadPresShell) {
3345 - // This means typeaheadfind is active in a different window or doc
3346 + // This means typeaheadfindsea is active in a different window or doc
3347 // So it's not appropriate to find next for the current window
3348 mFindNextBuffer.Truncate();
3349 return NS_OK;
3350 @@ -1782,7 +1782,7 @@
3351 webBrowserFind->GetSearchString(getter_Copies(webBrowserFindString));
3352 if (!webBrowserFindString.Equals(mFindNextBuffer)) {
3353 // If they're not equal, then the find dialog was used last,
3354 - // not typeaheadfind. Typeaheadfind applies to the last find,
3355 + // not typeaheadfindsea. Typeaheadfind applies to the last find,
3356 // so we should let nsIWebBrowserFind::FindNext() do it.
3357 mFindNextBuffer.Truncate();
3358 return NS_OK;
3359 @@ -1832,7 +1832,7 @@
3360
3361
3362 NS_IMETHODIMP
3363 -nsTypeAheadFind::GetIsActive(PRBool *aIsActive)
3364 +nsTypeAheadFindSea::GetIsActive(PRBool *aIsActive)
3365 {
3366 *aIsActive = mLinksOnlyManuallySet || !mTypeAheadBuffer.IsEmpty();
3367
3368 @@ -1845,7 +1845,7 @@
3369 */
3370
3371 NS_IMETHODIMP
3372 -nsTypeAheadFind::StartNewFind(nsIDOMWindow *aWindow, PRBool aLinksOnly)
3373 +nsTypeAheadFindSea::StartNewFind(nsIDOMWindow *aWindow, PRBool aLinksOnly)
3374 {
3375 if (!mFind || !mIsTypeAheadOn || !aWindow)
3376 return NS_ERROR_FAILURE; // Type Ahead Find not correctly initialized
3377 @@ -1878,7 +1878,7 @@
3378 }
3379
3380 void
3381 -nsTypeAheadFind::ResetGlobalAutoStart(PRBool aAutoStart)
3382 +nsTypeAheadFindSea::ResetGlobalAutoStart(PRBool aAutoStart)
3383 {
3384 // Enumerate through the current top level windows
3385 // and either attach or remove window listeners
3386 @@ -1916,7 +1916,7 @@
3387
3388
3389 NS_IMETHODIMP
3390 -nsTypeAheadFind::SetAutoStart(nsIDOMWindow *aDOMWin, PRBool aAutoStartOn)
3391 +nsTypeAheadFindSea::SetAutoStart(nsIDOMWindow *aDOMWin, PRBool aAutoStartOn)
3392 {
3393 if (!aDOMWin) {
3394 return NS_ERROR_FAILURE;
3395 @@ -1946,7 +1946,7 @@
3396
3397
3398 NS_IMETHODIMP
3399 -nsTypeAheadFind::GetAutoStart(nsIDOMWindow *aDOMWin, PRBool *aIsAutoStartOn)
3400 +nsTypeAheadFindSea::GetAutoStart(nsIDOMWindow *aDOMWin, PRBool *aIsAutoStartOn)
3401 {
3402 *aIsAutoStartOn = PR_FALSE;
3403
3404 @@ -2014,7 +2014,7 @@
3405
3406
3407 NS_IMETHODIMP
3408 -nsTypeAheadFind::CancelFind()
3409 +nsTypeAheadFindSea::CancelFind()
3410 {
3411 // Stop current find if:
3412 // 1. Escape pressed
3413 @@ -2070,7 +2070,7 @@
3414 // ------- Helper Methods ---------------
3415
3416 void
3417 -nsTypeAheadFind::GetTopContentPresShell(nsIDocShellTreeItem *aDocShellTreeItem,
3418 +nsTypeAheadFindSea::GetTopContentPresShell(nsIDocShellTreeItem *aDocShellTreeItem,
3419 nsIPresShell **aPresShell)
3420 {
3421 *aPresShell = nsnull;
3422 @@ -2086,7 +2086,7 @@
3423 }
3424
3425 void
3426 -nsTypeAheadFind::GetStartWindow(nsIDOMWindow *aWindow, nsIDOMWindow **aStartWindow)
3427 +nsTypeAheadFindSea::GetStartWindow(nsIDOMWindow *aWindow, nsIDOMWindow **aStartWindow)
3428 {
3429 // Return the root ancestor content window of aWindow
3430
3431 @@ -2118,7 +2118,7 @@
3432 }
3433
3434 nsresult
3435 -nsTypeAheadFind::GetWebBrowserFind(nsIDOMWindow *aWin,
3436 +nsTypeAheadFindSea::GetWebBrowserFind(nsIDOMWindow *aWin,
3437 nsIWebBrowserFind **aWebBrowserFind)
3438 {
3439 NS_ENSURE_ARG_POINTER(aWin);
3440 @@ -2143,7 +2143,7 @@
3441
3442
3443 void
3444 -nsTypeAheadFind::StartTimeout()
3445 +nsTypeAheadFindSea::StartTimeout()
3446 {
3447 if (mTimeoutLength) {
3448 if (!mTimer) {
3449 @@ -2159,7 +2159,7 @@
3450 }
3451
3452 void
3453 -nsTypeAheadFind::SetSelectionLook(nsIPresShell *aPresShell,
3454 +nsTypeAheadFindSea::SetSelectionLook(nsIPresShell *aPresShell,
3455 PRBool aChangeColor,
3456 PRBool aEnabled)
3457 {
3458 @@ -2167,8 +2167,8 @@
3459 return;
3460
3461 // Show caret when type ahead find is on
3462 - // Also paint selection bright (typeaheadfind on) or normal
3463 - // (typeaheadfind off)
3464 + // Also paint selection bright (typeaheadfindsea on) or normal
3465 + // (typeaheadfindsea off)
3466
3467 if (aChangeColor) {
3468 mFocusedDocSelCon->SetDisplaySelection(nsISelectionController::SELECTION_ATTENTION);
3469 @@ -2211,7 +2211,7 @@
3470
3471
3472 void
3473 -nsTypeAheadFind::RemoveDocListeners()
3474 +nsTypeAheadFindSea::RemoveDocListeners()
3475 {
3476 nsCOMPtr<nsIPresShell> presShell(GetPresShell());
3477 nsIViewManager* vm = nsnull;
3478 @@ -2245,7 +2245,7 @@
3479
3480
3481 void
3482 -nsTypeAheadFind::AttachDocListeners(nsIPresShell *aPresShell)
3483 +nsTypeAheadFindSea::AttachDocListeners(nsIPresShell *aPresShell)
3484 {
3485 if (!aPresShell) {
3486 return;
3487 @@ -2275,7 +2275,7 @@
3488
3489
3490 void
3491 -nsTypeAheadFind::RemoveWindowListeners(nsIDOMWindow *aDOMWin)
3492 +nsTypeAheadFindSea::RemoveWindowListeners(nsIDOMWindow *aDOMWin)
3493 {
3494 nsCOMPtr<nsIDOMEventTarget> chromeEventHandler;
3495 GetChromeEventHandler(aDOMWin, getter_AddRefs(chromeEventHandler));
3496 @@ -2332,7 +2332,7 @@
3497
3498
3499 void
3500 -nsTypeAheadFind::AttachWindowListeners(nsIDOMWindow *aDOMWin)
3501 +nsTypeAheadFindSea::AttachWindowListeners(nsIDOMWindow *aDOMWin)
3502 {
3503 nsCOMPtr<nsIDOMEventTarget> chromeEventHandler;
3504 GetChromeEventHandler(aDOMWin, getter_AddRefs(chromeEventHandler));
3505 @@ -2385,7 +2385,7 @@
3506
3507
3508 void
3509 -nsTypeAheadFind::GetChromeEventHandler(nsIDOMWindow *aDOMWin,
3510 +nsTypeAheadFindSea::GetChromeEventHandler(nsIDOMWindow *aDOMWin,
3511 nsIDOMEventTarget **aChromeTarget)
3512 {
3513 nsCOMPtr<nsPIDOMWindow> privateDOMWindow(do_QueryInterface(aDOMWin));
3514 @@ -2401,7 +2401,7 @@
3515 }
3516
3517 PRBool
3518 -nsTypeAheadFind::IsTargetContentOkay(nsIContent *aContent)
3519 +nsTypeAheadFindSea::IsTargetContentOkay(nsIContent *aContent)
3520 {
3521 if (!aContent) {
3522 return PR_FALSE;
3523 @@ -2439,7 +2439,7 @@
3524
3525
3526 nsresult
3527 -nsTypeAheadFind::GetTargetIfTypeAheadOkay(nsIDOMEvent *aEvent,
3528 +nsTypeAheadFindSea::GetTargetIfTypeAheadOkay(nsIDOMEvent *aEvent,
3529 nsIContent **aTargetContent,
3530 nsIPresShell **aTargetPresShell)
3531 {
3532 @@ -2522,7 +2522,7 @@
3533
3534
3535 void
3536 -nsTypeAheadFind::GetSelection(nsIPresShell *aPresShell,
3537 +nsTypeAheadFindSea::GetSelection(nsIPresShell *aPresShell,
3538 nsISelectionController **aSelCon,
3539 nsISelection **aDOMSel)
3540 {
3541 @@ -2544,7 +2544,7 @@
3542
3543
3544 PRBool
3545 -nsTypeAheadFind::IsRangeVisible(nsIPresShell *aPresShell,
3546 +nsTypeAheadFindSea::IsRangeVisible(nsIPresShell *aPresShell,
3547 nsPresContext *aPresContext,
3548 nsIDOMRange *aRange, PRBool aMustBeInViewPort,
3549 PRBool aGetTopVisibleLeaf,
3550 @@ -2698,7 +2698,7 @@
3551
3552
3553 nsresult
3554 -nsTypeAheadFind::GetTranslatedString(const nsAString& aKey,
3555 +nsTypeAheadFindSea::GetTranslatedString(const nsAString& aKey,
3556 nsAString& aStringOut)
3557 {
3558 nsXPIDLString xsValue;
3559 @@ -2716,7 +2716,7 @@
3560
3561
3562 void
3563 -nsTypeAheadFind::DisplayStatus(PRBool aSuccess, nsIContent *aFocusedContent,
3564 +nsTypeAheadFindSea::DisplayStatus(PRBool aSuccess, nsIContent *aFocusedContent,
3565 PRBool aClearStatus, const PRUnichar *aText)
3566 {
3567 // pres shell -> pres context -> container -> tree item ->
3568 @@ -2863,7 +2863,7 @@
3569 // Make sure we're not focused on a text field, listbox
3570 // or other form control that needs typeahead keystrokes
3571 if (focusedContent) {
3572 - *aResult = nsTypeAheadFind::IsTargetContentOkay(focusedContent);
3573 + *aResult = nsTypeAheadFindSea::IsTargetContentOkay(focusedContent);
3574 return NS_OK;
3575 }
3576
3577 @@ -2928,8 +2928,8 @@
3578 EnsureContentWindow(domWinInternal, getter_AddRefs(startContentWin));
3579 NS_ENSURE_TRUE(startContentWin, NS_ERROR_FAILURE);
3580
3581 - nsCOMPtr<nsITypeAheadFind> typeAhead =
3582 - do_GetService(NS_TYPEAHEADFIND_CONTRACTID);
3583 + nsCOMPtr<nsITypeAheadFindSea> typeAhead =
3584 + do_GetService(NS_TYPEAHEADFINDSEA_CONTRACTID);
3585 NS_ENSURE_TRUE(typeAhead, NS_ERROR_FAILURE);
3586
3587 return typeAhead->StartNewFind(startContentWin, isLinkSearch);
3588 @@ -3013,7 +3013,7 @@
3589 }
3590
3591 already_AddRefed<nsIPresShell>
3592 -nsTypeAheadFind::GetPresShell()
3593 +nsTypeAheadFindSea::GetPresShell()
3594 {
3595 if (!mFocusedWeakShell)
3596 return nsnull;
3597 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFind.h mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.h
3598 --- mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFind.h 2005-03-26 00:12:02.000000000 -0500
3599 +++ mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.h 2005-03-26 11:39:29.000000000 -0500
3600 @@ -62,13 +62,13 @@
3601 #include "nsIDOMRange.h"
3602 #include "nsIDOMWindow.h"
3603 #include "nsIDocShellTreeItem.h"
3604 -#include "nsITypeAheadFind.h"
3605 +#include "nsITypeAheadFindSea.h"
3606 #include "nsIStringBundle.h"
3607 #include "nsISupportsArray.h"
3608 #include "nsISound.h"
3609
3610 -#define TYPEAHEADFIND_BUNDLE_URL \
3611 - "chrome://global/locale/typeaheadfind.properties"
3612 +#define TYPEAHEADFINDSEA_BUNDLE_URL \
3613 + "chrome://global/locale/typeaheadfindsea.properties"
3614 #define TYPEAHEADFIND_NOTFOUND_WAV_URL \
3615 "chrome://global/content/notfound.wav"
3616
3617 @@ -82,7 +82,7 @@
3618
3619 const int kMaxBadCharsBeforeCancel = 3;
3620
3621 -class nsTypeAheadFind : public nsITypeAheadFind,
3622 +class nsTypeAheadFindSea : public nsITypeAheadFindSea,
3623 public nsIDOMKeyListener,
3624 public nsIDOMTextListener,
3625 public nsIDOMCompositionListener,
3626 @@ -93,13 +93,13 @@
3627 public nsSupportsWeakReference
3628 {
3629 public:
3630 - nsTypeAheadFind();
3631 - virtual ~nsTypeAheadFind();
3632 + nsTypeAheadFindSea();
3633 + virtual ~nsTypeAheadFindSea();
3634
3635 - NS_DEFINE_STATIC_CID_ACCESSOR(NS_TYPEAHEADFIND_CID);
3636 + NS_DEFINE_STATIC_CID_ACCESSOR(NS_TYPEAHEADFINDSEA_CID);
3637
3638 NS_DECL_ISUPPORTS
3639 - NS_DECL_NSITYPEAHEADFIND
3640 + NS_DECL_NSITYPEAHEADFINDSEA
3641 NS_DECL_NSIOBSERVER
3642 NS_DECL_NSIDOMEVENTLISTENER
3643 NS_DECL_NSISELECTIONLISTENER
3644 @@ -127,7 +127,7 @@
3645 // ----- nsITimerCallback -----------------------------
3646 NS_DECL_NSITIMERCALLBACK
3647
3648 - static nsTypeAheadFind *GetInstance();
3649 + static nsTypeAheadFindSea *GetInstance();
3650 static void ReleaseInstance(void);
3651 static PRBool IsTargetContentOkay(nsIContent *aContent);
3652
3653 @@ -185,7 +185,7 @@
3654 nsresult GetTranslatedString(const nsAString& aKey, nsAString& aStringOut);
3655
3656 // Used by GetInstance and ReleaseInstance
3657 - static nsTypeAheadFind *sInstance;
3658 + static nsTypeAheadFindSea *sInstance;
3659
3660 // Current find state
3661 nsString mTypeAheadBuffer;
3662 @@ -196,7 +196,7 @@
3663
3664 // PRBool's are used instead of PRPackedBool's where the address of the
3665 // boolean variable is getting passed into a method. For example:
3666 - // GetBoolPref("accessibility.typeaheadfind.linksonly", &mLinksOnlyPref);
3667 + // GetBoolPref("accessibility.typeaheadfindsea.linksonly", &mLinksOnlyPref);
3668 PRBool mIsFindAllowedInWindow;
3669 PRBool mAutoStartPref;
3670 PRBool mLinksOnlyPref;
3671 @@ -251,7 +251,7 @@
3672 nsCOMPtr<nsIDOMWindow> mFocusedWindow;
3673 nsCOMPtr<nsIWeakReference> mFocusedWeakShell;
3674
3675 - // Windows where typeaheadfind doesn't auto start as the user types
3676 + // Windows where typeaheadfindsea doesn't auto start as the user types
3677 nsCOMPtr<nsISupportsArray> mManualFindWindows;
3678 };
3679
3680 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFindRegistration.cpp mozilla/extensions/typeaheadfind/src/nsTypeAheadFindRegistration.cpp
3681 --- mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFindRegistration.cpp 2005-03-26 00:12:02.000000000 -0500
3682 +++ mozilla/extensions/typeaheadfind/src/nsTypeAheadFindRegistration.cpp 2005-03-26 11:39:40.000000000 -0500
3683 @@ -55,7 +55,7 @@
3684
3685 // This function is called at component registration time
3686 static NS_METHOD
3687 -nsTypeAheadFindRegistrationProc(nsIComponentManager *aCompMgr, nsIFile *aPath,
3688 +nsTypeAheadFindSeaRegistrationProc(nsIComponentManager *aCompMgr, nsIFile *aPath,
3689 const char *registryLocation,
3690 const char *componentType,
3691 const nsModuleComponentInfo *info)
3692 @@ -64,7 +64,7 @@
3693 // an application component. This makes sure that we're
3694 // initialized on application startup.
3695
3696 - // Register nsTypeAheadFind to be instantiated on startup.
3697 + // Register nsTypeAheadFindSea to be instantiated on startup.
3698 // XXX This is needed on linux, but for some reason not needed on win32.
3699 nsresult rv;
3700 nsCOMPtr<nsICategoryManager> categoryManager =
3701 @@ -74,7 +74,7 @@
3702 rv = categoryManager->AddCategoryEntry(APPSTARTUP_CATEGORY,
3703 - "Type Ahead Find",
3704 + "Type Ahead Find Sea",
3705 "service,"
3706 - NS_TYPEAHEADFIND_CONTRACTID,
3707 + NS_TYPEAHEADFINDSEA_CONTRACTID,
3708 PR_TRUE, PR_TRUE, nsnull);
3709 }
3710
3711 @@ -82,22 +82,22 @@
3712 }
3713
3714
3715 -NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsTypeAheadFind,
3716 - nsTypeAheadFind::GetInstance)
3717 +NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsTypeAheadFindSea,
3718 + nsTypeAheadFindSea::GetInstance)
3719
3720 static void PR_CALLBACK
3721 -TypeAheadFindModuleDtor(nsIModule* self)
3722 +TypeAheadFindSeaModuleDtor(nsIModule* self)
3723 {
3724 - nsTypeAheadFind::ReleaseInstance();
3725 + nsTypeAheadFindSea::ReleaseInstance();
3726 }
3727
3728 static const nsModuleComponentInfo components[] =
3729 {
3730 - { "TypeAheadFind Component", NS_TYPEAHEADFIND_CID,
3731 - NS_TYPEAHEADFIND_CONTRACTID, nsTypeAheadFindConstructor,
3732 - nsTypeAheadFindRegistrationProc, nsnull // Unregistration proc
3733 + { "TypeAheadFindSea Component", NS_TYPEAHEADFINDSEA_CID,
3734 + NS_TYPEAHEADFINDSEA_CONTRACTID, nsTypeAheadFindSeaConstructor,
3735 + nsTypeAheadFindSeaRegistrationProc, nsnull // Unregistration proc
3736 }
3737 };
3738
3739 -NS_IMPL_NSGETMODULE_WITH_DTOR(nsTypeAheadFind, components,
3740 - TypeAheadFindModuleDtor)
3741 +NS_IMPL_NSGETMODULE_WITH_DTOR(nsTypeAheadFindSea, components,
3742 + TypeAheadFindSeaModuleDtor)
3743 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/typeaheadfind.pkg mozilla/extensions/typeaheadfind/src/typeaheadfind.pkg
3744 --- mozilla.orig/extensions/typeaheadfind/src/typeaheadfind.pkg 2005-03-26 00:12:02.000000000 -0500
3745 +++ mozilla/extensions/typeaheadfind/src/typeaheadfind.pkg 1969-12-31 19:00:00.000000000 -0500
3746 @@ -1,9 +0,0 @@
3747 -# why not ship this with GRE/embedding, if we're building it?
3748 -
3749 -[xpfe-browser browser]
3750 -#if SHARED_LIBRARY
3751 -dist/bin/components/@SHARED_LIBRARY@
3752 -#else
3753 -!staticcomp @LIBRARY@ @MODULE_NAME@
3754 -#endif
3755 -!xpt dist/bin/components/typeaheadfind.xpt
3756 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/typeaheadfindsea.pkg mozilla/extensions/typeaheadfind/src/typeaheadfindsea.pkg
3757 --- mozilla.orig/extensions/typeaheadfind/src/typeaheadfindsea.pkg 1969-12-31 19:00:00.000000000 -0500
3758 +++ mozilla/extensions/typeaheadfind/src/typeaheadfindsea.pkg 2005-03-26 11:39:29.000000000 -0500
3759 @@ -0,0 +1,9 @@
3760 +# why not ship this with GRE/embedding, if we're building it?
3761 +
3762 +[xpfe-browser browser]
3763 +#if SHARED_LIBRARY
3764 +dist/bin/components/@SHARED_LIBRARY@
3765 +#else
3766 +!staticcomp @LIBRARY@ @MODULE_NAME@
3767 +#endif
3768 +!xpt dist/bin/components/typeaheadfindsea.xpt
3769
3770
3771
3772 1.1 src/patchsets/mozilla-firefox/2.0.0.8/063_firefox-rpath-3.patch
3773
3774 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/063_firefox-rpath-3.patch?rev=1.1&view=markup
3775 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/063_firefox-rpath-3.patch?rev=1.1&content-type=text/plain
3776
3777 Index: 063_firefox-rpath-3.patch
3778 ===================================================================
3779 # Gentoo http://bugs.gentoo.org/show_bug.cgi?id=100597
3780
3781 --- mozilla/config/rules.mk.orig 2006-07-07 06:13:36.000000000 +0200
3782 +++ mozilla/config/rules.mk 2006-07-19 13:22:04.000000000 +0200
3783 @@ -510,7 +510,12 @@
3784 #
3785 ifeq ($(OS_ARCH),Linux)
3786 ifdef IS_COMPONENT
3787 +DSO_LDOPTS += -Wl,-rpath,'$$ORIGIN:$$ORIGIN/..'
3788 +OS_LDFLAGS += -Wl,-rpath,'$$ORIGIN:$$ORIGIN/..'
3789 EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
3790 +else
3791 +DSO_LDOPTS += -Wl,-rpath,'$$ORIGIN'
3792 +OS_LDFLAGS += -Wl,-rpath,'$$ORIGIN'
3793 endif
3794 endif
3795
3796
3797
3798
3799 1.1 src/patchsets/mozilla-firefox/2.0.0.8/064_firefox-nsplugins-v2.patch
3800
3801 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/064_firefox-nsplugins-v2.patch?rev=1.1&view=markup
3802 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/064_firefox-nsplugins-v2.patch?rev=1.1&content-type=text/plain
3803
3804 Index: 064_firefox-nsplugins-v2.patch
3805 ===================================================================
3806 # Gentoo's Add a search path for plugins. by agriffis
3807
3808 --- mozilla/xpcom/io/nsAppFileLocationProvider.cpp.orig 2006-07-16 22:38:44.000000000 +0200
3809 +++ mozilla/xpcom/io/nsAppFileLocationProvider.cpp 2006-07-16 22:39:41.000000000 +0200
3810 @@ -215,6 +215,14 @@
3811 if (NS_SUCCEEDED(rv))
3812 rv = localFile->AppendRelativeNativePath(PLUGINS_DIR_NAME);
3813 }
3814 + else if (nsCRT::strcmp(prop, GENTOO_NSPLUGINS_DIR) == 0)
3815 + {
3816 + rv = NS_NewNativeLocalFile(nsDependentCString(GENTOO_NSPLUGINS_DIR), PR_TRUE, getter_AddRefs(localFile));
3817 + }
3818 + else if (nsCRT::strcmp(prop, GENTOO_NSBROWSER_PLUGINS_DIR) == 0)
3819 + {
3820 + rv = NS_NewNativeLocalFile(nsDependentCString(GENTOO_NSBROWSER_PLUGINS_DIR), PR_TRUE, getter_AddRefs(localFile));
3821 + }
3822 #if defined(XP_MAC) || defined(XP_MACOSX)
3823 else if (nsCRT::strcmp(prop, NS_MACOSX_USER_PLUGIN_DIR) == 0)
3824 {
3825 @@ -617,7 +625,7 @@
3826
3827 *_retval = new nsAppDirectoryEnumerator(this, keys);
3828 #else
3829 - static const char* keys[] = { nsnull, NS_USER_PLUGINS_DIR, NS_APP_PLUGINS_DIR, nsnull };
3830 + static const char* keys[] = { nsnull, GENTOO_NSPLUGINS_DIR, GENTOO_NSBROWSER_PLUGINS_DIR, NS_USER_PLUGINS_DIR, NS_APP_PLUGINS_DIR, nsnull };
3831 if (!keys[0] && !(keys[0] = PR_GetEnv("MOZ_PLUGIN_PATH"))) {
3832 static const char nullstr = 0;
3833 keys[0] = &nullstr;
3834
3835
3836
3837 1.1 src/patchsets/mozilla-firefox/2.0.0.8/401_firefox-1.5-theme-change.patch
3838
3839 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/401_firefox-1.5-theme-change.patch?rev=1.1&view=markup
3840 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/401_firefox-1.5-theme-change.patch?rev=1.1&content-type=text/plain
3841
3842 Index: 401_firefox-1.5-theme-change.patch
3843 ===================================================================
3844 Index: layout/base/nsPresContext.cpp
3845 ===================================================================
3846 RCS file: /cvsroot/mozilla/layout/base/nsPresContext.cpp,v
3847 retrieving revision 3.288.12.2.4.1
3848 diff -d -u -p -r3.288.12.2.4.1 nsPresContext.cpp
3849 --- layout/base/nsPresContext.cpp 21 Apr 2006 23:30:50 -0000 3.288.12.2.4.1
3850 +++ layout/base/nsPresContext.cpp 26 Sep 2006 19:26:40 -0000
3851 @@ -73,6 +73,9 @@
3852 #include "nsIDOMDocument.h"
3853 #include "nsAutoPtr.h"
3854 #include "nsEventStateManager.h"
3855 +#include "nsIEventQueue.h"
3856 +#include "nsIEventQueueService.h"
3857 +
3858 #ifdef IBMBIDI
3859 #include "nsBidiPresUtils.h"
3860 #endif // IBMBIDI
3861 @@ -267,6 +270,7 @@ nsPresContext::~nsPresContext()
3862 NS_IF_RELEASE(mDeviceContext);
3863 NS_IF_RELEASE(mLookAndFeel);
3864 NS_IF_RELEASE(mLangGroup);
3865 + NS_IF_RELEASE(mEventQueueService);
3866 }
3867
3868 NS_IMPL_ISUPPORTS2(nsPresContext, nsPresContext, nsIObserver)
3869 @@ -285,6 +289,17 @@ static const char* const kGenericFont[]
3870 ".fantasy."
3871 };
3872
3873 +// Set to true when LookAndFeelChanged needs to be called. This is used
3874 +// because the look and feel is a service, so there's no need to notify it from
3875 +// more than one prescontext.
3876 +static PRBool sLookAndFeelChanged;
3877 +
3878 +// Set to true when ThemeChanged needs to be called on mTheme. This is used
3879 +// because mTheme is a service, so there's no need to notify it from more than
3880 +// one prescontext.
3881 +static PRBool sThemeChanged;
3882 +
3883 +
3884 void
3885 nsPresContext::GetFontPreferences()
3886 {
3887 @@ -709,6 +724,9 @@ nsPresContext::Init(nsIDeviceContext* aD
3888 this);
3889 #endif
3890
3891 + rv = CallGetService(NS_EVENTQUEUESERVICE_CONTRACTID, &mEventQueueService);
3892 + NS_ENSURE_SUCCESS(rv, rv);
3893 +
3894 // Initialize our state from the user preferences
3895 GetUserPreferences();
3896
3897 @@ -1180,33 +1198,126 @@ nsPresContext::GetTheme()
3898 void
3899 nsPresContext::ThemeChanged()
3900 {
3901 + if (!mPendingThemeChanged) {
3902 + sLookAndFeelChanged = PR_TRUE;
3903 + sThemeChanged = PR_TRUE;
3904 +
3905 + nsCOMPtr<nsIEventQueue> eventQ;
3906 + mEventQueueService->
3907 + GetSpecialEventQueue(nsIEventQueueService::UI_THREAD_EVENT_QUEUE,
3908 + getter_AddRefs(eventQ));
3909 + if (!eventQ) {
3910 + return;
3911 + }
3912 +
3913 + PLEvent* evt = new PLEvent();
3914 + if (!evt) {
3915 + return;
3916 + }
3917 +
3918 + PL_InitEvent(evt, this, nsPresContext::ThemeChangedInternal,
3919 + nsPresContext::DestroyThemeChangeEvt);
3920 +
3921 + // After this point, event destruction will release |this|
3922 + NS_ADDREF_THIS();
3923 +
3924 + nsresult rv = eventQ->PostEvent(evt);
3925 + if (NS_FAILED(rv)) {
3926 + PL_DestroyEvent(evt);
3927 + } else {
3928 + mPendingThemeChanged = PR_TRUE;
3929 + }
3930 + }
3931 +}
3932 +
3933 +void* PR_CALLBACK
3934 +nsPresContext::ThemeChangedInternal(PLEvent *aEvent)
3935 +{
3936 + nsPresContext* pc = NS_STATIC_CAST(nsPresContext*, aEvent->owner);
3937 +
3938 + pc->mPendingThemeChanged = PR_FALSE;
3939 +
3940 // Tell the theme that it changed, so it can flush any handles to stale theme
3941 // data.
3942 - if (mTheme)
3943 - mTheme->ThemeChanged();
3944 + if (pc->mTheme && sThemeChanged) {
3945 + pc->mTheme->ThemeChanged();
3946 + sThemeChanged = PR_FALSE;
3947 + }
3948
3949 // Clear all cached nsILookAndFeel colors.
3950 - if (mLookAndFeel)
3951 - mLookAndFeel->LookAndFeelChanged();
3952 + if (pc->mLookAndFeel && sLookAndFeelChanged) {
3953 + pc->mLookAndFeel->LookAndFeelChanged();
3954 + sLookAndFeelChanged = PR_FALSE;
3955 + }
3956
3957 // We have to clear style data because the assumption of style rule
3958 // immutability has been violated since any style rule that uses
3959 // system colors or fonts (and probably -moz-appearance as well) has
3960 // changed.
3961 - nsPresContext::ClearStyleDataAndReflow();
3962 + pc->ClearStyleDataAndReflow();
3963 +
3964 + return nsnull;
3965 +}
3966 +
3967 +
3968 +void PR_CALLBACK
3969 +nsPresContext::DestroyThemeChangeEvt(PLEvent* aEvent)
3970 +{
3971 + nsPresContext* pc = NS_STATIC_CAST(nsPresContext*, aEvent->owner);
3972 + NS_RELEASE(pc);
3973 + delete aEvent;
3974 }
3975
3976 void
3977 nsPresContext::SysColorChanged()
3978 {
3979 - if (mLookAndFeel) {
3980 + if (!mPendingSysColorChanged) {
3981 + sLookAndFeelChanged = PR_TRUE;
3982 +
3983 + nsCOMPtr<nsIEventQueue> eventQ;
3984 + mEventQueueService->
3985 + GetSpecialEventQueue(nsIEventQueueService::UI_THREAD_EVENT_QUEUE,
3986 + getter_AddRefs(eventQ));
3987 + if (!eventQ) {
3988 + return;
3989 + }
3990 +
3991 + PLEvent* evt = new PLEvent();
3992 + if (!evt) {
3993 + return;
3994 + }
3995 +
3996 + PL_InitEvent(evt, this, nsPresContext::SysColorChangedInternal,
3997 + nsPresContext::DestroySysColorChangeEvt);
3998 +
3999 + // After this point, event destruction will release |this|
4000 + NS_ADDREF_THIS();
4001 +
4002 + nsresult rv = eventQ->PostEvent(evt);
4003 + if (NS_FAILED(rv)) {
4004 + PL_DestroyEvent(evt);
4005 + } else {
4006 + mPendingSysColorChanged = PR_TRUE;
4007 + }
4008 + }
4009 +}
4010 +
4011 +void* PR_CALLBACK
4012 +nsPresContext::SysColorChangedInternal(PLEvent *aEvent)
4013 +{
4014 + nsPresContext* pc = NS_STATIC_CAST(nsPresContext*, aEvent->owner);
4015 +
4016 + pc->mPendingSysColorChanged = PR_FALSE;
4017 +
4018 + if (pc->mLookAndFeel && sLookAndFeelChanged) {
4019 // Don't use the cached values for the system colors
4020 - mLookAndFeel->LookAndFeelChanged();
4021 + pc->mLookAndFeel->LookAndFeelChanged();
4022 + sLookAndFeelChanged = PR_FALSE;
4023 }
4024 -
4025 +
4026 // Reset default background and foreground colors for the document since
4027 // they may be using system colors
4028 - GetDocumentColorPreferences();
4029 + pc->GetDocumentColorPreferences();
4030
4031 // Clear out all of the style data since it may contain RGB values
4032 // which originated from system colors.
4033 @@ -1222,7 +1333,17 @@ nsPresContext::SysColorChanged()
4034 // data without reflowing/updating views will lead to incorrect change hints
4035 // later, because when generating change hints, any style structs which have
4036 // been cleared and not reread are assumed to not be used at all.
4037 - ClearStyleDataAndReflow();
4038 + pc->ClearStyleDataAndReflow();
4039 +
4040 + return nsnull;
4041 +}
4042 +
4043 +void PR_CALLBACK
4044 +nsPresContext::DestroySysColorChangeEvt(PLEvent* aEvent)
4045 +{
4046 + nsPresContext* pc = NS_STATIC_CAST(nsPresContext*, aEvent->owner);
4047 + NS_RELEASE(pc);
4048 + delete aEvent;
4049 }
4050
4051 void
4052 Index: layout/base/nsPresContext.h
4053 ===================================================================
4054 RCS file: /cvsroot/mozilla/layout/base/nsPresContext.h,v
4055 retrieving revision 3.150.4.2
4056 diff -d -u -p -r3.150.4.2 nsPresContext.h
4057 --- layout/base/nsPresContext.h 29 Aug 2005 16:15:39 -0000 3.150.4.2
4058 +++ layout/base/nsPresContext.h 26 Sep 2006 19:26:40 -0000
4059 @@ -56,6 +56,7 @@
4060 #include "nsCRT.h"
4061 #include "nsIPrintSettings.h"
4062 #include "nsPropertyTable.h"
4063 +#include "plevent.h"
4064 #ifdef IBMBIDI
4065 class nsBidiPresUtils;
4066 #endif // IBMBIDI
4067 @@ -76,6 +77,7 @@ class nsIAtom;
4068 class nsIEventStateManager;
4069 class nsIURI;
4070 class nsILookAndFeel;
4071 +class nsIEventQueueService;
4072 class nsICSSPseudoComparator;
4073 class nsIAtom;
4074 struct nsStyleStruct;
4075 @@ -627,6 +629,14 @@ public:
4076 const nscoord* GetBorderWidthTable() { return mBorderWidthTable; }
4077
4078 protected:
4079 + static NS_HIDDEN_(void*) PR_CALLBACK ThemeChangedInternal(PLEvent* aEvent);
4080 + static NS_HIDDEN_(void*) PR_CALLBACK SysColorChangedInternal(PLEvent* aEvent);
4081 + static NS_HIDDEN_(void) PR_CALLBACK DestroyThemeChangeEvt(PLEvent* aEvent);
4082 + static NS_HIDDEN_(void) PR_CALLBACK DestroySysColorChangeEvt(PLEvent* aEvent);
4083 +
4084 + friend void* PR_CALLBACK ThemeChangedInternal(PLEvent* aEvent);
4085 + friend void* PR_CALLBACK SysColorChangedInternal(PLEvent* aEvent);
4086 +
4087 NS_HIDDEN_(void) SetImgAnimations(nsIContent *aParent, PRUint16 aMode);
4088 NS_HIDDEN_(void) GetDocumentColorPreferences();
4089
4090 @@ -654,6 +664,7 @@ protected:
4091 // from gfx back to layout.
4092 nsIEventStateManager* mEventManager; // [STRONG]
4093 nsILookAndFeel* mLookAndFeel; // [STRONG]
4094 + nsIEventQueueService *mEventQueueService; // [STRONG]
4095 nsIAtom* mMedium; // initialized by subclass ctors;
4096 // weak pointer to static atom
4097
4098 @@ -724,6 +735,8 @@ protected:
4099 unsigned mCanPaginatedScroll : 1;
4100 unsigned mDoScaledTwips : 1;
4101 unsigned mEnableJapaneseTransform : 1;
4102 + unsigned mPendingSysColorChanged : 1;
4103 + unsigned mPendingThemeChanged : 1;
4104 #ifdef IBMBIDI
4105 unsigned mIsVisual : 1;
4106 unsigned mIsBidiSystem : 1;
4107
4108
4109
4110 1.1 src/patchsets/mozilla-firefox/2.0.0.8/402_firefox-2.0-pango-cursor.patch
4111
4112 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/402_firefox-2.0-pango-cursor.patch?rev=1.1&view=markup
4113 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/402_firefox-2.0-pango-cursor.patch?rev=1.1&content-type=text/plain
4114
4115 Index: 402_firefox-2.0-pango-cursor.patch
4116 ===================================================================
4117 # Upstream bug #335810
4118
4119 Index: mozilla/gfx/src/gtk/nsFontMetricsPango.cpp
4120 ===================================================================
4121 RCS file: /cvsroot/mozilla/gfx/src/gtk/nsFontMetricsPango.cpp,v
4122 retrieving revision 1.24
4123 diff -d -u -p -6 -r1.24 nsFontMetricsPango.cpp
4124 --- mozilla/gfx/src/gtk/nsFontMetricsPango.cpp 25 Aug 2006 01:02:34 -0000 1.24
4125 +++ mozilla/gfx/src/gtk/nsFontMetricsPango.cpp 6 Sep 2006 07:01:49 -0000
4126 @@ -948,13 +948,12 @@ nsFontMetricsPango::GetClusterInfo(const
4127 PRInt32
4128 nsFontMetricsPango::GetPosition(const PRUnichar *aText, PRUint32 aLength,
4129 nsPoint aPt)
4130 {
4131 int trailing = 0;
4132 int inx = 0;
4133 - gboolean found = FALSE;
4134 const gchar *curChar;
4135 PRInt32 retval = 0;
4136
4137 float f = mDeviceContext->AppUnitsToDevUnits();
4138
4139 PangoLayout *layout = pango_layout_new(mPangoContext);
4140 @@ -974,28 +973,18 @@ nsFontMetricsPango::GetPosition(const PR
4141 }
4142
4143 // Set up the pango layout
4144 pango_layout_set_text(layout, text, strlen(text));
4145 FixupSpaceWidths(layout, text);
4146
4147 - found = pango_layout_xy_to_index(layout, localX, localY,
4148 - &inx, &trailing);
4149 + pango_layout_xy_to_index(layout, localX, localY,
4150 + &inx, &trailing);
4151
4152 // Convert the index back to the utf-16 index
4153 curChar = text;
4154
4155 - // Jump to the end if it's not found.
4156 - if (!found) {
4157 - if (inx == 0)
4158 - retval = 0;
4159 - else if (trailing)
4160 - retval = aLength;
4161 -
4162 - goto loser;
4163 - }
4164 -
4165 for (PRUint32 curOffset=0; curOffset < aLength;
4166 curOffset++, curChar = g_utf8_find_next_char(curChar, NULL)) {
4167
4168 // Check for a match before checking for a surrogate pair
4169 if (curChar - text == inx) {
4170 retval = curOffset;
4171
4172
4173
4174 1.1 src/patchsets/mozilla-firefox/2.0.0.8/803_fbsd-3.patch
4175
4176 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/803_fbsd-3.patch?rev=1.1&view=markup
4177 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.8/803_fbsd-3.patch?rev=1.1&content-type=text/plain
4178
4179 Index: 803_fbsd-3.patch
4180 ===================================================================
4181 --- a/config/rules.mk 2007-07-03 17:39:53 +0100
4182 +++ b/config/rules.mk 2007-07-03 17:41:50 +0100
4183 @@ -462,6 +462,8 @@
4184 endif
4185
4186 ifeq ($(OS_ARCH),FreeBSD)
4187 +DSO_LDOPTS += -Wl,-rpath,'$(mozappdir)'
4188 +OS_LDFLAGS += -Wl,-rpath,'$(mozappdir)'
4189 EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic -lc
4190 endif
4191
4192
4193
4194
4195 --
4196 gentoo-commits@g.o mailing list