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