Annotation of /trunk/mozilla-firefox/patches/mozilla-firefox-1.0.7-typeaheadfind.patch
Parent Directory | Revision Log
Revision 153 -
(hide annotations)
(download)
Tue May 8 20:52:56 2007 UTC (17 years, 4 months ago) by niro
File size: 41149 byte(s)
Tue May 8 20:52:56 2007 UTC (17 years, 4 months ago) by niro
File size: 41149 byte(s)
-import
1 | niro | 153 | Patch to fix typeahead find for browsers which embed Firefox |
2 | http://bugzilla.gnome.org/show_bug.cgi?id=157435 | ||
3 | |||
4 | diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/Makefile.in mozilla/extensions/typeaheadfind/Makefile.in | ||
5 | --- mozilla.orig/extensions/typeaheadfind/Makefile.in 2005-03-26 00:12:02.000000000 -0500 | ||
6 | +++ mozilla/extensions/typeaheadfind/Makefile.in 2005-03-26 11:39:29.000000000 -0500 | ||
7 | @@ -31,7 +31,7 @@ | ||
8 | |||
9 | include $(DEPTH)/config/autoconf.mk | ||
10 | |||
11 | -MODULE = typeaheadfind | ||
12 | +MODULE = typeaheadfindsea | ||
13 | DIRS = public src resources | ||
14 | |||
15 | include $(topsrcdir)/config/rules.mk | ||
16 | diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/public/Makefile.in mozilla/extensions/typeaheadfind/public/Makefile.in | ||
17 | --- mozilla.orig/extensions/typeaheadfind/public/Makefile.in 2005-03-26 00:12:02.000000000 -0500 | ||
18 | +++ mozilla/extensions/typeaheadfind/public/Makefile.in 2005-03-26 11:39:29.000000000 -0500 | ||
19 | @@ -31,11 +31,11 @@ | ||
20 | |||
21 | include $(DEPTH)/config/autoconf.mk | ||
22 | |||
23 | -MODULE=typeaheadfind | ||
24 | -XPIDL_MODULE=typeaheadfind | ||
25 | +MODULE=typeaheadfindsea | ||
26 | +XPIDL_MODULE=typeaheadfindsea | ||
27 | GRE_MODULE = 1 | ||
28 | |||
29 | -XPIDLSRCS= ./nsITypeAheadFind.idl \ | ||
30 | +XPIDLSRCS= ./nsITypeAheadFindSea.idl \ | ||
31 | $(NULL) | ||
32 | |||
33 | |||
34 | diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/public/nsITypeAheadFind.idl mozilla/extensions/typeaheadfind/public/nsITypeAheadFind.idl | ||
35 | --- mozilla.orig/extensions/typeaheadfind/public/nsITypeAheadFind.idl 2005-03-26 00:12:02.000000000 -0500 | ||
36 | +++ mozilla/extensions/typeaheadfind/public/nsITypeAheadFind.idl 1969-12-31 19:00:00.000000000 -0500 | ||
37 | @@ -1,90 +0,0 @@ | ||
38 | -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | ||
39 | -/* ***** BEGIN LICENSE BLOCK ***** | ||
40 | - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 | ||
41 | - * | ||
42 | - * The contents of this file are subject to the Netscape Public License | ||
43 | - * Version 1.1 (the "License"); you may not use this file except in | ||
44 | - * compliance with the License. You may obtain a copy of the License at | ||
45 | - * http://www.mozilla.org/NPL/ | ||
46 | - * | ||
47 | - * Software distributed under the License is distributed on an "AS IS" basis, | ||
48 | - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | ||
49 | - * for the specific language governing rights and limitations under the | ||
50 | - * License. | ||
51 | - * | ||
52 | - * The Original Code is mozilla.org code. | ||
53 | - * | ||
54 | - * The Initial Developer of the Original Code is | ||
55 | - * Netscape Communications Corporation. | ||
56 | - * Portions created by the Initial Developer are Copyright (C) 1998 | ||
57 | - * the Initial Developer. All Rights Reserved. | ||
58 | - * | ||
59 | - * Contributor(s): | ||
60 | - * Original Author: Aaron Leventhal (aaronl@netscape.com) | ||
61 | - * Contributors: | ||
62 | - * | ||
63 | - * | ||
64 | - * Alternatively, the contents of this file may be used under the terms of | ||
65 | - * either the GNU General Public License Version 2 or later (the "GPL"), or | ||
66 | - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), | ||
67 | - * in which case the provisions of the GPL or the LGPL are applicable instead | ||
68 | - * of those above. If you wish to allow use of your version of this file only | ||
69 | - * under the terms of either the GPL or the LGPL, and not to allow others to | ||
70 | - * use your version of this file under the terms of the NPL, indicate your | ||
71 | - * decision by deleting the provisions above and replace them with the notice | ||
72 | - * and other provisions required by the GPL or the LGPL. If you do not delete | ||
73 | - * the provisions above, a recipient may use your version of this file under | ||
74 | - * the terms of any one of the NPL, the GPL or the LGPL. | ||
75 | - * | ||
76 | - * ***** END LICENSE BLOCK ***** */ | ||
77 | - | ||
78 | -#include "nsISupports.idl" | ||
79 | -#include "domstubs.idl" | ||
80 | -#include "nsISupportsPrimitives.idl" | ||
81 | - | ||
82 | -%{ C++ | ||
83 | - #include "nsIDOMEvent.h" | ||
84 | - | ||
85 | - #define NS_TYPEAHEADFIND_CID \ | ||
86 | - {0x46590685, 0xbc00, 0x4aac, {0xab, 0xed, 0x2c, 0x10, 0xa5, 0xb9, 0x45, 0xa4}} | ||
87 | - | ||
88 | - #define NS_TYPEAHEADFIND_CONTRACTID "@mozilla.org/typeaheadfind;1" | ||
89 | -%} | ||
90 | - | ||
91 | -interface nsIDOMEvent; | ||
92 | - | ||
93 | -[scriptable, uuid(AD1C62CC-72F4-4c5b-BE78-503854F9E0D8)] | ||
94 | -interface nsITypeAheadFind : nsISupports | ||
95 | -{ | ||
96 | - /** Is type ahead find mode currently on? */ | ||
97 | - readonly attribute boolean isActive; | ||
98 | - | ||
99 | - /** Manually start type ahead find mode */ | ||
100 | - void startNewFind(in nsIDOMWindow aWindow, in boolean aLinksOnly); | ||
101 | - | ||
102 | - /** Manually cancel type ahead find mode */ | ||
103 | - void cancelFind(); | ||
104 | - | ||
105 | - /** | ||
106 | - * Will find as you type start automatically if the user | ||
107 | - * types with the focus on page content other than a textfield or select? | ||
108 | - * If autostart is off, the startNewFind() method can be used to enact | ||
109 | - * type ahead find, as well as cmd_findTypeLinks or cmd_findTypeText. | ||
110 | - */ | ||
111 | - void setAutoStart(in nsIDOMWindow aWindow, in boolean aIsAutoStartOn); | ||
112 | - boolean getAutoStart(in nsIDOMWindow aWindow); | ||
113 | - | ||
114 | - /** | ||
115 | - * Find next recurrence if typeaheadfind was the last used find, | ||
116 | - * as opposed to regular find. Returns false in nsISupportsPRBool if we | ||
117 | - * don't handle the request. | ||
118 | - */ | ||
119 | - void findNext(in boolean aReverse, in nsISupportsInterfacePointer aCallerWindowSupports); | ||
120 | - | ||
121 | - /* | ||
122 | - * Go back and remove one character from find string | ||
123 | - * Returns true if backspace used | ||
124 | - */ | ||
125 | - boolean backOneChar(); | ||
126 | -}; | ||
127 | - | ||
128 | diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/public/nsITypeAheadFindSea.idl mozilla/extensions/typeaheadfind/public/nsITypeAheadFindSea.idl | ||
129 | --- mozilla.orig/extensions/typeaheadfind/public/nsITypeAheadFindSea.idl 1969-12-31 19:00:00.000000000 -0500 | ||
130 | +++ mozilla/extensions/typeaheadfind/public/nsITypeAheadFindSea.idl 2005-03-26 11:39:29.000000000 -0500 | ||
131 | @@ -0,0 +1,90 @@ | ||
132 | +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | ||
133 | +/* ***** BEGIN LICENSE BLOCK ***** | ||
134 | + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 | ||
135 | + * | ||
136 | + * The contents of this file are subject to the Netscape Public License | ||
137 | + * Version 1.1 (the "License"); you may not use this file except in | ||
138 | + * compliance with the License. You may obtain a copy of the License at | ||
139 | + * http://www.mozilla.org/NPL/ | ||
140 | + * | ||
141 | + * Software distributed under the License is distributed on an "AS IS" basis, | ||
142 | + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | ||
143 | + * for the specific language governing rights and limitations under the | ||
144 | + * License. | ||
145 | + * | ||
146 | + * The Original Code is mozilla.org code. | ||
147 | + * | ||
148 | + * The Initial Developer of the Original Code is | ||
149 | + * Netscape Communications Corporation. | ||
150 | + * Portions created by the Initial Developer are Copyright (C) 1998 | ||
151 | + * the Initial Developer. All Rights Reserved. | ||
152 | + * | ||
153 | + * Contributor(s): | ||
154 | + * Original Author: Aaron Leventhal (aaronl@netscape.com) | ||
155 | + * Contributors: | ||
156 | + * | ||
157 | + * | ||
158 | + * Alternatively, the contents of this file may be used under the terms of | ||
159 | + * either the GNU General Public License Version 2 or later (the "GPL"), or | ||
160 | + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), | ||
161 | + * in which case the provisions of the GPL or the LGPL are applicable instead | ||
162 | + * of those above. If you wish to allow use of your version of this file only | ||
163 | + * under the terms of either the GPL or the LGPL, and not to allow others to | ||
164 | + * use your version of this file under the terms of the NPL, indicate your | ||
165 | + * decision by deleting the provisions above and replace them with the notice | ||
166 | + * and other provisions required by the GPL or the LGPL. If you do not delete | ||
167 | + * the provisions above, a recipient may use your version of this file under | ||
168 | + * the terms of any one of the NPL, the GPL or the LGPL. | ||
169 | + * | ||
170 | + * ***** END LICENSE BLOCK ***** */ | ||
171 | + | ||
172 | +#include "nsISupports.idl" | ||
173 | +#include "domstubs.idl" | ||
174 | +#include "nsISupportsPrimitives.idl" | ||
175 | + | ||
176 | +%{ C++ | ||
177 | + #include "nsIDOMEvent.h" | ||
178 | + | ||
179 | + #define NS_TYPEAHEADFINDSEA_CID \ | ||
180 | + {0x46590685, 0xbc00, 0x4aac, {0xab, 0xed, 0x2c, 0x10, 0xa5, 0xb9, 0x45, 0xa4}} | ||
181 | + | ||
182 | + #define NS_TYPEAHEADFINDSEA_CONTRACTID "@mozilla.org/typeaheadfindsea;1" | ||
183 | +%} | ||
184 | + | ||
185 | +interface nsIDOMEvent; | ||
186 | + | ||
187 | +[scriptable, uuid(AD1C62CC-72F4-4c5b-BE78-503854F9E0D8)] | ||
188 | +interface nsITypeAheadFindSea : nsISupports | ||
189 | +{ | ||
190 | + /** Is type ahead find mode currently on? */ | ||
191 | + readonly attribute boolean isActive; | ||
192 | + | ||
193 | + /** Manually start type ahead find mode */ | ||
194 | + void startNewFind(in nsIDOMWindow aWindow, in boolean aLinksOnly); | ||
195 | + | ||
196 | + /** Manually cancel type ahead find mode */ | ||
197 | + void cancelFind(); | ||
198 | + | ||
199 | + /** | ||
200 | + * Will find as you type start automatically if the user | ||
201 | + * types with the focus on page content other than a textfield or select? | ||
202 | + * If autostart is off, the startNewFind() method can be used to enact | ||
203 | + * type ahead find, as well as cmd_findTypeLinks or cmd_findTypeText. | ||
204 | + */ | ||
205 | + void setAutoStart(in nsIDOMWindow aWindow, in boolean aIsAutoStartOn); | ||
206 | + boolean getAutoStart(in nsIDOMWindow aWindow); | ||
207 | + | ||
208 | + /** | ||
209 | + * Find next recurrence if typeaheadfindsea was the last used find, | ||
210 | + * as opposed to regular find. Returns false in nsISupportsPRBool if we | ||
211 | + * don't handle the request. | ||
212 | + */ | ||
213 | + void findNext(in boolean aReverse, in nsISupportsInterfacePointer aCallerWindowSupports); | ||
214 | + | ||
215 | + /* | ||
216 | + * Go back and remove one character from find string | ||
217 | + * Returns true if backspace used | ||
218 | + */ | ||
219 | + boolean backOneChar(); | ||
220 | +}; | ||
221 | + | ||
222 | diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/resources/content/prefs/typeaheadfind.js mozilla/extensions/typeaheadfind/resources/content/prefs/typeaheadfind.js | ||
223 | --- mozilla.orig/extensions/typeaheadfind/resources/content/prefs/typeaheadfind.js 2005-03-26 00:12:02.000000000 -0500 | ||
224 | +++ mozilla/extensions/typeaheadfind/resources/content/prefs/typeaheadfind.js 2005-03-26 11:39:29.000000000 -0500 | ||
225 | @@ -36,7 +36,7 @@ | ||
226 | * | ||
227 | * ***** END LICENSE BLOCK ***** */ | ||
228 | |||
229 | -pref("accessibility.typeaheadfind", true); | ||
230 | -pref("accessibility.typeaheadfind.linksonly", true); | ||
231 | -pref("accessibility.typeaheadfind.startlinksonly", false); | ||
232 | -pref("accessibility.typeaheadfind.timeout", 5000); | ||
233 | +pref("accessibility.typeaheadfindsea", true); | ||
234 | +pref("accessibility.typeaheadfindsea.linksonly", true); | ||
235 | +pref("accessibility.typeaheadfindsea.startlinksonly", false); | ||
236 | +pref("accessibility.typeaheadfindsea.timeout", 5000); | ||
237 | diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/resources/jar.mn mozilla/extensions/typeaheadfind/resources/jar.mn | ||
238 | --- mozilla.orig/extensions/typeaheadfind/resources/jar.mn 2005-03-26 00:12:02.000000000 -0500 | ||
239 | +++ mozilla/extensions/typeaheadfind/resources/jar.mn 2005-03-26 11:39:29.000000000 -0500 | ||
240 | @@ -1,5 +1,5 @@ | ||
241 | en-US.jar: | ||
242 | - locale/en-US/global/typeaheadfind.properties (locale/en-US/typeaheadfind.properties) | ||
243 | + locale/en-US/global/typeaheadfindsea.properties (locale/en-US/typeaheadfindsea.properties) | ||
244 | |||
245 | toolkit.jar: | ||
246 | content/global/notfound.wav (content/notfound.wav) | ||
247 | diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/resources/locale/en-US/typeaheadfind.properties mozilla/extensions/typeaheadfind/resources/locale/en-US/typeaheadfind.properties | ||
248 | --- mozilla.orig/extensions/typeaheadfind/resources/locale/en-US/typeaheadfind.properties 2005-03-26 00:12:02.000000000 -0500 | ||
249 | +++ mozilla/extensions/typeaheadfind/resources/locale/en-US/typeaheadfind.properties 1969-12-31 19:00:00.000000000 -0500 | ||
250 | @@ -1,13 +0,0 @@ | ||
251 | -openparen = ( | ||
252 | -closeparen = ) | ||
253 | -textfound = Text found: " | ||
254 | -textnotfound = Text not found: " | ||
255 | -linkfound = Link found: " | ||
256 | -linknotfound = Link not found: " | ||
257 | -closequote = " | ||
258 | -stopfind = Find stopped. | ||
259 | -starttextfind = Starting -- find text as you type | ||
260 | -startlinkfind = Starting -- find links as you type | ||
261 | -repeated = repeated | ||
262 | -nextmatch = - next match | ||
263 | -prevmatch = - previous match | ||
264 | diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/resources/locale/en-US/typeaheadfindsea.properties mozilla/extensions/typeaheadfind/resources/locale/en-US/typeaheadfindsea.properties | ||
265 | --- mozilla.orig/extensions/typeaheadfind/resources/locale/en-US/typeaheadfindsea.properties 1969-12-31 19:00:00.000000000 -0500 | ||
266 | +++ mozilla/extensions/typeaheadfind/resources/locale/en-US/typeaheadfindsea.properties 2005-03-26 11:39:29.000000000 -0500 | ||
267 | @@ -0,0 +1,13 @@ | ||
268 | +openparen = ( | ||
269 | +closeparen = ) | ||
270 | +textfound = Text found: " | ||
271 | +textnotfound = Text not found: " | ||
272 | +linkfound = Link found: " | ||
273 | +linknotfound = Link not found: " | ||
274 | +closequote = " | ||
275 | +stopfind = Find stopped. | ||
276 | +starttextfind = Starting -- find text as you type | ||
277 | +startlinkfind = Starting -- find links as you type | ||
278 | +repeated = repeated | ||
279 | +nextmatch = - next match | ||
280 | +prevmatch = - previous match | ||
281 | diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/Makefile.in mozilla/extensions/typeaheadfind/src/Makefile.in | ||
282 | --- mozilla.orig/extensions/typeaheadfind/src/Makefile.in 2005-03-26 00:12:02.000000000 -0500 | ||
283 | +++ mozilla/extensions/typeaheadfind/src/Makefile.in 2005-03-26 11:39:29.000000000 -0500 | ||
284 | @@ -31,14 +31,14 @@ | ||
285 | |||
286 | include $(DEPTH)/config/autoconf.mk | ||
287 | |||
288 | -MODULE = typeaheadfind | ||
289 | -LIBRARY_NAME = typeaheadfind | ||
290 | +MODULE = typeaheadfindsea | ||
291 | +LIBRARY_NAME = typeaheadfindsea | ||
292 | ifneq ($(OS_ARCH),WINNT) | ||
293 | -SHORT_LIBNAME = typahead | ||
294 | +SHORT_LIBNAME = typaheadsea | ||
295 | endif | ||
296 | GRE_MODULE = 1 | ||
297 | |||
298 | -PACKAGE_FILE = typeaheadfind.pkg | ||
299 | +PACKAGE_FILE = typeaheadfindsea.pkg | ||
300 | |||
301 | REQUIRES = appcomps \ | ||
302 | embedcomponents \ | ||
303 | @@ -66,7 +66,7 @@ | ||
304 | |||
305 | EXPORT_LIBRARY = 1 | ||
306 | IS_COMPONENT = 1 | ||
307 | -MODULE_NAME = nsTypeAheadFind | ||
308 | +MODULE_NAME = nsTypeAheadFindSea | ||
309 | |||
310 | CPPSRCS = \ | ||
311 | nsTypeAheadFind.cpp \ | ||
312 | diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFind.cpp mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp | ||
313 | --- mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFind.cpp 2005-03-26 00:12:02.000000000 -0500 | ||
314 | +++ mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp 2005-03-26 11:39:29.000000000 -0500 | ||
315 | @@ -117,8 +117,8 @@ | ||
316 | //////////////////////////////////////////////////////////////////////// | ||
317 | |||
318 | |||
319 | -NS_INTERFACE_MAP_BEGIN(nsTypeAheadFind) | ||
320 | - NS_INTERFACE_MAP_ENTRY(nsITypeAheadFind) | ||
321 | +NS_INTERFACE_MAP_BEGIN(nsTypeAheadFindSea) | ||
322 | + NS_INTERFACE_MAP_ENTRY(nsITypeAheadFindSea) | ||
323 | NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference) | ||
324 | NS_INTERFACE_MAP_ENTRY(nsITimerCallback) | ||
325 | NS_INTERFACE_MAP_ENTRY(nsIScrollPositionListener) | ||
326 | @@ -131,8 +131,8 @@ | ||
327 | NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsIDOMEventListener, nsIDOMKeyListener) | ||
328 | NS_INTERFACE_MAP_END | ||
329 | |||
330 | -NS_IMPL_ADDREF(nsTypeAheadFind) | ||
331 | -NS_IMPL_RELEASE(nsTypeAheadFind) | ||
332 | +NS_IMPL_ADDREF(nsTypeAheadFindSea) | ||
333 | +NS_IMPL_RELEASE(nsTypeAheadFindSea) | ||
334 | |||
335 | static NS_DEFINE_IID(kRangeCID, NS_RANGE_CID); | ||
336 | static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID); | ||
337 | @@ -141,11 +141,11 @@ | ||
338 | |||
339 | #define NS_FIND_CONTRACTID "@mozilla.org/embedcomp/rangefind;1" | ||
340 | |||
341 | -nsTypeAheadFind* nsTypeAheadFind::sInstance = nsnull; | ||
342 | -PRInt32 nsTypeAheadFind::sAccelKey = -1; // magic value of -1 when unitialized | ||
343 | +nsTypeAheadFindSea* nsTypeAheadFindSea::sInstance = nsnull; | ||
344 | +PRInt32 nsTypeAheadFindSea::sAccelKey = -1; // magic value of -1 when unitialized | ||
345 | |||
346 | |||
347 | -nsTypeAheadFind::nsTypeAheadFind(): | ||
348 | +nsTypeAheadFindSea::nsTypeAheadFindSea(): | ||
349 | mIsFindAllowedInWindow(PR_FALSE), mAutoStartPref(PR_FALSE), | ||
350 | mLinksOnlyPref(PR_FALSE), mStartLinksOnlyPref(PR_FALSE), | ||
351 | mLinksOnly(PR_FALSE), mIsTypeAheadOn(PR_FALSE), mCaretBrowsingOn(PR_FALSE), | ||
352 | @@ -164,25 +164,25 @@ | ||
353 | static PRInt32 gInstanceCount; | ||
354 | ++gInstanceCount; | ||
355 | NS_ASSERTION(gInstanceCount == 1, | ||
356 | - "There should be only 1 instance of nsTypeAheadFind!"); | ||
357 | + "There should be only 1 instance of nsTypeAheadFindSea!"); | ||
358 | #endif | ||
359 | } | ||
360 | |||
361 | |||
362 | -nsTypeAheadFind::~nsTypeAheadFind() | ||
363 | +nsTypeAheadFindSea::~nsTypeAheadFindSea() | ||
364 | { | ||
365 | RemoveDocListeners(); | ||
366 | mTimer = nsnull; | ||
367 | |||
368 | nsCOMPtr<nsIPrefBranchInternal> prefInternal(do_GetService(NS_PREFSERVICE_CONTRACTID)); | ||
369 | if (prefInternal) { | ||
370 | - prefInternal->RemoveObserver("accessibility.typeaheadfind", this); | ||
371 | + prefInternal->RemoveObserver("accessibility.typeaheadfindsea", this); | ||
372 | prefInternal->RemoveObserver("accessibility.browsewithcaret", this); | ||
373 | } | ||
374 | } | ||
375 | |||
376 | nsresult | ||
377 | -nsTypeAheadFind::Init() | ||
378 | +nsTypeAheadFindSea::Init() | ||
379 | { | ||
380 | nsresult rv = NS_NewISupportsArray(getter_AddRefs(mManualFindWindows)); | ||
381 | NS_ENSURE_SUCCESS(rv, rv); | ||
382 | @@ -199,7 +199,7 @@ | ||
383 | } | ||
384 | |||
385 | // ----------- Listen to prefs ------------------ | ||
386 | - rv = prefInternal->AddObserver("accessibility.typeaheadfind", this, PR_FALSE); | ||
387 | + rv = prefInternal->AddObserver("accessibility.typeaheadfindsea", this, PR_FALSE); | ||
388 | NS_ENSURE_SUCCESS(rv, rv); | ||
389 | |||
390 | rv = prefInternal->AddObserver("accessibility.browsewithcaret", this, PR_FALSE); | ||
391 | @@ -220,11 +220,11 @@ | ||
392 | return rv; | ||
393 | } | ||
394 | |||
395 | -nsTypeAheadFind * | ||
396 | -nsTypeAheadFind::GetInstance() | ||
397 | +nsTypeAheadFindSea * | ||
398 | +nsTypeAheadFindSea::GetInstance() | ||
399 | { | ||
400 | if (!sInstance) { | ||
401 | - sInstance = new nsTypeAheadFind(); | ||
402 | + sInstance = new nsTypeAheadFindSea(); | ||
403 | if (!sInstance) | ||
404 | return nsnull; | ||
405 | |||
406 | @@ -244,14 +244,14 @@ | ||
407 | |||
408 | |||
409 | void | ||
410 | -nsTypeAheadFind::ReleaseInstance() | ||
411 | +nsTypeAheadFindSea::ReleaseInstance() | ||
412 | { | ||
413 | NS_IF_RELEASE(sInstance); | ||
414 | } | ||
415 | |||
416 | |||
417 | void | ||
418 | -nsTypeAheadFind::Shutdown() | ||
419 | +nsTypeAheadFindSea::Shutdown() | ||
420 | { | ||
421 | // Application shutdown | ||
422 | mTimer = nsnull; | ||
423 | @@ -267,14 +267,14 @@ | ||
424 | // ------- Pref Callbacks (2) --------------- | ||
425 | |||
426 | nsresult | ||
427 | -nsTypeAheadFind::PrefsReset() | ||
428 | +nsTypeAheadFindSea::PrefsReset() | ||
429 | { | ||
430 | nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID)); | ||
431 | NS_ENSURE_TRUE(prefBranch, NS_ERROR_FAILURE); | ||
432 | |||
433 | PRBool wasTypeAheadOn = mIsTypeAheadOn; | ||
434 | |||
435 | - prefBranch->GetBoolPref("accessibility.typeaheadfind", &mIsTypeAheadOn); | ||
436 | + prefBranch->GetBoolPref("accessibility.typeaheadfindsea", &mIsTypeAheadOn); | ||
437 | |||
438 | if (mIsTypeAheadOn != wasTypeAheadOn) { | ||
439 | if (!mIsTypeAheadOn) { | ||
440 | @@ -294,7 +294,7 @@ | ||
441 | do_GetService(kStringBundleServiceCID); | ||
442 | |||
443 | if (stringBundleService) | ||
444 | - stringBundleService->CreateBundle(TYPEAHEADFIND_BUNDLE_URL, | ||
445 | + stringBundleService->CreateBundle(TYPEAHEADFINDSEA_BUNDLE_URL, | ||
446 | getter_AddRefs(mStringBundle)); | ||
447 | |||
448 | // Observe find again commands. We'll handle them if we were the last find | ||
449 | @@ -309,34 +309,34 @@ | ||
450 | } | ||
451 | |||
452 | PRBool oldAutoStartPref = mAutoStartPref; | ||
453 | - prefBranch->GetBoolPref("accessibility.typeaheadfind.autostart", | ||
454 | + prefBranch->GetBoolPref("accessibility.typeaheadfindsea.autostart", | ||
455 | &mAutoStartPref); | ||
456 | if (mAutoStartPref != oldAutoStartPref) { | ||
457 | ResetGlobalAutoStart(mAutoStartPref); | ||
458 | } | ||
459 | |||
460 | - prefBranch->GetBoolPref("accessibility.typeaheadfind.linksonly", | ||
461 | + prefBranch->GetBoolPref("accessibility.typeaheadfindsea.linksonly", | ||
462 | &mLinksOnlyPref); | ||
463 | |||
464 | - prefBranch->GetBoolPref("accessibility.typeaheadfind.startlinksonly", | ||
465 | + prefBranch->GetBoolPref("accessibility.typeaheadfindsea.startlinksonly", | ||
466 | &mStartLinksOnlyPref); | ||
467 | |||
468 | PRBool isSoundEnabled = PR_TRUE; | ||
469 | - prefBranch->GetBoolPref("accessibility.typeaheadfind.enablesound", | ||
470 | + prefBranch->GetBoolPref("accessibility.typeaheadfindsea.enablesound", | ||
471 | &isSoundEnabled); | ||
472 | nsXPIDLCString soundStr; | ||
473 | if (isSoundEnabled) { | ||
474 | - prefBranch->GetCharPref("accessibility.typeaheadfind.soundURL", | ||
475 | + prefBranch->GetCharPref("accessibility.typeaheadfindsea.soundURL", | ||
476 | getter_Copies(soundStr)); | ||
477 | } | ||
478 | mNotFoundSoundURL = soundStr; | ||
479 | |||
480 | PRBool isTimeoutEnabled; | ||
481 | - prefBranch->GetBoolPref("accessibility.typeaheadfind.enabletimeout", | ||
482 | + prefBranch->GetBoolPref("accessibility.typeaheadfindsea.enabletimeout", | ||
483 | &isTimeoutEnabled); | ||
484 | PRInt32 timeoutLength = 0; | ||
485 | if (isTimeoutEnabled) { | ||
486 | - prefBranch->GetIntPref("accessibility.typeaheadfind.timeout", | ||
487 | + prefBranch->GetIntPref("accessibility.typeaheadfindsea.timeout", | ||
488 | &timeoutLength); | ||
489 | } | ||
490 | mTimeoutLength = timeoutLength; | ||
491 | @@ -352,7 +352,7 @@ | ||
492 | // ------- nsITimer Methods (1) --------------- | ||
493 | |||
494 | NS_IMETHODIMP | ||
495 | -nsTypeAheadFind::Notify(nsITimer *timer) | ||
496 | +nsTypeAheadFindSea::Notify(nsITimer *timer) | ||
497 | { | ||
498 | CancelFind(); | ||
499 | return NS_OK; | ||
500 | @@ -361,7 +361,7 @@ | ||
501 | // ----------- nsIObserver Methods (1) ------------------- | ||
502 | |||
503 | NS_IMETHODIMP | ||
504 | -nsTypeAheadFind::Observe(nsISupports *aSubject, const char *aTopic, | ||
505 | +nsTypeAheadFindSea::Observe(nsISupports *aSubject, const char *aTopic, | ||
506 | const PRUnichar *aData) | ||
507 | { | ||
508 | PRBool isOpening; | ||
509 | @@ -475,7 +475,7 @@ | ||
510 | |||
511 | |||
512 | nsresult | ||
513 | -nsTypeAheadFind::UseInWindow(nsIDOMWindow *aDOMWin) | ||
514 | +nsTypeAheadFindSea::UseInWindow(nsIDOMWindow *aDOMWin) | ||
515 | { | ||
516 | NS_ENSURE_ARG_POINTER(aDOMWin); | ||
517 | |||
518 | @@ -528,7 +528,7 @@ | ||
519 | // ------- nsIDOMEventListener Methods (1) --------------- | ||
520 | |||
521 | NS_IMETHODIMP | ||
522 | -nsTypeAheadFind::HandleEvent(nsIDOMEvent* aEvent) | ||
523 | +nsTypeAheadFindSea::HandleEvent(nsIDOMEvent* aEvent) | ||
524 | { | ||
525 | nsAutoString eventType; | ||
526 | aEvent->GetType(eventType); | ||
527 | @@ -588,21 +588,21 @@ | ||
528 | // ------- nsIDOMKeyListener Methods (3) --------------- | ||
529 | |||
530 | NS_IMETHODIMP | ||
531 | -nsTypeAheadFind::KeyDown(nsIDOMEvent* aEvent) | ||
532 | +nsTypeAheadFindSea::KeyDown(nsIDOMEvent* aEvent) | ||
533 | { | ||
534 | return NS_OK; | ||
535 | } | ||
536 | |||
537 | |||
538 | NS_IMETHODIMP | ||
539 | -nsTypeAheadFind::KeyUp(nsIDOMEvent* aEvent) | ||
540 | +nsTypeAheadFindSea::KeyUp(nsIDOMEvent* aEvent) | ||
541 | { | ||
542 | return NS_OK; | ||
543 | } | ||
544 | |||
545 | |||
546 | NS_IMETHODIMP | ||
547 | -nsTypeAheadFind::KeyPress(nsIDOMEvent* aEvent) | ||
548 | +nsTypeAheadFindSea::KeyPress(nsIDOMEvent* aEvent) | ||
549 | { | ||
550 | if (!mIsTypeAheadOn || mIsMenuBarActive || mIsMenuPopupActive) { | ||
551 | return NS_OK; | ||
552 | @@ -732,7 +732,7 @@ | ||
553 | |||
554 | |||
555 | NS_IMETHODIMP | ||
556 | -nsTypeAheadFind::BackOneChar(PRBool *aIsBackspaceUsed) | ||
557 | +nsTypeAheadFindSea::BackOneChar(PRBool *aIsBackspaceUsed) | ||
558 | { | ||
559 | if (!mFocusedDocSelection) { | ||
560 | *aIsBackspaceUsed = PR_FALSE; | ||
561 | @@ -862,7 +862,7 @@ | ||
562 | |||
563 | |||
564 | nsresult | ||
565 | -nsTypeAheadFind::HandleChar(PRUnichar aChar) | ||
566 | +nsTypeAheadFindSea::HandleChar(PRUnichar aChar) | ||
567 | { | ||
568 | // Add a printable char to mTypeAheadBuffer, then search for buffer contents | ||
569 | |||
570 | @@ -1027,7 +1027,7 @@ | ||
571 | |||
572 | |||
573 | void | ||
574 | -nsTypeAheadFind::SaveFind() | ||
575 | +nsTypeAheadFindSea::SaveFind() | ||
576 | { | ||
577 | // Store find string for find-next | ||
578 | mFindNextBuffer = mTypeAheadBuffer; | ||
579 | @@ -1048,14 +1048,14 @@ | ||
580 | mFindService->SetSearchString(mFindNextBuffer); | ||
581 | } | ||
582 | |||
583 | - // --- If accessibility.typeaheadfind.timeout is set, | ||
584 | + // --- If accessibility.typeaheadfindsea.timeout is set, | ||
585 | // cancel find after specified # milliseconds --- | ||
586 | StartTimeout(); | ||
587 | } | ||
588 | |||
589 | |||
590 | void | ||
591 | -nsTypeAheadFind::PlayNotFoundSound() | ||
592 | +nsTypeAheadFindSea::PlayNotFoundSound() | ||
593 | { | ||
594 | if (mNotFoundSoundURL.IsEmpty()) // no sound | ||
595 | return; | ||
596 | @@ -1085,7 +1085,7 @@ | ||
597 | |||
598 | |||
599 | NS_IMETHODIMP | ||
600 | -nsTypeAheadFind::HandleText(nsIDOMEvent* aTextEvent) | ||
601 | +nsTypeAheadFindSea::HandleText(nsIDOMEvent* aTextEvent) | ||
602 | { | ||
603 | // This is called multiple times in the middle of an | ||
604 | // IME composition | ||
605 | @@ -1133,7 +1133,7 @@ | ||
606 | |||
607 | |||
608 | NS_IMETHODIMP | ||
609 | -nsTypeAheadFind::HandleStartComposition(nsIDOMEvent* aCompositionEvent) | ||
610 | +nsTypeAheadFindSea::HandleStartComposition(nsIDOMEvent* aCompositionEvent) | ||
611 | { | ||
612 | // This is called once at the start of an IME composition | ||
613 | |||
614 | @@ -1155,7 +1155,7 @@ | ||
615 | |||
616 | |||
617 | NS_IMETHODIMP | ||
618 | -nsTypeAheadFind::HandleEndComposition(nsIDOMEvent* aCompositionEvent) | ||
619 | +nsTypeAheadFindSea::HandleEndComposition(nsIDOMEvent* aCompositionEvent) | ||
620 | { | ||
621 | // This is called once at the end of an IME composition | ||
622 | |||
623 | @@ -1186,21 +1186,21 @@ | ||
624 | |||
625 | |||
626 | NS_IMETHODIMP | ||
627 | -nsTypeAheadFind::HandleQueryComposition(nsIDOMEvent* aCompositionEvent) | ||
628 | +nsTypeAheadFindSea::HandleQueryComposition(nsIDOMEvent* aCompositionEvent) | ||
629 | { | ||
630 | return NS_OK; | ||
631 | } | ||
632 | |||
633 | |||
634 | NS_IMETHODIMP | ||
635 | -nsTypeAheadFind::HandleQueryReconversion(nsIDOMEvent* aCompositionEvent) | ||
636 | +nsTypeAheadFindSea::HandleQueryReconversion(nsIDOMEvent* aCompositionEvent) | ||
637 | { | ||
638 | return NS_OK; | ||
639 | } | ||
640 | |||
641 | |||
642 | nsresult | ||
643 | -nsTypeAheadFind::FindItNow(nsIPresShell *aPresShell, | ||
644 | +nsTypeAheadFindSea::FindItNow(nsIPresShell *aPresShell, | ||
645 | PRBool aIsRepeatingSameChar, PRBool aIsLinksOnly, | ||
646 | PRBool aIsFirstVisiblePreferred) | ||
647 | { | ||
648 | @@ -1225,7 +1225,7 @@ | ||
649 | |||
650 | nsCOMPtr<nsISupports> startingContainer = presContext->GetContainer(); | ||
651 | nsCOMPtr<nsIDocShellTreeItem> treeItem(do_QueryInterface(startingContainer)); | ||
652 | - NS_ASSERTION(treeItem, "Bug 175321 Crashes with Type Ahead Find [@ nsTypeAheadFind::FindItNow]"); | ||
653 | + NS_ASSERTION(treeItem, "Bug 175321 Crashes with Type Ahead Find [@ nsTypeAheadFindSea::FindItNow]"); | ||
654 | if (!treeItem) { | ||
655 | return NS_ERROR_FAILURE; | ||
656 | } | ||
657 | @@ -1450,7 +1450,7 @@ | ||
658 | |||
659 | |||
660 | nsresult | ||
661 | -nsTypeAheadFind::GetSearchContainers(nsISupports *aContainer, | ||
662 | +nsTypeAheadFindSea::GetSearchContainers(nsISupports *aContainer, | ||
663 | PRBool aIsRepeatingSameChar, | ||
664 | PRBool aIsFirstVisiblePreferred, | ||
665 | PRBool aCanUseDocSelection, | ||
666 | @@ -1561,7 +1561,7 @@ | ||
667 | |||
668 | |||
669 | void | ||
670 | -nsTypeAheadFind::RangeStartsInsideLink(nsIDOMRange *aRange, | ||
671 | +nsTypeAheadFindSea::RangeStartsInsideLink(nsIDOMRange *aRange, | ||
672 | nsIPresShell *aPresShell, | ||
673 | PRBool *aIsInsideLink, | ||
674 | PRBool *aIsStartingLink) | ||
675 | @@ -1673,7 +1673,7 @@ | ||
676 | |||
677 | |||
678 | NS_IMETHODIMP | ||
679 | -nsTypeAheadFind::ScrollPositionWillChange(nsIScrollableView *aView, | ||
680 | +nsTypeAheadFindSea::ScrollPositionWillChange(nsIScrollableView *aView, | ||
681 | nscoord aX, nscoord aY) | ||
682 | { | ||
683 | return NS_OK; | ||
684 | @@ -1681,7 +1681,7 @@ | ||
685 | |||
686 | |||
687 | NS_IMETHODIMP | ||
688 | -nsTypeAheadFind::ScrollPositionDidChange(nsIScrollableView *aScrollableView, | ||
689 | +nsTypeAheadFindSea::ScrollPositionDidChange(nsIScrollableView *aScrollableView, | ||
690 | nscoord aX, nscoord aY) | ||
691 | { | ||
692 | if (!mIsFindingText) | ||
693 | @@ -1692,7 +1692,7 @@ | ||
694 | |||
695 | |||
696 | NS_IMETHODIMP | ||
697 | -nsTypeAheadFind::NotifySelectionChanged(nsIDOMDocument *aDoc, | ||
698 | +nsTypeAheadFindSea::NotifySelectionChanged(nsIDOMDocument *aDoc, | ||
699 | nsISelection *aSel, short aReason) | ||
700 | { | ||
701 | if (!mIsFindingText) { | ||
702 | @@ -1709,10 +1709,10 @@ | ||
703 | } | ||
704 | |||
705 | |||
706 | -// ---------------- nsITypeAheadFind -------------------- | ||
707 | +// ---------------- nsITypeAheadFindSea -------------------- | ||
708 | |||
709 | NS_IMETHODIMP | ||
710 | -nsTypeAheadFind::FindNext(PRBool aFindBackwards, nsISupportsInterfacePointer *aCallerWindowSupports) | ||
711 | +nsTypeAheadFindSea::FindNext(PRBool aFindBackwards, nsISupportsInterfacePointer *aCallerWindowSupports) | ||
712 | { | ||
713 | NS_ENSURE_TRUE(aCallerWindowSupports, NS_ERROR_FAILURE); | ||
714 | |||
715 | @@ -1724,7 +1724,7 @@ | ||
716 | return NS_OK; | ||
717 | } | ||
718 | |||
719 | - // Compare the top level content pres shell of typeaheadfind | ||
720 | + // Compare the top level content pres shell of typeaheadfindsea | ||
721 | // with the top level content pres shell window where find next is happening | ||
722 | // If they're different, exit so that webbrowswerfind can handle FindNext() | ||
723 | |||
724 | @@ -1758,7 +1758,7 @@ | ||
725 | NS_ENSURE_TRUE(callerPresShell, NS_OK); | ||
726 | |||
727 | if (callerPresShell != typeAheadPresShell) { | ||
728 | - // This means typeaheadfind is active in a different window or doc | ||
729 | + // This means typeaheadfindsea is active in a different window or doc | ||
730 | // So it's not appropriate to find next for the current window | ||
731 | mFindNextBuffer.Truncate(); | ||
732 | return NS_OK; | ||
733 | @@ -1776,7 +1776,7 @@ | ||
734 | webBrowserFind->GetSearchString(getter_Copies(webBrowserFindString)); | ||
735 | if (!webBrowserFindString.Equals(mFindNextBuffer)) { | ||
736 | // If they're not equal, then the find dialog was used last, | ||
737 | - // not typeaheadfind. Typeaheadfind applies to the last find, | ||
738 | + // not typeaheadfindsea. Typeaheadfind applies to the last find, | ||
739 | // so we should let nsIWebBrowserFind::FindNext() do it. | ||
740 | mFindNextBuffer.Truncate(); | ||
741 | return NS_OK; | ||
742 | @@ -1826,7 +1826,7 @@ | ||
743 | |||
744 | |||
745 | NS_IMETHODIMP | ||
746 | -nsTypeAheadFind::GetIsActive(PRBool *aIsActive) | ||
747 | +nsTypeAheadFindSea::GetIsActive(PRBool *aIsActive) | ||
748 | { | ||
749 | *aIsActive = mLinksOnlyManuallySet || !mTypeAheadBuffer.IsEmpty(); | ||
750 | |||
751 | @@ -1839,7 +1839,7 @@ | ||
752 | */ | ||
753 | |||
754 | NS_IMETHODIMP | ||
755 | -nsTypeAheadFind::StartNewFind(nsIDOMWindow *aWindow, PRBool aLinksOnly) | ||
756 | +nsTypeAheadFindSea::StartNewFind(nsIDOMWindow *aWindow, PRBool aLinksOnly) | ||
757 | { | ||
758 | if (!mFind || !mIsTypeAheadOn || !aWindow) | ||
759 | return NS_ERROR_FAILURE; // Type Ahead Find not correctly initialized | ||
760 | @@ -1872,7 +1872,7 @@ | ||
761 | } | ||
762 | |||
763 | void | ||
764 | -nsTypeAheadFind::ResetGlobalAutoStart(PRBool aAutoStart) | ||
765 | +nsTypeAheadFindSea::ResetGlobalAutoStart(PRBool aAutoStart) | ||
766 | { | ||
767 | // Enumerate through the current top level windows | ||
768 | // and either attach or remove window listeners | ||
769 | @@ -1910,7 +1910,7 @@ | ||
770 | |||
771 | |||
772 | NS_IMETHODIMP | ||
773 | -nsTypeAheadFind::SetAutoStart(nsIDOMWindow *aDOMWin, PRBool aAutoStartOn) | ||
774 | +nsTypeAheadFindSea::SetAutoStart(nsIDOMWindow *aDOMWin, PRBool aAutoStartOn) | ||
775 | { | ||
776 | if (!aDOMWin) { | ||
777 | return NS_ERROR_FAILURE; | ||
778 | @@ -1940,7 +1940,7 @@ | ||
779 | |||
780 | |||
781 | NS_IMETHODIMP | ||
782 | -nsTypeAheadFind::GetAutoStart(nsIDOMWindow *aDOMWin, PRBool *aIsAutoStartOn) | ||
783 | +nsTypeAheadFindSea::GetAutoStart(nsIDOMWindow *aDOMWin, PRBool *aIsAutoStartOn) | ||
784 | { | ||
785 | *aIsAutoStartOn = PR_FALSE; | ||
786 | |||
787 | @@ -2008,7 +2008,7 @@ | ||
788 | |||
789 | |||
790 | NS_IMETHODIMP | ||
791 | -nsTypeAheadFind::CancelFind() | ||
792 | +nsTypeAheadFindSea::CancelFind() | ||
793 | { | ||
794 | // Stop current find if: | ||
795 | // 1. Escape pressed | ||
796 | @@ -2065,7 +2065,7 @@ | ||
797 | // ------- Helper Methods --------------- | ||
798 | |||
799 | void | ||
800 | -nsTypeAheadFind::GetTopContentPresShell(nsIDocShellTreeItem *aDocShellTreeItem, | ||
801 | +nsTypeAheadFindSea::GetTopContentPresShell(nsIDocShellTreeItem *aDocShellTreeItem, | ||
802 | nsIPresShell **aPresShell) | ||
803 | { | ||
804 | *aPresShell = nsnull; | ||
805 | @@ -2081,7 +2081,7 @@ | ||
806 | } | ||
807 | |||
808 | void | ||
809 | -nsTypeAheadFind::GetStartWindow(nsIDOMWindow *aWindow, nsIDOMWindow **aStartWindow) | ||
810 | +nsTypeAheadFindSea::GetStartWindow(nsIDOMWindow *aWindow, nsIDOMWindow **aStartWindow) | ||
811 | { | ||
812 | // Return the root ancestor content window of aWindow | ||
813 | |||
814 | @@ -2113,7 +2113,7 @@ | ||
815 | } | ||
816 | |||
817 | nsresult | ||
818 | -nsTypeAheadFind::GetWebBrowserFind(nsIDOMWindow *aWin, | ||
819 | +nsTypeAheadFindSea::GetWebBrowserFind(nsIDOMWindow *aWin, | ||
820 | nsIWebBrowserFind **aWebBrowserFind) | ||
821 | { | ||
822 | NS_ENSURE_ARG_POINTER(aWin); | ||
823 | @@ -2138,7 +2138,7 @@ | ||
824 | |||
825 | |||
826 | void | ||
827 | -nsTypeAheadFind::StartTimeout() | ||
828 | +nsTypeAheadFindSea::StartTimeout() | ||
829 | { | ||
830 | if (mTimeoutLength) { | ||
831 | if (!mTimer) { | ||
832 | @@ -2154,7 +2154,7 @@ | ||
833 | } | ||
834 | |||
835 | void | ||
836 | -nsTypeAheadFind::SetSelectionLook(nsIPresShell *aPresShell, | ||
837 | +nsTypeAheadFindSea::SetSelectionLook(nsIPresShell *aPresShell, | ||
838 | PRBool aChangeColor, | ||
839 | PRBool aEnabled) | ||
840 | { | ||
841 | @@ -2162,8 +2162,8 @@ | ||
842 | return; | ||
843 | |||
844 | // Show caret when type ahead find is on | ||
845 | - // Also paint selection bright (typeaheadfind on) or normal | ||
846 | - // (typeaheadfind off) | ||
847 | + // Also paint selection bright (typeaheadfindsea on) or normal | ||
848 | + // (typeaheadfindsea off) | ||
849 | |||
850 | if (aChangeColor) { | ||
851 | mFocusedDocSelCon->SetDisplaySelection(nsISelectionController::SELECTION_ATTENTION); | ||
852 | @@ -2210,7 +2210,7 @@ | ||
853 | |||
854 | |||
855 | void | ||
856 | -nsTypeAheadFind::RemoveDocListeners() | ||
857 | +nsTypeAheadFindSea::RemoveDocListeners() | ||
858 | { | ||
859 | nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mFocusedWeakShell)); | ||
860 | nsIViewManager* vm = nsnull; | ||
861 | @@ -2244,7 +2244,7 @@ | ||
862 | |||
863 | |||
864 | void | ||
865 | -nsTypeAheadFind::AttachDocListeners(nsIPresShell *aPresShell) | ||
866 | +nsTypeAheadFindSea::AttachDocListeners(nsIPresShell *aPresShell) | ||
867 | { | ||
868 | if (!aPresShell) { | ||
869 | return; | ||
870 | @@ -2274,7 +2274,7 @@ | ||
871 | |||
872 | |||
873 | void | ||
874 | -nsTypeAheadFind::RemoveWindowListeners(nsIDOMWindow *aDOMWin) | ||
875 | +nsTypeAheadFindSea::RemoveWindowListeners(nsIDOMWindow *aDOMWin) | ||
876 | { | ||
877 | nsCOMPtr<nsIDOMEventTarget> chromeEventHandler; | ||
878 | GetChromeEventHandler(aDOMWin, getter_AddRefs(chromeEventHandler)); | ||
879 | @@ -2331,7 +2331,7 @@ | ||
880 | |||
881 | |||
882 | void | ||
883 | -nsTypeAheadFind::AttachWindowListeners(nsIDOMWindow *aDOMWin) | ||
884 | +nsTypeAheadFindSea::AttachWindowListeners(nsIDOMWindow *aDOMWin) | ||
885 | { | ||
886 | nsCOMPtr<nsIDOMEventTarget> chromeEventHandler; | ||
887 | GetChromeEventHandler(aDOMWin, getter_AddRefs(chromeEventHandler)); | ||
888 | @@ -2384,7 +2384,7 @@ | ||
889 | |||
890 | |||
891 | void | ||
892 | -nsTypeAheadFind::GetChromeEventHandler(nsIDOMWindow *aDOMWin, | ||
893 | +nsTypeAheadFindSea::GetChromeEventHandler(nsIDOMWindow *aDOMWin, | ||
894 | nsIDOMEventTarget **aChromeTarget) | ||
895 | { | ||
896 | nsCOMPtr<nsPIDOMWindow> privateDOMWindow(do_QueryInterface(aDOMWin)); | ||
897 | @@ -2400,7 +2400,7 @@ | ||
898 | } | ||
899 | |||
900 | PRBool | ||
901 | -nsTypeAheadFind::IsTargetContentOkay(nsIContent *aContent) | ||
902 | +nsTypeAheadFindSea::IsTargetContentOkay(nsIContent *aContent) | ||
903 | { | ||
904 | if (!aContent) { | ||
905 | return PR_FALSE; | ||
906 | @@ -2438,7 +2438,7 @@ | ||
907 | |||
908 | |||
909 | nsresult | ||
910 | -nsTypeAheadFind::GetTargetIfTypeAheadOkay(nsIDOMEvent *aEvent, | ||
911 | +nsTypeAheadFindSea::GetTargetIfTypeAheadOkay(nsIDOMEvent *aEvent, | ||
912 | nsIContent **aTargetContent, | ||
913 | nsIPresShell **aTargetPresShell) | ||
914 | { | ||
915 | @@ -2524,7 +2524,7 @@ | ||
916 | |||
917 | |||
918 | void | ||
919 | -nsTypeAheadFind::GetSelection(nsIPresShell *aPresShell, | ||
920 | +nsTypeAheadFindSea::GetSelection(nsIPresShell *aPresShell, | ||
921 | nsISelectionController **aSelCon, | ||
922 | nsISelection **aDOMSel) | ||
923 | { | ||
924 | @@ -2548,7 +2548,7 @@ | ||
925 | |||
926 | |||
927 | PRBool | ||
928 | -nsTypeAheadFind::IsRangeVisible(nsIPresShell *aPresShell, | ||
929 | +nsTypeAheadFindSea::IsRangeVisible(nsIPresShell *aPresShell, | ||
930 | nsIPresContext *aPresContext, | ||
931 | nsIDOMRange *aRange, PRBool aMustBeInViewPort, | ||
932 | PRBool aGetTopVisibleLeaf, | ||
933 | @@ -2703,7 +2703,7 @@ | ||
934 | |||
935 | |||
936 | nsresult | ||
937 | -nsTypeAheadFind::GetTranslatedString(const nsAString& aKey, | ||
938 | +nsTypeAheadFindSea::GetTranslatedString(const nsAString& aKey, | ||
939 | nsAString& aStringOut) | ||
940 | { | ||
941 | nsXPIDLString xsValue; | ||
942 | @@ -2721,7 +2721,7 @@ | ||
943 | |||
944 | |||
945 | void | ||
946 | -nsTypeAheadFind::DisplayStatus(PRBool aSuccess, nsIContent *aFocusedContent, | ||
947 | +nsTypeAheadFindSea::DisplayStatus(PRBool aSuccess, nsIContent *aFocusedContent, | ||
948 | PRBool aClearStatus, const PRUnichar *aText) | ||
949 | { | ||
950 | // pres shell -> pres context -> container -> tree item -> | ||
951 | @@ -2869,7 +2869,7 @@ | ||
952 | // Make sure we're not focused on a text field, listbox | ||
953 | // or other form control that needs typeahead keystrokes | ||
954 | if (focusedContent) { | ||
955 | - *aResult = nsTypeAheadFind::IsTargetContentOkay(focusedContent); | ||
956 | + *aResult = nsTypeAheadFindSea::IsTargetContentOkay(focusedContent); | ||
957 | return NS_OK; | ||
958 | } | ||
959 | |||
960 | @@ -2934,8 +2934,8 @@ | ||
961 | EnsureContentWindow(domWinInternal, getter_AddRefs(startContentWin)); | ||
962 | NS_ENSURE_TRUE(startContentWin, NS_ERROR_FAILURE); | ||
963 | |||
964 | - nsCOMPtr<nsITypeAheadFind> typeAhead = | ||
965 | - do_GetService(NS_TYPEAHEADFIND_CONTRACTID); | ||
966 | + nsCOMPtr<nsITypeAheadFindSea> typeAhead = | ||
967 | + do_GetService(NS_TYPEAHEADFINDSEA_CONTRACTID); | ||
968 | NS_ENSURE_TRUE(typeAhead, NS_ERROR_FAILURE); | ||
969 | |||
970 | return typeAhead->StartNewFind(startContentWin, isLinkSearch); | ||
971 | diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFind.h mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.h | ||
972 | --- mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFind.h 2005-03-26 00:12:02.000000000 -0500 | ||
973 | +++ mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.h 2005-03-26 11:39:29.000000000 -0500 | ||
974 | @@ -62,13 +62,13 @@ | ||
975 | #include "nsIDOMRange.h" | ||
976 | #include "nsIDOMWindow.h" | ||
977 | #include "nsIDocShellTreeItem.h" | ||
978 | -#include "nsITypeAheadFind.h" | ||
979 | +#include "nsITypeAheadFindSea.h" | ||
980 | #include "nsIStringBundle.h" | ||
981 | #include "nsISupportsArray.h" | ||
982 | #include "nsISound.h" | ||
983 | |||
984 | -#define TYPEAHEADFIND_BUNDLE_URL \ | ||
985 | - "chrome://global/locale/typeaheadfind.properties" | ||
986 | +#define TYPEAHEADFINDSEA_BUNDLE_URL \ | ||
987 | + "chrome://global/locale/typeaheadfindsea.properties" | ||
988 | #define TYPEAHEADFIND_NOTFOUND_WAV_URL \ | ||
989 | "chrome://global/content/notfound.wav" | ||
990 | |||
991 | @@ -82,7 +82,7 @@ | ||
992 | |||
993 | const int kMaxBadCharsBeforeCancel = 3; | ||
994 | |||
995 | -class nsTypeAheadFind : public nsITypeAheadFind, | ||
996 | +class nsTypeAheadFindSea : public nsITypeAheadFindSea, | ||
997 | public nsIDOMKeyListener, | ||
998 | public nsIDOMTextListener, | ||
999 | public nsIDOMCompositionListener, | ||
1000 | @@ -93,13 +93,13 @@ | ||
1001 | public nsSupportsWeakReference | ||
1002 | { | ||
1003 | public: | ||
1004 | - nsTypeAheadFind(); | ||
1005 | - virtual ~nsTypeAheadFind(); | ||
1006 | + nsTypeAheadFindSea(); | ||
1007 | + virtual ~nsTypeAheadFindSea(); | ||
1008 | |||
1009 | - NS_DEFINE_STATIC_CID_ACCESSOR(NS_TYPEAHEADFIND_CID); | ||
1010 | + NS_DEFINE_STATIC_CID_ACCESSOR(NS_TYPEAHEADFINDSEA_CID); | ||
1011 | |||
1012 | NS_DECL_ISUPPORTS | ||
1013 | - NS_DECL_NSITYPEAHEADFIND | ||
1014 | + NS_DECL_NSITYPEAHEADFINDSEA | ||
1015 | NS_DECL_NSIOBSERVER | ||
1016 | NS_DECL_NSIDOMEVENTLISTENER | ||
1017 | NS_DECL_NSISELECTIONLISTENER | ||
1018 | @@ -127,7 +127,7 @@ | ||
1019 | // ----- nsITimerCallback ----------------------------- | ||
1020 | NS_DECL_NSITIMERCALLBACK | ||
1021 | |||
1022 | - static nsTypeAheadFind *GetInstance(); | ||
1023 | + static nsTypeAheadFindSea *GetInstance(); | ||
1024 | static void ReleaseInstance(void); | ||
1025 | static PRBool IsTargetContentOkay(nsIContent *aContent); | ||
1026 | |||
1027 | @@ -185,7 +185,7 @@ | ||
1028 | nsresult GetTranslatedString(const nsAString& aKey, nsAString& aStringOut); | ||
1029 | |||
1030 | // Used by GetInstance and ReleaseInstance | ||
1031 | - static nsTypeAheadFind *sInstance; | ||
1032 | + static nsTypeAheadFindSea *sInstance; | ||
1033 | |||
1034 | // Current find state | ||
1035 | nsString mTypeAheadBuffer; | ||
1036 | @@ -196,7 +196,7 @@ | ||
1037 | |||
1038 | // PRBool's are used instead of PRPackedBool's where the address of the | ||
1039 | // boolean variable is getting passed into a method. For example: | ||
1040 | - // GetBoolPref("accessibility.typeaheadfind.linksonly", &mLinksOnlyPref); | ||
1041 | + // GetBoolPref("accessibility.typeaheadfindsea.linksonly", &mLinksOnlyPref); | ||
1042 | PRBool mIsFindAllowedInWindow; | ||
1043 | PRBool mAutoStartPref; | ||
1044 | PRBool mLinksOnlyPref; | ||
1045 | @@ -251,7 +251,7 @@ | ||
1046 | nsCOMPtr<nsIDOMWindow> mFocusedWindow; | ||
1047 | nsCOMPtr<nsIWeakReference> mFocusedWeakShell; | ||
1048 | |||
1049 | - // Windows where typeaheadfind doesn't auto start as the user types | ||
1050 | + // Windows where typeaheadfindsea doesn't auto start as the user types | ||
1051 | nsCOMPtr<nsISupportsArray> mManualFindWindows; | ||
1052 | }; | ||
1053 | |||
1054 | diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFindRegistration.cpp mozilla/extensions/typeaheadfind/src/nsTypeAheadFindRegistration.cpp | ||
1055 | --- mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFindRegistration.cpp 2005-03-26 00:12:02.000000000 -0500 | ||
1056 | +++ mozilla/extensions/typeaheadfind/src/nsTypeAheadFindRegistration.cpp 2005-03-26 11:39:40.000000000 -0500 | ||
1057 | @@ -55,7 +55,7 @@ | ||
1058 | |||
1059 | // This function is called at component registration time | ||
1060 | static NS_METHOD | ||
1061 | -nsTypeAheadFindRegistrationProc(nsIComponentManager *aCompMgr, nsIFile *aPath, | ||
1062 | +nsTypeAheadFindSeaRegistrationProc(nsIComponentManager *aCompMgr, nsIFile *aPath, | ||
1063 | const char *registryLocation, | ||
1064 | const char *componentType, | ||
1065 | const nsModuleComponentInfo *info) | ||
1066 | @@ -64,7 +64,7 @@ | ||
1067 | // an application component. This makes sure that we're | ||
1068 | // initialized on application startup. | ||
1069 | |||
1070 | - // Register nsTypeAheadFind to be instantiated on startup. | ||
1071 | + // Register nsTypeAheadFindSea to be instantiated on startup. | ||
1072 | // XXX This is needed on linux, but for some reason not needed on win32. | ||
1073 | nsresult rv; | ||
1074 | nsCOMPtr<nsICategoryManager> categoryManager = | ||
1075 | @@ -74,7 +74,7 @@ | ||
1076 | rv = categoryManager->AddCategoryEntry(APPSTARTUP_CATEGORY, | ||
1077 | - "Type Ahead Find", | ||
1078 | + "Type Ahead Find Sea", | ||
1079 | "service," | ||
1080 | - NS_TYPEAHEADFIND_CONTRACTID, | ||
1081 | + NS_TYPEAHEADFINDSEA_CONTRACTID, | ||
1082 | PR_TRUE, PR_TRUE, nsnull); | ||
1083 | } | ||
1084 | |||
1085 | @@ -82,22 +82,22 @@ | ||
1086 | } | ||
1087 | |||
1088 | |||
1089 | -NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsTypeAheadFind, | ||
1090 | - nsTypeAheadFind::GetInstance) | ||
1091 | +NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsTypeAheadFindSea, | ||
1092 | + nsTypeAheadFindSea::GetInstance) | ||
1093 | |||
1094 | static void PR_CALLBACK | ||
1095 | -TypeAheadFindModuleDtor(nsIModule* self) | ||
1096 | +TypeAheadFindSeaModuleDtor(nsIModule* self) | ||
1097 | { | ||
1098 | - nsTypeAheadFind::ReleaseInstance(); | ||
1099 | + nsTypeAheadFindSea::ReleaseInstance(); | ||
1100 | } | ||
1101 | |||
1102 | static const nsModuleComponentInfo components[] = | ||
1103 | { | ||
1104 | - { "TypeAheadFind Component", NS_TYPEAHEADFIND_CID, | ||
1105 | - NS_TYPEAHEADFIND_CONTRACTID, nsTypeAheadFindConstructor, | ||
1106 | - nsTypeAheadFindRegistrationProc, nsnull // Unregistration proc | ||
1107 | + { "TypeAheadFindSea Component", NS_TYPEAHEADFINDSEA_CID, | ||
1108 | + NS_TYPEAHEADFINDSEA_CONTRACTID, nsTypeAheadFindSeaConstructor, | ||
1109 | + nsTypeAheadFindSeaRegistrationProc, nsnull // Unregistration proc | ||
1110 | } | ||
1111 | }; | ||
1112 | |||
1113 | -NS_IMPL_NSGETMODULE_WITH_DTOR(nsTypeAheadFind, components, | ||
1114 | - TypeAheadFindModuleDtor) | ||
1115 | +NS_IMPL_NSGETMODULE_WITH_DTOR(nsTypeAheadFindSea, components, | ||
1116 | + TypeAheadFindSeaModuleDtor) | ||
1117 | diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/typeaheadfind.pkg mozilla/extensions/typeaheadfind/src/typeaheadfind.pkg | ||
1118 | --- mozilla.orig/extensions/typeaheadfind/src/typeaheadfind.pkg 2005-03-26 00:12:02.000000000 -0500 | ||
1119 | +++ mozilla/extensions/typeaheadfind/src/typeaheadfind.pkg 1969-12-31 19:00:00.000000000 -0500 | ||
1120 | @@ -1,9 +0,0 @@ | ||
1121 | -# why not ship this with GRE/embedding, if we're building it? | ||
1122 | - | ||
1123 | -[xpfe-browser browser] | ||
1124 | -#if SHARED_LIBRARY | ||
1125 | -dist/bin/components/@SHARED_LIBRARY@ | ||
1126 | -#else | ||
1127 | -!staticcomp @LIBRARY@ @MODULE_NAME@ | ||
1128 | -#endif | ||
1129 | -!xpt dist/bin/components/typeaheadfind.xpt | ||
1130 | diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/typeaheadfindsea.pkg mozilla/extensions/typeaheadfind/src/typeaheadfindsea.pkg | ||
1131 | --- mozilla.orig/extensions/typeaheadfind/src/typeaheadfindsea.pkg 1969-12-31 19:00:00.000000000 -0500 | ||
1132 | +++ mozilla/extensions/typeaheadfind/src/typeaheadfindsea.pkg 2005-03-26 11:39:29.000000000 -0500 | ||
1133 | @@ -0,0 +1,9 @@ | ||
1134 | +# why not ship this with GRE/embedding, if we're building it? | ||
1135 | + | ||
1136 | +[xpfe-browser browser] | ||
1137 | +#if SHARED_LIBRARY | ||
1138 | +dist/bin/components/@SHARED_LIBRARY@ | ||
1139 | +#else | ||
1140 | +!staticcomp @LIBRARY@ @MODULE_NAME@ | ||
1141 | +#endif | ||
1142 | +!xpt dist/bin/components/typeaheadfindsea.xpt |