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