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