Compare commits

..

1831 Commits

Author SHA1 Message Date
bryner%uiuc.edu
666ff43be0 Updating for rdf branch. Not part of build.
git-svn-id: svn://10.0.0.236/branches/RDF_FILEPICKER_BRANCH@77603 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-30 07:20:38 +00:00
(no author)
73f91c8955 This commit was manufactured by cvs2svn to create branch
'RDF_FILEPICKER_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/RDF_FILEPICKER_BRANCH@77601 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-30 07:15:24 +00:00
bryner%uiuc.edu
4b41f7560f Adding filepicker.dtd on the branch.
git-svn-id: svn://10.0.0.236/branches/RDF_FILEPICKER_BRANCH@77170 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-25 04:35:29 +00:00
(no author)
db8b93f218 This commit was manufactured by cvs2svn to create branch
'RDF_FILEPICKER_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/RDF_FILEPICKER_BRANCH@77148 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-25 01:56:40 +00:00
bryner%uiuc.edu
790f0b060f RDF filepicker changes.
git-svn-id: svn://10.0.0.236/branches/RDF_FILEPICKER_BRANCH@77124 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-24 22:38:19 +00:00
(no author)
bd57f5acca This commit was manufactured by cvs2svn to create branch
'RDF_FILEPICKER_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/RDF_FILEPICKER_BRANCH@76608 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-18 02:32:10 +00:00
bryner%uiuc.edu
de41f8b3c2 Fixing 47984 - crash when filepicker starts in invalid
directory.  r=pavlov.


git-svn-id: svn://10.0.0.236/trunk@76607 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-18 02:32:09 +00:00
mscott%netscape.com
9f33dfe18f Bug #46522 --> use weak references for message pane docshell and
root docshell to avoid a crash when you switch themes and we pull out
these docshells....
r=alecf


git-svn-id: svn://10.0.0.236/trunk@76606 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-18 01:47:44 +00:00
rcassin%supernova.org
a1433e6d19 Fix for 45645 (Can paste into ReadOnly textfield) r=akkana
git-svn-id: svn://10.0.0.236/trunk@76605 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-18 01:34:22 +00:00
akkana%netscape.com
ceaf606725 46643: Attempt to fix intermittent crash when clearing clipboard. r=pavlov
git-svn-id: svn://10.0.0.236/trunk@76604 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-18 01:33:09 +00:00
morse%netscape.com
32a7d35469 bug 49393, context menu in ftp is wrong, fix=jrgm, r=morse
git-svn-id: svn://10.0.0.236/trunk@76603 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-18 01:28:58 +00:00
morse%netscape.com
20ba5c833d bug 49393, edit menu in ftp is wrong, fix=jrgm, r=morse
git-svn-id: svn://10.0.0.236/trunk@76602 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-18 01:28:23 +00:00
bryner%uiuc.edu
02c02201e8 Making saari's debug output #ifdef DEBUG_FOCUS. r=pavlov.
git-svn-id: svn://10.0.0.236/trunk@76601 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-18 01:24:57 +00:00
mccabe%netscape.com
f10846667d Rectify // comment to /** comment
git-svn-id: svn://10.0.0.236/trunk@76600 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-18 01:09:29 +00:00
ftang%netscape.com
c2db6c347e *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@76599 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-18 00:47:03 +00:00
beard%netscape.com
1d1f0fda1b standard leak format for leaksoup r=waterson (not part of build)
git-svn-id: svn://10.0.0.236/trunk@76598 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-18 00:45:24 +00:00
alecf%netscape.com
70722673f2 other part of fix for filter stuff r=bienvenu
git-svn-id: svn://10.0.0.236/trunk@76597 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-18 00:18:29 +00:00
alecf%netscape.com
74c3d3a8a4 fix for #48994 - correctly clear the default account pref when the default account is deleted
r=ducarroz


git-svn-id: svn://10.0.0.236/trunk@76596 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-18 00:10:15 +00:00
ducarroz%netscape.com
b82006948f Fix for bug 48994. Take the first identity if we don't have a default one. R=alecf
git-svn-id: svn://10.0.0.236/trunk@76595 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-18 00:08:59 +00:00
brendan%mozilla.org
b9dbc566ac Add jsdhash.
git-svn-id: svn://10.0.0.236/trunk@76594 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-18 00:04:53 +00:00
rcassin%supernova.org
437af36574 Checkin kin's fix for bug 48879, r=sfraser
git-svn-id: svn://10.0.0.236/trunk@76593 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 23:55:32 +00:00
alecf%netscape.com
80deab3bd6 search & filter revamp
- fixes #41711, #48698, #48238 among other things
- moves some XBL into straight JS where it belongs
- fixes bad XBL setters to return the value that comes in
- fire more notification when filter attributes/operators change


git-svn-id: svn://10.0.0.236/trunk@76592 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 23:54:52 +00:00
gayatrib%netscape.com
44fad5837d fix for bugs 38107 and 40175. review=putterman
git-svn-id: svn://10.0.0.236/trunk@76591 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 23:48:42 +00:00
mccabe%netscape.com
85cc5c05a9 Fix to 49365.
Work around dump() logging messages to the js console by not having the js console call dump().  Also fix the console code so that string messages (originating from logStringMessage() calls) get printed properly, and adjust the number of saved console messages to match that of the underlying console service.

r=jband, a=beard


git-svn-id: svn://10.0.0.236/trunk@76590 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 23:39:49 +00:00
hyatt%netscape.com
5dda7e45d5 Fix for 48187, r=danm
git-svn-id: svn://10.0.0.236/trunk@76589 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 22:44:01 +00:00
rods%netscape.com
a62d36cc93 removing "return NS_OK" because it keeps it from doing the call to
nsFrame which calls HandleRelease. Without HandleRelease the EventStateManager
mMouseGrabber never gets cleared and it keeps thinking events need to go to the view.
b=48792 r=pollmann


git-svn-id: svn://10.0.0.236/trunk@76588 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 22:39:13 +00:00
pavlov%netscape.com
149c937939 patch to hold on to the image gc when possible. reduces the number of creategc/freegc calls r=imot. linux performance bug 26502
git-svn-id: svn://10.0.0.236/trunk@76587 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 21:53:10 +00:00
ftang%netscape.com
327bcf3b2c fix 47114. remap 6 characters to the MacOS truetype value for symbol fonts. r=nhotta
git-svn-id: svn://10.0.0.236/trunk@76586 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 21:47:42 +00:00
pavlov%netscape.com
9101782fbb patch from Tomi Leppikangas <Tomi.Leppikangas@oulu.fi> to reuse GCs when the only person holding on to them is the GC cache (i.e. don't create/destroy, just change) r=pavlov,shaver. work on linux performance bug 26502
git-svn-id: svn://10.0.0.236/trunk@76585 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 21:44:11 +00:00
akkana%netscape.com
eb5cd788d6 Define NS_VK keycodes in terms of nsIDOMKeyEvent keycodes. r=saari. Requires undefining ERROR on Win32, r=cmanske
git-svn-id: svn://10.0.0.236/trunk@76584 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 21:43:26 +00:00
rods%netscape.com
652bee7703 listbox - selecting with keyboard no longer allows you to stop on a disabled option, it skips them
as does page up and page down
combobox - selecting a disabled option didn't clear the "mouse down" flag and it still thought it was selecting
combobox - selecting a disabled option clears mSelectedIndex, this side effect could be seen by selected
a disabled item then clicking on a link and then hit "back",
b=48903 r=kmcclusk


git-svn-id: svn://10.0.0.236/trunk@76583 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 21:38:15 +00:00
pavlov%netscape.com
b605aca85a fir for bug 46729. convert things like smart quotes to normal quotes when pasting as plain text r=pinkerton
git-svn-id: svn://10.0.0.236/trunk@76582 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 21:37:09 +00:00
alecf%netscape.com
bacf3de7b8 remove mac and windows-specific messenger.css, just use XP one
r=putterman (no bug, just a build issue)


git-svn-id: svn://10.0.0.236/trunk@76581 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 21:22:42 +00:00
hyatt%netscape.com
d9127a969f Fix for 48150, r=danm
git-svn-id: svn://10.0.0.236/trunk@76580 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 21:11:38 +00:00
scc%mozilla.org
cf1b290be1 not part of the build; temporarily patching these files to use the old (what is currently in the tree) |GetReadableFragment| scheme, so that clients can start using this now both on the tip and on the DOMAPI... branch
git-svn-id: svn://10.0.0.236/trunk@76579 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 21:07:45 +00:00
danm%netscape.com
3950205ea9 HandleContent now forces a new window by suppressing the target name if it could be interpreted as something in parentWindow. bug 44797 r=mscott@netscape.com
git-svn-id: svn://10.0.0.236/trunk@76578 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 21:05:42 +00:00
kmcclusk%netscape.com
5c41f2d533 Destroy offscreen surfaces using a singleton nsIRenderingContext instance instead of creating a nsIRenderingContext during shutdown b=48190 r=attinasi@netscape.com
Allways destroy the global array of ViewManager's when last view manager instance is destroyed b=45921 r=attinasi@netscape.com


git-svn-id: svn://10.0.0.236/trunk@76577 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 21:05:16 +00:00
harishd%netscape.com
6368271fde bug 22886 - Relax refresh header paring, in the sink, a little bit.
r=pollmann


git-svn-id: svn://10.0.0.236/trunk@76576 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 20:55:48 +00:00
harishd%netscape.com
be80e197f0 bug 30487 ( nsbeta3+ ) - Watch out for barriers before popping off any stylistic
information
bug 37618 ( nsbeta3+ ) - Orpahaned residual tag can close only inline parents.
bug 44085 ( nsbeta3+ ) - Push comment into misplaced list if there are items in
queued in the list.
bug 22886 ( nsbeta3+ ) - Relax refresh header parsing, in the sink, a little bit
so that '.' is accounted for.

r=pollmann


git-svn-id: svn://10.0.0.236/trunk@76575 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 20:54:49 +00:00
bryner%uiuc.edu
fc97c0badb Fixing bug 42345 - hook up NS_MOVE events when a toplevel window is moved
on Linux.  Also use get_root_origin instead of get_origin so that we
persist the correct position.  r=blizzard.


git-svn-id: svn://10.0.0.236/trunk@76574 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 20:51:43 +00:00
radha%netscape.com
2bfd21680d fix for 45770 r=nisheeth.
git-svn-id: svn://10.0.0.236/trunk@76573 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 20:44:43 +00:00
bryner%uiuc.edu
fd8aac2f02 Fixing 48311 - make * (All files) really show all files in linux
filepicker.  r=pavlov, jag.


git-svn-id: svn://10.0.0.236/trunk@76572 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 20:31:21 +00:00
jgmyers%netscape.com
f56e5dd53a fix host header syntax for IPv6 address literals: bug 45891 r=gagan a=waterson
git-svn-id: svn://10.0.0.236/trunk@76571 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 20:19:15 +00:00
bienvenu%netscape.com
16668c3260 disable filters with invalid move targets 46876 r=alecf
git-svn-id: svn://10.0.0.236/trunk@76570 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 20:10:51 +00:00
rods%netscape.com
2d4f1df8f2 fixes when to use preferred size versus computed size versus available size.
b=40596, r=evaughan,hyatt,kmcclusk


git-svn-id: svn://10.0.0.236/trunk@76569 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 20:08:44 +00:00
edburns%acm.org
f8f85a7b78 bug=49293
r=gbarney
a=edburns

M classes_spec/org/mozilla/webclient/test/EMWindow.java
A src_ie/CMyDialog.cpp
A src_ie/CMyDialog.h
M src_ie/CurrentPageImpl.cpp
M src_ie/HistoryImpl.cpp
M src_ie/Makefile.win
M src_ie/NativeEventThread.cpp
M src_ie/WindowControlImpl.cpp
M src_ie/WrapperFactoryImpl.cpp
M src_ie/ie_util.cpp
M src_ie/ie_util.h

cvs diff -u classes_spec/org/mozilla/webclient/test/EMWindow.java src_ie/CMyDialog.cpp src_ie/CMyDialog.h src_ie/CurrentPageImpl.cpp src_ie/HistoryImpl.cpp src_ie/Makefile.win src_ie/NativeEventThread.cpp src_ie/WindowControlImpl.cpp src_ie/WrapperFactoryImpl.cpp src_ie/ie_util.cpp src_ie/ie_util.h

This change adds listener DocumentLoadListener support to src_ie.

tar -cvf 49293.tar classes_spec/org/mozilla/webclient/test/EMWindow.java src_ie/CMyDialog.cpp src_ie/CMyDialog.h src_ie/CurrentPageImpl.cpp src_ie/HistoryImpl.cpp src_ie/Makefile.win src_ie/NativeEventThread.cpp src_ie/WindowControlImpl.cpp src_ie/WrapperFactoryImpl.cpp src_ie/ie_util.cpp src_ie/ie_util.h


git-svn-id: svn://10.0.0.236/trunk@76568 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 19:54:43 +00:00
edburns%acm.org
ec836104c1 r=ashuk
bug=47357
a=edburns
Files in this checkin

M src_moz/CBrowserContainer.cpp
M src_moz/CBrowserContainer.h
M src_moz/ns_util.cpp
M src_moz/ns_util.h
M src_share/jni_util.cpp
M src_share/jni_util.h

cvs diff -u src_moz/CBrowserContainer.cpp src_moz/CBrowserContainer.h src_moz/ns_util.cpp src_moz/ns_util.h src_share/jni_util.cpp src_share/jni_util.h

This change moves out listener constants and other support data from
src_moz into src_share to enable it to be used in src_ie.

tar -cvf 47357.tar src_moz/CBrowserContainer.cpp src_moz/CBrowserContainer.h src_moz/ns_util.cpp src_moz/ns_util.h src_share/jni_util.cpp src_share/jni_util.h


git-svn-id: svn://10.0.0.236/trunk@76567 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 19:52:15 +00:00
morse%netscape.com
e985102af6 bug 48742, adding privacy tutorial, r=dveditz
git-svn-id: svn://10.0.0.236/trunk@76566 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 19:32:58 +00:00
dbragg%netscape.com
daf4d51382 Fix for bugs 47058 and 47097. r=sgehani
git-svn-id: svn://10.0.0.236/trunk@76565 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 19:28:06 +00:00
av%netscape.com
f4cecefbae Part of 46490 fix, r=adamlock
git-svn-id: svn://10.0.0.236/trunk@76564 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 19:26:15 +00:00
av%netscape.com
30b41b305e Fixing 46490, r=sean, r=waterson, r=valeski, a=adamlock
git-svn-id: svn://10.0.0.236/trunk@76563 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 19:16:39 +00:00
blizzard%redhat.com
1f49190e84 unused files for simple embedding shell
git-svn-id: svn://10.0.0.236/trunk@76562 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 19:12:23 +00:00
mcafee%netscape.com
d822c9dfd9 Minor layout tweak to Integration pref pane (40888).
git-svn-id: svn://10.0.0.236/trunk@76561 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 19:03:27 +00:00
edburns%acm.org
05d77f9269 r=ashuk
a=edburns
Files in this checkin

M src_moz/CBrowserContainer.cpp
M src_moz/CBrowserContainer.h
M src_moz/ns_util.cpp
M src_moz/ns_util.h
M src_share/jni_util.cpp
M src_share/jni_util.h

cvs diff -u src_moz/CBrowserContainer.cpp src_moz/CBrowserContainer.h src_moz/ns_util.cpp src_moz/ns_util.h src_share/jni_util.cpp src_share/jni_util.h

This change moves out listener constants and other support data from
src_moz into src_share to enable it to be used in src_ie.

tar -cvf 47357.tar src_moz/CBrowserContainer.cpp src_moz/CBrowserContainer.h src_moz/ns_util.cpp src_moz/ns_util.h src_share/jni_util.cpp src_share/jni_util.h


git-svn-id: svn://10.0.0.236/trunk@76560 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 18:29:18 +00:00
pierre%netscape.com
413d134dfe 43420 + CSS3 update: renamed "text-align:-moz-default" into "text-align:start"
git-svn-id: svn://10.0.0.236/trunk@76558 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 13:28:18 +00:00
mkaply%us.ibm.com
105698a14e OS/2 Tinderbox break
OK will someone WAKE UP and realize that we need XP_WIN defined in the build?
XP_PC does NOT mean XP_WIN.
WE NEED XP_WIN IN THE BUILD
SOMEONE TURN IT ON IN THE MAKEFILE!


git-svn-id: svn://10.0.0.236/trunk@76557 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 12:52:04 +00:00
nboyd%atg.com
6c5a6c1c92 Fix for bug 49302
git-svn-id: svn://10.0.0.236/trunk@76556 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 12:37:32 +00:00
nboyd%atg.com
1be29d3f63 Fix 49301.
git-svn-id: svn://10.0.0.236/trunk@76555 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 12:28:46 +00:00
jfrancis%netscape.com
6376ebe2b4 gave a pref a better name and a more traditional set of values.
git-svn-id: svn://10.0.0.236/trunk@76554 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 09:51:27 +00:00
hyatt%netscape.com
7e348287cb Fix for 38461, r=ben
git-svn-id: svn://10.0.0.236/trunk@76553 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 09:15:51 +00:00
pierre%netscape.com
4c4599562d 49154: uninitialized variable. Thanks to bruce@cubik.org (Bruce Mitchener)
git-svn-id: svn://10.0.0.236/trunk@76552 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 08:26:53 +00:00
hyatt%netscape.com
2b2574bdf1 Fix for 43375, r=ben
git-svn-id: svn://10.0.0.236/trunk@76551 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 08:15:47 +00:00
hyatt%netscape.com
84a22f9437 First-stage fix for dogfood bug 49012. r=ben
git-svn-id: svn://10.0.0.236/trunk@76550 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 08:11:11 +00:00
mscott%netscape.com
7cdd9ead65 Bug #47681 --> more polish on the message header pane, reformat the date header so it matches the format we use in the thread pane.
r=alecf


git-svn-id: svn://10.0.0.236/trunk@76549 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 07:35:25 +00:00
mscott%netscape.com
d977ab70c3 For modern skin:
Bug #46348, 22960 --> fix expensive style rules to make the message header pane faster,
fix vertical alignment problem between header values by forcing our html tags to
have 0 margins (they were inheriting a default margin size)
Bug #47681 Force proper alignment of the header names in the message pane.
r=alecf


git-svn-id: svn://10.0.0.236/trunk@76548 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 07:25:00 +00:00
mscott%netscape.com
40bd7d26f5 For classic windows skin:
Bug #46348, 22960 --> fix expensive style rules to make the message header pane faster,
fix vertical alignment problem between header values by forcing our html tags to
have 0 margins (they were inheriting a default margin size)
Bug #47681 Force proper alignment of the header names in the message pane.
r=alecf


git-svn-id: svn://10.0.0.236/trunk@76547 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 07:24:37 +00:00
mscott%netscape.com
48ef99a6e8 For classic skin:
Bug #46348, 22960 --> fix expensive style rules to make the message header pane faster,
fix vertical alignment problem between header values by forcing our html tags to
have 0 margins (they were inheriting a default margin size)
Bug #47681 Force proper alignment of the header names in the message pane.
r=alecf


git-svn-id: svn://10.0.0.236/trunk@76546 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 07:24:20 +00:00
mscott%netscape.com
babd5a5b29 Bug #46348, 22960 --> fix expensive style rules to make the message header pane faster,
fix vertical alignment problem between header values by forcing our html tags to
have 0 margins (they were inheriting a default margin size)
Bug #47681 Force proper alignment of the header names in the message pane.
r=alecf


git-svn-id: svn://10.0.0.236/trunk@76545 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 07:23:26 +00:00
mscott%netscape.com
305b4925f9 Bug #22960 --> rewrite the email address widget so it extends from xul:box instead of
base text. Remove needless box from the widget. This gets rid of the awful assertion
saying the widget had bad xul whenever we created one.
r=alecf


git-svn-id: svn://10.0.0.236/trunk@76544 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 07:21:51 +00:00
jst%netscape.com
ce9e38761e Fixing nsbeta3+ bug 30534. Don't lie about what DOM features we support, be honest./paralellCheckout | & less r=nisheeth@netscape.com
git-svn-id: svn://10.0.0.236/trunk@76543 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 07:09:05 +00:00
jst%netscape.com
f3eeaaab8a Fixing nsbeta3+ bug 44002. Don't use non boolean values (the value 2 in this case) as a boolean true since 2 != true in JS. This caused scripts that rely on img.complete == true when an image has loaded to break. r=nisheeth@netscape.com
git-svn-id: svn://10.0.0.236/trunk@76542 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 06:28:47 +00:00
jst%netscape.com
9baadc5225 Fixing nsbeta3+ bug 43327. Make window.history act like an array to be compatible with 4.x, and add proper security checks for DOM array access. r=mstoltz@netscape.com
git-svn-id: svn://10.0.0.236/trunk@76541 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 05:56:44 +00:00
jfrancis%netscape.com
879fac6cf9 adding a hidden pref for the editor:
editor.liReturnBehavior "no" will disable the default behavior of popping you out of lists if you hit return in an empty list item.


git-svn-id: svn://10.0.0.236/trunk@76539 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 05:26:32 +00:00
dougt%netscape.com
6e0d004a19 b=47143, r=valeski. Puts the real object release on the proper thread.
git-svn-id: svn://10.0.0.236/trunk@76538 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 05:02:37 +00:00
jfrancis%netscape.com
693d1707a2 fix for 48132: editor observer list maintainance was even less safe than i would have guessed...
git-svn-id: svn://10.0.0.236/trunk@76537 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 04:50:04 +00:00
pinkerton%netscape.com
65a9162688 Fix for 48291, r=saari. For internal formats that are not CF_TEXT, eg text/html,
treat them like they are unicode and do the fiddling required for win98.


git-svn-id: svn://10.0.0.236/trunk@76536 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 04:19:14 +00:00
jfrancis%netscape.com
3a6540f7dd 44684: adding a "GetAlignment" call to the editor so that ui can reflect alignment of selection
git-svn-id: svn://10.0.0.236/trunk@76535 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 03:59:50 +00:00
saari%netscape.com
3ae9cffa35 fix for nsbeta3+ 43254. r=pinkerton
git-svn-id: svn://10.0.0.236/trunk@76534 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 03:41:56 +00:00
saari%netscape.com
d08a39d4a3 fix for nsbeta3+ 29800; deactivate not firing properly on linux. r=bryner
git-svn-id: svn://10.0.0.236/trunk@76533 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 03:29:06 +00:00
mkaply%us.ibm.com
8670ca92e9 OS/2 Tinderbox break
OK will someone WAKE UP and realize that we need XP_WIN defined in the build?
XP_PC does NOT mean XP_WIN.
WE NEED XP_WIN IN THE BUILD
SOMEONE TURN IT ON IN THE MAKEFILE!


git-svn-id: svn://10.0.0.236/trunk@76532 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 03:18:03 +00:00
pinkerton%netscape.com
9f1b839c48 more build bustage fixes.
git-svn-id: svn://10.0.0.236/trunk@76531 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 03:11:33 +00:00
pinkerton%netscape.com
d51fc708c4 fix bustage a better way, include nsRDFResource.cpp directly instead of the shlb, which was just plain wrong. r=beard.
git-svn-id: svn://10.0.0.236/trunk@76530 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 02:32:40 +00:00
mcafee%netscape.com
e4ab603cfa Fix build warning, trailing slash looks run-on comment to the egcs compiler.
git-svn-id: svn://10.0.0.236/trunk@76529 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 01:53:59 +00:00
pinkerton%netscape.com
0f738af7ef add rdf lib to fix bustage
git-svn-id: svn://10.0.0.236/trunk@76528 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 01:49:49 +00:00
jband%netscape.com
090c61aae5 fix bug 49137 by using PR_GetEnv rather than prefs to get these developer options r=mccabe
git-svn-id: svn://10.0.0.236/trunk@76527 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 01:20:02 +00:00
scc%mozilla.org
c91876a661 not yet part of the build, this new class provides a more consistent and flexible answer to the need for functions like |AppendInt| and |AppendFloat|. It is a short readable string produced with printf.
git-svn-id: svn://10.0.0.236/trunk@76526 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 01:08:30 +00:00
mcafee%netscape.com
496587e3dd Moving autocomplete pref from message composition pane to addressing pane to save screen space (40888). r=slamm, a=glick
git-svn-id: svn://10.0.0.236/trunk@76525 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 01:06:27 +00:00
mcafee%netscape.com
29a929804f Splitting debug pref pane into 3 panes to save room (40888). Debug gets general stuff, debug1 gets events stuff, debug2 gets networking stuff. Explicitly picked generic names for these files in case usage changes later. r=slamm
git-svn-id: svn://10.0.0.236/trunk@76524 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 00:51:18 +00:00
ftang%netscape.com
0ef45c8297 move about.html from content to locale
fix bug 1547


git-svn-id: svn://10.0.0.236/trunk@76523 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 00:36:23 +00:00
ftang%netscape.com
5cc60ce8ae fix bug 1547 r=mcafee move about.html from content to locale
git-svn-id: svn://10.0.0.236/trunk@76522 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 00:32:00 +00:00
ftang%netscape.com
38fc2a3564 fix bug 1547 move about.html from content to locale
git-svn-id: svn://10.0.0.236/trunk@76521 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 00:31:02 +00:00
rogerl%netscape.com
3c89b06dc3 Backing out fix to see if Linux build passes alivetest.
git-svn-id: svn://10.0.0.236/trunk@76520 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 00:30:57 +00:00
ftang%netscape.com
a0d6347214 fix bug 1547 move about.html from content to locale
r=mcafee


git-svn-id: svn://10.0.0.236/trunk@76519 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 00:29:31 +00:00
ftang%netscape.com
ad30306e3c fix bug 1547. move about.html from content to locale
r=mcafee


git-svn-id: svn://10.0.0.236/trunk@76518 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 00:28:34 +00:00
ftang%netscape.com
a384444f4f move about.html to locale from content fix bug 1547 r=mcafee
git-svn-id: svn://10.0.0.236/trunk@76517 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 00:25:16 +00:00
tao%netscape.com
419c2f6ca1 Take out debug printout. (r,a)=ftang.
git-svn-id: svn://10.0.0.236/trunk@76516 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 00:17:51 +00:00
dbaron%fas.harvard.edu
9b56742a81 Attempt to fix Sun/HP/AIX bustage. r=cls
git-svn-id: svn://10.0.0.236/trunk@76515 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 00:15:50 +00:00
hyatt%netscape.com
a3f1e2295b Fix for 48083. r=danm
git-svn-id: svn://10.0.0.236/trunk@76514 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 00:10:40 +00:00
akkana%netscape.com
4df3e025f1 23587: Make accelerator and menu access keys settable through a pref. r=saari
git-svn-id: svn://10.0.0.236/trunk@76513 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 00:09:16 +00:00
ftang%netscape.com
491f25c126 add perl tool which convert CP932.TXT to a JIS0208 table
git-svn-id: svn://10.0.0.236/trunk@76512 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 00:07:54 +00:00
alecf%netscape.com
e1dfaacaac oops, forgot these in my last checkin
git-svn-id: svn://10.0.0.236/trunk@76511 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 00:05:31 +00:00
ftang%netscape.com
9d3908cda6 fix bug 35166 and 41666. Change the conversion to use the source from CP932.TXT
so we can convert round trip correctly with the other direction
the table is generated by ufrom. r=ftang


git-svn-id: svn://10.0.0.236/trunk@76510 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 00:03:06 +00:00
pinkerton%netscape.com
ef604420b0 Don't break VC5 (yawn). 48862, a=waterson
git-svn-id: svn://10.0.0.236/trunk@76509 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 00:02:38 +00:00
ftang%netscape.com
1318142bff correct the spelling of jis_0208-1983 and jis_0212-1990 (extra x)
r=nhotta fix bug 49107


git-svn-id: svn://10.0.0.236/trunk@76508 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-17 00:01:31 +00:00
hyatt%netscape.com
20a43ac75c Fix for 32661, r=brendan
git-svn-id: svn://10.0.0.236/trunk@76507 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:57:03 +00:00
bienvenu%netscape.com
825be26c71 don't link in js, that was just for testing
git-svn-id: svn://10.0.0.236/trunk@76506 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:52:32 +00:00
hyatt%netscape.com
3a019b1360 Fix for 44227, r=ben
git-svn-id: svn://10.0.0.236/trunk@76505 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:51:35 +00:00
alecf%netscape.com
3b07c56c25 rework nsMessages so they are generic across all server/folder types, so that we can recycle them later
r=putterman
for bug #26456


git-svn-id: svn://10.0.0.236/trunk@76504 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:45:58 +00:00
mcafee%netscape.com
218b8b30be Adding entry for images pref pane. r=matt
git-svn-id: svn://10.0.0.236/trunk@76503 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:45:12 +00:00
bienvenu%netscape.com
b38e8b4b9b fix linux bustage
git-svn-id: svn://10.0.0.236/trunk@76502 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:42:00 +00:00
hyatt%netscape.com
f0014800a4 Fix for 48450. r=morse
git-svn-id: svn://10.0.0.236/trunk@76501 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:41:32 +00:00
saari%netscape.com
2fdc688449 Fixing focus regression I caused by over eargly releasing documents from nsEventStateManager
git-svn-id: svn://10.0.0.236/trunk@76500 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:38:54 +00:00
bienvenu%netscape.com
dcdf6981f7 fix undo of imap delete r=mscott 29039
git-svn-id: svn://10.0.0.236/trunk@76497 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:35:48 +00:00
bienvenu%netscape.com
70ee0e056f part of fix for writing out newsrc files on a timer r=mscott 29743
git-svn-id: svn://10.0.0.236/trunk@76496 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:33:19 +00:00
dprice%netscape.com
7a7ea92f9c adding platform specific jar.mn
git-svn-id: svn://10.0.0.236/trunk@76495 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:29:55 +00:00
dprice%netscape.com
427d885360 moving platform specific files to their own manifest files.
git-svn-id: svn://10.0.0.236/trunk@76494 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:28:40 +00:00
robinf%netscape.com
a68ee3daa9 updating this image to remove license and readme icons
git-svn-id: svn://10.0.0.236/trunk@76493 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:26:21 +00:00
bienvenu%netscape.com
f15e25ecbe cache charset converters used in msg dispaly r=nhotta 47542
git-svn-id: svn://10.0.0.236/trunk@76492 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:22:26 +00:00
bienvenu%netscape.com
9dfe4183e4 fix begins with search, r=alecf 49049
git-svn-id: svn://10.0.0.236/trunk@76491 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:19:51 +00:00
dbaron%fas.harvard.edu
aea37551a9 Fix string leaks from nsWindow::SetTitle. r=pavlov b=49148
git-svn-id: svn://10.0.0.236/trunk@76490 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:18:33 +00:00
dbaron%fas.harvard.edu
cec97be5f7 Fix leak of strings used as hash table keys. r=waterson b=48880
git-svn-id: svn://10.0.0.236/trunk@76489 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:16:21 +00:00
hyatt%netscape.com
f7c2acd171 Fix for 45728. r=saari
git-svn-id: svn://10.0.0.236/trunk@76488 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:14:50 +00:00
dbaron%fas.harvard.edu
eb3bc9d467 Fix a leak of the keys used as strings in all cases. r=waterson b=44051
git-svn-id: svn://10.0.0.236/trunk@76487 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:14:08 +00:00
kin%netscape.com
1e4907fd53 Partial fix for bug #45152: Typed text does not render in TextAreas with a horizontal scrollbar
Made Reflow() invalidate the correct region during an incremental or dirty reflow.
r=waterson@netscape.com


git-svn-id: svn://10.0.0.236/trunk@76486 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:12:19 +00:00
dbaron%fas.harvard.edu
34be9dc90a Fix two string leaks: one in nsBrowserInstance::LoadInitialPage, and the other in nsBrowserInstance::GetDocumentCharset. r=waterson
git-svn-id: svn://10.0.0.236/trunk@76485 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:11:31 +00:00
nbhatla%netscape.com
adf077bbc2 #46519-> Mac Classic Polish Fixes. Fixes editor disabled states for bold, underline, italic, ol, and ul buttons in format toolbar. Also pertains to bugs #47685 and #48700. r=cmanske,sfraser
git-svn-id: svn://10.0.0.236/trunk@76484 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:09:15 +00:00
terry%mozilla.org
4fdca29a5d Deflect email away from me.
git-svn-id: svn://10.0.0.236/trunk@76483 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:07:37 +00:00
nbhatla%netscape.com
9ba567b5ab #46519 -> Mac Classic Skin Polish. Updates to Editor Format Toolbar icons, for bugs #47685 and #48700. Also removed duplicate lines from navigator.css. r=hangas
git-svn-id: svn://10.0.0.236/trunk@76482 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:06:56 +00:00
morse%netscape.com
65b4d1ab32 bug 42438, always display capture on context menu when prefill is displayed, r=law
git-svn-id: svn://10.0.0.236/trunk@76481 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:06:52 +00:00
dbaron%fas.harvard.edu
35100701ae Count the nsFontGTK class in the leak stats. Some of these are leaked, so the numbers may go up. r=waterson
git-svn-id: svn://10.0.0.236/trunk@76480 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:05:56 +00:00
morse%netscape.com
7f6759ad63 bug 49189, crash when updating wallet tables, r=pnunn
git-svn-id: svn://10.0.0.236/trunk@76479 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:05:03 +00:00
dbaron%fas.harvard.edu
1adb256d88 Reduce the risk of parser leaks by releasing the parsers owned by CSSLoaders when no longer needed. r=attinasi
git-svn-id: svn://10.0.0.236/trunk@76478 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:04:42 +00:00
dbaron%fas.harvard.edu
52df7f5eb4 Change the stack trace format printed by the Boehm GC on Linux so it can be post-processed by addr2line. r=wade
git-svn-id: svn://10.0.0.236/trunk@76477 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:02:40 +00:00
ssu%netscape.com
3cf904db1a fixing bug #33342 - new exit setup string. a=dveditz r=sgehani
git-svn-id: svn://10.0.0.236/trunk@76476 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:02:19 +00:00
ssu%netscape.com
a8a3467272 fixing bug #44364 - uninstaller no longer leaves .rdf files around. a=dveditz r=sgehani
git-svn-id: svn://10.0.0.236/trunk@76475 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 23:01:21 +00:00
kmcclusk%netscape.com
1f4900b52c Suppress nsWidget::Move if the window is already at location specified b=44476 (p=Tomi.Leppikangas@oulu.fi) r=syd@netscape.com
git-svn-id: svn://10.0.0.236/trunk@76474 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 22:58:15 +00:00
putterman%netscape.com
450542aba4 Fix for 40818. Remove mail items from search menu. r=alecf.
git-svn-id: svn://10.0.0.236/trunk@76473 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 22:57:51 +00:00
putterman%netscape.com
23bcdd7d66 Fix for 37314. Delete works in standalone message window. r=alecf,mscott
git-svn-id: svn://10.0.0.236/trunk@76472 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 22:57:20 +00:00
putterman%netscape.com
f93fedfbe7 Fix for 40818. Clean up search menus. r=alecf.
git-svn-id: svn://10.0.0.236/trunk@76471 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 22:56:32 +00:00
putterman%netscape.com
bb273bf350 Fix for bugs 43879 and 40818. Fix up search menus and remove folder picker from rename dialog. r=alecf
git-svn-id: svn://10.0.0.236/trunk@76470 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 22:56:09 +00:00
mcafee%netscape.com
447a4a4066 Adding thin separator, r=slamm
git-svn-id: svn://10.0.0.236/trunk@76469 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 22:54:56 +00:00
putterman%netscape.com
90bf8a86b7 Fix for 45402. In threaded mode clicking on twisty now opens entire thread. r=alecf
git-svn-id: svn://10.0.0.236/trunk@76468 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 22:54:43 +00:00
kmcclusk%netscape.com
a3b80ef3fc Suppress nsWindow::Move if the window is already at location specified b=44476 (p=Tomi.Leppikangas@oulu.fi) r=syd@netscape.com
git-svn-id: svn://10.0.0.236/trunk@76467 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 22:53:32 +00:00
mcafee%netscape.com
2f0f0b53c6 Minor rewording of label in smart browsing pref pane.
git-svn-id: svn://10.0.0.236/trunk@76466 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 22:51:42 +00:00
hyatt%netscape.com
815a18a9b2 Fix for 49118, r=ben
git-svn-id: svn://10.0.0.236/trunk@76464 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 22:50:25 +00:00
mcafee%netscape.com
77052ae329 Remove unused id walletServer, finishing morses checkin for 48267.
git-svn-id: svn://10.0.0.236/trunk@76463 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 22:49:54 +00:00
hyatt%netscape.com
a95fc61e73 Fix for 48459, r=danm
git-svn-id: svn://10.0.0.236/trunk@76462 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 22:49:31 +00:00
chuang%netscape.com
e7756d72db Bug 44831 Drop down list in New Mailing List window doesn't display the Address Book names. r=putterman
git-svn-id: svn://10.0.0.236/trunk@76461 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 22:48:56 +00:00
mcafee%netscape.com
5dacba2386 Making mousewheel pref pane more readable. r=slamm
git-svn-id: svn://10.0.0.236/trunk@76460 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 22:48:49 +00:00
chuang%netscape.com
417182d7c0 Bug 45331, 45332 Remove 3 buttons in mailing list dialog, r=putterman
git-svn-id: svn://10.0.0.236/trunk@76459 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 22:48:02 +00:00
nhotta%netscape.com
89830f7ad6 Changed to generate HTML 3.2 CER instead of HTML 4 for both file and mail, bug 48041, r=akkana.
git-svn-id: svn://10.0.0.236/trunk@76458 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 22:47:35 +00:00
nhotta%netscape.com
3946171a50 Changed charset names as case sensitive, bug 39793, r=cata.
git-svn-id: svn://10.0.0.236/trunk@76457 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 22:46:37 +00:00
rogerl%netscape.com
e1d7a156e3 Bug #31255. r,a=brendan. Once more unto the '-->' accepted as line comment
fix.


git-svn-id: svn://10.0.0.236/trunk@76456 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 22:46:04 +00:00
mcafee%netscape.com
04292a0f3d Adding width for mousewheel prefs pulldown (40888). r=slamm
git-svn-id: svn://10.0.0.236/trunk@76455 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 22:45:48 +00:00
mcafee%netscape.com
2b33731fbf Ignore generated files.
git-svn-id: svn://10.0.0.236/trunk@76454 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 22:44:35 +00:00
rogerl%netscape.com
7a6dd29961 Bug #39141, r=mccabe, a=beard. Fix crash for empty array initializer.
git-svn-id: svn://10.0.0.236/trunk@76453 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 22:43:26 +00:00
sgehani%netscape.com
3425279758 Can now install to Macs with boot volumes that have slashes in their names.
[nsbeta3+ b=18482; r=ssu; a=dveditz]


git-svn-id: svn://10.0.0.236/trunk@76452 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 22:43:08 +00:00
racham%netscape.com
47ba7e7bae Fixing bug 46320. Reducing the number of global files by moving profile regitry to the product sub-directory under HOME. r=dougt
git-svn-id: svn://10.0.0.236/trunk@76451 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 22:40:36 +00:00
racham%netscape.com
afbbb2afc0 Fixing bug 46320. Reducing the number of global files by moving profile registry to product sub-directory under HOME. r=dougt
git-svn-id: svn://10.0.0.236/trunk@76450 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 22:40:27 +00:00
sfraser%netscape.com
e4582186b3 Fix for bug 49196 -- buttons not showing up in Save/Don't save dialogs. Correctly used collapsed, not hidden, to make hyatt's change. r=ducarroz, a=leaf.
git-svn-id: svn://10.0.0.236/trunk@76448 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 21:28:25 +00:00
ducarroz%netscape.com
272f7ad402 Fix Mac bustage. Added nsICommandHandler.cpp to the project
git-svn-id: svn://10.0.0.236/trunk@76442 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 16:40:49 +00:00
ducarroz%netscape.com
6e3c7f793f Fix Mac bustage. Added nsIContextMenuListener.idl and nsICommandHandler.idl to the project
git-svn-id: svn://10.0.0.236/trunk@76441 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 16:40:17 +00:00
mkaply%us.ibm.com
049de0d702 #44517
r=dougt, a=brendan
Make OS/2 Desktop directory NLS aware


git-svn-id: svn://10.0.0.236/trunk@76440 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 14:27:18 +00:00
pete%alphanumerica.com
47f1260e9d Fixed problem i was having returning array from readDir member function.
Thanks jband for the fix.

not part of the build

r=jband

--pete


git-svn-id: svn://10.0.0.236/trunk@76439 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 13:35:13 +00:00
locka%iol.ie
7c63d2a576 Changed implementation of OnShowContextMenu to reflect updated IDL. b=48270 a=valeski
git-svn-id: svn://10.0.0.236/trunk@76438 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 09:00:44 +00:00
locka%iol.ie
98a262bb01 Added nsICommandHandler and nsCommandHandler.cpp to build. b=48270 a=valeski
git-svn-id: svn://10.0.0.236/trunk@76437 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 08:56:37 +00:00
locka%iol.ie
75c06667fb Added newline to end of file. b=48270 a=valeski
git-svn-id: svn://10.0.0.236/trunk@76436 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 08:54:49 +00:00
locka%iol.ie
22274c8788 Change consts to unsigned long. b=48270 a=valeski
git-svn-id: svn://10.0.0.236/trunk@76435 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 08:53:57 +00:00
locka%iol.ie
221c92cd8f Added mouse DOM listener to listen for context menu events and notify the embedding client. b=48270 a=valeski
git-svn-id: svn://10.0.0.236/trunk@76434 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 08:51:58 +00:00
locka%iol.ie
68dda5d2f6 Fixed some incorrect embedding issues. b=48270 a=valeski
git-svn-id: svn://10.0.0.236/trunk@76433 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 08:50:00 +00:00
locka%iol.ie
9c15cfb380 Added newline to end of file. b=48270 a=valeski
git-svn-id: svn://10.0.0.236/trunk@76432 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 08:47:57 +00:00
locka%iol.ie
ac6f43e8ef Added command handler to module's factory list b=48270 a=valeski
git-svn-id: svn://10.0.0.236/trunk@76431 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 08:44:58 +00:00
ben%netscape.com
01dd19a973 46613..
git-svn-id: svn://10.0.0.236/trunk@76430 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 08:30:42 +00:00
hyatt%netscape.com
f69d98b3e6 Fix for 45248, r=ben
git-svn-id: svn://10.0.0.236/trunk@76429 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 08:14:01 +00:00
alecf%netscape.com
d933e2c805 remove commented-out functions (not used anyway)
git-svn-id: svn://10.0.0.236/trunk@76428 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 08:01:34 +00:00
ben%netscape.com
6173356268 46613...
git-svn-id: svn://10.0.0.236/trunk@76427 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 07:58:13 +00:00
ben%netscape.com
a42af0bdcb 46613..
git-svn-id: svn://10.0.0.236/trunk@76426 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 07:57:31 +00:00
alecf%netscape.com
7431c64b15 fix a bunch of UMRs r=syd
(no bug but I needed these to get my purify build going)


git-svn-id: svn://10.0.0.236/trunk@76425 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 07:39:38 +00:00
dp%netscape.com
b3a71129e7 Removed unused static.
git-svn-id: svn://10.0.0.236/trunk@76424 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 07:33:23 +00:00
dp%netscape.com
d1fcc74895 Fixed debug stmt to reflect code changes around it. Not compiled by default.
git-svn-id: svn://10.0.0.236/trunk@76423 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 07:26:46 +00:00
hyatt%netscape.com
79c8d5c024 Fix for 47303. r=mscott
git-svn-id: svn://10.0.0.236/trunk@76422 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 07:26:45 +00:00
dprice%netscape.com
7639d09723 adding forgotten files
git-svn-id: svn://10.0.0.236/trunk@76421 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 07:26:09 +00:00
saari%netscape.com
665e7d658e fix for nsbeta3+ leak 35553; leak document on shutdown. r=pinkerton
git-svn-id: svn://10.0.0.236/trunk@76420 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 06:37:51 +00:00
dprice%netscape.com
ba864a022d adding forgotten file
git-svn-id: svn://10.0.0.236/trunk@76419 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 05:50:52 +00:00
dprice%netscape.com
5789cd97a2 adding some files that were forgotten
git-svn-id: svn://10.0.0.236/trunk@76418 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 05:46:18 +00:00
ben%netscape.com
6f294b092a 46613...
git-svn-id: svn://10.0.0.236/trunk@76417 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 05:44:10 +00:00
dprice%netscape.com
1a126d8faa removing duplicated files
git-svn-id: svn://10.0.0.236/trunk@76416 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 05:37:06 +00:00
dprice%netscape.com
2d3ab8edb0 adding in pref-passwords.xul
git-svn-id: svn://10.0.0.236/trunk@76415 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 05:08:07 +00:00
ben%netscape.com
723100aa26 46613..
git-svn-id: svn://10.0.0.236/trunk@76414 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 05:08:01 +00:00
ben%netscape.com
5366458b10 46613...
git-svn-id: svn://10.0.0.236/trunk@76413 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 05:05:21 +00:00
dprice%netscape.com
cbbc6f4aae moving pref-irc.xul to core.jar
git-svn-id: svn://10.0.0.236/trunk@76412 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 04:57:23 +00:00
bryner%uiuc.edu
bc30436d00 Patch from disttsc@bart.nl for bug 49089 -- using Enter in filepicker was
broken because we needed to change event.which to event.keyCode.  r=me.


git-svn-id: svn://10.0.0.236/trunk@76411 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 04:23:58 +00:00
dprice%netscape.com
e2a9da576d replacing this file in the right spot.
git-svn-id: svn://10.0.0.236/trunk@76410 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 04:23:40 +00:00
ben%netscape.com
544ea04016 fixing mac
git-svn-id: svn://10.0.0.236/trunk@76409 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 04:14:34 +00:00
dprice%netscape.com
fb5531a9d1 adding dtd file to en-US.jar
git-svn-id: svn://10.0.0.236/trunk@76408 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 04:10:00 +00:00
shaver%mozilla.org
84ea4561c3 Fix 47354 and 39975 by providing a system-privileged scope backstop for
JS Components, and teaching the ScriptSecurityManager to check for
XPC-wrapped native objects in the scope chain when looking for an
object's principal. r=jband/a=brendan


git-svn-id: svn://10.0.0.236/trunk@76407 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 04:01:02 +00:00
nbhatla%netscape.com
84fc7b931c #48704 -> Adding print button styles to navigator in win/unix classic skin. Forgot to submit this in last checkin with mac classic fix.
git-svn-id: svn://10.0.0.236/trunk@76406 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 03:37:43 +00:00
ben%netscape.com
0470757724 add a default binding for menubutton-dual
git-svn-id: svn://10.0.0.236/trunk@76405 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 03:34:22 +00:00
ben%netscape.com
f81051a308 46613, more classic skin work
git-svn-id: svn://10.0.0.236/trunk@76404 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 03:31:42 +00:00
ben%netscape.com
6078340884 fix for 46613 (classic skin polish) and 47636 (cannot go back to multiple
search engine listing)


git-svn-id: svn://10.0.0.236/trunk@76403 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 03:30:24 +00:00
ben%netscape.com
d72b1ce951 46613 and 47636 (classic skin work, and make it so that you can go back
to the multiple search results listing)


git-svn-id: svn://10.0.0.236/trunk@76402 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 03:29:32 +00:00
nbhatla%netscape.com
fe5478ece9 #46519 -> Mac Classic Skin Polish. Work mostly on the editor and messenger, fixing icons and mouseOver/toggled behavior. #47680-> CSS fix for proper modern tab borders. #17924-> Fix for status bar height. #45685-> Added column header icons and splitter functionality in classic mail. #45128-> Mail thread icons show proper new message states like 4.x. r=hangas
git-svn-id: svn://10.0.0.236/trunk@76401 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 03:27:44 +00:00
dbaron%fas.harvard.edu
a8abdedbbd Add newline to end of file to fix HP bustage.
git-svn-id: svn://10.0.0.236/trunk@76400 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 03:26:51 +00:00
putterman%netscape.com
84c31a66d2 Fix for 48929. Put Order Received back in. r=alecf.
git-svn-id: svn://10.0.0.236/trunk@76399 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 03:24:35 +00:00
putterman%netscape.com
081783e2eb Fixes 45149. Can now Print from the standalone window. r=alecf.
git-svn-id: svn://10.0.0.236/trunk@76398 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 03:23:21 +00:00
waterson%netscape.com
58c8e0075d Backing out pnunn/syd's changes in order to try to get smoketests back. r=pnunn
git-svn-id: svn://10.0.0.236/trunk@76397 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 03:16:46 +00:00
mkaply%us.ibm.com
c627ac14a9 OS/2 Tinderbox break
Hey conrad@ingress.com - please watch out for us. You are breaking us A LOT.


git-svn-id: svn://10.0.0.236/trunk@76396 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 03:13:16 +00:00
nbhatla%netscape.com
7d1fb2d74a First Checked In.
git-svn-id: svn://10.0.0.236/trunk@76395 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 03:09:18 +00:00
nbhatla%netscape.com
48d305f50c Fix for #48704 -> Adding print button to browser navigation toolbar. r=hangas.
git-svn-id: svn://10.0.0.236/trunk@76394 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 03:08:02 +00:00
dprice%netscape.com
069f6a55b4 removing navigator/wallet/* from jar.mn
git-svn-id: svn://10.0.0.236/trunk@76393 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 03:00:25 +00:00
dprice%netscape.com
afa61f82c1 removed communicator/wallet/* from jar.mn, those folders are gone.
git-svn-id: svn://10.0.0.236/trunk@76391 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 02:46:26 +00:00
morse%netscape.com
7bafd119d9 bug 49116, javascript errors when doing edit in javascript window, r=waterson
git-svn-id: svn://10.0.0.236/trunk@76390 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 02:35:43 +00:00
danm%netscape.com
e2a01acf37 adding handling for _top targets, which strangely seemed to just be missing. bug 32342 r=hyatt.
git-svn-id: svn://10.0.0.236/trunk@76389 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 02:16:11 +00:00
jband%netscape.com
a4e301356a initial checkin - NOT PART OF BUILD
git-svn-id: svn://10.0.0.236/trunk@76388 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 02:07:37 +00:00
waterson%netscape.com
ba0a825e73 Bug 44480. Remove more obsolete files that I missed the first time around.
git-svn-id: svn://10.0.0.236/trunk@76387 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 02:00:59 +00:00
waterson%netscape.com
0aa08c1512 Bug 44480. Demote 'width' and 'height' to NSHTMLDocument. r=jst
git-svn-id: svn://10.0.0.236/trunk@76386 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 01:56:00 +00:00
pinkerton%netscape.com
0bcf10dbff put code in InvokeDragSession() to turn off mouseCapture when the drag begins. moved code that finds a frame from a DOM node from mac code into base class. bug 48250.
git-svn-id: svn://10.0.0.236/trunk@76384 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 01:46:34 +00:00
pinkerton%netscape.com
119973f434 full backout of code i commented out, the fixes go elsewhere.
git-svn-id: svn://10.0.0.236/trunk@76383 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 01:45:23 +00:00
morse%netscape.com
d56a3f796f bug 47256, minor wording change, change=verah r=morse
git-svn-id: svn://10.0.0.236/trunk@76382 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 01:43:23 +00:00
morse%netscape.com
b67c3e5390 bug 48949, fix UTF8Get routine to work with multibyte characters, r=dveditz
git-svn-id: svn://10.0.0.236/trunk@76381 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 01:34:58 +00:00
pnunn%netscape.com
398f60ff0b bug#46704: chrome priority in imgcache. syd, r:pnunn.
git-svn-id: svn://10.0.0.236/trunk@76380 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 01:20:39 +00:00
pnunn%netscape.com
9d8c0da490 bug#46704: chrome priority in image cache. syd, r:pnunn.
git-svn-id: svn://10.0.0.236/trunk@76379 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 01:19:44 +00:00
waterson%netscape.com
e71218e1d0 Bug 47154. Treat '\\n' and '\\r' as whitespace, too. Also, use 'inline' instead of macros to avoid multiple argument evaluation. r=ftang
git-svn-id: svn://10.0.0.236/trunk@76378 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 01:08:43 +00:00
waterson%netscape.com
efe0fb7e1b Bug 44480. Remove obsolete files.
git-svn-id: svn://10.0.0.236/trunk@76376 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 01:05:22 +00:00
waterson%netscape.com
e029e1cca8 Bug 44480. Demote 'width' and 'height' attributes from NSDocument to NSHTMLDocument and XULDocument; make nsHTMLDocument's implementation use the <body> element's frame (instead of the <html> element's frame) to determine metrics. r=jst
git-svn-id: svn://10.0.0.236/trunk@76375 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 01:04:52 +00:00
javi%netscape.com
91bf2b5156 Remove some unnecessary access paths from the project file.
git-svn-id: svn://10.0.0.236/trunk@76372 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 00:56:53 +00:00
beard%netscape.com
569a41dfec bug #47920: fixes unitialized variable.
git-svn-id: svn://10.0.0.236/trunk@76371 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 00:46:17 +00:00
pinkerton%netscape.com
99b7fce821 Dead code removal
git-svn-id: svn://10.0.0.236/trunk@76370 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 00:44:15 +00:00
hyatt%netscape.com
b4caa66fbf Fix that is needed for 46719, r=ducarroz,ben
git-svn-id: svn://10.0.0.236/trunk@76369 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 00:42:13 +00:00
pinkerton%netscape.com
92c3e51c6b Add KillPendingTimers() to nsIMenuParent and call it when we open a sibling
submenu. Not clearing out this timer causes confusion with the rollup
listeners. Fixes 48989 and 28309. Thanks to Dean, who put me on the right
track. r=hyatt.


git-svn-id: svn://10.0.0.236/trunk@76368 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 00:35:04 +00:00
warren%netscape.com
fcb1b8f06c Changes to allow uncopied string keys. Changes to copy string key's null byte. code=jband, r=warren
git-svn-id: svn://10.0.0.236/trunk@76367 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 00:32:59 +00:00
sgehani%netscape.com
e61f27f091 Fix scrollbar crasher in custom install dialog for mac installer.
[nsbeta3+ b=48882; r=ssu]


git-svn-id: svn://10.0.0.236/trunk@76366 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 00:32:56 +00:00
hyatt%netscape.com
837b4508e8 Backing out fix to 40596 and fixing bug #49051, r=putterman
git-svn-id: svn://10.0.0.236/trunk@76364 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-16 00:20:29 +00:00
hyatt%netscape.com
1cca5f9c05 Better fix for 49066. r=saari,danm
git-svn-id: svn://10.0.0.236/trunk@76361 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 22:58:12 +00:00
hyatt%netscape.com
ae6e08c788 Fix for bug #49066, r=saari
git-svn-id: svn://10.0.0.236/trunk@76360 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 22:46:09 +00:00
robinf%netscape.com
845817de98 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@76359 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 22:41:32 +00:00
robinf%netscape.com
e0e4fa0141 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@76358 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 22:34:21 +00:00
edburns%acm.org
14ce93d1c7 bug=45127
r=edburns
a=edburns
author=avm@sparc.spb.su

Wrong URL for kRDF_type.


git-svn-id: svn://10.0.0.236/trunk@76357 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 22:09:05 +00:00
robinf%netscape.com
e81c19cca3 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@76356 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 21:44:31 +00:00
jgmyers%netscape.com
7372c3b207 remove 'no acceptable authetication' dialog box: bug 31737 r=javi a=lord
git-svn-id: svn://10.0.0.236/trunk@76355 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 21:23:49 +00:00
javi%netscape.com
80049c0c23 Whomp the SECURITY_MAC_BRANCH onto the tip.
git-svn-id: svn://10.0.0.236/trunk@76354 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 21:10:38 +00:00
robinf%netscape.com
e1cb4fbc1f *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@76353 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 21:10:35 +00:00
javi%netscape.com
cf61dc720b Whomp SECURITY_MAC_BRANCH onto tip
git-svn-id: svn://10.0.0.236/trunk@76352 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 21:09:21 +00:00
hyatt%netscape.com
7cc5153fd3 Fix for 49009. r=danm
git-svn-id: svn://10.0.0.236/trunk@76351 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 21:00:52 +00:00
dmose%mozilla.org
2d67cccf73 refine to assign to the prototype rather than the created objects, and add debugging stuff to help shaver. a=r=(not built)
git-svn-id: svn://10.0.0.236/trunk@76350 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 20:58:17 +00:00
danm%netscape.com
a7f044e069 treat width/height=* features to mean size of parent window. compatibility with Nav 4. bug 30394.
git-svn-id: svn://10.0.0.236/trunk@76349 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 20:01:20 +00:00
mkaply%us.ibm.com
402e059347 OS/2 tinderbox break - not sure how to fix it right, so just fix it for OS/2
git-svn-id: svn://10.0.0.236/trunk@76348 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 19:57:44 +00:00
sfraser%netscape.com
23d76bb604 Fix for 34741 -- command-drag background windows when a dialog is up. r=danm
git-svn-id: svn://10.0.0.236/trunk@76347 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 19:14:04 +00:00
leaf%mozilla.org
ef74e721c7 Automated update
git-svn-id: svn://10.0.0.236/trunk@76344 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 18:45:09 +00:00
colin%theblakes.com
138965b630 libIDL fix for OpenVMS only. r=leaf
git-svn-id: svn://10.0.0.236/trunk@76343 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 18:30:59 +00:00
pinkerton%netscape.com
85f9625e19 mark thread tree as one that doesn't allow drops between rows. bug# 47105
git-svn-id: svn://10.0.0.236/trunk@76342 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 18:25:07 +00:00
pinkerton%netscape.com
67ffa161ec remove the ondragOver handler as it wasn't doing anythning but drawing useless drag feedback. bug 43421.
git-svn-id: svn://10.0.0.236/trunk@76341 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 18:24:00 +00:00
pinkerton%netscape.com
e4d7aed5a5 fix for 47105, retooling of tree d&d to not be so confusing, to use the style system a little more, and to handle the case where a tree won't let you drop anything between rows.
git-svn-id: svn://10.0.0.236/trunk@76340 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 18:23:34 +00:00
pinkerton%netscape.com
c90a093e1b part of fix for 47105, clear canDrop every time we dispatch a dragOver event. it will be set accordingly if it is meant to be.
git-svn-id: svn://10.0.0.236/trunk@76339 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 18:22:39 +00:00
rbs%maths.uq.edu.au
d4465be0f3 [not part of default build] Another go at fixing build bustage b:42793. It prevented the enabling of xprint with mathml. Paul B. Saitta <pbs@po.cwru.edu> verified that the changes compile and run, after accidently forgetting to turn xprint on the other time. a:waterson@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@76338 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 18:22:31 +00:00
pinkerton%netscape.com
9d9cbe5eb9 Fix for 43421, add a style rule to use the selection color when a folder is hovered over during drags. r=ben.
git-svn-id: svn://10.0.0.236/trunk@76337 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 18:21:40 +00:00
attinasi%netscape.com
7c743c6f44 New Daily Run data: not part of build
git-svn-id: svn://10.0.0.236/trunk@76336 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 17:30:17 +00:00
despotdaemon%netscape.com
84fa1698af Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@76333 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 16:41:58 +00:00
nboyd%atg.com
0846db0ec2 Merge changes from EXP_DEBUGGER branch into tip.
Implements simple command-line debugger for scripts.


git-svn-id: svn://10.0.0.236/trunk@76330 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 15:54:46 +00:00
pete%alphanumerica.com
3b3c182ed7 moving APPEND comment. Wrong spot.
r=dougt

--pete


git-svn-id: svn://10.0.0.236/trunk@76329 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 13:14:51 +00:00
pete%alphanumerica.com
fbc81cccf5 added readDir(dirPath) member function.
Also fixed a small bug in copy to return if the source file is a dir.
r=dougt

--pete


git-svn-id: svn://10.0.0.236/trunk@76328 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 12:37:40 +00:00
mcgreer%netscape.com
1a7dd97349 should be able to set negative offset during cert creation
git-svn-id: svn://10.0.0.236/trunk@76327 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 05:08:13 +00:00
morse%netscape.com
30b370c86b bug 48986, remove form prefill and capture from tasks menu
git-svn-id: svn://10.0.0.236/trunk@76326 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 03:47:45 +00:00
leaf%mozilla.org
287702623d Automated update
git-svn-id: svn://10.0.0.236/trunk@76325 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 03:02:53 +00:00
rjc%netscape.com
ee4f909197 Fix bug # 47927: crash loading 2nd ftp URL. r=waterson
git-svn-id: svn://10.0.0.236/trunk@76324 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 01:43:42 +00:00
valeski%netscape.com
5bd6accae5 26719. applying patch for bns_robson@hotmail.com to fix handle leak. r=valeski
git-svn-id: svn://10.0.0.236/trunk@76323 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-15 01:35:30 +00:00
jgaunt%netscape.com
df95a315cc r=jdunn@netscape.com r=edburns@acm.org r=cls@netscape.com
a=leaf@netscape.com a=drapeau@eng.sun.com
bug=#43090
fix for hpux java plugin, generalized through configure.in for anyone.


git-svn-id: svn://10.0.0.236/trunk@76321 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 23:32:14 +00:00
ducarroz%netscape.com
2d4503bc07 Fix for bug 41928. Fix wrong menu id. R=putterman
git-svn-id: svn://10.0.0.236/trunk@76320 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 23:28:18 +00:00
dmose%mozilla.org
8d84ef21cf Major fixes to the code that cleans up at the end of an LDAP search and/or when a search has been cancelled. Most visible effect: the throbber should always stop spinning at the end of a search, rather than sometimes lingering on indefinitely. a=r=(not built)
git-svn-id: svn://10.0.0.236/trunk@76319 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 23:16:03 +00:00
law%netscape.com
345de6f67f Bug 40792; remove obsolete error-handling code to prevent crash; r=slamm@netscape.com
git-svn-id: svn://10.0.0.236/trunk@76318 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 23:12:50 +00:00
dmose%mozilla.org
185aabb68c add debugging frobs to XP_UNIX platforms. setenv XPCOM_DEBUG_BREAK to make NS_ASSERTION have other behaviors, like dumping the stack to stderr or sending SIGSTOP to the pgrp to allow attaching with gdb for race condition debugging. r=bryner@netscape.com, a=brendan@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@76317 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 23:09:39 +00:00
pinkerton%netscape.com
2a0b7d8d70 backing out my last change, it breaks scrollbars.
git-svn-id: svn://10.0.0.236/trunk@76316 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 23:03:25 +00:00
valeski%netscape.com
bf4bad597e 48884, r=morse. fixing cookie list ordering problem and cookie insertion problem.
git-svn-id: svn://10.0.0.236/trunk@76314 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 23:00:54 +00:00
valeski%netscape.com
1131b6e0aa 48884, r=morse. removing extraneous io service and newuri usage.
git-svn-id: svn://10.0.0.236/trunk@76313 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 23:00:13 +00:00
mcgreer%netscape.com
47afd9ecca wrong header
git-svn-id: svn://10.0.0.236/trunk@76312 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 22:50:36 +00:00
sgehani%netscape.com
520950ea41 Eliminate engine thread yielding to main thread duirng XPCOM extraction.
[nsbeta3+ b=1895; r=ssu]


git-svn-id: svn://10.0.0.236/trunk@76310 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 22:40:14 +00:00
dougt%netscape.com
6591791df9 Changing the nsDirectoryService define. This should have been done with the rest of the nsDirectorySerivce changes. r=conrad.
git-svn-id: svn://10.0.0.236/trunk@76309 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 22:38:27 +00:00
dougt%netscape.com
faa139162d Fix for 48832, r=conrad. a regression.
git-svn-id: svn://10.0.0.236/trunk@76307 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 22:33:45 +00:00
pinkerton%netscape.com
9a6dd56096 for 48250, turn off mouse capture when a drag gesture begins. r=mjudge.
git-svn-id: svn://10.0.0.236/trunk@76306 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 22:29:03 +00:00
pinkerton%netscape.com
ecbc628010 making CaptureMouse a public interface on nsIFrame r=mjudge for bug 48250.
git-svn-id: svn://10.0.0.236/trunk@76305 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 22:28:41 +00:00
nelsonb%netscape.com
142b5d73b3 Build des.c and desblapi.c.
git-svn-id: svn://10.0.0.236/trunk@76304 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 22:28:10 +00:00
nelsonb%netscape.com
f7c0752c6c The Initial Developer of the Original Code is Nelson B. Bolyard,
nelsonb@iname.com.  Portions created by Nelson B. Bolyard are
Copyright (C) 1990, 2000  Nelson B. Bolyard, All Rights Reserved.


git-svn-id: svn://10.0.0.236/trunk@76303 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 22:27:20 +00:00
kestes%staff.mail.com
783b144faa document that you should get the tests working first.
put in a warning that it may be hard to install.


git-svn-id: svn://10.0.0.236/trunk@76302 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 22:22:15 +00:00
waterson%netscape.com
b270876b7f Back out shanjian's last change as it was causing several whitespace-related regressions. r=attinasi
git-svn-id: svn://10.0.0.236/trunk@76301 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 22:11:41 +00:00
rods%netscape.com
690d980baf was not unregistering the listers correctly. Not they unreg with the
listener object.
b=48915 r=kmcclusk


git-svn-id: svn://10.0.0.236/trunk@76300 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 22:05:28 +00:00
wtc%netscape.com
59621a3060 Bugzilla bug #15906: added GC_LEAK_DETECTOR support for Linux.
Modified files: config.mk, primpl.h, pr/src/Makefile, pr/src/Makefile.in,
pr/src/memory/Makefile, pr/src/memory/Makefile.in, prthinfo.c, ptthread.c


git-svn-id: svn://10.0.0.236/trunk@76299 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 22:05:22 +00:00
mcgreer%netscape.com
6305e4dc20 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@76298 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 22:04:22 +00:00
gayatrib%netscape.com
53b043c015 fix for bug 41987. r=alecf
git-svn-id: svn://10.0.0.236/trunk@76297 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 22:03:23 +00:00
rods%netscape.com
4177506b45 it was incorrctly painting both images
b=48156 r=kmcclusk


git-svn-id: svn://10.0.0.236/trunk@76296 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 22:01:05 +00:00
kestes%staff.mail.com
e32a3a2ff9 fix typo, '.' should have been ','
git-svn-id: svn://10.0.0.236/trunk@76295 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 21:58:58 +00:00
ftang%netscape.com
012884125b fix bug 27906. Obsolete old Japanese converter to save some space. r=nhotta
git-svn-id: svn://10.0.0.236/trunk@76294 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 21:52:06 +00:00
waterson%netscape.com
17e17805d2 Bug 48086. Be sure to update XUL document's ID-to-element map when removing generated content. r=rjc
git-svn-id: svn://10.0.0.236/trunk@76293 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 21:46:04 +00:00
naving%netscape.com
ee1066bc5f Fixed bugs #42998 and #44883.
Removed "this space for rent" from subscribe dlg and add progressmeter to the
subscribe dlg. r = scottip, alecf


git-svn-id: svn://10.0.0.236/trunk@76292 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 21:43:19 +00:00
gayatrib%netscape.com
11ee4b211a Fix for bug 45806. r=putterman
git-svn-id: svn://10.0.0.236/trunk@76291 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 21:41:04 +00:00
mscott%netscape.com
781ca234f5 not part of the regular build. For those of us that have the show user agent string turned on for mail, the toolbar
wasn't being hidden properly when viewing a message that didn't have a user agent.
r=alecf


git-svn-id: svn://10.0.0.236/trunk@76289 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 21:29:41 +00:00
ducarroz%netscape.com
f2dcb34b9e Fix for bug 47506. Migrate some of the modification made to the editor formating toolbar to the message compose one. R=sfraser
git-svn-id: svn://10.0.0.236/trunk@76288 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 21:29:33 +00:00
nelsonb%netscape.com
5e8c99dc31 "clean" target will also remove primes.c from mpi.
git-svn-id: svn://10.0.0.236/trunk@76287 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 21:04:46 +00:00
hyatt%netscape.com
195caf091d Fix for 48931, r=danm,scc
git-svn-id: svn://10.0.0.236/trunk@76286 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 18:52:47 +00:00
tara%tequilarista.org
4952badec4 Landing zach's \n for #48947
git-svn-id: svn://10.0.0.236/trunk@76285 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 18:44:54 +00:00
pete%alphanumerica.com
b4a9e7c39e added two more member functions:
*       9. copy(source, dest);
*       10.leaf(path);

Fixed a bug i found in exists() member function.
Expanded tabs out of file. Tested.
not part of the build.

r=dougt

--pete


git-svn-id: svn://10.0.0.236/trunk@76283 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 17:14:29 +00:00
rods%netscape.com
ef90930d3b a better fix for when min size come into play with unconstrained sizes
b=40596 r=lmcclusk


git-svn-id: svn://10.0.0.236/trunk@76281 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 14:45:29 +00:00
rods%netscape.com
1562d3aab9 added weak reference and ref counted event listener to listbox intead of
having the the non-recounted frame add itself. It is now the same as GfxList
b=21629, r=kmcclusk


git-svn-id: svn://10.0.0.236/trunk@76280 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 14:42:12 +00:00
putterman%netscape.com
866b11f782 Fix for 41824, 40743, and 47440. r=mscott. Selecting an account clears the thread pane,
deleting the last message clears the message pane, and all columns are resizeable.


git-svn-id: svn://10.0.0.236/trunk@76279 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 14:40:33 +00:00
putterman%netscape.com
4c1b916df2 Fix for 40728. Remove struct phrases from pref ui. r=mscott.
git-svn-id: svn://10.0.0.236/trunk@76278 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 14:39:33 +00:00
rods%netscape.com
c22ad560c5 added textarea with -moz-fixed so it has the proper default font in quirks mode
b=44656 r=kmcclusk


git-svn-id: svn://10.0.0.236/trunk@76277 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 14:10:21 +00:00
rods%netscape.com
c215a20a77 css button and caption font is set to be two point sizes larger than the default GUI size.
caption font shouldn't (and now doesn't) use the actual Windows platform specific "caption" font
b=33312 r=kmcclusk


git-svn-id: svn://10.0.0.236/trunk@76276 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 13:54:50 +00:00
jfrancis%netscape.com
691e87aa2b groundwork for 44684: adding a "GetAlignment" call to the editor so that ui can reflect alignment of selection
git-svn-id: svn://10.0.0.236/trunk@76274 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 12:07:10 +00:00
ben%netscape.com
3035e50272 classic skin polish (46613)
git-svn-id: svn://10.0.0.236/trunk@76273 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 09:34:20 +00:00
bryner%uiuc.edu
fb987ae864 Bulletproofing the tree to not divide by 0 in the case of scrolling or
asking the row count of a 0-row tree.  Bug 48306.  r=syd.


git-svn-id: svn://10.0.0.236/trunk@76272 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 07:06:49 +00:00
hyatt%netscape.com
4d77bfbb21 Fixing harpoon.
git-svn-id: svn://10.0.0.236/trunk@76271 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 04:29:54 +00:00
ben%netscape.com
b09555e826 classic skin polish + remove a dump
git-svn-id: svn://10.0.0.236/trunk@76270 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 04:23:57 +00:00
ben%netscape.com
962339b029 classic skin polish, 46613
git-svn-id: svn://10.0.0.236/trunk@76269 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 04:23:06 +00:00
morse%netscape.com
6ddf84038d bug 42438, add wallet capture and prefill to context menu
git-svn-id: svn://10.0.0.236/trunk@76268 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 04:11:02 +00:00
hyatt%netscape.com
272bbaad57 Work on 48150 and XBL performance (async and arenas).
git-svn-id: svn://10.0.0.236/trunk@76267 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 04:04:18 +00:00
conrad%ingress.com
8661316900 Not part of build.
1. Removed MMozillaApp mixin class from project. This is now handled by EmbedAPI lib.
2. Added routine to show how to start up the app with a given profile.


git-svn-id: svn://10.0.0.236/trunk@76266 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 03:04:08 +00:00
conrad%ingress.com
4b0ebc514a Not part of build.
Removed MMozillaApp mixin class from project. This is now handled by EmbedAPI lib.


git-svn-id: svn://10.0.0.236/trunk@76265 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 03:03:05 +00:00
conrad%ingress.com
cc57ab067a Not part of build.
Added EmbedAPI lib to project.


git-svn-id: svn://10.0.0.236/trunk@76264 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 03:01:10 +00:00
conrad%ingress.com
d42e858cee Not part of the build!
git-svn-id: svn://10.0.0.236/trunk@76263 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 02:49:08 +00:00
jfrancis%netscape.com
0b49f3bca3 fix for 48297: ome edit operations not scroling selection into view; r=fm
git-svn-id: svn://10.0.0.236/trunk@76262 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 02:39:37 +00:00
morse%netscape.com
b327a99d4e minor wording change, part of bug 48742
git-svn-id: svn://10.0.0.236/trunk@76261 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 02:37:16 +00:00
BlakeR1234%aol.com
ab04012940 Classic skin polish (46613). Make context menus thinner. r=ben, nsbeta3+
git-svn-id: svn://10.0.0.236/trunk@76260 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 02:34:57 +00:00
morse%netscape.com
8e9b177e00 minor wording change, part of bug 48742
git-svn-id: svn://10.0.0.236/trunk@76259 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 02:16:14 +00:00
morse%netscape.com
6aa37b52b9 bug 48592, cookie viewer deleting wrong cookie, caused by incorrect change in version 1.78
git-svn-id: svn://10.0.0.236/trunk@76258 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 00:58:37 +00:00
jfrancis%netscape.com
70ab4acbc7 fixing bustage. bizarre merge error?
git-svn-id: svn://10.0.0.236/trunk@76257 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 00:53:41 +00:00
rhp%netscape.com
f12beb46c1 Fix for crash when printing emails - Bug #: 48437 - r: xxxxx
git-svn-id: svn://10.0.0.236/trunk@76256 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 00:46:45 +00:00
rhp%netscape.com
10f693c0e0 Fix for adding display name automatically on ABSync operation - Bug #: 1942 - r: xxxxx
git-svn-id: svn://10.0.0.236/trunk@76255 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-14 00:45:51 +00:00
jfrancis%netscape.com
765bda40d2 fix for 45281, cannot insert a table caption. r=fm
git-svn-id: svn://10.0.0.236/trunk@76254 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-13 23:53:34 +00:00
morse%netscape.com
7d6e4f0a70 bug 42438, add wallet functions to edit menu, r=dbragg
git-svn-id: svn://10.0.0.236/trunk@76253 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-13 23:38:08 +00:00
bienvenu%netscape.com
dd1de0eba2 fix build warnings
git-svn-id: svn://10.0.0.236/trunk@76252 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-13 23:00:42 +00:00
bienvenu%netscape.com
03b20d0970 fix bugs with partial uidl, stopping pop3 download, and deleting msgs on server r=putterman 43489 45727 33943
git-svn-id: svn://10.0.0.236/trunk@76251 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-13 22:56:40 +00:00
rhp%netscape.com
6896cab2a5 Fix for bug #17294 for vCard display on mac - r: putterman
git-svn-id: svn://10.0.0.236/trunk@76250 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-13 22:11:59 +00:00
morse%netscape.com
b3ba9ee8f5 stage 1 for bug 42438, adding wallet functions to edit menu, r=dbragg
git-svn-id: svn://10.0.0.236/trunk@76249 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-13 20:50:23 +00:00
BlakeR1234%aol.com
e775085b3e Fix bug 48829, simple two-line change to make tree columns resizable in mailnews subscribe dialog. r=me a=gemal
git-svn-id: svn://10.0.0.236/trunk@76248 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-13 17:30:15 +00:00
putterman%netscape.com
e7230f5f0d r=bienvenu. Fixes for 16998, 40401, 47946, 47948, 48098, 45272, 45403. Sort by Flag and Unread columns,
Clean up View | Messages menu. Remove folder property menu items.  Remove Newsgroup menu items and branded mail menu item.
Fixed Account tooltip. Make new button work in Select Addresses dialog.


git-svn-id: svn://10.0.0.236/trunk@76247 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-13 17:04:46 +00:00
jeff.dyer%compilercompany.com
412bcfa517 Fix bustage.
git-svn-id: svn://10.0.0.236/trunk@76246 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-13 15:07:42 +00:00
jeff.dyer%compilercompany.com
5f9b87830d Bug#34746,34853,40077: Implementation for new method for checking permission to run java.
git-svn-id: svn://10.0.0.236/trunk@76245 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-13 14:05:18 +00:00
jeff.dyer%compilercompany.com
a7f12cbf24 Bug#16438: Wire up use of new unwrap api.
git-svn-id: svn://10.0.0.236/trunk@76244 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-13 14:04:32 +00:00
jeff.dyer%compilercompany.com
795227ba5e Bug#16438: New method for unwrapping wrapped java objects for liveconnect.
git-svn-id: svn://10.0.0.236/trunk@76243 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-13 14:02:53 +00:00
jeff.dyer%compilercompany.com
0a8d03816e Bug#34746,34853,40077: New method for checking permission to run java.
git-svn-id: svn://10.0.0.236/trunk@76242 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-13 14:01:23 +00:00
ben%netscape.com
8ae3356992 i suck
git-svn-id: svn://10.0.0.236/trunk@76241 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-13 09:33:56 +00:00
ben%netscape.com
22c71b3ec1 classic skin polish, 46613
git-svn-id: svn://10.0.0.236/trunk@76240 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-13 09:13:14 +00:00
ben%netscape.com
8ee9f95ce0 classic skin polish (fix sidebarheader for mail folders) 46613
git-svn-id: svn://10.0.0.236/trunk@76239 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-13 09:10:27 +00:00
ben%netscape.com
3bf5024c38 classic skin polish, 46613
git-svn-id: svn://10.0.0.236/trunk@76238 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-13 09:06:08 +00:00
ben%netscape.com
a33e5c8953 fix dependencies
git-svn-id: svn://10.0.0.236/trunk@76237 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-13 06:15:30 +00:00
bryner%uiuc.edu
93be0b73b4 Fixing 48752 - filepicker doesn't show any files. This is fallout from
the recent changes to nsDirectoryService.  r=disttsc@bart.nl.


git-svn-id: svn://10.0.0.236/trunk@76236 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-13 06:12:00 +00:00
ben%netscape.com
54bb3d482c remove dependency on mailnews from history/navigator
git-svn-id: svn://10.0.0.236/trunk@76235 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-13 06:02:01 +00:00
ben%netscape.com
c1ad6c583d sidebar tweaks for classic skin, 46613
git-svn-id: svn://10.0.0.236/trunk@76234 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-13 04:33:19 +00:00
ben%netscape.com
8acc383e96 fix some of the problems introduced by my checkin to this file last night (radiogroup => horizontal, & provide
intial + minimum height to this tree)


git-svn-id: svn://10.0.0.236/trunk@76233 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-13 03:49:47 +00:00
ben%netscape.com
cc9cc7082a fix broken classic splitters (46613)
git-svn-id: svn://10.0.0.236/trunk@76232 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-13 03:48:11 +00:00
BlakeR1234%aol.com
8f6778192a Fix bug 47429, just add a style rule to change cursors. r=me a=german
git-svn-id: svn://10.0.0.236/trunk@76231 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-13 00:05:15 +00:00
BlakeR1234%aol.com
c93397ff17 Fix bug 47430, just add a style rule to change cursors. r=me a=germa
git-svn-id: svn://10.0.0.236/trunk@76230 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 23:54:51 +00:00
dave%intrec.com
8229bb32ee Re-fixing bug 30824 the correct way (which also fixes bug 46753)
git-svn-id: svn://10.0.0.236/trunk@76229 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 23:30:51 +00:00
alecf%netscape.com
e659c72f59 fix ben's bustage of the filter editor (more to come)
git-svn-id: svn://10.0.0.236/trunk@76228 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 22:38:10 +00:00
saari%netscape.com
d178dd6d0f undoing hackery and fixing a leak. r=dbaron
git-svn-id: svn://10.0.0.236/trunk@76227 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 22:19:55 +00:00
mkaply%us.ibm.com
037be63490 OS/2 and AIX Tinderbox break
I have no idea why we don't like having two semicolons in a row, but who the heck would put them there?


git-svn-id: svn://10.0.0.236/trunk@76226 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 20:26:33 +00:00
mozilla.BenB%bucksch.org
a395e2a1ae 28355: Synchronize with server at "Get New Mail". "Contributed" :) by bienvenu, r=BenB, a=brendan.
git-svn-id: svn://10.0.0.236/trunk@76225 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 19:56:38 +00:00
roc+%cs.cmu.edu
91d3cb9ba7 Adding call to new view API so that the view of a fixed-position frame has a Z-order/clipping parent which is not its geometric parent. Bug 39621. r,a=waterson
git-svn-id: svn://10.0.0.236/trunk@76224 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 19:44:11 +00:00
roc+%cs.cmu.edu
dafb67d22b Adding new nsIView/nsIViewManager APIs so that a view can have a different parent for Z-order/clipping purposes than its geometric parent. Bug 39621. r,a=waterson
git-svn-id: svn://10.0.0.236/trunk@76223 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 19:05:52 +00:00
blizzard%redhat.com
2d316adc3e fix for bug #48640. fix UMR in offscreen window initialization. a=brendan
git-svn-id: svn://10.0.0.236/trunk@76222 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 17:34:44 +00:00
mkaply%us.ibm.com
bfbf7b1559 OS/2 and AIX Tinderbox break
Short answer: Be consistent about NS_IF_ADDREFing const and non const of the same type in the same file.
Long answer: Send me email


git-svn-id: svn://10.0.0.236/trunk@76221 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 15:03:24 +00:00
ben%netscape.com
01dfc52a92 added file to jar.mn
git-svn-id: svn://10.0.0.236/trunk@76220 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 10:17:02 +00:00
warren%netscape.com
d9fdedd4d4 Fixed path to jar.mn in comment
git-svn-id: svn://10.0.0.236/trunk@76219 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 10:11:50 +00:00
ben%netscape.com
0b40da7144 ditto
git-svn-id: svn://10.0.0.236/trunk@76218 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 09:48:36 +00:00
ben%netscape.com
09e9e13722 fix preferences -> preferences...
git-svn-id: svn://10.0.0.236/trunk@76217 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 09:47:56 +00:00
ben%netscape.com
2711569c6f old throbber. no one liked the new one. maybe another throbber contest? (46613)
git-svn-id: svn://10.0.0.236/trunk@76216 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 09:34:32 +00:00
ben%netscape.com
03bb4f4be7 46613, classic skin polish
git-svn-id: svn://10.0.0.236/trunk@76215 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 09:27:10 +00:00
ben%netscape.com
e7439f6117 46613, classic skin polish
git-svn-id: svn://10.0.0.236/trunk@76214 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 09:12:23 +00:00
hyatt%netscape.com
5050d7bca4 Linux linux linux... will we ever teach you how comptrs work?
git-svn-id: svn://10.0.0.236/trunk@76213 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 09:00:25 +00:00
hyatt%netscape.com
ce1540a14a Linux sucks.
git-svn-id: svn://10.0.0.236/trunk@76212 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 07:58:54 +00:00
hyatt%netscape.com
5b7b5430bb Fix build bustage.
git-svn-id: svn://10.0.0.236/trunk@76211 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 07:13:52 +00:00
hyatt%netscape.com
67e86b1a57 Fix for 21890 and numerous other bugs. r=pierre, waterson, jst, attinasi, brendan
git-svn-id: svn://10.0.0.236/trunk@76210 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 06:39:24 +00:00
ben%netscape.com
a7f92a120a 46613...
git-svn-id: svn://10.0.0.236/trunk@76209 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 06:37:37 +00:00
ben%netscape.com
c5c8ddeba3 polish changes to the account manager, filter and search dialogs. r=alecf
git-svn-id: svn://10.0.0.236/trunk@76208 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 06:33:18 +00:00
hyatt%netscape.com
a729ae916b Fix for 21890 and numerous other bugs. r=pierre, waterson, jst, attinasi, brendan
git-svn-id: svn://10.0.0.236/trunk@76207 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 06:28:02 +00:00
jj%netscape.com
48bb2dfa6e #24312: moved Component Registry from [xpcom.xpi] to [browser.xpi]
git-svn-id: svn://10.0.0.236/trunk@76206 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 06:05:04 +00:00
ben%netscape.com
743e4cad79 jar.mn update
git-svn-id: svn://10.0.0.236/trunk@76205 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 06:04:33 +00:00
ben%netscape.com
d2cf978a69 46613, classic skin polish
git-svn-id: svn://10.0.0.236/trunk@76204 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 06:01:04 +00:00
rjc%netscape.com
4959563fd7 Fix buf # 44324 (error msg if overloaded FTP server) and bug # 31586 (resolution when logging into user home directory via FTP). r=gagan
git-svn-id: svn://10.0.0.236/trunk@76203 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 05:13:29 +00:00
ben%netscape.com
6649201adf classic skin stuff, 46613
git-svn-id: svn://10.0.0.236/trunk@76202 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 04:24:29 +00:00
svn%xmlterm.org
189ad8f1c3 --NOT PART OF DEFAULT BUILD--
XMLterm changes only.
Fixed overlay to XMLterm back into the tasks menu.


git-svn-id: svn://10.0.0.236/trunk@76201 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 03:51:02 +00:00
danm%netscape.com
380c312459 plug leaking nsWindow. bug 48066. code=sean@beatnik.com r=law@netscape.com, me
git-svn-id: svn://10.0.0.236/trunk@76200 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 02:35:58 +00:00
sfraser%netscape.com
4e94847de0 Fix typo, bug 48616. r=pollmann
git-svn-id: svn://10.0.0.236/trunk@76199 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 01:42:04 +00:00
BlakeR1234%aol.com
f698420a5b Fix bug 42957 - make enter/return work properly in the XPInstall dialog. r=dveditz a=dveditz
git-svn-id: svn://10.0.0.236/trunk@76197 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 01:31:32 +00:00
mcafee%netscape.com
5081846ce5 splitting forms-and-passwords pref pane into two panes, out of realestate (40888). r=slamm
git-svn-id: svn://10.0.0.236/trunk@76196 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 01:30:18 +00:00
mcafee%netscape.com
fb81e8a614 Saving space in winhooks pref panel (40888). r=slamm
git-svn-id: svn://10.0.0.236/trunk@76195 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 01:29:01 +00:00
sfraser%netscape.com
9c6d4bcbfc Final part of fix for 25161 -- use the new user-select: _moz_all that pierre just checked in.
git-svn-id: svn://10.0.0.236/trunk@76194 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 01:26:39 +00:00
edburns%acm.org
cdaf385ad3 Changes to make it build in the BAL case.
git-svn-id: svn://10.0.0.236/trunk@76193 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 01:22:18 +00:00
cyeh%bluemartini.com
70d7d094e9 fix for bug #44691, patch submitted by jmrobins@tgix.com (Joe Robins)
git-svn-id: svn://10.0.0.236/trunk@76192 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 01:14:25 +00:00
edburns%acm.org
7e99186539 Make it so BAL_INTERFACE=1 compiles on solaris.
git-svn-id: svn://10.0.0.236/trunk@76191 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 01:08:37 +00:00
putterman%netscape.com
fcea01ecdb Fix for 48314. Unable to toggle between flag and unflagged in threadpane. r=alecf
git-svn-id: svn://10.0.0.236/trunk@76190 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 01:08:09 +00:00
edburns%acm.org
89d95f4ec6 Make it so BAL_INTERFACE=1 compiles on Solaris.
git-svn-id: svn://10.0.0.236/trunk@76189 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 01:08:04 +00:00
putterman%netscape.com
abbd64706f Fix for 46342. Remove remember last selected message from preferences. r=alecf.
git-svn-id: svn://10.0.0.236/trunk@76188 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 01:06:16 +00:00
pierre%netscape.com
83df3e3c44 48096: Need a -moz-all value for user-select. r=sfraser.
git-svn-id: svn://10.0.0.236/trunk@76187 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 01:00:14 +00:00
sfraser%netscape.com
0c4e6f39c9 Toolbar cleanup 47506 -- less obnoxious toggled color. r=cmanske
git-svn-id: svn://10.0.0.236/trunk@76186 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 00:58:45 +00:00
sfraser%netscape.com
e4b56f3564 Fixes for 37815 -- editor toolbar cleanup. r=cmanske
git-svn-id: svn://10.0.0.236/trunk@76184 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 00:47:05 +00:00
sfraser%netscape.com
f11ecfb1ad Work for 37815 -- better dropdown CSS and images. r=cmanske.
git-svn-id: svn://10.0.0.236/trunk@76183 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 00:45:23 +00:00
beard%netscape.com
82866616d8 Fixing bustage.
git-svn-id: svn://10.0.0.236/trunk@76182 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 00:45:09 +00:00
saari%netscape.com
3b61368cb8 Fix more leaks bug 48126 again. r=hyatt
git-svn-id: svn://10.0.0.236/trunk@76180 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 00:38:22 +00:00
ducarroz%netscape.com
9eb73796ed Fix for bug 47855. Implement Save as File and fix command Save to remember which default action to performe (save as file, save as draft or save as template). R=ducarroz
git-svn-id: svn://10.0.0.236/trunk@76177 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 00:29:43 +00:00
sfraser%netscape.com
b2984ba0ab Part of fix for 47855 -- don't show title prompt when saving from mail or plaintext. r=ducarroz
git-svn-id: svn://10.0.0.236/trunk@76175 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 00:16:10 +00:00
sfraser%netscape.com
b34448f00f CSS for editor toolbar buttons for bug 38792. r=cmanske, ben.
git-svn-id: svn://10.0.0.236/trunk@76173 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 00:02:56 +00:00
sfraser%netscape.com
b25e165fa5 Fix for bugs 38792, 47506 -- tidyup of editor toolbar. r=cmanske
git-svn-id: svn://10.0.0.236/trunk@76172 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-12 00:02:32 +00:00
mccabe%netscape.com
9657613bc1 Fix to 39438.
Add a TokenStream entry to the regexp parser state so that regexps compiled at script-compilation time can report filename and line number on error.


git-svn-id: svn://10.0.0.236/trunk@76171 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 23:55:07 +00:00
jband%netscape.com
8e8146c9c7 Pass the buffer length in bytes to nsCRT::memcmp. a=warren
git-svn-id: svn://10.0.0.236/trunk@76170 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 23:46:09 +00:00
cmanske%netscape.com
5bdca17f9e Fixing editor ui bugs 47697, image dialog button problem (part of 47651). r=sfraser
git-svn-id: svn://10.0.0.236/trunk@76169 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 23:43:12 +00:00
morse%netscape.com
3c119236b1 bug 48267, remove a textfield from wallet's pref panel, r=danm
git-svn-id: svn://10.0.0.236/trunk@76165 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 22:38:55 +00:00
cmanske%netscape.com
3351e53730 Fixed spacing around text in titledboxes for Modern skin. b=46423, 42331. r=beppe
git-svn-id: svn://10.0.0.236/trunk@76164 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 22:27:09 +00:00
jst%netscape.com
c69109493c Backing out changes that should've been checked onto a branch. Sorry about that.
git-svn-id: svn://10.0.0.236/trunk@76159 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 22:10:35 +00:00
law%netscape.com
eb9cb69f88 Bug 21137; make Shift-Reload force reload from server; r=radha@netscape.com
git-svn-id: svn://10.0.0.236/trunk@76158 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 22:08:13 +00:00
edburns%acm.org
1968a5ae56 bug=47357
a=edburns
r=edburns
author=avm

This fix adds a length parameter to the loading of URLs.  It also adds a new util function util_getStringLength().


git-svn-id: svn://10.0.0.236/trunk@76157 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 21:58:56 +00:00
mcafee%netscape.com
4113e0d3f3 Thin separators to save space (40888)
git-svn-id: svn://10.0.0.236/trunk@76155 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 21:54:18 +00:00
morse%netscape.com
ad18cdd128 bug 46989, cookies don't work if components.reg is missing, r=dougt
git-svn-id: svn://10.0.0.236/trunk@76153 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 21:51:52 +00:00
pchen%netscape.com
034f671d83 bug 22342, r=danm, back out ben's hack to try to load URL in current window if empty otherwise load in a new window, now always load using openTopWin()
git-svn-id: svn://10.0.0.236/trunk@76152 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 21:49:53 +00:00
javi%netscape.com
88199bbfc6 Fix for bug #44652
git-svn-id: svn://10.0.0.236/trunk@76151 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 21:43:57 +00:00
jst%netscape.com
82c4f10195 DOM API string changes...
git-svn-id: svn://10.0.0.236/trunk@76150 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 21:41:59 +00:00
edburns%acm.org
e962e3882f Update makefile to pull JNI includes from src_share.
git-svn-id: svn://10.0.0.236/trunk@76148 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 21:35:29 +00:00
ruslan%netscape.com
2d3c31f3be Fix 47408, a=gagan,r=neeti
git-svn-id: svn://10.0.0.236/trunk@76147 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 21:31:13 +00:00
valeski%netscape.com
6392db4d27 fixing bustage
git-svn-id: svn://10.0.0.236/trunk@76146 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 21:12:27 +00:00
varada%netscape.com
e15fac2346 fix for bug #46323;unable to launch alternate 3panewindow from addressbook; r= ducarroz
git-svn-id: svn://10.0.0.236/trunk@76145 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 21:04:43 +00:00
scc%mozilla.org
5266231e55 not part of the build; adding multi-fragment strings to the test suite
git-svn-id: svn://10.0.0.236/trunk@76144 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 20:54:25 +00:00
varada%netscape.com
cace056fe0 fix for bug#40368; removing Stop button from msg compose window; r=ducarroz
git-svn-id: svn://10.0.0.236/trunk@76143 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 20:52:39 +00:00
law%netscape.com
4d86094da6 Bug 17524; add 'Bookmark this Link' context menu choice; r=slamm@netscape.com
git-svn-id: svn://10.0.0.236/trunk@76140 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 20:44:06 +00:00
conrad%ingress.com
a2cf6be101 Changed from using strings for nsIDirectoryService props to using macro names defined in nsDirectoryServiceDefs.h
r=valeski


git-svn-id: svn://10.0.0.236/trunk@76139 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 20:31:57 +00:00
mccabe%netscape.com
d9ba450d3d Spelling fix.
git-svn-id: svn://10.0.0.236/trunk@76138 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 20:31:17 +00:00
roc+%cs.cmu.edu
c2df6ad973 Testcase for bug 25707.
git-svn-id: svn://10.0.0.236/trunk@76137 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 20:28:49 +00:00
conrad%ingress.com
dfbe032f38 Added appfilelocprovider usage
r=valeski


git-svn-id: svn://10.0.0.236/trunk@76136 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 20:28:32 +00:00
mcafee%netscape.com
50b23735dd Saving space in pref pane (40888). r=slamm
git-svn-id: svn://10.0.0.236/trunk@76135 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 20:26:30 +00:00
conrad%ingress.com
48e7ec20b8 1. Changed from using strings to using macro names for property keys
2. Fixed return val of RegisterProvider
r=valeski


git-svn-id: svn://10.0.0.236/trunk@76134 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 20:25:18 +00:00
conrad%ingress.com
2a7d6c6682 Added an impl of nsIDirectoryServiceProvider to nsProfile.
r=alecf


git-svn-id: svn://10.0.0.236/trunk@76133 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 20:23:14 +00:00
conrad%ingress.com
2f2ea9dd4e Added the building of appfilelocationprovider lib.
r=sfraser


git-svn-id: svn://10.0.0.236/trunk@76132 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 20:21:09 +00:00
conrad%ingress.com
f111d7d465 Added appfilelocationprovider lib
git-svn-id: svn://10.0.0.236/trunk@76131 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 20:18:43 +00:00
conrad%ingress.com
a38d3b0a77 Added appfilelocationprovider lib
r=valeski


git-svn-id: svn://10.0.0.236/trunk@76130 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 20:17:55 +00:00
conrad%ingress.com
fa1b9b93d7 Changed call of NS_InitEmbedding.
r=adamlock


git-svn-id: svn://10.0.0.236/trunk@76129 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 20:14:31 +00:00
conrad%ingress.com
1ebdcd7cba Changed params to NS_InitEmbedding.
git-svn-id: svn://10.0.0.236/trunk@76128 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 20:14:02 +00:00
conrad%ingress.com
03c7af5044 Changed call of NS_InitEmbedding.
git-svn-id: svn://10.0.0.236/trunk@76127 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 20:13:41 +00:00
nhotta%netscape.com
80721dda88 Disabled caching for encoders since they hold states, bug 48284, r=cata,ftang.
git-svn-id: svn://10.0.0.236/trunk@76126 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 20:13:31 +00:00
pchen%netscape.com
19cc303013 bug 46137, r=putterman, add id="printMenuItem" to print menu item so that Print Plus overlay gets added right after it
git-svn-id: svn://10.0.0.236/trunk@76125 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 20:11:25 +00:00
matt%netscape.com
4371f8a557 fix for bug 30375 rev. matt patch taken
git-svn-id: svn://10.0.0.236/trunk@76124 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 20:10:50 +00:00
conrad%ingress.com
409fc82b6b 1. Removed NS_Init which took a path.
2. Added appfilelocation provider param.
r=dougt


git-svn-id: svn://10.0.0.236/trunk@76123 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 20:10:06 +00:00
conrad%ingress.com
a46cb958bf 1. Uses appfilelocationprovider. Can pass one in or pass nsnull and default is made.
2. Removed version of NS_InitEmbedding which took char* path.
r=dougt


git-svn-id: svn://10.0.0.236/trunk@76122 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 20:09:05 +00:00
roc+%cs.cmu.edu
4c56115614 When computing the max-element-size, base percentage margins on the size of the contained max-element-size, not on the container's desired size. Bug 25707. r,a=waterson
git-svn-id: svn://10.0.0.236/trunk@76121 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 20:08:15 +00:00
leaf%mozilla.org
89132c59f4 adding mozilla/modules/appfilelocprovider to SeaMonkeyCore --leaf
git-svn-id: svn://10.0.0.236/trunk@76120 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 19:58:25 +00:00
anthonyd%netscape.com
7d90e93839 fix for bug#48472
apparently nsIContent::ChildAt can be successful
and not return a child. now checking fo that.
r: smfr
a: beppe


git-svn-id: svn://10.0.0.236/trunk@76116 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 19:55:39 +00:00
wtc%netscape.com
7006b5f542 Bugzilla bug #39731: the imported pipe needs to have its
secret->md.sync_file_io set to PR_TRUE on NT because unnamed pipes
don't support async io.


git-svn-id: svn://10.0.0.236/trunk@76114 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 18:36:38 +00:00
thayes%netscape.com
c0a3673fd8 Add Pragma: no-cache to PSM UI pages. This prevents caching by the client
and avoids bugs due to missing UI Events, and display of stale content.


git-svn-id: svn://10.0.0.236/trunk@76113 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 17:32:25 +00:00
bienvenu%netscape.com
fc352ff208 work for 22960 speed up msg display performance by speeding up history ab i18n function use r=putterman
git-svn-id: svn://10.0.0.236/trunk@76108 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 13:58:17 +00:00
warren%netscape.com
fafff3b825 Jar manifest updates.
git-svn-id: svn://10.0.0.236/trunk@76107 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 09:05:40 +00:00
morse%netscape.com
f0798011ba bug 48539, needed defensive code to prevent infinite loop on corrupted data
git-svn-id: svn://10.0.0.236/trunk@76106 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 07:12:07 +00:00
BlakeR1234%aol.com
3d414e29c8 Fix bug 48414 - enable tree column resizing in the password manager. r=syd a=morse
git-svn-id: svn://10.0.0.236/trunk@76105 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 06:52:06 +00:00
BlakeR1234%aol.com
6fca72c24b Fix bug 48414 - enable tree column resizing in the cookie and image managers. r=syd a=morse
git-svn-id: svn://10.0.0.236/trunk@76104 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 06:50:32 +00:00
saari%netscape.com
36b1afb126 nsbeta3+ bug 28508, select all is flakey from the context menu. Make sure popups don't steal focus. r=hyatt
git-svn-id: svn://10.0.0.236/trunk@76103 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 06:31:09 +00:00
waldemar%netscape.com
c3f9a7aef7 Updated to generate Netscape 6-compatible HTML
git-svn-id: svn://10.0.0.236/trunk@76102 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 06:27:55 +00:00
waldemar%netscape.com
412bbaa229 Added attributes to for-initializers and no-line-breaks in a few places
git-svn-id: svn://10.0.0.236/trunk@76101 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 06:27:25 +00:00
waldemar%netscape.com
2a6f7a997f Updated to match documentation site
git-svn-id: svn://10.0.0.236/trunk@76100 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 06:24:57 +00:00
waldemar%netscape.com
130d41b297 Updated to match styles.css on documentation site
git-svn-id: svn://10.0.0.236/trunk@76099 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 06:24:39 +00:00
mcafee%netscape.com
6466c19e72 Editor pref files changed locations, but internal chrome: URLs did not and pref panes were blank. Fixing chrome: URLs. r=syd
git-svn-id: svn://10.0.0.236/trunk@76098 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 06:17:45 +00:00
putterman%netscape.com
d422473358 Fix for 45072. Make address book columns resizeable. r=mscott.
git-svn-id: svn://10.0.0.236/trunk@76097 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 06:00:51 +00:00
mcafee%netscape.com
39724aac3f Saving space in prefs (40888). r=syd
git-svn-id: svn://10.0.0.236/trunk@76095 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 05:30:49 +00:00
warren%netscape.com
88b71c97d5 Fixed to clean up files and directories properly. Fixed mod times of copied files so they don't get re-jarred.
git-svn-id: svn://10.0.0.236/trunk@76094 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 05:16:15 +00:00
nelsonb%netscape.com
e07feb7d25 Add commented-out lines to build on other platforms.
Clean target now removes libmpi.a also.


git-svn-id: svn://10.0.0.236/trunk@76093 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 05:01:59 +00:00
cmanske%netscape.com
aa6f5ab8c7 Restrict nsEditorShellMouseListener to HTML editor; fix to optimize GetSelectedNode for named anchors, b=47687, r=sfraser
git-svn-id: svn://10.0.0.236/trunk@76092 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 04:59:37 +00:00
alecf%netscape.com
655d4029e9 speedup for 26456 - use autostring instead of PR_smprintf
r=putterman


git-svn-id: svn://10.0.0.236/trunk@76091 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 04:32:08 +00:00
mstoltz%netscape.com
bf3ffda0ef bug 47670. r=jtaylor
git-svn-id: svn://10.0.0.236/trunk@76090 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 04:31:08 +00:00
alecf%netscape.com
76cac84419 local mail speedup for #26456 r=putterman
use autostrings not PR_smprintf


git-svn-id: svn://10.0.0.236/trunk@76089 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 04:28:49 +00:00
alecf%netscape.com
f9cf749d55 speedup for #26456 - use autostring instead of PR_smprintf r=putterman
git-svn-id: svn://10.0.0.236/trunk@76088 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 04:27:37 +00:00
danm%netscape.com
bc5dce6605 Request scrollbars in new window opened in toOpenWindowByType. Necessary now that scrollbars=no is supported.
git-svn-id: svn://10.0.0.236/trunk@76087 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 04:00:29 +00:00
danm%netscape.com
c007797bdf sync with nsWebShellWindow.h rev 1.109
git-svn-id: svn://10.0.0.236/trunk@76086 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 03:44:49 +00:00
danm%netscape.com
b399772bf1 adding ability to open a browser without scrollbars (window.open(...scrollbars=no)) bug 28193
git-svn-id: svn://10.0.0.236/trunk@76085 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 03:43:44 +00:00
cmanske%netscape.com
28dc46ae74 More editor UI bug fixes: 47653, 47688, 47693, 47687. r=sfraser
git-svn-id: svn://10.0.0.236/trunk@76083 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 03:20:47 +00:00
jtaylor%netscape.com
0a53eb51a1 Fixes bug #45877. r=mstoltz.
git-svn-id: svn://10.0.0.236/trunk@76081 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 03:11:24 +00:00
cmanske%netscape.com
21c98fdd2d Added more space above text for toolbar buttons. Part of 46423. r=hangas
git-svn-id: svn://10.0.0.236/trunk@76078 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 03:08:38 +00:00
wtc%netscape.com
56520691f3 Use real sockets in the poll desc array as opposed to NULL. Some
platforms seem to have problem polling on an array of -1's.


git-svn-id: svn://10.0.0.236/trunk@76077 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 03:00:45 +00:00
mccabe%netscape.com
9f72f530f8 Back in backed-out fix.
git-svn-id: svn://10.0.0.236/trunk@76076 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 02:58:30 +00:00
jtaylor%netscape.com
97722abc48 Fixes bug #41571. r=mstoltz.
git-svn-id: svn://10.0.0.236/trunk@76075 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 02:46:47 +00:00
saari%netscape.com
d94289754b Fix for leaks. Bug 48126 r=dbaron, hyatt
git-svn-id: svn://10.0.0.236/trunk@76074 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 02:11:53 +00:00
nelsonb%netscape.com
adc94749ec Change mp_add and mp_sub to not allocate a temporary variable unless it's
really necessary.


git-svn-id: svn://10.0.0.236/trunk@76073 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 01:58:20 +00:00
anthonyd%netscape.com
76985c2924 fix for bug# 48472 (dogfood bug)
r: mjudge
a: beppe


git-svn-id: svn://10.0.0.236/trunk@76072 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 01:36:28 +00:00
despotdaemon%netscape.com
92120402dc Pseudo-automatic update of changes made by rcassin@supernova.org.
git-svn-id: svn://10.0.0.236/trunk@76071 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 01:35:41 +00:00
wtc%netscape.com
9575d94c34 Updated for 4.1 release.
git-svn-id: svn://10.0.0.236/trunk@76070 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 01:34:31 +00:00
putterman%netscape.com
c03194eab2 Fix for bugs 46973. Select all now selects all messages in threaded mode. Fix for 20375. Expand/Collapse All in threaded mode.
r=alecf.


git-svn-id: svn://10.0.0.236/trunk@76069 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 01:14:59 +00:00
wtc%netscape.com
b716fed993 Moved prgcleak.c from mozilla/nsprpub/pr/src/md/mac/prgcleak.c.
git-svn-id: svn://10.0.0.236/trunk@76066 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 01:02:37 +00:00
wtc%netscape.com
6efa917951 Bugzilla bug #30746: backed out the PR_SetConcurrency(2) workaround
because it introduced other problems.


git-svn-id: svn://10.0.0.236/trunk@76065 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 00:57:50 +00:00
scc%mozilla.org
2d8a21877e Bug #47244. patch from sean@beatnik.com; thanks sean! r=scc, a=waterson
git-svn-id: svn://10.0.0.236/trunk@76064 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 00:55:59 +00:00
warren%netscape.com
03c2e00d03 Fixed bustage for chrome:: rule
git-svn-id: svn://10.0.0.236/trunk@76063 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 00:47:03 +00:00
scc%mozilla.org
12978905ce bug #48464. explicitly picking my own or the auto-generated function, in particular |operator=|. r={vidur, waterson}, a=vidur
git-svn-id: svn://10.0.0.236/trunk@76062 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 00:42:41 +00:00
pinkerton%netscape.com
84a5d0af08 another great patch from dean, with a honker of a comment explaining what is going on from me. we need to check more than one level down to see if we should move the selected item back to |mTimerMenu| when the selection timer fires. fixes bug 29400. yay!!!! r=hyatt.
git-svn-id: svn://10.0.0.236/trunk@76061 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 00:37:59 +00:00
kestes%staff.mail.com
8a0029f728 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@76060 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 00:35:25 +00:00
law%netscape.com
c4e4c6b6af Bug 17524; add 'Bookmark this Link' context menu choice; r=slamm@netscape.com
git-svn-id: svn://10.0.0.236/trunk@76059 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 00:31:52 +00:00
jelwell%netscape.com
12242a3aae Fixing bugscape bug 830, Address Book was calling CallSaveListeners before the abURI was created. r=alecf
git-svn-id: svn://10.0.0.236/trunk@76058 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 00:29:14 +00:00
kestes%staff.mail.com
030babe66c *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@76057 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 00:27:27 +00:00
despotdaemon%netscape.com
25de771aa3 Pseudo-automatic update of changes made by shannond@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@76056 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 00:26:50 +00:00
leaf%mozilla.org
0c9f2d461f Automated update
git-svn-id: svn://10.0.0.236/trunk@76055 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 00:15:09 +00:00
warren%netscape.com
cce592f105 Getting gc leak-detector to work on linux. Non-nspr changes. code=beard,wade r=warren
git-svn-id: svn://10.0.0.236/trunk@76054 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 00:13:39 +00:00
alecf%netscape.com
a420cb67b7 fix for 44714 - remove ignore/watch thread (easy fix, no review)
git-svn-id: svn://10.0.0.236/trunk@76053 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 00:10:18 +00:00
hyatt%netscape.com
f43472dc93 Fix for 47081. r=ben
git-svn-id: svn://10.0.0.236/trunk@76052 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 00:05:49 +00:00
cmanske%netscape.com
63f196955b Attempt to fix plain text messenger composer bug 48474, r=sfraser
git-svn-id: svn://10.0.0.236/trunk@76051 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-11 00:02:43 +00:00
despotdaemon%netscape.com
1b54a8b219 Pseudo-automatic update of changes made by tao@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@76050 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 23:55:08 +00:00
warren%netscape.com
f55b1908f9 Preparing for jar packaging. Added warning.
git-svn-id: svn://10.0.0.236/trunk@76049 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 23:52:29 +00:00
sgehani%netscape.com
003ac640b8 For Unix, create component.reg in cwd, not the specified program dir.
[nsbeta3+ b=47721; r=dveditz]


git-svn-id: svn://10.0.0.236/trunk@76048 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 23:50:32 +00:00
despotdaemon%netscape.com
81705af534 Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@76047 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 23:46:46 +00:00
despotdaemon%netscape.com
bb29fcebb0 Pseudo-automatic update of changes made by jelwell@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@76046 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 23:41:53 +00:00
mccabe%netscape.com
19434bb257 Backout until I can figure out why mac doesn't like strlen here, even though it seems OK elsewhere.
git-svn-id: svn://10.0.0.236/trunk@76045 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 23:32:03 +00:00
mcafee%netscape.com
ba775a0587 Splitting cookies/images pref pane into two separate panes (40888). r=ben
git-svn-id: svn://10.0.0.236/trunk@76044 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 23:27:21 +00:00
warren%netscape.com
6940a6f6a6 Fixed formatting of output so that things line up again.
git-svn-id: svn://10.0.0.236/trunk@76043 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 23:20:07 +00:00
pchen%netscape.com
ee724d936a bug 42854, r = ben, checking patch from gemal@gemal.dk to change download progress dialog to not have OK button
git-svn-id: svn://10.0.0.236/trunk@76042 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 23:13:33 +00:00
alecf%netscape.com
d3002525ff fix for #35803 - call the onload handler so that the page is re-initialized too
r=putterman


git-svn-id: svn://10.0.0.236/trunk@76038 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 23:09:26 +00:00
mcafee%netscape.com
921f818977 Removing wallet from makefiles, fixes solaris bustage. r=Daa
git-svn-id: svn://10.0.0.236/trunk@76037 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 23:04:33 +00:00
attinasi%netscape.com
e7b5464ded Text with 'whitespace:nowrap' no longer uses special Win32-only text measurement code becasue it didn't work. b=42832 r=waterson
git-svn-id: svn://10.0.0.236/trunk@76036 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 23:03:11 +00:00
mccabe%netscape.com
e147d2735e Fix to 46566.
Always copy the current line string out of the token buffer when generating an error report, rather than just passing the token buffer itself.  The token buffer wasn't necessarily a well-terminated string, so displaying the contents of the string in the error report produced unexpected results.

The unicode string in the error report is owned by a JSString; this string is rooted for the (stack-based) lifetime of the error report.

Fix courtesy jband.

r=mccabe
a=beard


git-svn-id: svn://10.0.0.236/trunk@76035 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 23:02:39 +00:00
mccabe%netscape.com
fa87396bba Fix to 34425 -
Always create an error report, even when there is no current stack frame and it might be empty.  This fixes an API regression; we used to allow JS_ReportError to be called from the API when no JavaScript was running.

r=rogerl
a=beard


git-svn-id: svn://10.0.0.236/trunk@76034 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 22:57:40 +00:00
mscott%netscape.com
500fe3c2d7 Bug #44161, 44160 --> get the correct prompt object for the current window instead
of using the one attached to the hidden window. We used to get it from the compose
docshell but when you send the message, that window is actually gone. We should
parent the alerts off of an underlying mail window...
r=ducarroz


git-svn-id: svn://10.0.0.236/trunk@76033 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 22:56:29 +00:00
mccabe%netscape.com
2d6aa46deb Fix to 47409 -
Don't use timezone comment in javascript Date object toString string if it looks like it might not be ASCII.

a,r=beard


git-svn-id: svn://10.0.0.236/trunk@76032 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 22:54:45 +00:00
mscott%netscape.com
01970ef5f8 Bug #44161 --> remove reference to m_docshell which we don't need now.
r=ducarroz


git-svn-id: svn://10.0.0.236/trunk@76031 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 22:54:37 +00:00
ruslan%netscape.com
fc6cf6f5c0 Fix 46496, r/a=gagan
git-svn-id: svn://10.0.0.236/trunk@76030 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 22:38:56 +00:00
ducarroz%netscape.com
d26c7cb6c3 Fix for bug 27170. Remove option UUencode for attachment. R=mscott
git-svn-id: svn://10.0.0.236/trunk@76029 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 22:29:44 +00:00
ducarroz%netscape.com
f0b066fa51 Fix for bug 47361. Don't access direclty the buffer of a nsAutoCString, it might not be in sync with the content of the string itself. R=bienvenu,mscott
git-svn-id: svn://10.0.0.236/trunk@76028 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 22:27:09 +00:00
gagan%netscape.com
793935f471 Fix for bugscape 1800. Offline mode would have sit in recursion. This was already fixed for the M17 branch just doing the same for the tip.
git-svn-id: svn://10.0.0.236/trunk@76027 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 22:11:13 +00:00
despotdaemon%netscape.com
b48c7f59b4 Pseudo-automatic update of changes made by kestes@staff.mail.com.
git-svn-id: svn://10.0.0.236/trunk@76026 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 22:10:34 +00:00
heikki%netscape.com
dd53ea068d Trivial, bug 41772, we were not setting the return value in all cases for HandleEventInternal. r=jst.
git-svn-id: svn://10.0.0.236/trunk@76025 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 22:07:33 +00:00
alecf%netscape.com
d733d093e5 fix for #43484 - sort the account manager and folder pane according to spec
r=putterman


git-svn-id: svn://10.0.0.236/trunk@76024 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 22:02:52 +00:00
despotdaemon%netscape.com
7d3efcc20e Pseudo-automatic update of changes made by mitesh@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@76022 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 21:52:39 +00:00
nelsonb%netscape.com
d6d04f83c1 Replace s_mp_ispow2d with faster version. Change s_mp_mul_d to detect
multiplication by 0, 1, and powers of 2, and handle them without actual
multiplication.


git-svn-id: svn://10.0.0.236/trunk@76020 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 21:43:16 +00:00
edburns%acm.org
1f01dae006 a=edburns
r=ashuk
bug=47357
M classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java
M src_moz/CBrowserContainer.cpp
M src_moz/NativeEventThread.cpp
M src_moz/ns_util.cpp
M src_moz/ns_util.h
M src_share/jni_util.cpp
M src_share/jni_util.h

tar -cvf 47357.2.tar classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java src_moz/CBrowserContainer.cpp src_moz/NativeEventThread.cpp src_moz/ns_util.cpp src_moz/ns_util.h src_share/jni_util.cpp src_share/jni_util.h

cvs diff -u classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java src_moz/CBrowserContainer.cpp src_moz/NativeEventThread.cpp src_moz/ns_util.cpp src_moz/ns_util.h src_share/jni_util.cpp src_share/jni_util.h

This change modifes what one has to do on the native side to add a
listener.

 * How to create a new listener type on the native side: <P>

 * 1. add an entry in the gSupportedListenerInterfaces array defined in
 * ns_util.cpp <P>

 * 2. add a corresponding entry in the LISTENER_CLASSES enum in
 * ns_util.h <P>

 * 3. add a jstring to the string constant list in
 * CBrowserContainer.cpp, below.

 * 4. Initialize this jstring constant in CBrowserContainer.cpp
 * initStringConstants() <P>

 * 5. add an entry to the switch statement in NativeEventThread.cpp
 * native{add,remove}Listener <P>

You have to clobber_all in webclient after this change.


git-svn-id: svn://10.0.0.236/trunk@76019 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 21:38:52 +00:00
wtc%netscape.com
3064c5d83d Added comments to explain the format of the PR_VERSION string.
Set version number to 4.1 Beta.


git-svn-id: svn://10.0.0.236/trunk@76018 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 21:19:17 +00:00
sgehani%netscape.com
f3dce67713 Make license box non-editable.
[nsbeta3+ bugscape b=1939; r=syd]


git-svn-id: svn://10.0.0.236/trunk@76017 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 20:19:20 +00:00
heikki%netscape.com
5ff983885a Fixed bug 41772, if XLink target was XML file it never opened it in new window. r=jst.
git-svn-id: svn://10.0.0.236/trunk@76016 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 20:18:49 +00:00
mkaply%us.ibm.com
7a9808d5bf Accidentally checked in branch file on trunk
git-svn-id: svn://10.0.0.236/trunk@76015 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 20:18:25 +00:00
rayw%netscape.com
b02b43d396 Changed case of nsIFactory.idl methods to start with lower case to be like other
interfaces.  Since the C++ generated code upper-cases the method names, this
affects no C++ code, but only a few javascript methods.

Bug 46771.

r=waterson.

I am in today and tomorrow.


git-svn-id: svn://10.0.0.236/trunk@76014 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 20:12:08 +00:00
dbaron%fas.harvard.edu
5c4eea6dd3 Fix huge leak warren introduced last night. Changing the hash keys to have owning pointers caused circular ownership. r=waterson b=48373 (nsbeta3+)
git-svn-id: svn://10.0.0.236/trunk@76013 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 20:08:30 +00:00
ducarroz%netscape.com
65d7e22843 Fix for bug 43441 & bug 32598. Fix various problems with message compose prefs panel. R=varada
git-svn-id: svn://10.0.0.236/trunk@76012 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 20:03:54 +00:00
mkaply%us.ibm.com
0388cc5888 Initial branch Bidi checkin
git-svn-id: svn://10.0.0.236/trunk@76011 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 20:01:52 +00:00
ducarroz%netscape.com
89d7e91181 Fix for bug 32598. Re-arrange the frame to be sure it fit (UI change approuved by jglick). R=varada
git-svn-id: svn://10.0.0.236/trunk@76010 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 19:56:56 +00:00
jgaunt%netscape.com
d0c9dbc365 a=blizzard@redhat.com r=jgaunt@netscape.com
fixing hp bustage


git-svn-id: svn://10.0.0.236/trunk@76009 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 19:55:25 +00:00
sgehani%netscape.com
9f8f3d16fc Merge M17 branch fix for nsbeta2+ bugscape bug 1895: get rid of error 340 in
Mac installer during XPCOM autoreg by delaying so fragment registry has time
to update newly extracted shlbs.

[branch fix r=dveditz; a=pdt]


git-svn-id: svn://10.0.0.236/trunk@76005 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 19:05:19 +00:00
despotdaemon%netscape.com
8f76cd0e1a Pseudo-automatic update of changes made by briane@qnx.com.
git-svn-id: svn://10.0.0.236/trunk@76002 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 18:35:41 +00:00
despotdaemon%netscape.com
50be60b3f8 Pseudo-automatic update of changes made by dinglis@qnx.com.
git-svn-id: svn://10.0.0.236/trunk@75997 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 13:51:35 +00:00
mcafee%netscape.com
a8f84a1b6f More double-space lossage, whitespace change only.
git-svn-id: svn://10.0.0.236/trunk@75996 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 08:16:40 +00:00
valeski%netscape.com
6bc3545fcb fixing build bustage
git-svn-id: svn://10.0.0.236/trunk@75995 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 07:59:50 +00:00
cmanske%netscape.com
78c3f83d86 Simplified background image UI in Colors and Background dialog, b=47693, r=sfraser
git-svn-id: svn://10.0.0.236/trunk@75994 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 07:31:52 +00:00
warren%netscape.com
b86de5d4dc Fixed nsStringKey -> nsCStringKey problem
git-svn-id: svn://10.0.0.236/trunk@75993 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 07:28:01 +00:00
mcafee%netscape.com
6a25660d7f Ignore gnerated files.
git-svn-id: svn://10.0.0.236/trunk@75992 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 07:25:12 +00:00
mcafee%netscape.com
80bdc83a00 Ignore generated files.
git-svn-id: svn://10.0.0.236/trunk@75991 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 07:24:02 +00:00
warren%netscape.com
2950542cad Fixed nsStringKey problems due to hashtable changes.
git-svn-id: svn://10.0.0.236/trunk@75990 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 07:10:42 +00:00
cmanske%netscape.com
189a5f3e9f Fixed layout in Colors and Background dialog, b=47693, r=sfraser
git-svn-id: svn://10.0.0.236/trunk@75989 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 07:08:07 +00:00
mcafee%netscape.com
73706e3a54 Backing out reorder, to match valeski's backout
git-svn-id: svn://10.0.0.236/trunk@75988 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 07:07:13 +00:00
valeski%netscape.com
903a9804f4 backing out
git-svn-id: svn://10.0.0.236/trunk@75987 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 07:06:21 +00:00
warren%netscape.com
ee959ee62f Fixed warnings.
git-svn-id: svn://10.0.0.236/trunk@75986 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 07:05:13 +00:00
valeski%netscape.com
057df7f19b re-ordering so clobber builds are ok
git-svn-id: svn://10.0.0.236/trunk@75985 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 07:01:40 +00:00
alecf%netscape.com
57ac3904d4 fix for #39016 r=mscott
make more strings localization friendly, and use formatStringFromName where appropriate


git-svn-id: svn://10.0.0.236/trunk@75984 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 07:00:16 +00:00
cmanske%netscape.com
86437dac18 Fixed tooltip in Colors and Background dialog, b=47693, r=sfraser
git-svn-id: svn://10.0.0.236/trunk@75983 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 06:54:03 +00:00
valeski%netscape.com
e270f6cf85 backing out
git-svn-id: svn://10.0.0.236/trunk@75982 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 06:51:30 +00:00
valeski%netscape.com
3ae56dd890 backing out
git-svn-id: svn://10.0.0.236/trunk@75981 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 06:46:00 +00:00
cmanske%netscape.com
f46c8c5393 Tweaked Insert Table dialog, b=47688, r=sfraser
git-svn-id: svn://10.0.0.236/trunk@75980 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 06:44:59 +00:00
mcafee%netscape.com
df6a56ce21 Moving embedding directory to follow xpfe, dependency on xpfelocation_s.a was introduced by embedding tonight. Component ? or better solution? Fixes linux bustage. a=syd
git-svn-id: svn://10.0.0.236/trunk@75979 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 06:43:05 +00:00
scc%mozilla.org
e98f6c2c7c fixes needed to get multi-fragment strings working; r|a=waterson
git-svn-id: svn://10.0.0.236/trunk@75978 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 06:36:54 +00:00
warren%netscape.com
fac6eb1451 Fixed nscom.h -> nsCom.h
git-svn-id: svn://10.0.0.236/trunk@75977 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 06:35:34 +00:00
morse%netscape.com
0b19dc7209 fix bug 48241, crash when visiting url
git-svn-id: svn://10.0.0.236/trunk@75976 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 06:34:24 +00:00
warren%netscape.com
e5706a7236 Bug 46711. Removed nsAutoString travisty from nsStringKey. Introduced nsCStringKey. Made them both share the underlying string when possible. r=waterson
git-svn-id: svn://10.0.0.236/trunk@75975 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 06:19:37 +00:00
conrad%ingress.com
0a2d2db689 Fixed double line feed problem.
git-svn-id: svn://10.0.0.236/trunk@75974 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 06:06:02 +00:00
valeski%netscape.com
be3eff76db fixing windows hatred of goto inits
git-svn-id: svn://10.0.0.236/trunk@75973 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 05:23:05 +00:00
mcafee%netscape.com
14d36bbdb1 Fixing unix bustage.
git-svn-id: svn://10.0.0.236/trunk@75972 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 05:14:54 +00:00
mcafee%netscape.com
93d264db2f Adding nsDirectoryServiceDefs.h, fixing whitespace problems. This would have become linux bustage later.
git-svn-id: svn://10.0.0.236/trunk@75971 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 04:53:37 +00:00
conrad%ingress.com
39dbfd4b1a Changed strings to use macros
Fixed FindWinFolder which was not doing anything.


git-svn-id: svn://10.0.0.236/trunk@75970 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 04:39:30 +00:00
conrad%ingress.com
ffac91d169 Added nsDirectoryServiceDefs.h
git-svn-id: svn://10.0.0.236/trunk@75969 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 04:37:43 +00:00
conrad%ingress.com
3c685a3da5 Added the building of appfilelocationprovider lib.
r=sfraser


git-svn-id: svn://10.0.0.236/trunk@75968 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 04:36:59 +00:00
mcafee%netscape.com
d33428150e Reverting conrads change, accidentally double-spaced entire file.
git-svn-id: svn://10.0.0.236/trunk@75967 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 04:29:05 +00:00
conrad%ingress.com
8792af6e42 Export of nsDirectoryServiceDefs.h
r=valeski


git-svn-id: svn://10.0.0.236/trunk@75966 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 04:12:16 +00:00
conrad%ingress.com
4cbe746cf8 Export of defs header file.
r=valeski


git-svn-id: svn://10.0.0.236/trunk@75965 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 04:11:15 +00:00
conrad%ingress.com
4f099f2db5 Added appfilelocprovider lib, shell32 lib
r=valeski


git-svn-id: svn://10.0.0.236/trunk@75964 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 04:10:24 +00:00
conrad%ingress.com
1ebc1b19fb First checkin.
r=valeski


git-svn-id: svn://10.0.0.236/trunk@75963 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 04:03:52 +00:00
conrad%ingress.com
10b518db79 First checkin.
git-svn-id: svn://10.0.0.236/trunk@75962 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 04:02:25 +00:00
mscott%netscape.com
007f8e73f7 Backing out mstoltz's earlier checkin to bring mailnews back to life.
a=mcafee


git-svn-id: svn://10.0.0.236/trunk@75961 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 03:57:43 +00:00
valeski%netscape.com
764b5a125b fixing windows linkage problems
git-svn-id: svn://10.0.0.236/trunk@75960 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 03:50:12 +00:00
cmanske%netscape.com
f3cfdd30aa Big UI fix checkin continued - same bugs as last checkin. r=sfraser
git-svn-id: svn://10.0.0.236/trunk@75959 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 03:43:09 +00:00
conrad%ingress.com
ed5327cc88 Changed params to NS_InitEmbedding.
git-svn-id: svn://10.0.0.236/trunk@75958 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 03:43:06 +00:00
mkaply%us.ibm.com
a9a603ea20 r=waterson, a=waterson
OS/2 and AIX tinderbox break - shouldn't NS_IF_ADDREF a member in a const function


git-svn-id: svn://10.0.0.236/trunk@75957 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 03:39:05 +00:00
valeski%netscape.com
62a9983d74 fixing build bustage on linux
git-svn-id: svn://10.0.0.236/trunk@75956 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 03:37:36 +00:00
valeski%netscape.com
b6e04fc6fa fixing bustage
git-svn-id: svn://10.0.0.236/trunk@75955 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 03:29:50 +00:00
valeski%netscape.com
7e2825ed28 checking in for conrad to fix build bustage
git-svn-id: svn://10.0.0.236/trunk@75954 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 03:27:21 +00:00
valeski%netscape.com
3738c48369 temp fix for build problem
git-svn-id: svn://10.0.0.236/trunk@75953 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 03:15:57 +00:00
brendan%mozilla.org
36587fa68b Fix cut-and-paste bugs in JavaMember_finalize (48304, r=pschwartau).
git-svn-id: svn://10.0.0.236/trunk@75952 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 03:09:41 +00:00
conrad%ingress.com
0ae5e8b681 Added implementation of nsIDirectoryServiceProvider.
r=alecf


git-svn-id: svn://10.0.0.236/trunk@75951 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 03:08:39 +00:00
conrad%ingress.com
dd41a9d6cc 1. Uses appfilelocationprovider. Can pass one in or pass nsnull and default is made.
2. Removed version of NS_InitEmbedding which took char* path.
r=dougt


git-svn-id: svn://10.0.0.236/trunk@75950 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 03:07:25 +00:00
wtc%netscape.com
a08d1fb996 Bugzilla bug #34920: fixed a bug in PR_EmulateAcceptRead that depended
on the implementation of an enum.


git-svn-id: svn://10.0.0.236/trunk@75949 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 02:40:12 +00:00
rhp%netscape.com
186f953f67 Fix for Japanese text being corrupted in Forward Inline - Bug #: 48118 - r: mscott
git-svn-id: svn://10.0.0.236/trunk@75948 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 02:28:26 +00:00
dmose%mozilla.org
d2fb313f29 Changed nsLDAPConnection to execute the nsILDAPMessageListener callbacks directly rather than through an nsISupports proxy, meaning that the default is for them to execute on the nsLDAPConnection thread. Callers can still create a proxy manually and pass it in, if desired. Changed the datasource and channel objects to run correctly on the nsLDAPConnection thread, in the hopes that this would help avoid UI stalls. On Linux, at least, this didn't make any perceptible improvement, but it still is probably a good thing, and may help once more event system loving gets checked in. a=r=(not built)
git-svn-id: svn://10.0.0.236/trunk@75947 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 02:13:21 +00:00
cmanske%netscape.com
838e3690e4 Changed images for editmode toolbar, part of bug 47515. r=sfraser
git-svn-id: svn://10.0.0.236/trunk@75945 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 02:11:00 +00:00
cmanske%netscape.com
4483c01929 Big UI fix! bugs=47898, 26843, 26871, 37152, 38944, 41545, 42246, 42343, 43089, 45463, 45904, 46001, 47644, 47314, 47510, 47515, 47622, 47650, 47653, 47699, 47700, 46179, 47696, 47693. r=sfraser
git-svn-id: svn://10.0.0.236/trunk@75944 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 02:10:17 +00:00
mscott%netscape.com
9008e92d31 Bug #46086 --> can't read forwarded messages in 4.x because we are setting
a bogus content type on the news article (when it's forwarded as an attachment)
Bug #48135 --> fix forwarding of news messages bustage. Clear the channel listener
and re-generate it every time we load a url.
r=bienvenu


git-svn-id: svn://10.0.0.236/trunk@75943 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 02:09:33 +00:00
mscott%netscape.com
1deb252a2f Bug #48078, 48081 --> bring up save to disk dialog right away from the helper app dialog instead of
waiting till the download is finished.
properly implement Cancel so we stop the download and clean up the temp file.
r=alecf


git-svn-id: svn://10.0.0.236/trunk@75942 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 01:49:06 +00:00
edburns%acm.org
1cf629674f First checkin of Webclient/IE
git-svn-id: svn://10.0.0.236/trunk@75941 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 01:33:35 +00:00
edburns%acm.org
3395507383 Make it so the jni headers are built in src_share.
git-svn-id: svn://10.0.0.236/trunk@75940 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 01:08:14 +00:00
syd%netscape.com
4b2f05254e partial fix for 1611. r=cmanske
git-svn-id: svn://10.0.0.236/trunk@75939 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 01:04:50 +00:00
despotdaemon%netscape.com
59c052f2cd Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@75938 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 01:03:05 +00:00
edburns%acm.org
287ea4cd13 Make it so the jni headers are built in src_share.
git-svn-id: svn://10.0.0.236/trunk@75937 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 01:02:57 +00:00
anthonyd%netscape.com
902ff13a56 bug fix for 47399
dropping a drag session onto the originating selection
should do nothing.
r: mjudge, jfrancis


git-svn-id: svn://10.0.0.236/trunk@75936 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 01:01:18 +00:00
dr%netscape.com
2c783e6d18 one-line fix for 46658, r=ben
git-svn-id: svn://10.0.0.236/trunk@75935 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 00:52:02 +00:00
scc%mozilla.org
a8fa84f5e5 not part of the build; further work on multi-fragment strings. They are now limping along and can actually be used. They pass all tests not related to |Substring| and |nsPromiseConcatenation|.
git-svn-id: svn://10.0.0.236/trunk@75934 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 00:45:33 +00:00
mscott%netscape.com
3472eb5a1a fix mac breakage...can't use NS_LITERAL_STRING on a const char * on the mac
git-svn-id: svn://10.0.0.236/trunk@75933 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 00:42:19 +00:00
wtc%netscape.com
549a789d96 Bugzilla bug #39942: additional tweaks related to the thread-private
error string buffer.
Modified files: prerror.c, prcthr.c, pruthr.c


git-svn-id: svn://10.0.0.236/trunk@75932 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-10 00:34:11 +00:00
mccabe%netscape.com
a14775fa94 Cast some parameters to PRUnichar * from jschar * to make the Mac happy.
git-svn-id: svn://10.0.0.236/trunk@75931 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 23:42:24 +00:00
nbhatla%netscape.com
d751a557bc #46519 -> Mac Classic Skin Polish. Finally added Mac-like tab widgets by modifying XBL and CSS. Also added new IE 5 icons for imported bookmarks, as well as fixing splitter grippy icon state changes. r=andreww
git-svn-id: svn://10.0.0.236/trunk@75930 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 23:42:18 +00:00
nbhatla%netscape.com
a169511bd5 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@75929 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 23:30:14 +00:00
dr%netscape.com
c7cdd4e462 fix for windows horkage, shouldn't be in there anyway
git-svn-id: svn://10.0.0.236/trunk@75928 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 23:27:54 +00:00
nbhatla%netscape.com
524cc014d1 #46518 -> Mac Classic Skin Polish. #46178 -> search editor now has arrow buttons. r=andreww
git-svn-id: svn://10.0.0.236/trunk@75927 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 23:18:30 +00:00
nbhatla%netscape.com
df953c747d #46519 -> Mac Classic Skin Fixes. Pulls out in-line style from XUL for #47680. r=andreww
git-svn-id: svn://10.0.0.236/trunk@75926 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 23:14:02 +00:00
mccabe%netscape.com
6bc1090e99 Fix to 24688. Post a message to the JavaScript console whenever a call is made through XPConnect to a JS Component or other JS object that results in an exception.
Also eliminate xpcJSErrorReport and merge some functionality from it into nsScriptError.

r=jband,a=beard


git-svn-id: svn://10.0.0.236/trunk@75925 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 22:48:52 +00:00
varada%netscape.com
362f545a76 fix for bug#31549;showing prettyname with identity in msgcompose;r=ducaroz
git-svn-id: svn://10.0.0.236/trunk@75924 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 22:48:29 +00:00
saari%netscape.com
51e147ef41 Removing nsToolboxFrame.cpp, nsToolbarFrame.cpp, and nsToolBarDragListener.cpp from layout.mcp to keep in sync with dr's changes.
git-svn-id: svn://10.0.0.236/trunk@75923 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 22:47:32 +00:00
nelsonb%netscape.com
9eeb24807a Eliminate one more warning. Add missing f suffix to float constant.
git-svn-id: svn://10.0.0.236/trunk@75922 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 22:45:51 +00:00
mjudge%netscape.com
dac8dfc28f use "=" not "==" my bad
git-svn-id: svn://10.0.0.236/trunk@75921 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 22:43:39 +00:00
radha%netscape.com
c78435dbe9 Fix for bug # 47856. Patch from disttsc@bart.nl r=myself
git-svn-id: svn://10.0.0.236/trunk@75920 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 22:43:36 +00:00
varada%netscape.com
d498216323 fix for bug#31549;show server pretty name along with identity in mail compose window;r=ducarroz
git-svn-id: svn://10.0.0.236/trunk@75919 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 22:40:28 +00:00
dr%netscape.com
eec71e3b36 fix for 42635 and related cleanup, r=ben,hyatt
git-svn-id: svn://10.0.0.236/trunk@75918 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 22:38:46 +00:00
mjudge%netscape.com
533f7943c6 43533 table cell selection color fix. check for table cells/table being added to range and toggle flag to allow cells to draw correctly
git-svn-id: svn://10.0.0.236/trunk@75917 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 22:34:17 +00:00
mscott%netscape.com
f6f4368368 Bug #44163 --> FEAlert and FEAlertFromServer need a message window and with that message window
we should get the correct nsIPrompt object instead of using the one tied to the hidden window.
r=bienvenu


git-svn-id: svn://10.0.0.236/trunk@75916 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 22:33:14 +00:00
mjudge%netscape.com
e5571b2bdf 29570 37393 42794 mac os fix for selecting out of frame bounds.
git-svn-id: svn://10.0.0.236/trunk@75915 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 22:33:03 +00:00
mscott%netscape.com
5139d46ef4 Bug #44163 --> FEAlert and FEAlertFromServer need a message window
r=bienvenu


git-svn-id: svn://10.0.0.236/trunk@75914 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 22:32:45 +00:00
harishd%netscape.com
c75a8a89fb 36944 - USe NS_VMREFRESH_NO_SYNC to refresh
r=kmcclusk


git-svn-id: svn://10.0.0.236/trunk@75913 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 22:30:36 +00:00
harishd%netscape.com
12ebb61ff1 42429 - Pass whitespace, inside table, to the sink.
44178 - Enabled SERVER tag
43005 - Made HR a block element per spec.
43499 - Made XML document with .txt extension to be rendered as plain text
45437 - Enabled META charset notification in strict DTD.

r=pollmann


git-svn-id: svn://10.0.0.236/trunk@75912 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 22:28:41 +00:00
pinkerton%netscape.com
f14fd156e7 Rewrote drag scrolling to not use timers and thus avoid all problems about not being able to unregister the timer. Fixes bug 43428.
git-svn-id: svn://10.0.0.236/trunk@75911 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 22:08:49 +00:00
wtc%netscape.com
8b81966e6d Bugzilla bug #48245: removed the -mno-486 compiler flag.
Modified files: FreeBSD2.mk, Linux.mk
This bug was reported by Steven T. Hatton <hattons@bellatlantic.net>.


git-svn-id: svn://10.0.0.236/trunk@75910 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 21:53:45 +00:00
edburns%acm.org
60bfaf0127 bug=48227
author=edburns
a=edburns
r=ashuk

Files in this fix:

M classes_spec/org/mozilla/webclient/wrapper_native/EventRegistrationImpl.java
M classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java
A classes_spec/org/mozilla/webclient/wrapper_native/WCEventListenerWrapper.java
M src_moz/NativeEventThread.cpp
M src_moz/motif/NativeLoaderStub.cpp

Added class WCEventListenerWrapper:

 * This class allows the custom app to have one instance that implements
 * multiple Webclient event listener types. <P>

 * This is simply a "struct" type class that encapsulates a listener
 * instance with its class name.  This is necessary because the class
 * name is lost when we deal with the listener as a
 * WebclientEventListener, and not a WebclientEventListener subclass. <P>

 * @see org.mozilla.webclient.wrapper_native.NativeEventThread#addListener

Made it so when a java listener is added,

 * We create a WCEventListenerWrapper containing the user passed
 * DocumentLoadListener, and the string obtained from
 * DocumentLoadListener.class.getName();

We then call nativeEventThread.addListener:

 * Takes the abstract WebclientEventListener instance and adds it to a
 * Vector of listeners to be added.  This vector is scanned each time
 * around the event loop in run(). <P>

 * The vector is a vector of WCEventListenerWrapper instances.  In run()
 * these are unpacked and sent to nativeAddListener like this:
 * nativeAddListener(nativeWebShell,tempListener.listener,
 * tempListener.listenerClassName); <P>


git-svn-id: svn://10.0.0.236/trunk@75909 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 21:47:39 +00:00
rogerl%netscape.com
ccc73deb34 r,a=brendan@mozilla.org. Adding missing ECMA3 compliance toLocaleXXX
functions to built-in Array, Date and Object object prototypes.


git-svn-id: svn://10.0.0.236/trunk@75908 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 21:46:03 +00:00
larryh%netscape.com
96a76ac15a remove priotest. The test is not valid
git-svn-id: svn://10.0.0.236/trunk@75907 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 21:42:35 +00:00
dougt%netscape.com
c169f23f6c modified buffer while commiting.
fixing bustage.


git-svn-id: svn://10.0.0.236/trunk@75906 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 21:15:09 +00:00
dougt%netscape.com
8b2bb50369 Name Changes from GetPrompt to GetPrompter (47889)
git-svn-id: svn://10.0.0.236/trunk@75905 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 21:13:54 +00:00
dougt%netscape.com
33a8ac965d Renaming GetPrompt() to GetPrompter in nsIDOMWindow. This avoids a namespace
r=vidur@netscape.com (47889)


git-svn-id: svn://10.0.0.236/trunk@75904 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 21:12:21 +00:00
nelsonb%netscape.com
e66e41e5b2 - Change mp_mul to minimize number of outer loops when multipliers are
of unequal length.
- Fix s_mp_fixup_reciprocal to not truncate the result.
- Use new macros in mpi-priv.h


git-svn-id: svn://10.0.0.236/trunk@75903 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 20:55:39 +00:00
nelsonb%netscape.com
8f5ab67fa5 Use new MP_HOWMANY macro instead of equivalent code.
git-svn-id: svn://10.0.0.236/trunk@75902 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 20:53:25 +00:00
dave%intrec.com
b38449a603 Re-fixing bug 46897. Thanks to JRobertson@medevolve.com for catching the
omission in the original patch.


git-svn-id: svn://10.0.0.236/trunk@75901 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 20:49:11 +00:00
nelsonb%netscape.com
7bfe64da6e Comment out call to unimplemented function, so this will compile.
git-svn-id: svn://10.0.0.236/trunk@75900 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 20:46:59 +00:00
dp%netscape.com
4905d9910d Perl script to analyze xpcom log output and print results in html
git-svn-id: svn://10.0.0.236/trunk@75899 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 20:45:24 +00:00
nelsonb%netscape.com
0daabe0bf1 Some unix platform kshells don't understand export VAR=value
So instead use                                VAR=value; export VAR


git-svn-id: svn://10.0.0.236/trunk@75898 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 20:44:05 +00:00
nelsonb%netscape.com
4b6092a8d7 Add new macros: MP_MIN, MP_MAX, MP_HOWMANY, MP_ROUNDUP.
git-svn-id: svn://10.0.0.236/trunk@75897 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 20:42:18 +00:00
nboyd%atg.com
1972514928 fix 47859
git-svn-id: svn://10.0.0.236/trunk@75896 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 20:23:50 +00:00
nboyd%atg.com
4d2963d28d Fix 47859
git-svn-id: svn://10.0.0.236/trunk@75895 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 20:22:37 +00:00
jtaylor%netscape.com
0351443d26 Fixes bugs 43427 and 46359. Provides clear button and error checking in JS
Console. r=ben. mccabe.


git-svn-id: svn://10.0.0.236/trunk@75894 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 20:18:38 +00:00
jtaylor%netscape.com
fc30ccdbe5 Add label for clear button re: bug# 43427. r=ben. mccabe
git-svn-id: svn://10.0.0.236/trunk@75893 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 20:16:50 +00:00
pavlov%netscape.com
bd5b488ba4 avoid calling XSetFont on every draw_text (hopefully) by using the GC cache correctly when drawing text and not calling gdk_draw_text directly. working on linux performance bug 26502. r=imot
git-svn-id: svn://10.0.0.236/trunk@75892 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 20:15:08 +00:00
despotdaemon%netscape.com
38cf207b54 Pseudo-automatic update of changes made by jgmyers@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@75891 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 20:12:10 +00:00
mstoltz%netscape.com
e686efdeca Fixed 37702 and 47670. r=vidur
git-svn-id: svn://10.0.0.236/trunk@75890 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 20:08:54 +00:00
waterson%netscape.com
b03ddd8490 Bug 47927. Check in the wrong fix to get the tree open. a=granrose.
git-svn-id: svn://10.0.0.236/trunk@75887 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 19:30:14 +00:00
harishd%netscape.com
c3b1fbec56 I didn't cause the leak. Putting my changes back.
a=granrose


git-svn-id: svn://10.0.0.236/trunk@75886 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 17:49:18 +00:00
javi%netscape.com
7a1afca5e4 Don't call the callback function if one is not stored.
git-svn-id: svn://10.0.0.236/trunk@75885 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 17:17:42 +00:00
harishd%netscape.com
1f24ef20e9 Backing out my changes to see if the leak goes away
a=granrose


git-svn-id: svn://10.0.0.236/trunk@75884 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 16:42:20 +00:00
dcone%netscape.com
6d4959771e Taking out the change from yesterday that enables the PatBlt for tiling. Found problems so
I am pulling that change for now.


git-svn-id: svn://10.0.0.236/trunk@75883 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 14:07:55 +00:00
dbaron%fas.harvard.edu
3b9c9e465a Fix leak on hovering over a scrollbar and re-fix similar leak for text inputs (bug 42895) by adding a "general" method for unrooting anonymous content created through nsIAnonymousContentCreator, plus a hack to deal with the scrollbars on the root element. Some of the other SetDocumentForAnonymousContent methods *may* need to be implemented. Chris Waterson helped significantly with this patch. r=waterson,hyatt b=45676 (nsbeta3+)
git-svn-id: svn://10.0.0.236/trunk@75882 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 12:51:05 +00:00
mozilla.BenB%bucksch.org
67fdd48504 47851: Remove unused pref. r=putterman, a=waterson
git-svn-id: svn://10.0.0.236/trunk@75881 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 09:45:52 +00:00
scc%mozilla.org
cdb44d875e better comments re: the formal specification of |SetCapacity|; jag's |ToInteger| patch as per bug #46898; r|a=waterson
git-svn-id: svn://10.0.0.236/trunk@75880 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 08:26:23 +00:00
scc%mozilla.org
cec3e96639 fixed |nsCharSinkTraits<T>::write| as per bug #46462; r=beard, a=waterson
git-svn-id: svn://10.0.0.236/trunk@75879 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 08:26:12 +00:00
scc%mozilla.org
98e7fedae2 fixed |BeginWriting| and |EndWriting| to no longer take an offset, fallout from the new multi-fragment string implementation; fixed a bug in |operator-=| exposed by the change to |EndWriting|; fixed |nsWritingIterator<CharT>::write| as per bug #46462; fixed comments galore, significantly better specifying |SetLength| and |SetCapacity|; since |SetCapacity| is just a hint, give it a default implementation rather than making it pure virtual; fixed a couple of the |do_...| routines to unify the code path minimizing overides; r|a=waterson
git-svn-id: svn://10.0.0.236/trunk@75878 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 08:26:08 +00:00
scc%mozilla.org
14a9f6633b fixed |BeginReading| and |EndReading| to no longer take an offset, fallout from the new multi-fragment string implementation; fixed a bug in |operator-=| exposed by the change to |EndReading|; fixed the |CharAt| family of routines accordingly; fixed comments galore; r|a=waterson
git-svn-id: svn://10.0.0.236/trunk@75877 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 08:26:00 +00:00
pinkerton%netscape.com
47269ea7b1 Remove Start/StopTracking methods.
git-svn-id: svn://10.0.0.236/trunk@75876 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 07:45:12 +00:00
pinkerton%netscape.com
162bb1938a Stop using dragtracker (bug 43428)
git-svn-id: svn://10.0.0.236/trunk@75875 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 07:43:12 +00:00
pinkerton%netscape.com
505eabb83b Simplification of drag scrolling in trees. Don't try to use view manager to capture the mouse, just not worth it. Make drag area w/in the tree's view. (bug 43428).
git-svn-id: svn://10.0.0.236/trunk@75874 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 07:42:46 +00:00
pinkerton%netscape.com
a21d2ed2b2 Stop using dragTracker (bug 43428)
git-svn-id: svn://10.0.0.236/trunk@75873 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 07:41:31 +00:00
pinkerton%netscape.com
c77e714dae stop using dragTracker (bug 43428).
git-svn-id: svn://10.0.0.236/trunk@75872 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 07:40:54 +00:00
mozilla.BenB%bucksch.org
e2e6ed4a85 36480:
- Don't check for <div> around a sig
- Allow class to be quoted or be one of several
No bug:
- Don't output <div> for plaintext sigs (because 4.x' editor has a bug with <div>s inside <blockquote type=cite>s)
r=ducarroz
a=waterson


git-svn-id: svn://10.0.0.236/trunk@75871 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 07:27:14 +00:00
brendan%mozilla.org
e830c43305 Whitespace panty raid.
git-svn-id: svn://10.0.0.236/trunk@75870 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 06:20:13 +00:00
ben%netscape.com
9ebf63f099 fix for nsbeta3+ bug 41139, can select multiple radio buttons in a group by using the keyboard.
git-svn-id: svn://10.0.0.236/trunk@75869 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 05:47:46 +00:00
jst%netscape.com
6ffb8c8cef Turning on new DOM Level 2 behavior by default. (bug 48161). a=nisheeth@netscape.com, r=pollmann@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@75868 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 05:31:28 +00:00
pavlov%netscape.com
7f37448436 additional removal of static nsCOMPtrs for bug 43580 r=scc
git-svn-id: svn://10.0.0.236/trunk@75867 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 05:28:45 +00:00
ben%netscape.com
5ecb03def2 fix for nsbeta3+ bug 41901, link image dragged from one window to another loads the image instead of the linked page.
also tidied up the html string returned in this case so that when dropped into composer, an image enclosed in a link
to the linked page is inserted.


git-svn-id: svn://10.0.0.236/trunk@75866 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 05:26:44 +00:00
pavlov%netscape.com
b0f48e963e avoid pulling the event out of the queue and putting it right back when typing.. working on linux performance bug 26502 r=beard
git-svn-id: svn://10.0.0.236/trunk@75865 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 05:16:17 +00:00
putterman%netscape.com
802a5474d2 Fix for 46208. Get rid of '?" before Reply To Sender in thread pane context menu.
patch by gemal@gemal.dk r=scottip.


git-svn-id: svn://10.0.0.236/trunk@75864 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 05:13:32 +00:00
ben%netscape.com
de5e53e215 nsbeta3+ 46284, crash after trying to install package via software installation pref panel. remove button (was there
for debugging purposes only)


git-svn-id: svn://10.0.0.236/trunk@75863 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 05:11:29 +00:00
ben%netscape.com
655d38db87 fix for nsbeta3+ bug 40877, 'secs' not localised in navigator.js
git-svn-id: svn://10.0.0.236/trunk@75862 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 05:10:01 +00:00
ben%netscape.com
c503c5ef62 fix for nsbeta3+ bug 40877, 'secs' is not localised in navigator.js
git-svn-id: svn://10.0.0.236/trunk@75861 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 05:09:45 +00:00
dmose%mozilla.org
2d5bf4dd91 adding .cvsignore files to stop cvs whining in non-OBJDIR builds. a=r=(not built)
git-svn-id: svn://10.0.0.236/trunk@75860 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 04:44:01 +00:00
dmose%mozilla.org
f97b0d8e85 A number of lines were not properly bracketed by DEBUG conditionals, causing non-DEBUG builds to fail. a=r=(not built)
git-svn-id: svn://10.0.0.236/trunk@75859 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 04:43:33 +00:00
brendan%mozilla.org
5c6a970327 Clear JS watchpoints on the window object before loading a new document (38959, r=mstoltz).
git-svn-id: svn://10.0.0.236/trunk@75858 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 03:30:46 +00:00
morse%netscape.com
e5f3e8b0a8 bug 48076, remove commonDialogs from wallet module, r=dougt
git-svn-id: svn://10.0.0.236/trunk@75857 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 03:27:32 +00:00
saari%netscape.com
ce8255995f hack part deux for testing for leak increase
git-svn-id: svn://10.0.0.236/trunk@75856 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 02:59:44 +00:00
blizzard%redhat.com
1e041a9cfc add some extra test cases for the embedding widget
git-svn-id: svn://10.0.0.236/trunk@75855 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 02:52:09 +00:00
scc%mozilla.org
2afa96eead not part of the build; further work on multi-fragment strings. Moved the bulk of the template implementation to the header file. This file needs to continue to exist for when I finally un-templatize the interfaces
git-svn-id: svn://10.0.0.236/trunk@75854 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 02:48:27 +00:00
scc%mozilla.org
fe25ceec15 not part of the build; further work on multi-fragment strings
git-svn-id: svn://10.0.0.236/trunk@75853 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 02:47:33 +00:00
blizzard%redhat.com
018c0630c5 warning fixes in gtkmozembed.h. fix for bug #46279. reparent the mozilla window to an offscreen window when unrealizing since you might get re-realized later. r=pavlov, a=waterson
git-svn-id: svn://10.0.0.236/trunk@75852 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 02:46:53 +00:00
brendan%mozilla.org
28cf8d024c Add TraceMallocLogTimestamp window method, for bloat storyboarding (#ifdef NS_TRACE_MALLOC, not part of build).
git-svn-id: svn://10.0.0.236/trunk@75851 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 02:43:09 +00:00
brendan%mozilla.org
3dfa5856af Add captioned timestamp events, for JS storyboarding (not part of build).
git-svn-id: svn://10.0.0.236/trunk@75850 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 02:41:58 +00:00
cmanske%netscape.com
dbfeb1cd72 Checking in for rcassin@supernova.org. Composer pref fixes, bug 47703, r=cmanske
git-svn-id: svn://10.0.0.236/trunk@75849 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 02:33:29 +00:00
mscott%netscape.com
ced2ee490a Bug #1642 --> don't run JS urls with the default browser (effects shrimp only)
r=prass


git-svn-id: svn://10.0.0.236/trunk@75848 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 02:30:58 +00:00
ben%netscape.com
94be5f8b8d adding reorder styles for nsbeta3+ bug 46516 to modern and mac classic skin
git-svn-id: svn://10.0.0.236/trunk@75847 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 02:26:45 +00:00
saari%netscape.com
585834ef4b temp hack to test theory for sudden increase in leaks
git-svn-id: svn://10.0.0.236/trunk@75846 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 02:25:51 +00:00
nbhatla%netscape.com
053f5cf498 #46519 -> Mac Classic Skin Fixes. This checkin specifically fixes the pref-languages panel, so that the reorder arrow buttons now appear properly on all platforms.
git-svn-id: svn://10.0.0.236/trunk@75845 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 02:25:43 +00:00
ftang%netscape.com
16e9ce78b8 fix 45347. swap the order for author and content-type to make the content-type
appear first in the meta tag since we need to know the encoding before hitting
non ASCII value in the author name. r=cmanske


git-svn-id: svn://10.0.0.236/trunk@75844 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 02:25:25 +00:00
cmanske%netscape.com
105a987da1 Checking in for rcassin@supernova.org. Composer pref string fixes, bug 47703, r=cmanske
git-svn-id: svn://10.0.0.236/trunk@75843 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 02:22:57 +00:00
ftang%netscape.com
12d44d4f28 fix 45347. do case insenstive comparesion for html attribute value
r=cmanske


git-svn-id: svn://10.0.0.236/trunk@75842 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 02:22:56 +00:00
bienvenu%netscape.com
ca155eaae5 fix freeing of uninitialized memory, prob result of trying to fix memory leaks, r=mscott
git-svn-id: svn://10.0.0.236/trunk@75840 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 01:32:20 +00:00
alecf%netscape.com
31646b2676 oops, forgot this file with a checkin earlier today
git-svn-id: svn://10.0.0.236/trunk@75839 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 01:17:19 +00:00
sfraser%netscape.com
607439019b More bustage fixing with style struct return types.
git-svn-id: svn://10.0.0.236/trunk@75838 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 00:52:02 +00:00
alecf%netscape.com
faebf440ab fix mac bustage by using AssignWithConversion
git-svn-id: svn://10.0.0.236/trunk@75837 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 00:38:01 +00:00
sfraser%netscape.com
572368546b Fix Windows compiler suckage. Fixes bustage.
git-svn-id: svn://10.0.0.236/trunk@75836 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 00:27:38 +00:00
tao%netscape.com
99e0bfce16 Lacalizable accesskey fix. (check in for Andrea; r=tao,a=brendan.)
git-svn-id: svn://10.0.0.236/trunk@75835 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 00:21:11 +00:00
jband%netscape.com
278cbd4584 fix bug 47410. Allow JS components to implement nsISecurityCheckedComponent and have sidebar componnet implement it to allow access from untrusted scripts. a=brendan@mozilla.org a=johng@netscape.com
git-svn-id: svn://10.0.0.236/trunk@75834 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 23:59:32 +00:00
ericb%neoplanet.com
0fede69e4e removed call to widget->CaptureMouse that was crashing under gtk. r=hyatt a=waterson
git-svn-id: svn://10.0.0.236/trunk@75833 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 23:49:01 +00:00
sfraser%netscape.com
f7ad53e40d Fix for bug 25161 -- allow editor to handle pages with forms by implementing user-select and user-input for form controls. r=rods, pierre, mjudge.
git-svn-id: svn://10.0.0.236/trunk@75832 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 23:48:42 +00:00
dmose%mozilla.org
358461d7b4 in DEBUG builds, created a PRLogModuleInfo for LDAP (gLDAPLogModule), and migrated most PR_fprintf(STDERR) bracketed by DEBUG_dmose to PR_LOG. a=r=(not built)
git-svn-id: svn://10.0.0.236/trunk@75831 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 23:44:48 +00:00
sfraser%netscape.com
7726da891c Fix for bug 25161 -- allow editor to handle pages with forms by implementing user-select and user-input for form controls. r=rods, pierre, mjudge.
git-svn-id: svn://10.0.0.236/trunk@75830 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 23:38:00 +00:00
sfraser%netscape.com
d2a1daeb55 Fix for 25161 -- allow editor to handle pages with form elements. Avoid infinite loop in editor, and add some CSS for form elements in editor. r=jfrancis
git-svn-id: svn://10.0.0.236/trunk@75829 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 23:37:51 +00:00
alecf%netscape.com
e385002b0a big-ass leak fix - stop leaking mail datasources by clearing ourselves out when the last
RDF observer goes away, and re-initializing if new RDF observers arrive on the scene.
r=putterman
fixes #45176, among other leaks


git-svn-id: svn://10.0.0.236/trunk@75828 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 23:32:55 +00:00
sgehani%netscape.com
ed5414a7fa Make Linux installer work on non-Redhat distributions.
[nsbeta2+ b=47921; r=sgehani; checking in for pavlov]


git-svn-id: svn://10.0.0.236/trunk@75826 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 23:29:36 +00:00
ben%netscape.com
f5c2d84cf4 forgot to check this in last night...
git-svn-id: svn://10.0.0.236/trunk@75825 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 23:15:52 +00:00
javi%netscape.com
02d4a55d6d Implement the poll loop on UNIX for the PKCS7 Decoder when finishing up
just in case PSM is a little slow to shove data back at us.


git-svn-id: svn://10.0.0.236/trunk@75824 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 23:08:53 +00:00
dr%netscape.com
a45cd5e7f6 fix for cache miss loading chrome://navigator/skin/navigator.css, r=ben
git-svn-id: svn://10.0.0.236/trunk@75823 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 23:07:15 +00:00
nelsonb%netscape.com
475a5fabb5 Emulate an SSL3 client more closely after a server negotiates down to 3.0.
git-svn-id: svn://10.0.0.236/trunk@75822 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 22:54:02 +00:00
mcafee%netscape.com
4a0b58833b Saving space with thin separator (40888)
git-svn-id: svn://10.0.0.236/trunk@75821 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 22:45:53 +00:00
cata%netscape.com
9c0beebb05 Fix for bug #28104. r=nhotta, a=ftang.
git-svn-id: svn://10.0.0.236/trunk@75820 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 22:45:36 +00:00
dr%netscape.com
f7ecc9f460 fix for 38787, r=hyatt
git-svn-id: svn://10.0.0.236/trunk@75819 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 22:42:42 +00:00
mcafee%netscape.com
0a72359f4a Changing font resolution to say screen resolution. r=slamm, akkana
git-svn-id: svn://10.0.0.236/trunk@75818 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 22:37:54 +00:00
mcafee%netscape.com
b03f8e7b1b Removing whats related description to save room (40888). r=slamm
git-svn-id: svn://10.0.0.236/trunk@75817 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 22:28:27 +00:00
putterman%netscape.com
1765cbe61f Fix for 37583. Remove View|Sort|Ascending and Descending menu items. r=alecf.
git-svn-id: svn://10.0.0.236/trunk@75816 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 22:28:26 +00:00
larryh%netscape.com
67b0d58523 BugZilla: 25982. MacOS retruns 1
git-svn-id: svn://10.0.0.236/trunk@75815 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 22:26:42 +00:00
putterman%netscape.com
d5ab05db91 Fix for 37932. r=ducarroz. remove Forward Quoted from preferences.
git-svn-id: svn://10.0.0.236/trunk@75814 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 22:19:37 +00:00
ruslan%netscape.com
013a4c9859 Checking in the patch for 45337 by jgmeyers, r=ruslan,a=gagan
git-svn-id: svn://10.0.0.236/trunk@75813 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 22:16:05 +00:00
ducarroz%netscape.com
a96555222f Better fix for Mac Commercial bustage of yesterday. Add xpcompat.h to the manifest file. R=sfraser
git-svn-id: svn://10.0.0.236/trunk@75812 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 22:15:08 +00:00
alecf%netscape.com
822600462e part of fix for 39016 - add direct access to the string bundle for the mail string bundle stuff
r=mscott


git-svn-id: svn://10.0.0.236/trunk@75811 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 22:11:40 +00:00
alecf%netscape.com
57f820fbe3 part of fix for #34996 - unify location of username amongst the protocols
git-svn-id: svn://10.0.0.236/trunk@75810 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 22:06:59 +00:00
mcafee%netscape.com
10cf044ae8 Smart browsing pane should be titled as such, not whats related. r=slamm
git-svn-id: svn://10.0.0.236/trunk@75809 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 21:46:18 +00:00
valeski%netscape.com
0d1eca8726 38260. removing shadowed rv declaration, and xpfe #include dependency
git-svn-id: svn://10.0.0.236/trunk@75808 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 21:43:47 +00:00
wtc%netscape.com
16e6b94514 Removed obsolete test event.c.
Modified files: Makefile, Makefile.in
Removed file: event.c


git-svn-id: svn://10.0.0.236/trunk@75807 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 21:35:14 +00:00
wtc%netscape.com
729303241a Make main() return int explicitly.
git-svn-id: svn://10.0.0.236/trunk@75806 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 21:33:51 +00:00
saari%netscape.com
e1a79e8500 massive landing of joki changes.
Relevant nsbeta3+ bugs 43309, 44503, 2634, 2504,5981, 24698, 25758, 33577,
36062, 36217, 41191, 41491, 42356, 42829, 43016
r=saari (joki code). also been tested by heikki and bryner


git-svn-id: svn://10.0.0.236/trunk@75805 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 21:31:05 +00:00
mcafee%netscape.com
20eb835969 Fixing slashes, not part of build.
git-svn-id: svn://10.0.0.236/trunk@75804 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 21:27:33 +00:00
saari%netscape.com
847a699deb Beginnings of massive landing of joki changes.
Relevant nsbeta3+ bugs 43309, 44503, 2634, 2504,5981, 24698, 25758, 33577,
36062, 36217, 41191, 41491, 42356, 42829, 43016
r=saari (joki code). also been tested by heikki and bryner


git-svn-id: svn://10.0.0.236/trunk@75803 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 21:19:03 +00:00
saari%netscape.com
d3919b1d3e Beginnings of massive landing of joki changes.
Relevant nsbeta3+ bugs 43309, 44503, 2634, 2504,5981, 24698, 25758, 33577,
36062, 36217, 41191, 41491, 42356, 42829, 43016
r=saari (joki code). also been tested by heikki and bryner

--------------------------------


git-svn-id: svn://10.0.0.236/trunk@75802 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 21:17:28 +00:00
pavlov%netscape.com
38958ad8dc removing a dump() that shows a bogus error
git-svn-id: svn://10.0.0.236/trunk@75801 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 21:14:18 +00:00
ddrinan%netscape.com
4fd52d34f8 Disable to TLS because some servers do not implement version rollback correctly
git-svn-id: svn://10.0.0.236/trunk@75800 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 21:10:20 +00:00
mkaply%us.ibm.com
cc1c8681d5 #47881
r=valeski, a=brendan
OS/2 tinderbox break - we need to link mozdbm


git-svn-id: svn://10.0.0.236/trunk@75799 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 21:05:59 +00:00
bratell%lysator.liu.se
7d881419fb Bug 35802 leaking strings. r=mscott@netscape.com a=brendan@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@75798 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 21:02:56 +00:00
nhotta%netscape.com
e604e31a9f Change to call OS API with null argument for default locale, bug 39677, r=ftang.
git-svn-id: svn://10.0.0.236/trunk@75797 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 20:44:12 +00:00
harishd%netscape.com
8d377df7b3 45975 - Make sure that the head context gets closed before opening up the body.
44285 - Propagate the block message to the parser correctly.
45555 - Pass the node that contains the skipped content to the sink.
46392 - Error message got lost
43481 - P cannot contain P per spec.
44759 - Handling multiple BODYs correctly.
45228, 44758 - Translate entities in TEXTAREA and TITLE before handing the string to the sink

r=pollmann


git-svn-id: svn://10.0.0.236/trunk@75796 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 20:38:14 +00:00
heikki%netscape.com
6eacdb81c7 Bug 38647 Link clicks on nsImageFrame do not check if legal to load URI. Happened with server side image map. r=mstolz
git-svn-id: svn://10.0.0.236/trunk@75795 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 20:35:12 +00:00
heikki%netscape.com
319d5d1819 Bug 29473 ondblclick event not being fired.
git-svn-id: svn://10.0.0.236/trunk@75794 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 20:32:09 +00:00
mcgreer%netscape.com
0f4cf042cb zero the correct amount of input bytes
git-svn-id: svn://10.0.0.236/trunk@75793 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 20:30:56 +00:00
rogerl%netscape.com
99bdc98433 r=brendan, bug# 34276. Fix for correctly including winsock2.h.
git-svn-id: svn://10.0.0.236/trunk@75792 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 20:28:49 +00:00
rogerl%netscape.com
eae4a7d9a8 (update to fix for bug #31255). Previous patch was insufficient in that it
didn't handle the case when the tokenstream is not tokenizing newlines.


git-svn-id: svn://10.0.0.236/trunk@75791 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 20:24:56 +00:00
alecf%netscape.com
475d19dc4a fix for prefs bustage
git-svn-id: svn://10.0.0.236/trunk@75790 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 19:50:00 +00:00
sdv%sparc.spb.su
bb0e90b109 fix for bug=47878
NamedNodeMapImpl class should not extend NodeImpl
according to the w3c spec.


git-svn-id: svn://10.0.0.236/trunk@75789 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 16:43:52 +00:00
rods%netscape.com
a7b92c54bc during reflow it makes sure the maxelementsize width is set to the smaller of
min size or the current size.
(see also fix nsGfxTextControlFrame.cpp)
b=40596 r=evaughan


git-svn-id: svn://10.0.0.236/trunk@75788 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 14:30:08 +00:00
rods%netscape.com
b5b27bd2c4 minor fix for max-element-size. The minsize needs to be calc and cached during the regular reflow
there is too much state to be remember to calc the min size for when ever it is asked for it.
(see also fix nsBoxFramae.cpp)
b=40596 r=evaughan


git-svn-id: svn://10.0.0.236/trunk@75787 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 14:27:36 +00:00
dcone%netscape.com
e217756243 Check to see if the view had been reparented.. b=44718 a=mcclusk
git-svn-id: svn://10.0.0.236/trunk@75786 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 14:11:09 +00:00
dcone%netscape.com
a1db32435f Fixes slow scrolling, using patblt on windows NT. bug = 43943. A=mcclusk
git-svn-id: svn://10.0.0.236/trunk@75785 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 14:07:38 +00:00
valeski%netscape.com
c9ba2e1650 formatting change to wml output
git-svn-id: svn://10.0.0.236/trunk@75784 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 07:38:43 +00:00
ben%netscape.com
d40bead5ce update jar packager file for previous checkin
git-svn-id: svn://10.0.0.236/trunk@75783 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 07:30:03 +00:00
valeski%netscape.com
3fdb365a62 adding WML output for WAP browsers
git-svn-id: svn://10.0.0.236/trunk@75782 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 06:59:15 +00:00
ben%netscape.com
4be87e92f4 fix for mac bustage. oops
git-svn-id: svn://10.0.0.236/trunk@75781 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 06:53:21 +00:00
bryner%uiuc.edu
b7be6128e5 Removing .cvsignore files so CVS will realize that this directory is
empty.  Not part of build.


git-svn-id: svn://10.0.0.236/trunk@75780 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 06:47:17 +00:00
tor%cs.brown.edu
2fd32ef91d Bug 40942 and 47816 - fix off-by-one error in DrawComposited
sanity check.  r=bryner


git-svn-id: svn://10.0.0.236/trunk@75779 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 06:42:26 +00:00
alecf%netscape.com
167b2f0335 final part of fix for 46712 - flush the string bundle cache when the locale changes
r=hyatt


git-svn-id: svn://10.0.0.236/trunk@75778 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 06:24:56 +00:00
ben%netscape.com
ac38520166 fix for 47441 & incremental fix for 46613, correct windows classic skin use of system colours in scrollbar thumb.
git-svn-id: svn://10.0.0.236/trunk@75777 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 06:15:35 +00:00
ben%netscape.com
6bbe804f01 nsbeta3+ bug 45085, move search results 'default.htm' file into locale.
git-svn-id: svn://10.0.0.236/trunk@75776 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 06:07:25 +00:00
nelsonb%netscape.com
1df049f648 Fix crash caused by zeroing a larger buffer than the caller passed in.
git-svn-id: svn://10.0.0.236/trunk@75775 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 05:56:56 +00:00
nelsonb%netscape.com
330c8b4550 Fix crash caused by uninitialized variable.
git-svn-id: svn://10.0.0.236/trunk@75774 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 05:56:10 +00:00
rjc%netscape.com
c5085415b2 Remove Mac debugging info. r=me
git-svn-id: svn://10.0.0.236/trunk@75773 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 05:55:22 +00:00
rjc%netscape.com
66d46a347d Sorting fixes for bug # 26131. r=me, nhotta, putterman
git-svn-id: svn://10.0.0.236/trunk@75772 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 05:50:10 +00:00
ben%netscape.com
7c008af23b fix for nsbeta3+ bug 44229, can't drag urls out of history window
git-svn-id: svn://10.0.0.236/trunk@75771 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 05:46:32 +00:00
waterson%netscape.com
59f3ba59da Add regression test for 44709.
git-svn-id: svn://10.0.0.236/trunk@75770 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 05:03:36 +00:00
waterson%netscape.com
8ba85111c7 Use nsVoidArray instead of nsISupportsArray to hold kids. r=hyatt
git-svn-id: svn://10.0.0.236/trunk@75769 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 05:02:07 +00:00
waterson%netscape.com
27f49e988e Bugs 46616, 46964. Clean up RebuildContainer(): factor into two methods to share code better. Maintain a queue of ungenerated elements to scan for generated children. Add tons of comments so I don't have to figure this all out again when I look at it next. r=rjc
git-svn-id: svn://10.0.0.236/trunk@75768 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 04:57:55 +00:00
ducarroz%netscape.com
a5d4c810f5 Fix for bug 36480. Add function to switch the signature. R=putterman
git-svn-id: svn://10.0.0.236/trunk@75767 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 04:46:55 +00:00
putterman%netscape.com
7b226eb3c0 Fix for 45059. r=mscott. Character encoding menus didn't work in the standalone message window.
git-svn-id: svn://10.0.0.236/trunk@75766 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 04:46:42 +00:00
av%netscape.com
bf617efae9 Fixing #8740, r=serge
git-svn-id: svn://10.0.0.236/trunk@75765 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 04:45:03 +00:00
ducarroz%netscape.com
a9581e6d1b Fix for bug 36480. Add function to switch the signature. R=putterman
git-svn-id: svn://10.0.0.236/trunk@75764 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 04:45:02 +00:00
alecf%netscape.com
239a015260 fix for #40329 contributed by jrgm@netscape.com, r=ben
git-svn-id: svn://10.0.0.236/trunk@75763 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 04:43:35 +00:00
waterson%netscape.com
45d653b43a fucking mac
git-svn-id: svn://10.0.0.236/trunk@75762 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 04:23:43 +00:00
ben%netscape.com
1243b96d21 fix for nsbeta3+ 45687, problems with helper apps pref panel
git-svn-id: svn://10.0.0.236/trunk@75761 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 04:18:23 +00:00
mscott%netscape.com
930fa589d1 Bug #46881 --> set the charset correctly for mutlipart/alternative
r=rhp


git-svn-id: svn://10.0.0.236/trunk@75760 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 04:09:26 +00:00
ducarroz%netscape.com
3e01b25fda Part of fix for bug 36480. I check in this fix for jfrancis. The function EndOfDocument which wasn't used yet was setting the selection on the wrong node. R=ducarroz
git-svn-id: svn://10.0.0.236/trunk@75759 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 04:05:26 +00:00
tor%cs.brown.edu
fe0d1665bd Landing libmng 0.9.2+. a=waterson
git-svn-id: svn://10.0.0.236/trunk@75758 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 03:58:05 +00:00
blizzard%redhat.com
2f3f044306 fix the following bugs: #39560, #47141, #46928, #47949. use nsIPipe for the stream impl, seperate XPCOM startup, add a resize callback so content with a width and height are sized correctly, fix problems with gtkmozembed widgets on gtk notebook widgets. also, add some new signals for progress loading and net changes. r=dougt, a=waterson
git-svn-id: svn://10.0.0.236/trunk@75757 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 03:58:03 +00:00
dmose%mozilla.org
b29cf24bab added ldap_abandon()-like functionality to the XPCOM wrapper, and changed the nsLDAPChannel code to implement request cancellation (eg pressing the stop button in the browser) using said functionality. a=r=(not built).
git-svn-id: svn://10.0.0.236/trunk@75755 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 03:23:05 +00:00
nelsonb%netscape.com
a1e1fc974c - Change mpi private function s_mp_mul_d_add_offset into a macro.
- Declare and implement new function s_mp_mul_add, which is a candidate
  for replacement with assembler code.
- Convert mp_mul, mp_sqr, etc. to use s_mp_mul_add.
- New implementation of mp_invmod for odd moduli. Algorithm from paper
  "Fast Modular Reciprocals" by Richard Schroeppel (a.k.a. Captain Nemo).
- New function s_mp_invmod_32b in mpi.c, computes inverse mod 2**32, also
  from same paper. Used in mp_invmod and mp_exptmod.


git-svn-id: svn://10.0.0.236/trunk@75754 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 03:20:35 +00:00
dmose%mozilla.org
b56488f5ec use lexical closure of JS functions to bind data to a function for use as a callback. a=r=(not built)
git-svn-id: svn://10.0.0.236/trunk@75753 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 02:56:44 +00:00
mscott%netscape.com
73b3390d9c Fix a small memory leak.
git-svn-id: svn://10.0.0.236/trunk@75752 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 02:27:52 +00:00
mscott%netscape.com
61a473e3e2 Bug #43389, 41125 --> header conversion should honor default and over ride charset
information.
r=nhotta


git-svn-id: svn://10.0.0.236/trunk@75751 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 02:27:38 +00:00
bryner%uiuc.edu
6a05d7274d Patch from Jan Varga <varga@utcru.sk> for filepicker localizability fixes,
improved keyboard navigation, and misc. cleanups.  bug
45561.  r=me,pavlov.  a=waterson.


git-svn-id: svn://10.0.0.236/trunk@75750 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 01:55:59 +00:00
sgehani%netscape.com
64b797c3d9 Ensure linux installer doesn't core dump for "long" install destination paths
when a default location is specified in the config.ini.

[nsbeta3+ b=46458; r=dveditz]


git-svn-id: svn://10.0.0.236/trunk@75749 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 01:29:04 +00:00
javi%netscape.com
14fc817b69 A fix for Windows where the client stops trying to read decrypted data back from the client before it's ready.
git-svn-id: svn://10.0.0.236/trunk@75748 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 01:26:44 +00:00
rhp%netscape.com
96c4541085 Fix for vCard having an inactive Add button - Bug #: 47537 - r: putterman
git-svn-id: svn://10.0.0.236/trunk@75746 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 00:52:52 +00:00
pierre%netscape.com
7393600e1b 47138: Some invalid units are not resulting in dropped declarations.
15174: counter() and counters() should not be recognized by CSS parser.


git-svn-id: svn://10.0.0.236/trunk@75744 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 00:34:42 +00:00
mscott%netscape.com
65cba63f62 Remove some debugging code from the rdf file
git-svn-id: svn://10.0.0.236/trunk@75743 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 00:34:06 +00:00
waterson%netscape.com
1cc3c3da2d Bug 46053. Add [begin|end]UpdateBatch() to nsIRDFObserver; case-normalize the resot of the nsIRDFObserver methods; update implemetors, users. r=bienvenu,rjc,dmose,slamm
git-svn-id: svn://10.0.0.236/trunk@75742 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 00:22:36 +00:00
mscott%netscape.com
6dacfce7ce Bug #47853, 47901, 47835, 47324, 47811 --> back out caching of smtp capabilities...this breaks the smtp protocol
which requires an EHLO or HELO to always be issued. Fix case for HELO response.
r=bienvenu


git-svn-id: svn://10.0.0.236/trunk@75741 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 00:22:34 +00:00
valeski%netscape.com
9d6dbf3718 47881, r=dougt. removing extraneous static link of dbm lib, and fixing the file cache so it does the static link
git-svn-id: svn://10.0.0.236/trunk@75740 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 00:20:23 +00:00
valeski%netscape.com
0745e1f74e 47881, r=dougt. removing extraneous static link of dbm lib
git-svn-id: svn://10.0.0.236/trunk@75739 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 00:19:37 +00:00
scc%mozilla.org
f09ffefddb not part of the build; initial work on multi-fragment strings
git-svn-id: svn://10.0.0.236/trunk@75738 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 00:14:35 +00:00
scc%mozilla.org
ac6dc5a34a not part of the build yet; initial work on multi-fragment strings
git-svn-id: svn://10.0.0.236/trunk@75737 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-08 00:14:14 +00:00
mscott%netscape.com
3aeaebe2d7 Bug #39910 --> make the context menu come up for both right and left mouse clicks for email addresses.
r=alecf


git-svn-id: svn://10.0.0.236/trunk@75736 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 23:59:25 +00:00
tor%cs.brown.edu
b90ca90f50 Bustage fix - add xpcompat.h to the export list.
git-svn-id: svn://10.0.0.236/trunk@75735 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 23:10:48 +00:00
tara%tequilarista.org
26fe07c589 Fixing bug #46897
git-svn-id: svn://10.0.0.236/trunk@75734 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 22:59:55 +00:00
syd%netscape.com
9c8d08cbc0 Undid the rdf changes for 43091 at request of brendan, now doing evil 0666
default permissions. r=dougt


git-svn-id: svn://10.0.0.236/trunk@75733 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 22:59:40 +00:00
pchen%netscape.com
37f100b8ac Checkin for pnunn on Mac, remove dllcompat.cpp from projects
git-svn-id: svn://10.0.0.236/trunk@75732 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 22:59:02 +00:00
pnunn%netscape.com
0c5568e325 bug#41040: cruft removal.
git-svn-id: svn://10.0.0.236/trunk@75731 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 22:16:30 +00:00
av%netscape.com
cb9f96e62b Fixing 39534, patch by sean, r=av
git-svn-id: svn://10.0.0.236/trunk@75730 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 22:10:07 +00:00
av%netscape.com
08395413fb Fixing 47360, patch by sean@beatnik.com, r=av
git-svn-id: svn://10.0.0.236/trunk@75729 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 21:51:19 +00:00
mkaply%us.ibm.com
c043fe161a #47874
r=mkaply, a=brendan
Remove unused widget files


git-svn-id: svn://10.0.0.236/trunk@75728 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 21:40:45 +00:00
cmanske%netscape.com
2b7ffc8718 Added selectedIndex property to tree interface. Needed by spell checking in editor, b=47696, r=hyatt
git-svn-id: svn://10.0.0.236/trunk@75727 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 21:20:40 +00:00
anthonyd%netscape.com
81c7739c51 checkins for Hurricane
translation of all C++ functions to JS which included SaveDocument
which eventually will allow for the completeion of autosave
r: brade, anthonyd
a: waterson, cmanske


git-svn-id: svn://10.0.0.236/trunk@75726 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 21:12:18 +00:00
mkaply%us.ibm.com
0c3b99a0c1 #47874
r=mkaply, a=brendan
remove obsolete nsTooltip* files


git-svn-id: svn://10.0.0.236/trunk@75725 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 20:56:20 +00:00
despotdaemon%netscape.com
bc9e09caa3 Pseudo-automatic update of changes made by naving@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@75724 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 20:55:58 +00:00
dougt%netscape.com
5a21fded10 Adding GetPrompt() method to nsIDOMWindow.
r=vidur@netscape.com (47889)


git-svn-id: svn://10.0.0.236/trunk@75723 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 20:55:36 +00:00
mkaply%us.ibm.com
8fd0a462bd #47874
r=mkaply, a=brendan
nsFontServices is not used


git-svn-id: svn://10.0.0.236/trunk@75722 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 20:53:28 +00:00
mkaply%us.ibm.com
16d960dca7 #47874
r=mkaply, a=brendan
Bring nsToolkit up to par with the Windows code


git-svn-id: svn://10.0.0.236/trunk@75721 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 20:51:47 +00:00
dougt%netscape.com
fd79d626f7 adding pref for image cache size. (47656)
r=valeski@netscape.com


git-svn-id: svn://10.0.0.236/trunk@75720 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 20:51:30 +00:00
dougt%netscape.com
07084b32e8 1. remove extra monitors (47825)
2.  add method to determine if manager has been shutdown  (44680)
3.  Add nsCOMPtr to avoid leak  (44680, 43244)

r=valeski@netscape.com


git-svn-id: svn://10.0.0.236/trunk@75719 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 20:50:25 +00:00
mkaply%us.ibm.com
31b9f51c41 #47874
r=mkaply, a=brendan
Bring nsLookAndFeel up to par with the Windows code


git-svn-id: svn://10.0.0.236/trunk@75718 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 20:48:09 +00:00
mkaply%us.ibm.com
b6742b6ecd #47874
r=mkaply, a=brendan
Bring nsSound up to par with the Windows code


git-svn-id: svn://10.0.0.236/trunk@75717 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 20:47:05 +00:00
leaf%mozilla.org
f6fb873856 Automated update
git-svn-id: svn://10.0.0.236/trunk@75716 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 19:00:10 +00:00
cyeh%bluemartini.com
e040a221dd fix for bug 42089: change wording of link from "create new bug" to
"report new bug". r=timeless@bemail.org, cyeh@bluemartini.com,
patch submitted by zach@zachlipton.com


git-svn-id: svn://10.0.0.236/trunk@75715 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 17:53:36 +00:00
pp%ludusdesign.com
5a2631a375 Adding the original contributor of this code to the Contributors list
of these files, to his request. No actual code change, only comments,
so no review.


git-svn-id: svn://10.0.0.236/trunk@75714 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 17:48:22 +00:00
despotdaemon%netscape.com
ed9fa2baed Pseudo-automatic update of changes made by dr@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@75711 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 16:36:12 +00:00
rhp%netscape.com
cbb3b11044 Fix for printing window being on the screen - r: putterman
git-svn-id: svn://10.0.0.236/trunk@75710 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 14:07:40 +00:00
ben%netscape.com
18f9dc978d fixing broken field on nsIBrowserBoxObject. This was preventing some code migration to
js that was needed for navigator, as nsIBrowserInstance is somewhat flaky. r=hyatt


git-svn-id: svn://10.0.0.236/trunk@75709 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 07:55:40 +00:00
hyatt%netscape.com
e9440df88a Fix for 47635. r=ben
git-svn-id: svn://10.0.0.236/trunk@75708 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 07:55:10 +00:00
nisheeth%netscape.com
c325ebf214 r=jst. Fix for nsbeta2+ bug 18321. The back button was not getting enabled when the user clicked on a javascript url that caused a new page load in another frame. The problem was that the location object was setting the load type to "normal" for loads caused by calls to location.replace() and to "normalReplace" for loads caused by setting location.href. The correct behavior is to do the opposite.
git-svn-id: svn://10.0.0.236/trunk@75707 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 07:35:25 +00:00
bryner%uiuc.edu
6e636070d2 Removing more obsolete libpref stuff. Not part of build. r=alecf.
git-svn-id: svn://10.0.0.236/trunk@75706 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 07:31:48 +00:00
mozilla.BenB%bucksch.org
7bc0a1ecda 45565: Add pref "general.useragent.override" to customize UA-string. r=valeski, a=brendan
git-svn-id: svn://10.0.0.236/trunk@75705 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 07:17:30 +00:00
ben%netscape.com
7739ab8bd6 remove redundant wallet skin files and directory, nsbeta3+ 47217
git-svn-id: svn://10.0.0.236/trunk@75704 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 06:42:21 +00:00
alecf%netscape.com
9ed6b623c9 remove old file from the build
git-svn-id: svn://10.0.0.236/trunk@75703 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 06:37:17 +00:00
alecf%netscape.com
3e2a1c7845 remove sidebar-messenger.xul from the build (NOT PART OF BUILD)
git-svn-id: svn://10.0.0.236/trunk@75702 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 06:34:33 +00:00
ben%netscape.com
01f8b0c562 fix for nsbeta3+ bug 39948, Start Mozilla is disabled after creating a profile
git-svn-id: svn://10.0.0.236/trunk@75701 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 06:29:08 +00:00
bratell%lysator.liu.se
0f61387703 Fix for bug 46306, html-to-plaintext replies have > on blank lines. The fix was to strip ending new lines in the citer. r=akkana, a=waterson.
git-svn-id: svn://10.0.0.236/trunk@75700 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 06:05:27 +00:00
morse%netscape.com
7b12917a8b bug 47461, cookie expiration date is wrong on mac, r=valeski
git-svn-id: svn://10.0.0.236/trunk@75699 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 05:27:19 +00:00
dbaron%fas.harvard.edu
a0c7410ceb Fix potential leak. r=attinasi a=waterson
git-svn-id: svn://10.0.0.236/trunk@75698 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 03:06:22 +00:00
dbaron%fas.harvard.edu
74cf8b8464 Make nsDocument unroot script objects in the prolog and epilog correctly. Fix nsDocument::RemoveChild so it doesn't crash when removing the root element. Prevent nsDocument::ChildAt from incorrectly returning null when root is removed. Clean up nsDocument::RemoveChild and nsDocument::ReplaceChild a bit, including adding some notifications for prolog/epilog content. Make nsDocument::ReplaceChild return the correct thing (the old child, not the new one). r=vidur b=17390 (nsbeta3+), 46212
git-svn-id: svn://10.0.0.236/trunk@75697 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 03:03:55 +00:00
danm%netscape.com
dff51f2e92 addref return ptr in GetContentDocShell -- the real reason for bug 47491
git-svn-id: svn://10.0.0.236/trunk@75696 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 02:58:10 +00:00
dbaron%fas.harvard.edu
24d6381ac5 Remove element names from the list that no longer use nsIAnonymousContentCreator. r=hyatt a=waterson
Don't choke on notifications for children of document that aren't the root element.  r=vidur  b=17390 (nsbeta3+)


git-svn-id: svn://10.0.0.236/trunk@75695 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-07 02:51:35 +00:00
danm%netscape.com
70633a371d reverting the part of rev 1.198 that causes a 100% reproducible, impossible to miss crash every time a browser window is closed, and seems to do nothing else. bug 47491
git-svn-id: svn://10.0.0.236/trunk@75693 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 22:08:56 +00:00
bienvenu%netscape.com
e5c9f59867 fix stop of msg move/copy r=mscott 28129
git-svn-id: svn://10.0.0.236/trunk@75692 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 20:15:32 +00:00
tor%cs.brown.edu
b889085a75 Bug 47679 - clipping rewrite for nsImageGTK::DrawComposited.
r=blizzard, a=waterson


git-svn-id: svn://10.0.0.236/trunk@75691 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 19:36:46 +00:00
dbaron%fas.harvard.edu
f5c556e039 Correct the combobox GetFrameForPoint by checking for visibility and foreground layer in all cases. b=36676 r=rods a=waterson
git-svn-id: svn://10.0.0.236/trunk@75690 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 19:24:48 +00:00
dougt%netscape.com
ee1a9e1e43 DEBUGGING information for bug 46737.
git-svn-id: svn://10.0.0.236/trunk@75689 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 19:21:09 +00:00
dbaron%fas.harvard.edu
6921566580 Fix an inconsequential typo (MOZ_DECL_CTOR_COUNTER does nothing, now). r,a=waterson
git-svn-id: svn://10.0.0.236/trunk@75688 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 19:19:01 +00:00
dougt%netscape.com
469dc01bf8 This was checked into the branch, but not trunk:
Here are the checkin notes (revision 1.22.2.2)

r=jar.  Checkin on behalf of dougt.  Fix for nsbeta2+ bug 47010.
The lock icon was not displaying on some https sites.  With these
changes, it does.


git-svn-id: svn://10.0.0.236/trunk@75687 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 19:15:46 +00:00
dbaron%fas.harvard.edu
efae1fc625 Fix potential leak. r=pnunn a=waterson
git-svn-id: svn://10.0.0.236/trunk@75686 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 19:07:06 +00:00
dbaron%fas.harvard.edu
84a7454104 Fix nsBoxLayout leaks. r=hyatt a=waterson b=43450
git-svn-id: svn://10.0.0.236/trunk@75685 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 19:05:50 +00:00
dbaron%fas.harvard.edu
991f6bf201 Remove some old stuff left from nsIAnonymousContentCreator before these were converted to XBL. r=hyatt a=waterson
git-svn-id: svn://10.0.0.236/trunk@75684 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 18:49:29 +00:00
dbaron%fas.harvard.edu
f154a601c1 Fixing bustage. Stupid error...
git-svn-id: svn://10.0.0.236/trunk@75683 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 17:17:22 +00:00
dbaron%fas.harvard.edu
1d16bbcdf5 Fix crash on shutdown (or patch things up so they don't crash) by releasing memory pressure observers closer to the beginning of XPCOM shutdown. b=47791 r=waterson@netscape.com
git-svn-id: svn://10.0.0.236/trunk@75682 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 16:23:04 +00:00
bienvenu%netscape.com
9d1f6bf945 remove unneeded select before append to imap folders r=mscott 46501
git-svn-id: svn://10.0.0.236/trunk@75681 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 14:50:06 +00:00
bienvenu%netscape.com
cca296ae96 more work on drag drop move/copy handling 47195 r=mscott
git-svn-id: svn://10.0.0.236/trunk@75680 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 14:40:21 +00:00
hyatt%netscape.com
1c7e7c8d2c Adding XBL demos. Doesn't affect build.
git-svn-id: svn://10.0.0.236/trunk@75679 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 11:12:44 +00:00
hyatt%netscape.com
c3caf9df23 Adding XBL demos. Doesn't affect build.
git-svn-id: svn://10.0.0.236/trunk@75678 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 08:48:49 +00:00
hyatt%netscape.com
ddf548f5fc Adding XBL demos. Doesn't affect build.
git-svn-id: svn://10.0.0.236/trunk@75677 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 08:14:19 +00:00
hyatt%netscape.com
2a4082ff73 Fixes to make menus work right with XBL.
git-svn-id: svn://10.0.0.236/trunk@75676 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 08:11:05 +00:00
ben%netscape.com
e64d1e18ca polish (just tweaked the spacing between elements)
git-svn-id: svn://10.0.0.236/trunk@75675 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 08:05:07 +00:00
ben%netscape.com
7911a911d1 update jar packager file...
git-svn-id: svn://10.0.0.236/trunk@75674 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 07:20:39 +00:00
ben%netscape.com
6fadf10da0 remove redundant files
git-svn-id: svn://10.0.0.236/trunk@75673 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 07:20:16 +00:00
ben%netscape.com
662ed06402 clean up signon viewer dialog code for polish, r=hyatt
git-svn-id: svn://10.0.0.236/trunk@75672 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 07:18:10 +00:00
ben%netscape.com
0bbd25d5bd simplify Cookie Viewer code for polish, r=hyatt
git-svn-id: svn://10.0.0.236/trunk@75671 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 07:04:11 +00:00
dave%intrec.com
e1cf1a1b66 Fix for bug 47561. Thanks to tengel@fluid.com (Troy Engel) for catching
this one.


git-svn-id: svn://10.0.0.236/trunk@75670 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 05:42:30 +00:00
hyatt%netscape.com
87f101ee64 more of 42320. r=danm
git-svn-id: svn://10.0.0.236/trunk@75669 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 05:39:36 +00:00
pavlov%netscape.com
c2d33fbb7e removing (broken) x11-shm code. I have not found this code to provide any speedup, and since it is broken, I am removing
it.  bug 32736 r=bryner


git-svn-id: svn://10.0.0.236/trunk@75668 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 05:18:01 +00:00
pavlov%netscape.com
778d5576e8 removing (broken) x11-shm code. I have not found this code to provide any speedup, and since it is broken, I am removing it. bug 32736 r=bryner
git-svn-id: svn://10.0.0.236/trunk@75667 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 05:17:31 +00:00
hyatt%netscape.com
115936b807 Fix build bustage that's coming.
git-svn-id: svn://10.0.0.236/trunk@75666 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 05:03:36 +00:00
hyatt%netscape.com
c7410097cd Fix for 42320. r=danm
git-svn-id: svn://10.0.0.236/trunk@75665 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 04:57:55 +00:00
hyatt%netscape.com
b28cfa714e Plug leak in cache for XBL docs.
git-svn-id: svn://10.0.0.236/trunk@75664 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 04:57:24 +00:00
bryner%uiuc.edu
ac1aca0f6d Fixing bug 42294 - make mousewheel font size change always affect the
document (not the chrome).  r=saari.


git-svn-id: svn://10.0.0.236/trunk@75663 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 04:15:02 +00:00
bryner%uiuc.edu
79844edf19 Ben forgot to update the unix makefile when he checked in for bug
46613.  This fixes the symptom of mozilla not starting up after switching
to the classic skin.  r=bruce.


git-svn-id: svn://10.0.0.236/trunk@75662 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-06 03:43:04 +00:00
hyatt%netscape.com
0b28e4ad6d Fix for XBL portion of 46129
git-svn-id: svn://10.0.0.236/trunk@75661 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 22:33:29 +00:00
ftang%netscape.com
e3ffc046ba improve cjk detector by reduce the threshold and do no consider Big5 in the
statistic model .


git-svn-id: svn://10.0.0.236/trunk@75660 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 20:57:02 +00:00
hyatt%netscape.com
efb91e3b36 Put scrollbars back in tex tareas.
git-svn-id: svn://10.0.0.236/trunk@75659 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 20:48:22 +00:00
morse%netscape.com
affecfbf91 bug 47532, incorrect display in signon viewer, r=pnunn
git-svn-id: svn://10.0.0.236/trunk@75658 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 19:32:53 +00:00
svn%xmlterm.org
56d719d6d1 --NOT PART OF DEFAULT BUILD--
XMLterm changes only.
Added jar.mn (for future use)


git-svn-id: svn://10.0.0.236/trunk@75657 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 17:23:59 +00:00
svn%xmlterm.org
bb76a78ba1 --NOT PART OF DEFAULT BUILD--
XMLterm changes only.
Fixed "bug" in XMLTermCommands.js that was causing duplicate instances of XMLTerm shells.


git-svn-id: svn://10.0.0.236/trunk@75656 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 17:22:00 +00:00
svn%xmlterm.org
f8d58bd7ec --NOT PART OF DEFAULT BUILD--
XMLterm changes only.
Re-structured chrome directories.


git-svn-id: svn://10.0.0.236/trunk@75655 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 17:19:44 +00:00
bienvenu%netscape.com
22af04e6c2 add ability to create storage for folders on demand, e.g., templates and drafts, r=mscott 45146
git-svn-id: svn://10.0.0.236/trunk@75654 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 14:42:16 +00:00
bienvenu%netscape.com
9ba3058d49 add ability to create storage for folders on demand, e.g., templates and drafts, r=mscott 45146
git-svn-id: svn://10.0.0.236/trunk@75653 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 14:28:47 +00:00
dmose%mozilla.org
c38e672a63 one item completed; several important items moved up to the top of the list. a=r=(not built)
git-svn-id: svn://10.0.0.236/trunk@75652 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 08:46:57 +00:00
dmose%mozilla.org
f50bc0021f replace a few regular libc includes and function calls with their NSPR equivalents. a=r=(not built)
git-svn-id: svn://10.0.0.236/trunk@75651 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 08:45:11 +00:00
dmose%mozilla.org
d497056eea add a comment; a=r=(not built)
git-svn-id: svn://10.0.0.236/trunk@75650 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 08:43:51 +00:00
dmose%mozilla.org
5976794f0d get rid of unused static sNullTimeval. a=r=(not built)
git-svn-id: svn://10.0.0.236/trunk@75649 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 08:42:45 +00:00
scc%mozilla.org
ec704488bd also including "nsAWritableString.h" to satisfy speedracer
git-svn-id: svn://10.0.0.236/trunk@75648 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 08:32:18 +00:00
scc%mozilla.org
79d27e1b9f adding new files to the build to provide |ToNewCString|, |ToNewUnicode|, and |IsASCII| that work on |nsAReadable[C]String|s, as per Vidur's needs in converting the DOM.
git-svn-id: svn://10.0.0.236/trunk@75647 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 08:26:01 +00:00
scc%mozilla.org
fc3595e83f need |NS_COM| in the declarations too
git-svn-id: svn://10.0.0.236/trunk@75646 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 08:20:50 +00:00
scc%mozilla.org
8044c9fc61 adding new files to the build to provide |ToNewCString|, |ToNewUnicode|, and |IsASCII| that work on |nsAReadable[C]String|s, as per Vidur's needs in converting the DOM.
git-svn-id: svn://10.0.0.236/trunk@75645 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 07:50:28 +00:00
scc%mozilla.org
efe34a743d make sure the new functions are exported; still not in the build
git-svn-id: svn://10.0.0.236/trunk@75644 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 07:44:08 +00:00
pierre%netscape.com
892645b8c6 attempt to fix the SunOS build
git-svn-id: svn://10.0.0.236/trunk@75643 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 06:39:42 +00:00
dprice%netscape.com
9e1b32e935 make-jars.pl now properly cleans up any extra files and folders that it creates
git-svn-id: svn://10.0.0.236/trunk@75642 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 06:08:02 +00:00
pierre%netscape.com
db5d911ba9 42864 ('user-select:none' should make children non-selectable)
git-svn-id: svn://10.0.0.236/trunk@75641 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 04:41:33 +00:00
pierre%netscape.com
ccd95c3556 45754 ('hidden' borders should be treated as 'none')
git-svn-id: svn://10.0.0.236/trunk@75640 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 04:40:57 +00:00
pierre%netscape.com
01e1854745 40325 (subtracting dev2app in some cases)
git-svn-id: svn://10.0.0.236/trunk@75639 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 04:40:22 +00:00
pierre%netscape.com
6e8b05fbf3 9816 (Outlines should be disabled completely for FCS)
46562 ('display: run-in' disables whole declaration block)
45804 (In quirks mode, 0 in 'border' should set the width, not the color)
46547 (Background image not centered correctly)
Thanks to emk <VYV03354@nifty.ne.jp>


git-svn-id: svn://10.0.0.236/trunk@75638 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 04:40:03 +00:00
pierre%netscape.com
1dc88b3a49 46599 (nsCSSLoader should check for local file before passing FORCE_RELOAD)
git-svn-id: svn://10.0.0.236/trunk@75637 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 04:39:43 +00:00
pierre%netscape.com
43328ae9b9 6782 (UI for alternate and user stylesheets)
Thanks to Tim Hill <tim@prismelite.com>


git-svn-id: svn://10.0.0.236/trunk@75636 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 04:39:20 +00:00
pierre%netscape.com
47661c52c3 43420 (textarea inherits align="center" from parent td)
git-svn-id: svn://10.0.0.236/trunk@75635 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 04:37:57 +00:00
scc%mozilla.org
d1f2f5f430 added comments and made some changes suggested by reviewers; still not in the build
git-svn-id: svn://10.0.0.236/trunk@75634 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 04:25:49 +00:00
nelsonb%netscape.com
3b6ca9fa3d Platform independent performance enhancements to functions that multiply,
square, subtract, right shift, compare, mul_d_add_offset.  This lib's
Modular Exponentiation performance now compares favorably with most (not
all) other open source bignum libs on IRIX/R5000.  No assembler code is
presently being used.  Comparison on other platforms will now commence.


git-svn-id: svn://10.0.0.236/trunk@75633 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 03:37:46 +00:00
scc%mozilla.org
2bca44595d everything's in and working correctly (as far as my tests show), still not in the build, but that's what I'm about to change with my next set of checkins
git-svn-id: svn://10.0.0.236/trunk@75632 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 03:32:36 +00:00
anthonyd%netscape.com
949da90c17 moving editor prefs to editor directory
see bug# 36911
r: ben


git-svn-id: svn://10.0.0.236/trunk@75631 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 02:30:20 +00:00
anthonyd%netscape.com
493cb696b1 moving editor prefs to editor directory
see bug #36911
r: ben


git-svn-id: svn://10.0.0.236/trunk@75630 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 02:29:21 +00:00
anthonyd%netscape.com
fab5f0e8c6 moving editor prefs to editor directory
see bug # 36911
r: ben


git-svn-id: svn://10.0.0.236/trunk@75629 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 02:28:33 +00:00
anthonyd%netscape.com
60a8fb57b9 moving editor prefs into editor directory
see bug # 36911
r: ben


git-svn-id: svn://10.0.0.236/trunk@75628 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 02:24:55 +00:00
anthonyd%netscape.com
5328408867 updating jar packaging file thingy
moving editor prefs into editor directory
see bug# 36911
r: ben


git-svn-id: svn://10.0.0.236/trunk@75627 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 02:23:00 +00:00
anthonyd%netscape.com
e2defa80a4 moving editor prefs to editor directory
see bug# 36911
r: ben


git-svn-id: svn://10.0.0.236/trunk@75626 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 02:21:59 +00:00
scc%mozilla.org
ac22cf0d43 still not part of the build; I think everything's there, though. Some further testing and I'll add it to the build
git-svn-id: svn://10.0.0.236/trunk@75625 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 02:13:59 +00:00
morse%netscape.com
574ca98f39 bug 45219, submitted by Robert O'Callahan, r=morse
git-svn-id: svn://10.0.0.236/trunk@75624 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 01:57:43 +00:00
scc%mozilla.org
b4f3e207de still not part of the build; more work adding the new functions. More to come
git-svn-id: svn://10.0.0.236/trunk@75623 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 01:15:45 +00:00
despotdaemon%netscape.com
f37ae32bf4 Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@75622 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 01:04:16 +00:00
syd%netscape.com
36c6905dbc Add a couple of prlog messages. r=pavlov.
git-svn-id: svn://10.0.0.236/trunk@75621 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 00:59:08 +00:00
syd%netscape.com
de7f716024 Add some prlog support for debugging image usage, r=pavlov. Debug only.
git-svn-id: svn://10.0.0.236/trunk@75620 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 00:58:24 +00:00
scc%mozilla.org
6666966a06 These files are not yet part of the build; making global versions of |IsASCII|, |ToNewCString|, and |ToNewUnicode| that apply to readables, since we don't want them as member functions (where they were in |ns[C]String|). Vidur needs these to convert DOM interfaces over to readables.
git-svn-id: svn://10.0.0.236/trunk@75619 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 00:51:37 +00:00
cata%netscape.com
99abc99837 Fix for bug #37543, a=ftang, r=nhotta.
git-svn-id: svn://10.0.0.236/trunk@75618 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-05 00:07:03 +00:00
pierre%netscape.com
078c67b29e Bug 38445: Complete support of CSS2/3 cursors on Mac
git-svn-id: svn://10.0.0.236/trunk@75617 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 23:40:10 +00:00
pnunn%netscape.com
89ea537905 bug#474711: don't mess with channel load attributes. pnunn.
git-svn-id: svn://10.0.0.236/trunk@75616 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 23:37:41 +00:00
cata%netscape.com
c5c4b10703 Fix for bug #28983. a=ftang, r=nhotta.
git-svn-id: svn://10.0.0.236/trunk@75615 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 23:30:36 +00:00
dave%intrec.com
3e95147460 Removing a couple lines from the patch for bug 31336 that got left in by
accident.


git-svn-id: svn://10.0.0.236/trunk@75614 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 23:16:01 +00:00
despotdaemon%netscape.com
1f446ac625 Pseudo-automatic update of changes made by dr@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@75613 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 23:02:41 +00:00
bienvenu%netscape.com
dfbe05c370 fix cntrl drag drop r=putterman 47195
git-svn-id: svn://10.0.0.236/trunk@75612 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 22:53:53 +00:00
ducarroz%netscape.com
bb7e1f917d Fix for bug 46040. We need to dismiss the popup menu when the user press the tab key. R=mscott
Aso, I have incorporated a patch submitted by Matthew Cline (bug 42582)


git-svn-id: svn://10.0.0.236/trunk@75611 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 22:40:52 +00:00
ducarroz%netscape.com
dbe6386040 Fix for bug 47224. Remove QUote button and menu item. R=mscott
git-svn-id: svn://10.0.0.236/trunk@75610 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 22:24:50 +00:00
syd%netscape.com
00879e6faa Set sane permissions on files. Let umask protect the user. r=rjc,dougt
Partial fix for 43091.


git-svn-id: svn://10.0.0.236/trunk@75609 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 22:13:59 +00:00
syd%netscape.com
d0df16da36 Set sane directory permissions on creation. Partial fix for 43091. r=dougt
git-svn-id: svn://10.0.0.236/trunk@75608 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 22:13:10 +00:00
edburns%acm.org
0b79e56e49 a=edburns
author=Oleg Khokhlov
r=edburns
bug=47026


git-svn-id: svn://10.0.0.236/trunk@75607 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 21:46:10 +00:00
shanjian%netscape.com
309c493895 #14022 IME98 Reconversion does not work in HTML Editor
r = jfrancis
a = ftang
fix proposed by m_kato@ga2.so-net.ne.jp

New events are added to support reconversion. As a result, many files
are affected. They are:
editor:
  nsEditor.h nsEditor.cpp nsEditorEventListeners.cpp nsEditorEventListeners.h
  nsHTMLEditor.h nsHTMLEditor.cpp nsIEditorIMESupport.h
dom and layout:
  nsIPrivateCompositionEvent.h nsDOMEvent.h nsDOMEvnet.cpp nsEventListenerManager.cpp
  nsIDOMCompositionListener.h
widget:
  nsGUIEvent.h nsWindow.h nsWindow.cpp


git-svn-id: svn://10.0.0.236/trunk@75606 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 21:43:29 +00:00
ducarroz%netscape.com
4274b76e4b Fix for bug 47250. As we cannot have more than one keyset per window, we need to define key outside the keyset tag in the overlay. That let other window that includes the overlay defines their own keyset and eventually includes some of the keys defined in the overlay. R=cmanske
git-svn-id: svn://10.0.0.236/trunk@75605 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 21:37:00 +00:00
ducarroz%netscape.com
505db84772 Fix for bug 47250. As we cannot have more than one keyset per window, we need to define key outside the keyset tag in the overlay. That let other window that includes the overlay defines their own keyset and eventually includes some of the keys defined in the overlay. R=cmanske
git-svn-id: svn://10.0.0.236/trunk@75604 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 21:35:32 +00:00
nbhatla%netscape.com
33f2a3f0a0 #46519 -> Mac Classic Skin Polish. Adds a new class, "plain-extended", so that Mac Classic can have square buttons with the proper rollover behavior built in.
git-svn-id: svn://10.0.0.236/trunk@75603 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 21:23:33 +00:00
rogerl%netscape.com
675a4909ec Added 'static' to global object routines.
git-svn-id: svn://10.0.0.236/trunk@75601 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 20:54:24 +00:00
brade%netscape.com
6ab4e4c364 fix src/dest d&d (do move if in same doc unless modifier key is pressed); bug #45607; r=kin
git-svn-id: svn://10.0.0.236/trunk@75600 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 20:51:33 +00:00
brade%netscape.com
62a1a50415 remove extra '"' character discovered in UI review
git-svn-id: svn://10.0.0.236/trunk@75599 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 20:47:40 +00:00
attinasi%netscape.com
ad73ad64b4 Part of fix to allow background on BODY element to be inherited. b=47127 r=pierre
git-svn-id: svn://10.0.0.236/trunk@75598 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 20:44:08 +00:00
blizzard%redhat.com
18e020c6e2 fix for bug #26509. in nsIWidget::Show() try to grab if the last grab attempt wasn't successful since in unix the window has to be visible to complete a grab. context menus shouldn't travel to seperate desktops now. r=pavlov, a=waterson
git-svn-id: svn://10.0.0.236/trunk@75597 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 20:42:11 +00:00
akkana%netscape.com
015402bf44 Comment out annoying debugging statements. r=sfraser
git-svn-id: svn://10.0.0.236/trunk@75596 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 20:39:53 +00:00
rogerl%netscape.com
3e8715b85d Oops. Left icode output on by default, now off.
git-svn-id: svn://10.0.0.236/trunk@75595 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 20:37:42 +00:00
rogerl%netscape.com
609feb88b0 Prototype munging for built-in global properties, implemented Function
object & Boolean object.


git-svn-id: svn://10.0.0.236/trunk@75594 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 20:28:35 +00:00
dprice%netscape.com
5c6168c2e7 adding recursive delete function
git-svn-id: svn://10.0.0.236/trunk@75593 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 20:25:42 +00:00
nelsonb%netscape.com
95e246df1c Minor performance tweaks.
git-svn-id: svn://10.0.0.236/trunk@75592 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 19:58:20 +00:00
nelsonb%netscape.com
a09176abf2 Add new signed mp_word type, mp_sword. Used to get arithmetic right
shifts when doing subtraction.


git-svn-id: svn://10.0.0.236/trunk@75591 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 19:57:24 +00:00
varada%netscape.com
28c3bd6e13 fix for bug#47328 - not able to launch customized netscape;caused by all-ns.js using properties files for the values- changed ib.cpp and script.ib to reflect that
git-svn-id: svn://10.0.0.236/trunk@75590 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 18:09:21 +00:00
dimator%netscape.com
24dec09e8d Fix for 25984. Adding sort direction indicators to thread pane column headers. r=putterman
git-svn-id: svn://10.0.0.236/trunk@75589 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 17:37:29 +00:00
danm%netscape.com
6255a55a42 use explicit on-screen widget placement constraints when restoring window positions from persistent storage. bug 31516 r=saari@netscape.com
git-svn-id: svn://10.0.0.236/trunk@75588 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 14:52:44 +00:00
danm%netscape.com
051accf240 (empty) implementations of new nsIWidget method ConstrainPosition. bug 31516 r=saari@netscape.com
git-svn-id: svn://10.0.0.236/trunk@75587 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 14:49:36 +00:00
danm%netscape.com
2c3b51f21e implement new method ConstrainPosition. bug 31516 r=saari@netscape.com
git-svn-id: svn://10.0.0.236/trunk@75586 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 14:48:33 +00:00
danm%netscape.com
e806f00627 new method ConstrainPosition provides implementation-dependent on-screen check for top-level windows. bug 31516 r=saari@netscape.com
git-svn-id: svn://10.0.0.236/trunk@75585 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 14:47:46 +00:00
dcone%netscape.com
786e362567 took ViewManager.cpp out of build. b=42845 r=kmcclusk.
git-svn-id: svn://10.0.0.236/trunk@75584 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 13:55:36 +00:00
rods%netscape.com
be2c89358c removed content-box from radio and checkboxes and set their sizes appropriately
set the background-color for the select arrow button "buttonface" partial fix to Bug 43371
b=32102 r=kmcclusk


git-svn-id: svn://10.0.0.236/trunk@75583 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 13:01:15 +00:00
rods%netscape.com
e8c4114f94 Setting up some special NavQuirks rules for input type=text
part of the checkin for 44656 making the NavQuirks font moz-fixed
b=25580 r=kmcclusk


git-svn-id: svn://10.0.0.236/trunk@75582 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 12:49:16 +00:00
brade%netscape.com
5070ddccdf fix menu and tooltip strings per UI meeting and verah (bug #47509)
git-svn-id: svn://10.0.0.236/trunk@75581 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 10:50:41 +00:00
brade%netscape.com
43668f9f3b remove font dropdown list from toolbar per Composer UI review (bug #47506)
git-svn-id: svn://10.0.0.236/trunk@75580 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 10:50:05 +00:00
brade%netscape.com
bc66503877 add meta="false"
git-svn-id: svn://10.0.0.236/trunk@75579 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 10:30:33 +00:00
brade%netscape.com
dab607b76d remove reference to View | Paragraph Marks since the Composer team has decided not to support/fix it for 6.0 (bug #47525); per Composer UI review team
git-svn-id: svn://10.0.0.236/trunk@75578 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 10:27:44 +00:00
brade%netscape.com
80e74d5cad add keybinding for fixed width font, add shift="false" to increase/decrease indent, new string for Insert | HTML..., remove Insert | Break and Insert | Break below Images (#47523), move Revert to after SaveAsCharset (#47211), remove Edit | HTML Source (#47523), remove View | Paragrah Marks, new string/accesskey added for Insert | HTML..., remove separator, Break and BreakBelowImages from Insert menu (#47523), comment out Format | Background Color since it will be moving soon, renumber Format menu, move Align after decrease indent (all per UI review)
git-svn-id: svn://10.0.0.236/trunk@75577 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 10:25:07 +00:00
brade%netscape.com
fff9c46875 fix menu and tooltip strings per UI meeting and verah (bug #47509); add shortcut keybinding for fixed width font
git-svn-id: svn://10.0.0.236/trunk@75576 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 10:25:00 +00:00
brade%netscape.com
4bb371ccf8 remove unnecessary include of nsContextMenu.js (bug #43239) and remove viewParagraphMarks menu item per UI review meeting (bug #47525)
git-svn-id: svn://10.0.0.236/trunk@75575 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 10:12:28 +00:00
brade%netscape.com
c640ba1cdd removed unnecessary references to nsContextMenu.js (bug #43239)
git-svn-id: svn://10.0.0.236/trunk@75574 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 10:10:47 +00:00
hyatt%netscape.com
b364cb52f1 Working on 42320.
git-svn-id: svn://10.0.0.236/trunk@75573 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 08:45:29 +00:00
cls%seawood.org
2d670205ca Dump bloat & leak stats if NS_BUILD_REFCNT_LOGGING is set. Needed for bloat stats of optimized builds.
git-svn-id: svn://10.0.0.236/trunk@75572 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 06:59:18 +00:00
jst%netscape.com
4407fd3225 Checking in for Vidur (merging from SeaMonkey_M17_BRANCH). Fixing nsbeta2+ bug 9392, removing code that was hiding the correct native code for document.plugins. r=jst@netscape.com, a=nisheeth@netscape.com
git-svn-id: svn://10.0.0.236/trunk@75571 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 06:55:53 +00:00
pavlov%netscape.com
3f19f00c3d removing an ifdef DEBUG_pavlov printoutlotsofstuff line
git-svn-id: svn://10.0.0.236/trunk@75569 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 06:02:42 +00:00
risto%netscape.com
60b136be9a Just added a newline for test purposes
git-svn-id: svn://10.0.0.236/trunk@75568 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 04:49:05 +00:00
endico%mozilla.org
7d5671b96f deleted a blank line just to test whether cvs and bonsai are working
git-svn-id: svn://10.0.0.236/trunk@75567 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-04 04:13:39 +00:00
dmose%mozilla.org
beef116e47 All currently known ChoadWarrior warnings in the LDAP code have been fixed. Another item removed from the TODO list. a=r=(not built)
git-svn-id: svn://10.0.0.236/trunk@75566 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 23:57:58 +00:00
dmose%mozilla.org
6cb3b03749 Removed trailing semicolons after NS_DECL stuff to keep ChoadWarrior from whining. a=r=(not built)
git-svn-id: svn://10.0.0.236/trunk@75565 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 23:55:12 +00:00
pollmann%netscape.com
88223f90eb Bug 3326: ISINDEX frame; r=kmcclusk
git-svn-id: svn://10.0.0.236/trunk@75563 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 23:45:50 +00:00
alecf%netscape.com
63118d9d2f fix for #46712 and #46491
r=warren
- remove chrome dependancy from string bundles, finally (yay)
- flush the string bundle cache according to the memory pressure observer
- expose flushing in the nsIStringBundle API so that chrome can flush it


git-svn-id: svn://10.0.0.236/trunk@75562 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 23:43:10 +00:00
rhp%netscape.com
a198ebbdca Fix for old code shadowing variables - Bug #: 64922 - r: bienvenu
git-svn-id: svn://10.0.0.236/trunk@75561 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 23:41:08 +00:00
rhp%netscape.com
6d33d62c09 Fixes for progress in absync - Bug #: 1787 - r: bienvenu
git-svn-id: svn://10.0.0.236/trunk@75560 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 23:40:51 +00:00
pollmann%netscape.com
3e47a7f9ad Bug 40533: browser crashes when submit nothing with event on file upload; r=kmcclusk
git-svn-id: svn://10.0.0.236/trunk@75559 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 23:39:33 +00:00
nbhatla%netscape.com
b6f7c7de1a Bug #46519 -> Mac Classic Skin Polish fixes. Removed parallel line images from toolbars, etc., I had added yesterday.
git-svn-id: svn://10.0.0.236/trunk@75558 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 23:36:37 +00:00
pollmann%netscape.com
7db58c7c36 Bug 42662: Values of disabled form elements should not be submitted; r=kmcclusk
git-svn-id: svn://10.0.0.236/trunk@75557 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 23:32:02 +00:00
bryner%uiuc.edu
2b0d3efc1d Fixing 42056 - get rid of nonfunctional history list in linux
filepicker.  r=pavlov.


git-svn-id: svn://10.0.0.236/trunk@75556 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 23:31:49 +00:00
slamm%netscape.com
f2da23cf45 Take 'Mail Folders' or 'Addressbooks' title out of a splitter. It is not needed and messes up the pointer (turns into an arrow for dragging). Allow add a high flex number to the tree. This fixes the persistence for the sidebar height. Bug 26259. r=mcafee
git-svn-id: svn://10.0.0.236/trunk@75555 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 23:29:25 +00:00
slamm%netscape.com
f453ae5f12 Mini-hack for splitter/grippy behavior on sidebarheader. The grippy code must look for a 'splitter' tag because the 'sidebarheader' does not work even though it is derived from a splitter. bug 26259. r=mcafee
git-svn-id: svn://10.0.0.236/trunk@75554 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 23:29:20 +00:00
slamm%netscape.com
edb98d1f1a Images for 'My Sidebar' title grippy. Bug 26259 r=mcafee
git-svn-id: svn://10.0.0.236/trunk@75553 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 23:29:17 +00:00
slamm%netscape.com
c9b08426a2 New styles for 'My Sidebar' title grippy. Bug 26259 r=mcafee
git-svn-id: svn://10.0.0.236/trunk@75552 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 23:28:22 +00:00
slamm%netscape.com
e131978b75 Add grippy to sidebarheader. bug 26259. r=mcafee
git-svn-id: svn://10.0.0.236/trunk@75551 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 23:25:43 +00:00
slamm%netscape.com
e3773008d1 Add horizontal grippy images. bug 26259. r=mcafee
git-svn-id: svn://10.0.0.236/trunk@75550 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 23:25:35 +00:00
hyatt%netscape.com
b61e7de349 Fix for 17470.
git-svn-id: svn://10.0.0.236/trunk@75549 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 23:21:23 +00:00
mcafee%netscape.com
963bb55a42 Removing dead pref-imageblocking.{xul,dtd} (40888). r=slamm, morse.
git-svn-id: svn://10.0.0.236/trunk@75548 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 23:20:01 +00:00
morse%netscape.com
1063d13178 bug 44514, speed up loading of wallet tables, r=dbragg
git-svn-id: svn://10.0.0.236/trunk@75547 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 23:19:32 +00:00
pollmann%netscape.com
591cd3bd14 Bug 42616: form actions with anchor specified (#) do not work; r=kmcclusk
git-svn-id: svn://10.0.0.236/trunk@75546 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 23:03:58 +00:00
shanjian%netscape.com
3a788283fa #14588 Ctrl+right arrow skips over nbsp (nbsp should be word break)
r = ftang a=ftang
changes made in word break and word jump.


git-svn-id: svn://10.0.0.236/trunk@75545 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 23:03:08 +00:00
BlakeR1234%aol.com
f442cb2995 Remove hover effects for HTML buttons (38427). r=me (simple commenting change), a=ekrock.
git-svn-id: svn://10.0.0.236/trunk@75544 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:58:06 +00:00
sgehani%netscape.com
95c966af04 Fix indexing during IDI generation. [nsbeta3+ bugscape b=1740; r=dbragg]
git-svn-id: svn://10.0.0.236/trunk@75543 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:49:30 +00:00
dmose%mozilla.org
5bd2a72847 added one item, dropped one item, completed one item. a=r=(not built)
git-svn-id: svn://10.0.0.236/trunk@75542 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:48:08 +00:00
pinkerton%netscape.com
c951c080a5 Damn, forgot to check this in too
git-svn-id: svn://10.0.0.236/trunk@75541 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:48:07 +00:00
dmose%mozilla.org
910a966147 get rid of C-style casts. a=r=(not built)
git-svn-id: svn://10.0.0.236/trunk@75540 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:47:11 +00:00
dmose%mozilla.org
054fa6446d add XXX cleanup reminder comment. a=r=(not built)
git-svn-id: svn://10.0.0.236/trunk@75539 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:46:42 +00:00
dmose%mozilla.org
2766e71f0f remove NS_ERROR_LDAP_SUCCESS, as non-NS_OK success codes are considered bad form, and this one wasn't even used yet. a=r=(not built)
git-svn-id: svn://10.0.0.236/trunk@75538 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:45:43 +00:00
dmose%mozilla.org
985a0b5df5 add XXX comment to remind about future cleanup. a=r=(not built)
git-svn-id: svn://10.0.0.236/trunk@75537 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:43:43 +00:00
hyatt%netscape.com
7517933b86 Fix for 42451.
git-svn-id: svn://10.0.0.236/trunk@75536 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:42:36 +00:00
ashuk%eng.sun.com
a2522e3fb6 Minor change to get Webclient to compile on Solaris
author=ashuk

cvs diff dom_util.h (in directory D:\M16\mozilla\java\webclient\src_moz\)
Index: dom_util.h
===================================================================
RCS file: /cvsroot/mozilla/java/webclient/src_moz/dom_util.h,v
retrieving revision 1.1
diff -r1.1 dom_util.h
28a29
> #include "nsIDOMDocument.h"

*****CVS exited normally with code 1*****


git-svn-id: svn://10.0.0.236/trunk@75535 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:35:14 +00:00
pollmann%netscape.com
f8b1d4c014 Bug 45540: Badly nested form + focus input -> input not a submitter; r=kmcclusk
git-svn-id: svn://10.0.0.236/trunk@75534 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:32:54 +00:00
ducarroz%netscape.com
179ab2ace8 Fix for bug 46678. We need to ignore onInput event right after somebody set the value of the textfield else autocomplete will start. R=radha
git-svn-id: svn://10.0.0.236/trunk@75533 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:31:28 +00:00
anthonyd%netscape.com
d503a47c59 nsPresContext.cpp : added to comment to presContext::GetLookAndFeel to inform others that
that method has been depricated.
nsTextFrame.cpp : changed an assert to a warning, didnt need to be an assert.
r: mjudge@netscape.com


git-svn-id: svn://10.0.0.236/trunk@75532 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:30:47 +00:00
ducarroz%netscape.com
4f634fec92 Fix for bug 47362. Add tooltip on attachment. R=mscott
git-svn-id: svn://10.0.0.236/trunk@75531 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:28:17 +00:00
pollmann%netscape.com
d358511c25 Bug 40383: Treat frameset rows spec 0* as 1* in quirks mode; r=harishd
git-svn-id: svn://10.0.0.236/trunk@75530 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:26:56 +00:00
pinkerton%netscape.com
190e0ada1c oops, forgot to check this in.
git-svn-id: svn://10.0.0.236/trunk@75529 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:25:23 +00:00
pollmann%netscape.com
e5357b4864 Bug 35986: document==NULL for FRAMEs created without SRC; r=kmcclusk
git-svn-id: svn://10.0.0.236/trunk@75528 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:23:48 +00:00
pollmann%netscape.com
ac0908f872 Bug 40394: Strip only one leading LF if there is one; r=harishd
git-svn-id: svn://10.0.0.236/trunk@75527 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:19:43 +00:00
mscott%netscape.com
6346d8dd30 Landing branch fix to the trunk. bug #47248 --> Implement MoveTo for Unix.
git-svn-id: svn://10.0.0.236/trunk@75526 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:17:43 +00:00
pollmann%netscape.com
f0c8471679 Bug 26945: Image input onclick fires but doesn't allow cancel via return false; r=harishd
git-svn-id: svn://10.0.0.236/trunk@75524 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:17:14 +00:00
BlakeR1234%aol.com
f8929164c8 Fix bug 47481, all menus have autoscrollers (caused by ben's classic skin changes last night). simple fix. r=me, a=pink
git-svn-id: svn://10.0.0.236/trunk@75523 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:15:09 +00:00
mscott%netscape.com
4e206cca95 landing branch fix to trunk. Bug #47248 ---> Fix GetParent such that if appendedPath is an empy string we treat it the same as if it were null and create a dummy path.
r=dougt


git-svn-id: svn://10.0.0.236/trunk@75522 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:13:34 +00:00
pollmann%netscape.com
c6beecf00a Bug 34418: image input can't be submitted by space or enter; r=harishd
git-svn-id: svn://10.0.0.236/trunk@75521 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:11:57 +00:00
mcafee%netscape.com
8cd4c5c87d about: page needs to be HTML 4.0 (39231). patch=gemal, r=mcafee
git-svn-id: svn://10.0.0.236/trunk@75520 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:11:21 +00:00
bryner%uiuc.edu
61ba79db7b Fixing bug 47536 - column hiding is broken. r=hyatt.
git-svn-id: svn://10.0.0.236/trunk@75519 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:09:57 +00:00
pinkerton%netscape.com
98dee5f779 part of fix for 46001, support |collapsed| attribute in addition to |hidden| to hide mac menus.
git-svn-id: svn://10.0.0.236/trunk@75518 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:09:00 +00:00
blizzard%redhat.com
d64971e8ac fix for bug #42401. only add a queue that is native to the event queue list that is processed by the main UI event loop. this should fix no painting on linux when the imap password dialog comes up. r=danm, bryner, mscott a=vidur
git-svn-id: svn://10.0.0.236/trunk@75517 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:08:29 +00:00
pinkerton%netscape.com
9ba2a8e9f2 patch from dean_tessman@hotmail.com for 32685. Check if item is disabled before allowing key navigation into submenus.
git-svn-id: svn://10.0.0.236/trunk@75516 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:07:49 +00:00
ftang%netscape.com
e72957f677 fix bug 46684 r=nhotta a=ftang convert unicode to file system charset
git-svn-id: svn://10.0.0.236/trunk@75515 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:07:14 +00:00
pinkerton%netscape.com
d8ee1444e0 Actually set the modifier keys before dispatching d&d event into gecko. r=bienvenu, bug#47195
git-svn-id: svn://10.0.0.236/trunk@75514 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:06:10 +00:00
pollmann%netscape.com
7f1111f79f Bug 40412: image inputs should send x and y not .x and .y if no name; r=harishd
git-svn-id: svn://10.0.0.236/trunk@75513 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:05:44 +00:00
blizzard%redhat.com
b432316444 fix makefile to work with objdir r=dougt a=waterson
git-svn-id: svn://10.0.0.236/trunk@75512 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:05:31 +00:00
pinkerton%netscape.com
60666b3047 Fix for 47413, better impl of ResolveShortcut() thanks to sean@beatnik.com a=waterson
git-svn-id: svn://10.0.0.236/trunk@75511 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:05:09 +00:00
hyatt%netscape.com
4d615c76d5 Fix for 46862 and 47346. r=pink
git-svn-id: svn://10.0.0.236/trunk@75510 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:05:07 +00:00
valeski%netscape.com
ffe961ce34 r=dp. removing extraneous junk
git-svn-id: svn://10.0.0.236/trunk@75509 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:04:28 +00:00
valeski%netscape.com
05ef997c3f getting cookie service to startup in conjunction with the http category.
git-svn-id: svn://10.0.0.236/trunk@75508 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:03:34 +00:00
pollmann%netscape.com
6ca99ffa40 7913 Dynamic changing of ROWS and COLS for framesets; r=kmcclusk
git-svn-id: svn://10.0.0.236/trunk@75507 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 22:02:50 +00:00
hyatt%netscape.com
2b75bd07ae I'm told backing this out resolves smoketest issues, so here it comes. r=attinasi
git-svn-id: svn://10.0.0.236/trunk@75505 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 21:40:39 +00:00
edburns%acm.org
af2702d036 bug=47357
a=edburns
r=ashuk

This change creates a new directory, java/webclient/src_share, that
contains the code that will be used in both src_moz and src_ie, and any
other native browser wrapping implementations.

Here are the steps I followed to implement this change.

1. Create a new directory java/webclient/src_share

2. Move all jni_util*.* files from src_moz into src_share

3. Make it so src_share compiles into a new .lib

   src_share has no netscape dependencies.  Any functionality that
   depended on ns dependencies was kept in src_moz.  In this case, we
   have a function prototype only in src_share, with the implementation
   in src_moz.  We did this for nsHashtable.  The other trick was for
   things in WebShellInitContext that had nothing to do with Netscape.
   This case was accomodated by creating a new struct, ShareInitContext,
   that contains all WebShellInitContext members that have nothing to do
   with Netscape.  Currently this is just jobject propertiesClass.  I
   modified the WebShellInitContext struct to contain a ShareContext
   struct as its last member.  There are two new methods in jni_util.h
   that allow for the initialization and deallocation of the members of
   the ShareContext struct.

4. Make it so src_moz uses the new .lib to provide the jni_util behavior

  a. Create ns_util* files that include ../src_share/jni_util* files
  appropriately.

  The only tricky part was for things in jni_util.h that

Here's the list of files in this change.

cvs -z3 -n update (in directory D:\Projects\mozilla\java\webclient)
cvs server: Updating .
M Makefile.win // added src_share to DIRS
M src_moz/BookmarksImpl.cpp             // include ns_util instead of jni_util
M src_moz/CBrowserContainer.cpp         // include ns_util instead of jni_util
M src_moz/CBrowserContainer.h           // include ns_util instead of jni_util
M src_moz/CurrentPageImpl.cpp           // include ns_util instead of jni_util
M src_moz/HistoryImpl.cpp               // include ns_util instead of jni_util
M src_moz/Makefile.win                  // include ns_util instead of jni_util
M src_moz/NativeEventThread.cpp         // include ns_util instead of jni_util
M src_moz/NavigationImpl.cpp            // include ns_util instead of jni_util
M src_moz/RDFEnumeration.cpp            // include ns_util instead of jni_util
M src_moz/RDFTreeNode.cpp               // include ns_util instead of jni_util
M src_moz/WindowControlImpl.cpp         // include ns_util instead of jni_util
                                        // also use new util_InitShareContext
                                        // function
M src_moz/WrapperFactoryImpl.cpp        // include ns_util instead of jni_util
R src_moz/jni_util.cpp                  // moved to ../src_share
R src_moz/jni_util.h                    // moved to ../src_share
R src_moz/jni_util_export.cpp           // moved to ../src_share
R src_moz/jni_util_export.h             // moved to ../src_share
M src_moz/nsActions.cpp                 // include ns_util instead of jni_util
                                        // also use new
util_DeallocateShareContext
M src_moz/nsActions.h                   // include ns_util instead of jni_util
A src_moz/ns_util.cpp                   // include jni_util.h
A src_moz/ns_util.h                     // include jni_util.h, changes to
                                        // WebshellInitContext struct
A src_moz/ns_util_export.cpp            // provide impls for methods in
                                        // jni_util_export.h

A src_share/Makefile.win
A src_share/bal_util.cpp
A src_share/bal_util.h
A src_share/jni_util.cpp
A src_share/jni_util.h
A src_share/jni_util_export.cpp
A src_share/jni_util_export.h

*****CVS exited normally with code 0*****


git-svn-id: svn://10.0.0.236/trunk@75504 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 21:32:54 +00:00
dprice%netscape.com
7e5be17e07 removes copied files. Doesn't remove created directories yet.
git-svn-id: svn://10.0.0.236/trunk@75503 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 20:58:31 +00:00
ducarroz%netscape.com
673a0e90e3 Fix for bug 47497 (tree blocker). We should not pass rv to the call do_queryInterface in this case because failure here doesn't mean that the whole function failed. R=bienvenu
git-svn-id: svn://10.0.0.236/trunk@75502 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 20:50:00 +00:00
kzhou%netscape.com
e54841f4dc bug #46136. r:valeski, a:leaf. Reset mIP6vChecked as PR_FASLE to prevent browser
from hunging for ftp protocol


git-svn-id: svn://10.0.0.236/trunk@75501 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 20:05:22 +00:00
ducarroz%netscape.com
ce8553e8e4 Fix for tree blocker bug 47391. Do not try to update menu that doesn't exist. R=bienvenu,alecf
git-svn-id: svn://10.0.0.236/trunk@75500 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 19:58:10 +00:00
cotter%netscape.com
e6e1303445 Corrected date at top.
git-svn-id: svn://10.0.0.236/trunk@75499 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 17:24:43 +00:00
cotter%netscape.com
4158b80ece Updated platforms supported (deleted Solaris 2.5.1).
git-svn-id: svn://10.0.0.236/trunk@75498 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 17:23:45 +00:00
blizzard%redhat.com
5144480c38 documentation change only
git-svn-id: svn://10.0.0.236/trunk@75497 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 15:02:42 +00:00
bienvenu%netscape.com
74bcf1aa68 fix 47445 restore default pref for threading by subject without re
git-svn-id: svn://10.0.0.236/trunk@75495 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 14:15:27 +00:00
rods%netscape.com
46e78ab3ba 40000 - right-click events don't go through listboxes (onmoused
44454 - Can't drag-scroll/-select in single-select HTML listbox
42301 - select generates onchange when it shouldn't
33421 - <optgroup> in <select> breaks scrolling drop down lists
14771 - GFX list/combo box doesn't respond to keyboard input
b=40000, 44454, 42301, 33421, 14771 r=kmcclusk


git-svn-id: svn://10.0.0.236/trunk@75494 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 14:13:58 +00:00
rods%netscape.com
b077844144 47302 - moved the RegUnRegAccessKey to the Destroy Method
44788 - Comboboxes do not obey style height
42661 - javascript "selected = true" doesn't inform onChange of
b=47302, 44788, 42661 r=kmclusk


git-svn-id: svn://10.0.0.236/trunk@75493 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 14:13:40 +00:00
roc+%cs.cmu.edu
771c0a8519 Removing TABLE SUMMARY from browser tooltips. Bug #45735. r=ben, a=brendan
git-svn-id: svn://10.0.0.236/trunk@75492 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 13:42:52 +00:00
mkaply%us.ibm.com
8352f40ed0 OS/2 Tinderbox break
Need PR_CALLBACK for VisualAge


git-svn-id: svn://10.0.0.236/trunk@75491 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 13:26:02 +00:00
locka%iol.ie
f467190080 NOT PART OF BUILD. Completed nsICommandHandler implementation. Added [retval] tag to out param in IDL file to make Javascript invocation easier.
git-svn-id: svn://10.0.0.236/trunk@75490 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 12:44:38 +00:00
ben%netscape.com
252508877d search button should not take focus.
git-svn-id: svn://10.0.0.236/trunk@75489 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 09:59:57 +00:00
ben%netscape.com
f87e7f5128 add license
git-svn-id: svn://10.0.0.236/trunk@75488 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 09:19:44 +00:00
warren%netscape.com
efbf2efe18 Fixed location of manifest.rdf
git-svn-id: svn://10.0.0.236/trunk@75487 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 09:04:05 +00:00
ben%netscape.com
a76a7c7b44 yay me. I suck. making <menubar> use menubarframe like it should instead of boxframe.
git-svn-id: svn://10.0.0.236/trunk@75486 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 09:01:18 +00:00
warren%netscape.com
6776b3e51d Fixed slashes and filenames that were too long for mac.
git-svn-id: svn://10.0.0.236/trunk@75485 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 08:57:40 +00:00
valeski%netscape.com
d79be2eab5 removing crusty include
git-svn-id: svn://10.0.0.236/trunk@75484 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 07:59:32 +00:00
valeski%netscape.com
ca2a231ff6 removing unneeded import lib/static lib links
git-svn-id: svn://10.0.0.236/trunk@75483 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 07:56:58 +00:00
dprice%netscape.com
3b6f776e04 adding manifest for modern skin jar
NOT IN THE BUILD


git-svn-id: svn://10.0.0.236/trunk@75482 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 07:35:28 +00:00
ben%netscape.com
d788e10b1e remove dead files
git-svn-id: svn://10.0.0.236/trunk@75481 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 07:18:17 +00:00
ben%netscape.com
f6db62710d fix for a bug with XBL binding attached event that was causing the event to be fired repeatedly.
code by hyatt, r=me


git-svn-id: svn://10.0.0.236/trunk@75480 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 07:17:10 +00:00
ben%netscape.com
9869871538 fix orange
git-svn-id: svn://10.0.0.236/trunk@75479 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 07:07:28 +00:00
ben%netscape.com
c17bb7417e die crapintosh
git-svn-id: svn://10.0.0.236/trunk@75478 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 07:06:17 +00:00
valeski%netscape.com
ced7b8dee1 cleanup
git-svn-id: svn://10.0.0.236/trunk@75477 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 07:00:14 +00:00
ben%netscape.com
c8d24f950d forgot this
git-svn-id: svn://10.0.0.236/trunk@75476 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 06:45:06 +00:00
dprice%netscape.com
5a7557e7bc added manifest.rdf
git-svn-id: svn://10.0.0.236/trunk@75475 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 06:44:46 +00:00
valeski%netscape.com
82432b560f removed defer logic as cookies are only accessed from the main thread. removed unused functions, converted stripline over to nsString equivelent, changed cookie deletion and list removal mechansim to use already cached indexes so we don't search the list again everytime we want to remove an element. also removed some extraneous statics
git-svn-id: svn://10.0.0.236/trunk@75474 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 06:40:35 +00:00
ben%netscape.com
7d04b93d30 toolbar landing 44756, r=hyatt
git-svn-id: svn://10.0.0.236/trunk@75473 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 06:36:17 +00:00
ben%netscape.com
0051ef1580 toolbar landing 44756
git-svn-id: svn://10.0.0.236/trunk@75472 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 06:29:59 +00:00
ben%netscape.com
664eb83eb4 classic skin landing from hell
46613 - polish!


git-svn-id: svn://10.0.0.236/trunk@75471 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 06:24:33 +00:00
cls%seawood.org
e00c9de47a Oops. Did a lxr search on the wrong thing. Change -DB1M to -DB_ONE_M since WS5.0 appears to not handle the former properly in all cases.
git-svn-id: svn://10.0.0.236/trunk@75470 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 06:07:33 +00:00
cls%seawood.org
63bdecee46 Removing unused define that appeared to be causing WS5.0 to occassionaly complain about the use of -D without an argument.
git-svn-id: svn://10.0.0.236/trunk@75469 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 05:34:19 +00:00
valeski%netscape.com
7e14301340 removing lock/monitor usage from cookie code. cookies live on the main thread and any cross thread communication is marshalled, thus no need for this stuff. also fixing nsVoidArray leak. also cleaning up extraneous nsString usage. Also adding functional test harness for win32
git-svn-id: svn://10.0.0.236/trunk@75468 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 04:57:23 +00:00
BlakeR1234%aol.com
0387f5b165 Fix bug 41345, implement checkmarks for the current visited page in the Go menu (as IE 5.x and NN 4.x do). r=jag, a=radha
git-svn-id: svn://10.0.0.236/trunk@75467 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 03:42:22 +00:00
kmcclusk%netscape.com
232df3fbb8 Removed references to viewmanager1 in nsViewFactory. Removed ViewManager1 from the build on WIN32, and Linux. b=42845 r=attinasi@netscape.com. tested=win32,linux
git-svn-id: svn://10.0.0.236/trunk@75466 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 03:36:10 +00:00
mkaply%us.ibm.com
08b40967ac r=mkaply, a=brendan
Tinderbox break - Should have been info.fExtensionArray


git-svn-id: svn://10.0.0.236/trunk@75465 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 02:20:17 +00:00
bienvenu%netscape.com
b9afe959ed fix bugs having to do with imap msg copying failing 46876 46914 etc r=mscott
git-svn-id: svn://10.0.0.236/trunk@75464 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 01:25:12 +00:00
bienvenu%netscape.com
948bf4aaf6 fix 28117 copying online to offline loses read state of msg r=mscott
git-svn-id: svn://10.0.0.236/trunk@75463 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 01:22:45 +00:00
pinkerton%netscape.com
87a6f925d2 Most of fix for 37412. Expand d&d so that when we're asking for a url and
don't have one, we check if a file is being dropped. If so, either give
the file:// url or read in the InternetShortcut.


git-svn-id: svn://10.0.0.236/trunk@75462 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 00:47:36 +00:00
nbhatla%netscape.com
28d4751238 Bug #46518 -> Mac Classic Skin Polish. #45112 -> Mail Arrow Icon. #45685 -> mail threaded icon. #45755 -> Radio buttons don't bounce in prefs on windows now. #46178 -> Nudge Button Icons. #46192 ->Prefs Panel title has proper background now. #17926 -> Using px instead of pt for fonts on Mac classic now. #47290 -> Removed border from content in navigator.css and added it to splitters. (for all checkins in past 20 min) r=andrew
git-svn-id: svn://10.0.0.236/trunk@75461 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 00:46:17 +00:00
pinkerton%netscape.com
82156229ea part of fix for 37412, make content area accept text/x-moz-url flavor.
git-svn-id: svn://10.0.0.236/trunk@75460 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 00:46:05 +00:00
pinkerton%netscape.com
56fa3c56a7 Fix for 40890, pin mouse to center of translucent drag to avoid large gaps between the mouse cursor and the item being dragged. r=sfraser
git-svn-id: svn://10.0.0.236/trunk@75459 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 00:43:28 +00:00
nbhatla%netscape.com
31a3863127 Bug #46519 -> Mac Classic Skin Polish. Fixes Messenger Icons.
git-svn-id: svn://10.0.0.236/trunk@75458 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 00:40:20 +00:00
nbhatla%netscape.com
7695cc70c3 Bug #46519 -> Mac Classic Skin Polish. Fixes Messenger Icons
git-svn-id: svn://10.0.0.236/trunk@75457 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 00:39:28 +00:00
nbhatla%netscape.com
9a5aa02bd4 Bug #46519 ->Mac Classic Skin Polish. Fixes Messenger Icons.
git-svn-id: svn://10.0.0.236/trunk@75456 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 00:38:28 +00:00
nbhatla%netscape.com
90de762c34 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@75455 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 00:36:12 +00:00
nbhatla%netscape.com
b040ebf047 Bug #46519: Mac Classic Skin Fixes. This fixes spacing issues in certain pref panels, by moving out style settings in the XUL. Bug #46178: Adds nudge button icons
git-svn-id: svn://10.0.0.236/trunk@75454 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 00:34:53 +00:00
nbhatla%netscape.com
f1dd086215 Bug #46519: Mac Classic Skin Polish. Fixes color picker widget in viewing messages pref panel.
git-svn-id: svn://10.0.0.236/trunk@75453 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 00:32:53 +00:00
mcafee%netscape.com
078a50ae4e Removing pref-diskspace.xul from mailnews prefs, this UI has moved over to account setup arena. r=alecf
git-svn-id: svn://10.0.0.236/trunk@75452 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 00:31:57 +00:00
mscott%netscape.com
35903c5428 Bug #47240 --> landing branch change to the tip. helper app dialog has no text on the mac
r=alecf


git-svn-id: svn://10.0.0.236/trunk@75451 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 00:30:39 +00:00
mscott%netscape.com
a19c629a9b Bug #47240 --> landing branch change to the tip. helper app dialog has no text on the mac
git-svn-id: svn://10.0.0.236/trunk@75450 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 00:29:35 +00:00
mscott%netscape.com
a9110f7072 Bug #47248 --> various problems with save as dialog from helper app. unload handler was calling cancel and we
weren't setting the action to saveToDisk in the right case

Landing branch changes to the tip.
r=alecf


git-svn-id: svn://10.0.0.236/trunk@75449 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 00:27:17 +00:00
mscott%netscape.com
1a89e07ec3 Bug #1549 --> netcenter account merges with existing account Landing branch changes to the tip.
r=bhuvan


git-svn-id: svn://10.0.0.236/trunk@75448 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 00:26:09 +00:00
bryner%uiuc.edu
7c6dba14fb removed files: mozilla/layout/xul/base/src/nsTreeOuterFrame.cpp, mozilla/layout/xul/base/src/nsTreeFrame.cpp, mozilla/layout/xul/base/src/nsTreeRowGroupFrame.cpp, mozilla/layout/xul/base/src/nsTreeCellFrame.cpp, mozilla/layout/xul/base/src/nsTreeRowFrame.cpp
git-svn-id: svn://10.0.0.236/trunk@75447 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 00:23:55 +00:00
bryner%uiuc.edu
b298446991 Refixing bug 23140 to not cause a menu slowdown, and fixing bug 46615 -
removal of old tree widget.  r=hyatt.


git-svn-id: svn://10.0.0.236/trunk@75446 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 00:22:36 +00:00
jj%netscape.com
81eb1f5b80 modify xptlink.pl to work on mac (granrose). r=jj.
git-svn-id: svn://10.0.0.236/trunk@75444 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-03 00:07:00 +00:00
despotdaemon%netscape.com
a28173503a Pseudo-automatic update of changes made by kandrot@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@75443 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 23:39:36 +00:00
av%netscape.com
289e4953d8 Fixing Unix redness
git-svn-id: svn://10.0.0.236/trunk@75442 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 23:36:30 +00:00
attinasi%netscape.com
28857f7ccf New weekly data: not part of build
git-svn-id: svn://10.0.0.236/trunk@75441 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 23:28:11 +00:00
waldemar%netscape.com
3227d375c5 Made link order consistent
git-svn-id: svn://10.0.0.236/trunk@75440 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 23:09:53 +00:00
waldemar%netscape.com
e2aaf776e5 Fixed Mac errors and warnings
git-svn-id: svn://10.0.0.236/trunk@75439 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 23:09:29 +00:00
av%netscape.com
4a24980381 Fixing 45895, r=waterson
git-svn-id: svn://10.0.0.236/trunk@75437 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 23:01:35 +00:00
rods%netscape.com
c936b8f011 backing out changes until I get them all in
git-svn-id: svn://10.0.0.236/trunk@75436 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 22:59:45 +00:00
slamm%netscape.com
fc5c276171 Fix bug 15204/38057 from Eric Pollmann (pollmann@netscape.com). $enc had an single quote in it that was not escaped. Double quotes are escaped so it is safe to use them around the $enc value.
git-svn-id: svn://10.0.0.236/trunk@75434 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 22:54:03 +00:00
rods%netscape.com
a7f8784c75 if the size attr is ever evaled less than 1 then it is set to 1
b=46224, r=kmcclusk


git-svn-id: svn://10.0.0.236/trunk@75433 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 22:47:55 +00:00
rods%netscape.com
0598d4e64a 47302 - moved the RegUnRegAccessKey to the Destroy Method
44788 - Comboboxes do not obey style height
42661 - javascript "selected = true" doesn't inform onChange of
b=47302, 44788, 42661 r=kmclusk


git-svn-id: svn://10.0.0.236/trunk@75432 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 22:24:14 +00:00
rods%netscape.com
256f1f523e The frames need to be appended and the default method just asserts
b=41528 r=kmcclusk


git-svn-id: svn://10.0.0.236/trunk@75431 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 22:16:12 +00:00
rods%netscape.com
389ee6e6a0 moved the RegUnRegAccessKey to the Destroy method
b=47302 r=kmcclusk


git-svn-id: svn://10.0.0.236/trunk@75430 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 22:12:11 +00:00
jj%netscape.com
5052d3645f changed output location for xpt_link target
git-svn-id: svn://10.0.0.236/trunk@75429 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 22:12:10 +00:00
jj%netscape.com
7224e7b919 added xpt_link tool to the Mac build (if build{xptlink}=1)
git-svn-id: svn://10.0.0.236/trunk@75428 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 22:10:54 +00:00
nhotta%netscape.com
9792e2e21e Changed GetCharacterSet to return a default if no folder charset is stored, bug 46542, r=bienvenu.
git-svn-id: svn://10.0.0.236/trunk@75427 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 22:07:47 +00:00
rods%netscape.com
e0ca215d75 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@75426 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 22:07:46 +00:00
mjudge%netscape.com
dc427b4cd0 15665 beta3+ Javascript selecting a link when dragging.
git-svn-id: svn://10.0.0.236/trunk@75425 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 22:07:00 +00:00
rods%netscape.com
32f5520a8a The script notification happens before the radiobox gets a chance to change its value
so they must return the opposite value for themselves. They don't want to actually set their
values because the script could cancel. So the idea here is to let them know before the script
call that they should return their "future" value (the opposite of their current value)
b=42972 r=kmcclusk


git-svn-id: svn://10.0.0.236/trunk@75424 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 22:06:37 +00:00
rods%netscape.com
5e504902cc The script notification happens before the radiobox gets a chance to change its value
so they must return the opposite value for themselves. They don't want to actually set their
values because the script could cancel. So the idea here is to let them know before the script
call that they should return their "future" value (the opposite of their current value)

plus I made a minor change that allows the radio button to use the PaintBackground code to draw the "dot"
but it creates a tmp color struct so the color is correct.
b=42972,37517 r=kmcclusk


git-svn-id: svn://10.0.0.236/trunk@75423 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 22:06:33 +00:00
nhotta%netscape.com
56bf215fe0 Put a special case before alert the user for charset conversion failure, bug 42871, r=ftang.
git-svn-id: svn://10.0.0.236/trunk@75422 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 22:03:26 +00:00
nhotta%netscape.com
9073a301c2 A change for phone/fax field. Write out attribute and value separatly since value needs charset conversion but not for attribute, bug 38901, r=rhp.
git-svn-id: svn://10.0.0.236/trunk@75421 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 22:00:04 +00:00
cata%netscape.com
8378cc2420 Fix for bug #28112 cache not persistent in charset menu, r=nhotta, a=ftang.
git-svn-id: svn://10.0.0.236/trunk@75420 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 21:54:18 +00:00
rods%netscape.com
908046df7e Since the way (and when) options were added then number of options is now different
so it must check against zero instead of 1
b=44266,r=kmcclusk


git-svn-id: svn://10.0.0.236/trunk@75419 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 21:53:23 +00:00
dimator%netscape.com
ed7cd7c8bc Bug 34434. Updating secure mail and secure news icons. r=putterman
git-svn-id: svn://10.0.0.236/trunk@75418 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 21:52:37 +00:00
radha%netscape.com
9af9521afb fixes related to bug # 18321. Checking in branch fixes to the trunk. r=nisheeth
git-svn-id: svn://10.0.0.236/trunk@75417 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 21:49:26 +00:00
radha%netscape.com
dad1629804 Hook up JS history.go() to session History bug # 18321. r=nisheeth. Checking in branch
fix to the tip


git-svn-id: svn://10.0.0.236/trunk@75416 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 21:48:32 +00:00
varada%netscape.com
85d692989f including the CD autorun screen defaults in default config
git-svn-id: svn://10.0.0.236/trunk@75415 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 21:44:30 +00:00
despotdaemon%netscape.com
422e4c1a18 Pseudo-automatic update of changes made by jtaylor@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@75414 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 21:35:51 +00:00
av%netscape.com
9ef05d47be Fixing 46573, r=serge
git-svn-id: svn://10.0.0.236/trunk@75413 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 21:35:45 +00:00
despotdaemon%netscape.com
bb99fd6686 Pseudo-automatic update of changes made by kzhou@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@75412 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 21:26:16 +00:00
varada%netscape.com
b8328c39bd changing the location of navigator.dtd to reflect seamonkey AGAIN!
git-svn-id: svn://10.0.0.236/trunk@75411 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 21:11:20 +00:00
nelsonb%netscape.com
9a6d9ffb91 mpl_rsh now calls s_mp_div_2d instead of duplicating its logic.
mpl_lsh now calls s_mp_mul_2d instead of duplicating its logic.


git-svn-id: svn://10.0.0.236/trunk@75410 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 20:52:17 +00:00
nelsonb%netscape.com
20d8b5f447 - Implement s_mp_mul_2d, which complements s_mp_div_2d.
- Rewrite and speed up mp_sqr, most-frequently used in mp_exptmod().
- Speed up mp_sqrt by starting with a much better initial estimate.


git-svn-id: svn://10.0.0.236/trunk@75409 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 20:50:57 +00:00
nelsonb%netscape.com
81b0bae291 Accept input args in hex, not decimal. Line up output into columns.
git-svn-id: svn://10.0.0.236/trunk@75408 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 20:48:28 +00:00
nelsonb%netscape.com
9ba046bc86 Declare s_mp_mul_2d(), which is complementary to s_mp_div_2d().
git-svn-id: svn://10.0.0.236/trunk@75407 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 20:47:05 +00:00
relyea%netscape.com
0aa540096d Put modutil back into the daily builds
git-svn-id: svn://10.0.0.236/trunk@75405 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 18:42:32 +00:00
relyea%netscape.com
78434b3810 Remove old communicator stuff from libjar so modutil will build now.
git-svn-id: svn://10.0.0.236/trunk@75404 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 18:41:31 +00:00
ashuk%eng.sun.com
1d9d83e75f bug 44774, 44775
author=ashuk
r=ovk@sparc.spb.su

Minor fix for failed QA Test. Patch supplied by
Oleg.

_Ashu


git-svn-id: svn://10.0.0.236/trunk@75403 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 17:02:43 +00:00
cotter%netscape.com
4a086be75e Added latest PSM license.
git-svn-id: svn://10.0.0.236/trunk@75401 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 16:46:16 +00:00
locka%iol.ie
1abaef8da3 NOT PART OF BUILD.
New nsICommandHandler interface and C++ implementation for embedders who want their XUL to be able to call their webbrowser container with the minimum of effort.


git-svn-id: svn://10.0.0.236/trunk@75400 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 11:14:57 +00:00
rjc%netscape.com
e0e70af049 Specify query encoding string for this search engine. r=me a=johng
git-svn-id: svn://10.0.0.236/trunk@75399 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 10:47:52 +00:00
rjc%netscape.com
8a45085d44 Various small fixes for nsbeta3+ bug # 41357: enable column resigning for various trees. r=me
git-svn-id: svn://10.0.0.236/trunk@75398 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 10:31:37 +00:00
dprice%netscape.com
8e91eb2031 Adding chrome manifests for classic skin NOT IN THE BUILD
git-svn-id: svn://10.0.0.236/trunk@75397 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 10:11:17 +00:00
cls%seawood.org
2be0180151 Oops alecf missed one.
git-svn-id: svn://10.0.0.236/trunk@75396 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 09:05:12 +00:00
alecf%netscape.com
454a05dd45 fix some stupid typos (implementation was good, typing it failed :)) from yesterdays checkin
git-svn-id: svn://10.0.0.236/trunk@75394 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 07:59:17 +00:00
warren%netscape.com
5941ddaa3e Getting jar files in shape. Mostly works on unix, status bar missing (not in build yet).
git-svn-id: svn://10.0.0.236/trunk@75393 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 06:48:45 +00:00
alecf%netscape.com
a60bf10a77 fix AIX bustage with explicit casting
git-svn-id: svn://10.0.0.236/trunk@75392 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 06:02:35 +00:00
rjc%netscape.com
4500c1468d Putting fix for nsbeta2+ bug # 47126 into tip: fix simple mode searching. r=ben
git-svn-id: svn://10.0.0.236/trunk@75391 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 05:30:08 +00:00
ftang%netscape.com
a3f9b052aa fix 45430. patch proposed by beard@netscape.com r=ftang a=ftang
fix memory leak


git-svn-id: svn://10.0.0.236/trunk@75390 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 05:08:15 +00:00
waterson%netscape.com
53249a5944 Bug 46013, redux. Was leaking RDFContentSinkImpl::NameSpaceEntry objects all over the floor. Thanks to dbaron and beard for wiping my chin. r=beard.
git-svn-id: svn://10.0.0.236/trunk@75389 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 04:35:52 +00:00
ftang%netscape.com
1180663f95 fix 44551. Turn nb and nn to true from false so they will be
shown on the language ui.
r=momoi a=ftang


git-svn-id: svn://10.0.0.236/trunk@75388 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 04:22:41 +00:00
ftang%netscape.com
6e349ea58f fix bug 44551 Correct the spelling for Norwegian Bokmal
thanks for huftis@bigfoot.com (Karl Ove Hufthammer)
r=ftang@netscape.com a=ftang


git-svn-id: svn://10.0.0.236/trunk@75387 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 04:21:15 +00:00
jband%netscape.com
bcd6f01203 interim fix for bug 25180. Build double wrappers around JS components used by JS code. Includes secured scheme for getting at underlying JSObject for those who really need to do this. a=warren r=rginda
git-svn-id: svn://10.0.0.236/trunk@75385 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 03:57:59 +00:00
beard%netscape.com
fe85e51ec1 fixing warnings, removing need for JStrings to be copied for mClass
git-svn-id: svn://10.0.0.236/trunk@75384 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 03:53:04 +00:00
cls%seawood.org
574470d12b Fix --enable-logrefcnt so that it will actually force refcnt logging on or off per http://lxr.mozilla.org/seamonkey/source/xpcom/doc/MemoryTools.html.
git-svn-id: svn://10.0.0.236/trunk@75383 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 03:17:49 +00:00
cls%seawood.org
fb441abad1 On second thought, nevermind
git-svn-id: svn://10.0.0.236/trunk@75381 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 02:44:56 +00:00
cls%seawood.org
a53e5b86ae Add checks for FORCE_BUILD_REFCNT_LOGGING & NO_BUILD_REFCNT_LOGGING per http://lxr.mozilla.org/seamonkey/source/xpcom/doc/MemoryTools.html .
git-svn-id: svn://10.0.0.236/trunk@75380 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 02:42:54 +00:00
mjudge%netscape.com
80c961899e *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@75379 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 02:39:10 +00:00
valeski%netscape.com
49f0e8fbd7 47235. r=mstoltz. mlk fix.
git-svn-id: svn://10.0.0.236/trunk@75378 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 02:05:42 +00:00
cmanske%netscape.com
2023ba127b Fixed crashing bug 42195: Added method to nsIFrameSelection so frame can get limiting content node for parent node searches in text edit fields. r=mjudge
git-svn-id: svn://10.0.0.236/trunk@75377 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 01:47:55 +00:00
nelsonb%netscape.com
d6a3fe495b Reduced the number of temporary variables allocated and freed during a
modular exponentiation by over 99%.  Modified mp_mul and mp_sqr to only
allocate temporary variables when absolutely needed.  Changed mp_copy
and mp_init_copy to allocate space according to the amount allocated
in the source, reducing the need to grow the variable later.


git-svn-id: svn://10.0.0.236/trunk@75376 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 01:03:14 +00:00
nelsonb%netscape.com
aa56939a15 Investigating allocation of temporary variables.
git-svn-id: svn://10.0.0.236/trunk@75375 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 01:01:01 +00:00
danm%netscape.com
bf7551e324 adding missing initialization of nsBrowserInstance object. bug 46979
git-svn-id: svn://10.0.0.236/trunk@75374 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 00:55:49 +00:00
bryner%uiuc.edu
086257b870 Removing the makefile for the directory I just removed. r=alecf.
git-svn-id: svn://10.0.0.236/trunk@75373 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 00:47:35 +00:00
bryner%uiuc.edu
5192d123ff Removing unused directory/files. No effect on build. r=alecf.
git-svn-id: svn://10.0.0.236/trunk@75372 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 00:46:14 +00:00
larryh%netscape.com
deebc2d183 BugZilla: 4090. cross platform breakage
git-svn-id: svn://10.0.0.236/trunk@75371 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 00:45:18 +00:00
dimator%netscape.com
d05b59fdd4 Removing no longer used files. r=putterman
git-svn-id: svn://10.0.0.236/trunk@75370 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 00:40:18 +00:00
pnunn%netscape.com
b54309d74e bug#46360: fixing leak of nsWeakReference. Thanks, Patrick. pnunn.
git-svn-id: svn://10.0.0.236/trunk@75369 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 00:34:30 +00:00
sfraser%netscape.com
1f4e9d74e3 Fix bug 34741 -- command-drag should not activate windows. r=pinkerton
git-svn-id: svn://10.0.0.236/trunk@75368 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 00:30:41 +00:00
hyatt%netscape.com
b93a1b200d Fix for column resizing. 41357.
git-svn-id: svn://10.0.0.236/trunk@75367 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 00:27:51 +00:00
hyatt%netscape.com
37448b6cd5 Fix for 41357.
git-svn-id: svn://10.0.0.236/trunk@75366 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 00:27:07 +00:00
hyatt%netscape.com
4c482a8039 Column resizing. 41357
git-svn-id: svn://10.0.0.236/trunk@75365 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 00:26:43 +00:00
hyatt%netscape.com
1f4e716975 Column resizing. 41357.
git-svn-id: svn://10.0.0.236/trunk@75364 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 00:26:25 +00:00
ddrinan%netscape.com
8fe71d79fb Initialize pointer!
git-svn-id: svn://10.0.0.236/trunk@75363 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 00:20:24 +00:00
valeski%netscape.com
fd89dc645d mlk fix. r=tao
git-svn-id: svn://10.0.0.236/trunk@75362 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 00:09:22 +00:00
larryh%netscape.com
283dbf916a BugZilla: 25982. remove comment witin a comment
git-svn-id: svn://10.0.0.236/trunk@75361 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-02 00:09:07 +00:00
ducarroz%netscape.com
abbb64f9b6 Fix for bug 38682. Add command updater to enable the spelling button and menu item when the cursor is in the message body. R=mscott.
git-svn-id: svn://10.0.0.236/trunk@75360 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 23:58:49 +00:00
valeski%netscape.com
6cb5a64229 removing extraneous variable
git-svn-id: svn://10.0.0.236/trunk@75359 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 23:57:36 +00:00
valeski%netscape.com
f5ea1d5037 removing extraneous string/memory usage
git-svn-id: svn://10.0.0.236/trunk@75358 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 23:44:38 +00:00
larryh%netscape.com
d25c24214f change default hostname to mcom.com
git-svn-id: svn://10.0.0.236/trunk@75355 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 23:31:48 +00:00
valeski%netscape.com
d605064355 44848. r=gagan. fixing leaked strings
git-svn-id: svn://10.0.0.236/trunk@75354 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 23:27:29 +00:00
dimator%netscape.com
da7b076b73 Fix for 43236. Removing "Double-clicking a message always opens a new window..." item from the pref dialog. r=putterman
git-svn-id: svn://10.0.0.236/trunk@75353 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 23:25:59 +00:00
valeski%netscape.com
aceba3cb14 removing extraneous static var and #includes
git-svn-id: svn://10.0.0.236/trunk@75352 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 23:23:44 +00:00
mcafee%netscape.com
cd0a9ee2e5 Avoid double slash problem when ObjDir is ''.
git-svn-id: svn://10.0.0.236/trunk@75350 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 23:17:59 +00:00
valeski%netscape.com
a3f4aa3885 raw pointer mlk fix. r=dougt
git-svn-id: svn://10.0.0.236/trunk@75349 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 22:57:58 +00:00
bryner%uiuc.edu
70c39b979b Removing .cvsignore files so this directory will go away. Not part
of build.  r=smfr.


git-svn-id: svn://10.0.0.236/trunk@75348 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 22:53:20 +00:00
pete%alphanumerica.com
7bf37c93a1 added two member functions to the File object prototype
r=dougt,brendan a=dougt
not part of the build.

--pete


git-svn-id: svn://10.0.0.236/trunk@75347 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 22:50:16 +00:00
varada%netscape.com
0e025587c6 disallow copy or move messages to Unsent Messages folder;bug #40695; r=scottip
git-svn-id: svn://10.0.0.236/trunk@75345 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 22:42:47 +00:00
mcafee%netscape.com
59648a42a7 BranchTag was being ignored, moving the logic to BuildIt() function.
git-svn-id: svn://10.0.0.236/trunk@75344 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 22:40:53 +00:00
alecf%netscape.com
562414f7a2 fix for 44633, 44634, and more threadpane performance work - use NS_LITERAL_STRING
where appropriate, avoid excess conversion of integer resources, etc.
r=putterman,mscott


git-svn-id: svn://10.0.0.236/trunk@75342 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 22:38:52 +00:00
bryner%uiuc.edu
3fdc637ee3 Removing unused files. Not part of the build. r=cls.
git-svn-id: svn://10.0.0.236/trunk@75341 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 22:35:28 +00:00
bryner%uiuc.edu
75bf2b3286 Fix for 46545 - command+click in trees on Mac. r=brade.
git-svn-id: svn://10.0.0.236/trunk@75339 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 22:30:10 +00:00
mscott%netscape.com
b06d36e874 Bug #1549, 1726 --> be sure to clear the prefs for the bogus identity we create during migration. This was causing
problems on the commercial build. (Landing from beta2 branch to tip)
r=alecf


git-svn-id: svn://10.0.0.236/trunk@75338 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 22:29:15 +00:00
warren%netscape.com
6f9124b236 Breaking out platform specific jar stuff.
git-svn-id: svn://10.0.0.236/trunk@75337 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 22:22:41 +00:00
saari%netscape.com
0203addff1 fix for nsbeta3+ 37301, dynamically created menus crash on MacOS. r=pinkerton
git-svn-id: svn://10.0.0.236/trunk@75336 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 22:11:11 +00:00
larryh%netscape.com
8bed19c0f4 BugZilla: 25983. comment cleanup
git-svn-id: svn://10.0.0.236/trunk@75335 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 22:08:35 +00:00
slamm%netscape.com
a353c7af55 Remove bookmarks folder from toolbar. Bug 39332. r=pavlov.
git-svn-id: svn://10.0.0.236/trunk@75333 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 22:04:55 +00:00
neeti%netscape.com
b3ac151801 fix for bug 30852 - Image cache not refreshed on reload,
fix for bug 40449 - Cache does not store latest value of pages, r/a=gagan


git-svn-id: svn://10.0.0.236/trunk@75332 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 22:03:47 +00:00
heikki%netscape.com
f9ab048302 Bug 41599 browser crashes when executing function with certain name such as Click(). Fixed by stopping recursion. r=saari.
git-svn-id: svn://10.0.0.236/trunk@75331 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 21:40:38 +00:00
hyatt%netscape.com
5258badd5d Fix for 46849. r=pavlov
git-svn-id: svn://10.0.0.236/trunk@75330 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 21:39:28 +00:00
danm%netscape.com
a561ef00c3 Deathgrip the output stream during WriteSegments to prevent bug 46267. This is a temporary patch to stop a common startup crash, until the real underlying cause is found. r=ruslan
git-svn-id: svn://10.0.0.236/trunk@75328 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 21:33:36 +00:00
varada%netscape.com
a7c6f067ba polish for mailwindow;bugs #41866,45195,45201,45203,45204;r=scottip
git-svn-id: svn://10.0.0.236/trunk@75327 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 21:24:29 +00:00
robinf%netscape.com
52bb6e29f8 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@75326 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 21:14:47 +00:00
dave%intrec.com
21cc5761af Undoing missing QA bug introduced with earlier patch (see bug 30826 for
details)


git-svn-id: svn://10.0.0.236/trunk@75325 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 19:52:06 +00:00
robinf%netscape.com
bd485d87d1 fixing bug 45752
git-svn-id: svn://10.0.0.236/trunk@75323 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 19:27:09 +00:00
brade%netscape.com
a92780d770 changes submitted by Dan Haddix (dan6992@hotmail.com); bug #37788
git-svn-id: svn://10.0.0.236/trunk@75321 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 14:31:26 +00:00
brade%netscape.com
197df3eb6d change submitted by Dan Haddix (dan6992@hotmail.com); bug #37788
git-svn-id: svn://10.0.0.236/trunk@75320 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 14:29:35 +00:00
brade%netscape.com
adf04edef9 Send Page (contributed by rcassin@supernova.org); bug #44802
git-svn-id: svn://10.0.0.236/trunk@75319 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 14:17:48 +00:00
brade%netscape.com
9f2c8a22ab initialize menuhandle to null; r=sfraser; bug #45245
git-svn-id: svn://10.0.0.236/trunk@75318 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 09:06:25 +00:00
rjc%netscape.com
0f38fc34ce Fix bug # 46710: can only start a drag on <treeitem> nodes. r=me
git-svn-id: svn://10.0.0.236/trunk@75317 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 08:24:07 +00:00
bryner%uiuc.edu
6f9d6935c1 Removing unused, old, obsolete files. Should not affect anything in the
build.  r=cls.


git-svn-id: svn://10.0.0.236/trunk@75315 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 07:50:09 +00:00
bryner%uiuc.edu
6a98845d2e Oops- forgot to remove this makefile when I removed the obsolete files in
modules/libpref/l10n.  Does not affect build.


git-svn-id: svn://10.0.0.236/trunk@75314 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 06:51:54 +00:00
cls%seawood.org
52bb0a339f For reasons not yet known, my build & the linux/arm tinderbox needed to include <stdlib.h> to get atoi().
git-svn-id: svn://10.0.0.236/trunk@75311 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 06:09:14 +00:00
cls%seawood.org
08521de430 Snarf'd gtk's NS_GetCurrentThread() implementation.
git-svn-id: svn://10.0.0.236/trunk@75310 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 06:02:28 +00:00
cls%seawood.org
a02313b652 BeOS doesn't need mcom_db.h either
git-svn-id: svn://10.0.0.236/trunk@75309 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 06:01:24 +00:00
danm%netscape.com
d2cd2b7da7 reverting to 1.65 -- though a slightly different version. i thought i was seeing a crash from that version, but now i think not. so, like before, bug 46556 r=saari. (also on M17 branch, rev 1.64.14.3)
git-svn-id: svn://10.0.0.236/trunk@75308 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 04:45:58 +00:00
danm%netscape.com
db4ea3d12c reverting last change, which causes new crashes
git-svn-id: svn://10.0.0.236/trunk@75306 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 03:00:35 +00:00
mscott%netscape.com
635a8128c2 Bug #1635 --> if we are downloading the entire message, set total download size based on the RFC822.SIZE response.
r=bienvenu


git-svn-id: svn://10.0.0.236/trunk@75304 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 02:56:26 +00:00
dougt%netscape.com
c2a66acc1b Make setting the env MBs not bytes. r=valeski@netscape.com
DEBUGGIN code


git-svn-id: svn://10.0.0.236/trunk@75303 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 02:51:22 +00:00
mscott%netscape.com
bbd34bcf56 Bug #1539 --> if the identity already has an smtp server associated with it, don't create another one.
r=alecf


git-svn-id: svn://10.0.0.236/trunk@75302 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 02:48:12 +00:00
rjc%netscape.com
cc337f55c5 Specify query encoding string for this search engine. r=me a=johng
git-svn-id: svn://10.0.0.236/trunk@75301 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 02:47:17 +00:00
despotdaemon%netscape.com
70ca7352c2 Pseudo-automatic update of changes made by quy@igelaus.com.au.
git-svn-id: svn://10.0.0.236/trunk@75300 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 01:54:12 +00:00
dougt%netscape.com
ce55e593ed Fix to allow MOZ_MEM_LIMIT be the upper limit in memory allocation.
Debugging code.  pavlov reviewed.


git-svn-id: svn://10.0.0.236/trunk@75297 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 01:46:52 +00:00
nelsonb%netscape.com
e3d813843b Declare mp_int function arguments "const" as appropriate.
git-svn-id: svn://10.0.0.236/trunk@75296 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 01:38:30 +00:00
dougt%netscape.com
ad72d6a7d0 Minor changes. Using service manager returned from NS_InitXPCOM.
git-svn-id: svn://10.0.0.236/trunk@75295 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 01:37:44 +00:00
dougt%netscape.com
b62c0ba2a1 Ton of changes. Basically using nsIWebBrowserChrome now.
valeski@netscape.com
47003


git-svn-id: svn://10.0.0.236/trunk@75294 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 01:37:07 +00:00
endico%mozilla.org
f4ff6546d0 Generate brief logs for beos builds. Fix for bug 37218. Patch contributed by Justin Morey <justin@68k.org>
git-svn-id: svn://10.0.0.236/trunk@75293 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 01:36:35 +00:00
nelsonb%netscape.com
09f7df0c44 Change default value for MP_ARGCHK to depend on whether or not DEBUG is
defined.  Raise the default "precision" to reduce reallocations.


git-svn-id: svn://10.0.0.236/trunk@75292 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 01:36:30 +00:00
danm%netscape.com
26f87c8d88 release the keyboard navigator in the destructor. seems to fix a secondary, rarer crash in bug 46556. also in M17 branch (rev 1.64.14.1). r=saari
git-svn-id: svn://10.0.0.236/trunk@75291 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 01:26:06 +00:00
rhp%netscape.com
a48966bc20 Fix for extra table in quoted output - Bug #: 46975 - r: rhp - mozilla contribution
git-svn-id: svn://10.0.0.236/trunk@75290 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 01:25:59 +00:00
rhp%netscape.com
7800b6a386 Fix for possible duplicate entry issues on sync failure - Bug # 1407 - r: bienvenu
git-svn-id: svn://10.0.0.236/trunk@75289 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 01:25:40 +00:00
danm%netscape.com
52efcf92c2 Glossing over the real problem (a leaking content area docshell), in the sure hope that nsBrowserInstance is going away soon, this embarrassing hack stops crash bug 46556. Same change is on M17, rev 1.139.2.4. r=hyatt
git-svn-id: svn://10.0.0.236/trunk@75288 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 01:16:40 +00:00
pinkerton%netscape.com
95ad431597 Fix for 39078, tooltips not disappearing on mouse clicks in button. when we get a mousedown, close the tooltip and cancel the timer. r=saari.
git-svn-id: svn://10.0.0.236/trunk@75286 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 01:05:58 +00:00
harishd%netscape.com
54856496e7 Migrating
-------------
46269 [nsbeta2+] - Fixed a crash, in CStartToken::IsEmpty(), caused by a wrong casting.
r=hiekki.


git-svn-id: svn://10.0.0.236/trunk@75284 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 01:02:09 +00:00
bryner%uiuc.edu
fcdb5021b6 Fix for bug 42052 (auto->none for max-width of menuitems in
menulists).  r=ben.


git-svn-id: svn://10.0.0.236/trunk@75283 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 00:59:37 +00:00
tao%netscape.com
167b9652ed 1683: Missing Buddy list from sidebar on new install.r=sgehani,a=pdt.
git-svn-id: svn://10.0.0.236/trunk@75282 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 00:57:33 +00:00
tao%netscape.com
c0c2db4c65 1683: BuddyList missing from sidebar on new install.r=sgehani,a=pdt.
git-svn-id: svn://10.0.0.236/trunk@75278 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 00:53:48 +00:00
pinkerton%netscape.com
70845ccdeb fix for 38359, link drags not firing if mouse was close to an edge. we need to fake out the ESM by setting |mCurrentTarget| to where the mouse went down so event.target is correct in JS. r=saari.
git-svn-id: svn://10.0.0.236/trunk@75276 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 00:35:23 +00:00
pinkerton%netscape.com
385e7049b5 Fix for 38359, reset cursor to arrow before invoking d&d.
git-svn-id: svn://10.0.0.236/trunk@75275 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-01 00:32:17 +00:00
dimator%netscape.com
70e672b557 Bug 23760. Updating threaded/unthreaded column icons. r=putterman
git-svn-id: svn://10.0.0.236/trunk@75274 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 23:38:21 +00:00
BlakeR1234%aol.com
3b81294931 Fix bug 47020, add menu checkmarks. r=jag a=putterman
git-svn-id: svn://10.0.0.236/trunk@75273 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 23:25:41 +00:00
vidur%netscape.com
a381dc926f Adding xmlextras to the default build target so that it can be included in the nightlies as per leaf. a=leaf, r=pollmann
git-svn-id: svn://10.0.0.236/trunk@75272 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 23:14:24 +00:00
bryner%uiuc.edu
d7af85ee20 Patch from blizzard to fix 45808 (unable to get focus in file input
textfield on Linux).  r=me.


git-svn-id: svn://10.0.0.236/trunk@75271 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 23:00:28 +00:00
pinkerton%netscape.com
486c5bf240 for bug 39326, don't send the drop event to gecko if the canDrop is false on the drag session.
git-svn-id: svn://10.0.0.236/trunk@75270 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 22:54:03 +00:00
pinkerton%netscape.com
9fd9b17356 for bug 39326, add a drag over handler to reject drags from the same content area. better than the way i did it before.
git-svn-id: svn://10.0.0.236/trunk@75269 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 22:53:26 +00:00
mcafee%netscape.com
110cd31496 Saving horizontal space in diskspace pref pane (40888). r=matt
git-svn-id: svn://10.0.0.236/trunk@75268 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 22:47:26 +00:00
wtc%netscape.com
3e5e5fc62e Bugzilla bug #17223: fixed an error found when I compiled on Mac.
git-svn-id: svn://10.0.0.236/trunk@75267 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 22:40:12 +00:00
ben%netscape.com
1d954ee091 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support. 46613 - Make unix build the windows classic skin for now. Also a good test
for system colour support.


git-svn-id: svn://10.0.0.236/trunk@75266 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 22:29:30 +00:00
ducarroz%netscape.com
73c8ac5a65 Cleanup message compose menus. That fix bugs 23458, 33076, 33500, 39791, 39843, 39852, 40210, 40302, 40313, 40315, 40323, 40328, 40339, 45932.
R=mscott


git-svn-id: svn://10.0.0.236/trunk@75265 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 22:09:48 +00:00
BlakeR1234%aol.com
a0f91732e3 Fix bug 47036, remove ellipses from Edit | Preferences to conform to UI guidelines. r=jag, a=brade
git-svn-id: svn://10.0.0.236/trunk@75264 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 22:03:04 +00:00
sfraser%netscape.com
b3e4027389 Fix for bug 47084 - assertion because GetElementById was sometimes called with an empty string. r=pinkerton.
git-svn-id: svn://10.0.0.236/trunk@75263 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 21:47:44 +00:00
ducarroz%netscape.com
2e93b95d49 Fix for bug 35746. Replace prefilled recipients (reply-to, bcc) when switching identity. R=mscott
git-svn-id: svn://10.0.0.236/trunk@75262 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 21:46:33 +00:00
pinkerton%netscape.com
75160f506a for bug 39326, don't load urls dragged from the same content area.
git-svn-id: svn://10.0.0.236/trunk@75261 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 21:35:01 +00:00
ben%netscape.com
b6f87a4424 one of these days I won't suck. Not any day soon though, I'd wager.
git-svn-id: svn://10.0.0.236/trunk@75260 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 21:29:59 +00:00
alecf%netscape.com
d76f600e57 fix for #38834 r=ben (last week sometime)
make wizard page X of Y localizable


git-svn-id: svn://10.0.0.236/trunk@75259 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 21:26:29 +00:00
BlakeR1234%aol.com
fa4f81157e Fix for bug 47037, remove unnecessary ellipses from some Composer menu items. r=jag, a=brade
git-svn-id: svn://10.0.0.236/trunk@75258 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 21:25:31 +00:00
gagan%netscape.com
f67c707f01 Fix for bug 20145. Proxy Auto Config is now in. For more information check http://www.mozilla.org/docs/netlib/pac.html r=bryner,rjc.
git-svn-id: svn://10.0.0.236/trunk@75257 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 21:24:55 +00:00
mcafee%netscape.com
666c90e0b5 Cleaning up cache pref panel (40888). r=matt
git-svn-id: svn://10.0.0.236/trunk@75256 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 21:22:53 +00:00
nboyd%atg.com
82561ae36e Fix javadoc.
git-svn-id: svn://10.0.0.236/trunk@75255 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 21:19:05 +00:00
ben%netscape.com
f3a97337d1 forgot to check this file in with previous checkin for pink...
git-svn-id: svn://10.0.0.236/trunk@75254 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 21:10:56 +00:00
bryner%uiuc.edu
f1aaaa287d Removing obsolete files. Not part of the build. r=alecf.
git-svn-id: svn://10.0.0.236/trunk@75253 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 21:08:23 +00:00
alecf%netscape.com
98d754b06b oops, back out this printf, didn't mean for it to go in
git-svn-id: svn://10.0.0.236/trunk@75251 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 20:58:08 +00:00
alecf%netscape.com
a98365dfed fix for #46379 by dougt@netscape.com, r=alecf
fix some leaked interface pointers in nsPref


git-svn-id: svn://10.0.0.236/trunk@75250 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 20:56:54 +00:00
pinkerton%netscape.com
c1421e9b63 Make the document where the drag originated available from the drag session. bug 39326
git-svn-id: svn://10.0.0.236/trunk@75249 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 20:51:42 +00:00
alecf%netscape.com
70c4ff39d8 fixes for #45079, #45695, #45809, #45722, #46374, #46393, and probably lots of other bugs related to cleaning up the account manager UI.
Stay tuned for more.. same bat time, same bat channel.
r=ben@netscape.com


git-svn-id: svn://10.0.0.236/trunk@75247 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 20:42:48 +00:00
nelsonb%netscape.com
02e48f1881 Fix initalizers in logtab.h to be "float" values, not "double" values.
git-svn-id: svn://10.0.0.236/trunk@75245 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 20:36:41 +00:00
mkaply%us.ibm.com
4b97bec576 45872
r=mkaply, a=brendan
Fixes for tiling of bitmaps - make them faster and fix 256 color


git-svn-id: svn://10.0.0.236/trunk@75244 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 20:36:14 +00:00
colin%theblakes.com
567fb479a9 Prevent very long commands from getting generated. r,a=waterson
git-svn-id: svn://10.0.0.236/trunk@75243 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 20:36:05 +00:00
alecf%netscape.com
8934b0b4a8 #36965: make prefs use nsIFile - first part is to add APIs that will eventually replace GetFilePref
r=conrad@ingress.com


git-svn-id: svn://10.0.0.236/trunk@75242 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 20:27:22 +00:00
ben%netscape.com
97da702180 some required groundwork for pink for his nsbeta3+ bug 39326
git-svn-id: svn://10.0.0.236/trunk@75241 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 20:26:08 +00:00
mcafee%netscape.com
3af671024c Ignore generated files.
git-svn-id: svn://10.0.0.236/trunk@75240 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 20:24:43 +00:00
nelsonb%netscape.com
d256d4063c Fix build problem caused by the fact that including stdlib.h implicitly
includes stdio.h on some platforms, but not on others.


git-svn-id: svn://10.0.0.236/trunk@75239 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 20:08:46 +00:00
larryh%netscape.com
7dac99e45a BugZilla: 46630. Log buffer size
git-svn-id: svn://10.0.0.236/trunk@75238 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 18:58:55 +00:00
wtc%netscape.com
3bc8962650 Bugzilla bug #46417: allow stdin, stdout, and stderr to be redirected
to the same osfd (e.g., a socket is bidirectional and hence we can
redirect both stdin and stdout to the same socket).  Thanks to
Rob McCool <robm@robm.com> for the bug report and suggesting a fix.


git-svn-id: svn://10.0.0.236/trunk@75237 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 18:53:20 +00:00
wtc%netscape.com
46ffb41619 Bugzilla bug #46525: checked in a fix to silence a Purify UMR warning.
Thanks to Daniel Bratell <bratell@lysator.liu.se> for the bug report
and the fix.


git-svn-id: svn://10.0.0.236/trunk@75236 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 18:15:38 +00:00
vidur%netscape.com
25ce7279d8 Fixed leak of weak reference (thanks beard@netscape.com). Fixed makefiles to avoid overwriting xpt files. This is not part of the regular build
git-svn-id: svn://10.0.0.236/trunk@75235 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 16:48:54 +00:00
brade%netscape.com
be286422e9 add comment and modifier="false" to some keybindings
git-svn-id: svn://10.0.0.236/trunk@75234 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 13:24:09 +00:00
brade%netscape.com
308345d274 unix keybindings for ctrl-shift home/end (bug #43122)
git-svn-id: svn://10.0.0.236/trunk@75233 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 13:20:57 +00:00
brade%netscape.com
0c4a96d4cd change conflicting ids (#43122)
git-svn-id: svn://10.0.0.236/trunk@75232 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 13:17:40 +00:00
brade%netscape.com
a3c64268eb remove title string (bug #45088); r=bking@xmlw.ie
git-svn-id: svn://10.0.0.236/trunk@75231 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 13:03:45 +00:00
brade%netscape.com
79786792da tooltips (bug #9767)
git-svn-id: svn://10.0.0.236/trunk@75230 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 12:49:38 +00:00
cls%seawood.org
590cd3db6c Explicitly copy ua.css so that mathml doesn't modify it in the source tree.
git-svn-id: svn://10.0.0.236/trunk@75229 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 06:37:52 +00:00
BlakeR1234%aol.com
5ef5627a77 Oops; fix capitalization error in my last checkin.
git-svn-id: svn://10.0.0.236/trunk@75228 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 05:51:29 +00:00
BlakeR1234%aol.com
c8451d24ff Fix bug 37940, implement IE-style Text Size menu. Thanks to jag for the help. r=jag
git-svn-id: svn://10.0.0.236/trunk@75227 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 05:01:03 +00:00
BlakeR1234%aol.com
ac8d315c84 Fix bug 37940, implement IE-style Text Size menu. Thanks to jag for the help. r=jag
git-svn-id: svn://10.0.0.236/trunk@75226 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 04:54:02 +00:00
pavlov%netscape.com
54a4364827 fixing other people's build bustage bug 43826 r=bryner
git-svn-id: svn://10.0.0.236/trunk@75225 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 04:40:06 +00:00
cls%seawood.org
5762ef1fd6 Some of our tinderbox machines are slow (understatement) so make the timeouts for bloat tests & dom conversions configurable, otherwise we'll never see green.
git-svn-id: svn://10.0.0.236/trunk@75224 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 04:03:03 +00:00
dougt%netscape.com
ab256053d1 r,a=brendan@mozilla.org 24052
git-svn-id: svn://10.0.0.236/trunk@75223 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 03:46:22 +00:00
bryner%uiuc.edu
add96b82b8 Bug 41409 - make unix filepicker start out in home directory instead of root directory. r=pavlov.
git-svn-id: svn://10.0.0.236/trunk@75222 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 03:41:18 +00:00
cls%seawood.org
65d809d86e Link in util lib when perf-metrics are enabled.
git-svn-id: svn://10.0.0.236/trunk@75221 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 02:19:57 +00:00
BlakeR1234%aol.com
445d95e98f Fix bug 37982 and bug 9997
git-svn-id: svn://10.0.0.236/trunk@75220 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 00:57:01 +00:00
ftang%netscape.com
620180504e fix bug 46272 r=mjudge/brade use CopyUnicharPref instead of CopyCharPref
for non ASCII data- Author. a=ftang


git-svn-id: svn://10.0.0.236/trunk@75219 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 00:43:25 +00:00
ftang%netscape.com
a8d2d03cf7 fix for bug 26938. r=tao a=ftang. fix \u encoding conversion so \n \r \t\ will be
convert to \n \r \t


git-svn-id: svn://10.0.0.236/trunk@75218 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 00:40:20 +00:00
ftang%netscape.com
b84273a322 fix 5313. r-hnotta a=ftang listen to the ACCEPT-CHARSET attribute
before listen to the docuement charset to decide which charset
for form submition


git-svn-id: svn://10.0.0.236/trunk@75217 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 00:37:06 +00:00
ftang%netscape.com
f38e7dc2dd fix bug 5313. Change "acceptcharset" to "accept-charset" according to
HTML 4.0 section 17.13.4 r=nhotta a=ftang


git-svn-id: svn://10.0.0.236/trunk@75216 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-31 00:35:20 +00:00
putterman%netscape.com
14515507a0 Fix for 46390. Crash on exit when using mailnews. Putting on tip, already checked into branch. r=alecf.
git-svn-id: svn://10.0.0.236/trunk@75215 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 22:03:18 +00:00
BlakeR1234%aol.com
2d48c6bdd2 Bug 44474, improve html checkbox/radio button appearance, and bug 38427
git-svn-id: svn://10.0.0.236/trunk@75214 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 21:39:07 +00:00
BlakeR1234%aol.com
dd974603d4 More work for bug 44474.
git-svn-id: svn://10.0.0.236/trunk@75213 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 21:29:35 +00:00
morse%netscape.com
397833561e fix bug 46947, localization of strings in wallet interview form, r=dp
git-svn-id: svn://10.0.0.236/trunk@75212 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 20:07:43 +00:00
cls%seawood.org
9eb2322a70 Change requires to 5.003. Fixed scoping problems with 5.003. Fixed ambigious name use under 5.003. Set LIBPATH so AIX builds can run tests. Allow --depend/--clobber options to properly override tinder-config.pl settings. Add os_ver to default build name. Set BuildName & friends after args have been completely parsed.
git-svn-id: svn://10.0.0.236/trunk@75211 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 19:59:28 +00:00
cls%seawood.org
008b385261 Only set CVSROOT using netscape.com address if CVSROOT is not already set. Change requires to 5.003
git-svn-id: svn://10.0.0.236/trunk@75210 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 19:54:16 +00:00
morse%netscape.com
5781121d8c fix bug 46699, crash on many sites, r=jar, a=jar
git-svn-id: svn://10.0.0.236/trunk@75209 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 19:50:47 +00:00
BlakeR1234%aol.com
c418b7516e Classic skin work (46613)
git-svn-id: svn://10.0.0.236/trunk@75208 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 19:28:18 +00:00
BlakeR1234%aol.com
7c41e37a91 Fix bug 41809
git-svn-id: svn://10.0.0.236/trunk@75207 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 19:16:29 +00:00
BlakeR1234%aol.com
3530f57cf6 Minor wording change (44473)
git-svn-id: svn://10.0.0.236/trunk@75206 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 18:46:24 +00:00
BlakeR1234%aol.com
49f4db362f Fix bug 43257
git-svn-id: svn://10.0.0.236/trunk@75205 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 18:26:27 +00:00
BlakeR1234%aol.com
8087d57440 Fix bug 43257
git-svn-id: svn://10.0.0.236/trunk@75204 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 18:21:06 +00:00
morse%netscape.com
ae40919f80 minor wording change
git-svn-id: svn://10.0.0.236/trunk@75203 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 17:16:42 +00:00
hyatt%netscape.com
a6d254fa73 Oops. really fix 30644. r=ben
git-svn-id: svn://10.0.0.236/trunk@75202 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 07:35:21 +00:00
hyatt%netscape.com
f24222db0c Fix for 30644. r=ben
git-svn-id: svn://10.0.0.236/trunk@75201 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 07:19:58 +00:00
hyatt%netscape.com
7b5c94fdfd Fix tree painting bug. r=ben
git-svn-id: svn://10.0.0.236/trunk@75200 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 07:05:04 +00:00
BlakeR1234%aol.com
b93eb7a136 Bug 44733
git-svn-id: svn://10.0.0.236/trunk@75199 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 06:57:38 +00:00
ben%netscape.com
ae43a6d29a some code tidy up for prefs after my previous checkin -
1) remove mousewheel pref panels from Mac build (there is no mousewheel support on mac, they're not needed)
2) remove js that did platform checking for winhooks and mousewheel from the prefwindow. This is unneeded now
that the panels are overlayed by the build system. no runtime checking is needed.


git-svn-id: svn://10.0.0.236/trunk@75198 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 06:40:30 +00:00
ben%netscape.com
f0444108cf update build lists for my previous checkin...
git-svn-id: svn://10.0.0.236/trunk@75197 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 06:38:22 +00:00
nelsonb%netscape.com
e41658ac33 Use Windowed computation of exponent in mp_exptmod().
git-svn-id: svn://10.0.0.236/trunk@75196 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 06:37:14 +00:00
nelsonb%netscape.com
ca5318ba6e Add function mpl_get_bits(). Returns value of contiguous subset of bits
of bignum.  Useful for windowed modular exponentiation.


git-svn-id: svn://10.0.0.236/trunk@75195 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 06:35:38 +00:00
ben%netscape.com
d76813a0c7 fixes for 13977 - make sure that 'Use Windows colors' shows up only on Windows, rather than on all platforms.
While we're at it, make the integration of winhooks and mousewheel a little cleaner.


git-svn-id: svn://10.0.0.236/trunk@75194 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 06:35:33 +00:00
BlakeR1234%aol.com
cdd091d1b8 Bug 44694
git-svn-id: svn://10.0.0.236/trunk@75193 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 06:14:55 +00:00
BlakeR1234%aol.com
7c3df7d271 Clean up history window...
git-svn-id: svn://10.0.0.236/trunk@75192 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 06:09:06 +00:00
BlakeR1234%aol.com
fdf7b5ce90 Clean up history window. Also fixes bug 44732.
git-svn-id: svn://10.0.0.236/trunk@75191 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 06:04:58 +00:00
BlakeR1234%aol.com
8203ea88eb Clean up work, also fixes bug 44689.
git-svn-id: svn://10.0.0.236/trunk@75190 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 05:45:27 +00:00
BlakeR1234%aol.com
6e15ece5d5 Clean up Bookmarks/History search window. also fixes bugs 44695, 44697, 44690.
git-svn-id: svn://10.0.0.236/trunk@75189 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 05:40:58 +00:00
ben%netscape.com
ff91eb02e8 fix for 42869, making the profile manager a bit more localisable + allowing vendor customisation.
git-svn-id: svn://10.0.0.236/trunk@75188 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 05:29:59 +00:00
morse%netscape.com
ec645543a3 fix bug 43227, hide quickfill menu item on all platforms, r=ben
git-svn-id: svn://10.0.0.236/trunk@75187 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 04:44:18 +00:00
BlakeR1234%aol.com
974eeafb56 Classic skin work (46613). Decrease the min-width of buttons to better replicate win32 buttons. r=ben
git-svn-id: svn://10.0.0.236/trunk@75186 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 04:32:58 +00:00
morse%netscape.com
f7b4b88523 fix bug 46464, split signon viewer into two separate viewers, r=ben
git-svn-id: svn://10.0.0.236/trunk@75185 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 04:25:54 +00:00
pavlov%netscape.com
d2b4681dcf fix for creating too many nsToolkit objects on unix bug 16328 r=cls
git-svn-id: svn://10.0.0.236/trunk@75184 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 03:39:42 +00:00
ben%netscape.com
233eb23916 Correct platform keyboard accelerator support for navigation. Should work this time. b46803
git-svn-id: svn://10.0.0.236/trunk@75183 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 03:36:52 +00:00
BlakeR1234%aol.com
9f4c5558d5 Fix disabled style rules for HTML checkboxes and radio buttons (44474). a=ekrock
git-svn-id: svn://10.0.0.236/trunk@75182 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 03:09:37 +00:00
BlakeR1234%aol.com
0b95d0a63e Rest of the fix for bug 44474. Improves the appearance of HTML radio buttons. a=ekrock
git-svn-id: svn://10.0.0.236/trunk@75181 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 03:03:31 +00:00
nelsonb%netscape.com
de8926dab3 MPI Arbitrary Precision Integer Arithmetic library.
The Initial Developer of the Original Code is
Michael J. Fromberger <sting@linguist.dartmouth.edu>


git-svn-id: svn://10.0.0.236/trunk@75180 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 02:05:19 +00:00
BlakeR1234%aol.com
a5bf340b0c Fix for bug 41402, very minor. r=me
git-svn-id: svn://10.0.0.236/trunk@75179 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 02:02:53 +00:00
nelsonb%netscape.com
ce10ed0ff4 MPI Arbitrary Precision Integer Arithmetic library.
The Initial Developer of the Original Code is
Michael J. Fromberger <sting@linguist.dartmouth.edu>


git-svn-id: svn://10.0.0.236/trunk@75178 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 01:56:35 +00:00
BlakeR1234%aol.com
0791ddd9ce Fix for bug 35770. Patch by jrgm@netscape.com, r=me
git-svn-id: svn://10.0.0.236/trunk@75177 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 01:44:55 +00:00
BlakeR1234%aol.com
f8584ed533 Bug 45707
git-svn-id: svn://10.0.0.236/trunk@75176 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 01:33:50 +00:00
BlakeR1234%aol.com
add0c9cdb8 Part of bug 45707. a=johng, german
git-svn-id: svn://10.0.0.236/trunk@75175 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 01:29:01 +00:00
BlakeR1234%aol.com
8a01712169 Fix 17608 a=vera
git-svn-id: svn://10.0.0.236/trunk@75174 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 01:22:12 +00:00
BlakeR1234%aol.com
a31a1fc9c6 Fix bug 43893.
git-svn-id: svn://10.0.0.236/trunk@75173 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 01:06:56 +00:00
BlakeR1234%aol.com
8e9e03a8d5 Classic skin work (bug 46613) a=johng
git-svn-id: svn://10.0.0.236/trunk@75172 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-30 00:38:27 +00:00
BlakeR1234%aol.com
9ed3184949 Remove redundant <html> tags (part of bug 42202) r=me, simple fix
git-svn-id: svn://10.0.0.236/trunk@75171 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 22:49:45 +00:00
BlakeR1234%aol.com
8ce9ec7b53 Fix for bug 43617, small regression patch.
git-svn-id: svn://10.0.0.236/trunk@75170 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 22:34:47 +00:00
BlakeR1234%aol.com
3f5ec18e56 Part of fix for bug 44474, to improve upon the appearance of HTML checkboxes. a=ekrock
git-svn-id: svn://10.0.0.236/trunk@75169 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 22:11:44 +00:00
morse%netscape.com
74736c0a31 bug 46883, move wallet interview form from server to client, r=pnunn
git-svn-id: svn://10.0.0.236/trunk@75168 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 20:50:30 +00:00
morse%netscape.com
589de4e8ac this is not part of build yet
git-svn-id: svn://10.0.0.236/trunk@75167 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 20:46:24 +00:00
morse%netscape.com
28b2fb591d this is not part of build yet
git-svn-id: svn://10.0.0.236/trunk@75166 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 20:45:44 +00:00
nelsonb%netscape.com
f8274b2cfc Build mpi library files in freebl.
git-svn-id: svn://10.0.0.236/trunk@75164 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 19:07:22 +00:00
nelsonb%netscape.com
8f09fd4435 Separate DH implementation for use with BSAFE and mpi-based implementation
into two files.


git-svn-id: svn://10.0.0.236/trunk@75163 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 19:06:54 +00:00
morse%netscape.com
f78674f4d2 interview form for wallet, not part of build yet
git-svn-id: svn://10.0.0.236/trunk@75162 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 18:51:30 +00:00
rjc%netscape.com
dc56a78072 Small sorting fix. (Can't find bug #) r=me
git-svn-id: svn://10.0.0.236/trunk@75161 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 16:15:48 +00:00
hyatt%netscape.com
2475c1f8ed Patch to avoid observing the document so early. r=attinasi
git-svn-id: svn://10.0.0.236/trunk@75160 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 09:52:06 +00:00
hyatt%netscape.com
52fb92c9d0 More of teh same.
git-svn-id: svn://10.0.0.236/trunk@75159 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 08:38:03 +00:00
hyatt%netscape.com
47086a9c88 More of the same.
git-svn-id: svn://10.0.0.236/trunk@75158 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 08:37:49 +00:00
ben%netscape.com
0436cd4e6b fixing build bustage by removing include of overlay. too tired to figure out
why this is happening, will attempt to hook this up again tomorrow.


git-svn-id: svn://10.0.0.236/trunk@75157 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 08:32:43 +00:00
hyatt%netscape.com
f3042b3427 Halving the number of frames used for tree cells. r=ben
git-svn-id: svn://10.0.0.236/trunk@75156 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 08:22:51 +00:00
ben%netscape.com
f550faa147 forgot to add makefiles earlier...
git-svn-id: svn://10.0.0.236/trunk@75155 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 08:21:09 +00:00
dougt%netscape.com
438b051bb2 46044 fixes ABR. submitted by jband@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@75154 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 08:13:39 +00:00
dougt%netscape.com
be9a6b605e slashes wrong way.
Not part of build.


git-svn-id: svn://10.0.0.236/trunk@75153 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 08:09:21 +00:00
ben%netscape.com
596e21c82a fix makefiles
git-svn-id: svn://10.0.0.236/trunk@75152 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 06:51:43 +00:00
ben%netscape.com
cdb8546ba8 46803, XP keyboard accelerators for navigation.
git-svn-id: svn://10.0.0.236/trunk@75151 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 06:48:57 +00:00
rhp%netscape.com
56bedac9da Fix for duplicating ABSync entries on sync operations - Bug #: 1680 - r: mozilla@bucksch.org
git-svn-id: svn://10.0.0.236/trunk@75150 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 05:04:43 +00:00
waterson%netscape.com
5731633fc2 Fix off-by-one error that jband found.
git-svn-id: svn://10.0.0.236/trunk@75148 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 03:34:55 +00:00
morse%netscape.com
de9aaf790a fix bug 46906, minor typo in dialog, submitted by wallet.properties
git-svn-id: svn://10.0.0.236/trunk@75147 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 03:28:31 +00:00
ben%netscape.com
8de618903a fixing busted tab widgets. accidentally checked in the wrong version of this file last night. This was causing various parts of the app to not appear (bookmark properties dialog, bottom half of themes pref panel, new card dialog in address book, etc)
git-svn-id: svn://10.0.0.236/trunk@75146 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 03:26:49 +00:00
waterson%netscape.com
4f776f02d4 Fix Win32 build bustage.
git-svn-id: svn://10.0.0.236/trunk@75145 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 03:13:41 +00:00
scc%mozilla.org
6ef6f1fd36 fixes for bugs #46898 and #46899: bad behavior in |nsCString::ToInteger| and a feature request for |ns[C]String::SetCapacity(0)| respectively. r={harishd, waterson}, a=waterson
git-svn-id: svn://10.0.0.236/trunk@75144 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 03:11:59 +00:00
waterson%netscape.com
c222336587 Bug 46702. Move nsFixedSizeAllocator to xpcom/ds so it can be used outside of RDF.
git-svn-id: svn://10.0.0.236/trunk@75143 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 03:01:46 +00:00
waterson%netscape.com
2888132355 Bug 46702. Move nsFixedSizeAllocator.[h|cpp] to xpcom/ds so that we can use it outside of RDF.
git-svn-id: svn://10.0.0.236/trunk@75142 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 02:58:43 +00:00
waterson%netscape.com
7d3c7affc8 Bug 46702. Move nsFixedSizeAllocator.[h|cpp] to xpcom/ds so that it can be used outside of RDF.
git-svn-id: svn://10.0.0.236/trunk@75141 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 02:58:10 +00:00
mkaply%us.ibm.com
691e351a8a OS/2 Tinderbox breakage
Use PR_TRUE not true


git-svn-id: svn://10.0.0.236/trunk@75140 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 02:36:54 +00:00
neeti%netscape.com
f375211dd9 fix for bug 40084, [CRASH] Crash in disk cache code, backed out changes made on 7/27, put new fix
fix for bug 46014, No keywords loaded on bugzilla pages, r/a=gagan


git-svn-id: svn://10.0.0.236/trunk@75139 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 02:32:14 +00:00
neeti%netscape.com
ec6f6a23f7 fix for bug 40084, [CRASH] Crash in disk cache code, backed out changes made on 7/27, put new fix
git-svn-id: svn://10.0.0.236/trunk@75138 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 02:30:30 +00:00
rginda%netscape.com
c69750c8cd shut up "unused param" warnings by only naming the register param if the icode uses a RegisterList operand.
git-svn-id: svn://10.0.0.236/trunk@75134 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 02:00:12 +00:00
wtc%netscape.com
2119da1ef5 Bugzilla bug #45223: define HAVE_LONG_LONG on Mac. Removed unused
variable dstLocalBaseMicroseconds and do not export
gJanuaryFirst1970Seconds.
Modified files: mactime.c, prcpucfg.h


git-svn-id: svn://10.0.0.236/trunk@75133 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 01:58:46 +00:00
jband%netscape.com
63a37a4174 fix 46904. a=warren. Same change as on m17 branch
git-svn-id: svn://10.0.0.236/trunk@75132 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 01:52:59 +00:00
mcafee%netscape.com
b7cefbfc9c Tightening up composer pref UI for (5236). r=akkana
git-svn-id: svn://10.0.0.236/trunk@75131 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 01:51:40 +00:00
wtc%netscape.com
53dd5fe525 Bugzilla bug #46909: on Mac, define _PR_LOCAL_THREADS_ONLY in _macos.h
as opposed to prcpucfg.h.


git-svn-id: svn://10.0.0.236/trunk@75130 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 01:51:00 +00:00
mcafee%netscape.com
5ef2934b94 Obsoleting pref-languages2.xul,dtd. Merging changes back into pref-languages.xul,dtd. Part of cleanup for (5236). r=slamm
git-svn-id: svn://10.0.0.236/trunk@75127 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 01:18:02 +00:00
waterson%netscape.com
37cde4ad0b Bug 46702. Move nsFixedSizeAllocator.[h|cpp] out of rdf/base/src. Not yet part of the build.
git-svn-id: svn://10.0.0.236/trunk@75121 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 01:00:37 +00:00
wtc%netscape.com
ae616730c7 Bugzilla bug #46506: use pthreads by default on FreeBSD.
git-svn-id: svn://10.0.0.236/trunk@75120 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 00:50:35 +00:00
wtc%netscape.com
8e6cdb6eba Bugzilla bug #45732: define align of double and long long for powerpc
correctly, and define the macros HAVE_ALIGNED_LONGLONGS and
HAVE_ALIGNED_DOUBLES if long longs or doubles are 8-byte aligned.
Thanks to Kevin B. Hendricks <khendricks@ivey.uwo.ca> and
Franz.Sirl-kernel@lauterbach.com for reporting the bug and suggesting a
fix.


git-svn-id: svn://10.0.0.236/trunk@75119 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 00:38:00 +00:00
matt%netscape.com
ac7deb52cc fixing bug for 27436
moving accesskeys to a dtd file
r:tina


git-svn-id: svn://10.0.0.236/trunk@75118 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 00:32:40 +00:00
wtc%netscape.com
789e9a5b4b Bugzilla bug #45432: fixed memory leak in pr_Mac_LoadNamedFragment and
pr_Mac_LoadIndexedFragment.


git-svn-id: svn://10.0.0.236/trunk@75117 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 00:27:37 +00:00
pavlov%netscape.com
1f775cfe2d fix for mem leak bug 43580 r=slamm
git-svn-id: svn://10.0.0.236/trunk@75116 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 23:59:37 +00:00
pavlov%netscape.com
246a2e8ce5 fix for clipboard crash bug #46195 r=slamm
git-svn-id: svn://10.0.0.236/trunk@75115 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 23:56:43 +00:00
mozilla.BenB%bucksch.org
edb0e79de0 Accidently swaped PRBool and PRInt32 in my last checkin. r=akk
git-svn-id: svn://10.0.0.236/trunk@75114 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 23:49:12 +00:00
sfraser%netscape.com
d36d1b2c49 Always export the instrumentation header now.
git-svn-id: svn://10.0.0.236/trunk@75113 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 23:48:18 +00:00
sfraser%netscape.com
2b2e78f1d1 This file has moved to mozilla/lib/mac/Instrumentation
git-svn-id: svn://10.0.0.236/trunk@75112 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 23:47:30 +00:00
sfraser%netscape.com
623813cfe0 New files for profiling on Mac
git-svn-id: svn://10.0.0.236/trunk@75111 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 23:45:55 +00:00
mozilla.BenB%bucksch.org
7796c1500d 44439: Support headers (3 modes), <dd>/<dt>, <q>, <code>, <th>.
Improved <img>, </blockquote>.
Improved "unknown" block and (some) inline tags.
Pref for structured phrases.
r=akk, a=waterson


git-svn-id: svn://10.0.0.236/trunk@75106 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 23:18:12 +00:00
javi%netscape.com
3cb50139c9 Add a Certificate Content Listener so that mozilla can download a
certificate from VeriSign.

bug 45878
r=mscott, valeski


git-svn-id: svn://10.0.0.236/trunk@75104 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 23:14:55 +00:00
pinkerton%netscape.com
699b76deb0 fix for bug 29569, truncating mac menus better. Also pushes around and refactors a lot of our ugly i18n font code. r=sfraser.
git-svn-id: svn://10.0.0.236/trunk@75103 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 23:12:43 +00:00
nelsonb%netscape.com
833e89e919 Build libmpi.a. Include mpmontg.o in libmpi.a. Build programs with
libmpi.a.  Fix dependencies so lib is rebuilt when headers change.


git-svn-id: svn://10.0.0.236/trunk@75102 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 23:11:12 +00:00
nelsonb%netscape.com
ce809ee0e7 Modular exponentiation with Montgomery reduction for MPI.
The Initial Developer of the Original Code is
Netscape Communications Corporation.  Portions created by Netscape are
Copyright (C) 2000 Netscape Communications Corporation.
All Rights Reserved.


git-svn-id: svn://10.0.0.236/trunk@75101 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 23:09:02 +00:00
slamm%netscape.com
a9efe402ba Single click behavior for What's Related panel. Now it is consistent with the Search panel. bug 41609. r=mcafee
git-svn-id: svn://10.0.0.236/trunk@75100 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 23:06:21 +00:00
nelsonb%netscape.com
4ac0fae83a Disambiguoate error messages in mod-expt test.
git-svn-id: svn://10.0.0.236/trunk@75098 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 23:04:23 +00:00
nelsonb%netscape.com
76a7f72c49 - Renamed mp_exptmod to s_mp_exptmod. This function is now used only in
when the modulus is even. mp_exptmod is now in mpmontg.c.
- Declare and define new function s_mp_mul_d_add_offset(), which computes
the product of an mp_digit and an mp_int, shifts the product to the left
by a number of digits, and adds the shifted product to another mp_int.
Used in multiplication and Montgomery reduction.  Numerous platform
vendors have assembly language versions of this function.
- Removed some ANDs with DIGIT_MAX.  Casting to mp_digit is necessary
and sufficient.  The AND doesn't help.


git-svn-id: svn://10.0.0.236/trunk@75097 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 23:03:12 +00:00
dmose%mozilla.org
78d808b468 Building on windows now works, using ENABLE LDAP. Removed from the list.
git-svn-id: svn://10.0.0.236/trunk@75096 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 22:57:12 +00:00
nelsonb%netscape.com
df3ba7efed Use unsigned int for mp_digit instead of unsigned long when both are
32-bits.  This reduced warnings.  Use mp_size instead of unsigned int
in function declarations. Fix MP_DIGIT_FMT for 32-bit digits.


git-svn-id: svn://10.0.0.236/trunk@75095 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 22:55:56 +00:00
dbaron%fas.harvard.edu
7b4002d7bf Fix two stupid mistakes I made in the block regression test script. Not part of build. r=pollmann
git-svn-id: svn://10.0.0.236/trunk@75094 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 22:50:30 +00:00
nelsonb%netscape.com
5b69fa4787 Use mp_size instead of unsigned int in function prototypes.
git-svn-id: svn://10.0.0.236/trunk@75093 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 22:49:42 +00:00
scc%mozilla.org
cdfd44fe36 adding a needed prefix file, these are not part of the build, just part of the string test framework (as was StringTest.mcp, just checked in)
git-svn-id: svn://10.0.0.236/trunk@75092 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 22:47:17 +00:00
scc%mozilla.org
a9cd93aecc get rid of "nsWorkString"
git-svn-id: svn://10.0.0.236/trunk@75091 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 22:45:58 +00:00
sgehani%netscape.com
9af6937e1f Make linux installer work. Fix for nsbeta2+ bugscape b=1655; r=ssu
git-svn-id: svn://10.0.0.236/trunk@75090 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 22:45:12 +00:00
dmose%mozilla.org
9edfa0fbb1 ldap_set_option was being called incorrectly; fixed. a=r=(not built).
git-svn-id: svn://10.0.0.236/trunk@75089 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 22:44:43 +00:00
akkana%netscape.com
6bac56d91a Remove obsolete csh and .bat files -- use the perl file instead
git-svn-id: svn://10.0.0.236/trunk@75088 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 22:38:34 +00:00
akkana%netscape.com
78da8b6a0f Set LD_LIBRARY_PATH to make the test script more easily runnable; r=mozilla@bucksch.org
git-svn-id: svn://10.0.0.236/trunk@75087 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 22:36:52 +00:00
waterson%netscape.com
c607d4bc40 Bug 46693. Check to see if we CanContinueTextRun() while walking over the frames to FindNextText(). This revives the logic that I nuked when fixing 19051, and keeps you from trying to walk over <br> or other frames to erroneously continue a text run. r=akkana.
git-svn-id: svn://10.0.0.236/trunk@75085 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 22:29:28 +00:00
anthonyd%netscape.com
1355a05c4e bug fixes:
39529 - caret width not correct for single/muti line textfields, which relied on:
46445 -  nsLookAndFeel needs to be a service.
r: mjudge@netscape.com, kin@netscape.com
a:beppe


git-svn-id: svn://10.0.0.236/trunk@75084 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 22:12:45 +00:00
bryner%uiuc.edu
fa5b1a797a Fix for 46757. r=hyatt.
git-svn-id: svn://10.0.0.236/trunk@75083 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 22:09:45 +00:00
attinasi%netscape.com
3597de6638 Fix for bug 36849: Script animation that changes location and clip simultaneously no longer will flicker.
Checking in (for Robert O'Callahan) a change to the event priorities: reverting to standard priorities.
This was tested for weeks by several individuals with no bad effects reported. b=36849 r=attinasi


git-svn-id: svn://10.0.0.236/trunk@75082 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 21:58:14 +00:00
valeski%netscape.com
f8c7cff256 37669. removing unused buildURI code
git-svn-id: svn://10.0.0.236/trunk@75081 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 21:54:59 +00:00
attinasi%netscape.com
1f56e6138f Fix for bug 36849: Script animation that changes location and clip simultaneously no longer will flicker.
ApplyRenderingChangeToTree now always does a NO_SYNC update of the views where it used to sometimes do a SYNC update. b=36849 r=kmcclusk


git-svn-id: svn://10.0.0.236/trunk@75080 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 21:54:49 +00:00
attinasi%netscape.com
0434cb5cf6 Added more history data. Not part of build
git-svn-id: svn://10.0.0.236/trunk@75079 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 21:51:35 +00:00
larryh%netscape.com
d05d8c32f0 BugZilla: 4090. PR_APPEND
git-svn-id: svn://10.0.0.236/trunk@75078 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 21:51:07 +00:00
heikki%netscape.com
319fc39e43 Bugs 38399, 40889. r=jst.
git-svn-id: svn://10.0.0.236/trunk@75077 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 21:49:42 +00:00
heikki%netscape.com
4ab104dc0c Bugs 38399, 40889, 44211. Also fix two compiler warnings (mismatched signed/unsigned). r=jst (bug 44211 r=harishd).
git-svn-id: svn://10.0.0.236/trunk@75076 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 21:48:08 +00:00
mcafee%netscape.com
24ce689ef7 Simplifying languages label to save space, AND it reads better (5236). r=pavlov
git-svn-id: svn://10.0.0.236/trunk@75075 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 21:42:00 +00:00
rhp%netscape.com
a797dd80b8 Fix for following HTML standards - Bug #: 46788 - r: rhp - mozilla contribution
git-svn-id: svn://10.0.0.236/trunk@75074 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 21:38:32 +00:00
endico%mozilla.org
a43f96a5ea If the application is set up at the server root (e.g. bugzilla.mozilla.org) then this robots.txt disallows robots from scanning the site except for the top level file.
git-svn-id: svn://10.0.0.236/trunk@75073 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 21:28:41 +00:00
radha%netscape.com
efb5487142 Fix for bug # 41775. r=slamm
git-svn-id: svn://10.0.0.236/trunk@75072 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 21:21:10 +00:00
radha%netscape.com
22ff4c47cc Fix for bug # 41775. urlbar history entries persisted r=slamm
git-svn-id: svn://10.0.0.236/trunk@75071 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 21:20:39 +00:00
mscott%netscape.com
5a8dec538d Bug #1549 --> be sure to load existing accounts before trying to create an incoming server.
r=alecf


git-svn-id: svn://10.0.0.236/trunk@75070 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 21:16:58 +00:00
attinasi%netscape.com
467733d11c Fixed bug 44396: LINK elements now act like links when they have generated content. b=44396 r=dbaron
git-svn-id: svn://10.0.0.236/trunk@75069 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 20:57:08 +00:00
attinasi%netscape.com
248ad9b5be Fixed bug 44199: fixed position background images were not being treated as fixed in all cases. b=44199 r=dbaron
git-svn-id: svn://10.0.0.236/trunk@75068 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 20:50:57 +00:00
mcafee%netscape.com
4f25918723 Tightening up space in fonts pref panel (5236). r=akkana
git-svn-id: svn://10.0.0.236/trunk@75067 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 20:34:02 +00:00
kin%netscape.com
b200b0dc2d Fix for bug #46657: an Undo past default text value in a TextWidget
Modified CreateAnonymousContent() to disable editor undo before
setting the default value, and then reenable it afterwards.
r=brade@netscape.com


git-svn-id: svn://10.0.0.236/trunk@75066 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 13:53:26 +00:00
dbaron%fas.harvard.edu
00db0c5ed3 Add to block regression tests. Does not affect build.
git-svn-id: svn://10.0.0.236/trunk@75065 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 12:34:56 +00:00
dbaron%fas.harvard.edu
1f26e41fab Check in some debugging code that's very useful for finding leaked GC roots. This is #if 0, so it shouldn't affect anything. r=a=waterson
git-svn-id: svn://10.0.0.236/trunk@75064 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 12:18:29 +00:00
brade%netscape.com
6570564d2d handle control-shift-home/end keybindings (bug #43122)
git-svn-id: svn://10.0.0.236/trunk@75063 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 11:17:46 +00:00
cls%seawood.org
c939d4019b Oops. Remove define accidentally set with previous checkin.
git-svn-id: svn://10.0.0.236/trunk@75062 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 11:09:00 +00:00
brade%netscape.com
ade6b8764e handle control-shift-home/end keybindings (bug #43122)
git-svn-id: svn://10.0.0.236/trunk@75061 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 11:08:41 +00:00
brade%netscape.com
bf018ca524 add missing move/selection command (cmd_selectBottom); bug #22529
git-svn-id: svn://10.0.0.236/trunk@75060 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 10:53:27 +00:00
brade%netscape.com
d5c972c4d3 string changes for bug #45491 (from mpt@mailandnews.com)
git-svn-id: svn://10.0.0.236/trunk@75059 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 10:40:30 +00:00
brade%netscape.com
ec43934812 tooltips from simone (bug #9767)
git-svn-id: svn://10.0.0.236/trunk@75058 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 10:35:04 +00:00
brade%netscape.com
5a62117584 only handle backspace (deletion) if no modifiers are pressed (bug #41078)
git-svn-id: svn://10.0.0.236/trunk@75054 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 10:20:17 +00:00
brade%netscape.com
602958635f change commented-out code to not show up on some people's lxr searches
git-svn-id: svn://10.0.0.236/trunk@75053 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 10:19:09 +00:00
brade%netscape.com
979b376d05 remove save and saveas commands (now in JS); submitted by rcassin@supernova.org (bug #16359)
git-svn-id: svn://10.0.0.236/trunk@75051 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 10:15:28 +00:00
brade%netscape.com
b1e26e8f35 remove registration of save and saveas commands (now handled in JS); submitted by rcassin@supernova.org (bug #16360)
git-svn-id: svn://10.0.0.236/trunk@75050 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 10:14:22 +00:00
brade%netscape.com
850e31e003 submitted by rcassin@supernova.org; add save and saveas commands to this file (bug #16360)
git-svn-id: svn://10.0.0.236/trunk@75049 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 10:12:53 +00:00
hyatt%netscape.com
e81421e72f Oops. Checked in debugging code. Backing out.
git-svn-id: svn://10.0.0.236/trunk@75048 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 09:53:26 +00:00
hyatt%netscape.com
a9d2806621 Fix for 46129. r=waterson,attinasi,pierre
git-svn-id: svn://10.0.0.236/trunk@75047 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 09:36:51 +00:00
hyatt%netscape.com
7cc13adfd8 Fix for 46129. r=waterson,attinasi,pierre
git-svn-id: svn://10.0.0.236/trunk@75046 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 09:36:14 +00:00
warren%netscape.com
bc762d95b9 Fixed to now work.
git-svn-id: svn://10.0.0.236/trunk@75045 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 09:28:10 +00:00
mcafee%netscape.com
585f86e6d2 Ignore generated files.
git-svn-id: svn://10.0.0.236/trunk@75042 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 09:20:18 +00:00
waterson%netscape.com
1ebea98d31 Bug 46013. Use nsVoidArray to hold observers to avoid extra addref/release when notfying. r=hyatt
git-svn-id: svn://10.0.0.236/trunk@75041 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 09:20:15 +00:00
waterson%netscape.com
76ca04dc3b Bug 46013. Make nsChromeRegistry own the UI datasource; clean up the special release method so that it does correct bloat log. r=hyatt
git-svn-id: svn://10.0.0.236/trunk@75040 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 09:19:42 +00:00
rbs%maths.uq.edu.au
b082477bba Enable the code to support for 'vertical-align: baseline' in table-cells. bug 10207. a:waterson@mozilla.org. was r:karnaze@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@75039 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 09:19:26 +00:00
rbs%maths.uq.edu.au
fe6ee91829 Enable the code to export the baseline out of the block frame code to support 'vertical-article: baseline' in table-cells. bug 10207. a:waterson@mozilla.org. was r:buster@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@75038 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 09:18:15 +00:00
waterson%netscape.com
cf2a3109e3 Bug 44709. Maintain renumbering depth on stack, instead of in a global. r=roc+moz@cs.cmu.edu
git-svn-id: svn://10.0.0.236/trunk@75037 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 09:02:34 +00:00
cls%seawood.org
e812c40f33 Always use |PR_TRUE| instead of |true| as some compiler don't define |true|.
git-svn-id: svn://10.0.0.236/trunk@75036 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 08:58:02 +00:00
warren%netscape.com
809364ca64 Fixed case of filenames for unix.
git-svn-id: svn://10.0.0.236/trunk@75035 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 08:47:56 +00:00
valeski%netscape.com
f4b082fe72 this lib is no longer generated or used
git-svn-id: svn://10.0.0.236/trunk@75034 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 08:46:59 +00:00
ben%netscape.com
1164647868 46613...
git-svn-id: svn://10.0.0.236/trunk@75033 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 08:30:24 +00:00
cls%seawood.org
447123c296 Add WS5.0 std::tm workaround for build bustage
git-svn-id: svn://10.0.0.236/trunk@75032 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 08:20:51 +00:00
cls%seawood.org
78e9aa6004 Workaround for long-standing AIX bustage
git-svn-id: svn://10.0.0.236/trunk@75031 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 08:11:51 +00:00
cls%seawood.org
74e0fb7f78 Fix typo
git-svn-id: svn://10.0.0.236/trunk@75030 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 08:10:59 +00:00
alecf%netscape.com
b98f8897d9 fix for alternate 3-pane layout contributed by timeless@bemail.org
r=alecf
(part of 46613)


git-svn-id: svn://10.0.0.236/trunk@75029 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 08:02:28 +00:00
ben%netscape.com
8898421aee added bg image for mac toolbar, 46613
git-svn-id: svn://10.0.0.236/trunk@75028 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 07:24:01 +00:00
warren%netscape.com
6f154fb3bb obsolete
git-svn-id: svn://10.0.0.236/trunk@75027 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 07:00:36 +00:00
ben%netscape.com
319fa39ba0 More work for 46613, polish stuff for classic skin.
git-svn-id: svn://10.0.0.236/trunk@75026 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 06:59:57 +00:00
cls%seawood.org
436230200d The AIX compiler doesn't seem to know how to handle |typename|
git-svn-id: svn://10.0.0.236/trunk@75025 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 06:57:20 +00:00
warren%netscape.com
e1a3e3e230 Cleaning up slashes, adding a few missed files.
git-svn-id: svn://10.0.0.236/trunk@75024 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 06:49:43 +00:00
warren%netscape.com
dea12f17f6 Making addref/release threadsafe
git-svn-id: svn://10.0.0.236/trunk@75023 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 06:49:01 +00:00
warren%netscape.com
48c2a980b3 Fixed declaration of nsHashtableCloneElementFunc to have PR_CALLBACK.
git-svn-id: svn://10.0.0.236/trunk@75022 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 06:48:32 +00:00
hyatt%netscape.com
17eab69576 Prevent thrashing for nodes that always have display: none in XUL (broadcasters, commands, keys), r=waterson
git-svn-id: svn://10.0.0.236/trunk@75020 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 06:40:27 +00:00
mcafee%netscape.com
1c82b9d517 Factoring history prefs into separate pane (5236). a=pavlov
git-svn-id: svn://10.0.0.236/trunk@75019 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 06:32:27 +00:00
wtc%netscape.com
80f3ead2dc Bugzilla bug #45181: improvement for imported fd's on NT.
Modified files: _winnt.h, prsocket.c, ntio.c


git-svn-id: svn://10.0.0.236/trunk@75018 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 06:28:05 +00:00
ben%netscape.com
02d86f9842 46613, trying to make maccvs commit this file ;)
git-svn-id: svn://10.0.0.236/trunk@75017 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 06:23:26 +00:00
ben%netscape.com
27c664cff1 skinnability & correctness tweaks, part of polish fixes for 46613
git-svn-id: svn://10.0.0.236/trunk@75016 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 06:18:21 +00:00
ben%netscape.com
b71a099fc2 46613, classic skin polish
git-svn-id: svn://10.0.0.236/trunk@75015 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 06:16:16 +00:00
jst%netscape.com
fcf4ccc897 (Merging nsbeta2 checkin to the tip) Fixing nsbeta2+ bug 28572, the docshell was fireing the script unload handler too early in some cases and in some other cases the unload handler was fired even if the document wasn't unloaded. r=nisheeth, a=nisheeth.
git-svn-id: svn://10.0.0.236/trunk@75014 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 05:55:54 +00:00
cls%seawood.org
04d7dbe793 The ports tinderboxes were inconveniently down so this bustage was hidden for the past week. Bug #45698
git-svn-id: svn://10.0.0.236/trunk@75012 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 05:43:24 +00:00
idk%eng.sun.com
2d26be1613 * NOT PART OF TBOX BUILDS**
Fixed crasher bug. class was used before initialization.


git-svn-id: svn://10.0.0.236/trunk@75011 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 05:39:53 +00:00
ben%netscape.com
45baf3be98 More work for 46613, polish stuff for classic skin.
git-svn-id: svn://10.0.0.236/trunk@75010 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 05:17:00 +00:00
hyatt%netscape.com
1a938d68f3 Fix for 45446, r=ben
git-svn-id: svn://10.0.0.236/trunk@75009 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 05:13:13 +00:00
wtc%netscape.com
c9a788b8e3 Get rid of PR_UNKNOWN_ERROR.
git-svn-id: svn://10.0.0.236/trunk@75008 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 05:12:51 +00:00
dmose%mozilla.org
0f1adf956c A menu was being created too early, before it is possible to avoid
creating the menu with an invalid default selection.  This was causing
bugzilla to (incorrectly) spew a database corruption error when
attempting to view a bug that had been resolved MOVED.  Why this
wasn't causing the same problem with DUPLICATE resolutions, I don't
know.  Moved the menu creation later in the code, so that it only
happens after it has been ensured that the default selection is not
going to be MOVED.


git-svn-id: svn://10.0.0.236/trunk@75007 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 05:12:33 +00:00
warren%netscape.com
2be98ed83d Added back in use Cwd;
git-svn-id: svn://10.0.0.236/trunk@75006 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 05:08:08 +00:00
hyatt%netscape.com
5bd9e37645 Fix for 46361, r=ben
git-svn-id: svn://10.0.0.236/trunk@75005 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 05:02:46 +00:00
warren%netscape.com
d13b65ff46 Fixed up rules for jarring.
git-svn-id: svn://10.0.0.236/trunk@75004 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 04:46:45 +00:00
blizzard%redhat.com
97b1f7f724 clean up some service usage in the emedding widget. also, be picky about when to shut down XPCOM. use gtk_set_locale() in the testing program so people who use XIM will be able to use that input method. r,a=waterson
git-svn-id: svn://10.0.0.236/trunk@75003 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 04:34:46 +00:00
blizzard%redhat.com
b655f5be3f XSync after doing a window scroll. visually, this looks a lot better and is an improvement for scrolling on linux. patch from imoT r=me
git-svn-id: svn://10.0.0.236/trunk@75002 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 04:32:22 +00:00
ben%netscape.com
28b1445f30 fixing toolbarseparator warnings, forgot to check this in with 46613 fixes last night.
git-svn-id: svn://10.0.0.236/trunk@75001 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 04:24:56 +00:00
pinkerton%netscape.com
bc870b186e Fix for 46749, regression from my earlier checkin. forgot to check for null before
looking for the menu parent. Doh!


git-svn-id: svn://10.0.0.236/trunk@75000 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 04:10:12 +00:00
dmose%mozilla.org
33d5f90134 on some windows configurations, the build has been messed up for at least a couple of weeks because some microsoft header file defines 'interface', which conflicts with the member variable in xpt_struct.h. rename the member variable from interface to iface. workaround suggested by alecf@netscape.com. r=jband@netscape.com, a=waterson@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@74999 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 04:03:50 +00:00
dmose%mozilla.org
e5d20a3ce5 conditionally build LDAP code on windows if ENABLE_LDAP env var is set. r=cls@seawood.org, a=waterson@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@74998 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 04:00:47 +00:00
danm%netscape.com
18ecc11fd7 shut down a selection's autoscroll timer in the selection's destructor. bug 43470. r=saari@netscape.com
git-svn-id: svn://10.0.0.236/trunk@74997 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 03:48:26 +00:00
saari%netscape.com
8949ae4db2 Mac fix that derived out of 43470. r=danm
git-svn-id: svn://10.0.0.236/trunk@74996 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 03:47:55 +00:00
ben%netscape.com
608b2fa2b3 fixes to Mac classic skin to match my updates to Windows classic last night, b46613
git-svn-id: svn://10.0.0.236/trunk@74995 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 03:09:05 +00:00
mkaply%us.ibm.com
793582c19c OS/2 Tinderbox breakage
Just because someone uses the unix Makefiles doesn't mean they have GTK


git-svn-id: svn://10.0.0.236/trunk@74994 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 03:01:03 +00:00
wtc%netscape.com
bbd5f98fdf Fixed Bugzilla bug #45181.
Modified files: _beos.h, _macos.h, _os2.h, _unixos.h, _win95.h, _winnt.h,
primpl.h, prfile.c, prio.c, prsocket.c, bfile.c, macsockotpt.c, os2io.c,
unix.c, ntio.c, w95io.c, prinit.c, ptio.c


git-svn-id: svn://10.0.0.236/trunk@74993 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 02:40:54 +00:00
hyatt%netscape.com
795e8e2243 Fix for 43778. r=ben
git-svn-id: svn://10.0.0.236/trunk@74992 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 02:22:59 +00:00
rhp%netscape.com
8d064d5e08 Fix for conversion problems with my favorite fields - phone numbers - Bug #: 1193 - r: pmock
git-svn-id: svn://10.0.0.236/trunk@74991 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 01:57:47 +00:00
harishd%netscape.com
d05675c787 Migrating beta2+ fix
----------------------------

45975 - Making sure that the stack position doesn't become negative.
Note: This is a HACK for beta2. The real fix will go in for beta3.

r=jst
a=nisheeth


git-svn-id: svn://10.0.0.236/trunk@74988 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 01:01:08 +00:00
sfraser%netscape.com
2706e7255d Fix typo, bug 46260. r=pinkerton.
git-svn-id: svn://10.0.0.236/trunk@74987 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 00:56:37 +00:00
harishd%netscape.com
536513536c Migrating beta2 fix to the branch
---------------------------------------------
42388 (nsbeta2+)  - Disabling transitional DTD
r=jst
a=nisheeth


git-svn-id: svn://10.0.0.236/trunk@74986 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 00:56:15 +00:00
sfraser%netscape.com
f69feac143 Fix 6553 at last -- image badge icons now show on Mac. r=pinkerton.
git-svn-id: svn://10.0.0.236/trunk@74985 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 00:55:53 +00:00
sfraser%netscape.com
664ec10e82 Fix menu ordering on hide/show menus, bugs 45798, 29835, 45874, and 45914. r=saari, pinkerton.
git-svn-id: svn://10.0.0.236/trunk@74982 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 00:45:56 +00:00
attinasi%netscape.com
04de4e827f Trunk fix: bug 29061, where relative width value of '*' was getting 0 instead of 1. Simple fix, r=karnaze b=29061
git-svn-id: svn://10.0.0.236/trunk@74981 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 00:37:02 +00:00
hyatt%netscape.com
c08ee125ab Fix for 41145.
git-svn-id: svn://10.0.0.236/trunk@74980 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 00:35:30 +00:00
hyatt%netscape.com
16169e4319 Fix for 41145. r=waterson
git-svn-id: svn://10.0.0.236/trunk@74979 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 00:35:02 +00:00
hyatt%netscape.com
19543947f3 Fix for 41145, r-waterson
git-svn-id: svn://10.0.0.236/trunk@74978 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 00:34:22 +00:00
morse%netscape.com
5dae2e229b bug 45455, deleting blank username causes wrong user to be deleted, r=jrgm
git-svn-id: svn://10.0.0.236/trunk@74977 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 00:28:43 +00:00
morse%netscape.com
a317e6eeed bug 45454, blank username is not selectable, r=jrgm
git-svn-id: svn://10.0.0.236/trunk@74976 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 00:26:17 +00:00
pinkerton%netscape.com
baf08c85bb Fix for 31727, make submenus inherit the context menu-ness from their parents. Another
great patch from Dean Tessman.


git-svn-id: svn://10.0.0.236/trunk@74975 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 00:25:18 +00:00
rjc%netscape.com
4e027a7cf0 Fix bug # 46710: get d&d working for file/ftp listings. r=pinkerton
git-svn-id: svn://10.0.0.236/trunk@74974 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 00:22:07 +00:00
sfraser%netscape.com
9970fe23cd Fixes for URL echo Apple Event handling from Steve Cox <scox@artlogic.com> for bug 44250. r=smfr
git-svn-id: svn://10.0.0.236/trunk@74973 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 00:21:06 +00:00
pchen%netscape.com
04832c282b Bugs 45817, 46531. Clean up code, make it same as fix I checked in onto branch, r=pinkerton.
git-svn-id: svn://10.0.0.236/trunk@74972 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 00:20:54 +00:00
rhp%netscape.com
20e9522f2e Fix for incorrect error notification on Copy failures - Bug #: 41504 - r: bienvenu
git-svn-id: svn://10.0.0.236/trunk@74971 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 00:18:56 +00:00
edburns%acm.org
282db89308 Classes must be built first in order to build jni.
git-svn-id: svn://10.0.0.236/trunk@74970 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-28 00:17:21 +00:00
dbaron%fas.harvard.edu
7753d35814 Make the block regression tests easier to run on Linux. They no longer require setting any environment variables. r=pollmann Not part of build.
git-svn-id: svn://10.0.0.236/trunk@74968 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 23:42:34 +00:00
dbaron%fas.harvard.edu
4d33335d40 Bring mozilla-viewer.sh all the enhancements made to mozilla (the shell script) in the past year or so, plus one more (-- to turn off command line handling). This is needed to get block regression tests to run easily. r=pollmann
git-svn-id: svn://10.0.0.236/trunk@74967 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 23:41:28 +00:00
dbaron%fas.harvard.edu
5c317da98a Fix the way HTML's align attribute works for horizontal alignment of blocks. Use the -moz-center and -moz-right even in strict mode, and apply them to blocks in addition to tables. r=attinasi b=37083, 40038
git-svn-id: svn://10.0.0.236/trunk@74966 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 23:37:44 +00:00
pnunn%netscape.com
eea96f3b7f bug#22754: fix, nsbeta3. pnunn. r:gagan
git-svn-id: svn://10.0.0.236/trunk@74965 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 23:37:00 +00:00
mcafee%netscape.com
f5ba31d529 Cleaning up debug pref pane; saving space on navigator pref pane (5236). r=matt
git-svn-id: svn://10.0.0.236/trunk@74964 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 23:31:51 +00:00
dbaron%fas.harvard.edu
1817996df9 Fix leak of keybinding table and keybinding documents. r=waterson b=17390, 24645
git-svn-id: svn://10.0.0.236/trunk@74963 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 23:31:09 +00:00
dbaron%fas.harvard.edu
bcf5e66f3b Fix leak of GlobalWindowImpl. r=a=waterson
git-svn-id: svn://10.0.0.236/trunk@74962 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 23:27:00 +00:00
dbaron%fas.harvard.edu
38b11b0554 Improve performance of testing for visited links CSS selector matching by reducing string conversion and by caching the state of the link on the link element. r=waterson b=25963
git-svn-id: svn://10.0.0.236/trunk@74961 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 23:17:53 +00:00
dbaron%fas.harvard.edu
ab669e18ee Improve performance of testing for visited links CSS selector matching by reducing string conversion and by caching the state of the link on the link element. r=waterson b=25963
git-svn-id: svn://10.0.0.236/trunk@74959 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 23:11:02 +00:00
mcafee%netscape.com
ff1a66602f Properly removing viewmanager2 pref UI. r=matt
git-svn-id: svn://10.0.0.236/trunk@74958 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 23:03:22 +00:00
alecf%netscape.com
045426654f mozilla side of fix for bugscape 1638 - only show ISPs which explicitly request it
r=mscott


git-svn-id: svn://10.0.0.236/trunk@74957 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 22:55:31 +00:00
mcafee%netscape.com
9bb1a5028b Ignore generated files.
git-svn-id: svn://10.0.0.236/trunk@74955 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 22:31:40 +00:00
mcafee%netscape.com
4cf376f3ee Ignore generated files
git-svn-id: svn://10.0.0.236/trunk@74954 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 22:27:20 +00:00
mcafee%netscape.com
6ae4fbc17f Adding gtkEmbed tests to build (43055). r=dougt
git-svn-id: svn://10.0.0.236/trunk@74953 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 22:25:23 +00:00
brade%netscape.com
ab3f28d6f7 missing whitespace
git-svn-id: svn://10.0.0.236/trunk@74952 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 21:56:47 +00:00
cls%seawood.org
5643f70150 Don't rely upon files that use jri_md.h to include prtypes.h which provides a much needed HAS_LONG_LONG define. Bug 31381
git-svn-id: svn://10.0.0.236/trunk@74951 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 21:56:07 +00:00
brade%netscape.com
476859b1a9 add missing keybindings for windows-alternative shortcuts (cut/copy/paste); bug #41078)
git-svn-id: svn://10.0.0.236/trunk@74950 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 21:55:25 +00:00
brade%netscape.com
020dabd77d don't delete unless no modifier keys are pressed (bug #41078)
git-svn-id: svn://10.0.0.236/trunk@74949 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 21:50:04 +00:00
brade%netscape.com
49613c436b add static to remove warning
git-svn-id: svn://10.0.0.236/trunk@74948 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 21:49:46 +00:00
brade%netscape.com
63b9c0f503 don't delete unless no modifiers are pressed (bug #41078)
git-svn-id: svn://10.0.0.236/trunk@74947 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 21:49:42 +00:00
brade%netscape.com
870b8893ac remove unused function
git-svn-id: svn://10.0.0.236/trunk@74946 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 21:48:06 +00:00
brade%netscape.com
59b71a64c5 add static to two methods to remove warnings
git-svn-id: svn://10.0.0.236/trunk@74945 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 21:46:26 +00:00
brade%netscape.com
3a45f2158c delete only if there are no other modifiers (bug #41078)
git-svn-id: svn://10.0.0.236/trunk@74944 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 21:45:27 +00:00
brade%netscape.com
d6e55a2f61 handle control-delete (bug #41078)
git-svn-id: svn://10.0.0.236/trunk@74943 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 21:43:57 +00:00
brade%netscape.com
1a7550dbae handle control-delete and shift-delete (bug #41078)
git-svn-id: svn://10.0.0.236/trunk@74942 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 21:41:50 +00:00
brade%netscape.com
b6b0a40813 clean up the code; remove unnecessary code/functions; don't handle delete/fwd delete keypresses if there is a modifier key pressed; bug #41078; r=kin
git-svn-id: svn://10.0.0.236/trunk@74941 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 21:39:48 +00:00
brade%netscape.com
8e68956e2f tooltip changes from simone; bug #9767
git-svn-id: svn://10.0.0.236/trunk@74940 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 21:37:13 +00:00
brade%netscape.com
751009f780 checkin for simone; remove unused tooltip; bug #9767
git-svn-id: svn://10.0.0.236/trunk@74939 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 21:36:39 +00:00
brade%netscape.com
4e395d80af checkin for simone; remove unused tooltips; bug #9767
git-svn-id: svn://10.0.0.236/trunk@74938 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 21:36:05 +00:00
larryh%netscape.com
9068b6a96c BugZilla: 25982. Add function PR_PutEnv()
git-svn-id: svn://10.0.0.236/trunk@74937 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 21:20:48 +00:00
mkaply%us.ibm.com
d29f281df6 45872
r=mkaply, a=brendan
Found a way to get the desktop DC so screen APIs could be implemented properly


git-svn-id: svn://10.0.0.236/trunk@74936 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 21:10:32 +00:00
warren%netscape.com
cefc53b8e5 Bug 46674. Classic =/== typo.
git-svn-id: svn://10.0.0.236/trunk@74935 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 21:01:15 +00:00
akkana%netscape.com
e346c4328d 46577: Fix perl errors, thanks to contribution from rufus@nonstuff.de (Rufus), r=me
git-svn-id: svn://10.0.0.236/trunk@74934 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 20:57:49 +00:00
granrose%netscape.com
49d221c84c changing milestone from M17 to M18 for useragent and about page.
git-svn-id: svn://10.0.0.236/trunk@74933 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 20:57:43 +00:00
mkaply%us.ibm.com
fd90e63d26 OS/2 Tinderbox break
Need PR_CALLBACK for VisualAge


git-svn-id: svn://10.0.0.236/trunk@74932 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 20:40:57 +00:00
tara%tequilarista.org
438fb4f0fd Turning off tag support in quips because some assholes have nothing better do than fuck with my tool
git-svn-id: svn://10.0.0.236/trunk@74931 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 20:10:16 +00:00
mcgreer%netscape.com
bc1df08d18 merge changes from 3.0 branch
git-svn-id: svn://10.0.0.236/trunk@74930 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 18:26:28 +00:00
despotdaemon%netscape.com
a53dc81e3f Pseudo-automatic update of changes made by ann.adamcik@sun.com.
git-svn-id: svn://10.0.0.236/trunk@74926 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 16:25:57 +00:00
brade%netscape.com
f24b9cd623 checkin for simone; tooltip chanegs; bug #9767
git-svn-id: svn://10.0.0.236/trunk@74921 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 15:01:40 +00:00
nboyd%atg.com
9fd86753ee Experimental changes for debugger.
git-svn-id: svn://10.0.0.236/trunk@74919 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 14:54:15 +00:00
mj%digicool.com
d42f99cf7d mozilla.xml-rpc.fault.1 now implements QueryInterface, r=mang
git-svn-id: svn://10.0.0.236/trunk@74918 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 14:52:47 +00:00
brade%netscape.com
f0e7b3eb66 checkin for simone; tooltip changes; bug #9767
git-svn-id: svn://10.0.0.236/trunk@74917 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 14:43:43 +00:00
neeti%netscape.com
91d835a058 fix for bug 40084 - [CRASH] Crash in disk cache code, r/a=gagan
git-svn-id: svn://10.0.0.236/trunk@74916 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 14:28:48 +00:00
brade%netscape.com
85f47f88c2 fix prefs (bug #42212)
git-svn-id: svn://10.0.0.236/trunk@74915 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 14:10:11 +00:00
brade%netscape.com
8e6ea485f0 fix for #41989; add 'shift="false" to new message command; r/a=ben
git-svn-id: svn://10.0.0.236/trunk@74914 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 14:01:40 +00:00
brade%netscape.com
b855565ec4 expose commented out prefs and tweak for autosave/recent files; submitted by rcassin@supernova.org; fix for bug #44212 (make the pref match the string in the source)
git-svn-id: svn://10.0.0.236/trunk@74913 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 13:56:06 +00:00
brade%netscape.com
3f76a9ac6b strings for newly exposed prefs (submitted by rcassin@supernova.org)
git-svn-id: svn://10.0.0.236/trunk@74912 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 13:52:53 +00:00
rjc%netscape.com
cb5a078a39 Fix simple typo. r=me
git-svn-id: svn://10.0.0.236/trunk@74910 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 11:39:27 +00:00
rjc%netscape.com
5d17e5220a Fix bug # 45444: option-clicking on a bookmark should open Properties dialog; cmd-clicking on a bookmark should open URL in a new browser window. r=me
git-svn-id: svn://10.0.0.236/trunk@74909 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 10:55:47 +00:00
rjc%netscape.com
274b99d50f Fix bug # 43003: when drag&dropping an unnamed URL, give it a default name correctly. r=me
git-svn-id: svn://10.0.0.236/trunk@74908 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 10:24:03 +00:00
ben%netscape.com
05e98123af forgot this one as well...
git-svn-id: svn://10.0.0.236/trunk@74907 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 10:17:45 +00:00
ben%netscape.com
b1ceb169d8 forgot to check these files in with the previous batch...
git-svn-id: svn://10.0.0.236/trunk@74906 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 10:12:40 +00:00
ben%netscape.com
39e9d0ded5 forgot to check in these files with previous batch
git-svn-id: svn://10.0.0.236/trunk@74905 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 10:09:45 +00:00
rjc%netscape.com
16f81ac367 Fix bug # 39161: when adding a new bookmark, set its default type if it doesn't have one. r=me
git-svn-id: svn://10.0.0.236/trunk@74904 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 09:44:58 +00:00
hyatt%netscape.com
0adc4bb434 Fixing duplicate style resolution problem in trees. r=ben
git-svn-id: svn://10.0.0.236/trunk@74903 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 09:10:52 +00:00
rbs%maths.uq.edu.au
1962746968 First check-in. Not intended for the build. Simple utility to assist external people who make MathML-enabled builds so that they can set an up-to-date start-page.
git-svn-id: svn://10.0.0.236/trunk@74902 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 09:04:00 +00:00
rjc%netscape.com
bbae1e3c8f Fixes for various sidebar panels for bug # 42718. Also, set page title for FTP/FILE displays. Finally, fix a bug (can't remember the bug # at the moment) with clicking on the scrollbar... basically, make sure the click is on a <treeitem> before processing the click. r=me
git-svn-id: svn://10.0.0.236/trunk@74901 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 07:47:36 +00:00
alecf%netscape.com
ba34dbc1cc fix for #46613 - make total/unread status look decent in the classic skin
r=mscott


git-svn-id: svn://10.0.0.236/trunk@74900 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 07:11:15 +00:00
ben%netscape.com
0808c720f2 classic skin work for 46613, a=johng
git-svn-id: svn://10.0.0.236/trunk@74899 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 07:11:14 +00:00
ben%netscape.com
fd3be7e7f0 classic skin work for bug 46613, a=johng
git-svn-id: svn://10.0.0.236/trunk@74898 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 06:59:55 +00:00
hyatt%netscape.com
f48041dfac Missed files. Fixs bustage.
git-svn-id: svn://10.0.0.236/trunk@74897 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 06:57:32 +00:00
valeski%netscape.com
f08ae95289 not in build. perl mods to vxml
git-svn-id: svn://10.0.0.236/trunk@74896 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 06:48:08 +00:00
hyatt%netscape.com
fbc99a121c Make trees use timer for arrow key navigation select handling. Dramatic boost in arrow scrolling performance. a=waterson
git-svn-id: svn://10.0.0.236/trunk@74895 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 06:21:46 +00:00
hyatt%netscape.com
d24f8540fa Fix to prevent crawling of template. Meant to check this earlier today
with the original approved template landing. r,a=waterson


git-svn-id: svn://10.0.0.236/trunk@74894 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 06:20:57 +00:00
hyatt%netscape.com
63ba18ac99 Fix to reparent XBL style contexts. needed for attinasi's style context
reduction landing. r=ben


git-svn-id: svn://10.0.0.236/trunk@74893 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 06:20:13 +00:00
hyatt%netscape.com
9b9cb75ca5 Fix to enable fast tree scrolling. Fix shortcut keys and arrow keys in
XP menus.  Add API for obtaining offset rects for XUL elements.  Fix
deletion bug in trees.  (It's a barrel of nsbeta3 goodness.) r=ben


git-svn-id: svn://10.0.0.236/trunk@74892 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 06:19:30 +00:00
hyatt%netscape.com
1bffb4bd12 Fix to enable trees to blit. Performance work approved by waterson. r=waterson.
git-svn-id: svn://10.0.0.236/trunk@74891 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 06:17:58 +00:00
dougt%netscape.com
7d14dacc39 bug 46413. r/a=valeski@netscape.com
Clean up memory leaks.


git-svn-id: svn://10.0.0.236/trunk@74890 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 06:14:06 +00:00
bratell%lysator.liu.se
ec28beac4b Final part of bug 40027. r,a=waterson@netscape.com
git-svn-id: svn://10.0.0.236/trunk@74889 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 06:12:49 +00:00
waterson%netscape.com
a4b76eec47 Bug 19051. Checked in wrong patch for nsLineLayout.cpp; we want to check the display type, not the frame type, to determine if it's a block frame.
git-svn-id: svn://10.0.0.236/trunk@74888 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 05:20:09 +00:00
waterson%netscape.com
86cf521ec9 Bug 19051. Remove code that computed and maintained nsTextRun. Instead, compute 'next text' when required by crawling the frame tree in nsLineLayout::FindNextText(). r=roc+moz@cs.cmu.edu
git-svn-id: svn://10.0.0.236/trunk@74887 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 05:16:08 +00:00
waterson%netscape.com
8fbcf1ea64 Bug 37622, redux. Case insensitive compare that I meant to check in way back when, but didn't. This was really part of the first patch, but didn't make it in because I checked in from the wrong machine.
git-svn-id: svn://10.0.0.236/trunk@74886 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 05:09:40 +00:00
mcafee%netscape.com
15b66347c5 Debug-only, deleting viewmanager2 pref UI, on by default now (42845). r=matt
git-svn-id: svn://10.0.0.236/trunk@74885 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 03:52:53 +00:00
rhp%netscape.com
aecce3771e Fix for parenting of prompts - Bug #: 44152 - r: bienvenu
git-svn-id: svn://10.0.0.236/trunk@74884 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 03:32:06 +00:00
putterman%netscape.com
c3762b4f91 Fix for 43187. Right align unread and total columns. Patch submitted by gemal@gemal.dk.
r=scottip. a=brendan


git-svn-id: svn://10.0.0.236/trunk@74883 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 03:22:42 +00:00
rhp%netscape.com
f2325f1b77 Fix for problem with editing Japanese emails as new - Bug #: 41009 - r: bienvenu
git-svn-id: svn://10.0.0.236/trunk@74882 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 03:21:56 +00:00
rhp%netscape.com
b612cd0a3c Fix for rendering binary data as text - Bug #33579 - r: bienvenu
git-svn-id: svn://10.0.0.236/trunk@74881 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 03:17:48 +00:00
morse%netscape.com
4f02094d30 part of fix for bug 45981, blue-box dialog not appearing when needed, r=pinkerton
git-svn-id: svn://10.0.0.236/trunk@74880 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 03:07:19 +00:00
nelsonb%netscape.com
1e8fc1125b Add new function s_mp_add_offset().
Very handy in Montgomery reduction using Dusse' and Kalski's method.


git-svn-id: svn://10.0.0.236/trunk@74879 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 03:02:42 +00:00
rhp%netscape.com
7461871b9b Fix for problems with vCard display - Bug 42814 - r: bienvenu
git-svn-id: svn://10.0.0.236/trunk@74878 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 03:01:06 +00:00
rhp%netscape.com
604f25c405 Fix problem leaking temp files - Bug #: 45136 - r: bienvenu
git-svn-id: svn://10.0.0.236/trunk@74877 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 02:58:49 +00:00
nelsonb%netscape.com
af5a9eb982 Moved the declarations of many private defines and functions out of mpi.c
and into mpi-priv.h.  Previously, mplogic.c and mpprime.c had duplicate
copies of some of those declarations.  Now, they include mpi-priv.h


git-svn-id: svn://10.0.0.236/trunk@74875 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 02:38:54 +00:00
rhp%netscape.com
2b63fc644d Fix for standards compliant HTML output - Bug 46234 - r: rhp - external contribution
git-svn-id: svn://10.0.0.236/trunk@74874 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 01:04:27 +00:00
jfrancis%netscape.com
868ae3f8f1 take 2: fix for 22227 and partial fix for 46209; r=mjudge; a=beppe
git-svn-id: svn://10.0.0.236/trunk@74873 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 01:03:16 +00:00
rjc%netscape.com
2207d2d8d7 Fix bug # 44707: handle &amp; &gt; &lt; &quot; unescaping for related links.
git-svn-id: svn://10.0.0.236/trunk@74872 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 01:00:59 +00:00
valeski%netscape.com
7cd91f5141 not part of build. updating perl
git-svn-id: svn://10.0.0.236/trunk@74871 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 00:58:50 +00:00
ftang%netscape.com
f9ed49682e fix 45681 correct region code for li and lu. Thanks jan.lippuner@gmx.net (Jan Lippuner)
git-svn-id: svn://10.0.0.236/trunk@74870 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 00:55:45 +00:00
tao%netscape.com
481d44ee87 1615: Installer show Mozilla home page.... (r=sgehani,a=ftang)
Remove en-US files from browser.xpi.


git-svn-id: svn://10.0.0.236/trunk@74869 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 00:53:53 +00:00
alecf%netscape.com
852819bc02 other part of fix for #35427 - XUL <iframe>s cannot be specified by name,
so always use frame[0]
r=ben


git-svn-id: svn://10.0.0.236/trunk@74868 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 00:52:53 +00:00
alecf%netscape.com
c3cd08d7d2 fix for #34427 - skin the account wizard (finally!)
r=ben
switch over to new XUL widgets
also fixes #39345


git-svn-id: svn://10.0.0.236/trunk@74867 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 00:50:51 +00:00
mstoltz%netscape.com
7a7c9eec1f bug 42678. Disabling JS in mailnews by default; it can be reactivated from prefs. Lots of people asked for this. a=brendan, r=rginda.
git-svn-id: svn://10.0.0.236/trunk@74866 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 00:47:23 +00:00
rhp%netscape.com
85dc5026c2 Fix for Quoted printable issue with signatures Bug #: 46431 - r: rhp - contributed externally
git-svn-id: svn://10.0.0.236/trunk@74865 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 00:46:12 +00:00
alecf%netscape.com
43e9cee7ca fix for #45392, #38211 r=mscott
git-svn-id: svn://10.0.0.236/trunk@74864 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 00:30:23 +00:00
nelsonb%netscape.com
f9260dc627 Fix sprintf format, can't use DIGIT_FMT.
git-svn-id: svn://10.0.0.236/trunk@74863 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 00:23:17 +00:00
rjc%netscape.com
50080a9501 Fix bug # 46211: handle insertion/sorting correctly with mixed static-dynamic content. r=waterson
git-svn-id: svn://10.0.0.236/trunk@74862 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 00:22:42 +00:00
morse%netscape.com
80851e2769 change html checkbox to xul checkbox, r=hyatt
git-svn-id: svn://10.0.0.236/trunk@74861 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-27 00:16:31 +00:00
waterson%netscape.com
fab935c0b3 Bug 46132. Use 'flags=dont-test-empty' to avoid eager construction of menu content. r=hyatt
git-svn-id: svn://10.0.0.236/trunk@74859 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 23:59:13 +00:00
hyatt%netscape.com
e1af4d733b Fix to grovel non-aggressively. r=waterson,a=waterson
git-svn-id: svn://10.0.0.236/trunk@74858 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 23:57:48 +00:00
hyatt%netscape.com
14a0d87b4e Fix for templates to grovel non-aggressively. r=waterson,a=waterson
git-svn-id: svn://10.0.0.236/trunk@74857 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 23:57:24 +00:00
hyatt%netscape.com
30c853f4cb Fixes to template builder for non-aggressive groveling. r=waterson,a=waterson
git-svn-id: svn://10.0.0.236/trunk@74856 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 23:56:02 +00:00
waterson%netscape.com
20e2bc2b9d Bug 45668. Use Mork's 'row level APIs' instead of the cell level APIs to avoid excess object creation. r=bienvenu.
git-svn-id: svn://10.0.0.236/trunk@74855 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 23:54:37 +00:00
bienvenu%netscape.com
b0915c25cc turn on warren and waterson's rdf optimization
git-svn-id: svn://10.0.0.236/trunk@74854 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 23:47:35 +00:00
rjc%netscape.com
ba6db048f5 Fix bug # 20339: get busy animation back for FTP. r=waterson
git-svn-id: svn://10.0.0.236/trunk@74853 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 23:46:56 +00:00
rjc%netscape.com
de2247ab57 Fix bug # 46229: get file: URL view to display file sizes and last mod dates. r=waterson
git-svn-id: svn://10.0.0.236/trunk@74852 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 23:39:49 +00:00
rogerl%netscape.com
032cbb092c Patch from Norris :
A Rhino user has complained about concurrency problems in the interpreter,
and I think the attached diff fixes some problems that could be caused if
the same interpreted function or script was called simultaneously from
two different threads.


git-svn-id: svn://10.0.0.236/trunk@74848 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 23:04:14 +00:00
bryner%uiuc.edu
927d9ed132 Bug 46379, r=alecf.
git-svn-id: svn://10.0.0.236/trunk@74845 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 22:52:32 +00:00
dmose%mozilla.org
5809654b4d get ldap build working on windows; a=r=(not built)
git-svn-id: svn://10.0.0.236/trunk@74844 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 22:51:19 +00:00
dmose%mozilla.org
e94b300a1a reorder includes to avoid Windows-specific SetPort lossage. a=r=(not built)
git-svn-id: svn://10.0.0.236/trunk@74843 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 22:50:05 +00:00
locka%iol.ie
8c586d9150 Reinstated macro that prevented browser site from being QI'd for its nsISupports interface
git-svn-id: svn://10.0.0.236/trunk@74842 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 22:46:05 +00:00
locka%iol.ie
eeb1a52854 Fixed for windowless controls attempting to get a DC from the ActiveX plugin
git-svn-id: svn://10.0.0.236/trunk@74841 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 22:45:22 +00:00
granrose%netscape.com
992059a6cf modify client.mak to include commented out co variables needed to pull tree on branch to make future branches slightly easier.
git-svn-id: svn://10.0.0.236/trunk@74840 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 22:43:27 +00:00
locka%iol.ie
488a5c15de Remove browser instance from progress listener list when it is closed
b=45817,r=valeski,a=valeski


git-svn-id: svn://10.0.0.236/trunk@74838 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 22:35:14 +00:00
sgehani%netscape.com
5b3cfb3fbe Part of fix for failover URLs. [nsbeta2+ bugscape b = 1394; r = dbragg]
git-svn-id: svn://10.0.0.236/trunk@74837 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 22:33:47 +00:00
roc+%cs.cmu.edu
d77a73cddd Testing, just adding a blank line
git-svn-id: svn://10.0.0.236/trunk@74836 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 22:30:32 +00:00
mcafee%netscape.com
f3525296bd Thinning separators to make room for larger font (5236). r=matt
git-svn-id: svn://10.0.0.236/trunk@74835 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 22:28:30 +00:00
wtc%netscape.com
6f85784f54 Bugzilla bug #46509: removed the use of -taso and the USE_64 makefile
option on OSF1.


git-svn-id: svn://10.0.0.236/trunk@74833 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 22:20:16 +00:00
bienvenu%netscape.com
07f1796421 fix build warnings
git-svn-id: svn://10.0.0.236/trunk@74831 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 21:34:36 +00:00
bienvenu%netscape.com
e3fb855089 keep folder cache from getting stale, r=putterman 18346
git-svn-id: svn://10.0.0.236/trunk@74830 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 21:29:46 +00:00
bienvenu%netscape.com
3c267deef9 fix 20176 (no new msgs msg for imap) 23590 27379 45799 r=mscott
git-svn-id: svn://10.0.0.236/trunk@74829 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 21:27:39 +00:00
bienvenu%netscape.com
fdf97497be keep folder cache from getting stale, r=putterman 18346 and 29890 correct munging of .msf file names
git-svn-id: svn://10.0.0.236/trunk@74828 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 21:24:28 +00:00
bienvenu%netscape.com
14d5fffb63 keep folder cache from getting stale, r=putterman 18346
git-svn-id: svn://10.0.0.236/trunk@74827 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 21:22:54 +00:00
bienvenu%netscape.com
db4490125e fix search operators for imap filters r=alecf 40530
git-svn-id: svn://10.0.0.236/trunk@74826 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 21:20:34 +00:00
bienvenu%netscape.com
5d05aeabbe implement ends with search r=alecf 30470
git-svn-id: svn://10.0.0.236/trunk@74825 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 21:19:24 +00:00
bienvenu%netscape.com
a01c520564 don't write out row comments for mork, r=waterson 44556
git-svn-id: svn://10.0.0.236/trunk@74824 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 21:14:34 +00:00
bienvenu%netscape.com
9341d4203b remove debug_bienvenu code for search testing
git-svn-id: svn://10.0.0.236/trunk@74823 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 21:09:39 +00:00
bienvenu%netscape.com
2e901246ff fix mark thread read for imap, r=putterman 45087
git-svn-id: svn://10.0.0.236/trunk@74822 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 21:07:30 +00:00
bienvenu%netscape.com
bccac1d2cd protect against null channel when getting status, r=mscott
git-svn-id: svn://10.0.0.236/trunk@74821 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 21:07:01 +00:00
bienvenu%netscape.com
bb8ef57200 fix mark thread read, r=putterman 45087
git-svn-id: svn://10.0.0.236/trunk@74820 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 21:06:05 +00:00
bienvenu%netscape.com
65952b3031 fix news connection cache 13506 r=mscott
git-svn-id: svn://10.0.0.236/trunk@74819 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 21:05:06 +00:00
ashuk%eng.sun.com
b5f214c647 author = ashuk
r = edburns
a = edburns

Implements RemoveListener


git-svn-id: svn://10.0.0.236/trunk@74818 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 20:07:11 +00:00
kin%netscape.com
4554a01d45 Backout previous checkin/fix for 46209 & 22227 since in some instances
the frame data it relies on does not contain valid info. This causes
data loss in some cases like when making text bold.
a=granrose


git-svn-id: svn://10.0.0.236/trunk@74816 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 18:52:59 +00:00
blizzard%redhat.com
22c2958b41 typo fix to get the dtd installing to the right location. r/a=brendan
git-svn-id: svn://10.0.0.236/trunk@74815 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 14:50:10 +00:00
mkaply%us.ibm.com
6fa7d68101 #45872
r=mkaply, a=brendan
Port of nsDeviceContextOS2 to be more like Windows and removal of nsPaletteOS2


git-svn-id: svn://10.0.0.236/trunk@74814 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 14:21:07 +00:00
waterson%netscape.com
bb803053c1 Bug 46013. Remove dependency on nsINameSpace and nsINameSpaceManager, so that we do not need to load the layout DLL to parse RDF/XML. r=rjc
git-svn-id: svn://10.0.0.236/trunk@74813 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 14:08:05 +00:00
mkaply%us.ibm.com
4295910949 #45872
r=mkaply, a=brendan
Make nsDeviceContextSpecOS2 look more like Windows


git-svn-id: svn://10.0.0.236/trunk@74812 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 14:07:24 +00:00
jfrancis%netscape.com
ab22fc3f24 fix for 46209 & 22227; list items and table cells with a single space gave you unclickable content in the editor. r=mjudge
git-svn-id: svn://10.0.0.236/trunk@74811 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 13:07:54 +00:00
mjudge%netscape.com
04f7c7cd04 46209 one of the last beta 2 blockers. adding ability to frames to tell if part of them is visible. idl change to allow nsISelectionController to give CheckVisibility. PresShell actually has the code for nsGfxTextControlFrame to call.
git-svn-id: svn://10.0.0.236/trunk@74807 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 11:31:12 +00:00
sgehani%netscape.com
5a96ae95f1 Add localization comments for bugscape bug 1393.
[r=ssu]


git-svn-id: svn://10.0.0.236/trunk@74806 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 08:21:30 +00:00
sgehani%netscape.com
bd5d3df207 Fix comment parsing and site selector failover sequence for nsbeta2+ bug 45256 and bugscape bug 1393.
[r=ssu]


git-svn-id: svn://10.0.0.236/trunk@74805 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 08:18:31 +00:00
ssu%netscape.com
aaec08b079 fixing nsbeta2+ bug #46465 - xpcom.xpi is missing ucharuti.dll for all platforms (name of the lib is different for each platform of course). a=dveditz r=sgehani. not part of tinderbox builds
git-svn-id: svn://10.0.0.236/trunk@74804 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 07:53:44 +00:00
cls%seawood.org
b13abe4768 Bringing BeOS up to speed
git-svn-id: svn://10.0.0.236/trunk@74803 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 06:22:37 +00:00
ben%netscape.com
63563633f4 patches from Peter Annema to improve the look of the toolbar throbber, r=myself, a=waterson, and a fix for an error Peter noticed in button.css, r=myself.
git-svn-id: svn://10.0.0.236/trunk@74802 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 06:05:22 +00:00
nelsonb%netscape.com
f49813a8e9 Move enhanced prime finder function mpp_make_prime from primegen utility
program into mpprime.c.  declared in mpprime.h.


git-svn-id: svn://10.0.0.236/trunk@74801 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 05:41:59 +00:00
nelsonb%netscape.com
811d2c846c Fix bug in mp_div_2d that set r = q % d when a and q are the same mp_int.
Minor performance enhancement to s_mp_div_2d when DIGIT_BIT divides d.


git-svn-id: svn://10.0.0.236/trunk@74800 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 05:39:53 +00:00
nelsonb%netscape.com
184de8a2e4 Fix a bug in recently added function mp_set_bit().
git-svn-id: svn://10.0.0.236/trunk@74799 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 05:32:30 +00:00
mstoltz%netscape.com
5141266fe4 fixing 40159, r&a=beard
git-svn-id: svn://10.0.0.236/trunk@74798 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 04:53:31 +00:00
mstoltz%netscape.com
6bfe9c11ce Fixing 40159, nasty infinite recursion on startup. r&a=beard
git-svn-id: svn://10.0.0.236/trunk@74797 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 04:53:01 +00:00
pinkerton%netscape.com
337afb9f9d Fix for bug 46223, not being able to accept drops from other applications. Basically,
when a drag came in from outside, the drag service was never being notified and a drag
session was never being created. Fix is to use the Start/EndDragSession() methods which
were designed for just this situation. r=hyatt


git-svn-id: svn://10.0.0.236/trunk@74796 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 04:03:42 +00:00
mccabe%netscape.com
f5c0d87def Not part of the Mozilla build.
Promulgate line-editing to the lcshell standalone command-line interpreter, and add more comments to the js shell support for the same.


git-svn-id: svn://10.0.0.236/trunk@74795 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 03:14:49 +00:00
morse%netscape.com
ede116a796 fix bugs 45096 and 42434, host wallet interview and samples on netcenter for commercial product
git-svn-id: svn://10.0.0.236/trunk@74794 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 02:55:39 +00:00
brendan%mozilla.org
b54049c74b Revise connect_nodes to be tmgraphnode_connect, reusable via tmreader.[ch].
git-svn-id: svn://10.0.0.236/trunk@74793 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 02:19:27 +00:00
rogerl%netscape.com
65a4138aa9 Function prototype objects etc.
git-svn-id: svn://10.0.0.236/trunk@74792 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 01:56:47 +00:00
alecf%netscape.com
b37e106905 fix for exception when there is no SMTP server in the pre-filled ISP account case
(also add a few dump()s for future debugging)


git-svn-id: svn://10.0.0.236/trunk@74791 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 01:50:17 +00:00
mkaply%us.ibm.com
3a6f1c84a7 #45872
r=mkaply, a=brendan
Make nsDeviceContextSpecFactoryO look more like Windows


git-svn-id: svn://10.0.0.236/trunk@74790 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 01:26:49 +00:00
morse%netscape.com
25796c2ae8 fix bug 42440, change url for wallet tables to be on netcenter
git-svn-id: svn://10.0.0.236/trunk@74789 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 01:20:50 +00:00
edburns%acm.org
7d07b23bb4 bug=41871
a=edburns
r=ashuk

This checkin makes it so CBrowserContainer is properly released.  The
problem was that the CBrowserContainer was still registered to the
docShell as a listener.  The solution was to call
wcIBrowserContianer::RemoveAllListeners() in the WebShellInitContext
deallocator.


git-svn-id: svn://10.0.0.236/trunk@74788 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 01:03:25 +00:00
dprice%netscape.com
84a8753375 removing incorrect files from manifest
NOT IN BUILD


git-svn-id: svn://10.0.0.236/trunk@74787 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 00:46:22 +00:00
valeski%netscape.com
e6da46d390 not part of build. adding success clause to tree
git-svn-id: svn://10.0.0.236/trunk@74786 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 00:30:16 +00:00
brendan%mozilla.org
2d47b3e145 - Remove <unistd.h> include from bloatblame, it's no longer needed and the link(2) prototype it drags in was causing warnings whenever I used a local variable named 'link'.
- Use uint32 for all quantities, and double for all differences, so that we can overflow without breaking deltas such as (busy == allocs - frees).  This doesn't help sorting, however: if one of the sort keys has overflowed past 0 just a bit, while the other is a very large unsigned number, beware.

- Separate graph link (half an edge, structurally speaking -- no per-edge stats) from graph edge, so that an edge is two links and some stats.  This avoids bloat and copying in connect_nodes (which is soon to become generic and move to tmreader.[ch]).

- Factor data structures better: we now have {allocs,frees} x {bytes,calls} x {direct, total}, declaring the second set as struct tmallcounts and the third as tmcounts.  So, for example, total number of calls to allocators would be allocs.calls.total; bytes freed directly by a graphnode (library, component, or method) would be frees.bytes.direct.

- Teach tmreader_eventloop about 'F' (TM_EVENT_FREE) events: it now updates the direct free byte and call counts for a method, its component, and its library when it reads the event.  Of course, bloatblame ignores this info, because it is concerned only with bloat (total memory allocated).

- Right-align numbers in the first (trace-malloc stats) table.


git-svn-id: svn://10.0.0.236/trunk@74785 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 00:24:08 +00:00
bratell%lysator.liu.se
30ea99bee8 Bug 40027, reads past buffer in nsString::ToCString, r,a=waterson
git-svn-id: svn://10.0.0.236/trunk@74784 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 00:05:55 +00:00
cotter%netscape.com
e56fde15e9 Fixed some broken links in release notes, added release notes banner.
git-svn-id: svn://10.0.0.236/trunk@74783 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 00:01:34 +00:00
mkaply%us.ibm.com
4a1e6c64fa #45872
r=mkaply, a=brendan
Include the right stuff so this header builds regardless of where it is included


git-svn-id: svn://10.0.0.236/trunk@74782 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 00:00:27 +00:00
mkaply%us.ibm.com
db7f3794c2 #45872
r=mkaply, a=brendan
Turn on ScreenManager and Screen classes in GfxFactory


git-svn-id: svn://10.0.0.236/trunk@74781 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 23:58:09 +00:00
mkaply%us.ibm.com
bf6378f710 #45872
r=mkaply, a=brendan
Turn on ScreenManager and Screen classes in Makefile


git-svn-id: svn://10.0.0.236/trunk@74780 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 23:57:12 +00:00
sgehani%netscape.com
6a00cbcbd9 Turn off sole line output in opt builds by wrapping in DEBUG macro.
r = ssu
a = shaver


git-svn-id: svn://10.0.0.236/trunk@74779 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 23:54:12 +00:00
ben%netscape.com
d8103e3824 oops, forgot to remove entry for cache dir from _elementIDs array at
top of file.


git-svn-id: svn://10.0.0.236/trunk@74778 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 23:43:44 +00:00
ben%netscape.com
b229829167 remove ability to select cache folder. so few people use this pref,
and there were bugs associated with it that were causing mac to
croak (45394). If anyone feels strongly about this, feel free to fix
the bugs and re-enable the pref ;) r=suttree@bellatlantic.net (chrisn)


git-svn-id: svn://10.0.0.236/trunk@74777 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 23:29:59 +00:00
varada%netscape.com
f203c67ea5 changing the changedir.bat to reflect change in setup names
git-svn-id: svn://10.0.0.236/trunk@74776 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 23:04:27 +00:00
ben%netscape.com
4cb0df4cc5 fix lock icon in navigator statusbar so tooltip displays, r=pchen
git-svn-id: svn://10.0.0.236/trunk@74775 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 23:03:42 +00:00
rogerl%netscape.com
27cfac201d More ECMA 3 mucking about to support constructors etc.
git-svn-id: svn://10.0.0.236/trunk@74774 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 22:58:04 +00:00
slamm%netscape.com
01d3847a0a Make a static page for the voice stuff everytime the tree updates.
git-svn-id: svn://10.0.0.236/trunk@74773 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 22:58:00 +00:00
mkaply%us.ibm.com
151ffdd315 #46428
r=mkaply, a=brendan
Numeric keypad performs cursor actions in addition to inputting text


git-svn-id: svn://10.0.0.236/trunk@74772 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 22:46:57 +00:00
varada%netscape.com
7e245ab0a5 fix for bugzilla#41628; the navigator.dtd has moved yet again!!
git-svn-id: svn://10.0.0.236/trunk@74771 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 22:37:59 +00:00
varada%netscape.com
6b144d287e fix for bug#37101 adding ability to customize sidebar panels.rdf
git-svn-id: svn://10.0.0.236/trunk@74770 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 22:33:06 +00:00
rhp%netscape.com
2a9ec50ee4 Fix for data loss in AB Sync operation - Bug #: 1495 - r: bienvenu
git-svn-id: svn://10.0.0.236/trunk@74769 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 22:15:45 +00:00
varada%netscape.com
0928f7f55b fix for bug#23990; reflecting the anim gif changes in both classic and modern skins
git-svn-id: svn://10.0.0.236/trunk@74768 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 22:14:25 +00:00
varada%netscape.com
5090158ad4 getting rid of the newline in help1.txt
git-svn-id: svn://10.0.0.236/trunk@74767 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 22:13:37 +00:00
tara%tequilarista.org
2d1903ffa4 Landing Jon Robertson's for bug #41915
git-svn-id: svn://10.0.0.236/trunk@74766 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 22:12:39 +00:00
mkaply%us.ibm.com
62efa224e4 #45603
r=mkaply, a=brendan
Can't use the desktop HDC to do these queries - I'll just grab SYSVALUES


git-svn-id: svn://10.0.0.236/trunk@74765 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 22:09:23 +00:00
tara%tequilarista.org
260f66bb3f Landing Jon Robertson's for bug #41913
git-svn-id: svn://10.0.0.236/trunk@74764 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 22:09:20 +00:00
valeski%netscape.com
d01141325c r-vidur. fixing boundary parsing logic to handle boundary identifiers wrapped in double quotes and spaces, 45878
git-svn-id: svn://10.0.0.236/trunk@74763 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 22:03:15 +00:00
tara%tequilarista.org
25ceaa604f Landing Dave Miller's patch for #25693
git-svn-id: svn://10.0.0.236/trunk@74762 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 22:00:16 +00:00
rhp%netscape.com
5da15cf4e2 Fix for data loss in AB Sync operation - Bug #: 1495 - r: bienvenu
git-svn-id: svn://10.0.0.236/trunk@74761 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 21:19:01 +00:00
pollmann%netscape.com
b633e91fc6 Bug 35875: Display sidebar search results when single engine selected after multiple engines selected. r=rjc
git-svn-id: svn://10.0.0.236/trunk@74760 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 21:06:40 +00:00
bratell%lysator.liu.se
f84ce05c67 Bug 41773, stop up possible (but unlikely) memory leaks in the format=flowed mail decoder. r=rhp,brendan a=brendan.
git-svn-id: svn://10.0.0.236/trunk@74759 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 21:04:11 +00:00
rhp%netscape.com
5dcc3e739d Fix for data loss in AB Sync operation - Bug #: 1495 - r: bienvenu
git-svn-id: svn://10.0.0.236/trunk@74758 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 20:57:40 +00:00
blizzard%redhat.com
db826175e8 add makefiles to get mini chrome for embedding installed on unix. a=waterson,dougt
git-svn-id: svn://10.0.0.236/trunk@74757 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 20:47:09 +00:00
varada%netscape.com
2332b59adb Adding new widgettype DropBox similar to ComboBox except that the values get written into the cache file
git-svn-id: svn://10.0.0.236/trunk@74756 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 20:25:54 +00:00
mkaply%us.ibm.com
029e925f67 #45603
r=mkaply, a=brendan
Fix for mouse not working in context menus


git-svn-id: svn://10.0.0.236/trunk@74755 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 20:25:40 +00:00
varada%netscape.com
ff29160d4a Changing ComboBox to DropBox; adding the options for the dropbox items
git-svn-id: svn://10.0.0.236/trunk@74754 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 20:23:51 +00:00
blizzard%redhat.com
26d4a51d40 add utility to build a chrome registry from the command line. r=waterson a=waterson/hyatt
git-svn-id: svn://10.0.0.236/trunk@74753 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 20:21:17 +00:00
tara%tequilarista.org
c8019b562f Landing Adam Spiers' contributions for security and small functional issues
git-svn-id: svn://10.0.0.236/trunk@74752 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 18:58:54 +00:00
valeski%netscape.com
3538f853c9 perl syntax cleanup. not in build
git-svn-id: svn://10.0.0.236/trunk@74751 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 18:44:21 +00:00
valeski%netscape.com
cd76337540 perl syntax cleanup. not in build
git-svn-id: svn://10.0.0.236/trunk@74750 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 18:38:35 +00:00
valeski%netscape.com
5939b59e61 perl change. not in build
git-svn-id: svn://10.0.0.236/trunk@74749 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 18:22:53 +00:00
valeski%netscape.com
0b9acee042 updating showbuilds vxml. not partof build
git-svn-id: svn://10.0.0.236/trunk@74748 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 18:05:10 +00:00
mozilla.BenB%bucksch.org
cddbd14516 46274: Forgot to remove the structs pref from the |_elementIDs| list. Tnx to jrgm for the hint. r=ducarroz, a=waterson
git-svn-id: svn://10.0.0.236/trunk@74747 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 17:40:05 +00:00
slamm%netscape.com
f74bce40bc do_vxml(): Tweak quoting to get newlines right.
git-svn-id: svn://10.0.0.236/trunk@74746 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 16:33:18 +00:00
valeski%netscape.com
dab19a3f38 updating vxml for the vxml tbox dump
git-svn-id: svn://10.0.0.236/trunk@74745 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 15:29:37 +00:00
axel%pike.org
bf5aa2173e Removing old debug code, not part of the build
git-svn-id: svn://10.0.0.236/trunk@74744 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 15:12:04 +00:00
shanjian%netscape.com
1ee0063ac4 #42837
This should have been checked in before, do not know why it is not.
add a id to composer charset popup menu in order to reference it
in overlay file.


git-svn-id: svn://10.0.0.236/trunk@74743 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 14:46:55 +00:00
valeski%netscape.com
38b7df7686 updating vxml for the vxml tbox dump
git-svn-id: svn://10.0.0.236/trunk@74742 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 14:40:43 +00:00
valeski%netscape.com
84d925b70f updating vxml for the vxml tbox dump
git-svn-id: svn://10.0.0.236/trunk@74741 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 14:29:30 +00:00
brade%netscape.com
68f69bf122 don't disable shift flag if any other modifiers are pressed and the key isPrintable (is a character); r=akkana, ftang; bug #46004
git-svn-id: svn://10.0.0.236/trunk@74740 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 14:12:39 +00:00
brade%netscape.com
0bd70aa4e4 remove unused code (submitted by rcassin@supernova.org)
git-svn-id: svn://10.0.0.236/trunk@74739 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 14:04:26 +00:00
morse%netscape.com
9778e9fdc5 quickfill has reappeared on menu -- backing out part of changes made for 1.8
git-svn-id: svn://10.0.0.236/trunk@74738 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 13:06:19 +00:00
cls%seawood.org
2282deb783 Lets show some objdir sensitivity.
git-svn-id: svn://10.0.0.236/trunk@74737 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 11:03:25 +00:00
rbs%maths.uq.edu.au
536a43eece Bug 18814. Return the x-height that complies with the convention in the CSS spec. r,a:waterson
git-svn-id: svn://10.0.0.236/trunk@74736 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 08:32:39 +00:00
axel%pike.org
28b53c8f7a Adding makefile.wins for transformiix examples, not part of build, submitted by Arthur Barrett, raised build number and updated contributors/changes
git-svn-id: svn://10.0.0.236/trunk@74735 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 07:03:40 +00:00
ben%netscape.com
584e921d8d fix js error in theme switching pref panel (forgot to check in an update for this
file with my check in to this panel last ngiht)


git-svn-id: svn://10.0.0.236/trunk@74734 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 06:33:03 +00:00
warren%netscape.com
008aa1bca2 Added a cast to make gcc happy.
git-svn-id: svn://10.0.0.236/trunk@74733 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 06:31:20 +00:00
warren%netscape.com
98bb3dfe16 Copied xpcom.properties to global/locale.
git-svn-id: svn://10.0.0.236/trunk@74732 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 06:10:47 +00:00
warren%netscape.com
d93cdd6606 Fixed linux makefile for xpcom.properties
git-svn-id: svn://10.0.0.236/trunk@74731 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 05:54:38 +00:00
warren%netscape.com
764d1e2e78 Added xpcom.properties to linux make.
git-svn-id: svn://10.0.0.236/trunk@74730 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 05:51:34 +00:00
warren%netscape.com
997161d193 Factored string bundles out of necko. Fixes bug 42107 - need to fix string bundle init workaround. Also bug 40506 - nsIWebProgressListener needs status text. Status messages now work in mozilla and viewer with internationalized and parameterized text! Added temporary error architecture until bug 13423 can be fixed. Extended nsIStringBundleService to provide method to format status message. r=valeski,jband,tao. verified=mstoltz
git-svn-id: svn://10.0.0.236/trunk@74729 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 05:45:56 +00:00
dougt%netscape.com
065edc16d4 backing out libwebbrwsr. it is needed to startup. I need to look into this.
git-svn-id: svn://10.0.0.236/trunk@74728 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 05:30:33 +00:00
dougt%netscape.com
b79e022006 Updating config files
Adding require (ftang needs to review) i18n res files
removing xpfe webbrowser.
removing test xpt files


git-svn-id: svn://10.0.0.236/trunk@74727 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 05:22:51 +00:00
uid408
1d3585bcc1 Disable use of AlphaBlend() on Win98, it's broken. Bug 36694. r=kmcclusk, a=brendan
git-svn-id: svn://10.0.0.236/trunk@74726 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 03:51:39 +00:00
uid408
9c00afae6f Fix for VC5 builds. Bug 36694. r=kmcclusk, a=brendan
git-svn-id: svn://10.0.0.236/trunk@74725 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 03:51:04 +00:00
brendan%mozilla.org
67f9e240ed Oops, nsXBLService implements two interfaces: nsIXBLService and nsIMemoryPressureObserver (r=dbaron@fas.harvard.edu).
git-svn-id: svn://10.0.0.236/trunk@74724 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 01:44:22 +00:00
sfraser%netscape.com
cf8acf4b78 Fix for bug 20743 -- implement a memory cushion for Mac, to better handle low memory conditions. r=pinkerton
git-svn-id: svn://10.0.0.236/trunk@74723 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 01:04:55 +00:00
hyatt%netscape.com
f304a6a21b Fix for 45663. r=danm
git-svn-id: svn://10.0.0.236/trunk@74722 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 00:38:40 +00:00
hyatt%netscape.com
15eca716b8 Fix for 45663. r=danm
git-svn-id: svn://10.0.0.236/trunk@74721 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 00:35:39 +00:00
ducarroz%netscape.com
62d3778d9e Fix for bug 46152. Checkin fix for kin. Partially backup Rods' last change because the reflow function won't be called when the text control is nested into a box (textfield). R=ducarroz
git-svn-id: svn://10.0.0.236/trunk@74720 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 00:32:35 +00:00
wtc%netscape.com
43946c0527 Bugzilla bug #46166: checked in a patch contributed by Marcello Nuccio
<marcenuc@lica.unimo.it>. r=roeber@netscape.com.


git-svn-id: svn://10.0.0.236/trunk@74719 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 00:30:43 +00:00
alecf%netscape.com
ed680ac1e7 fix for #1539 - make ISP-built accounts be supported by the "invalid account" system, so that ISP-built accounts can skip the other panels of the wizard.
r=mscott


git-svn-id: svn://10.0.0.236/trunk@74718 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 00:29:07 +00:00
nelsonb%netscape.com
9bc51270b5 Update nTires via a pointer argument to mpp_make_prime().
Change some printfs.


git-svn-id: svn://10.0.0.236/trunk@74717 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 00:16:57 +00:00
nelsonb%netscape.com
b7fd3c117e Add new function mpp_fermat_list, which performs the fermat test on a
list of "witness" numbers.  Simplify and accelerate mpp_pprime().


git-svn-id: svn://10.0.0.236/trunk@74716 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 00:15:06 +00:00
nelsonb%netscape.com
0f42d334f1 Fix assertion. Comparison sense was inverted.
git-svn-id: svn://10.0.0.236/trunk@74715 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 00:12:57 +00:00
rbs%maths.uq.edu.au
03b3282435 [not part of default build] Fix build bustage b:42793. It prevented the enabling of xprint with mathml. Paul B. Saitta <pbs@po.cwru.edu> verified that the changes compile and run. a:waterson@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@74714 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 00:09:01 +00:00
rbs%maths.uq.edu.au
84c66add50 [not part of default build] gracefully handle cases where stretching failed to avoid jamming chars. a:waterson@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@74713 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-25 00:08:15 +00:00
mcafee%netscape.com
b23580a73b Adding file for Ken Estes <kestes@staff.mail.com>
git-svn-id: svn://10.0.0.236/trunk@74712 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 23:52:24 +00:00
ben%netscape.com
6adbcd65ae fixing some of the broken search functionality for 45221, so that nsbeta2 doesnt go out with a broken search feature.
git-svn-id: svn://10.0.0.236/trunk@74711 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 23:46:26 +00:00
gagan%netscape.com
e3618e07ea Fix for bug 44497. Ebay's wacky multiple Location responses were being appended. r=gordon
git-svn-id: svn://10.0.0.236/trunk@74710 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 23:41:26 +00:00
warren%netscape.com
2d50cbd94e Temporarily taking out jar stuff.
git-svn-id: svn://10.0.0.236/trunk@74709 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 23:15:47 +00:00
attinasi%netscape.com
4483a225be Accidental debug code removed: b=46090 r=ianh a=waterson
git-svn-id: svn://10.0.0.236/trunk@74708 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 23:09:30 +00:00
sgehani%netscape.com
a7b84e6d7b Fixing linux installer horkage: parser handling substring comparisons with
incorrect length assumptions to strncmp's.

b = 46263
r = dbragg
a = granrose


git-svn-id: svn://10.0.0.236/trunk@74707 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 22:53:34 +00:00
attinasi%netscape.com
f02e8d4669 Fixed the way the HTML element's background is handled. b=2285 r=dbaron
git-svn-id: svn://10.0.0.236/trunk@74706 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 22:51:41 +00:00
slamm%netscape.com
437e0333be Add vxml from Jud Valeski
git-svn-id: svn://10.0.0.236/trunk@74705 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 22:47:39 +00:00
hyatt%netscape.com
94f1cf4918 Fix for 45951. r=waterson.
git-svn-id: svn://10.0.0.236/trunk@74704 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 22:42:55 +00:00
hyatt%netscape.com
be513fe02e Fix for bug #45951. r=waterson.
git-svn-id: svn://10.0.0.236/trunk@74703 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 22:42:34 +00:00
mkaply%us.ibm.com
20f04c8f39 #45872
r=mkaply, a=brendan
Implement Screen and ScreenManager classes on OS/2 - not part of build yet


git-svn-id: svn://10.0.0.236/trunk@74702 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 22:32:19 +00:00
mkaply%us.ibm.com
0859befd69 #45872
r=mkaply, a=brendan
RequiresInvertedMask is unnecessary - we already have the device depth, just check it.


git-svn-id: svn://10.0.0.236/trunk@74701 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 22:31:26 +00:00
mkaply%us.ibm.com
de19b2778f #45872
r=mkaply, a=brendan
Rather than forward declaring the class, include nsFont.h


git-svn-id: svn://10.0.0.236/trunk@74700 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 22:30:49 +00:00
mkaply%us.ibm.com
bacb195736 #45872
r=mkaply, a=brendan
No need to use these APIs - we have access to the widget HWND


git-svn-id: svn://10.0.0.236/trunk@74699 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 22:30:18 +00:00
bratell%lysator.liu.se
d72cf7feca Fixes for bug 46173 and bug 46188, handle whitespace correctly when decoding a format=flowed mail. r=rhp, a=brendan.
git-svn-id: svn://10.0.0.236/trunk@74698 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 22:11:41 +00:00
nhotta%netscape.com
ebc2c59614 Fixed a typo "so-8859-2" to "iso-8859-2", bug 46075, r=ftang.
git-svn-id: svn://10.0.0.236/trunk@74697 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 21:56:33 +00:00
bryner%uiuc.edu
4d96d57198 Removing the old copy of this file. The current version is in
netwerk/streamconv/test.  Not part of build.


git-svn-id: svn://10.0.0.236/trunk@74696 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 21:55:00 +00:00
warren%netscape.com
0e8bc2faaa Added jar packaging stuff.
git-svn-id: svn://10.0.0.236/trunk@74695 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 21:48:10 +00:00
warren%netscape.com
179be2216b First Checked In.
git-svn-id: svn://10.0.0.236/trunk@74694 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 21:47:51 +00:00
warren%netscape.com
97583c5a1b Added $build{jars} = 0;
git-svn-id: svn://10.0.0.236/trunk@74693 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 21:45:01 +00:00
brendan%mozilla.org
06dce89eb2 What a dork, I didn't test-build on Linux!
git-svn-id: svn://10.0.0.236/trunk@74692 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 21:28:08 +00:00
morse%netscape.com
f4a060f4d6 bug 45981, no blue-box dialog for browser-generated login forms, r=dveditz
git-svn-id: svn://10.0.0.236/trunk@74691 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 21:16:18 +00:00
ashuk%eng.sun.com
711d526c7d author = ashuk
r = edburns
a = edburns

Fix for Bugs: 44774, 44775 and 41780


git-svn-id: svn://10.0.0.236/trunk@74690 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 21:15:03 +00:00
putterman%netscape.com
5f741e9c79 backing out brendan's changes to fix build
git-svn-id: svn://10.0.0.236/trunk@74689 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 21:13:13 +00:00
varada%netscape.com
ded94b7b5d fix for bug#45883 - crash was caused because the path was pointing to a non existent widget
git-svn-id: svn://10.0.0.236/trunk@74688 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 21:11:46 +00:00
morse%netscape.com
56e7f14d9b attempt to fix build bustage
git-svn-id: svn://10.0.0.236/trunk@74687 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 21:03:41 +00:00
nisheeth%netscape.com
5a1826aa96 Checking in patches submitted by Justin Smith (jjs@acis.com.au) that fix the windows build of transformiix. Thanks, Justin! Does not affect the mozilla build.
git-svn-id: svn://10.0.0.236/trunk@74686 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 20:35:08 +00:00
brendan%mozilla.org
1808da68e2 Micro-optimize source (compilers probably do it, but hey); fix a comment.
git-svn-id: svn://10.0.0.236/trunk@74685 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 20:17:24 +00:00
mscott%netscape.com
f73ba6913b Bug #45226 --> fix security hole in keywords by only allowing keyword searches if the url was an http (or https) url.
Currently other urls (like imap, news, ftp, etc) would end up getting sent to the keyword server if we weren't able to
connect to the host specified in the url.
r=valeski


git-svn-id: svn://10.0.0.236/trunk@74684 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 20:14:53 +00:00
brendan%mozilla.org
2e21a3af18 Fix broken code that stored off the end of 'vector' in ProcessArgs (not part of build).
git-svn-id: svn://10.0.0.236/trunk@74683 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 20:13:50 +00:00
conrad%ingress.com
8e6052125a 1. Fixed ResolvePathAndSpec - if directories did not exist, the vRefNum and dirID were getting zeroed out. If the path was relative this was wrong.
2. Fixed MoveCopy - If nsnull was passed as newName, which is valid, new name was uninitialized garbage. 
r-dougt


git-svn-id: svn://10.0.0.236/trunk@74682 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 20:05:54 +00:00
dave%intrec.com
14edfeb111 Fix for bug 46207 (bugidtype=exclude breaks buglist.cgi).
git-svn-id: svn://10.0.0.236/trunk@74681 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 19:40:04 +00:00
pnunn%netscape.com
1275af4491 bug#30852: (&related to #46032,#46049). Use default channel load attributes since
LoadGroup attributes not set correctly. pnunn.


git-svn-id: svn://10.0.0.236/trunk@74679 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 19:32:43 +00:00
attinasi%netscape.com
86fc76956d Checkin of performance data: not part of any build
git-svn-id: svn://10.0.0.236/trunk@74678 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 19:14:36 +00:00
ben%netscape.com
10083e39b0 Windows quit menuitem should read "Exit" not "Quit", 4908. Fixing a really annoying
and yet trivial platform bug.


git-svn-id: svn://10.0.0.236/trunk@74677 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 12:42:38 +00:00
ben%netscape.com
7b5dcaf8af fix for 43350, provide some warning about impending data loss before switching themes
git-svn-id: svn://10.0.0.236/trunk@74676 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 12:11:24 +00:00
dveditz%netscape.com
6e72c7a7f6 bug 41165, fixing getFolder("file:///"), another casualty of the conversion to nsIFile
git-svn-id: svn://10.0.0.236/trunk@74675 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 09:40:49 +00:00
dveditz%netscape.com
4c18badebe bug 28590, fixing disk-space checking in scripts
git-svn-id: svn://10.0.0.236/trunk@74674 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 09:09:29 +00:00
sgehani%netscape.com
adc92bd421 Fix linux installer crash on exit by tweaking progress update.
[nsbeta2+ b = 36781; r = syd]


git-svn-id: svn://10.0.0.236/trunk@74673 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 07:10:45 +00:00
sgehani%netscape.com
82c2455c99 Fix linux installer crash on exit by tweaking progress update.
[nsbeta2+ b = 36781; r = syd]


git-svn-id: svn://10.0.0.236/trunk@74672 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-24 07:08:35 +00:00
bryner%uiuc.edu
69303237d6 Removing an obsolete test file. Not part of build.
git-svn-id: svn://10.0.0.236/trunk@74671 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-23 21:34:29 +00:00
waterson%netscape.com
91e5c9cd23 Bug 45698. libplugin.so is a component now. Update packager files to reflect this.
git-svn-id: svn://10.0.0.236/trunk@74670 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-23 19:27:52 +00:00
rjc%netscape.com
f834afe8e5 Trivial fix for bookmark panel sorting. (Slamm apparently renamed the routine, so just use the new name.) r=me
git-svn-id: svn://10.0.0.236/trunk@74669 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-23 10:37:27 +00:00
rjc%netscape.com
7acf3b0f05 Simple fix: Be sure to include the XUL overlay utilityOverlay.xul for the getBrowserURL() function. r=me
git-svn-id: svn://10.0.0.236/trunk@74668 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-23 08:44:59 +00:00
rjc%netscape.com
dcbe188da9 Fix bug # 46052: simple misspelling fix.
git-svn-id: svn://10.0.0.236/trunk@74667 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-23 08:20:47 +00:00
kvisco%ziplink.net
904eee7c04 Not part of regular build, a=leaf. Updated changes and contributor info.
git-svn-id: svn://10.0.0.236/trunk@74666 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-23 07:57:12 +00:00
Peter.VanderBeken%pandora.be
899ad4deb9 Add build support for the SOAP part of xmlextras. Forgot to check this in. Doesn't affect default build. a/r=vidur.
git-svn-id: svn://10.0.0.236/trunk@74665 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-23 07:55:51 +00:00
kvisco%ziplink.net
5451424359 Not part of regular build, a=leaf. Updated version info.
git-svn-id: svn://10.0.0.236/trunk@74664 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-23 07:43:37 +00:00
kvisco%ziplink.net
8b734b7fae Not part of regular build, a=leaf. Updated some test files.
git-svn-id: svn://10.0.0.236/trunk@74663 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-23 07:25:30 +00:00
kvisco%ziplink.net
0ece068369 Not part of regular build, a=leaf. Fixed bug I introduced with a previous patch. prevToken was getting set to NULL in some places when it shouldn't.
git-svn-id: svn://10.0.0.236/trunk@74662 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-23 07:24:45 +00:00
rjc%netscape.com
ef381a50ae Fix bug # 44688: simple fix for columns in bookmarks search window. r=me
git-svn-id: svn://10.0.0.236/trunk@74661 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-23 07:05:29 +00:00
rjc%netscape.com
1b94d83122 Fix bug # 46181: when getting a nsIFile from a file URL, don't open an nsIFilechannel. Patch from dougt, r/a=me
git-svn-id: svn://10.0.0.236/trunk@74660 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-23 06:58:16 +00:00
nisheeth%netscape.com
218ec59f14 Fix for nsbeta2+ bug 43472. r=rpotts. We no longer crash on exit on Full Circle enabled builds.
git-svn-id: svn://10.0.0.236/trunk@74659 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-23 06:51:39 +00:00
kvisco%ziplink.net
69b4b3fbb4 Not part of regular build, a=leaf. Fixed bug when printing comments; removed leading and trailing whitespace.
git-svn-id: svn://10.0.0.236/trunk@74658 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-23 06:45:59 +00:00
jband%netscape.com
c39ada7a84 fix uninitialized variable
git-svn-id: svn://10.0.0.236/trunk@74657 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 22:50:35 +00:00
mscott%netscape.com
660a6f6cb5 Bug #39736 --> remove code that was incorrectly stomping the ougoing charset of the message when you are
replying to it.
r=alecf


git-svn-id: svn://10.0.0.236/trunk@74656 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 21:36:06 +00:00
dave%intrec.com
dbbb3f5b30 Fix for bug 30826 (new email tech not being honored for QA contacts).
git-svn-id: svn://10.0.0.236/trunk@74655 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 21:09:33 +00:00
bratell%lysator.liu.se
9fc2c146d9 Fix bug 43813 by removing erroneous test. r=rhp@netscape.com a=brendan@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@74654 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 17:32:28 +00:00
mkaply%us.ibm.com
6f1a2acf3f OS/2 Tinderbox breakage
Attempt 2 to fix this - just cast the functions


git-svn-id: svn://10.0.0.236/trunk@74653 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 15:19:57 +00:00
mkaply%us.ibm.com
1121dc07a0 OS/2 Tinderbox breakage
Attempt 1 to fix this - add PR_CALLBACK for VisualAge


git-svn-id: svn://10.0.0.236/trunk@74652 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 14:13:00 +00:00
dprice%netscape.com
6bc88d1a15 correcting locale info
git-svn-id: svn://10.0.0.236/trunk@74651 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 09:17:52 +00:00
dprice%netscape.com
b7c1c52952 updating locale info
git-svn-id: svn://10.0.0.236/trunk@74650 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 09:12:23 +00:00
dprice%netscape.com
3975c04c79 corrected locale info
git-svn-id: svn://10.0.0.236/trunk@74649 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 09:09:39 +00:00
dprice%netscape.com
1203e3062b adding a few files I missed
git-svn-id: svn://10.0.0.236/trunk@74648 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 08:51:35 +00:00
dprice%netscape.com
081f754d04 adding chrome manifest
git-svn-id: svn://10.0.0.236/trunk@74647 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 08:47:14 +00:00
dprice%netscape.com
582d8a8002 adding a chrome manifest for layout
NOT IN THE BUILD


git-svn-id: svn://10.0.0.236/trunk@74646 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 08:23:42 +00:00
dprice%netscape.com
02b3b3e837 adding chrome manifest file for comminicator
git-svn-id: svn://10.0.0.236/trunk@74645 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 08:08:49 +00:00
dprice%netscape.com
4921e75e3e fixing bad locale directory
NOT IN THE BUILD


git-svn-id: svn://10.0.0.236/trunk@74644 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 07:54:12 +00:00
dprice%netscape.com
c1c34c09c0 fixing typos
NOT IN THE BUILD


git-svn-id: svn://10.0.0.236/trunk@74643 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 07:38:58 +00:00
mozilla.BenB%bucksch.org
08a8db6dcd 44446: Remove HTML->HTML recognition of structured phrases from Prefs UI and disable by default.
git-svn-id: svn://10.0.0.236/trunk@74642 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 07:37:20 +00:00
dprice%netscape.com
b7413a3b76 breaking out locale into locales.jar
NOT IN THE BUILD


git-svn-id: svn://10.0.0.236/trunk@74641 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 07:34:35 +00:00
nelsonb%netscape.com
3cbed1e4f4 Add -fullwarn to some build flags. Change dependencies for primegen.
git-svn-id: svn://10.0.0.236/trunk@74640 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 07:22:37 +00:00
nelsonb%netscape.com
c8a5e2ee49 Implement sieving to accelerate elimination of composites.
This sieve eliminates all but about 3500 numbers from each range of 64k.


git-svn-id: svn://10.0.0.236/trunk@74639 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 05:54:21 +00:00
warren%netscape.com
e2c80a9995 Registering nsIErrorService
git-svn-id: svn://10.0.0.236/trunk@74638 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 05:48:04 +00:00
warren%netscape.com
28106c61c3 Added nsIErrorService to build.
git-svn-id: svn://10.0.0.236/trunk@74637 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 05:46:39 +00:00
warren%netscape.com
da806f7878 Added nsIErrorService to map from nsresult codes to string bundles and keys for error messages.
git-svn-id: svn://10.0.0.236/trunk@74636 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 05:38:43 +00:00
nelsonb%netscape.com
bc864ca0b6 Use large prime table for faster prime gen. Make prime table "const".
Change functions that use prime table to use const arguments.


git-svn-id: svn://10.0.0.236/trunk@74635 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 05:36:45 +00:00
warren%netscape.com
223387a585 Fixed slashes
git-svn-id: svn://10.0.0.236/trunk@74634 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 05:00:17 +00:00
waterson%netscape.com
34482cc84b Fix build bustage.
git-svn-id: svn://10.0.0.236/trunk@74633 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 03:59:49 +00:00
waterson%netscape.com
396e1c3d7e Brownian hacking to fix build bustage.
git-svn-id: svn://10.0.0.236/trunk@74632 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 03:17:55 +00:00
edburns%acm.org
d9e0e9fe10 bug=41977
Insert parameter checks for all webclient methods.


git-svn-id: svn://10.0.0.236/trunk@74631 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 02:48:26 +00:00
tao%netscape.com
b00587fcee 41054: Bundle 2-3 langpacks w/Seamonkey build. r=ssu,dveditz,ssu.
git-svn-id: svn://10.0.0.236/trunk@74630 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 02:44:13 +00:00
edburns%acm.org
765a295e3e Remove accidentally inserted ^M chars.
git-svn-id: svn://10.0.0.236/trunk@74629 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 02:14:57 +00:00
waterson%netscape.com
73838f0ece Bug 45698. Land PLUGIN_LOVE_2000_07_17_BRANCH. r=av
git-svn-id: svn://10.0.0.236/trunk@74628 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 02:11:04 +00:00
waterson%netscape.com
5dc75db588 Bug 45698. Fix Win32 build bustage. Checked in from wrong machine.
git-svn-id: svn://10.0.0.236/trunk@74627 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 01:58:55 +00:00
alecf%netscape.com
ce715e17ac fix for #44876 contributed by timeless@bemail.org
r=alecf, a=brendan@mozilla.org
update tasks menu to spec


git-svn-id: svn://10.0.0.236/trunk@74626 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 01:39:44 +00:00
waterson%netscape.com
5a7e8c7288 Bug 45698. Land PLUGIN_LOVE_2000_07_17_BRANCH. Make plugins into a module. r=av.
git-svn-id: svn://10.0.0.236/trunk@74625 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 01:37:07 +00:00
waterson%netscape.com
9ea597c1b1 Bug 45698. Land PLUGIN_LOVE_2000_07_17_BRANCH: implement XPCOM plugins. r=av
git-svn-id: svn://10.0.0.236/trunk@74624 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 01:34:13 +00:00
waterson%netscape.com
a491cbe9f3 Bug 45698. Build order changes; modules/plugins now needs gfx.
git-svn-id: svn://10.0.0.236/trunk@74623 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 01:27:15 +00:00
mjudge%netscape.com
080354124d awful regression of not copypasting from textareas! fixed.r=akkana,anthonyd
git-svn-id: svn://10.0.0.236/trunk@74622 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 01:11:49 +00:00
brendan%mozilla.org
18fee83bdd Fix second (prototype-owns-property) setter/shared special case to unlock properly (45940, r=mccabe).
git-svn-id: svn://10.0.0.236/trunk@74621 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 01:03:04 +00:00
edburns%acm.org
67050b538d bug=23157
r=dougt, Conrad Carlen
a=dougt, Conrad Carlen

Use Moz_BinDirectory instead of OS_CurrentProcessDirectory
to allow embedding apps to use mozilla.


git-svn-id: svn://10.0.0.236/trunk@74620 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 00:54:07 +00:00
nbhatla%netscape.com
1a1f932945 #43658: Mac Classic polish fixes to toolbar buttons. #45534: Prevents thumb in scrollbar from shrinking too small in linux and windows classic skin. #44430: Mac Classic skin toolbar polish fixes. #46005: Fixes rt. click crash. #45336: Fixes linux crashing in Mail. #40780: Progress-meter patch for mac classic skin. r=hangas
git-svn-id: svn://10.0.0.236/trunk@74619 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 00:48:29 +00:00
edburns%acm.org
b3341a1012 bug=23157
r=av
a=waterson

Don't use hard coded 2000.  Instead use sizeof(path).


git-svn-id: svn://10.0.0.236/trunk@74618 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 00:48:26 +00:00
nbhatla%netscape.com
7851c7eeba Bug #43658: AddressBook Skin. r=hangas
git-svn-id: svn://10.0.0.236/trunk@74617 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 00:45:32 +00:00
danm%netscape.com
fbc3c3eeed pointing box-header-circle's background-image url to the gif's actual location. parallel to Mac bug 45509 r=ben@netscape.com
git-svn-id: svn://10.0.0.236/trunk@74616 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 00:21:52 +00:00
danm%netscape.com
3945090397 pointing box-header-circle's background-image url to the gif's actual location. bug 45509 r=ben@netscape.com
git-svn-id: svn://10.0.0.236/trunk@74615 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 00:20:41 +00:00
mscott%netscape.com
4c4fe6e5f8 Bug #45956 --> Fix crash trying to forward some messages as inline (esp. messages
with attachments with charsets). Fix is to use the mime service to get a file extension
for the content type instead of trying to use the value of the content type (which can
include charset information) as the file extension for the attachment.
r=alecf


git-svn-id: svn://10.0.0.236/trunk@74614 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-22 00:04:11 +00:00
valeski%netscape.com
0df741a635 39797. r=mscott. MAC was sending back an empty string as the mime type down in the MIMEService, now we return an error in the mime service if we confront this, and that causes HTTP to produce a default type
git-svn-id: svn://10.0.0.236/trunk@74613 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-21 23:52:36 +00:00
jst%netscape.com
d0fcc932ea Fixing nsbeta2+ bug 45019, images didn't show up on document that were fully created with document.open(): document.write();... r=nisheet&rpotts
git-svn-id: svn://10.0.0.236/trunk@74612 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-21 23:44:38 +00:00
akkana%netscape.com
57ebd97419 42885: cvs remove files which are no longer used -- they've
been moved from global to communicator.  r=ben.


git-svn-id: svn://10.0.0.236/trunk@74611 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-21 23:21:54 +00:00
pnunn%netscape.com
40d1196fd2 fix for bug#30852: backing out change that resets the loadgroups attribs from the channel. pnunn,
r:gagan.


git-svn-id: svn://10.0.0.236/trunk@74610 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-21 22:57:36 +00:00
mscott%netscape.com
897ed4c005 Fix build breakage for unix.
git-svn-id: svn://10.0.0.236/trunk@74609 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-21 22:43:26 +00:00
gayatrib%netscape.com
f729b57e7d fixing the linux bustage on bug 43883
git-svn-id: svn://10.0.0.236/trunk@74608 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-21 22:39:54 +00:00
bryner%uiuc.edu
c90c2b3792 Fix bug 45786 - need to use getService(), not createInstance() to get the
clipboard.  r=jelwell,rjc.


git-svn-id: svn://10.0.0.236/trunk@74607 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-21 22:19:20 +00:00
dougt%netscape.com
7777ffc960 r,a=brendan@mozilla.org 24052
git-svn-id: svn://10.0.0.236/trunk@74606 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-21 22:16:18 +00:00
nhotta%netscape.com
55cc5b73b9 Added code to pass default charset to directory viewer, bug 28787, r=law.
git-svn-id: svn://10.0.0.236/trunk@74605 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-21 22:15:18 +00:00
nhotta%netscape.com
c7dd88f116 Unescape escaped filename, bug 39956, r=mscott, a=waterson.
git-svn-id: svn://10.0.0.236/trunk@74604 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-21 22:14:44 +00:00
jfrancis%netscape.com
e424cc7f28 fix for 33213; r=sfraser
git-svn-id: svn://10.0.0.236/trunk@74603 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-21 22:06:48 +00:00
gayatrib%netscape.com
186bd5cb48 Checking in fix for bug 43883 for Jerry Baker form mozilla.org. review=gayatrib approved=waterson
git-svn-id: svn://10.0.0.236/trunk@74602 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-21 22:05:57 +00:00
rogerl%netscape.com
c19c5e0a5b r=brendan@mozilla.org Bug #31381 Bug in Alpha 64-bit pointer cast.
Added extra 'long'field to Java wrapper object to handle platforms with
64 bit pointers.


git-svn-id: svn://10.0.0.236/trunk@74601 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-21 21:57:29 +00:00
mscott%netscape.com
339a548cdb Force pr logging even in release builds. QA needs this to debug some smtp problems in release builds.
Has no effect on code execution.


git-svn-id: svn://10.0.0.236/trunk@74600 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-21 21:48:02 +00:00
rogerl%netscape.com
6d6a49b7f2 r,a=brendan@mozilla.org. Bug #23502, crash in qsort when user function
misbehaves.


git-svn-id: svn://10.0.0.236/trunk@74599 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-21 21:46:22 +00:00
nelsonb%netscape.com
dd1972ee1c Change s_mp_norm to always use a power of two as the normalizing factor.
This enhancement performance by turning the normalizing and denormalizing
operations into shifts.


git-svn-id: svn://10.0.0.236/trunk@74598 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-21 21:06:08 +00:00
nelsonb%netscape.com
9b0faa98be Implement mpl_get_bit, mpl_set_bit, mpl_significant_bits.
git-svn-id: svn://10.0.0.236/trunk@74597 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-21 21:04:14 +00:00
nelsonb%netscape.com
c9d7f585a7 Fix symbol prefixes in some comments.
git-svn-id: svn://10.0.0.236/trunk@74596 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-21 20:50:31 +00:00
brendan%mozilla.org
a85c8874b5 Finish factoring tmreader from bloatblame; misc. clenaups (not part of build).
git-svn-id: svn://10.0.0.236/trunk@74595 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-21 20:42:15 +00:00
waterson%netscape.com
ee846f2c83 Bug 46079. Fix regression I introduced yesterday; NS_LITERAL_STRING() expands to nsAutoString on Linux, so this would assign a compiler temporary to the 'tag' variable.
git-svn-id: svn://10.0.0.236/trunk@74594 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-21 19:59:39 +00:00
neeti%netscape.com
50e67e8440 fix for 46095.[regression] Submiting to a bug in bugzilla causes crash.a=leaf
git-svn-id: svn://10.0.0.236/trunk@74593 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-21 19:28:09 +00:00
254 changed files with 652 additions and 96529 deletions

View File

@@ -1,214 +0,0 @@
#! gmake
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is Rhino code, released
# May 6, 1998.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the
# terms of the GNU Public License (the "GPL"), in which case the
# provisions of the GPL are applicable instead of those above.
# If you wish to allow use of your version of this file only
# under the terms of the GPL and not to allow others to use your
# version of this file under the NPL, indicate your decision by
# deleting the provisions above and replace them with the notice
# and other provisions required by the GPL. If you do not delete
# the provisions above, a recipient may use your version of this
# file under either the NPL or the GPL.
#
# Makefile for javascript in java.
#
# This makefile is intended for packaging releases, and probably isn't
# suitable for production use - it doesn't attempt to do understand
# java dependencies beyond the package level.
#
# The makefiles for the subdirectories included in this package are
# intended to be called by this makefile with the proper CLASSDIR,
# PATH_PREFIX etc. variables. Makefiles in subdirectories are
# actually executed in the toplevel directory, with the PATH_PREFIX
# variable set to the subdirectory where the makefile is located.
#
# Initial version courtesy Mike Ang.
# Next version by Mike McCabe
# Don't include SHELL define (per GNU manual recommendation) because it
# breaks WinNT (with GNU make) builds.
# SHELL = /bin/sh
# Some things we might want to tweek.
CLASSDIR = classes
PACKAGE_NAME = org.mozilla.javascript
PACKAGE_PATH = org/mozilla/javascript
# jar filenames and the directories that build them.
JS_JAR = js.jar
JS_DIR = $(PACKAGE_PATH)
JSTOOLS_JAR = jstools.jar
JSTOOLS_DIR = $(PACKAGE_PATH)/tools
JARS = $(JS_JAR) $(JSTOOLS_JAR)
# It's not polite to store toplevel files in a tarball or zip files.
# What is the name of the toplevel directory to store files in?
# XXX we should probably add versioning to this.
DIST_DIR = jsjava
# XXX test this with sj
JAVAC = javac
# We don't define JFLAGS but we do export it to child
# builds in case it's defined by the environment.
# To build optimized (with javac) say 'make JFLAGS=-O'
GZIP = gzip
ZIP = zip
UNZIP = unzip
# Shouldn't need to change anything below here.
# For Windows NT builds (under GNU make).
ifeq ($(OS_TARGET), WINNT)
CLASSPATHSEP = '\\;'
else
CLASSPATHSEP = :
endif
# Make compatibility - use these instead of gmake 'export VARIABLE'
EXPORTS = CLASSDIR=$(CLASSDIR) JAVAC=$(JAVAC) JFLAGS=$(JFLAGS) SHELL=$(SHELL) \
PACKAGE_PATH=$(PACKAGE_PATH) PACKAGE_NAME=$(PACKAGE_NAME)
helpmessage : FORCE
@echo 'Targets include:'
@echo ' all - make jars, examples'
@echo ' jars - make js.jar, jstools.jar'
@echo ' fast - quick-and-dirty "make jars", for development'
@echo ' examples - build the .class files in the examples directory'
@echo ' check - perform checks on the source.'
@echo ' clean - remove intermediate files'
@echo ' clobber - make clean, and remove .jar files'
@echo ' zip - make a distribution .zip file'
@echo ' zip-source - make a distribution .zip file, with source'
@echo ' tar - make a distribution .tar.gz file'
@echo ' tar-source - make a distribution .tar.gz, with source'
@echo
@echo 'Define OS_TARGET to "WINNT" to build on Windows NT with GNU make.'
@echo
all : jars examples
jars : $(JARS)
fast : fast_$(JS_JAR) $(JSTOOLS_JAR)
# Always call the sub-Makefile - which may decide that the jar is up to date.
$(JS_JAR) : FORCE
$(MAKE) -f $(JS_DIR)/Makefile JAR=$(@) $(EXPORTS) \
PATH_PREFIX=$(JS_DIR) \
CLASSPATH=.
fast_$(JS_JAR) :
$(MAKE) -f $(JS_DIR)/Makefile JAR=$(JS_JAR) $(EXPORTS) \
PATH_PREFIX=$(JS_DIR) \
CLASSPATH=. \
fast
$(JSTOOLS_JAR) : $(JS_JAR) FORCE
$(MAKE) -f $(JSTOOLS_DIR)/Makefile JAR=$(@) $(EXPORTS) \
PATH_PREFIX=$(JSTOOLS_DIR) \
CLASSPATH=./$(JS_JAR)$(CLASSPATHSEP).
examples : $(JS_JAR) FORCE
$(MAKE) -f examples/Makefile $(EXPORTS) \
PATH_PREFIX=examples \
CLASSPATH=./$(JS_JAR)
# We ask the subdirs to update their MANIFESTs
MANIFEST : FORCE
$(MAKE) -f $(JS_DIR)/Makefile JAR=$(JS_JAR) $(EXPORTS) \
PATH_PREFIX=$(JS_DIR) $(JS_DIR)/MANIFEST
$(MAKE) -f $(JSTOOLS_DIR)/Makefile JAR=$(JSTOOLS_JAR) $(EXPORTS) \
PATH_PREFIX=$(JSTOOLS_DIR) $(JSTOOLS_DIR)/MANIFEST
$(MAKE) -f examples/Makefile $(EXPORTS) \
PATH_PREFIX=examples examples/MANIFEST
# so ls below always has something to work on
touch MANIFEST
# examples/Makefile doesn't get included in the
# MANIFEST file, (which is used to create the non-source distribution) so
# we include it here.
cat examples/MANIFEST $(JS_DIR)/MANIFEST \
$(JSTOOLS_DIR)/MANIFEST \
| xargs ls MANIFEST README.html \
$(JARS) \
Makefile examples/Makefile \
> $(@)
# Make a MANIFEST file containing only the binaries and documentation.
# This could be abstracted further...
MANIFEST_binonly : MANIFEST
cat examples/MANIFEST \
| xargs ls $(JARS) README.html MANIFEST > MANIFEST
# A subroutine - not intended to be called from outside the makefile.
do_zip :
# Make sure we get a fresh one
- rm -r $(DIST_DIR)
- mkdir $(DIST_DIR)
- rm $(DIST_DIR).zip
cat MANIFEST | xargs $(ZIP) -0 -q $(DIST_DIR).zip
mv $(DIST_DIR).zip $(DIST_DIR)
cd $(DIST_DIR) ; \
$(UNZIP) -q $(DIST_DIR).zip ; \
rm $(DIST_DIR).zip
$(ZIP) -r -9 -q $(DIST_DIR).zip $(DIST_DIR)
- rm -r $(DIST_DIR)
zip : check jars examples MANIFEST_binonly do_zip
zip-source : check jars examples MANIFEST do_zip
# A subroutine - not intended to be called from outside the makefile.
do_tar :
- rm -r $(DIST_DIR)
- mkdir $(DIST_DIR)
- rm $(DIST_DIR).tar $(DIST_DIR).tar.gz
cat MANIFEST | xargs tar cf $(DIST_DIR).tar
mv $(DIST_DIR).tar $(DIST_DIR)
cd $(DIST_DIR) ; \
tar xf $(DIST_DIR).tar ; \
rm $(DIST_DIR).tar
tar cf $(DIST_DIR).tar $(DIST_DIR)
- rm -r $(DIST_DIR)
$(GZIP) -9 $(DIST_DIR).tar
tar: check jars examples MANIFEST_binonly do_tar
tar-source : check jars examples MANIFEST do_tar
# These commands just get passed to the respective sub-Makefiles.
clean clobber check:
$(MAKE) -f $(JS_DIR)/Makefile $(EXPORTS) JAR=$(JS_JAR) \
PATH_PREFIX=$(JS_DIR) $(@)
$(MAKE) -f $(JSTOOLS_DIR)/Makefile $(EXPORTS) JAR=$(JSTOOLS_JAR) \
PATH_PREFIX=$(JSTOOLS_DIR) $(@)
$(MAKE) -f examples/Makefile $(EXPORTS) PATH_PREFIX=examples $(@)
#emulate .PHONY
FORCE :

View File

@@ -1,46 +0,0 @@
<html>
<!--
- The contents of this file are subject to the Netscape Public
- License Version 1.1 (the "License"); you may not use this file
- except in compliance with the License. You may obtain a copy of
- the License at http://www.mozilla.org/NPL/
-
- Software distributed under the License is distributed on an "AS
- IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- implied. See the License for the specific language governing
- rights and limitations under the License.
-
- The Original Code is Rhino code, released
- May 6, 1999.
-
- The Initial Developer of the Original Code is Netscape
- Communications Corporation. Portions created by Netscape are
- Copyright (C) 1998-1999 Netscape Communications Corporation. All
- Rights Reserved.
-
- Contributor(s):
- Norris Boyd
-
- Alternatively, the contents of this file may be used under the
- terms of the GNU Public License (the "GPL"), in which case the
- provisions of the GPL are applicable instead of those above.
- If you wish to allow use of your version of this file only
- under the terms of the GPL and not to allow others to use your
- version of this file under the NPL, indicate your decision by
- deleting the provisions above and replace them with the notice
- and other provisions required by the GPL. If you do not delete
- the provisions above, a recipient may use your version of this
- file under either the NPL or the GPL.
-->
<body>
<h1>
<span CLASS=LXRSHORTDESC>
Rhino: JavaScript in Java<p>
</span>
</h1>
<span CLASS=LXRLONGDESC>
Rhino is an implementation of JavaScript in Java. Documentation can be found
<a href="http://www.mozilla.org/js/rhino/rhino.html">here</a>.
</span>
</body>
</html>

View File

@@ -1,105 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
import org.mozilla.javascript.*;
/**
* Example of controlling the JavaScript execution engine.
*
* We evaluate a script and then manipulate the result.
*
*/
public class Control {
/**
* Main entry point.
*
* Process arguments as would a normal Java program. Also
* create a new Context and associate it with the current thread.
* Then set up the execution environment and begin to
* execute scripts.
*/
public static void main(String[] args) {
Context cx = Context.enter();
// Set version to JavaScript1.2 so that we get object-literal style
// printing instead of "[object Object]"
cx.setLanguageVersion(Context.VERSION_1_2);
// Initialize the standard objects (Object, Function, etc.)
// This must be done before scripts can be executed.
Scriptable scope = cx.initStandardObjects(null);
// Now we can evaluate a script. Let's create a new object
// using the object literal notation.
Object result = null;
try {
result = cx.evaluateString(scope, "obj = {a:1, b:['x','y']}",
"MySource", 1, null);
}
catch (JavaScriptException jse) {
// ignore
}
Scriptable obj = (Scriptable) scope.get("obj", scope);
// Should print "obj == result" (Since the result of an assignment
// expression is the value that was assigned)
System.out.println("obj " + (obj == result ? "==" : "!=") +
" result");
// Should print "obj.a == 1"
System.out.println("obj.a == " + obj.get("a", obj));
Scriptable b = (Scriptable) obj.get("b", obj);
// Should print "obj.b[0] == x"
System.out.println("obj.b[0] == " + b.get(0, b));
// Should print "obj.b[1] == y"
System.out.println("obj.b[1] == " + b.get(1, b));
try {
// Should print {a:1, b:["x", "y"]}
Function fn = (Function) ScriptableObject.getProperty(obj, "toString");
System.out.println(fn.call(cx, scope, obj, new Object[0]));
} catch (JavaScriptException e) {
// ignore
}
cx.exit();
}
}

View File

@@ -1,55 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
import org.mozilla.javascript.*;
public class Counter extends ScriptableObject {
// The zero-argument constructor used by Rhino runtime to create instances
public Counter() { }
// Method jsConstructor defines the JavaScript constructor
public void jsConstructor(int a) { count = a; }
// The class name is defined by the getClassName method
public String getClassName() { return "Counter"; }
// The method jsGet_count defines the count property.
public int jsGet_count() { return count++; }
// Methods can be defined using the jsFunction_ prefix. Here we define
// resetCount for JavaScript.
public void jsFunction_resetCount() { count = 0; }
private int count;
}

View File

@@ -1,178 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
import org.mozilla.javascript.*;
/**
* Example of controlling the JavaScript with multiple scopes and threads.
*/
public class DynamicScopes {
/**
* Main entry point.
*
* Set up the shared scope and then spawn new threads that execute
* relative to that shared scope. Try compiling functions with and
* without dynamic scope to see the effect.
*
* The expected output is
* <pre>
* sharedScope
* sharedScope
* sharedScope
* thread0
* thread1
* thread2
* </pre>
* The final three lines may be permuted in any order depending on
* thread scheduling.
*/
public static void main(String[] args)
throws JavaScriptException
{
Context cx = Context.enter();
try {
cx.setCompileFunctionsWithDynamicScope(false);
runScripts(cx);
cx.setCompileFunctionsWithDynamicScope(true);
runScripts(cx);
} finally {
cx.exit();
}
}
static void runScripts(Context cx)
throws JavaScriptException
{
// Initialize the standard objects (Object, Function, etc.)
// This must be done before scripts can be executed. The call
// returns a new scope that we will share.
Scriptable scope = cx.initStandardObjects(null);
// Now we can evaluate a script and functions will be compiled to
// use dynamic scope if the Context is so initialized.
String source = "var x = 'sharedScope';" +
"function f() { return x; }";
cx.evaluateString(scope, source, "MySource", 1, null);
// Now we spawn some threads that execute a script that calls the
// function 'f'. The scope chain looks like this:
// <pre>
// ------------------
// | shared scope |
// ------------------
// ^
// |
// ------------------
// | per-thread scope |
// ------------------
// ^
// |
// ------------------
// | f's activation |
// ------------------
// </pre>
// Both the shared scope and the per-thread scope have variables 'x'
// defined in them. If 'f' is compiled with dynamic scope enabled,
// the 'x' from the per-thread scope will be used. Otherwise, the 'x'
// from the shared scope will be used. The 'x' defined in 'g' (which
// calls 'f') should not be seen by 'f'.
final int threadCount = 3;
Thread[] t = new Thread[threadCount];
for (int i=0; i < threadCount; i++) {
String script = "function g() { var x = 'local'; return f(); }" +
"java.lang.System.out.println(g());";
t[i] = new Thread(new PerThread(scope, script,
"thread" + i));
}
for (int i=0; i < threadCount; i++)
t[i].start();
// Don't return in this thread until all the spawned threads have
// completed.
for (int i=0; i < threadCount; i++) {
try {
t[i].join();
} catch (InterruptedException e) {
}
}
}
static class PerThread implements Runnable {
PerThread(Scriptable scope, String script, String x) {
this.scope = scope;
this.script = script;
this.x = x;
}
public void run() {
// We need a new Context for this thread.
Context cx = Context.enter();
try {
// We can share the scope.
Scriptable threadScope = cx.newObject(scope);
threadScope.setPrototype(scope);
// We want "threadScope" to be a new top-level
// scope, so set its parent scope to null. This
// means that any variables created by assignments
// will be properties of "threadScope".
threadScope.setParentScope(null);
// Create a JavaScript property of the thread scope named
// 'x' and save a value for it.
threadScope.put("x", threadScope, x);
cx.evaluateString(threadScope, script, "threadScript", 1, null);
}
catch (NotAFunctionException jse) {
// ignore
}
catch (PropertyException jse) {
// ignore
}
catch (JavaScriptException jse) {
// ignore
}
finally {
Context.exit();
}
}
private Scriptable scope;
private String script;
private String x;
}
}

View File

@@ -1,356 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
import org.mozilla.javascript.*;
import java.io.*;
import java.util.Vector;
/**
* Define a simple JavaScript File object.
*
* This isn't intended to be any sort of definitive attempt at a
* standard File object for JavaScript, but instead is an example
* of a more involved definition of a host object.
*
* Example of use of the File object:
* <pre>
* js> defineClass("File")
* js> file = new File("myfile.txt");
* [object File]
* js> file.writeLine("one"); <i>only now is file actually opened</i>
* js> file.writeLine("two");
* js> file.writeLine("thr", "ee");
* js> file.close(); <i>must close file before we can reopen for reading</i>
* js> var a = file.readLines(); <i>creates and fills an array with the contents of the file</i>
* js> a;
* one,two,three
* js>
* </pre>
*
*
* File errors or end-of-file signaled by thrown Java exceptions will
* be wrapped as JavaScript exceptions when called from JavaScript,
* and may be caught within JavaScript.
*
* @author Norris Boyd
*/
public class File extends ScriptableObject {
/**
* The zero-parameter constructor.
*
* When Context.defineClass is called with this class, it will
* construct File.prototype using this constructor.
*/
public File() {
}
/**
* The Java method defining the JavaScript File constructor.
*
* If the constructor has one or more arguments, and the
* first argument is not undefined, the argument is converted
* to a string as used as the filename.<p>
*
* Otherwise System.in or System.out is assumed as appropriate
* to the use.
*/
public static Scriptable jsConstructor(Context cx, Object[] args,
Function ctorObj,
boolean inNewExpr)
{
File result = new File();
if (args.length == 0 || args[0] == Context.getUndefinedValue()) {
result.name = "";
result.file = null;
} else {
result.name = Context.toString(args[0]);
result.file = new java.io.File(result.name);
}
return result;
}
/**
* Returns the name of this JavaScript class, "File".
*/
public String getClassName() {
return "File";
}
/**
* Get the name of the file.
*
* Used to define the "name" property.
*/
public String jsGet_name() {
return name;
}
/**
* Read the remaining lines in the file and return them in an array.
*
* Implements a JavaScript function.<p>
*
* This is a good example of creating a new array and setting
* elements in that array.
*
* @exception IOException if an error occurred while accessing the file
* associated with this object
* @exception JavaScriptException if a JavaScript exception occurred
* while creating the result array
*/
public Object jsFunction_readLines()
throws IOException, JavaScriptException
{
Vector v = new Vector();
String s;
while ((s = jsFunction_readLine()) != null) {
v.addElement(s);
}
Object[] lines = new Object[v.size()];
v.copyInto(lines);
Scriptable scope = ScriptableObject.getTopLevelScope(this);
Scriptable result;
try {
Context cx = Context.getCurrentContext();
result = cx.newObject(scope, "Array", lines);
} catch (PropertyException e) {
throw Context.reportRuntimeError(e.getMessage());
} catch (NotAFunctionException e) {
throw Context.reportRuntimeError(e.getMessage());
}
return result;
}
/**
* Read a line.
*
* Implements a JavaScript function.
* @exception IOException if an error occurred while accessing the file
* associated with this object, or EOFException if the object
* reached the end of the file
*/
public String jsFunction_readLine() throws IOException {
return getReader().readLine();
}
/**
* Read a character.
*
* @exception IOException if an error occurred while accessing the file
* associated with this object, or EOFException if the object
* reached the end of the file
*/
public String jsFunction_readChar() throws IOException {
int i = getReader().read();
if (i == -1)
return null;
char[] charArray = { (char) i };
return new String(charArray);
}
/**
* Write strings.
*
* Implements a JavaScript function. <p>
*
* This function takes a variable number of arguments, converts
* each argument to a string, and writes that string to the file.
* @exception IOException if an error occurred while accessing the file
* associated with this object
*/
public static void jsFunction_write(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
throws IOException
{
write0(thisObj, args, false);
}
/**
* Write strings and a newline.
*
* Implements a JavaScript function.
* @exception IOException if an error occurred while accessing the file
* associated with this object
*
*/
public static void jsFunction_writeLine(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
throws IOException
{
write0(thisObj, args, true);
}
public int jsGet_lineNumber()
throws FileNotFoundException
{
return getReader().getLineNumber();
}
/**
* Close the file. It may be reopened.
*
* Implements a JavaScript function.
* @exception IOException if an error occurred while accessing the file
* associated with this object
*/
public void jsFunction_close() throws IOException {
if (reader != null) {
reader.close();
reader = null;
} else if (writer != null) {
writer.close();
writer = null;
}
}
/**
* Finalizer.
*
* Close the file when this object is collected.
*/
public void finalize() {
try {
jsFunction_close();
}
catch (IOException e) {
}
}
/**
* Get the Java reader.
*/
public Object jsFunction_getReader() {
if (reader == null)
return null;
// Here we use toObject() to "wrap" the BufferedReader object
// in a Scriptable object so that it can be manipulated by
// JavaScript.
Scriptable parent = ScriptableObject.getTopLevelScope(this);
return Context.toObject(reader, parent);
}
/**
* Get the Java writer.
*
* @see File#jsFunction_getReader
*
*/
public Object jsFunction_getWriter() {
if (writer == null)
return null;
Scriptable parent = ScriptableObject.getTopLevelScope(this);
return Context.toObject(writer, parent);
}
/**
* Get the reader, checking that we're not already writing this file.
*/
private LineNumberReader getReader() throws FileNotFoundException {
if (writer != null) {
throw Context.reportRuntimeError("already writing file \""
+ name
+ "\"");
}
if (reader == null)
reader = new LineNumberReader(file == null
? new InputStreamReader(System.in)
: new FileReader(file));
return reader;
}
/**
* Perform the guts of write and writeLine.
*
* Since the two functions differ only in whether they write a
* newline character, move the code into a common subroutine.
*
*/
private static void write0(Scriptable thisObj, Object[] args, boolean eol)
throws IOException
{
File thisFile = checkInstance(thisObj);
if (thisFile.reader != null) {
throw Context.reportRuntimeError("already writing file \""
+ thisFile.name
+ "\"");
}
if (thisFile.writer == null)
thisFile.writer = new BufferedWriter(
thisFile.file == null ? new OutputStreamWriter(System.out)
: new FileWriter(thisFile.file));
for (int i=0; i < args.length; i++) {
String s = Context.toString(args[i]);
thisFile.writer.write(s, 0, s.length());
}
if (eol)
thisFile.writer.newLine();
}
/**
* Perform the instanceof check and return the downcasted File object.
*
* This is necessary since methods may reside in the File.prototype
* object and scripts can dynamically alter prototype chains. For example:
* <pre>
* js> defineClass("File");
* js> o = {};
* [object Object]
* js> o.__proto__ = File.prototype;
* [object File]
* js> o.write("hi");
* js: called on incompatible object
* </pre>
* The runtime will take care of such checks when non-static Java methods
* are defined as JavaScript functions.
*/
private static File checkInstance(Scriptable obj) {
if (obj == null || !(obj instanceof File)) {
throw Context.reportRuntimeError("called on incompatible object");
}
return (File) obj;
}
/**
* Some private data for this class.
*/
private String name;
private java.io.File file; // may be null, meaning to use System.out or .in
private LineNumberReader reader;
private BufferedWriter writer;
}

View File

@@ -1,168 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
import org.mozilla.javascript.*;
/**
* An example host object class.
*
* Here's a shell session showing the Foo object in action:
* <pre>
* js> defineClass("Foo")
* js> foo = new Foo(); <i>A constructor call, see <a href="#Foo">Foo</a> below.</i>
* [object Foo] <i>The "Foo" here comes from <a href"#getClassName">getClassName</a>.</i>
* js> foo.counter; <i>The counter property is defined by the <code>defineProperty</code></i>
* 0 <i>call below and implemented by the <a href="#getCounter">getCounter</a></i>
* js> foo.counter; <i>method below.</i>
* 1
* js> foo.counter;
* 2
* js> foo.resetCounter(); <i>Results in a call to <a href="#resetCounter">resetCounter</a>.</i>
* js> foo.counter; <i>Now the counter has been reset.</i>
* 0
* js> foo.counter;
* 1
* js> bar = new Foo(37); <i>Create a new instance.</i>
* [object Foo]
* js> bar.counter; <i>This instance's counter is distinct from</i>
* 37 <i>the other instance's counter.</i>
* js> foo.varargs(3, "hi"); <i>Calls <a href="#varargs">varargs</a>.</i>
* this = [object Foo]; args = [3, hi]
* js> foo[7] = 34; <i>Since we extended ScriptableObject, we get</i>
* 34 <i>all the behavior of a JavaScript object</i>
* js> foo.a = 23; <i>for free.</i>
* 23
* js> foo.a + foo[7];
* 57
* js>
* </pre>
*
* @see org.mozilla.javascript.Context
* @see org.mozilla.javascript.Scriptable
* @see org.mozilla.javascript.ScriptableObject
*
* @author Norris Boyd
*/
public class Foo extends ScriptableObject {
/**
* The zero-parameter constructor.
*
* When Context.defineClass is called with this class, it will
* construct Foo.prototype using this constructor.
*/
public Foo() {
}
/**
* The Java method defining the JavaScript Foo constructor.
*
* Takes an initial value for the counter property.
* Note that in the example Shell session above, we didn't
* supply a argument to the Foo constructor. This means that
* the Undefined value is used as the value of the argument,
* and when the argument is converted to an integer, Undefined
* becomes 0.
*/
public Foo(int counterStart) {
counter = counterStart;
}
/**
* Returns the name of this JavaScript class, "Foo".
*/
public String getClassName() {
return "Foo";
}
/**
* The Java method defining the JavaScript resetCounter function.
*
* Resets the counter to 0.
*/
public void jsFunction_resetCounter() {
counter = 0;
}
/**
* The Java method implementing the getter for the counter property.
* <p>
* If "setCounter" had been defined in this class, the runtime would
* call the setter when the property is assigned to.
*/
public int jsGet_counter() {
return counter++;
}
/**
* An example of a variable-arguments method.
*
* All variable arguments methods must have the same number and
* types of parameters, and must be static. <p>
* @param cx the Context of the current thread
* @param thisObj the JavaScript 'this' value.
* @param args the array of arguments for this call
* @param funObj the function object of the invoked JavaScript function
* This value is useful to compute a scope using
* Context.getTopLevelScope().
* @return computes the string values and types of 'this' and
* of each of the supplied arguments and returns them in a string.
*
* @exception ThreadAssociationException if the current
* thread is not associated with a Context
* @see org.mozilla.javascript.ScriptableObject#getTopLevelScope
*/
public static Object jsFunction_varargs(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
StringBuffer buf = new StringBuffer();
buf.append("this = ");
buf.append(Context.toString(thisObj));
buf.append("; args = [");
for (int i=0; i < args.length; i++) {
buf.append(Context.toString(args[i]));
if (i+1 != args.length)
buf.append(", ");
}
buf.append("]");
return buf.toString();
}
/**
* A piece of private data for this class.
*/
private int counter;
}

View File

@@ -1,59 +0,0 @@
#! gmake
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is Rhino code, released
# May 6, 1998.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the
# terms of the GNU Public License (the "GPL"), in which case the
# provisions of the GPL are applicable instead of those above.
# If you wish to allow use of your version of this file only
# under the terms of the GPL and not to allow others to use your
# version of this file under the NPL, indicate your decision by
# deleting the provisions above and replace them with the notice
# and other provisions required by the GPL. If you do not delete
# the provisions above, a recipient may use your version of this
# file under either the NPL or the GPL.
#
# Makefile for the examples directory.
#
# This Makefile just calls $(JAVAC) on all the .java files. This
# Makefile is intended to be called from the toplevel Makefile.
#
JSFILES = $(PATH_PREFIX)/*.js
SOURCES = $(PATH_PREFIX)/*.java
CLASSES = $(PATH_PREFIX)/*.class
$(CLASSES) : $(SOURCES)
$(JAVAC) $(JFLAGS) $(SOURCES)
clean :
- rm $(CLASSES) $(PATH_PREFIX)/MANIFEST
clobber : clean
check :
$(PATH_PREFIX)/MANIFEST : $(SOURCES) $(CLASSES) $(JSFILES)
ls $(SOURCES) $(CLASSES) $(JSFILES) \
> $(@)
# Emulate .PHONY
FORCE :

View File

@@ -1,274 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
import org.mozilla.javascript.*;
import java.util.Vector;
/**
* Matrix: An example host object class that implements the Scriptable interface.
*
* Built-in JavaScript arrays don't handle multiple dimensions gracefully: the
* script writer must create every array in an array of arrays. The Matrix class
* takes care of that by automatically allocating arrays for every index that
* is accessed. What's more, the Matrix constructor takes a integer argument
* that specifies the dimension of the Matrix. If m is a Matrix with dimension 3,
* then m[0] will be a Matrix with dimension 1, and m[0][0] will be an Array.
*
* Here's a shell session showing the Matrix object in action:
* <pre>
* js> defineClass("Matrix")
* js> m = new Matrix(2); <i>A constructor call, see <a href="#Matrix">Matrix</a> below.</i>
* [object Matrix] <i>The "Matrix" here comes from <a href"#getClassName">getClassName</a>.</i>
* js> version(120); <i>switch to JavaScript1.2 to see arrays better</i>
* 0
* js> m[0][0] = 3;
* 3
* js> m[0]; <i>an array was created automatically!</i>
* [3]
* js> m[1]; <i>array is created even if we don't set a value</i>
* []
* js> m.dim; <i>we can access the "dim" property</i>
* 2
* js> m.dim = 3;
* 3
* js> m.dim; <i>but not modify it</i>
* 2
* </pre>
*
* @see org.mozilla.javascript.Context
* @see org.mozilla.javascript.Scriptable
*
* @author Norris Boyd
*/
public class Matrix implements Scriptable {
/**
* The zero-parameter constructor.
*
* When Context.defineClass is called with this class, it will
* construct Matrix.prototype using this constructor.
*/
public Matrix() {
}
/**
* The Java constructor, also used to define the JavaScript constructor.
*/
public Matrix(int dimension) {
if (dimension <= 0) {
throw Context.reportRuntimeError(
"Dimension of Matrix must be greater than zero");
}
dim = dimension;
v = new Vector();
}
/**
* Returns the name of this JavaScript class, "Matrix".
*/
public String getClassName() {
return "Matrix";
}
/**
* Defines the "dim" property by returning true if name is
* equal to "dim".
* <p>
* Defines no other properties, i.e., returns false for
* all other names.
*
* @param name the name of the property
* @param start the object where lookup began
*/
public boolean has(String name, Scriptable start) {
return name.equals("dim");
}
/**
* Defines all numeric properties by returning true.
*
* @param index the index of the property
* @param start the object where lookup began
*/
public boolean has(int index, Scriptable start) {
return true;
}
/**
* Get the named property.
* <p>
* Handles the "dim" property and returns NOT_FOUND for all
* other names.
* @param name the property name
* @param start the object where the lookup began
*/
public Object get(String name, Scriptable start) {
if (name.equals("dim"))
return new Integer(dim);
return NOT_FOUND;
}
/**
* Get the indexed property.
* <p>
* Look up the element in the associated vector and return
* it if it exists. If it doesn't exist, create it.<p>
* @param index the index of the integral property
* @param start the object where the lookup began
*/
public Object get(int index, Scriptable start) {
if (index >= v.size())
v.setSize(index+1);
Object result = v.elementAt(index);
if (result != null)
return result;
if (dim > 2) {
Matrix m = new Matrix(dim-1);
m.setParentScope(getParentScope());
m.setPrototype(getPrototype());
result = m;
} else {
Context cx = Context.getCurrentContext();
Scriptable scope = ScriptableObject.getTopLevelScope(start);
result = cx.newArray(scope, 0);
}
v.setElementAt(result, index);
return result;
}
/**
* Set a named property.
*
* We do nothing here, so all properties are effectively read-only.
*/
public void put(String name, Scriptable start, Object value) {
}
/**
* Set an indexed property.
*
* We do nothing here, so all properties are effectively read-only.
*/
public void put(int index, Scriptable start, Object value) {
}
/**
* Remove a named property.
*
* This method shouldn't even be called since we define all properties
* as PERMANENT.
*/
public void delete(String id) {
}
/**
* Remove an indexed property.
*
* This method shouldn't even be called since we define all properties
* as PERMANENT.
*/
public void delete(int index) {
}
/**
* Get prototype.
*/
public Scriptable getPrototype() {
return prototype;
}
/**
* Set prototype.
*/
public void setPrototype(Scriptable prototype) {
this.prototype = prototype;
}
/**
* Get parent.
*/
public Scriptable getParentScope() {
return parent;
}
/**
* Set parent.
*/
public void setParentScope(Scriptable parent) {
this.parent = parent;
}
/**
* Get properties.
*
* We return an empty array since we define all properties to be DONTENUM.
*/
public Object[] getIds() {
return new Object[0];
}
/**
* Default value.
*
* Use the convenience method from Context that takes care of calling
* toString, etc.
*/
public Object getDefaultValue(Class typeHint) {
return "[object Matrix]";
}
/**
* instanceof operator.
*
* We mimick the normal JavaScript instanceof semantics, returning
* true if <code>this</code> appears in <code>value</code>'s prototype
* chain.
*/
public boolean hasInstance(Scriptable value) {
Scriptable proto = value.getPrototype();
while (proto != null) {
if (proto.equals(this)) return true;
}
return false;
}
/**
* Some private data for this class.
*/
private int dim;
private Vector v;
private Scriptable prototype, parent;
}

View File

@@ -1,7 +0,0 @@
<html>
<body>
This is the NervousText applet in javascript:
<applet code=NervousText.class width=200 height=50 >
</applet>
</body>
</html>

View File

@@ -1,75 +0,0 @@
// The Java "NervousText" example ported to JavaScript.
// Compile using java org.mozilla.tools.jsc.Main -extends java.applet.Applet -implements java.lang.Runnable NervousText.js
/*
Adapted from Java code by
Daniel Wyszynski
Center for Applied Large-Scale Computing (CALC)
04-12-95
Test of text animation.
kwalrath: Changed string; added thread suspension. 5-9-95
*/
var Font = java.awt.Font;
var Thread = java.lang.Thread;
var separated;
var s = null;
var killme = null;
var i;
var x_coord = 0, y_coord = 0;
var num;
var speed=35;
var counter =0;
var threadSuspended = false; //added by kwalrath
function init() {
resize(150,50);
setFont(new Font("TimesRoman",Font.BOLD,36));
s = getParameter("text");
if (s == null) {
s = "Rhino";
}
separated = s.split('');
}
function start() {
if(killme == null)
{
killme = new java.lang.Thread(java.lang.Runnable(this));
killme.start();
}
}
function stop() {
killme = null;
}
function run() {
while (killme != null) {
try {Thread.sleep(100);} catch (e){}
repaint();
}
killme = null;
}
function paint(g) {
for(i=0;i<separated.length;i++)
{
x_coord = Math.random()*10+15*i;
y_coord = Math.random()*10+36;
g.drawChars(separated, i,1,x_coord,y_coord);
}
}
/* Added by kwalrath. */
function mouseDown(evt, x, y) {
if (threadSuspended) {
killme.resume();
}
else {
killme.suspend();
}
threadSuspended = !threadSuspended;
return true;
}

View File

@@ -1,73 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
import org.mozilla.javascript.*;
/**
* RunScript: simplest example of controlling execution of Rhino.
*
* Collects its arguments from the command line, executes the
* script, and prints the result.
*
* @author Norris Boyd
*/
public class RunScript {
public static void main(String args[])
throws JavaScriptException
{
// Creates and enters a Context. The Context stores information
// about the execution environment of a script.
Context cx = Context.enter();
// Initialize the standard objects (Object, Function, etc.)
// This must be done before scripts can be executed. Returns
// a scope object that we use in later calls.
Scriptable scope = cx.initStandardObjects(null);
// Collect the arguments into a single string.
String s = "";
for (int i=0; i < args.length; i++)
s += args[i];
// Now evaluate the string we've colected.
Object result = cx.evaluateString(scope, s, "<cmd>", 1, null);
// Convert the result to a string and print it.
System.err.println(cx.toString(result));
// Exit from the context.
Context.exit();
}
}

View File

@@ -1,63 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
import org.mozilla.javascript.*;
/**
* RunScript2: Like RunScript, but reflects the System.out into JavaScript.
*
* @author Norris Boyd
*/
public class RunScript2 {
public static void main(String args[])
throws JavaScriptException
{
Context cx = Context.enter();
Scriptable scope = cx.initStandardObjects(null);
// Add a global variable "out" that is a JavaScript reflection
// of System.out
Scriptable jsArgs = Context.toObject(System.out, scope);
scope.put("out", scope, jsArgs);
String s = "";
for (int i=0; i < args.length; i++)
s += args[i];
Object result = cx.evaluateString(scope, s, "<cmd>", 1, null);
System.err.println(cx.toString(result));
Context.exit();
}
}

View File

@@ -1,63 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
import org.mozilla.javascript.*;
/**
* RunScript3: Execute scripts in an environment that includes the
* example Counter class.
*
* @author Norris Boyd
*/
public class RunScript3 {
public static void main(String args[])
throws Exception
{
Context cx = Context.enter();
Scriptable scope = cx.initStandardObjects(null);
// Use the Counter class to define a Counter constructor
// and prototype in JavaScript.
ScriptableObject.defineClass(scope, Counter.class);
String s = "";
for (int i=0; i < args.length; i++)
s += args[i];
Object result = cx.evaluateString(scope, s, "<cmd>", 1, null);
System.err.println(cx.toString(result));
Context.exit();
}
}

View File

@@ -1,352 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
import org.mozilla.javascript.*;
import java.io.*;
/**
* The shell program.
*
* Can execute scripts interactively or in batch mode at the command line.
* An example of controlling the JavaScript engine.
*
* @author Norris Boyd
*/
public class Shell extends ScriptableObject {
/**
* Main entry point.
*
* Process arguments as would a normal Java program. Also
* create a new Context and associate it with the current thread.
* Then set up the execution environment and begin to
* execute scripts.
*/
public static void main(String args[]) {
// Associate a new Context with this thread
Context cx = Context.enter();
// A bit of shorthand: since Shell extends ScriptableObject,
// we can make it the global object.
global = new Shell();
// Initialize the standard objects (Object, Function, etc.)
// This must be done before scripts can be executed.
cx.initStandardObjects(global);
// Define some global functions particular to the shell. Note
// that these functions are not part of ECMA.
String[] names = { "print", "quit", "version", "load", "help" };
try {
global.defineFunctionProperties(names, Shell.class,
ScriptableObject.DONTENUM);
} catch (PropertyException e) {
throw new Error(e.getMessage());
}
args = processOptions(cx, args);
// Set up "arguments" in the global scope to contain the command
// line arguments after the name of the script to execute
Object[] array = args;
if (args.length > 0) {
int length = args.length - 1;
array = new Object[length];
System.arraycopy(args, 1, array, 0, length);
}
Scriptable argsObj = cx.newArray(global, array);
global.defineProperty("arguments", argsObj,
ScriptableObject.DONTENUM);
processSource(cx, args.length == 0 ? null : args[0]);
cx.exit();
}
/**
* Parse arguments.
*/
public static String[] processOptions(Context cx, String args[]) {
for (int i=0; i < args.length; i++) {
String arg = args[i];
if (!arg.startsWith("-")) {
String[] result = new String[args.length - i];
for (int j=i; j < args.length; j++)
result[j-i] = args[j];
return result;
}
if (arg.equals("-version")) {
if (++i == args.length)
usage(arg);
double d = cx.toNumber(args[i]);
if (d != d)
usage(arg);
cx.setLanguageVersion((int) d);
continue;
}
usage(arg);
}
return new String[0];
}
/**
* Return name of this class, the global object.
*
* This method must be implemented in all concrete classes
* extending ScriptableObject.
*
* @see org.mozilla.javascript.Scriptable#getClassName
*/
public String getClassName() {
return "global";
}
/**
* Print a usage message.
*/
public static void usage(String s) {
p("Didn't understand \"" + s + "\".");
p("Valid arguments are:");
p("-version 100|110|120|130");
System.exit(1);
}
/**
* Print a help message.
*
* This method is defined as a JavaScript function.
*/
public static void help(String s) {
p("");
p("Command Description");
p("======= ===========");
p("help() Display usage and help messages. ");
p("defineClass(className) Define an extension using the Java class");
p(" named with the string argument. ");
p(" Uses ScriptableObject.defineClass(). ");
p("load(['foo.js', ...]) Load JavaScript source files named by ");
p(" string arguments. ");
p("loadClass(className) Load a class named by a string argument.");
p(" The class must be a script compiled to a");
p(" class file. ");
p("print([expr ...]) Evaluate and print expressions. ");
p("quit() Quit the shell. ");
p("version([number]) Get or set the JavaScript version number.");
p("");
}
/**
* Print the string values of its arguments.
*
* This method is defined as a JavaScript function.
* Note that its arguments are of the "varargs" form, which
* allows it to handle an arbitrary number of arguments
* supplied to the JavaScript function.
*
*/
public static void print(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
for (int i=0; i < args.length; i++) {
if (i > 0)
System.out.print(" ");
// Convert the arbitrary JavaScript value into a string form.
String s = Context.toString(args[i]);
System.out.print(s);
}
System.out.println();
}
/**
* Quit the shell.
*
* This only affects the interactive mode.
*
* This method is defined as a JavaScript function.
*/
public static void quit() {
quitting = true;
}
/**
* Get and set the language version.
*
* This method is defined as a JavaScript function.
*/
public static double version(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
double result = (double) cx.getLanguageVersion();
if (args.length > 0) {
double d = cx.toNumber(args[0]);
cx.setLanguageVersion((int) d);
}
return result;
}
/**
* Load and execute a set of JavaScript source files.
*
* This method is defined as a JavaScript function.
*
*/
public static void load(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
for (int i=0; i < args.length; i++) {
processSource(cx, cx.toString(args[i]));
}
}
/**
* Evaluate JavaScript source.
*
* @param cx the current context
* @param filename the name of the file to compile, or null
* for interactive mode.
*/
public static void processSource(Context cx, String filename) {
if (filename == null) {
BufferedReader in = new BufferedReader
(new InputStreamReader(System.in));
String sourceName = "<stdin>";
int lineno = 1;
boolean hitEOF = false;
do {
int startline = lineno;
System.err.print("js> ");
System.err.flush();
try {
String source = "";
// Collect lines of source to compile.
while(true) {
String newline;
newline = in.readLine();
if (newline == null) {
hitEOF = true;
break;
}
source = source + newline + "\n";
lineno++;
// Continue collecting as long as more lines
// are needed to complete the current
// statement. stringIsCompilableUnit is also
// true if the source statement will result in
// any error other than one that might be
// resolved by appending more source.
if (cx.stringIsCompilableUnit(source))
break;
}
Object result = cx.evaluateString(global, source,
sourceName, startline,
null);
if (result != cx.getUndefinedValue()) {
System.err.println(cx.toString(result));
}
}
catch (WrappedException we) {
// Some form of exception was caught by JavaScript and
// propagated up.
System.err.println(we.getWrappedException().toString());
we.printStackTrace();
}
catch (EvaluatorException ee) {
// Some form of JavaScript error.
System.err.println("js: " + ee.getMessage());
}
catch (JavaScriptException jse) {
// Some form of JavaScript error.
System.err.println("js: " + jse.getMessage());
}
catch (IOException ioe) {
System.err.println(ioe.toString());
}
if (quitting) {
// The user executed the quit() function.
break;
}
} while (!hitEOF);
System.err.println();
} else {
FileReader in = null;
try {
in = new FileReader(filename);
}
catch (FileNotFoundException ex) {
Context.reportError("Couldn't open file \"" + filename + "\".");
return;
}
try {
// Here we evalute the entire contents of the file as
// a script. Text is printed only if the print() function
// is called.
cx.evaluateReader(global, in, filename, 1, null);
}
catch (WrappedException we) {
System.err.println(we.getWrappedException().toString());
we.printStackTrace();
}
catch (EvaluatorException ee) {
System.err.println("js: " + ee.getMessage());
}
catch (JavaScriptException jse) {
System.err.println("js: " + jse.getMessage());
}
catch (IOException ioe) {
System.err.println(ioe.toString());
}
finally {
try {
in.close();
}
catch (IOException ioe) {
System.err.println(ioe.toString());
}
}
}
System.gc();
}
private static void p(String s) {
System.out.println(s);
}
static Shell global;
static boolean quitting;
}

View File

@@ -1,134 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
/**
* checkParam.js
*
* The files given as arguments on the command line are assumed to be
* Java source code files. This program checks to see that the @param
* tags in the documentation comments match with the parameters for
* the associated Java methods.
* <p>
* Any errors found are reported.
*
*/
defineClass("File")
// Return true if "str" ends with "suffix".
function stringEndsWith(str, suffix) {
return str.substring(str.length - suffix.length) == suffix;
}
/**
* Perform processing once the end of a documentation comment is seen.
*
* Look for a parameter list following the end of the comment and
* collect the parameters and compare to the @param entries.
* Report any discrepancies.
* @param f the current file
* @param a an array of parameters from @param comments
* @param line the string containing the comment end (in case the
* parameters are on the same line)
*/
function processCommentEnd(f, a, line) {
while (line != null && !line.match(/\(/))
line = f.readLine();
while (line != null && !line.match(/\)/))
line += f.readLine();
if (line === null)
return;
var m = line.match(/\(([^\)]+)\)/);
var args = m ? m[1].split(",") : [];
if (a.length != args.length) {
print('"' + f.name +
'"; line ' + f.lineNumber +
' mismatch: had a different number' +
' of @param entries and parameters.');
} else {
for (var i=0; i < a.length; i++) {
if (!stringEndsWith(args[i], a[i])) {
print('"' + f.name +
'"; line ' + f.lineNumber +
' mismatch: had "' + a[i] +
'" and "' + args[i] + '".');
break;
}
}
}
}
/**
* Process the given file, looking for mismatched @param lists and
* parameter lists.
* @param f the file to process
*/
function processFile(f) {
var line;
var m;
var i = 0;
var a = [];
outer:
while ((line = f.readLine()) != null) {
if (line.match(/@param/)) {
while (m = line.match(/@param[ ]+([^ ]+)/)) {
a[i++] = m[1];
line = f.readLine();
if (line == null)
break outer;
}
}
if (i != 0 && line.match(/\*\//)) {
processCommentEnd(f, a, line);
i = 0;
a = [];
}
}
if (i != 0) {
print('"' + f.name +
'"; line ' + f.lineNumber +
' missing parameters at end of file.');
}
}
// main script: process each file in arguments list
for (var i=0; i < arguments.length; i++) {
var filename = String(arguments[i]);
print("Checking " + filename + "...");
var f = new File(filename);
processFile(f);
}
print("done.");

View File

@@ -1,70 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Patrick Beard
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
/*
enum.js
Implementing the interface java.util.Enumeration using the new syntax.
Note that this syntax is experimental only, and hasn't been approved
by ECMA.
The same functionality can be had without the new syntax using the
uglier syntax:
var elements = new JavaAdapter(java.util.Enumeration, {
index: 0, elements: array,
hasMoreElements: function ...
nextElement: function ...
});
by Patrick C. Beard.
*/
// an array to enumerate.
var array = [0, 1, 2];
// create an array enumeration.
var elements = new java.util.Enumeration() {
index: 0, elements: array,
hasMoreElements: function() {
return (this.index < this.elements.length);
},
nextElement: function() {
return this.elements[this.index++];
}
};
// now print out the array by enumerating through the Enumeration
while (elements.hasMoreElements())
print(elements.nextElement());

View File

@@ -1,508 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Roland Pennings
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
/**
* Process a JavaScript source file and process special comments
* to produce an HTML file of documentation, similar to javadoc.
* @author Norris Boyd
* @see rhinotip.jar
* @lastmodified xx
* @version 1.2 Roland Pennings: Allow multiple files for a function.
* @version 1.3 Roland Pennings: Removes ../.. from the input directory name
*/
defineClass("File")
var functionDocArray = [];
var inputDirName = "";
var indexFileArray = [];
var indexFile = "";
var indexFileName = "index_files";
var indexFunctionArray = [];
var indexFunction = "";
var indexFunctionName = "index_functions";
var FileList = [];
var DirList = [];
var outputdir = null;
var debug = 0;
/**
* Process JavaScript source file <code>f</code>, writing jsdoc to
* file <code>out</code>.
* @param f input file
* @param fname name of the input file (without the path)
* @param inputdir directory of the input file
* @param out output file
*/
function processFile(f, fname, inputdir, out) {
var s;
var firstLine = true;
indexFileArray[fname] = "";
// write the header of the output file
out.writeLine('<HTML><HEADER><TITLE>' + fname + '</TITLE><BODY>');
if (inputdir != null) {
outstr = '<a name=\"_top_\"></a><pre><a href=\"' + indexFile + '\">Index Files</a> ';
outstr += '<a href=\"' + indexFunction + '\">Index Functions</a></pre><hr>';
out.writeLine(outstr);
}
// process the input file
var comment = "";
while ((s = f.readLine()) != null) {
var m = s.match(/\/\*\*(.*)/);
if (m != null) {
// Found a comment start.
s = "*" + m[1];
do {
m = s.match(/(.*)\*\//);
if (m != null) {
// Found end of comment.
comment += m[1];
break;
}
// Strip leading whitespace and "*".
comment += s.replace(/^\s*\*/, "");
s = f.readLine();
} while (s != null);
if (debug)
print("Found comment " + comment);
if (firstLine) {
// We have a comment for the whole file.
out.writeLine('<H1>File ' + fname + '</H1>');
out.writeLine(processComment(comment,firstLine,fname));
out.writeLine('<HR>');
firstLine = false;
comment = "";
continue;
}
}
// match the beginning of the function
// NB we also match functions without a comment!
// if we have two comments one after another only the last one will be taken
m = s.match(/^\s*function\s+((\w+)|(\w+)(\s+))\(([^)]*)\)/);
if (m != null)
{
// Found a function start
var htmlText = processFunction(m[1], m[2], comment);
// Save the text in a global variable, so we
// can write out a table of contents first.
functionDocArray[functionDocArray.length] =
{name:m[1], text:htmlText};
// Store the function also in the indexFunctionArray
// so we can have a seperate file with the function table of contents
if (indexFunctionArray[m[1]]) {
// print("ERROR: function: " + m[1] + " is defined more than once!");
// Allow multiple files for a function
with (indexFunctionArray[m[1]]) {
filename = filename + "|" + fname;
// print("filename = " + filename);
}
} else {
indexFunctionArray[m[1]] =
{filename:fname};
}
//reset comment
comment = "";
}
firstLine = false;
}
// Write table of contents.
for (var i=0; i < functionDocArray.length; i++) {
with (functionDocArray[i]) {
out.writeLine('function <A HREF=#' + name +
'>' + name + '</A><BR>');
}
}
out.writeLine('<HR>');
// Now write the saved function documentation.
for (i=0; i < functionDocArray.length; i++) {
with (functionDocArray[i]) {
out.writeLine('<A NAME=' + name + '>');
out.writeLine(text);
}
}
out.writeLine('</BODY></HTML>');
// Now clean up the doc array
functionDocArray = [];
}
/**
* Process function and associated comment.
* @param name the name of the function
* @param args the args of the function as a single string
* @param comment the text of the comment
* @return a string for the HTML text of the documentation
*/
function processFunction(name, args, comment) {
if (debug)
print("Processing " + name + " " + args + " " + comment);
return "<H2>Function " + name + "</H2>" +
"<PRE>" +
"function " + name + "(" + args + ")" +
"</PRE>" +
processComment(comment,0,name) +
"<P><BR><BR>";
}
/**
* Process comment.
* @param comment the text of the comment
* @param firstLine shows if comment is at the beginning of the file
* @param fname name of the file (without path)
* @return a string for the HTML text of the documentation
*/
function processComment(comment,firstLine,fname) {
var tags = {};
// Use the "lambda" form of regular expression replace,
// where the replacement object is a function rather
// than a string. The function is called with the
// matched text and any parenthetical matches as
// arguments, and the result of the function used as the
// replacement text.
// Here we use the function to build up the "tags" object,
// which has a property for each "@" tag that is the name
// of the tag, and whose value is an array of the
// text following that tag.
comment = comment.replace(/@(\w+)\s+([^@]*)/g,
function (s, name, text) {
var a = tags[name] || [];
a.push(text);
tags[name] = a;
return "";
});
// if we have a comment at the beginning of a file
// store the comment for the index file
if (firstLine) {
indexFileArray[fname] = comment;
}
var out = comment + '<P>';
if (tags["param"]) {
// Create a table of parameters and their descriptions.
var array = tags["param"];
var params = "";
for (var i=0; i < array.length; i++) {
var m = array[i].match(/(\w+)\s+(.*)/);
params += '<TR><TD><I>'+m[1]+'</I></TD>' +
'<TD>'+m[2]+'</TD></TR>';
}
out += '<TABLE WIDTH="90%" BORDER=1>';
out += '<TR BGCOLOR=0xdddddddd>';
out += '<TD><B>Parameter</B></TD>';
out += '<TD><B>Description</B></TD></TR>';
out += params;
out += '</TABLE><P>';
}
if (tags["return"]) {
out += "<DT><B>Returns:</B><DD>";
out += tags["return"][0] + "</DL><P>";
}
if (tags["author"]) {
// List the authors together, separated by commas.
out += '<DT><B>Author:</B><DD>';
var array = tags["author"];
for (var i=0; i < array.length; i++) {
out += array[i];
if (i+1 < array.length)
out += ", ";
}
out += '</DL><P>';
}
if (tags["version"]) {
// Show the version.
out += '<DT><B>Version:</B><DD>';
var array = tags["version"];
for (var i=0; i < array.length; i++) {
out += array[i];
if (i+1 < array.length)
out += "<BR><DD>";
}
out += '</DL><P>';
}
if (tags["see"]) {
// List the see modules together, separated by <BR>.
out += '<DT><B>Dependencies:</B><DD>';
var array = tags["see"];
for (var i=0; i < array.length; i++) {
out += array[i];
if (i+1 < array.length)
out += "<BR><DD>";
}
out += '</DL><P>';
}
if (tags["lastmodified"]) {
// Shows a last modified description with client-side js.
out += '<DT><B>Last modified:</B><DD>';
out += '<script><!--\n';
out += 'document.writeln(document.lastModified);\n';
out += '// ---></script>\n';
out += '</DL><P>';
}
// additional tags can be added here (i.e., "if (tags["see"])...")
return out;
}
/**
* Create an html output file
* @param outputdir directory to put the file
* @param htmlfile name of the file
*/
function CreateOutputFile(outputdir,htmlfile)
{
if (outputdir==null)
{
var outname = htmlfile;
}
else
{
var separator = Packages.java.io.File.separator;
var outname = outputdir + separator + htmlfile.substring(htmlfile.lastIndexOf(separator),htmlfile.length);
}
print("output file: " + outname);
return new File(outname);
}
/**
* Process a javascript file. Puts the generated HTML file in the outdir
* @param filename name of the javascript file
* @inputdir input directory of the file (default null)
*/
function processJSFile(filename,inputdir)
{
if (debug) print("filename = " + filename + " inputdir = " + inputdir);
if (!filename.match(/\.js$/)) {
print("Expected filename to end in '.js'; had instead " +
filename + ". I don't treat the file.");
} else {
if (inputdir==null)
{
var inname = filename;
}
else
{
var separator = Packages.java.io.File.separator;
var inname = inputdir + separator + filename;
}
print("Processing file " + inname);
var f = new File(inname);
// create the output file
var htmlfile = filename.replace(/\.js$/, ".html");
var out = CreateOutputFile(outputdir,htmlfile);
processFile(f, filename, inputdir, out);
out.close();
}
}
/**
* Generate index files containing links to the processed javascript files
* and the generated functions
*/
function GenerateIndex(dirname)
{
// construct the files index file
var out = CreateOutputFile(outputdir,indexFile);
// write the beginning of the file
out.writeLine('<HTML><HEADER><TITLE>File Index - directory: ' + dirname + '</TITLE><BODY>');
out.writeLine('<H1>File Index - directory: ' + dirname + '</H1>\n');
out.writeLine('<TABLE WIDTH="90%" BORDER=1>');
out.writeLine('<TR BGCOLOR=0xdddddddd>');
out.writeLine('<TD><B>File</B></TD>');
out.writeLine('<TD><B>Description</B></TD></TR>');
var separator = Packages.java.io.File.separator;
// sort the index file array
var SortedFileArray = [];
for (var fname in indexFileArray)
SortedFileArray.push(fname);
SortedFileArray.sort();
for (var i=0; i < SortedFileArray.length; i++) {
var fname = SortedFileArray[i];
var htmlfile = fname.replace(/\.js$/, ".html");
out.writeLine('<TR><TD><A HREF=\"' + htmlfile + '\">' + fname + '</A></TD></TD><TD>');
if (indexFileArray[fname])
out.writeLine(indexFileArray[fname]);
else
out.writeLine('No comments');
out.writeLine('</TD></TR>\n');
}
out.writeLine('</TABLE></BODY></HTML>');
out.close();
// construct the functions index file
var out = CreateOutputFile(outputdir,indexFunction);
// write the beginning of the file
out.writeLine('<HTML><HEADER><TITLE>Function Index - directory: ' + dirname + '</TITLE><BODY>');
out.writeLine('<H1>Function Index - directory: ' + dirname + '</H1>\n');
out.writeLine('<TABLE WIDTH="90%" BORDER=1>');
out.writeLine('<TR BGCOLOR=0xdddddddd>');
out.writeLine('<TD><B>Function</B></TD>');
out.writeLine('<TD><B>Files</B></TD></TR>');
// sort the function array
var SortedFunctionArray = [];
for (var functionname in indexFunctionArray)
SortedFunctionArray.push(functionname);
SortedFunctionArray.sort();
for (var j=0; j < SortedFunctionArray.length; j++) {
var funcname = SortedFunctionArray[j];
with (indexFunctionArray[funcname]) {
var outstr = '<TR><TD>' + funcname + '</TD><TD>';
var filelst = filename.split("|");
for (var i in filelst) {
var htmlfile = filelst[i].replace(/\.js$/, ".html");
outstr += '<A HREF=\"' + htmlfile + '#' + funcname + '\">' + filelst[i] + '</A>&nbsp;';
}
outstr += '</TD></TR>';
out.writeLine(outstr);
}
}
out.writeLine('</TABLE></BODY></HTML>');
out.close();
}
/**
* prints the options for JSDoc
*/
function PrintOptions()
{
print("You can use the following options:\n");
print("-d: specify an output directory for the generated html files\n");
print("-i: processes all files in an input directory (you can specify several directories)\n");
quit();
}
// Main Script
// first read the arguments
if (! arguments)
PrintOptions();
for (var i=0; i < arguments.length; i++) {
if (debug) print("argument: + \'" + arguments[i] + "\'");
if (arguments[i].match(/^\-/)) {
if (String(arguments[i])=="-d"){
// output directory for the generated html files
outputdir = String(arguments[i+1]);
if (debug) print("outputdir: + \'" + outputdir + "\'");
i++;
}
else if (String(arguments[i])=="-i"){
// process all files in an input directory
DirList.push(String(arguments[i+1]));
if (debug) print("inputdir: + \'" + arguments[i+1] + "\'");
i++;
}
else {
print("Unknown option: " + arguments[i] + "\n");
PrintOptions();
}
}
else
{
// we have a single file
if (debug) print("file: + \'" + arguments[i] + "\'");
FileList.push(String(arguments[i]));
}
}
// first handle the single files
for (var i in FileList)
processJSFile(FileList[i],null);
// then handle the input directories
for (var j in DirList) {
var inputdir = String(DirList[j]);
print("Process input directory: " + inputdir);
// clean up index arrays
var indexFileArray = [];
var indexFunctionArray = [];
// for the directory name get rid of ../../ or ..\..\
inputDirName = inputdir.replace(/\.\.\/|\.\.\\/g,"");
indexFile = indexFileName + "_" + inputDirName + ".html";
indexFunction = indexFunctionName + "_" + inputDirName + ".html";
print("indexFile = " + indexFile);
print("indexFunction = " + indexFunction);
// read the files in the directory
var DirFile = new java.io.File(inputdir);
var lst = DirFile.list();
var separator = Packages.java.io.File.separator;
for (var i=0; i < lst.length; i++)
{
processJSFile(String(lst[i]),inputdir);
}
// generate the index files for the input directory
GenerateIndex(inputDirName);
}

View File

@@ -1,54 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
/**
* liveConnect.js: a simple demonstration of JavaScript-to-Java connectivity
*/
// Create a new StringBuffer. Note that the class name must be fully qualified
// by its package. Packages other than "java" must start with "Packages", i.e.,
// "Packages.javax.servlet...".
var sb = new java.lang.StringBuffer();
// Now add some stuff to the buffer.
sb.append("hi, mom");
sb.append(3); // this will add "3.0" to the buffer since all JS numbers
// are doubles by default
sb.append(true);
// Now print it out. (The toString() method of sb is automatically called
// to convert the buffer to a string.)
// Should print "hi, mom3.0true".
print(sb);

View File

@@ -1,53 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
// unique.js: read the contents of a file and print out the unique lines
defineClass("File")
// "arguments[0]" refers to the first argument at the command line to the
// script, if present. If not present, "arguments[0]" will be undefined,
// which will cause f to read from System.in.
var f = new File(arguments[0]);
var o = {}
var line;
while ((line = f.readLine()) != null) {
// Use JavaScript objects' inherent nature as an associative
// array to provide uniqueness
o[line] = true;
}
for (i in o) {
print(i);
}

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -1,2 +0,0 @@
Manifest-Version: 1.0
Main-Class: org.mozilla.javascript.tools.shell.Main

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,130 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
/**
* This class implements the "arguments" object.
*
* See ECMA 10.1.8
*
* @see org.mozilla.javascript.NativeCall
* @author Norris Boyd
*/
class Arguments extends ScriptableObject {
public Arguments(NativeCall activation) {
this.activation = activation;
Scriptable parent = activation.getParentScope();
setParentScope(parent);
setPrototype(ScriptableObject.getObjectPrototype(parent));
args = activation.getOriginalArguments();
int length = args.length;
Object callee = activation.funObj;
defineProperty("length", new Integer(length),
ScriptableObject.DONTENUM);
defineProperty("callee", callee, ScriptableObject.DONTENUM);
hasCaller = (activation.funObj.version <= Context.VERSION_1_3 &&
activation.funObj.version != Context.VERSION_DEFAULT);
}
public String getClassName() {
return "Arguments";
}
public boolean has(String name, Scriptable start) {
return (hasCaller && name.equals("caller")) || super.has(name, start);
}
public boolean has(int index, Scriptable start) {
Object[] args = activation.getOriginalArguments();
return (0 <= index && index < args.length) || super.has(index, start);
}
public Object get(String name, Scriptable start) {
if (hasCaller && name.equals("caller")) {
NativeCall caller = activation.caller;
if (caller == null || caller.originalArgs == null)
return null;
return caller.get("arguments", caller);
}
return super.get(name, start);
}
public Object get(int index, Scriptable start) {
if (0 <= index && index < args.length) {
NativeFunction f = activation.funObj;
if (index < f.argCount)
return activation.get(f.names[index+1], activation);
return args[index];
}
return super.get(index, start);
}
public void put(String name, Scriptable start, Object value) {
if (name.equals("caller")) {
// Set "hasCaller" to false so that we won't look up a
// computed value.
hasCaller = false;
}
super.put(name, start, value);
}
public void put(int index, Scriptable start, Object value) {
if (0 <= index && index < args.length) {
NativeFunction f = activation.funObj;
if (index < f.argCount)
activation.put(f.names[index+1], activation, value);
else
args[index] = value;
return;
}
super.put(index, start, value);
}
public void delete(String name) {
if (name.equals("caller"))
hasCaller = false;
super.delete(name);
}
private NativeCall activation;
private Object[] args;
private boolean hasCaller;
}

View File

@@ -1,75 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Waldemar Horwat
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
final class BinaryDigitReader {
int lgBase; // Logarithm of base of number
int digit; // Current digit value in radix given by base
int digitPos; // Bit position of last bit extracted from digit
String digits; // String containing the digits
int start; // Index of the first remaining digit
int end; // Index past the last remaining digit
BinaryDigitReader(int base, String digits, int start, int end) {
lgBase = 0;
while (base != 1) {
lgBase++;
base >>= 1;
}
digitPos = 0;
this.digits = digits;
this.start = start;
this.end = end;
}
/* Return the next binary digit from the number or -1 if done */
int getNextBinaryDigit()
{
if (digitPos == 0) {
if (start == end)
return -1;
char c = digits.charAt(start++);
if ('0' <= c && c <= '9')
digit = c - '0';
else if ('a' <= c && c <= 'z')
digit = c - 'a' + 10;
else digit = c - 'A' + 10;
digitPos = lgBase;
}
return digit >> --digitPos & 1;
}
}

View File

@@ -1,48 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
// API class
package org.mozilla.javascript;
/**
* Thrown if errors are detected while attempting to define a host object
* from a Java class.
*/
public class ClassDefinitionException extends Exception {
public ClassDefinitionException(String detail) {
super(detail);
}
}

View File

@@ -1,61 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Roger Lawrence
* Andi Vajda
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
public interface ClassNameHelper {
public String getTargetClassFileName();
public void setTargetClassFileName(String classFileName);
public String getTargetPackage();
public void setTargetPackage(String targetPackage);
public String getTargetClassFileName(String className);
public String getGeneratingDirectory();
public void setTargetExtends(Class extendsClass);
public void setTargetImplements(Class[] implementsClasses);
public ClassOutput getClassOutput();
public void setClassOutput(ClassOutput classOutput);
}

View File

@@ -1,56 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Andi Vajda
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
// API class
import java.io.*;
/**
* This interface is implemented by classes interested in the bytecode
* generated by the rhino compiler for script objects.
*
* @see Context
* @author Andi Vajda
*/
public interface ClassOutput {
/**
* @param className the name of the class for which bytecode is ready.
* @return a stream into which to write bytecode.
* @since 1.5 Release 2
*/
public OutputStream getOutputStream(String className)
throws IOException;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,63 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
/**
* This is the default error reporter for JavaScript.
*
* @author Norris Boyd
*/
class DefaultErrorReporter implements ErrorReporter {
public void warning(String message, String sourceName, int line,
String lineSource, int lineOffset)
{
// do nothing
}
public void error(String message, String sourceName, int line,
String lineSource, int lineOffset)
{
throw new EvaluatorException(message);
}
public EvaluatorException runtimeError(String message, String sourceName,
int line, String lineSource,
int lineOffset)
{
return new EvaluatorException(message);
}
}

View File

@@ -1,152 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Roger Lawrence
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
// API class
package org.mozilla.javascript;
/**
* The class of exceptions raised by the engine as described in
* ECMA edition 3. See section 15.11.6 in particular.
*/
public class EcmaError extends RuntimeException {
/**
* Create an exception with the specified detail message.
*
* Errors internal to the JavaScript engine will simply throw a
* RuntimeException.
*
* @param nativeError the NativeError object constructed for this error
* @param sourceName the name of the source reponsible for the error
* @param lineNumber the line number of the source
* @param columnNumber the columnNumber of the source (may be zero if
* unknown)
* @param lineSource the source of the line containing the error (may be
* null if unknown)
*/
public EcmaError(NativeError nativeError, String sourceName,
int lineNumber, int columnNumber, String lineSource)
{
super("EcmaError");
errorObject = nativeError;
this.sourceName = sourceName;
this.lineNumber = lineNumber;
this.columnNumber = columnNumber;
this.lineSource = lineSource;
}
/**
* Return a string representation of the error, which currently consists
* of the name of the error together with the message.
*/
public String toString() {
if (sourceName != null && lineNumber > 0)
return errorObject.toString() + " (" + sourceName +
"; line " + lineNumber + ")";
else
return errorObject.toString();
}
/**
* Gets the name of the error.
*
* ECMA edition 3 defines the following
* errors: EvalError, RangeError, ReferenceError,
* SyntaxError, TypeError, and URIError. Additional error names
* may be added in the future.
*
* See ECMA edition 3, 15.11.7.9.
*
* @return the name of the error.
*/
public String getName() {
return errorObject.getName();
}
/**
* Gets the message corresponding to the error.
*
* See ECMA edition 3, 15.11.7.10.
*
* @return an implemenation-defined string describing the error.
*/
public String getMessage() {
return errorObject.getMessage();
}
/**
* Get the name of the source containing the error, or null
* if that information is not available.
*/
public String getSourceName() {
return sourceName;
}
/**
* Returns the line number of the statement causing the error,
* or zero if not available.
*/
public int getLineNumber() {
return lineNumber;
}
/**
* Get the error object corresponding to this exception.
*/
public Scriptable getErrorObject() {
return errorObject;
}
/**
* The column number of the location of the error, or zero if unknown.
*/
public int getColumnNumber() {
return columnNumber;
}
/**
* The source of the line causing the error, or zero if unknown.
*/
public String getLineSource() {
return lineSource;
}
private NativeError errorObject;
private String sourceName;
private int lineNumber;
private int columnNumber;
private String lineSource;
}

View File

@@ -1,103 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
// API class
package org.mozilla.javascript;
/**
* This is interface defines a protocol for the reporting of
* errors during JavaScript translation or execution.
*
* @author Norris Boyd
*/
public interface ErrorReporter {
/**
* Report a warning.
*
* The implementing class may choose to ignore the warning
* if it desires.
*
* @param message a String describing the warning
* @param sourceName a String describing the JavaScript source
* where the warning occured; typically a filename or URL
* @param line the line number associated with the warning
* @param lineSource the text of the line (may be null)
* @param lineOffset the offset into lineSource where problem was detected
*/
void warning(String message, String sourceName, int line,
String lineSource, int lineOffset);
/**
* Report an error.
*
* The implementing class is free to throw an exception if
* it desires.
*
* If execution has not yet begun, the JavaScript engine is
* free to find additional errors rather than terminating
* the translation. It will not execute a script that had
* errors, however.
*
* @param message a String describing the error
* @param sourceName a String describing the JavaScript source
* where the error occured; typically a filename or URL
* @param line the line number associated with the error
* @param lineSource the text of the line (may be null)
* @param lineOffset the offset into lineSource where problem was detected
*/
void error(String message, String sourceName, int line,
String lineSource, int lineOffset);
/**
* Creates an EvaluatorException that may be thrown.
*
* runtimeErrors, unlike errors, will always terminate the
* current script.
*
* @param message a String describing the error
* @param sourceName a String describing the JavaScript source
* where the error occured; typically a filename or URL
* @param line the line number associated with the error
* @param lineSource the text of the line (may be null)
* @param lineOffset the offset into lineSource where problem was detected
* @return an EvaluatorException that will be thrown.
*/
EvaluatorException runtimeError(String message, String sourceName,
int line, String lineSource,
int lineOffset);
}

View File

@@ -1,56 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
/**
* The class of exceptions thrown by the JavaScript engine.
*/
public class EvaluatorException extends RuntimeException {
/**
* Create an exception with the specified detail message.
*
* Errors internal to the JavaScript engine will simply throw a
* RuntimeException.
*
* @param detail a message with detail about the exception
*/
public EvaluatorException(String detail) {
super(detail);
}
}

View File

@@ -1,342 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Roger Lawrence
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.util.Hashtable;
import java.util.Enumeration;
/**
* Manipulate a Scriptable object as if its prototype chain were flattened.
* <p>
* This class has been deprecated in favor of the static methods
* <code>getProperty</code>, <code>putProperty</code>, and
* <code>deleteProperty</code>. Those methods provide the
* same functionality without the confusing and inefficient need to construct
* a new object instance.
*
* @see org.mozilla.javascript.ScriptableObject
*
* @author Norris Boyd
*/
public class FlattenedObject {
/**
* Construct a new FlattenedObject.
*
* @param object the object to be viewed with flattened properties
* @deprecated
*/
public FlattenedObject(Scriptable object) {
this.obj = object;
}
/**
* Get the associated Scriptable object.
* @deprecated
*/
public Scriptable getObject() {
return obj;
}
/**
* Determine if a property exists in an object.
*
* This is a more convenient (and less efficient) form than
* <code>Scriptable.has()</code>.
* It returns true if and only if the property
* exists in this object or any of the objects in its prototype
* chain.
*
* @param id the property index, which may be either a String or a
* Number
* @return true if and only if the property exists in the prototype
* chain
* @see org.mozilla.javascript.Scriptable#has
* @deprecated As of 1.5R2, replaced by ScriptableObject.getProperty
*/
public boolean hasProperty(Object id) {
String stringId = ScriptRuntime.toString(id);
String s = ScriptRuntime.getStringId(stringId);
if (s == null)
return getBase(obj, ScriptRuntime.getIntId(stringId)) != null;
return getBase(obj, s) != null;
}
/**
* Get a property of an object.
* <p>
* This is a more convenient (and less efficient) form than
* <code>Scriptable.get()</code>. It corresponds exactly to the
* expression <code>obj[id]</code> in JavaScript. This method
* will traverse the prototype chain of an object to find the
* property.<p>
*
* If the property does not exist in the object or its prototype
* chain, the undefined value will be returned.
*
* @param id the property index; can be a String or a Number; the
* String may contain characters representing a number
* @return the value of the property or the undefined value
* @see org.mozilla.javascript.Scriptable#get
* @see org.mozilla.javascript.Context#getUndefinedValue
* @deprecated As of 1.5R2, replaced by ScriptableObject.getProperty
*/
public Object getProperty(Object id) {
String s = ScriptRuntime.getStringId(id);
int index = s == null ? ScriptRuntime.getIntId(id) : 0;
Scriptable m = obj;
Object result;
for(;;) {
result = s == null ? m.get(index, obj) : m.get(s, obj);
if (result != Scriptable.NOT_FOUND)
break;
m = m.getPrototype();
if (m == null)
return Undefined.instance;
}
if (result instanceof Scriptable)
return new FlattenedObject((Scriptable) result);
return result;
}
/**
* Set a property of an object.
*
* This is a more convenient (and less efficient) form than that
* provided in Scriptable. It corresponds exactly to the
* expression <code>obj[id] = val</code> in JavaScript.<p>
*
* @param id the property index, which may be either a String or
* a Number
* @param value the value of the property
* @see org.mozilla.javascript.Scriptable#put
* @deprecated As of 1.5R2, replaced by ScriptableObject.putProperty
*/
public void putProperty(Object id, Object value) {
String s = ScriptRuntime.getStringId(id);
if (value instanceof FlattenedObject)
value = ((FlattenedObject) value).getObject();
Scriptable x;
if (s == null) {
int index = ScriptRuntime.getIntId(id);
x = getBase(obj, index);
if (x == null)
x = obj;
x.put(index, obj, value);
return;
}
x = getBase(obj, s);
if (x == null)
x = obj;
x.put(s, obj, value);
}
/**
* Remove a property.
*
* This method provides the functionality of the <code>delete</code>
* operator in JavaScript.
*
* @param id the property index, which may be either a String or
* a Number
* @return true if the property didn't exist, or existed and was removed
* @see org.mozilla.javascript.Scriptable#delete
* @deprecated as of 1.5R2, replaced by ScriptableObject.deleteProperty
*/
public boolean deleteProperty(Object id) {
String s = ScriptRuntime.getStringId(id);
if (s == null) {
int index = ScriptRuntime.getIntId(id);
Scriptable base = getBase(obj, index);
if (base == null)
return true;
base.delete(index);
return !base.has(index, base);
}
Scriptable base = getBase(obj, s);
if (base == null)
return true;
base.delete(s);
return !base.has(s, base);
}
/**
* Return an array that contains the ids of the properties.
*
* <p>This method will walk the prototype chain and collect the
* ids of all objects in the prototype chain.<p>
*
* If an id appears in more than one object in the prototype chain,
* it will only be in the array once. (So all the entries in the
* array will be unique respective to equals().)
*
* @see org.mozilla.javascript.Scriptable#getIds
* @deprecated
*/
public Object[] getIds() {
Hashtable h = new Hashtable(11);
Scriptable m = obj;
while (m != null) {
Object[] e = m.getIds();
for (int i=0; i < e.length; i++) {
h.put(e[i], Boolean.TRUE);
}
m = m.getPrototype();
}
Enumeration keys = h.keys();
Object elem;
Object[] result = new Object[h.size()];
int index = 0;
while (keys.hasMoreElements()) {
elem = keys.nextElement();
result[index++] = elem;
}
return result;
}
/**
* Consider this object to be a function, and call it.
*
* @param cx the current Context for this thread
* @param thisObj the JavaScript 'this' for the call
* @param args the arguments for the call
* @return the result of the JavaScript function call
* @exception NotAFunctionException if this object is not a function
* @exception JavaScriptException if an uncaught JavaScript exception
* occurred while executing the function
* @see org.mozilla.javascript.Function#call
* @deprecated
*/
public Object call(Context cx, Scriptable thisObj, Object[] args)
throws NotAFunctionException,
JavaScriptException
{
if (!(obj instanceof Function)) {
throw new NotAFunctionException();
}
return ScriptRuntime.call(cx, obj, thisObj, args, (Function) obj);
}
/**
* Consider this object to be a function, and invoke it as a
* constructor call.
*
* @param cx the current Context for this thread
* @param args the arguments for the constructor call
* @return the allocated object
* @exception NotAFunctionException if this object is not a function
* @exception JavaScriptException if an uncaught JavaScript exception
* occurred while executing the constructor
* @see org.mozilla.javascript.Function#construct
* @deprecated
*/
public Scriptable construct(Context cx, Object[] args)
throws NotAFunctionException,
JavaScriptException
{
if (!(obj instanceof Function)) {
throw new NotAFunctionException();
}
return ScriptRuntime.newObject(cx, obj, args, null);
}
/**
* Get the property indicated by the id, and invoke it with the
* specified arguments.
* <p>
* For example, for a FlattenedObject <code>obj</code>,
* and a Java array <code>a</code> consisting of a single string
* <code>"hi"</code>, the call <pre>
* obj.callMethod("m", a)</pre>
* is equivalent to the JavaScript code <code>obj.m("hi")</code>.<p>
*
* If the property is not found or is not a function, an
* exception will be thrown.
*
* @param id the Number or String to use to find the function property
* to call
* @param args the arguments for the constructor call
* @return the result of the call
* @exception PropertyException if the designated property
* was not found
* @exception NotAFunctionException if this object is not a function
* @exception JavaScriptException if an uncaught JavaScript exception
* occurred while executing the method
* @see org.mozilla.javascript.Function#call
* @deprecated
*/
public Object callMethod(Object id, Object[] args)
throws PropertyException,
NotAFunctionException,
JavaScriptException
{
if (!hasProperty(id)) {
throw new PropertyException(
Context.getMessage("msg.prop.not.found", null));
}
Object o = getProperty(id);
if (o instanceof FlattenedObject)
return ((FlattenedObject) o).call(Context.getContext(), obj, args);
throw new NotAFunctionException();
}
/****** End of API *******/
private static Scriptable getBase(Scriptable obj, String s) {
Scriptable m = obj;
while (m != null) {
if (m.has(s, obj))
return m;
m = m.getPrototype();
}
return null;
}
private static Scriptable getBase(Scriptable obj, int index) {
Scriptable m = obj;
while (m != null) {
if (m.has(index, obj))
return m;
m = m.getPrototype();
}
return null;
}
private Scriptable obj;
}

View File

@@ -1,86 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
// API class
package org.mozilla.javascript;
/**
* This is interface that all functions in JavaScript must implement.
* The interface provides for calling functions and constructors.
*
* @see org.mozilla.javascript.Scriptable
* @author Norris Boyd
*/
public interface Function extends Scriptable {
/**
* Call the function.
*
* Note that the array of arguments is not guaranteed to have
* length greater than 0.
*
* @param cx the current Context for this thread
* @param scope the scope to execute the function relative to. This is
* set to the value returned by getParentScope() except
* when the function is called from a closure.
* @param thisObj the JavaScript <code>this</code> object
* @param args the array of arguments
* @return the result of the call
* @exception JavaScriptException if an uncaught exception
* occurred while executing the function
*/
public Object call(Context cx, Scriptable scope, Scriptable thisObj,
Object[] args)
throws JavaScriptException;
/**
* Call the function as a constructor.
*
* This method is invoked by the runtime in order to satisfy a use
* of the JavaScript <code>new</code> operator. This method is
* expected to create a new object and return it.
*
* @param cx the current Context for this thread
* @param scope an enclosing scope of the caller except
* when the function is called from a closure.
* @param args the array of arguments
* @return the allocated object
* @exception JavaScriptException if an uncaught exception
* occurred while executing the constructor
*/
public Scriptable construct(Context cx, Scriptable scope, Object[] args)
throws JavaScriptException;
}

View File

@@ -1,94 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Roger Lawrence
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.util.*;
public class FunctionNode extends Node {
public FunctionNode(String name, Node left, Node right) {
super(TokenStream.FUNCTION, left, right, name);
itsVariableTable = new VariableTable();
}
public String getFunctionName() {
return getString();
}
public VariableTable getVariableTable() {
return itsVariableTable;
}
public boolean requiresActivation() {
return itsNeedsActivation;
}
public boolean setRequiresActivation(boolean b) {
return itsNeedsActivation = b;
}
/**
* There are three types of functions that can be defined. The first
* is a function statement. This is a function appearing as a top-level
* statement (i.e., not nested inside some other statement) in either a
* script or a function.
*
* The second is a function expression, which is a function appearing in
* an expression except for the third type, which is...
*
* The third type is a function expression where the expression is the
* top-level expression in an expression statement.
*
* The three types of functions have different treatment and must be
* distinquished.
*/
public static final byte FUNCTION_STATEMENT = 1;
public static final byte FUNCTION_EXPRESSION = 2;
public static final byte FUNCTION_EXPRESSION_STATEMENT = 3;
public byte getFunctionType() {
return itsFunctionType;
}
public void setFunctionType(byte functionType) {
itsFunctionType = functionType;
}
protected VariableTable itsVariableTable;
protected boolean itsNeedsActivation;
protected byte itsFunctionType;
}

View File

@@ -1,636 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Ted Neward
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
// API class
package org.mozilla.javascript;
import java.util.Hashtable;
import java.util.Vector;
import java.lang.reflect.*;
public class FunctionObject extends NativeFunction {
/**
* Create a JavaScript function object from a Java method.
*
* <p>The <code>member</code> argument must be either a java.lang.reflect.Method
* or a java.lang.reflect.Constructor and must match one of two forms.<p>
*
* The first form is a member with zero or more parameters
* of the following types: Object, String, boolean, Scriptable,
* byte, short, int, float, or double. The Long type is not supported
* because the double representation of a long (which is the
* EMCA-mandated storage type for Numbers) may lose precision.
* If the member is a Method, the return value must be void or one
* of the types allowed for parameters.<p>
*
* The runtime will perform appropriate conversions based
* upon the type of the parameter. A parameter type of
* Object specifies that no conversions are to be done. A parameter
* of type String will use Context.toString to convert arguments.
* Similarly, parameters of type double, boolean, and Scriptable
* will cause Context.toNumber, Context.toBoolean, and
* Context.toObject, respectively, to be called.<p>
*
* If the method is not static, the Java 'this' value will
* correspond to the JavaScript 'this' value. Any attempt
* to call the function with a 'this' value that is not
* of the right Java type will result in an error.<p>
*
* The second form is the variable arguments (or "varargs")
* form. If the FunctionObject will be used as a constructor,
* the member must have the following parameters
* <pre>
* (Context cx, Object[] args, Function ctorObj,
* boolean inNewExpr)</pre>
* and if it is a Method, be static and return an Object result.<p>
*
* Otherwise, if the FunctionObject will <i>not</i> be used to define a
* constructor, the member must be a static Method with parameters
* (Context cx, Scriptable thisObj, Object[] args,
* Function funObj) </pre>
* <pre>
* and an Object result.<p>
*
* When the function varargs form is called as part of a function call,
* the <code>args</code> parameter contains the
* arguments, with <code>thisObj</code>
* set to the JavaScript 'this' value. <code>funObj</code>
* is the function object for the invoked function.<p>
*
* When the constructor varargs form is called or invoked while evaluating
* a <code>new</code> expression, <code>args</code> contains the
* arguments, <code>ctorObj</code> refers to this FunctionObject, and
* <code>inNewExpr</code> is true if and only if a <code>new</code>
* expression caused the call. This supports defining a function that
* has different behavior when called as a constructor than when
* invoked as a normal function call. (For example, the Boolean
* constructor, when called as a function,
* will convert to boolean rather than creating a new object.)<p>
*
* @param name the name of the function
* @param methodOrConstructor a java.lang.reflect.Method or a java.lang.reflect.Constructor
* that defines the object
* @param scope enclosing scope of function
* @see org.mozilla.javascript.Scriptable
*/
public FunctionObject(String name, Member methodOrConstructor,
Scriptable scope)
{
String methodName;
if (methodOrConstructor instanceof Constructor) {
ctor = (Constructor) methodOrConstructor;
isStatic = true; // well, doesn't take a 'this'
types = ctor.getParameterTypes();
methodName = ctor.getName();
} else {
method = (Method) methodOrConstructor;
isStatic = Modifier.isStatic(method.getModifiers());
types = method.getParameterTypes();
methodName = method.getName();
}
String myNames[] = { name };
super.names = myNames;
int length;
if (types.length == 4 && (types[1].isArray() || types[2].isArray())) {
// Either variable args or an error.
if (types[1].isArray()) {
if (!isStatic ||
types[0] != Context.class ||
types[1].getComponentType() != ScriptRuntime.ObjectClass ||
types[2] != ScriptRuntime.FunctionClass ||
types[3] != Boolean.TYPE)
{
String[] args = { methodName };
String message = Context.getMessage("msg.varargs.ctor",
args);
throw Context.reportRuntimeError(message);
}
parmsLength = VARARGS_CTOR;
} else {
if (!isStatic ||
types[0] != Context.class ||
types[1] != ScriptRuntime.ScriptableClass ||
types[2].getComponentType() != ScriptRuntime.ObjectClass ||
types[3] != ScriptRuntime.FunctionClass)
{
String[] args = { methodName };
String message = Context.getMessage("msg.varargs.fun",
args);
throw Context.reportRuntimeError(message);
}
parmsLength = VARARGS_METHOD;
}
// XXX check return type
length = 1;
} else {
parmsLength = (short) types.length;
boolean hasConversions = false;
for (int i=0; i < parmsLength; i++) {
Class type = types[i];
if (type == ScriptRuntime.ObjectClass) {
// may not need conversions
} else if (type == ScriptRuntime.StringClass ||
type == ScriptRuntime.BooleanClass ||
ScriptRuntime.NumberClass.isAssignableFrom(type) ||
Scriptable.class.isAssignableFrom(type))
{
hasConversions = true;
} else if (type == Boolean.TYPE) {
hasConversions = true;
types[i] = ScriptRuntime.BooleanClass;
} else if (type == Byte.TYPE) {
hasConversions = true;
types[i] = ScriptRuntime.ByteClass;
} else if (type == Short.TYPE) {
hasConversions = true;
types[i] = ScriptRuntime.ShortClass;
} else if (type == Integer.TYPE) {
hasConversions = true;
types[i] = ScriptRuntime.IntegerClass;
} else if (type == Float.TYPE) {
hasConversions = true;
types[i] = ScriptRuntime.FloatClass;
} else if (type == Double.TYPE) {
hasConversions = true;
types[i] = ScriptRuntime.DoubleClass;
}
// Note that long is not supported; see comments above
else {
Object[] errArgs = { methodName };
throw Context.reportRuntimeError(
Context.getMessage("msg.bad.parms", errArgs));
}
}
if (!hasConversions)
types = null;
length = parmsLength;
}
// Initialize length property
lengthPropertyValue = (short) length;
hasVoidReturn = method != null && method.getReturnType() == Void.TYPE;
this.argCount = (short) length;
setParentScope(scope);
setPrototype(getFunctionPrototype(scope));
Context cx = Context.getCurrentContext();
useDynamicScope = cx != null &&
cx.hasCompileFunctionsWithDynamicScope();
}
/**
* Override ScriptableObject's has, get, and set in order to define
* the "length" property of the function. <p>
*
* We could also have defined the property using ScriptableObject's
* defineProperty method, but that would have consumed a slot in every
* FunctionObject. Most FunctionObjects typically don't have any
* properties anyway, so having the "length" property would cause us
* to allocate an array of slots. <p>
*
* In particular, this method will return true for
* <code>name.equals("length")</code>
* and will delegate to the superclass for all other
* values of <code>name</code>.
*/
public boolean has(String name, Scriptable start) {
return name.equals("length") || super.has(name, start);
}
/**
* Override ScriptableObject's has, get, and set in order to define
* the "length" property of the function. <p>
*
* In particular, this method will return the value defined by
* the method used to construct the object (number of parameters
* of the method, or 1 if the method is a "varargs" form), unless
* setLength has been called with a new value.
*
* @see org.mozilla.javascript.FunctionObject#setLength
*/
public Object get(String name, Scriptable start) {
if (name.equals("length"))
return new Integer(lengthPropertyValue);
return super.get(name, start);
}
/**
* Override ScriptableObject's has, get, and set in order to define
* the "length" property of the function. <p>
*
* In particular, this method will ignore all attempts to set the
* "length" property and forward all other requests to ScriptableObject.
*
* @see org.mozilla.javascript.FunctionObject#setLength
*/
public void put(String name, Scriptable start, Object value) {
if (!name.equals("length"))
super.put(name, start, value);
}
/**
* Set the value of the "length" property.
*
* <p>Changing the value of the "length" property of a FunctionObject only
* affects the value retrieved from get() and does not affect the way
* the method itself is called. <p>
*
* The "length" property will be defined by default as the number
* of parameters of the method used to construct the FunctionObject,
* unless the method is a "varargs" form, in which case the "length"
* property will be defined to 1.
*
* @param length the new length
*/
public void setLength(short length) {
lengthPropertyValue = length;
}
// TODO: Make not public
/**
* Finds methods of a given name in a given class.
*
* <p>Searches <code>clazz</code> for methods with name
* <code>name</code>. Maintains a cache so that multiple
* lookups on the same class are cheap.
*
* @param clazz the class to search
* @param name the name of the methods to find
* @return an array of the found methods, or null if no methods
* by that name were found.
* @see java.lang.Class#getMethods
*/
public static Method[] findMethods(Class clazz, String name) {
return findMethods(getMethodList(clazz), name);
}
static Method[] findMethods(Method[] methods, String name) {
// Usually we're just looking for a single method, so optimize
// for that case.
Vector v = null;
Method first = null;
for (int i=0; i < methods.length; i++) {
if (methods[i] == null)
continue;
if (methods[i].getName().equals(name)) {
if (first == null) {
first = methods[i];
} else {
if (v == null) {
v = new Vector(5);
v.addElement(first);
}
v.addElement(methods[i]);
}
}
}
if (v == null) {
if (first == null)
return null;
Method[] single = { first };
return single;
}
Method[] result = new Method[v.size()];
v.copyInto(result);
return result;
}
static Method[] getMethodList(Class clazz) {
Method[] cached = methodsCache; // get once to avoid synchronization
if (cached != null && cached[0].getDeclaringClass() == clazz)
return cached;
Method[] methods = null;
try {
// getDeclaredMethods may be rejected by the security manager
// but getMethods is more expensive
if (!sawSecurityException)
methods = clazz.getDeclaredMethods();
} catch (SecurityException e) {
// If we get an exception once, give up on getDeclaredMethods
sawSecurityException = true;
}
if (methods == null) {
methods = clazz.getMethods();
}
int count = 0;
for (int i=0; i < methods.length; i++) {
if (sawSecurityException
? methods[i].getDeclaringClass() != clazz
: !Modifier.isPublic(methods[i].getModifiers()))
{
methods[i] = null;
} else {
count++;
}
}
Method[] result = new Method[count];
int j=0;
for (int i=0; i < methods.length; i++) {
if (methods[i] != null)
result[j++] = methods[i];
}
if (result.length > 0 && Context.isCachingEnabled)
methodsCache = result;
return result;
}
/**
* Define this function as a JavaScript constructor.
* <p>
* Sets up the "prototype" and "constructor" properties. Also
* calls setParent and setPrototype with appropriate values.
* Then adds the function object as a property of the given scope, using
* <code>prototype.getClassName()</code>
* as the name of the property.
*
* @param scope the scope in which to define the constructor (typically
* the global object)
* @param prototype the prototype object
* @see org.mozilla.javascript.Scriptable#setParentScope
* @see org.mozilla.javascript.Scriptable#setPrototype
* @see org.mozilla.javascript.Scriptable#getClassName
*/
public void addAsConstructor(Scriptable scope, Scriptable prototype) {
setParentScope(scope);
setPrototype(getFunctionPrototype(scope));
prototype.setParentScope(this);
final int attr = ScriptableObject.DONTENUM |
ScriptableObject.PERMANENT |
ScriptableObject.READONLY;
defineProperty("prototype", prototype, attr);
String name = prototype.getClassName();
if (!name.equals("With")) {
// A "With" object would delegate these calls to the prototype:
// not the right thing to do here!
if (prototype instanceof ScriptableObject) {
((ScriptableObject) prototype).defineProperty("constructor",
this, attr);
} else {
prototype.put("constructor", prototype, this);
}
}
if (scope instanceof ScriptableObject) {
((ScriptableObject) scope).defineProperty(name, this,
ScriptableObject.DONTENUM);
} else {
scope.put(name, scope, this);
}
setParentScope(scope);
}
static public Object convertArg(Scriptable scope,
Object arg, Class desired)
{
if (desired == ScriptRuntime.BooleanClass
|| desired == Boolean.TYPE)
return ScriptRuntime.toBoolean(arg) ? Boolean.TRUE
: Boolean.FALSE;
else if (desired == ScriptRuntime.StringClass)
return ScriptRuntime.toString(arg);
else if (desired == ScriptRuntime.IntegerClass
|| desired == Integer.TYPE)
return new Integer(ScriptRuntime.toInt32(arg));
else if (desired == ScriptRuntime.DoubleClass
|| desired == Double.TYPE)
return new Double(ScriptRuntime.toNumber(arg));
else if (desired == ScriptRuntime.ScriptableClass)
return ScriptRuntime.toObject(scope, arg);
else if (desired == ScriptRuntime.ObjectClass)
return arg;
// Note that the long type is not supported; see the javadoc for
// the constructor for this class
else {
Object[] errArgs = { desired.getName() };
throw Context.reportRuntimeError(
Context.getMessage("msg.cant.convert", errArgs));
}
}
/**
* Performs conversions on argument types if needed and
* invokes the underlying Java method or constructor.
* <p>
* Implements Function.call.
*
* @see org.mozilla.javascript.Function#call
* @exception JavaScriptException if the underlying Java method or
* constructor threw an exception
*/
public Object call(Context cx, Scriptable scope, Scriptable thisObj,
Object[] args)
throws JavaScriptException
{
if (parmsLength < 0)
return callVarargs(cx, thisObj, args, false);
if (!isStatic) {
// OPT: cache "clazz"?
Class clazz = method != null ? method.getDeclaringClass()
: ctor.getDeclaringClass();
while (!clazz.isInstance(thisObj)) {
thisObj = thisObj.getPrototype();
if (thisObj == null || !useDynamicScope) {
// Couldn't find an object to call this on.
Object[] errArgs = { names[0] };
String msg = Context.getMessage("msg.incompat.call", errArgs);
throw NativeGlobal.constructError(cx, "TypeError", msg, scope);
}
}
}
Object[] invokeArgs;
int i;
if (parmsLength == args.length) {
invokeArgs = args;
// avoid copy loop if no conversions needed
i = (types == null) ? parmsLength : 0;
} else {
invokeArgs = new Object[parmsLength];
i = 0;
}
for (; i < parmsLength; i++) {
Object arg = (i < args.length)
? args[i]
: Undefined.instance;
if (types != null) {
arg = convertArg(this, arg, types[i]);
}
invokeArgs[i] = arg;
}
try {
Object result = (method != null)
? method.invoke(thisObj, invokeArgs)
: ctor.newInstance(invokeArgs);
return hasVoidReturn ? Undefined.instance : result;
}
catch (InvocationTargetException e) {
throw JavaScriptException.wrapException(scope, e);
}
catch (IllegalAccessException e) {
throw WrappedException.wrapException(e);
}
catch (InstantiationException e) {
throw WrappedException.wrapException(e);
}
}
/**
* Performs conversions on argument types if needed and
* invokes the underlying Java method or constructor
* to create a new Scriptable object.
* <p>
* Implements Function.construct.
*
* @param cx the current Context for this thread
* @param scope the scope to execute the function relative to. This
* set to the value returned by getParentScope() except
* when the function is called from a closure.
* @param args arguments to the constructor
* @see org.mozilla.javascript.Function#construct
* @exception JavaScriptException if the underlying Java method or constructor
* threw an exception
*/
public Scriptable construct(Context cx, Scriptable scope, Object[] args)
throws JavaScriptException
{
if (method == null || parmsLength == VARARGS_CTOR) {
Scriptable result;
if (method != null) {
// Ugly: allow variable-arg constructors that need access to the
// scope to get it from the Context. Cleanest solution would be
// to modify the varargs form, but that would require users with
// the old form to change their code.
cx.ctorScope = scope;
result = (Scriptable) callVarargs(cx, null, args, true);
cx.ctorScope = null;
} else {
result = (Scriptable) call(cx, scope, null, args);
}
if (result.getPrototype() == null)
result.setPrototype(getClassPrototype());
if (result.getParentScope() == null) {
Scriptable parent = getParentScope();
if (result != parent)
result.setParentScope(parent);
}
return result;
} else if (method != null && !isStatic) {
Scriptable result;
try {
result = (Scriptable) method.getDeclaringClass().newInstance();
} catch (IllegalAccessException e) {
throw WrappedException.wrapException(e);
} catch (InstantiationException e) {
throw WrappedException.wrapException(e);
}
result.setPrototype(getClassPrototype());
result.setParentScope(getParentScope());
Object val = call(cx, scope, result, args);
if (val != null && val != Undefined.instance &&
val instanceof Scriptable)
{
return (Scriptable) val;
}
return result;
}
return super.construct(cx, scope, args);
}
private Object callVarargs(Context cx, Scriptable thisObj, Object[] args,
boolean inNewExpr)
throws JavaScriptException
{
try {
if (parmsLength == VARARGS_METHOD) {
Object[] invokeArgs = { cx, thisObj, args, this };
Object result = method.invoke(null, invokeArgs);
return hasVoidReturn ? Undefined.instance : result;
} else {
Boolean b = inNewExpr ? Boolean.TRUE : Boolean.FALSE;
Object[] invokeArgs = { cx, args, this, b };
return (method == null)
? ctor.newInstance(invokeArgs)
: method.invoke(null, invokeArgs);
}
}
catch (InvocationTargetException e) {
Throwable target = e.getTargetException();
if (target instanceof EvaluatorException)
throw (EvaluatorException) target;
if (target instanceof EcmaError)
throw (EcmaError) target;
Scriptable scope = thisObj == null ? this : thisObj;
throw JavaScriptException.wrapException(scope, target);
}
catch (IllegalAccessException e) {
throw WrappedException.wrapException(e);
}
catch (InstantiationException e) {
throw WrappedException.wrapException(e);
}
}
boolean isVarArgsMethod() {
return parmsLength == VARARGS_METHOD;
}
boolean isVarArgsConstructor() {
return parmsLength == VARARGS_CTOR;
}
private static final short VARARGS_METHOD = -1;
private static final short VARARGS_CTOR = -2;
private static boolean sawSecurityException;
static Method[] methodsCache;
Method method;
Constructor ctor;
private Class[] types;
private short parmsLength;
private short lengthPropertyValue;
private boolean hasVoidReturn;
private boolean isStatic;
private boolean useDynamicScope;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,144 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
// API class
package org.mozilla.javascript;
import java.util.Vector;
/**
* Class ImporterTopLevel
*
* This class defines a ScriptableObject that can be instantiated
* as a top-level ("global") object to provide functionality similar
* to Java's "import" statement.
* <p>
* This class can be used to create a top-level scope using the following code:
* <pre>
* Scriptable scope = cx.initStandardObjects(new ImporterTopLevel());
* </pre>
* Then JavaScript code will have access to the following methods:
* <ul>
* <li>importClass - will "import" a class by making its unqualified name
* available as a property of the top-level scope
* <li>importPackage - will "import" all the classes of the package by
* searching for unqualified names as classes qualified
* by the given package.
* </ul>
* The following code from the shell illustrates this use:
* <pre>
* js> importClass(java.io.File)
* js> f = new File('help.txt')
* help.txt
* js> importPackage(java.util)
* js> v = new Vector()
* []
*
* @author Norris Boyd
*/
public class ImporterTopLevel extends ScriptableObject {
public ImporterTopLevel() {
String[] names = { "importClass", "importPackage" };
try {
this.defineFunctionProperties(names, ImporterTopLevel.class,
ScriptableObject.DONTENUM);
} catch (PropertyException e) {
throw new Error(); // should never happen
}
}
public String getClassName() {
return "global";
}
public Object get(String name, Scriptable start) {
Object result = super.get(name, start);
if (result == NOT_FOUND && importedPackages != null) {
for (int i=0; i < importedPackages.size(); i++) {
Object o = importedPackages.elementAt(i);
NativeJavaPackage p = (NativeJavaPackage) o;
Object v = p.getPkgProperty(name, start, false);
if (v != null && !(v instanceof NativeJavaPackage)) {
if (result == NOT_FOUND) {
result = v;
} else {
String[] args = { result.toString(), v.toString() };
throw Context.reportRuntimeError(
Context.getMessage("msg.ambig.import",
args));
}
}
}
}
return result;
}
public void importClass(Object cl) {
if (!(cl instanceof NativeJavaClass)) {
String[] args = { Context.toString(cl) };
throw Context.reportRuntimeError(
Context.getMessage("msg.not.class", args));
}
String s = ((NativeJavaClass) cl).getClassObject().getName();
String n = s.substring(s.lastIndexOf('.')+1);
Object val = this.get(n, this);
if (val != NOT_FOUND && val != cl) {
String[] args = { n };
throw Context.reportRuntimeError(
Context.getMessage("msg.prop.defined", args));
}
this.defineProperty(n, cl, DONTENUM);
}
public void importPackage(Object pkg) {
if (importedPackages == null)
importedPackages = new Vector();
if (!(pkg instanceof NativeJavaPackage)) {
String[] args = { Context.toString(pkg) };
throw Context.reportRuntimeError(
Context.getMessage("msg.not.pkg", args));
}
for (int i=0; i < importedPackages.size(); i++) {
if (pkg == importedPackages.elementAt(i))
return; // allready in list
}
importedPackages.addElement(pkg);
}
private Vector importedPackages;
}

View File

@@ -1,113 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Roger Lawrence
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.util.*;
import org.mozilla.javascript.debug.DebuggableScript;
class InterpretedFunction extends NativeFunction implements DebuggableScript {
InterpretedFunction(InterpreterData theData, Context cx)
{
itsData = theData;
init(cx);
}
void init(Context cx)
{
// probably too much copying going on from theData to the InterpretedFunction object
// should pass them as parameters - unless we need them in the data block anyway?
names = new String[itsData.itsVariableTable.size() + 1];
names[0] = itsData.itsName;
for (int i = 0; i < itsData.itsVariableTable.size(); i++)
names[i + 1] = itsData.itsVariableTable.getName(i);
argCount = (short)itsData.itsVariableTable.getParameterCount();
source = itsData.itsSource;
nestedFunctions = itsData.itsNestedFunctions;
if (cx != null)
version = (short)cx.getLanguageVersion();
}
InterpretedFunction(InterpretedFunction theOther,
Scriptable theScope, Context cx)
{
itsData = theOther.itsData;
itsClosure = theScope;
init(cx);
}
public Object call(Context cx, Scriptable scope, Scriptable thisObj,
Object[] args)
throws JavaScriptException
{
itsData.itsCX = cx;
if (itsClosure != null)
scope = itsClosure;
else if (!itsData.itsUseDynamicScope)
scope = getParentScope();
if (itsData.itsNeedsActivation)
scope = ScriptRuntime.initVarObj(cx, scope, this, thisObj, args);
itsData.itsScope = scope;
itsData.itsThisObj = thisObj;
itsData.itsInArgs = args;
return Interpreter.interpret(itsData, this);
}
public Scriptable getScriptable() {
return this;
}
public String getSourceName() {
return itsData.itsSourceFile;
}
public Enumeration getLineNumbers() {
return itsData.itsLineNumberTable.keys();
}
public boolean placeBreakpoint(int line) { // XXX throw exn?
return itsData.placeBreakpoint(line);
}
public boolean removeBreakpoint(int line) {
return itsData.removeBreakpoint(line);
}
InterpreterData itsData;
Scriptable itsClosure;
}

View File

@@ -1,96 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Roger Lawrence
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import org.mozilla.javascript.debug.*;
import java.util.*;
public class InterpretedScript extends NativeScript implements DebuggableScript {
InterpretedScript(InterpreterData theData, Context cx)
{
itsData = theData;
names = new String[itsData.itsVariableTable.size() + 1];
names[0] = "";
for (int i = 0; i < itsData.itsVariableTable.size(); i++)
names[i + 1] = itsData.itsVariableTable.getName(i);
nestedFunctions = itsData.itsNestedFunctions;
version = (short)cx.getLanguageVersion();
}
public Object exec(Context cx, Scriptable scope)
throws JavaScriptException
{
return call(cx, scope, scope, null);
}
public Object call(Context cx, Scriptable scope,
Scriptable thisObj, Object[] args)
throws JavaScriptException
{
scope = ScriptRuntime.initScript(cx, scope, this, thisObj,
itsData.itsFromEvalCode);
itsData.itsCX = cx;
itsData.itsScope = scope;
itsData.itsThisObj = thisObj;
itsData.itsInArgs = args;
return Interpreter.interpret(itsData, this);
}
public Scriptable getScriptable() {
return this;
}
public String getSourceName() {
return itsData.itsSourceFile;
}
public Enumeration getLineNumbers() {
return itsData.itsLineNumberTable.keys();
}
public boolean placeBreakpoint(int line) { // XXX throw exn?
return itsData.placeBreakpoint(line);
}
public boolean removeBreakpoint(int line) {
return itsData.removeBreakpoint(line);
}
InterpreterData itsData;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,138 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Roger Lawrence
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.util.Vector;
class InterpreterData {
static final int INITIAL_MAX_ICODE_LENGTH = 1024;
static final int INITIAL_STRINGTABLE_SIZE = 64;
static final int INITIAL_NUMBERTABLE_SIZE = 64;
InterpreterData(int lastICodeTop, int lastStringTableIndex,
int lastNumberTableIndex, Object securityDomain,
boolean useDynamicScope)
{
itsICodeTop = lastICodeTop == 0
? INITIAL_MAX_ICODE_LENGTH
: lastICodeTop * 2;
itsICode = new byte[itsICodeTop];
itsStringTable = new String[lastStringTableIndex == 0
? INITIAL_STRINGTABLE_SIZE
: lastStringTableIndex * 2];
itsNumberTable = new Number[lastNumberTableIndex == 0
? INITIAL_NUMBERTABLE_SIZE
: lastNumberTableIndex * 2];
itsUseDynamicScope = useDynamicScope;
if (securityDomain == null && Context.isSecurityDomainRequired())
throw new SecurityException("Required security context missing");
this.securityDomain = securityDomain;
}
public boolean placeBreakpoint(int line) { // XXX throw exn?
int offset = getOffset(line);
if (offset != -1 && (itsICode[offset] == TokenStream.LINE ||
itsICode[offset] == TokenStream.BREAKPOINT))
{
itsICode[offset] = (byte) TokenStream.BREAKPOINT;
return true;
}
return false;
}
public boolean removeBreakpoint(int line) {
int offset = getOffset(line);
if (offset != -1 && itsICode[offset] == TokenStream.BREAKPOINT)
{
itsICode[offset] = (byte) TokenStream.LINE;
return true;
}
return false;
}
private int getOffset(int line) {
Object offset = itsLineNumberTable.get(new Integer(line));
if (offset != null && offset instanceof Integer) {
int i = ((Integer)offset).intValue();
if (i >= 0 && i < itsICode.length)
{
return i;
}
}
return -1;
}
VariableTable itsVariableTable;
String itsName;
String itsSource;
String itsSourceFile;
boolean itsNeedsActivation;
boolean itsFromEvalCode;
boolean itsUseDynamicScope;
byte itsFunctionType;
String[] itsStringTable;
int itsStringTableIndex;
Number[] itsNumberTable;
int itsNumberTableIndex;
InterpretedFunction[] itsNestedFunctions;
Object[] itsRegExpLiterals;
byte[] itsICode;
int itsICodeTop;
int itsMaxLocals;
int itsMaxArgs;
int itsMaxStack;
int itsMaxTryDepth;
java.util.Hashtable itsLineNumberTable;
Object securityDomain;
Context itsCX;
Scriptable itsScope;
Scriptable itsThisObj;
Object[] itsInArgs;
}

View File

@@ -1,77 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.util.Vector;
import org.mozilla.javascript.debug.*;
class InterpreterFrame implements Frame {
InterpreterFrame(Scriptable scope, InterpreterData data, Scriptable obj) {
this.scope = scope;
this.data = data;
this.lineNumber = -1;
this.obj = obj;
}
public Scriptable getVariableObject() {
return scope;
}
public String getSourceName() {
return data.itsSourceFile;
}
public void setLineNumber(int lineNumber) {
this.lineNumber = lineNumber;
}
public int getLineNumber() {
return lineNumber;
}
public DebuggableScript getScript() {
if (obj instanceof DebuggableScript)
return (DebuggableScript) obj;
return null;
}
private Scriptable scope;
private InterpreterData data;
private Scriptable obj;
private int lineNumber;
}

View File

@@ -1,849 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Patrick Beard
* Norris Boyd
* Mike McCabe
* Matthias Radestock
* Andi Vajda
* Andrew Wason
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import org.mozilla.classfile.*;
import java.lang.reflect.*;
import java.io.*;
import java.util.*;
public class JavaAdapter extends ScriptableObject {
public boolean equals(Object obj) {
return super.equals(obj);
}
public String getClassName() {
return "JavaAdapter";
}
public static Object convertResult(Object result, String classname)
throws ClassNotFoundException
{
Class c = ScriptRuntime.loadClassName(classname);
if (result == Undefined.instance &&
(c != ScriptRuntime.ObjectClass &&
c != ScriptRuntime.StringClass))
{
// Avoid an error for an undefined value; return null instead.
return null;
}
return NativeJavaObject.coerceType(c, result);
}
public static Object js_JavaAdapter(Context cx, Object[] args,
Function ctorObj, boolean inNewExpr)
throws InstantiationException, NoSuchMethodException,
IllegalAccessException, InvocationTargetException,
ClassNotFoundException
{
Class superClass = Object.class;
Class[] intfs = new Class[args.length-1];
int interfaceCount = 0;
for (int i=0; i < args.length-1; i++) {
if (!(args[i] instanceof NativeJavaClass)) {
// TODO: report error
throw new RuntimeException("expected java class object");
}
Class c = ((NativeJavaClass) args[i]).getClassObject();
if (!c.isInterface()) {
superClass = c;
break;
}
intfs[interfaceCount++] = c;
}
Class[] interfaces = new Class[interfaceCount];
System.arraycopy(intfs, 0, interfaces, 0, interfaceCount);
Scriptable obj = (Scriptable) args[args.length - 1];
ClassSignature sig = new ClassSignature(superClass, interfaces, obj);
Class adapterClass = (Class) generatedClasses.get(sig);
if (adapterClass == null) {
String adapterName = "adapter" + serial++;
adapterClass = createAdapterClass(cx, obj, adapterName,
superClass, interfaces,
null, null);
generatedClasses.put(sig, adapterClass);
}
Class[] ctorParms = { Scriptable.class };
Object[] ctorArgs = { obj };
Object v = adapterClass.getConstructor(ctorParms).newInstance(ctorArgs);
return cx.toObject(v, ScriptableObject.getTopLevelScope(ctorObj));
}
public static Class createAdapterClass(Context cx, Scriptable jsObj,
String adapterName, Class superClass,
Class[] interfaces,
String scriptClassName,
ClassNameHelper nameHelper)
throws ClassNotFoundException
{
ClassFileWriter cfw = new ClassFileWriter(adapterName,
superClass.getName(),
"<adapter>");
cfw.addField("self", "Lorg/mozilla/javascript/Scriptable;",
(short) (ClassFileWriter.ACC_PUBLIC |
ClassFileWriter.ACC_FINAL));
int interfacesCount = interfaces == null ? 0 : interfaces.length;
for (int i=0; i < interfacesCount; i++) {
if (interfaces[i] != null)
cfw.addInterface(interfaces[i].getName());
}
String superName = superClass.getName().replace('.', '/');
generateCtor(cfw, adapterName, superName);
if (scriptClassName != null)
generateEmptyCtor(cfw, adapterName, superName, scriptClassName);
Hashtable generatedOverrides = new Hashtable();
Hashtable generatedMethods = new Hashtable();
// generate methods to satisfy all specified interfaces.
for (int i = 0; i < interfacesCount; i++) {
Method[] methods = interfaces[i].getMethods();
for (int j = 0; j < methods.length; j++) {
Method method = methods[j];
int mods = method.getModifiers();
if (Modifier.isStatic(mods) || Modifier.isFinal(mods))
continue;
// make sure to generate only one instance of a particular
// method/signature.
String methodName = method.getName();
String methodKey = methodName + getMethodSignature(method);
if (! generatedOverrides.containsKey(methodKey)) {
generateMethod(cfw, adapterName, methodName,
method.getParameterTypes(),
method.getReturnType());
generatedOverrides.put(methodKey, Boolean.TRUE);
generatedMethods.put(methodName, Boolean.TRUE);
}
}
}
// Now, go through the superclasses methods, checking for abstract
// methods or additional methods to override.
// generate any additional overrides that the object might contain.
Method[] methods = superClass.getMethods();
for (int j = 0; j < methods.length; j++) {
Method method = methods[j];
int mods = method.getModifiers();
if (Modifier.isStatic(mods) || Modifier.isFinal(mods))
continue;
// if a method is marked abstract, must implement it or the
// resulting class won't be instantiable. otherwise, if the object
// has a property of the same name, then an override is intended.
boolean isAbstractMethod = Modifier.isAbstract(mods);
if (isAbstractMethod ||
(jsObj != null && jsObj.has(method.getName(), jsObj)))
{
// make sure to generate only one instance of a particular
// method/signature.
String methodName = method.getName();
String methodSignature = getMethodSignature(method);
String methodKey = methodName + methodSignature;
if (! generatedOverrides.containsKey(methodKey)) {
generateMethod(cfw, adapterName, methodName,
method.getParameterTypes(),
method.getReturnType());
generatedOverrides.put(methodKey, Boolean.TRUE);
generatedMethods.put(methodName, Boolean.TRUE);
}
// if a method was overridden, generate a "super$method"
// which lets the delegate call the superclass' version.
if (!isAbstractMethod) {
generateSuper(cfw, adapterName, superName,
methodName, methodSignature,
method.getParameterTypes(),
method.getReturnType());
}
}
}
// Generate Java methods, fields for remaining properties that
// are not overrides.
Object[] ids = jsObj.getIds();
for (int j=0; j < ids.length; j++) {
if (!(ids[j] instanceof String))
continue;
String id = (String) ids[j];
if (generatedMethods.containsKey(id))
continue;
Object f = jsObj.get(id, jsObj);
int length;
if (f instanceof Scriptable) {
Scriptable p = (Scriptable) f;
if (!(p instanceof Function))
continue;
length = (int) Context.toNumber(
ScriptableObject.getProperty(p, "length"));
} else if (f instanceof FunctionNode) {
length = ((FunctionNode) f).getVariableTable().getParameterCount();
} else {
continue;
}
Class[] parms = new Class[length];
for (int k=0; k < length; k++)
parms[k] = Object.class;
generateMethod(cfw, adapterName, id, parms, Object.class);
}
ByteArrayOutputStream out = new ByteArrayOutputStream(512);
try {
cfw.write(out);
}
catch (IOException ioe) {
throw new RuntimeException("unexpected IOException");
}
byte[] bytes = out.toByteArray();
if (nameHelper != null)
{
if (nameHelper.getGeneratingDirectory() != null) {
try {
int lastDot = adapterName.lastIndexOf('.');
if (lastDot != -1)
adapterName = adapterName.substring(lastDot+1);
String filename = nameHelper.getTargetClassFileName(adapterName);
FileOutputStream file = new FileOutputStream(filename);
file.write(bytes);
file.close();
}
catch (IOException iox) {
throw WrappedException.wrapException(iox);
}
return null;
} else {
try {
ClassOutput classOutput = nameHelper.getClassOutput();
if (classOutput != null) {
OutputStream cOut =
classOutput.getOutputStream(adapterName);
cOut.write(bytes);
cOut.close();
}
} catch (IOException iox) {
throw WrappedException.wrapException(iox);
}
}
}
SecuritySupport ss = cx.getSecuritySupport();
if (ss != null) {
Object securityDomain = cx.getSecurityDomainForStackDepth(-1);
return ss.defineClass(adapterName, bytes, securityDomain);
} else {
if (classLoader == null)
classLoader = new MyClassLoader();
classLoader.defineClass(adapterName, bytes);
return classLoader.loadClass(adapterName, true);
}
}
/**
* Utility method, which dynamically binds a Context to the current thread,
* if none already exists.
*/
public static Object callMethod(Scriptable object, String methodId,
Object[] args)
{
if (object.has(methodId, object)) {
try {
Context cx = Context.enter();
Object fun = object.get(methodId, object);
return ScriptRuntime.call(cx, fun, object, args, object);
} catch (JavaScriptException ex) {
// TODO: could occur
} finally {
Context.exit();
}
}
return Context.getUndefinedValue();
}
public static Scriptable toObject(Object value, Scriptable scope,
Class staticType)
{
Context.enter();
try {
return Context.toObject(value, scope, staticType);
} finally {
Context.exit();
}
}
private static void generateCtor(ClassFileWriter cfw, String adapterName,
String superName)
{
cfw.startMethod("<init>",
"(Lorg/mozilla/javascript/Scriptable;)V",
ClassFileWriter.ACC_PUBLIC);
// Invoke base class constructor
cfw.add(ByteCode.ALOAD_0); // this
cfw.add(ByteCode.INVOKESPECIAL, superName, "<init>", "()", "V");
// Save parameter in instance variable "self"
cfw.add(ByteCode.ALOAD_0); // this
cfw.add(ByteCode.ALOAD_1); // first arg
cfw.add(ByteCode.PUTFIELD, adapterName, "self",
"Lorg/mozilla/javascript/Scriptable;");
// Set the prototype of the js object to be a LiveConnect
// wrapper of the generated class's object
cfw.add(ByteCode.ALOAD_1); // first arg
cfw.add(ByteCode.ALOAD_0); // this
cfw.add(ByteCode.INVOKESTATIC,
"org/mozilla/javascript/ScriptRuntime",
"setAdapterProto",
"(Lorg/mozilla/javascript/Scriptable;" +
"Ljava/lang/Object;)",
"V");
cfw.add(ByteCode.RETURN);
cfw.stopMethod((short)20, null); // TODO: magic number "20"
}
private static void generateEmptyCtor(ClassFileWriter cfw, String adapterName,
String superName, String scriptClassName)
{
cfw.startMethod("<init>", "()V", ClassFileWriter.ACC_PUBLIC);
// Invoke base class constructor
cfw.add(ByteCode.ALOAD_0); // this
cfw.add(ByteCode.INVOKESPECIAL, superName, "<init>", "()", "V");
// Load script class
cfw.add(ByteCode.NEW, scriptClassName);
cfw.add(ByteCode.DUP);
cfw.add(ByteCode.INVOKESPECIAL, scriptClassName, "<init>", "()", "V");
// Run script and save resulting scope
cfw.add(ByteCode.INVOKESTATIC,
"org/mozilla/javascript/ScriptRuntime",
"runScript",
"(Lorg/mozilla/javascript/Script;)",
"Lorg/mozilla/javascript/Scriptable;");
cfw.add(ByteCode.ASTORE_1);
// Save the Scriptable in instance variable "self"
cfw.add(ByteCode.ALOAD_0); // this
cfw.add(ByteCode.ALOAD_1); // the Scriptable
cfw.add(ByteCode.PUTFIELD, adapterName, "self",
"Lorg/mozilla/javascript/Scriptable;");
// Set the prototype of the js object to be a LiveConnect
// wrapper of the generated class's object
cfw.add(ByteCode.ALOAD_1); // the Scriptable
cfw.add(ByteCode.ALOAD_0); // this
cfw.add(ByteCode.INVOKESTATIC,
"org/mozilla/javascript/ScriptRuntime",
"setAdapterProto",
"(Lorg/mozilla/javascript/Scriptable;" +
"Ljava/lang/Object;)",
"V");
cfw.add(ByteCode.RETURN);
cfw.stopMethod((short)20, null); // TODO: magic number "20"
}
/**
* Generates code to create a java.lang.Boolean, java.lang.Character or a
* java.lang.Double to wrap the specified primitive parameter. Leaves the
* wrapper object on the top of the stack.
*/
private static int generateWrapParam(ClassFileWriter cfw, int paramOffset,
Class paramType)
{
if (paramType.equals(Boolean.TYPE)) {
// wrap boolean values with java.lang.Boolean.
cfw.add(ByteCode.NEW, "java/lang/Boolean");
cfw.add(ByteCode.DUP);
cfw.add(ByteCode.ILOAD, paramOffset++);
cfw.add(ByteCode.INVOKESPECIAL, "java/lang/Boolean",
"<init>", "(Z)", "V");
} else
if (paramType.equals(Character.TYPE)) {
// Create a string of length 1 using the character parameter.
cfw.add(ByteCode.NEW, "java/lang/String");
cfw.add(ByteCode.DUP);
cfw.add(ByteCode.ICONST_1);
cfw.add(ByteCode.NEWARRAY, ByteCode.T_CHAR);
cfw.add(ByteCode.DUP);
cfw.add(ByteCode.ICONST_0);
cfw.add(ByteCode.ILOAD, paramOffset++);
cfw.add(ByteCode.CASTORE);
cfw.add(ByteCode.INVOKESPECIAL, "java/lang/String",
"<init>", "([C)", "V");
} else {
// convert all numeric values to java.lang.Double.
cfw.add(ByteCode.NEW, "java/lang/Double");
cfw.add(ByteCode.DUP);
String typeName = paramType.getName();
switch (typeName.charAt(0)) {
case 'b':
case 's':
case 'i':
// load an int value, convert to double.
cfw.add(ByteCode.ILOAD, paramOffset++);
cfw.add(ByteCode.I2D);
break;
case 'l':
// load a long, convert to double.
cfw.add(ByteCode.LLOAD, paramOffset);
cfw.add(ByteCode.L2D);
paramOffset += 2;
break;
case 'f':
// load a float, convert to double.
cfw.add(ByteCode.FLOAD, paramOffset++);
cfw.add(ByteCode.F2D);
break;
case 'd':
cfw.add(ByteCode.DLOAD, paramOffset);
paramOffset += 2;
break;
}
cfw.add(ByteCode.INVOKESPECIAL, "java/lang/Double",
"<init>", "(D)", "V");
}
return paramOffset;
}
/**
* Generates code to convert a wrapped value type to a primitive type.
* Handles unwrapping java.lang.Boolean, and java.lang.Number types.
* May need to map between char and java.lang.String as well.
* Generates the appropriate RETURN bytecode.
*/
private static void generateReturnResult(ClassFileWriter cfw,
Class retType)
{
// wrap boolean values with java.lang.Boolean, convert all other
// primitive values to java.lang.Double.
if (retType.equals(Boolean.TYPE)) {
cfw.add(ByteCode.INVOKESTATIC,
"org/mozilla/javascript/Context",
"toBoolean", "(Ljava/lang/Object;)",
"Z");
cfw.add(ByteCode.IRETURN);
} else if (retType.equals(Character.TYPE)) {
// characters are represented as strings in JavaScript.
// return the first character.
// first convert the value to a string if possible.
cfw.add(ByteCode.INVOKESTATIC,
"org/mozilla/javascript/Context",
"toString", "(Ljava/lang/Object;)",
"Ljava/lang/String;");
cfw.add(ByteCode.ICONST_0);
cfw.add(ByteCode.INVOKEVIRTUAL, "java/lang/String", "charAt",
"(I)", "C");
cfw.add(ByteCode.IRETURN);
} else if (retType.isPrimitive()) {
cfw.add(ByteCode.INVOKESTATIC,
"org/mozilla/javascript/Context",
"toNumber", "(Ljava/lang/Object;)",
"D");
String typeName = retType.getName();
switch (typeName.charAt(0)) {
case 'b':
case 's':
case 'i':
cfw.add(ByteCode.D2I);
cfw.add(ByteCode.IRETURN);
break;
case 'l':
cfw.add(ByteCode.D2L);
cfw.add(ByteCode.LRETURN);
break;
case 'f':
cfw.add(ByteCode.D2F);
cfw.add(ByteCode.FRETURN);
break;
case 'd':
cfw.add(ByteCode.DRETURN);
break;
default:
throw new RuntimeException("Unexpected return type " +
retType.toString());
}
} else {
String retTypeStr = retType.getName();
cfw.addLoadConstant(retTypeStr);
cfw.add(ByteCode.INVOKESTATIC,
"org/mozilla/javascript/JavaAdapter",
"convertResult",
"(Ljava/lang/Object;" +
"Ljava/lang/String;)",
"Ljava/lang/Object;");
// Now cast to return type
cfw.add(ByteCode.CHECKCAST, retTypeStr.replace('.', '/'));
cfw.add(ByteCode.ARETURN);
}
}
private static void generateMethod(ClassFileWriter cfw, String genName,
String methodName, Class[] parms,
Class returnType)
{
StringBuffer sb = new StringBuffer();
sb.append('(');
short arrayLocal = 1; // includes this.
for (int i = 0; i < parms.length; i++) {
Class type = parms[i];
appendTypeString(sb, type);
if (type.equals(Long.TYPE) || type.equals(Double.TYPE))
arrayLocal += 2;
else
arrayLocal += 1;
}
sb.append(')');
appendTypeString(sb, returnType);
String methodSignature = sb.toString();
// System.out.println("generating " + m.getName() + methodSignature);
// System.out.flush();
cfw.startMethod(methodName, methodSignature,
ClassFileWriter.ACC_PUBLIC);
cfw.add(ByteCode.BIPUSH, (byte) parms.length); // > 255 parms?
cfw.add(ByteCode.ANEWARRAY, "java/lang/Object");
cfw.add(ByteCode.ASTORE, arrayLocal);
// allocate a local variable to store the scope used to wrap native objects.
short scopeLocal = (short) (arrayLocal + 1);
boolean loadedScope = false;
int paramOffset = 1;
for (int i = 0; i < parms.length; i++) {
cfw.add(ByteCode.ALOAD, arrayLocal);
cfw.add(ByteCode.BIPUSH, i);
if (parms[i].isPrimitive()) {
paramOffset = generateWrapParam(cfw, paramOffset, parms[i]);
} else {
// An arbitary Java object; call Context.toObject to wrap in
// a Scriptable object
cfw.add(ByteCode.ALOAD, paramOffset++);
if (! loadedScope) {
// load this.self into a local the first time it's needed.
// it will provide the scope needed by Context.toObject().
cfw.add(ByteCode.ALOAD_0);
cfw.add(ByteCode.GETFIELD, genName, "self",
"Lorg/mozilla/javascript/Scriptable;");
cfw.add(ByteCode.ASTORE, scopeLocal);
loadedScope = true;
}
cfw.add(ByteCode.ALOAD, scopeLocal);
// Get argument Class
cfw.addLoadConstant(parms[i].getName());
cfw.add(ByteCode.INVOKESTATIC,
"org/mozilla/javascript/ScriptRuntime",
"loadClassName",
"(Ljava/lang/String;)",
"Ljava/lang/Class;");
cfw.add(ByteCode.INVOKESTATIC,
"org/mozilla/javascript/JavaAdapter",
"toObject",
"(Ljava/lang/Object;" +
"Lorg/mozilla/javascript/Scriptable;" +
"Ljava/lang/Class;)",
"Lorg/mozilla/javascript/Scriptable;");
}
cfw.add(ByteCode.AASTORE);
}
cfw.add(ByteCode.ALOAD_0); // this
cfw.add(ByteCode.GETFIELD, genName, "self",
"Lorg/mozilla/javascript/Scriptable;");
cfw.addLoadConstant(methodName);
cfw.add(ByteCode.ALOAD, arrayLocal);
// go through utility method, which creates a Context to run the
// method in.
cfw.add(ByteCode.INVOKESTATIC,
"org/mozilla/javascript/JavaAdapter",
"callMethod",
"(Lorg/mozilla/javascript/Scriptable;" +
"Ljava/lang/String;[Ljava/lang/Object;)",
"Ljava/lang/Object;");
Class retType = returnType;
if (retType.equals(Void.TYPE)) {
cfw.add(ByteCode.POP);
cfw.add(ByteCode.RETURN);
} else {
generateReturnResult(cfw, retType);
}
cfw.stopMethod((short)(scopeLocal + 1), null);
}
/**
* Generates code to push typed parameters onto the operand stack
* prior to a direct Java method call.
*/
private static int generatePushParam(ClassFileWriter cfw, int paramOffset,
Class paramType)
{
String typeName = paramType.getName();
switch (typeName.charAt(0)) {
case 'z':
case 'b':
case 'c':
case 's':
case 'i':
// load an int value, convert to double.
cfw.add(ByteCode.ILOAD, paramOffset++);
break;
case 'l':
// load a long, convert to double.
cfw.add(ByteCode.LLOAD, paramOffset);
paramOffset += 2;
break;
case 'f':
// load a float, convert to double.
cfw.add(ByteCode.FLOAD, paramOffset++);
break;
case 'd':
cfw.add(ByteCode.DLOAD, paramOffset);
paramOffset += 2;
break;
}
return paramOffset;
}
/**
* Generates code to return a Java type, after calling a Java method
* that returns the same type.
* Generates the appropriate RETURN bytecode.
*/
private static void generatePopResult(ClassFileWriter cfw,
Class retType)
{
if (retType.isPrimitive()) {
String typeName = retType.getName();
switch (typeName.charAt(0)) {
case 'b':
case 'c':
case 's':
case 'i':
case 'z':
cfw.add(ByteCode.IRETURN);
break;
case 'l':
cfw.add(ByteCode.LRETURN);
break;
case 'f':
cfw.add(ByteCode.FRETURN);
break;
case 'd':
cfw.add(ByteCode.DRETURN);
break;
}
} else {
cfw.add(ByteCode.ARETURN);
}
}
/**
* Generates a method called "super$methodName()" which can be called
* from JavaScript that is equivalent to calling "super.methodName()"
* from Java. Eventually, this may be supported directly in JavaScript.
*/
private static void generateSuper(ClassFileWriter cfw,
String genName, String superName,
String methodName, String methodSignature,
Class[] parms, Class returnType)
{
cfw.startMethod("super$" + methodName, methodSignature,
ClassFileWriter.ACC_PUBLIC);
// push "this"
cfw.add(ByteCode.ALOAD, 0);
// push the rest of the parameters.
int paramOffset = 1;
for (int i = 0; i < parms.length; i++) {
if (parms[i].isPrimitive()) {
paramOffset = generatePushParam(cfw, paramOffset, parms[i]);
} else {
cfw.add(ByteCode.ALOAD, paramOffset++);
}
}
// split the method signature at the right parentheses.
int rightParen = methodSignature.indexOf(')');
// call the superclass implementation of the method.
cfw.add(ByteCode.INVOKESPECIAL,
superName,
methodName,
methodSignature.substring(0, rightParen + 1),
methodSignature.substring(rightParen + 1));
// now, handle the return type appropriately.
Class retType = returnType;
if (!retType.equals(Void.TYPE)) {
generatePopResult(cfw, retType);
} else {
cfw.add(ByteCode.RETURN);
}
cfw.stopMethod((short)(paramOffset + 1), null);
}
/**
* Returns a fully qualified method name concatenated with its signature.
*/
private static String getMethodSignature(Method method) {
Class[] parms = method.getParameterTypes();
StringBuffer sb = new StringBuffer();
sb.append('(');
for (int i = 0; i < parms.length; i++) {
Class type = parms[i];
appendTypeString(sb, type);
}
sb.append(')');
appendTypeString(sb, method.getReturnType());
return sb.toString();
}
private static StringBuffer appendTypeString(StringBuffer sb, Class type)
{
while (type.isArray()) {
sb.append('[');
type = type.getComponentType();
}
if (type.isPrimitive()) {
if (type.equals(Boolean.TYPE)) {
sb.append('Z');
} else
if (type.equals(Long.TYPE)) {
sb.append('J');
} else {
String typeName = type.getName();
sb.append(Character.toUpperCase(typeName.charAt(0)));
}
} else {
sb.append('L');
sb.append(type.getName().replace('.', '/'));
sb.append(';');
}
return sb;
}
static final class MyClassLoader extends ClassLoader {
public Class defineClass(String name, byte data[]) {
return super.defineClass(name, data, 0, data.length);
}
protected Class loadClass(String name, boolean resolve)
throws ClassNotFoundException
{
Class clazz = findLoadedClass(name);
if (clazz == null) {
ClassLoader loader = getClass().getClassLoader();
try {
if (loader != null)
return loader.loadClass(name);
clazz = findSystemClass(name);
} catch (ClassNotFoundException e) {
return ScriptRuntime.loadClassName(name);
}
}
if (resolve)
resolveClass(clazz);
return clazz;
}
}
/**
* Provides a key with which to distinguish previously generated
* adapter classes stored in a hash table.
*/
static class ClassSignature {
Class mSuperClass;
Class[] mInterfaces;
Object[] mProperties;
ClassSignature(Class superClass, Class[] interfaces, Scriptable jsObj) {
mSuperClass = superClass;
mInterfaces = interfaces;
mProperties = jsObj.getIds();
}
public boolean equals(Object obj) {
if (obj instanceof ClassSignature) {
ClassSignature sig = (ClassSignature) obj;
if (mSuperClass == sig.mSuperClass) {
Class[] interfaces = sig.mInterfaces;
if (mInterfaces != interfaces) {
if (mInterfaces == null || interfaces == null)
return false;
if (mInterfaces.length != interfaces.length)
return false;
for (int i = 0; i < interfaces.length; i++)
if (mInterfaces[i] != interfaces[i])
return false;
}
Object[] properties = sig.mProperties;
if (mProperties.length != properties.length)
return false;
for (int i = 0; i < properties.length; i++)
if (!mProperties[i].equals(properties[i]))
return false;
return true;
}
}
return false;
}
public int hashCode() {
return mSuperClass.hashCode();
}
}
private static int serial;
private static MyClassLoader classLoader;
private static Hashtable generatedClasses = new Hashtable(7);
}

View File

@@ -1,595 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Frank Mitchell
* Mike Shaver
* Kurt Westerfeld
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.lang.reflect.*;
import java.util.Hashtable;
import java.util.Enumeration;
/**
*
* @author Mike Shaver
* @author Norris Boyd
* @see NativeJavaObject
* @see NativeJavaClass
*/
class JavaMembers {
JavaMembers(Scriptable scope, Class cl) {
this.members = new Hashtable(23);
this.staticMembers = new Hashtable(7);
this.cl = cl;
reflect(scope, cl);
}
boolean has(String name, boolean isStatic) {
Hashtable ht = isStatic ? staticMembers : members;
Object obj = ht.get(name);
if (obj != null) {
return true;
} else {
Member member = this.findExplicitFunction(name, isStatic);
return member != null;
}
}
Object get(Scriptable scope, String name, Object javaObject,
boolean isStatic)
{
Hashtable ht = isStatic ? staticMembers : members;
Object member = ht.get(name);
if (!isStatic && member == null) {
// Try to get static member from instance (LC3)
member = staticMembers.get(name);
}
if (member == null) {
member = this.getExplicitFunction(scope, name,
javaObject, isStatic);
if (member == null)
return Scriptable.NOT_FOUND;
}
if (member instanceof Scriptable)
return member; // why is this here?
Object rval;
Class type;
try {
if (member instanceof BeanProperty) {
BeanProperty bp = (BeanProperty) member;
rval = bp.getter.invoke(javaObject, ScriptRuntime.emptyArgs);
type = bp.getter.getReturnType();
} else {
Field field = (Field) member;
rval = field.get(isStatic ? null : javaObject);
type = field.getType();
}
} catch (IllegalAccessException accEx) {
throw new RuntimeException("unexpected IllegalAccessException "+
"accessing Java field");
} catch (InvocationTargetException e) {
throw new WrappedException(e.getTargetException());
}
// Need to wrap the object before we return it.
scope = ScriptableObject.getTopLevelScope(scope);
return NativeJavaObject.wrap(scope, rval, type);
}
Member findExplicitFunction(String name, boolean isStatic) {
Hashtable ht = isStatic ? staticMembers : members;
int sigStart = name.indexOf('(');
Member[] methodsOrCtors = null;
NativeJavaMethod method = null;
boolean isCtor = (isStatic && sigStart == 0);
if (isCtor) {
// Explicit request for an overloaded constructor
methodsOrCtors = ctors;
}
else if (sigStart > 0) {
// Explicit request for an overloaded method
String trueName = name.substring(0,sigStart);
Object obj = ht.get(trueName);
if (!isStatic && obj == null) {
// Try to get static member from instance (LC3)
obj = staticMembers.get(trueName);
}
if (obj != null && obj instanceof NativeJavaMethod) {
method = (NativeJavaMethod)obj;
methodsOrCtors = method.getMethods();
}
}
if (methodsOrCtors != null) {
for (int i = 0; i < methodsOrCtors.length; i++) {
String nameWithSig =
NativeJavaMethod.signature(methodsOrCtors[i]);
if (name.equals(nameWithSig)) {
return methodsOrCtors[i];
}
}
}
return null;
}
Object getExplicitFunction(Scriptable scope, String name,
Object javaObject, boolean isStatic)
{
Hashtable ht = isStatic ? staticMembers : members;
Object member = null;
Member methodOrCtor = this.findExplicitFunction(name, isStatic);
if (methodOrCtor != null) {
Scriptable prototype =
ScriptableObject.getFunctionPrototype(scope);
if (methodOrCtor instanceof Constructor) {
NativeJavaConstructor fun =
new NativeJavaConstructor((Constructor)methodOrCtor);
fun.setPrototype(prototype);
member = fun;
ht.put(name, fun);
} else {
String trueName = methodOrCtor.getName();
member = ht.get(trueName);
if (member instanceof NativeJavaMethod &&
((NativeJavaMethod)member).getMethods().length > 1 ) {
NativeJavaMethod fun =
new NativeJavaMethod((Method)methodOrCtor, name);
fun.setPrototype(prototype);
ht.put(name, fun);
member = fun;
}
}
}
return member;
}
public void put(String name, Object javaObject, Object value,
boolean isStatic)
{
Hashtable ht = isStatic ? staticMembers : members;
Object member = ht.get(name);
if (!isStatic && member == null) {
// Try to get static member from instance (LC3)
member = staticMembers.get(name);
}
if (member == null)
throw reportMemberNotFound(name);
if (member instanceof FieldAndMethods) {
FieldAndMethods fam = (FieldAndMethods) ht.get(name);
member = fam.getField();
}
// Is this a bean property "set"?
if (member instanceof BeanProperty) {
try {
Method method = ((BeanProperty) member).setter;
if (method == null)
throw reportMemberNotFound(name);
Class[] types = method.getParameterTypes();
Object[] params = { NativeJavaObject.coerceType(types[0], value) };
method.invoke(javaObject, params);
} catch (IllegalAccessException accessEx) {
throw new RuntimeException("unexpected IllegalAccessException " +
"accessing Java field");
} catch (InvocationTargetException e) {
throw new WrappedException(e.getTargetException());
}
}
else {
Field field = null;
try {
field = (Field) member;
if (field == null) {
Object[] args = {name};
throw Context.reportRuntimeError(
Context.getMessage("msg.java.internal.private", args));
}
field.set(javaObject, NativeJavaObject.coerceType(field.getType(),
value));
} catch (ClassCastException e) {
Object errArgs[] = { name };
throw Context.reportRuntimeError(Context.getMessage
("msg.java.method.assign",
errArgs));
} catch (IllegalAccessException accessEx) {
throw new RuntimeException("unexpected IllegalAccessException "+
"accessing Java field");
} catch (IllegalArgumentException argEx) {
Object errArgs[] = { value.getClass().getName(), field,
javaObject.getClass().getName() };
throw Context.reportRuntimeError(Context.getMessage(
"msg.java.internal.field.type", errArgs));
}
}
}
Object[] getIds(boolean isStatic) {
Hashtable ht = isStatic ? staticMembers : members;
int len = ht.size();
Object[] result = new Object[len];
Enumeration keys = ht.keys();
for (int i=0; i < len; i++)
result[i] = keys.nextElement();
return result;
}
Class getReflectedClass() {
return cl;
}
void reflectField(Scriptable scope, Field field) {
int mods = field.getModifiers();
if (!Modifier.isPublic(mods))
return;
boolean isStatic = Modifier.isStatic(mods);
Hashtable ht = isStatic ? staticMembers : members;
String name = field.getName();
Object member = ht.get(name);
if (member != null) {
if (member instanceof NativeJavaMethod) {
NativeJavaMethod method = (NativeJavaMethod) member;
FieldAndMethods fam = new FieldAndMethods(method.getMethods(),
field,
null);
fam.setPrototype(ScriptableObject.getFunctionPrototype(scope));
getFieldAndMethodsTable(isStatic).put(name, fam);
ht.put(name, fam);
return;
}
if (member instanceof Field) {
Field oldField = (Field) member;
// If this newly reflected field shadows an inherited field,
// then replace it. Otherwise, since access to the field
// would be ambiguous from Java, no field should be reflected.
// For now, the first field found wins, unless another field
// explicitly shadows it.
if (oldField.getDeclaringClass().isAssignableFrom(field.getDeclaringClass()))
ht.put(name, field);
return;
}
throw new RuntimeException("unknown member type");
}
ht.put(name, field);
}
void reflectMethod(Scriptable scope, Method method) {
int mods = method.getModifiers();
if (!Modifier.isPublic(mods))
return;
boolean isStatic = Modifier.isStatic(mods);
Hashtable ht = isStatic ? staticMembers : members;
String name = method.getName();
NativeJavaMethod fun = (NativeJavaMethod) ht.get(name);
if (fun == null) {
fun = new NativeJavaMethod();
if (scope != null)
fun.setPrototype(ScriptableObject.getFunctionPrototype(scope));
ht.put(name, fun);
fun.add(method);
} else {
fun.add(method);
}
}
void reflect(Scriptable scope, Class cl) {
// We reflect methods first, because we want overloaded field/method
// names to be allocated to the NativeJavaMethod before the field
// gets in the way.
Method[] methods = cl.getMethods();
for (int i = 0; i < methods.length; i++)
reflectMethod(scope, methods[i]);
Field[] fields = cl.getFields();
for (int i = 0; i < fields.length; i++)
reflectField(scope, fields[i]);
makeBeanProperties(scope, false);
makeBeanProperties(scope, true);
ctors = cl.getConstructors();
}
Hashtable getFieldAndMethodsTable(boolean isStatic) {
Hashtable fmht = isStatic ? staticFieldAndMethods
: fieldAndMethods;
if (fmht == null) {
fmht = new Hashtable(11);
if (isStatic)
staticFieldAndMethods = fmht;
else
fieldAndMethods = fmht;
}
return fmht;
}
void makeBeanProperties(Scriptable scope, boolean isStatic) {
Hashtable ht = isStatic ? staticMembers : members;
Hashtable toAdd = new Hashtable();
// Now, For each member, make "bean" properties.
for (Enumeration e = ht.keys(); e.hasMoreElements(); ) {
// Is this a getter?
String name = (String) e.nextElement();
boolean memberIsGetMethod = name.startsWith("get");
boolean memberIsIsMethod = name.startsWith("is");
if (memberIsGetMethod || memberIsIsMethod) {
// Double check name component.
String nameComponent = name.substring(memberIsGetMethod ? 3 : 2);
if (nameComponent.length() == 0)
continue;
// Make the bean property name.
String beanPropertyName = nameComponent;
if (nameComponent.length() > 1 &&
Character.isUpperCase(nameComponent.charAt(0)) &&
!Character.isUpperCase(nameComponent.charAt(1)))
{
beanPropertyName = Character.toLowerCase(nameComponent.charAt(0)) +
nameComponent.substring(1);
}
// If we already have a member by this name, don't do this
// property.
if (ht.containsKey(beanPropertyName))
continue;
// Get the method by this name.
Object method = ht.get(name);
if (!(method instanceof NativeJavaMethod))
continue;
NativeJavaMethod getJavaMethod = (NativeJavaMethod) method;
// Grab and inspect the getter method; does it have an empty parameter list,
// with a return value (eg. a getSomething() or isSomething())?
Class[] params;
Method[] getMethods = getJavaMethod.getMethods();
Class type;
if (getMethods != null &&
getMethods.length == 1 &&
(type = getMethods[0].getReturnType()) != null &&
(params = getMethods[0].getParameterTypes()) != null &&
params.length == 0)
{
// Make sure the method static-ness is preserved for this property.
if (isStatic && !Modifier.isStatic(getMethods[0].getModifiers()))
continue;
// We have a getter. Now, do we have a setter?
Method setMethod = null;
String setter = "set" + nameComponent;
if (ht.containsKey(setter)) {
// Is this value a method?
method = ht.get(setter);
if (method instanceof NativeJavaMethod) {
//
// Note: it may be preferable to allow NativeJavaMethod.findFunction()
// to find the appropriate setter; unfortunately, it requires an
// instance of the target arg to determine that.
//
// Make two passes: one to find a method with direct type assignment,
// and one to find a widening conversion.
NativeJavaMethod setJavaMethod = (NativeJavaMethod) method;
Method[] setMethods = setJavaMethod.getMethods();
for (int pass = 1; pass <= 2 && setMethod == null; ++pass) {
for (int i = 0; i < setMethods.length; ++i) {
if (setMethods[i].getReturnType() == void.class &&
(!isStatic || Modifier.isStatic(setMethods[i].getModifiers())) &&
(params = setMethods[i].getParameterTypes()) != null &&
params.length == 1 ) {
if ((pass == 1 && params[0] == type) ||
(pass == 2 && params[0].isAssignableFrom(type))) {
setMethod = setMethods[i];
break;
}
}
}
}
}
}
// Make the property.
BeanProperty bp = new BeanProperty(getMethods[0], setMethod);
toAdd.put(beanPropertyName, bp);
}
}
}
// Add the new bean properties.
for (Enumeration e = toAdd.keys(); e.hasMoreElements();) {
String key = (String) e.nextElement();
Object value = toAdd.get(key);
ht.put(key, value);
}
}
Hashtable getFieldAndMethodsObjects(Scriptable scope, Object javaObject,
boolean isStatic)
{
Hashtable ht = isStatic ? staticFieldAndMethods : fieldAndMethods;
if (ht == null)
return null;
int len = ht.size();
Hashtable result = new Hashtable(Math.max(len,1));
Enumeration e = ht.elements();
while (len-- > 0) {
FieldAndMethods fam = (FieldAndMethods) e.nextElement();
fam = (FieldAndMethods) fam.clone();
fam.setJavaObject(javaObject);
result.put(fam.getName(), fam);
}
return result;
}
Constructor[] getConstructors() {
return ctors;
}
static JavaMembers lookupClass(Scriptable scope, Class dynamicType,
Class staticType)
{
Class cl = dynamicType;
Hashtable ct = classTable; // use local reference to avoid synchronize
JavaMembers members = (JavaMembers) ct.get(cl);
if (members != null)
return members;
if (staticType != null && staticType != dynamicType &&
!Modifier.isPublic(dynamicType.getModifiers()) &&
Modifier.isPublic(staticType.getModifiers()))
{
cl = staticType;
// We can use the static type, and that is OK, but we'll trace
// back the java class chain here to look for something more suitable.
for (Class parentType = dynamicType;
parentType != null && parentType != ScriptRuntime.ObjectClass;
parentType = parentType.getSuperclass())
{
if (Modifier.isPublic(parentType.getModifiers())) {
cl = parentType;
break;
}
}
}
try {
members = new JavaMembers(scope, cl);
} catch (SecurityException e) {
// Reflection may fail for objects that are in a restricted
// access package (e.g. sun.*). If we get a security
// exception, try again with the static type. Otherwise,
// rethrow the exception.
if (cl != staticType)
members = new JavaMembers(scope, staticType);
else
throw e;
}
if (Context.isCachingEnabled)
ct.put(cl, members);
return members;
}
RuntimeException reportMemberNotFound(String memberName) {
Object errArgs[] = { cl.getName(),
memberName };
return Context.reportRuntimeError(
Context.getMessage("msg.java.member.not.found",
errArgs));
}
static Hashtable classTable = new Hashtable();
private Class cl;
private Hashtable members;
private Hashtable fieldAndMethods;
private Hashtable staticMembers;
private Hashtable staticFieldAndMethods;
private Constructor[] ctors;
}
class BeanProperty {
BeanProperty(Method getter, Method setter) {
this.getter = getter;
this.setter = setter;
}
Method getter;
Method setter;
}
class FieldAndMethods extends NativeJavaMethod {
FieldAndMethods(Method[] methods, Field field, String name) {
super(methods);
this.field = field;
this.name = name;
}
void setJavaObject(Object javaObject) {
this.javaObject = javaObject;
}
String getName() {
if (field == null)
return name;
return field.getName();
}
Field getField() {
return field;
}
public Object getDefaultValue(Class hint) {
if (hint == ScriptRuntime.FunctionClass)
return this;
Object rval;
Class type;
try {
rval = field.get(javaObject);
type = field.getType();
} catch (IllegalAccessException accEx) {
Object[] args = {getName()};
throw Context.reportRuntimeError(Context.getMessage
("msg.java.internal.private", args));
}
rval = NativeJavaObject.wrap(this, rval, type);
if (rval instanceof Scriptable) {
rval = ((Scriptable) rval).getDefaultValue(hint);
}
return rval;
}
public Object clone() {
FieldAndMethods result = new FieldAndMethods(methods, field, name);
result.javaObject = javaObject;
return result;
}
private Field field;
private Object javaObject;
private String name;
}

View File

@@ -1,109 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
// API class
package org.mozilla.javascript;
import java.lang.reflect.InvocationTargetException;
/**
* Java reflection of JavaScript exceptions. (Possibly wrapping a Java exception.)
*
* @author Mike McCabe
*/
public class JavaScriptException extends Exception {
/**
* Create a JavaScript exception wrapping the given JavaScript value.
*
* Instances of this class are thrown by the JavaScript 'throw' keyword.
*
* @param value the JavaScript value thrown.
*/
public JavaScriptException(Object value) {
super(ScriptRuntime.toString(value));
this.value = value;
}
/**
* Get the exception message.
*
* <p>Will just convert the wrapped exception to a string.
*/
public String getMessage() {
return ScriptRuntime.toString(value);
}
static JavaScriptException wrapException(Scriptable scope,
Throwable exn)
{
if (exn instanceof InvocationTargetException)
exn = ((InvocationTargetException)exn).getTargetException();
if (exn instanceof JavaScriptException)
return (JavaScriptException)exn;
Object wrapper = NativeJavaObject.wrap(scope, exn, Throwable.class);
return new JavaScriptException(wrapper);
}
/**
* Get the exception value originally thrown. This may be a
* JavaScript value (null, undefined, Boolean, Number, String,
* Scriptable or Function) or a Java exception value thrown from a
* host object or from Java called through LiveConnect.
*
* @return the value wrapped by this exception
*/
public Object getValue() {
if (value != null && value instanceof Wrapper)
// this will also catch NativeStrings...
return ((Wrapper)value).unwrap();
else
return value;
}
/**
* The JavaScript exception value. This value is not
* intended for general use; if the JavaScriptException wraps a
* Java exception, getScriptableValue may return a Scriptable
* wrapping the original Java exception object.
*
* We would prefer to go through a getter to encapsulate the value,
* however that causes the bizarre error "nanosecond timeout value
* out of range" on the MS JVM.
* @serial
*/
Object value;
}

View File

@@ -1,104 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Roger Lawrence
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
public class Label {
private static final int FIXUPTABLE_SIZE = 8;
private static final boolean DEBUG = true;
public Label()
{
itsPC = -1;
}
public short getPC()
{
return itsPC;
}
public void fixGotos(byte theCodeBuffer[])
{
if (DEBUG) {
if ((itsPC == -1) && (itsFixupTable != null))
throw new RuntimeException("Unlocated label");
}
if (itsFixupTable != null) {
for (int i = 0; i < itsFixupTableTop; i++) {
int fixupSite = itsFixupTable[i];
// -1 to get delta from instruction start
short offset = (short)(itsPC - (fixupSite - 1));
theCodeBuffer[fixupSite++] = (byte)(offset >> 8);
theCodeBuffer[fixupSite] = (byte)offset;
}
}
itsFixupTable = null;
}
public void setPC(short thePC)
{
if (DEBUG) {
if ((itsPC != -1) && (itsPC != thePC))
throw new RuntimeException("Duplicate label");
}
itsPC = thePC;
}
public void addFixup(int fixupSite)
{
if (itsFixupTable == null) {
itsFixupTableTop = 1;
itsFixupTable = new int[FIXUPTABLE_SIZE];
itsFixupTable[0] = fixupSite;
}
else {
if (itsFixupTableTop == itsFixupTable.length) {
int oldLength = itsFixupTable.length;
int newTable[] = new int[oldLength + FIXUPTABLE_SIZE];
System.arraycopy(itsFixupTable, 0, newTable, 0, oldLength);
itsFixupTable = newTable;
}
itsFixupTable[itsFixupTableTop++] = fixupSite;
}
}
private short itsPC;
private int itsFixupTable[];
private int itsFixupTableTop;
}

View File

@@ -1,80 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Roger Lawrence
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
public class LabelTable {
private static final boolean DEBUGLABELS = false;
private static final int LabelTableSize = 32;
protected Label itsLabelTable[];
protected int itsLabelTableTop;
public int acquireLabel()
{
if (itsLabelTable == null) {
itsLabelTable = new Label[LabelTableSize];
itsLabelTable[0] = new Label();
itsLabelTableTop = 1;
return 0x80000000;
}
else {
if (itsLabelTableTop == itsLabelTable.length) {
Label oldTable[] = itsLabelTable;
itsLabelTable = new Label[itsLabelTableTop * 2];
System.arraycopy(oldTable, 0, itsLabelTable, 0, itsLabelTableTop);
}
itsLabelTable[itsLabelTableTop] = new Label();
int result = itsLabelTableTop++;
return result | 0x80000000;
}
}
public int markLabel(int theLabel, int pc)
{
if (DEBUGLABELS) {
if ((theLabel & 0x80000000) != 0x80000000)
throw new RuntimeException("Bad label, no biscuit");
}
theLabel &= 0x7FFFFFFF;
if (DEBUGLABELS) {
System.out.println("Marking label " + theLabel + " at " + pc);
}
itsLabelTable[theLabel].setPC((short)pc);
return theLabel | 0x80000000;
}
}

View File

@@ -1,99 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.lang.reflect.*;
/**
* Avoid loading classes unless they are used.
*
* <p> This improves startup time and average memory usage.
*/
class LazilyLoadedCtor {
LazilyLoadedCtor(ScriptableObject scope, String ctorName,
String className, int attributes)
throws PropertyException
{
this.className = className;
this.ctorName = ctorName;
Class cl = getClass();
Method[] getter = FunctionObject.findMethods(cl, "getProperty");
Method[] setter = FunctionObject.findMethods(cl, "setProperty");
scope.defineProperty(this.ctorName, this, getter[0], setter[0],
attributes);
}
public Object getProperty(ScriptableObject obj) {
try {
synchronized (obj) {
if (!isReplaced)
ScriptableObject.defineClass(obj, Class.forName(className));
isReplaced = true;
}
}
catch (ClassNotFoundException e) {
throw WrappedException.wrapException(e);
}
catch (InstantiationException e) {
throw WrappedException.wrapException(e);
}
catch (IllegalAccessException e) {
throw WrappedException.wrapException(e);
}
catch (InvocationTargetException e) {
throw WrappedException.wrapException(e);
}
catch (ClassDefinitionException e) {
throw WrappedException.wrapException(e);
}
catch (PropertyException e) {
throw WrappedException.wrapException(e);
}
return obj.get(ctorName, obj);
}
public Object setProperty(ScriptableObject obj, Object val) {
synchronized (obj) {
isReplaced = true;
return val;
}
}
private String ctorName;
private String className;
private boolean isReplaced;
}

View File

@@ -1,412 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Mike McCabe
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.io.Reader;
import java.io.IOException;
/**
* An input buffer that combines fast character-based access with
* (slower) support for retrieving the text of the current line. It
* also supports building strings directly out of the internal buffer
* to support fast scanning with minimal object creation.
*
* Note that it is customized in several ways to support the
* TokenStream class, and should not be considered general.
*
* Credits to Kipp Hickman and John Bandhauer.
*
* @author Mike McCabe
*/
final class LineBuffer {
/*
* for smooth operation of getLine(), this should be greater than
* the length of any expected line. Currently, 256 is 3% slower
* than 4096 for large compiles, but seems safer given evaluateString.
* Strings for the scanner are are built with StringBuffers
* instead of directly out of the buffer whenever a string crosses
* a buffer boundary, so small buffer sizes will mean that more
* objects are created.
*/
static final int BUFLEN = 256;
LineBuffer(Reader in, int lineno) {
this.in = in;
this.lineno = lineno;
}
int read() throws IOException {
for(;;) {
if (end == offset && !fill())
return -1;
// Do only a bitmask + branch per character, at the cost of
// three branches per low-bits-only (or 2028/9) character.
if ((buffer[offset] & '\udfd0') == 0) {
if (buffer[offset] == '\r') {
// if the next character is a newline, skip past it.
if ((offset + 1) < end) {
if (buffer[offset + 1] == '\n')
offset++;
} else {
// set a flag for fill(), in case the first char of the
// next fill is a newline.
lastWasCR = true;
}
}
else
if ((buffer[offset] != '\n')
&& (buffer[offset] != '\u2028')
&& (buffer[offset] != '\u2029'))
{
if (Character.getType(buffer[offset])
== Character.FORMAT) {
hadCFSinceStringStart = true;
offset++;
continue;
}
return (int) buffer[offset++];
}
offset++;
prevStart = lineStart;
lineStart = offset;
lineno++;
return '\n';
}
if ((buffer[offset] >= 128)
&& (Character.getType(buffer[offset]) == Character.FORMAT)) {
hadCFSinceStringStart = true;
offset++;
}
else
break;
}
return (int) buffer[offset++];
}
void unread() {
if (offset == 0)
// We can get here when we're asked to unread() an
// implicit EOF_CHAR.
// This would also be wrong behavior in the general case,
// because a peek() could map a buffer.length offset to 0
// in the process of a fill(), and leave it there. But
// the scanner never calls peek() or a failed match()
// followed by unread()... this would violate 1-character
// lookahead. So we're OK.
return;
offset--;
if ((buffer[offset] & '\ufff0') == 0
&& (buffer[offset] == '\r' || buffer[offset] == '\n')) {
// back off from the line start we presumably just registered...
lineStart = prevStart;
lineno--;
}
}
int peek() throws IOException {
if (end == offset && !fill())
return -1;
if (buffer[offset] == '\r')
return '\n';
return buffer[offset];
}
boolean match(char c) throws IOException {
if (end == offset && !fill())
return false;
// This'd be a place where we'd need to map '\r' to '\n' and
// do other updates, but TokenStream never looks ahead for
// '\n', so we don't bother.
if (buffer[offset] == c) {
offset++;
return true;
}
return false;
}
// Reconstruct a source line from the buffers. This can be slow...
String getLine() {
StringBuffer result = new StringBuffer();
int start = lineStart;
if (start >= offset) {
// the line begins somewhere in the other buffer; get that first.
if (otherStart < otherEnd)
// if a line ending was seen in the other buffer... otherwise
// just ignore this strange case.
result.append(otherBuffer, otherStart,
otherEnd - otherStart);
start = 0;
}
// get the part of the line in the current buffer.
result.append(buffer, start, offset - start);
// Get the remainder of the line.
int i = offset;
while(true) {
if (i == buffer.length) {
// we're out of buffer, let's just expand it. We do
// this instead of reading into a StringBuffer to
// preserve the stream for later reads.
char[] newBuffer = new char[buffer.length * 2];
System.arraycopy(buffer, 0, newBuffer, 0, buffer.length);
buffer = newBuffer;
int charsRead = 0;
try {
charsRead = in.read(buffer, end, buffer.length - end);
} catch (IOException ioe) {
// ignore it, we're already displaying an error...
}
if (charsRead < 0)
break;
end += charsRead;
}
if (buffer[i] == '\r' || buffer[i] == '\n')
break;
i++;
}
result.append(buffer, offset, i - offset);
return result.toString();
}
// Get the offset of the current character, relative to
// the line that getLine() returns.
int getOffset() {
if (lineStart >= offset)
// The line begins somewhere in the other buffer.
return offset + (otherEnd - otherStart);
else
return offset - lineStart;
}
// Set a mark to indicate that the reader should begin
// accumulating characters for getString(). The string begins
// with the last character read.
void startString() {
if (offset == 0) {
// We can get here if startString is called after a peek()
// or failed match() with offset past the end of the
// buffer.
// We're at the beginning of the buffer, and the previous character
// (which we want to include) is at the end of the last one, so
// we just go to StringBuffer mode.
stringSoFar = new StringBuffer();
stringSoFar.append(otherBuffer, otherEnd - 1, 1);
stringStart = -1; // Set sentinel value.
hadCFSinceStringStart = ((otherBuffer[otherEnd - 1] >= 128)
&& Character.getType(otherBuffer[otherEnd - 1])
== Character.FORMAT);
} else {
// Support restarting strings
stringSoFar = null;
stringStart = offset - 1;
hadCFSinceStringStart = ((buffer[stringStart] >= 128)
&& Character.getType(buffer[stringStart]) == Character.FORMAT);
}
}
// Get a string consisting of the characters seen since the last
// startString.
String getString() {
String result;
/*
* There's one strange case here: If the character offset currently
* points to (which we never want to include in the string) is
* a newline, then if the previous character is a carriage return,
* we probably want to exclude that as well. If the offset is 0,
* then we hope that fill() handled excluding it from stringSoFar.
*/
int loseCR = (offset > 0 &&
buffer[offset] == '\n' && buffer[offset - 1] == '\r') ?
1 : 0;
if (stringStart != -1) {
// String mark is valid, and in this buffer.
result = new String(buffer, stringStart,
offset - stringStart - loseCR);
} else {
if (stringSoFar == null)
stringSoFar = new StringBuffer();
// Exclude cr as well as nl of newline. If offset is 0, then
// hopefully fill() did the right thing.
result = (stringSoFar.append(buffer, 0, offset - loseCR)).toString();
}
stringStart = -1;
stringSoFar = null;
if (hadCFSinceStringStart) {
char c[] = result.toCharArray();
StringBuffer x = null;
for (int i = 0; i < c.length; i++) {
if (Character.getType(c[i]) == Character.FORMAT) {
if (x == null) {
x = new StringBuffer();
x.append(c, 0, i);
}
}
else
if (x != null) x.append(c[i]);
}
if (x != null) result = x.toString();
}
return result;
}
boolean fill() throws IOException {
// not sure I care...
if (end - offset != 0)
throw new IOException("fill of non-empty buffer");
// If there's a string currently being accumulated, save
// off the progress.
/*
* Exclude an end-of-buffer carriage return. NOTE this is not
* fully correct in the general case, because we really only
* want to exclude the carriage return if it's followed by a
* linefeed at the beginning of the next buffer. But we fudge
* because the scanner doesn't do this.
*/
int loseCR = (offset > 0 && lastWasCR) ? 1 : 0;
if (stringStart != -1) {
// The mark is in the current buffer, save off from the mark to the
// end.
stringSoFar = new StringBuffer();
stringSoFar.append(buffer, stringStart, end - stringStart - loseCR);
stringStart = -1;
} else if (stringSoFar != null) {
// the string began prior to the current buffer, so save the
// whole current buffer.
stringSoFar.append(buffer, 0, end - loseCR);
}
// swap buffers
char[] tempBuffer = buffer;
buffer = otherBuffer;
otherBuffer = tempBuffer;
// allocate the buffers lazily, in case we're handed a short string.
if (buffer == null) {
buffer = new char[BUFLEN];
}
// buffers have switched, so move the newline marker.
otherStart = lineStart;
otherEnd = end;
// set lineStart to a sentinel value, unless this is the first
// time around.
prevStart = lineStart = (otherBuffer == null) ? 0 : buffer.length + 1;
offset = 0;
end = in.read(buffer, 0, buffer.length);
if (end < 0) {
end = 0;
// can't null buffers here, because a string might be retrieved
// out of the other buffer, and a 0-length string might be
// retrieved out of this one.
hitEOF = true;
return false;
}
// If the last character of the previous fill was a carriage return,
// then ignore a newline.
// There's another bizzare special case here. If lastWasCR is
// true, and we see a newline, and the buffer length is
// 1... then we probably just read the last character of the
// file, and returning after advancing offset is not the right
// thing to do. Instead, we try to ignore the newline (and
// likely get to EOF for real) by doing yet another fill().
if (lastWasCR) {
if (buffer[0] == '\n') {
offset++;
if (end == 1)
return fill();
}
lineStart = offset;
lastWasCR = false;
}
return true;
}
int getLineno() { return lineno; }
boolean eof() { return hitEOF; }
private Reader in;
private char[] otherBuffer = null;
private char[] buffer = null;
// Yes, there are too too many of these.
private int offset = 0;
private int end = 0;
private int otherEnd;
private int lineno;
private int lineStart = 0;
private int otherStart = 0;
private int prevStart = 0;
private boolean lastWasCR = false;
private boolean hitEOF = false;
private int stringStart = -1;
private StringBuffer stringSoFar = null;
private boolean hadCFSinceStringStart = false;
}

View File

@@ -1,114 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is ListenerCollection, released
* May 15, 1998.
*
* The Initial Developer of the Original Code is Ian D. Stewart.
* Portions created by Ian D. Stewart are Copyright (C) 1998, 1999
* Ian D. Stewart.
* Rights Reserved.
*
* Contributor(s):
* Ian D. Stewart
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
/* This class provides a series of methods for accessing event listeners. */
package org.mozilla.javascript;
import java.util.Enumeration;
import java.util.Vector;
/**
* This class acts as central storage location for miscelanious
* event listeners. It provides methods for adding, removing
* and accessing listeners, both individually and collectively,
* by the listener interface implemented
*
* Note: This class performs the same functions as
* javax.swing.event.EventListenerList, and is provided
* primarily for implementations lacking the Swing packages
*
* @author Ian D. Stewart
* @since JavaScript-Java 1.4 rel 3
*/
public class ListenerCollection extends Vector {
/**
* Create a new ListenerCollection
*/
public ListenerCollection() {
super();
} // Constructor
/**
* Add a new listener to the collection
* @param listener the listener
*/
public void addListener(Object listener) {
this.addElement(listener);
}
/**
* Remove a listener from the collection
* @param listener the listener
*/
public void removeListener(Object listener) {
this.removeElement(listener);
}
/**
* Returns an Enumeration of all the listeners
* being stored in this collection
* @return an Enumeration of all listeners
*/
public Enumeration getAllListeners() {
return this.elements();
}
/**
* Return all the listeners in this collection which
* implement the specified interface
*
* @param iface the interface
* @return an array of listeners which implement the given
* interface
*/
public Object[] getListeners(Class iface) {
Vector array = new Vector();
for(Enumeration enum = getAllListeners();enum.hasMoreElements();) {
Object listener = enum.nextElement();
if(iface.isInstance(listener)) {
array.addElement(listener);
}
}
Object[] result = new Object[array.size()];
array.copyInto(result);
return result;
}
} // ListenerCollection
// end of ListenerCollection.java ...

View File

@@ -1,79 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Roger Lawrence
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
public class LocalVariable {
public LocalVariable(String name, boolean isParameter) {
itsName = name;
itsIsParameter = isParameter;
}
public void setIndex(int index){ itsIndex = index; }
public int getIndex() { return itsIndex; }
public void setIsParameter() { itsIsParameter = true; }
public boolean isParameter() { return itsIsParameter; }
public String getName() { return itsName; }
/**
* Return the starting PC where this variable is live, or -1
* if it is not a Java register.
*/
public int getStartPC() {
return -1;
}
/**
* Return the Java register number or -1 if it is not a Java register.
*/
public short getJRegister() {
return -1;
}
/**
* Return true if the local variable is a Java register with double type.
*/
public boolean isNumber() {
return false;
}
private String itsName;
private int itsIndex = -1;
private boolean itsIsParameter;
}

View File

@@ -1,244 +0,0 @@
#! gmake
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is Rhino code, released
# May 6, 1998.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the
# terms of the GNU Public License (the "GPL"), in which case the
# provisions of the GPL are applicable instead of those above.
# If you wish to allow use of your version of this file only
# under the terms of the GPL and not to allow others to use your
# version of this file under the NPL, indicate your decision by
# deleting the provisions above and replace them with the notice
# and other provisions required by the GPL. If you do not delete
# the provisions above, a recipient may use your version of this
# file under either the NPL or the GPL.
#
# Makefile the core javascript classes.
#
# This Makefile is intended to be called from the toplevel Makefile.
#
# List files explicitly to exclude .java files in this dir we don't want
# to compile. Also hack in classfile stuff...
SOURCES = \
$(PATH_PREFIX)/Arguments.java \
$(PATH_PREFIX)/BinaryDigitReader.java \
$(PATH_PREFIX)/ClassDefinitionException.java \
$(PATH_PREFIX)/ClassNameHelper.java \
$(PATH_PREFIX)/Context.java \
$(PATH_PREFIX)/DeepBytecodeHook.java \
$(PATH_PREFIX)/DeepCallHook.java \
$(PATH_PREFIX)/DeepErrorReporterHook.java \
$(PATH_PREFIX)/DeepExecuteHook.java \
$(PATH_PREFIX)/DeepNewObjectHook.java \
$(PATH_PREFIX)/DeepScriptHook.java \
$(PATH_PREFIX)/DefaultErrorReporter.java \
$(PATH_PREFIX)/EcmaError.java \
$(PATH_PREFIX)/ErrorReporter.java \
$(PATH_PREFIX)/EvaluatorException.java \
$(PATH_PREFIX)/FlattenedObject.java \
$(PATH_PREFIX)/Function.java \
$(PATH_PREFIX)/FunctionNode.java \
$(PATH_PREFIX)/FunctionObject.java \
$(PATH_PREFIX)/IRFactory.java \
$(PATH_PREFIX)/ImporterTopLevel.java \
$(PATH_PREFIX)/InterpretedFunction.java \
$(PATH_PREFIX)/InterpretedScript.java \
$(PATH_PREFIX)/Interpreter.java \
$(PATH_PREFIX)/InterpreterData.java \
$(PATH_PREFIX)/JavaAdapter.java \
$(PATH_PREFIX)/JavaMembers.java \
$(PATH_PREFIX)/JavaScriptException.java \
$(PATH_PREFIX)/Label.java \
$(PATH_PREFIX)/LabelTable.java \
$(PATH_PREFIX)/LazilyLoadedCtor.java \
$(PATH_PREFIX)/LineBuffer.java \
$(PATH_PREFIX)/ListenerCollection.java \
$(PATH_PREFIX)/LocalVariable.java \
$(PATH_PREFIX)/NativeArray.java \
$(PATH_PREFIX)/NativeBoolean.java \
$(PATH_PREFIX)/NativeCall.java \
$(PATH_PREFIX)/NativeDate.java \
$(PATH_PREFIX)/NativeError.java \
$(PATH_PREFIX)/NativeFunction.java \
$(PATH_PREFIX)/NativeGlobal.java \
$(PATH_PREFIX)/NativeJavaArray.java \
$(PATH_PREFIX)/NativeJavaClass.java \
$(PATH_PREFIX)/NativeJavaConstructor.java \
$(PATH_PREFIX)/NativeJavaMethod.java \
$(PATH_PREFIX)/NativeJavaObject.java \
$(PATH_PREFIX)/NativeJavaPackage.java \
$(PATH_PREFIX)/NativeMath.java \
$(PATH_PREFIX)/NativeNumber.java \
$(PATH_PREFIX)/NativeObject.java \
$(PATH_PREFIX)/NativeScript.java \
$(PATH_PREFIX)/NativeString.java \
$(PATH_PREFIX)/NativeWith.java \
$(PATH_PREFIX)/Node.java \
$(PATH_PREFIX)/NodeTransformer.java \
$(PATH_PREFIX)/NotAFunctionException.java \
$(PATH_PREFIX)/Parser.java \
$(PATH_PREFIX)/PreorderNodeIterator.java \
$(PATH_PREFIX)/PropertyException.java \
$(PATH_PREFIX)/RegExpProxy.java \
$(PATH_PREFIX)/Script.java \
$(PATH_PREFIX)/ScriptRuntime.java \
$(PATH_PREFIX)/Scriptable.java \
$(PATH_PREFIX)/ScriptableObject.java \
$(PATH_PREFIX)/SecuritySupport.java \
$(PATH_PREFIX)/ShallowNodeIterator.java \
$(PATH_PREFIX)/SourceTextItem.java \
$(PATH_PREFIX)/SourceTextManager.java \
$(PATH_PREFIX)/TokenStream.java \
$(PATH_PREFIX)/Undefined.java \
$(PATH_PREFIX)/VariableTable.java \
$(PATH_PREFIX)/WrappedException.java \
$(PATH_PREFIX)/Wrapper.java \
$(PATH_PREFIX)/regexp/NativeRegExp.java \
$(PATH_PREFIX)/regexp/NativeRegExpCtor.java \
$(PATH_PREFIX)/regexp/RegExpImpl.java \
$(PATH_PREFIX)/regexp/SubString.java \
$(PATH_PREFIX)/optimizer/Block.java \
$(PATH_PREFIX)/optimizer/Codegen.java \
$(PATH_PREFIX)/optimizer/DataFlowBitSet.java \
$(PATH_PREFIX)/optimizer/FatBlock.java \
$(PATH_PREFIX)/optimizer/JavaScriptClassLoader.java\
$(PATH_PREFIX)/optimizer/OptClassNameHelper.java\
$(PATH_PREFIX)/optimizer/OptFunctionNode.java \
$(PATH_PREFIX)/optimizer/OptIRFactory.java \
$(PATH_PREFIX)/optimizer/OptLocalVariable.java \
$(PATH_PREFIX)/optimizer/OptRuntime.java \
$(PATH_PREFIX)/optimizer/OptTransformer.java \
$(PATH_PREFIX)/optimizer/OptVariableTable.java \
$(PATH_PREFIX)/optimizer/Optimizer.java \
$(PATH_PREFIX)/optimizer/StmtNodeIterator.java \
$(PATH_PREFIX)/optimizer/TypeEvent.java \
$(PATH_PREFIX)/../classfile/ByteCode.java \
$(PATH_PREFIX)/../classfile/ClassFileWriter.java\
$(NULL)
RESOURCEDIR = $(PATH_PREFIX)/resources
RESOURCES = $(RESOURCEDIR)/*.properties
# This must be evaluated in some context where the classes can be
# found; we can't use a simple translation from sources, because a
# .java file may produce more than one .class file.
# (use org/mozilla/classfile explicitly for now; should be replaced
# with something parameterized, but jar doesn't understand ..)
CLASSES = $(PATH_PREFIX)/*.class $(PATH_PREFIX)/regexp/*.class \
$(PATH_PREFIX)/optimizer/*.class org/mozilla/classfile/*.class
# A class or set of classes as visible from the top level. For want
# of ${subst ,,}. This variable is only used to trigger dependency
# analysis, and multiple words confuse gmake, so it can be smaller
# than the full set of sources. (We assume we'll never need to do the
# same thing with RESOURCES.)
TLCLASS = $(CLASSDIR)/$(PATH_PREFIX)/*.class
# An empty file, used mainly for timestamp/dependency purposes by
# "fast" builds
FASTTARGET=$(CLASSDIR)/.lastbuild
$(JAR) : $(TLCLASS) $(CLASSDIR)/$(RESOURCES)
cd $(CLASSDIR) ; \
jar cf ../$(JAR) $(CLASSES) $(RESOURCES)
$(TLCLASS) : $(SOURCES)
- mkdir -p $(CLASSDIR)
echo "" > $(FASTTARGET)
$(JAVAC) $(JFLAGS) -d $(CLASSDIR) $(SOURCES)
$(CLASSDIR)/$(RESOURCES) : $(RESOURCES)
- mkdir -p $(CLASSDIR)/$(RESOURCEDIR)
cp $(RESOURCES) $(CLASSDIR)/$(RESOURCEDIR)
# Since the jar file is a target for regular builds, "fast" builds use a
# dummy file, updated before each compilation to provide a timestamp.
# Even so, using a dummy file is far from foolproof, so we still need
# the regular build.
fast: $(FASTTARGET)
# So that we recompile only the files that have changed, we pretend
# the only real dependencies are the source files, and recopy the
# resources every time. Right now (14 Jun 99), the only resource is
# Messages.properties, so it's a small price to pay.
$(FASTTARGET) : $(SOURCES)
- mkdir -p $(CLASSDIR)/$(RESOURCEDIR)
cp $(RESOURCES) $(CLASSDIR)/$(RESOURCEDIR)
echo "" > $(FASTTARGET)
$(JAVAC) $(JFLAGS) -d $(CLASSDIR) $(?)
cd $(CLASSDIR) ; \
jar cf ../$(JAR) $(CLASSES) $(RESOURCES)
clean :
- cd $(CLASSDIR)
- rm $(CLASSES)
- rm $(PATH_PREFIX)/message.ids \
$(PATH_PREFIX)/property.ids \
$(PATH_PREFIX)/MANIFEST
clobber : clean
-rm $(JAR)
$(PATH_PREFIX)/MANIFEST : $(SOURCES) $(RESOURCES) $(PATH_PREFIX)/Makefile
ls $(SOURCES) $(RESOURCES) $(PATH_PREFIX)/Makefile \
> $(@)
# A sed/grep regular expression.
MESSAGE_PREFIX = msg\.
# Find all the msg.* strings in the source, and condense them to a sorted list,
# excluding duplicates.
$(PATH_PREFIX)/message.ids : $(SOURCES)
grep '$(MESSAGE_PREFIX)' $(SOURCES) |\
sed -e 's/.*\"\($(MESSAGE_PREFIX)\)\([^\"]*\).*/\1\2/' | \
sort | uniq > $(PATH_PREFIX)/message.ids
# Find all the msg.* strings in the resource files, and condense them to a
# sorted list, not excluding duplicates.
$(PATH_PREFIX)/property.ids : $(RESOURCES)
grep '^$(MESSAGE_PREFIX)' $(RESOURCES) |\
sed -e 's/.*\($(MESSAGE_PREFIX)\)\([^ =]*\).*/\1\2/' |\
sort > $(PATH_PREFIX)/property.ids
# Compare the resulting message.ids and property.ids files and confirm
# that they do not differ. This means that every message string used
# in the source is defined somewhere in the resource file, every
# resource in the resource file is used somewhere in the source, and
# no resource is defined more than once.
check : $(PATH_PREFIX)/message.ids $(PATH_PREFIX)/property.ids FORCE
- diff $(PATH_PREFIX)/message.ids $(PATH_PREFIX)/property.ids
# look for unmatched single quotes ... seems to fail when none!
# - sed -e s/\'\'//g $($RESOURCES) | grep \'
# Emulate .PHONY
FORCE :

View File

@@ -1,954 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Mike McCabe
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.util.Hashtable;
/**
* This class implements the Array native object.
* @author Norris Boyd
* @author Mike McCabe
*/
public class NativeArray extends ScriptableObject {
/*
* Optimization possibilities and open issues:
* - Long vs. double schizophrenia. I suspect it might be better
* to use double throughout.
* - Most array operations go through getElem or setElem (defined
* in this file) to handle the full 2^32 range; it might be faster
* to have versions of most of the loops in this file for the
* (infinitely more common) case of indices < 2^31.
* - Functions that need a new Array call "new Array" in the
* current scope rather than using a hardwired constructor;
* "Array" could be redefined. It turns out that js calls the
* equivalent of "new Array" in the current scope, except that it
* always gets at least an object back, even when Array == null.
*/
/**
* Zero-parameter constructor: just used to create Array.prototype
*/
public NativeArray() {
dense = null;
this.length = 0;
}
public NativeArray(long length) {
int intLength = (int) length;
if (intLength == length && intLength > 0) {
if (intLength > maximumDenseLength)
intLength = maximumDenseLength;
dense = new Object[intLength];
for (int i=0; i < intLength; i++)
dense[i] = NOT_FOUND;
}
this.length = length;
}
public NativeArray(Object[] array) {
dense = array;
this.length = array.length;
}
public static void finishInit(Scriptable scope, FunctionObject ctor,
Scriptable proto)
{
// Set some method length values.
// See comment for NativeString.finishInit()
String[] specialLengthNames = { "reverse",
"toString",
};
short[] specialLengthValues = { 0,
0,
};
for (int i=0; i < specialLengthNames.length; i++) {
Object obj = proto.get(specialLengthNames[i], proto);
((FunctionObject) obj).setLength(specialLengthValues[i]);
}
}
public String getClassName() {
return "Array";
}
public Object get(int index, Scriptable start) {
if (dense != null && 0 <= index && index < dense.length)
return dense[index];
return super.get(index, start);
}
public boolean has(int index, Scriptable start) {
if (dense != null && 0 <= index && index < dense.length)
return dense[index] != NOT_FOUND;
return super.has(index, start);
}
public void put(String id, Scriptable start, Object value) {
// only set the array length if given an array index (ECMA 15.4.0)
// try to get an array index from id
double d = ScriptRuntime.toNumber(id);
if (ScriptRuntime.toUint32(d) == d &&
ScriptRuntime.numberToString(d, 10).equals(id) &&
this.length <= d && d != 4294967295.0)
{
this.length = (long)d + 1;
}
super.put(id, start, value);
}
public void put(int index, Scriptable start, Object value) {
// only set the array length if given an array index (ECMA 15.4.0)
if (this.length <= index) {
// avoid overflowing index!
this.length = (long)index + 1;
}
if (dense != null && 0 <= index && index < dense.length) {
dense[index] = value;
return;
}
super.put(index, start, value);
}
public void delete(int index) {
if (dense != null && 0 <= index && index < dense.length) {
dense[index] = NOT_FOUND;
return;
}
super.delete(index);
}
public Object[] getIds() {
Object[] superIds = super.getIds();
if (dense == null)
return superIds;
int count = 0;
int last = dense.length;
if (last > length)
last = (int) length;
for (int i=last-1; i >= 0; i--) {
if (dense[i] != NOT_FOUND)
count++;
}
count += superIds.length;
Object[] result = new Object[count];
System.arraycopy(superIds, 0, result, 0, superIds.length);
for (int i=last-1; i >= 0; i--) {
if (dense[i] != NOT_FOUND)
result[--count] = new Integer(i);
}
return result;
}
public Object getDefaultValue(Class hint) {
if (hint == ScriptRuntime.NumberClass) {
Context cx = Context.getContext();
if (cx.getLanguageVersion() == Context.VERSION_1_2)
return new Long(length);
}
return super.getDefaultValue(hint);
}
/**
* See ECMA 15.4.1,2
*/
public static Object jsConstructor(Context cx, Object[] args,
Function ctorObj, boolean inNewExpr)
throws JavaScriptException
{
if (!inNewExpr) {
// FunctionObject.construct will set up parent, proto
return ctorObj.construct(cx, ctorObj.getParentScope(), args);
}
if (args.length == 0)
return new NativeArray();
// Only use 1 arg as first element for version 1.2; for
// any other version (including 1.3) follow ECMA and use it as
// a length.
if (cx.getLanguageVersion() == cx.VERSION_1_2) {
return new NativeArray(args);
}
else {
if ((args.length > 1) || (!(args[0] instanceof Number)))
return new NativeArray(args);
else {
long len = ScriptRuntime.toUint32(args[0]);
if (len != (((Number)(args[0])).doubleValue()))
throw Context.reportRuntimeError(Context.getMessage
("msg.arraylength.bad", null));
return new NativeArray(len);
}
}
}
private static final int lengthAttr = ScriptableObject.DONTENUM |
ScriptableObject.PERMANENT;
public long jsGet_length() {
return length;
}
public void jsSet_length(Object val) {
/* XXX do we satisfy this?
* 15.4.5.1 [[Put]](P, V):
* 1. Call the [[CanPut]] method of A with name P.
* 2. If Result(1) is false, return.
* ?
*/
if (!(val instanceof Number))
throw Context.reportRuntimeError(Context.getMessage
("msg.arraylength.bad", null));
long longVal = ScriptRuntime.toUint32(val);
if (longVal != (((Number)val).doubleValue()))
throw Context.reportRuntimeError(Context.getMessage
("msg.arraylength.bad", null));
if (longVal < length) {
// remove all properties between longVal and length
if (length - longVal > 0x1000) {
// assume that the representation is sparse
Object[] e = getIds(); // will only find in object itself
for (int i=0; i < e.length; i++) {
if (e[i] instanceof String) {
// > MAXINT will appear as string
String id = (String) e[i];
double d = ScriptRuntime.toNumber(id);
if (d == d && d < length)
delete(id);
continue;
}
int index = ((Number) e[i]).intValue();
if (index >= longVal)
delete(index);
}
} else {
// assume a dense representation
for (long i=longVal; i < length; i++) {
// only delete if defined in the object itself
if (hasElem(this, i))
ScriptRuntime.delete(this, new Long(i));
}
}
}
length = longVal;
}
/* Support for generic Array-ish objects. Most of the Array
* functions try to be generic; anything that has a length
* property is assumed to be an array. hasLengthProperty is
* needed in addition to getLengthProperty, because
* getLengthProperty always succeeds - tries to convert strings, etc.
*/
static double getLengthProperty(Scriptable obj) {
// These will both give numeric lengths within Uint32 range.
if (obj instanceof NativeString)
return (double)((NativeString)obj).jsGet_length();
if (obj instanceof NativeArray)
return (double)((NativeArray)obj).jsGet_length();
return ScriptRuntime.toUint32(ScriptRuntime
.getProp(obj, "length", obj));
}
static boolean hasLengthProperty(Object obj) {
if (!(obj instanceof Scriptable) || obj == Context.getUndefinedValue())
return false;
if (obj instanceof NativeString || obj instanceof NativeArray)
return true;
Scriptable sobj = (Scriptable)obj;
// XXX some confusion as to whether or not to walk to get the length
// property. Pending review of js/[new ecma submission] treatment
// of 'arrayness'.
Object property = ScriptRuntime.getProp(sobj, "length", sobj);
return property instanceof Number;
}
/* Utility functions to encapsulate index > Integer.MAX_VALUE
* handling. Also avoids unnecessary object creation that would
* be necessary to use the general ScriptRuntime.get/setElem
* functions... though this is probably premature optimization.
*/
private static boolean hasElem(Scriptable target, long index) {
return index > Integer.MAX_VALUE
? target.has(Long.toString(index), target)
: target.has((int)index, target);
}
private static Object getElem(Scriptable target, long index) {
if (index > Integer.MAX_VALUE) {
String id = Long.toString(index);
return ScriptRuntime.getElem(target, id, target);
} else {
return ScriptRuntime.getElem(target, (int)index);
}
}
private static void setElem(Scriptable target, long index, Object value) {
if (index > Integer.MAX_VALUE) {
String id = Long.toString(index);
ScriptRuntime.setElem(target, id, value, target);
} else {
ScriptRuntime.setElem(target, (int)index, value);
}
}
public static String jsFunction_toString(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
return toStringHelper(cx, thisObj,
cx.getLanguageVersion() == cx.VERSION_1_2);
}
private static String toStringHelper(Context cx, Scriptable thisObj,
boolean toSource)
{
/* It's probably redundant to handle long lengths in this
* function; StringBuffers are limited to 2^31 in java.
*/
long length = (long)getLengthProperty(thisObj);
StringBuffer result = new StringBuffer();
if (cx.iterating == null)
cx.iterating = new Hashtable(31);
boolean iterating = cx.iterating.get(thisObj) == Boolean.TRUE;
// whether to return '4,unquoted,5' or '[4, "quoted", 5]'
String separator;
if (toSource) {
result.append("[");
separator = ", ";
} else {
separator = ",";
}
boolean haslast = false;
long i = 0;
if (!iterating) {
for (i = 0; i < length; i++) {
if (i > 0)
result.append(separator);
Object elem = getElem(thisObj, i);
if (elem == null || elem == Undefined.instance) {
haslast = false;
continue;
}
haslast = true;
if (elem instanceof String) {
if (toSource) {
result.append("\"");
result.append(ScriptRuntime.escapeString
(ScriptRuntime.toString(elem)));
result.append("\"");
} else {
result.append(ScriptRuntime.toString(elem));
}
} else {
/* wrap changes to cx.iterating in a try/finally
* so that the reference always gets removed, and
* we don't leak memory. Good place for weak
* references, if we had them. */
try {
// stop recursion.
cx.iterating.put(thisObj, Boolean.TRUE);
result.append(ScriptRuntime.toString(elem));
} finally {
cx.iterating.remove(thisObj);
}
}
}
}
if (toSource) {
//for [,,].length behavior; we want toString to be symmetric.
if (!haslast && i > 0)
result.append(", ]");
else
result.append("]");
}
return result.toString();
}
/**
* See ECMA 15.4.4.3
*/
public static String jsFunction_join(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
StringBuffer result = new StringBuffer();
String separator;
double length = getLengthProperty(thisObj);
// if no args, use "," as separator
if (args.length < 1) {
separator = ",";
} else {
separator = ScriptRuntime.toString(args[0]);
}
for (long i=0; i < length; i++) {
if (i > 0)
result.append(separator);
Object temp = getElem(thisObj, i);
if (temp == null || temp == Undefined.instance)
continue;
result.append(ScriptRuntime.toString(temp));
}
return result.toString();
}
/**
* See ECMA 15.4.4.4
*/
public static Scriptable jsFunction_reverse(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
long len = (long)getLengthProperty(thisObj);
long half = len / 2;
for(long i=0; i < half; i++) {
long j = len - i - 1;
Object temp1 = getElem(thisObj, i);
Object temp2 = getElem(thisObj, j);
setElem(thisObj, i, temp2);
setElem(thisObj, j, temp1);
}
return thisObj;
}
/**
* See ECMA 15.4.4.5
*/
public static Scriptable jsFunction_sort(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
throws JavaScriptException
{
long length = (long)getLengthProperty(thisObj);
Object compare;
if (args.length > 0 && Undefined.instance != args[0])
// sort with given compare function
compare = args[0];
else
// sort with default compare
compare = null;
// OPT: Would it make sense to use the extended sort for very small
// arrays?
// Should we use the extended sort function, or the faster one?
if (length >= Integer.MAX_VALUE) {
qsort_extended(cx, compare, thisObj, 0, length - 1);
} else {
// copy the JS array into a working array, so it can be
// sorted cheaply.
Object[] working = new Object[(int)length];
for (int i=0; i<length; i++) {
working[i] = getElem(thisObj, i);
}
qsort(cx, compare, working, 0, (int)length - 1, funObj);
// copy the working array back into thisObj
for (int i=0; i<length; i++) {
setElem(thisObj, i, working[i]);
}
}
return thisObj;
}
private static double qsortCompare(Context cx, Object jsCompare, Object x,
Object y, Scriptable scope)
throws JavaScriptException
{
Object undef = Undefined.instance;
// sort undefined to end
if (undef == x || undef == y) {
if (undef != x)
return -1;
if (undef != y)
return 1;
return 0;
}
if (jsCompare == null) {
// if no compare function supplied, sort lexicographically
String a = ScriptRuntime.toString(x);
String b = ScriptRuntime.toString(y);
return a.compareTo(b);
} else {
// assemble args and call supplied JS compare function
// OPT: put this argument creation in the caller and reuse it.
// XXX what to do when compare function returns NaN? ECMA states
// that it's then not a 'consistent compararison function'... but
// then what do we do? Back out and start over with the generic
// compare function when we see a NaN? Throw an error?
Object[] args = {x, y};
// return ScriptRuntime.toNumber(ScriptRuntime.call(jsCompare, null,
// args));
// for now, just ignore it:
double d = ScriptRuntime.
toNumber(ScriptRuntime.call(cx, jsCompare, null, args, scope));
return (d == d) ? d : 0;
}
}
private static void qsort(Context cx, Object jsCompare, Object[] working,
int lo, int hi, Scriptable scope)
throws JavaScriptException
{
Object pivot;
int i, j;
int a, b;
while (lo < hi) {
i = lo;
j = hi;
a = i;
pivot = working[a];
while (i < j) {
for(;;) {
b = j;
if (qsortCompare(cx, jsCompare, working[j], pivot,
scope) <= 0)
break;
j--;
}
working[a] = working[b];
while (i < j && qsortCompare(cx, jsCompare, working[a],
pivot, scope) <= 0)
{
i++;
a = i;
}
working[b] = working[a];
}
working[a] = pivot;
if (i - lo < hi - i) {
qsort(cx, jsCompare, working, lo, i - 1, scope);
lo = i + 1;
} else {
qsort(cx, jsCompare, working, i + 1, hi, scope);
hi = i - 1;
}
}
}
// A version that knows about long indices and doesn't use
// a working array. Probably will never be used.
private static void qsort_extended(Context cx, Object jsCompare,
Scriptable target, long lo, long hi)
throws JavaScriptException
{
Object pivot;
long i, j;
long a, b;
while (lo < hi) {
i = lo;
j = hi;
a = i;
pivot = getElem(target, a);
while (i < j) {
for(;;) {
b = j;
if (qsortCompare(cx, jsCompare, getElem(target, j),
pivot, target) <= 0)
break;
j--;
}
setElem(target, a, getElem(target, b));
while (i < j && qsortCompare(cx, jsCompare,
getElem(target, a),
pivot, target) <= 0)
{
i++;
a = i;
}
setElem(target, b, getElem(target, a));
}
setElem(target, a, pivot);
if (i - lo < hi - i) {
qsort_extended(cx, jsCompare, target, lo, i - 1);
lo = i + 1;
} else {
qsort_extended(cx, jsCompare, target, i + 1, hi);
hi = i - 1;
}
}
}
/**
* Non-ECMA methods.
*/
public static Object jsFunction_push(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
double length = getLengthProperty(thisObj);
for (int i = 0; i < args.length; i++) {
setElem(thisObj, (long)length + i, args[i]);
}
length += args.length;
ScriptRuntime.setProp(thisObj, "length", new Double(length), thisObj);
/*
* If JS1.2, follow Perl4 by returning the last thing pushed.
* Otherwise, return the new array length.
*/
if (cx.getLanguageVersion() == Context.VERSION_1_2)
// if JS1.2 && no arguments, return undefined.
return args.length == 0
? Context.getUndefinedValue()
: args[args.length - 1];
else
return new Long((long)length);
}
public static Object jsFunction_pop(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
Object result;
double length = getLengthProperty(thisObj);
if (length > 0) {
length--;
// Get the to-be-deleted property's value.
result = getElem(thisObj, (long)length);
// We don't need to delete the last property, because
// setLength does that for us.
} else {
result = Context.getUndefinedValue();
}
// necessary to match js even when length < 0; js pop will give a
// length property to any target it is called on.
ScriptRuntime.setProp(thisObj, "length", new Double(length), thisObj);
return result;
}
public static Object jsFunction_shift(Context cx, Scriptable thisObj,
Object[] args, Function funOjb)
{
Object result;
double length = getLengthProperty(thisObj);
if (length > 0) {
long i = 0;
length--;
// Get the to-be-deleted property's value.
result = getElem(thisObj, i);
/*
* Slide down the array above the first element. Leave i
* set to point to the last element.
*/
if (length > 0) {
for (i = 1; i <= length; i++) {
Object temp = getElem(thisObj, i);
setElem(thisObj, i - 1, temp);
}
}
// We don't need to delete the last property, because
// setLength does that for us.
} else {
result = Context.getUndefinedValue();
}
ScriptRuntime.setProp(thisObj, "length", new Double(length), thisObj);
return result;
}
public static Object jsFunction_unshift(Context cx, Scriptable thisObj,
Object[] args, Function funOjb)
{
Object result;
double length = (double)getLengthProperty(thisObj);
int argc = args.length;
if (args.length > 0) {
/* Slide up the array to make room for args at the bottom */
if (length > 0) {
for (long last = (long)length - 1; last >= 0; last--) {
Object temp = getElem(thisObj, last);
setElem(thisObj, last + argc, temp);
}
}
/* Copy from argv to the bottom of the array. */
for (int i = 0; i < args.length; i++) {
setElem(thisObj, i, args[i]);
}
/* Follow Perl by returning the new array length. */
length += args.length;
ScriptRuntime.setProp(thisObj, "length",
new Double(length), thisObj);
}
return new Long((long)length);
}
public static Object jsFunction_splice(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
/* create an empty Array to return. */
Scriptable scope = getTopLevelScope(funObj);
Object result = ScriptRuntime.newObject(cx, scope, "Array", null);
int argc = args.length;
if (argc == 0)
return result;
double length = getLengthProperty(thisObj);
/* Convert the first argument into a starting index. */
double begin = ScriptRuntime.toInteger(args[0]);
double end;
double delta;
double count;
if (begin < 0) {
begin += length;
if (begin < 0)
begin = 0;
} else if (begin > length) {
begin = length;
}
argc--;
/* Convert the second argument from a count into a fencepost index. */
delta = length - begin;
if (args.length == 1) {
count = delta;
end = length;
} else {
count = ScriptRuntime.toInteger(args[1]);
if (count < 0)
count = 0;
else if (count > delta)
count = delta;
end = begin + count;
argc--;
}
long lbegin = (long)begin;
long lend = (long)end;
/* If there are elements to remove, put them into the return value. */
if (count > 0) {
if (count == 1
&& (cx.getLanguageVersion() == Context.VERSION_1_2))
{
/*
* JS lacks "list context", whereby in Perl one turns the
* single scalar that's spliced out into an array just by
* assigning it to @single instead of $single, or by using it
* as Perl push's first argument, for instance.
*
* JS1.2 emulated Perl too closely and returned a non-Array for
* the single-splice-out case, requiring callers to test and
* wrap in [] if necessary. So JS1.3, default, and other
* versions all return an array of length 1 for uniformity.
*/
result = getElem(thisObj, lbegin);
} else {
for (long last = lbegin; last < lend; last++) {
Scriptable resultArray = (Scriptable)result;
Object temp = getElem(thisObj, last);
setElem(resultArray, last - lbegin, temp);
}
}
} else if (count == 0
&& cx.getLanguageVersion() == Context.VERSION_1_2)
{
/* Emulate C JS1.2; if no elements are removed, return undefined. */
result = Context.getUndefinedValue();
}
/* Find the direction (up or down) to copy and make way for argv. */
delta = argc - count;
if (delta > 0) {
for (long last = (long)length - 1; last >= lend; last--) {
Object temp = getElem(thisObj, last);
setElem(thisObj, last + (long)delta, temp);
}
} else if (delta < 0) {
for (long last = lend; last < length; last++) {
Object temp = getElem(thisObj, last);
setElem(thisObj, last + (long)delta, temp);
}
}
/* Copy from argv into the hole to complete the splice. */
int argoffset = args.length - argc;
for (int i = 0; i < argc; i++) {
setElem(thisObj, lbegin + i, args[i + argoffset]);
}
/* Update length in case we deleted elements from the end. */
ScriptRuntime.setProp(thisObj, "length",
new Double(length + delta), thisObj);
return result;
}
/*
* Python-esque sequence operations.
*/
public static Scriptable jsFunction_concat(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
/* Concat tries to keep the definition of an array as general
* as possible; if it finds that an object has a numeric
* 'length' property, then it treats that object as an array.
* This treats string atoms and string objects differently; as
* string objects have a length property and are accessible by
* index, they get exploded into arrays when added, while
* atomic strings are just added as strings.
*/
// create an empty Array to return.
Scriptable scope = getTopLevelScope(funObj);
Scriptable result = ScriptRuntime.newObject(cx, scope, "Array", null);
double length;
long slot = 0;
/* Put the target in the result array; only add it as an array
* if it looks like one.
*/
if (hasLengthProperty(thisObj)) {
length = getLengthProperty(thisObj);
// Copy from the target object into the result
for (slot = 0; slot < length; slot++) {
Object temp = getElem(thisObj, slot);
setElem(result, slot, temp);
}
} else {
setElem(result, slot++, thisObj);
}
/* Copy from the arguments into the result. If any argument
* has a numeric length property, treat it as an array and add
* elements separately; otherwise, just copy the argument.
*/
for (int i = 0; i < args.length; i++) {
if (hasLengthProperty(args[i])) {
// hasLengthProperty => instanceOf Scriptable.
Scriptable arg = (Scriptable)args[i];
length = getLengthProperty(arg);
for (long j = 0; j < length; j++, slot++) {
Object temp = getElem(arg, j);
setElem(result, slot, temp);
}
} else {
setElem(result, slot++, args[i]);
}
}
return result;
}
public static Scriptable jsFunction_slice(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
Scriptable scope = getTopLevelScope(funObj);
Scriptable result = ScriptRuntime.newObject(cx, scope, "Array", null);
double length = getLengthProperty(thisObj);
double begin = 0;
double end = length;
if (args.length > 0) {
begin = ScriptRuntime.toInteger(args[0]);
if (begin < 0) {
begin += length;
if (begin < 0)
begin = 0;
} else if (begin > length) {
begin = length;
}
if (args.length > 1) {
end = ScriptRuntime.toInteger(args[1]);
if (end < 0) {
end += length;
if (end < 0)
end = 0;
} else if (end > length) {
end = length;
}
}
}
long lbegin = (long)begin;
long lend = (long)end;
for (long slot = lbegin; slot < lend; slot++) {
Object temp = getElem(thisObj, slot);
setElem(result, slot - lbegin, temp);
}
return result;
}
private long length;
private Object[] dense;
private static final int maximumDenseLength = 10000;
}

View File

@@ -1,92 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Mike McCabe
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
/**
* This class implements the Boolean native object.
* See ECMA 15.6.
* @author Norris Boyd
*/
public class NativeBoolean extends ScriptableObject {
/**
* Zero-parameter constructor: just used to create Boolean.prototype
*/
public NativeBoolean() {
}
public NativeBoolean(boolean b) {
booleanValue = b;
}
public String getClassName() {
return "Boolean";
}
public Object getDefaultValue(Class typeHint) {
// This is actually non-ECMA, but will be proposed
// as a change in round 2.
if (typeHint == ScriptRuntime.BooleanClass)
return booleanValue ? Boolean.TRUE : Boolean.FALSE;
return super.getDefaultValue(typeHint);
}
public static Object jsConstructor(Context cx, Object[] args,
Function ctorObj, boolean inNewExpr)
{
boolean b = args.length >= 1
? ScriptRuntime.toBoolean(args[0])
: false;
if (inNewExpr) {
// new Boolean(val) creates a new boolean object.
return new NativeBoolean(b);
}
// Boolean(val) converts val to a boolean.
return b ? Boolean.TRUE : Boolean.FALSE;
}
public String jsFunction_toString() {
return booleanValue ? "true" : "false";
}
public boolean jsFunction_valueOf() {
return booleanValue;
}
private boolean booleanValue;
}

View File

@@ -1,135 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
/**
* This class implements the activation object.
*
* See ECMA 10.1.6
*
* @see org.mozilla.javascript.Arguments
* @author Norris Boyd
*/
public final class NativeCall extends ScriptableObject {
NativeCall(Context cx, Scriptable scope, NativeFunction funObj,
Scriptable thisObj, Object[] args)
{
this(cx, scope, funObj, thisObj);
this.originalArgs = args;
// initialize values of arguments
String[] names = funObj.names;
if (names != null) {
for (int i=0; i < funObj.argCount; i++) {
Object val = i < args.length ? args[i]
: Undefined.instance;
super.put(names[i+1], this, val);
}
}
// initialize "arguments" property
super.put("arguments", this, new Arguments(this));
}
NativeCall(Context cx, Scriptable scope, NativeFunction funObj,
Scriptable thisObj)
{
this.funObj = funObj;
this.thisObj = thisObj;
setParentScope(scope);
// leave prototype null
// save current activation
this.caller = cx.currentActivation;
cx.currentActivation = this;
}
// Needed in order to use this class with ScriptableObject.defineClass
public NativeCall() {
}
public String getClassName() {
return "Call";
}
public static Object jsConstructor(Context cx, Object[] args,
Function ctorObj, boolean inNewExpr)
{
if (!inNewExpr) {
Object[] errArgs = { "Call" };
throw Context.reportRuntimeError(Context.getMessage
("msg.only.from.new", errArgs));
}
ScriptRuntime.checkDeprecated(cx, "Call");
NativeCall result = new NativeCall();
result.setPrototype(getObjectPrototype(ctorObj));
return result;
}
NativeCall getActivation(NativeFunction f) {
NativeCall x = this;
do {
if (x.funObj == f)
return x;
x = x.caller;
} while (x != null);
return null;
}
public NativeFunction getFunctionObject() {
return funObj;
}
public Object[] getOriginalArguments() {
return originalArgs;
}
public NativeCall getCaller() {
return caller;
}
public Scriptable getThisObj() {
return thisObj;
}
NativeCall caller;
NativeFunction funObj;
Scriptable thisObj;
Object[] originalArgs;
public int debugPC;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,82 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Roger Lawrence
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
/**
*
* The class of error objects
*
* ECMA 15.11
*/
public class NativeError extends ScriptableObject {
public NativeError() {
}
public String getClassName() {
return "Error";
}
public String toString() {
return getName() + ": " + getMessage();
}
public String jsFunction_toString() {
return toString();
}
public String getName() {
return ScriptRuntime.toString(
ScriptRuntime.getProp(this, "name", this));
}
public String getMessage() {
return ScriptRuntime.toString(
ScriptRuntime.getProp(this, "message", this));
}
public static void finishInit(Scriptable scope, FunctionObject ctor,
Scriptable proto)
throws PropertyException
{
((ScriptableObject) proto).defineProperty("message", "",
ScriptableObject.EMPTY);
((ScriptableObject) proto).defineProperty("name", "Error",
ScriptableObject.EMPTY);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,758 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Mike McCabe
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.io.StringReader;
import java.io.IOException;
import java.lang.reflect.Method;
/**
* This class implements the global native object (function and value
* properties only).
*
* See ECMA 15.1.[12].
*
* @author Mike Shaver
*/
public class NativeGlobal {
public static void init(Scriptable scope)
throws PropertyException,
NotAFunctionException,
JavaScriptException
{
String names[] = { "eval",
"parseInt",
"parseFloat",
"escape",
"unescape",
"isNaN",
"isFinite",
"decodeURI",
"decodeURIComponent",
"encodeURI",
"encodeURIComponent"
};
// We can downcast here because Context.initStandardObjects
// takes a ScriptableObject scope.
ScriptableObject global = (ScriptableObject) scope;
global.defineFunctionProperties(names, NativeGlobal.class,
ScriptableObject.DONTENUM);
global.defineProperty("NaN", ScriptRuntime.NaNobj,
ScriptableObject.DONTENUM);
global.defineProperty("Infinity", new Double(Double.POSITIVE_INFINITY),
ScriptableObject.DONTENUM);
global.defineProperty("undefined", Undefined.instance,
ScriptableObject.DONTENUM);
String[] errorMethods = { "ConversionError",
"EvalError",
"RangeError",
"ReferenceError",
"SyntaxError",
"TypeError",
"URIError"
};
Method[] m = FunctionObject.findMethods(NativeGlobal.class,
"CommonError");
Context cx = Context.getContext();
/*
Each error constructor gets its own Error object as a prototype,
with the 'name' property set to the name of the error.
*/
for (int i = 0; i < errorMethods.length; i++) {
String name = errorMethods[i];
FunctionObject ctor = new FunctionObject(name, m[0], global);
global.defineProperty(name, ctor, ScriptableObject.DONTENUM);
Scriptable errorProto = cx.newObject(scope, "Error");
errorProto.put("name", errorProto, name);
ctor.put("prototype", ctor, errorProto);
}
}
/**
* The global method parseInt, as per ECMA-262 15.1.2.2.
*/
public static Object parseInt(String s, int radix) {
int len = s.length();
if (len == 0)
return ScriptRuntime.NaNobj;
boolean negative = false;
int start = 0;
char c;
do {
c = s.charAt(start);
if (!Character.isWhitespace(c))
break;
start++;
} while (start < len);
if (c == '+' || (negative = (c == '-')))
start++;
final int NO_RADIX = -1;
if (radix == 0) {
radix = NO_RADIX;
} else if (radix < 2 || radix > 36) {
return ScriptRuntime.NaNobj;
} else if (radix == 16 && len - start > 1 &&
s.charAt(start) == '0')
{
c = s.charAt(start+1);
if (c == 'x' || c == 'X')
start += 2;
}
if (radix == NO_RADIX) {
radix = 10;
if (len - start > 1 && s.charAt(start) == '0') {
c = s.charAt(start+1);
if (c == 'x' || c == 'X') {
radix = 16;
start += 2;
} else if (c != '.') {
radix = 8;
start++;
}
}
}
double d = ScriptRuntime.stringToNumber(s, start, radix);
return new Double(negative ? -d : d);
}
/**
* The global method parseFloat, as per ECMA-262 15.1.2.3.
*
* @param cx unused
* @param thisObj unused
* @param args the arguments to parseFloat, ignoring args[>=1]
* @param funObj unused
*/
public static Object parseFloat(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
if (args.length < 1)
return ScriptRuntime.NaNobj;
String s = ScriptRuntime.toString(args[0]);
int len = s.length();
if (len == 0)
return ScriptRuntime.NaNobj;
int i;
char c;
// Scan forward to the first digit or .
for (i=0; TokenStream.isJSSpace(c = s.charAt(i)) && i+1 < len; i++)
/* empty */
;
int start = i;
if (c == '+' || c == '-')
c = s.charAt(++i);
if (c == 'I') {
// check for "Infinity"
double d;
if (i+8 <= len && s.substring(i, i+8).equals("Infinity"))
d = s.charAt(start) == '-' ? Double.NEGATIVE_INFINITY
: Double.POSITIVE_INFINITY;
else
return ScriptRuntime.NaNobj;
return new Double(d);
}
// Find the end of the legal bit
int decimal = -1;
int exponent = -1;
for (; i < len; i++) {
switch (s.charAt(i)) {
case '.':
if (decimal != -1) // Only allow a single decimal point.
break;
decimal = i;
continue;
case 'e':
case 'E':
if (exponent != -1)
break;
exponent = i;
continue;
case '+':
case '-':
// Only allow '+' or '-' after 'e' or 'E'
if (exponent != i-1)
break;
continue;
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
continue;
default:
break;
}
break;
}
s = s.substring(start, i);
try {
return Double.valueOf(s);
}
catch (NumberFormatException ex) {
return ScriptRuntime.NaNobj;
}
}
/**
* The global method escape, as per ECMA-262 15.1.2.4.
* Includes code for the 'mask' argument supported by the C escape
* method, which used to be part of the browser imbedding. Blame
* for the strange constant names should be directed there.
*/
private static int
URL_XALPHAS = 1,
URL_XPALPHAS = 2,
URL_PATH = 4;
public static Object escape(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
char digits[] = {'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
if (args.length < 1)
args = ScriptRuntime.padArguments(args, 1);
String s = ScriptRuntime.toString(args[0]);
int mask = URL_XALPHAS | URL_XPALPHAS | URL_PATH;
if (args.length > 1) { // the 'mask' argument. Non-ECMA.
double d = ScriptRuntime.toNumber(args[1]);
if (d != d || ((mask = (int) d) != d) ||
0 != (mask & ~(URL_XALPHAS | URL_XPALPHAS | URL_PATH)))
{
String message = Context.getMessage
("msg.bad.esc.mask", null);
cx.reportError(message);
// do the ecma thing, in case reportError returns.
mask = URL_XALPHAS | URL_XPALPHAS | URL_PATH;
}
}
StringBuffer R = new StringBuffer();
for (int k = 0; k < s.length(); k++) {
char c = s.charAt(k);
if (mask != 0 &&
((c >= '0' && c <= '9') ||
(c >= 'A' && c <= 'Z') ||
(c >= 'a' && c <= 'z') ||
c == '@' || c == '*' || c == '_' ||
c == '-' || c == '.' ||
((c == '/' || c == '+') && mask > 3)))
R.append(c);
else if (c < 256) {
if (c == ' ' && mask == URL_XPALPHAS) {
R.append('+');
} else {
R.append('%');
R.append(digits[c >> 4]);
R.append(digits[c & 0xF]);
}
} else {
R.append('%');
R.append('u');
R.append(digits[c >> 12]);
R.append(digits[(c & 0xF00) >> 8]);
R.append(digits[(c & 0xF0) >> 4]);
R.append(digits[c & 0xF]);
}
}
return R.toString();
}
/**
* The global unescape method, as per ECMA-262 15.1.2.5.
*/
public static Object unescape(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
if (args.length < 1)
args = ScriptRuntime.padArguments(args, 1);
String s = ScriptRuntime.toString(args[0]);
StringBuffer R = new StringBuffer();
stringIter: for (int k = 0; k < s.length(); k++) {
char c = s.charAt(k);
if (c != '%' || k == s.length() -1) {
R.append(c);
continue;
}
String hex;
int end, start;
if (s.charAt(k+1) == 'u') {
start = k+2;
end = k+6;
} else {
start = k+1;
end = k+3;
}
if (end > s.length()) {
R.append('%');
continue;
}
hex = s.substring(start, end);
for (int i = 0; i < hex.length(); i++)
if (!TokenStream.isXDigit(hex.charAt(i))) {
R.append('%');
continue stringIter;
}
k = end - 1;
R.append((new Character((char) Integer.valueOf(hex, 16).intValue())));
}
return R.toString();
}
/**
* The global method isNaN, as per ECMA-262 15.1.2.6.
*/
public static Object isNaN(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
if (args.length < 1)
return Boolean.TRUE;
double d = ScriptRuntime.toNumber(args[0]);
return (d != d) ? Boolean.TRUE : Boolean.FALSE;
}
public static Object isFinite(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
if (args.length < 1)
return Boolean.FALSE;
double d = ScriptRuntime.toNumber(args[0]);
return (d != d || d == Double.POSITIVE_INFINITY ||
d == Double.NEGATIVE_INFINITY)
? Boolean.FALSE
: Boolean.TRUE;
}
public static Object eval(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
throws JavaScriptException
{
Object[] a = { "eval" };
String m = ScriptRuntime.getMessage("msg.cant.call.indirect", a);
throw NativeGlobal.constructError(cx, "EvalError", m, funObj);
}
/**
* The eval function property of the global object.
*
* See ECMA 15.1.2.1
*/
public static Object evalSpecial(Context cx, Scriptable scope,
Object thisArg, Object[] args,
String filename, int lineNumber)
throws JavaScriptException
{
if (args.length < 1)
return Undefined.instance;
Object x = args[0];
if (!(x instanceof String)) {
String message = Context.getMessage("msg.eval.nonstring", null);
Context.reportWarning(message);
return x;
}
int[] linep = { lineNumber };
if (filename == null) {
filename = Context.getSourcePositionFromStack(linep);
if (filename == null) {
filename = "<eval'ed string>";
linep[0] = 1;
}
}
try {
StringReader in = new StringReader((String) x);
Object securityDomain = cx.getSecurityDomainForStackDepth(3);
// Compile the reader with opt level of -1 to force interpreter
// mode.
int oldOptLevel = cx.getOptimizationLevel();
cx.setOptimizationLevel(-1);
Script script = cx.compileReader(scope, in, filename, linep[0],
securityDomain);
cx.setOptimizationLevel(oldOptLevel);
// if the compile fails, an error has been reported by the
// compiler, but we need to stop execution to avoid
// infinite looping on while(true) { eval('foo bar') } -
// so we throw an EvaluatorException.
if (script == null) {
String message = Context.getMessage("msg.syntax", null);
throw new EvaluatorException(message);
}
InterpretedScript is = (InterpretedScript) script;
is.itsData.itsFromEvalCode = true;
Object result = is.call(cx, scope, (Scriptable) thisArg, null);
return result;
}
catch (IOException ioe) {
// should never happen since we just made the Reader from a String
throw new RuntimeException("unexpected io exception");
}
}
/**
* The NativeError functions
*
* See ECMA 15.11.6
*/
public static EcmaError constructError(Context cx,
String error,
String message,
Object scope)
{
int[] linep = { 0 };
String filename = cx.getSourcePositionFromStack(linep);
return constructError(cx, error, message, scope,
filename, linep[0], 0, null);
}
/**
* The NativeError functions
*
* See ECMA 15.11.6
*/
public static EcmaError constructError(Context cx,
String error,
String message,
Object scope,
String sourceName,
int lineNumber,
int columnNumber,
String lineSource)
{
Scriptable scopeObject;
try {
scopeObject = (Scriptable) scope;
}
catch (ClassCastException x) {
throw new RuntimeException(x.toString());
}
Object args[] = { message };
try {
Object errorObject = cx.newObject(scopeObject, error, args);
return new EcmaError((NativeError)errorObject, sourceName,
lineNumber, columnNumber, lineSource);
}
catch (PropertyException x) {
throw new RuntimeException(x.toString());
}
catch (JavaScriptException x) {
throw new RuntimeException(x.toString());
}
catch (NotAFunctionException x) {
throw new RuntimeException(x.toString());
}
}
/**
* The implementation of all the ECMA error constructors (SyntaxError,
* TypeError, etc.)
*/
public static Object CommonError(Context cx, Object[] args,
Function ctorObj, boolean inNewExpr)
{
Scriptable newInstance = new NativeError();
newInstance.setPrototype((Scriptable)(ctorObj.get("prototype", ctorObj)));
newInstance.setParentScope(cx.ctorScope);
if (args.length > 0)
newInstance.put("message", newInstance, args[0]);
return newInstance;
}
/*
* ECMA 3, 15.1.3 URI Handling Function Properties
*
* The following are implementations of the algorithms
* given in the ECMA specification for the hidden functions
* 'Encode' and 'Decode'.
*/
private static String encode(Context cx, String str, String unescapedSet)
{
int j, k = 0, L;
char C, C2;
int V;
char utf8buf[] = new char[6];
StringBuffer R;
R = new StringBuffer();
while (k < str.length()) {
C = str.charAt(k);
if (unescapedSet.indexOf(C) != -1) {
R.append(C);
} else {
if ((C >= 0xDC00) && (C <= 0xDFFF)) {
throw cx.reportRuntimeError(
cx.getMessage("msg.bad.uri", null));
}
if ((C < 0xD800) || (C > 0xDBFF))
V = C;
else {
k++;
if (k == str.length()) {
throw cx.reportRuntimeError(
cx.getMessage("msg.bad.uri", null));
}
C2 = str.charAt(k);
if ((C2 < 0xDC00) || (C2 > 0xDFFF)) {
throw cx.reportRuntimeError(
cx.getMessage("msg.bad.uri", null));
}
V = ((C - 0xD800) << 10) + (C2 - 0xDC00) + 0x10000;
}
L = oneUcs4ToUtf8Char(utf8buf, V);
for (j = 0; j < L; j++) {
R.append('%');
if (utf8buf[j] < 16)
R.append('0');
R.append(Integer.toHexString(utf8buf[j]));
}
}
k++;
}
return R.toString();
}
private static boolean isHex(char c) {
return ((c >= '0' && c <= '9')
|| (c >= 'a' && c <= 'f')
|| (c >= 'A' && c <= 'F'));
}
private static int unHex(char c) {
if (c >= '0' && c <= '9')
return c - '0';
else
if (c >= 'a' && c <= 'f')
return c - 'a' + 10;
else
return c - 'A' +10;
}
private static String decode(Context cx, String str, String reservedSet)
{
int start, k = 0;
char C, H;
int V;
int B;
char[] octets = new char[6];
StringBuffer R;
int j, n;
R = new StringBuffer();
while (k < str.length()) {
C = str.charAt(k);
if (C == '%') {
start = k;
if ((k + 2) >= str.length())
throw cx.reportRuntimeError(
cx.getMessage("msg.bad.uri", null));
if (!isHex(str.charAt(k + 1)) || !isHex(str.charAt(k + 2)))
throw cx.reportRuntimeError(
cx.getMessage("msg.bad.uri", null));
B = unHex(str.charAt(k + 1)) * 16 + unHex(str.charAt(k + 2));
k += 2;
if ((B & 0x80) == 0)
C = (char)B;
else {
n = 1;
while ((B & (0x80 >>> n)) != 0) n++;
if ((n == 1) || (n > 6))
throw cx.reportRuntimeError(
cx.getMessage("msg.bad.uri", null));
octets[0] = (char)B;
if ((k + 3 * (n - 1)) >= str.length())
throw cx.reportRuntimeError(
cx.getMessage("msg.bad.uri", null));
for (j = 1; j < n; j++) {
k++;
if (str.charAt(k) != '%')
throw cx.reportRuntimeError(
cx.getMessage("msg.bad.uri", null));
if (!isHex(str.charAt(k + 1))
|| !isHex(str.charAt(k + 2)))
throw cx.reportRuntimeError(
cx.getMessage("msg.bad.uri", null));
B = unHex(str.charAt(k + 1)) * 16
+ unHex(str.charAt(k + 2));
if ((B & 0xC0) != 0x80)
throw cx.reportRuntimeError(
cx.getMessage("msg.bad.uri", null));
k += 2;
octets[j] = (char)B;
}
V = utf8ToOneUcs4Char(octets, n);
if (V >= 0x10000) {
V -= 0x10000;
if (V > 0xFFFFF)
throw cx.reportRuntimeError(
cx.getMessage("msg.bad.uri", null));
C = (char)((V & 0x3FF) + 0xDC00);
H = (char)((V >>> 10) + 0xD800);
R.append(H);
}
else
C = (char)V;
}
if (reservedSet.indexOf(C) != -1) {
for (int x = 0; x < (k - start + 1); x++)
R.append(str.charAt(start + x));
}
else
R.append(C);
}
else
R.append(C);
k++;
}
return R.toString();
}
private static String uriReservedPlusPound = ";/?:@&=+$,#";
private static String uriUnescaped =
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_.!~*'()";
public static String decodeURI(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
String str = ScriptRuntime.toString(args[0]);
return decode(cx, str, uriReservedPlusPound);
}
public static String decodeURIComponent(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
String str = ScriptRuntime.toString(args[0]);
return decode(cx, str, "");
}
public static Object encodeURI(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
String str = ScriptRuntime.toString(args[0]);
return encode(cx, str, uriReservedPlusPound + uriUnescaped);
}
public static String encodeURIComponent(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
String str = ScriptRuntime.toString(args[0]);
return encode(cx, str, uriUnescaped);
}
/* Convert one UCS-4 char and write it into a UTF-8 buffer, which must be
* at least 6 bytes long. Return the number of UTF-8 bytes of data written.
*/
private static int oneUcs4ToUtf8Char(char[] utf8Buffer, int ucs4Char)
{
int utf8Length = 1;
// JS_ASSERT(ucs4Char <= 0x7FFFFFFF);
if ((ucs4Char < 0x80) && (ucs4Char >= 0))
utf8Buffer[0] = (char)ucs4Char;
else {
int i;
int a = ucs4Char >>> 11;
utf8Length = 2;
while (a != 0) {
a >>>= 5;
utf8Length++;
}
i = utf8Length;
while (--i > 0) {
utf8Buffer[i] = (char)((ucs4Char & 0x3F) | 0x80);
ucs4Char >>>= 6;
}
utf8Buffer[0] = (char)(0x100 - (1 << (8-utf8Length)) + ucs4Char);
}
return utf8Length;
}
/* Convert a utf8 character sequence into a UCS-4 character and return that
* character. It is assumed that the caller already checked that the sequence is valid.
*/
private static int utf8ToOneUcs4Char(char[] utf8Buffer, int utf8Length)
{
int ucs4Char;
int k = 0;
// JS_ASSERT(utf8Length >= 1 && utf8Length <= 6);
if (utf8Length == 1) {
ucs4Char = utf8Buffer[0];
// JS_ASSERT(!(ucs4Char & 0x80));
} else {
// JS_ASSERT((*utf8Buffer & (0x100 - (1 << (7-utf8Length)))) == (0x100 - (1 << (8-utf8Length))));
ucs4Char = utf8Buffer[k++] & ((1<<(7-utf8Length))-1);
while (--utf8Length > 0) {
// JS_ASSERT((*utf8Buffer & 0xC0) == 0x80);
ucs4Char = ucs4Char<<6 | (utf8Buffer[k++] & 0x3F);
}
}
return ucs4Char;
}
}

View File

@@ -1,158 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Frank Mitchell
* Mike Shaver
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.lang.reflect.Array;
/**
* This class reflects Java arrays into the JavaScript environment.
*
* @author Mike Shaver
* @see NativeJavaClass
* @see NativeJavaObject
* @see NativeJavaPackage
*/
public class NativeJavaArray extends NativeJavaObject {
public String getClassName() {
return "JavaArray";
}
public static NativeJavaArray wrap(Scriptable scope, Object array) {
return new NativeJavaArray(scope, array);
}
public Object unwrap() {
return array;
}
public NativeJavaArray(Scriptable scope, Object array) {
super(scope, null, ScriptRuntime.ObjectClass);
Class cl = array.getClass();
if (!cl.isArray()) {
throw new RuntimeException("Array expected");
}
this.array = array;
this.length = Array.getLength(array);
this.cls = cl.getComponentType();
}
public boolean has(String id, Scriptable start) {
return id.equals("length") || super.has(id, start);
}
public boolean has(int index, Scriptable start) {
return 0 <= index && index < length;
}
public Object get(String id, Scriptable start) {
if (id.equals("length"))
return new Integer(length);
Object result = super.get(id, start);
if (result == NOT_FOUND &&
!ScriptRuntime.hasProp(getPrototype(), id))
{
Object errArgs[] = { array.getClass().getName(),
id };
throw Context.reportRuntimeError(
Context.getMessage("msg.java.member.not.found",
errArgs));
}
return result;
}
public Object get(int index, Scriptable start) {
if (0 <= index && index < length)
return NativeJavaObject.wrap(this, Array.get(array, index), cls);
return Undefined.instance;
}
public void put(String id, Scriptable start, Object value) {
// Ignore assignments to "length"--it's readonly.
if (!id.equals("length"))
super.put(id, start, value);
}
public void put(int index, Scriptable start, Object value) {
if (0 <= index && index < length) {
Array.set(array, index, NativeJavaObject.coerceType(cls, value));
return;
}
super.put(index, start, value);
}
public Object getDefaultValue(Class hint) {
if (hint == null || hint == ScriptRuntime.StringClass)
return array.toString();
if (hint == ScriptRuntime.BooleanClass)
return Boolean.TRUE;
if (hint == ScriptRuntime.NumberClass)
return ScriptRuntime.NaNobj;
return this;
}
public Object[] getIds() {
Object[] result = new Object[length];
int i = length;
while (--i >= 0)
result[i] = new Integer(i);
return result;
}
public boolean hasInstance(Scriptable value) {
if (!(value instanceof NativeJavaObject))
return false;
Object instance = ((NativeJavaObject)value).unwrap();
return cls.isInstance(instance);
}
public Scriptable getPrototype() {
if (prototype == null) {
prototype =
ScriptableObject.getClassPrototype(this.getParentScope(),
"Array");
}
return prototype;
}
Object array;
int length;
Class cls;
Scriptable prototype;
}

View File

@@ -1,283 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Frank Mitchell
* Mike Shaver
* Kurt Westerfeld
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.lang.reflect.*;
import java.util.Hashtable;
/**
* This class reflects Java classes into the JavaScript environment, mainly
* for constructors and static members. We lazily reflect properties,
* and currently do not guarantee that a single j.l.Class is only
* reflected once into the JS environment, although we should.
* The only known case where multiple reflections
* are possible occurs when a j.l.Class is wrapped as part of a
* method return or property access, rather than by walking the
* Packages/java tree.
*
* @author Mike Shaver
* @see NativeJavaArray
* @see NativeJavaObject
* @see NativeJavaPackage
*/
public class NativeJavaClass extends NativeJavaObject implements Function {
public NativeJavaClass(Scriptable scope, Class cl) {
super(scope, cl, JavaMembers.lookupClass(scope, cl, cl));
fieldAndMethods = members.getFieldAndMethodsObjects(this, javaObject,
true);
}
public String getClassName() {
return "JavaClass";
}
public boolean has(String name, Scriptable start) {
return members.has(name, true);
}
public Object get(String name, Scriptable start) {
// When used as a constructor, ScriptRuntime.newObject() asks
// for our prototype to create an object of the correct type.
// We don't really care what the object is, since we're returning
// one constructed out of whole cloth, so we return null.
if (name.equals("prototype"))
return null;
Object result = Scriptable.NOT_FOUND;
if (fieldAndMethods != null) {
result = fieldAndMethods.get(name);
if (result != null)
return result;
}
if (members.has(name, true)) {
result = members.get(this, name, javaObject, true);
} else {
// experimental: look for nested classes by appending $name to current class' name.
try {
String nestedName = getClassObject().getName() + '$' + name;
Class nestedClass = ScriptRuntime.loadClassName(nestedName);
Scriptable nestedValue = wrap(ScriptableObject.getTopLevelScope(this), nestedClass);
nestedValue.setParentScope(this);
result = nestedValue;
} catch (ClassNotFoundException ex) {
throw members.reportMemberNotFound(name);
} catch (IllegalArgumentException e) {
throw members.reportMemberNotFound(name);
}
}
return result;
}
public void put(String name, Scriptable start, Object value) {
members.put(name, javaObject, value, true);
}
public Object[] getIds() {
return members.getIds(true);
}
public Class getClassObject() {
return (Class) super.unwrap();
}
// XXX ??
public static NativeJavaClass wrap(Scriptable scope, Class cls) {
return new NativeJavaClass(scope, cls);
}
public Object getDefaultValue(Class hint) {
if (hint == null || hint == ScriptRuntime.StringClass)
return this.toString();
if (hint == ScriptRuntime.BooleanClass)
return Boolean.TRUE;
if (hint == ScriptRuntime.NumberClass)
return ScriptRuntime.NaNobj;
return this;
}
public Object call(Context cx, Scriptable scope, Scriptable thisObj,
Object[] args)
throws JavaScriptException
{
// If it looks like a "cast" of an object to this class type,
// walk the prototype chain to see if there's a wrapper of a
// object that's an instanceof this class.
if (args.length == 1 && args[0] instanceof Scriptable) {
Class c = getClassObject();
Scriptable p = (Scriptable) args[0];
do {
if (p instanceof Wrapper) {
Object o = ((Wrapper) p).unwrap();
if (c.isInstance(o))
return p;
}
p = p.getPrototype();
} while (p != null);
}
return construct(cx, scope, args);
}
public Scriptable construct(Context cx, Scriptable scope, Object[] args)
throws JavaScriptException
{
Class classObject = getClassObject();
int modifiers = classObject.getModifiers();
if (! (Modifier.isInterface(modifiers) ||
Modifier.isAbstract(modifiers)))
{
Constructor[] ctors = members.getConstructors();
Member member = NativeJavaMethod.findFunction(ctors, args);
Constructor ctor = (Constructor) member;
if (ctor == null) {
String sig = NativeJavaMethod.scriptSignature(args);
Object errArgs[] = { classObject.getName(), sig };
throw Context.reportRuntimeError(Context.getMessage(
"msg.no.java.ctor", errArgs));
}
// Found the constructor, so try invoking it.
return NativeJavaClass.constructSpecific(cx, scope,
this, ctor, args);
} else {
Scriptable topLevel = ScriptableObject.getTopLevelScope(this);
String msg = "";
try {
// trying to construct an interface; use JavaAdapter to
// construct a new class on the fly that implements this
// interface.
Object v = topLevel.get("JavaAdapter", topLevel);
if (v != NOT_FOUND) {
Function f = (Function) v;
Object[] adapterArgs = { this, args[0] };
return (Scriptable) f.construct(cx, topLevel,
adapterArgs);
}
} catch (Exception ex) {
// fall through to error
String m = ex.getMessage();
if (m != null)
msg = m;
}
Object[] errArgs = { msg, classObject.getName() };
throw Context.reportRuntimeError(Context.getMessage
("msg.cant.instantiate",
errArgs));
}
}
public static Scriptable constructSpecific(Context cx,
Scriptable scope,
Scriptable thisObj,
Constructor ctor,
Object[] args)
throws JavaScriptException
{
Scriptable topLevel = ScriptableObject.getTopLevelScope(thisObj);
Class classObject = ctor.getDeclaringClass();
Class[] paramTypes = ctor.getParameterTypes();
for (int i = 0; i < args.length; i++) {
args[i] = NativeJavaObject.coerceType(paramTypes[i], args[i]);
}
try {
// we need to force this to be wrapped, because construct _has_
// to return a scriptable
return
(Scriptable) NativeJavaObject.wrap(topLevel,
ctor.newInstance(args),
classObject);
} catch (InstantiationException instEx) {
Object[] errArgs = { instEx.getMessage(),
classObject.getName() };
throw Context.reportRuntimeError(Context.getMessage
("msg.cant.instantiate",
errArgs));
} catch (IllegalArgumentException argEx) {
String signature = NativeJavaMethod.scriptSignature(args);
String ctorString = ctor.toString();
Object[] errArgs = { argEx.getMessage(),ctorString,signature };
throw Context.reportRuntimeError(Context.getMessage
("msg.bad.ctor.sig",
errArgs));
} catch (InvocationTargetException e) {
throw JavaScriptException.wrapException(scope, e);
} catch (IllegalAccessException accessEx) {
Object[] errArgs = { accessEx.getMessage() };
throw Context.reportRuntimeError(Context.getMessage
("msg.java.internal.private", errArgs));
}
}
public String toString() {
return "[JavaClass " + getClassObject().getName() + "]";
}
/**
* Determines if prototype is a wrapped Java object and performs
* a Java "instanceof".
* Exception: if value is an instance of NativeJavaClass, it isn't
* considered an instance of the Java class; this forestalls any
* name conflicts between java.lang.Class's methods and the
* static methods exposed by a JavaNativeClass.
*/
public boolean hasInstance(Scriptable value) {
if (value instanceof NativeJavaObject &&
!(value instanceof NativeJavaClass)) {
Object instance = ((NativeJavaObject)value).unwrap();
return getClassObject().isInstance(instance);
}
// value wasn't something we understand
return false;
}
private Hashtable fieldAndMethods;
// beard: need a scope for finding top-level prototypes.
private Scriptable parent;
}

View File

@@ -1,100 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Frank Mitchell
* Mike Shaver
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.lang.reflect.*;
/**
* This class reflects a single Java constructor into the JavaScript
* environment. It satisfies a request for an overloaded constructor,
* as introduced in LiveConnect 3.
* All NativeJavaConstructors behave as JSRef `bound' methods, in that they
* always construct the same NativeJavaClass regardless of any reparenting
* that may occur.
*
* @author Frank Mitchell
* @see NativeJavaMethod
* @see NativeJavaPackage
* @see NativeJavaClass
*/
public class NativeJavaConstructor extends NativeFunction implements Function {
public NativeJavaConstructor(Constructor ctor) {
this.constructor = ctor;
names = new String[1];
names[0] = "<init>" + NativeJavaMethod.signature(ctor);
}
public Object call(Context cx, Scriptable scope, Scriptable thisObj,
Object[] args)
throws JavaScriptException
{
// Find a method that matches the types given.
if (constructor == null) {
throw new RuntimeException("No constructor defined for call");
}
// Eliminate useless args[0] and unwrap if required
for (int i = 0; i < args.length; i++) {
if (args[i] instanceof Wrapper) {
args[i] = ((Wrapper)args[i]).unwrap();
}
}
return NativeJavaClass.constructSpecific(cx, scope,
this, constructor, args);
}
/*
public Object getDefaultValue(Class hint) {
return this;
}
*/
public String toString() {
return "[JavaConstructor " + constructor.getName() + "]";
}
Constructor getConstructor() {
return constructor;
}
Constructor constructor;
}

View File

@@ -1,505 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Frank Mitchell
* Mike Shaver
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.lang.reflect.*;
/**
* This class reflects Java methods into the JavaScript environment. It
* handles overloading of methods, and method/field name conflicts.
* All NativeJavaMethods behave as JSRef `bound' methods, in that they
* always operate on the object underlying the original NativeJavaObject
* parent regardless of any reparenting that may occur.
*
* @author Mike Shaver
* @see NativeJavaArray
* @see NativeJavaPackage
* @see NativeJavaClass
*/
public class NativeJavaMethod extends NativeFunction implements Function {
public NativeJavaMethod() {
names = new String[1];
}
public NativeJavaMethod(Method[] methods) {
this.methods = methods;
names = new String[1];
names[0] = methods[0].getName();
}
public NativeJavaMethod(Method method, String name) {
this.methods = new Method[1];
this.methods[0] = method;
names = new String[1];
names[0] = name;
}
public void add(Method method) {
if (names[0] == null) {
names[0] = method.getName();
} else if (!names[0].equals(method.getName())) {
throw new RuntimeException("internal method name mismatch");
}
// XXX a more intelligent growth algorithm would be nice
int len = methods == null ? 0 : methods.length;
Method[] newMeths = new Method[len + 1];
for (int i = 0; i < len; i++)
newMeths[i] = methods[i];
newMeths[len] = method;
methods = newMeths;
}
static String scriptSignature(Object value) {
if (value == null) {
return "null";
}
else {
Class type = value.getClass();
if (type == ScriptRuntime.UndefinedClass)
return "undefined";
if (type == ScriptRuntime.BooleanClass)
return "boolean";
if (type == ScriptRuntime.StringClass)
return "string";
if (ScriptRuntime.NumberClass.isAssignableFrom(type))
return "number";
if (value instanceof NativeJavaObject) {
return ((NativeJavaObject)value).unwrap().getClass().getName();
}
if (value instanceof Scriptable) {
if (value instanceof Function)
return "function";
return "object";
}
return javaSignature(type);
}
}
static String scriptSignature(Object[] values) {
StringBuffer sig = new StringBuffer();
for (int i = 0; i < values.length; i++) {
if (i != 0)
sig.append(',');
sig.append(scriptSignature(values[i]));
}
return sig.toString();
}
static String javaSignature(Class type) {
if (type == null) {
return "null";
}
else if (type.isArray()) {
return javaSignature(type.getComponentType()) + "[]";
}
return type.getName();
}
static String javaSignature(Class[] types) {
StringBuffer sig = new StringBuffer();
for (int i = 0; i < types.length; i++) {
if (i != 0)
sig.append(',');
sig.append(javaSignature(types[i]));
}
return sig.toString();
}
static String signature(Member member) {
Class paramTypes[];
if (member instanceof Method) {
paramTypes = ((Method) member).getParameterTypes();
return member.getName() + "(" + javaSignature(paramTypes) + ")";
}
else {
paramTypes = ((Constructor) member).getParameterTypes();
return "(" + javaSignature(paramTypes) + ")";
}
}
public String toString() {
StringBuffer sb = new StringBuffer();
for (int i=0; i < methods.length; i++) {
sb.append(javaSignature(methods[i].getReturnType()));
sb.append(' ');
sb.append(signature(methods[i]));
sb.append('\n');
}
return sb.toString();
}
public Object call(Context cx, Scriptable scope, Scriptable thisObj,
Object[] args)
throws JavaScriptException
{
// Find a method that matches the types given.
if (methods.length == 0) {
throw new RuntimeException("No methods defined for call");
}
Method meth = (Method) findFunction(methods, args);
if (meth == null) {
Class c = methods[0].getDeclaringClass();
String sig = c.getName() + "." + names[0] + "(" +
scriptSignature(args) + ")";
Object errArgs[] = { sig };
throw Context.reportRuntimeError(
Context.getMessage("msg.java.no_such_method", errArgs));
}
// OPT: already retrieved in findFunction, so we should inline that
// OPT: or pass it back somehow
Class paramTypes[] = meth.getParameterTypes();
// First, we marshall the args.
for (int i = 0; i < args.length; i++) {
args[i] = NativeJavaObject.coerceType(paramTypes[i], args[i]);
}
Object javaObject;
if (Modifier.isStatic(meth.getModifiers())) {
javaObject = null; // don't need an object
} else {
Scriptable o = thisObj;
while (!(o instanceof NativeJavaObject)) {
o = o.getPrototype();
if (o == null) {
Object errArgs[] = { names[0] };
throw Context.reportRuntimeError(
Context.getMessage("msg.nonjava.method", errArgs));
}
}
javaObject = ((NativeJavaObject) o).unwrap();
}
try {
if (debug) {
printDebug("Calling ", meth, args);
}
Object retval = meth.invoke(javaObject, args);
Class staticType = meth.getReturnType();
if (debug) {
Class actualType = (retval == null) ? null : retval.getClass();
System.err.println(" ----- Returned " + retval +
" actual = " + actualType +
" expect = " + staticType);
}
Object wrapped = NativeJavaObject.wrap(scope, retval, staticType);
if (debug) {
Class actualType = (wrapped == null) ? null : wrapped.getClass();
System.err.println(" ----- Wrapped as " + wrapped +
" class = " + actualType);
}
if (wrapped == Undefined.instance)
return wrapped;
if (wrapped == null && staticType == Void.TYPE)
return Undefined.instance;
return wrapped;
} catch (IllegalAccessException accessEx) {
throw Context.reportRuntimeError(accessEx.getMessage());
} catch (InvocationTargetException e) {
throw JavaScriptException.wrapException(scope, e);
}
}
/**
* Find the correct function to call given the set of methods
* or constructors and the arguments.
* If no function can be found to call, return null.
*/
static Member findFunction(Member[] methodsOrCtors, Object[] args) {
if (methodsOrCtors.length == 0)
return null;
boolean hasMethods = methodsOrCtors[0] instanceof Method;
if (Context.useJSObject &&
NativeJavaObject.jsObjectClass != null)
{
try {
for (int i = 0; i < args.length; i++) {
if (NativeJavaObject.jsObjectClass.isInstance(args[i]))
args[i] = NativeJavaObject.jsObjectGetScriptable.invoke(
args[i], ScriptRuntime.emptyArgs);
}
}
catch (InvocationTargetException e) {
// Just abandon conversion from JSObject
}
catch (IllegalAccessException e) {
// Just abandon conversion from JSObject
}
}
Member bestFit = null;
Class[] bestFitTypes = null;
java.util.Vector ambiguousMethods = null;
for (int i = 0; i < methodsOrCtors.length; i++) {
Member member = methodsOrCtors[i];
Class paramTypes[] = hasMethods
? ((Method) member).getParameterTypes()
: ((Constructor) member).getParameterTypes();
if (paramTypes.length != args.length) {
continue;
}
if (bestFitTypes == null) {
int j;
for (j = 0; j < paramTypes.length; j++) {
if (!NativeJavaObject.canConvert(args[j], paramTypes[j])) {
if (debug) printDebug("Rejecting (args can't convert) ",
member, args);
break;
}
}
if (j == paramTypes.length) {
if (debug) printDebug("Found ", member, args);
bestFit = member;
bestFitTypes = paramTypes;
}
}
else {
int preference =
NativeJavaMethod.preferSignature(args,
paramTypes,
bestFitTypes);
if (preference == PREFERENCE_AMBIGUOUS) {
if (debug) printDebug("Deferring ", member, args);
// add to "ambiguity list"
if (ambiguousMethods == null)
ambiguousMethods = new java.util.Vector();
ambiguousMethods.addElement(member);
}
else if (preference == PREFERENCE_FIRST_ARG) {
if (debug) printDebug("Substituting ", member, args);
bestFit = member;
bestFitTypes = paramTypes;
}
else {
if (preference == PREFERENCE_EQUAL &&
Modifier.isStatic(bestFit.getModifiers()) &&
bestFit.getDeclaringClass().isAssignableFrom(
member.getDeclaringClass()))
{
// On some JVMs, Class.getMethods will return all
// static methods of the class heirarchy, even if
// a derived class's parameters match exactly.
// We want to call the dervied class's method.
if (debug) printDebug("Rejecting (overridden static)",
member, args);
bestFit = member;
bestFitTypes = paramTypes;
} else {
if (debug) printDebug("Rejecting ", member, args);
}
}
}
}
if (ambiguousMethods == null)
return bestFit;
// Compare ambiguous methods with best fit, in case
// the current best fit removes the ambiguities.
for (int i = ambiguousMethods.size() - 1; i >= 0 ; i--) {
Member member = (Member)ambiguousMethods.elementAt(i);
Class paramTypes[] = hasMethods
? ((Method) member).getParameterTypes()
: ((Constructor) member).getParameterTypes();
int preference =
NativeJavaMethod.preferSignature(args,
paramTypes,
bestFitTypes);
if (preference == PREFERENCE_FIRST_ARG) {
if (debug) printDebug("Substituting ", member, args);
bestFit = member;
bestFitTypes = paramTypes;
ambiguousMethods.removeElementAt(i);
}
else if (preference == PREFERENCE_SECOND_ARG) {
if (debug) printDebug("Rejecting ", member, args);
ambiguousMethods.removeElementAt(i);
}
else {
if (debug) printDebug("UNRESOLVED: ", member, args);
}
}
if (ambiguousMethods.size() > 0) {
// PENDING: report remaining ambiguity
StringBuffer buf = new StringBuffer();
boolean isCtor = (bestFit instanceof Constructor);
ambiguousMethods.addElement(bestFit);
for (int i = 0; i < ambiguousMethods.size(); i++) {
if (i != 0) {
buf.append(", ");
}
Member member = (Member)ambiguousMethods.elementAt(i);
if (!isCtor) {
Class rtnType = ((Method)member).getReturnType();
buf.append(rtnType);
buf.append(' ');
}
buf.append(NativeJavaMethod.signature(member));
}
String errMsg;
if (isCtor) {
Object errArgs[] = {
bestFit.getName(),
NativeJavaMethod.scriptSignature(args),
buf.toString()
};
errMsg =
Context.getMessage("msg.constructor.ambiguous", errArgs);
}
else {
Object errArgs[] = {
bestFit.getDeclaringClass().getName(),
bestFit.getName(),
NativeJavaMethod.scriptSignature(args),
buf.toString()
};
errMsg = Context.getMessage("msg.method.ambiguous", errArgs);
}
throw
Context.reportRuntimeError(errMsg);
}
return bestFit;
}
/** Types are equal */
static final int PREFERENCE_EQUAL = 0;
static final int PREFERENCE_FIRST_ARG = 1;
static final int PREFERENCE_SECOND_ARG = 2;
/** No clear "easy" conversion */
static final int PREFERENCE_AMBIGUOUS = 3;
/**
* Determine which of two signatures is the closer fit.
* Returns one of PREFERENCE_EQUAL, PREFERENCE_FIRST_ARG,
* PREFERENCE_SECOND_ARG, or PREFERENCE_AMBIGUOUS.
*/
public static int preferSignature(Object[] args,
Class[] sig1, Class[] sig2)
{
int preference = 0;
for (int j = 0; j < args.length; j++) {
Class type1 = sig1[j];
Class type2 = sig2[j];
if (type1 == type2) {
continue;
}
preference |=
NativeJavaMethod.preferConversion(args[j],
type1,
type2);
if (preference == PREFERENCE_AMBIGUOUS) {
break;
}
}
return preference;
}
/**
* Determine which of two types is the easier conversion.
* Returns one of PREFERENCE_EQUAL, PREFERENCE_FIRST_ARG,
* PREFERENCE_SECOND_ARG, or PREFERENCE_AMBIGUOUS.
*/
public static int preferConversion(Object fromObj,
Class toClass1, Class toClass2) {
int rank1 =
NativeJavaObject.getConversionWeight(fromObj, toClass1);
int rank2 =
NativeJavaObject.getConversionWeight(fromObj, toClass2);
if (rank1 == NativeJavaObject.CONVERSION_NONTRIVIAL &&
rank2 == NativeJavaObject.CONVERSION_NONTRIVIAL) {
if (toClass1.isAssignableFrom(toClass2)) {
return PREFERENCE_SECOND_ARG;
}
else if (toClass2.isAssignableFrom(toClass1)) {
return PREFERENCE_FIRST_ARG;
}
}
else {
if (rank1 < rank2) {
return PREFERENCE_FIRST_ARG;
}
else if (rank1 > rank2) {
return PREFERENCE_SECOND_ARG;
}
}
return PREFERENCE_AMBIGUOUS;
}
Method[] getMethods() {
return methods;
}
private static final boolean debug = false;
private static void printDebug(String msg, Member member, Object[] args) {
if (debug) {
System.err.println(" ----- " + msg +
member.getDeclaringClass().getName() +
"." + signature(member) +
" for arguments (" + scriptSignature(args) + ")");
}
}
Method methods[];
}

View File

@@ -1,921 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Frank Mitchell
* Mike Shaver
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.lang.reflect.*;
import java.util.Hashtable;
import java.util.Enumeration;
/**
* This class reflects non-Array Java objects into the JavaScript environment. It
* reflect fields directly, and uses NativeJavaMethod objects to reflect (possibly
* overloaded) methods.<p>
*
* @author Mike Shaver
* @see NativeJavaArray
* @see NativeJavaPackage
* @see NativeJavaClass
*/
public class NativeJavaObject implements Scriptable, Wrapper {
public NativeJavaObject(Scriptable scope, Object javaObject,
JavaMembers members)
{
this.parent = scope;
this.javaObject = javaObject;
this.members = members;
}
public NativeJavaObject(Scriptable scope, Object javaObject,
Class staticType)
{
this.parent = scope;
this.javaObject = javaObject;
Class dynamicType = javaObject != null ? javaObject.getClass()
: staticType;
members = JavaMembers.lookupClass(scope, dynamicType, staticType);
fieldAndMethods = members.getFieldAndMethodsObjects(this, javaObject, false);
}
public boolean has(String name, Scriptable start) {
return members.has(name, false);
}
public boolean has(int index, Scriptable start) {
return false;
}
public Object get(String name, Scriptable start) {
if (fieldAndMethods != null) {
Object result = fieldAndMethods.get(name);
if (result != null) {
return result;
}
}
// TODO: passing 'this' as the scope is bogus since it has
// no parent scope
return members.get(this, name, javaObject, false);
}
public Object get(int index, Scriptable start) {
throw members.reportMemberNotFound(Integer.toString(index));
}
public void put(String name, Scriptable start, Object value) {
members.put(name, javaObject, value, false);
}
public void put(int index, Scriptable start, Object value) {
throw members.reportMemberNotFound(Integer.toString(index));
}
public boolean hasInstance(Scriptable value) {
// This is an instance of a Java class, so always return false
return false;
}
public void delete(String name) {
}
public void delete(int index) {
}
public Scriptable getPrototype() {
if (prototype == null && javaObject.getClass() == ScriptRuntime.StringClass) {
return ScriptableObject.getClassPrototype(parent, "String");
}
return prototype;
}
/**
* Sets the prototype of the object.
*/
public void setPrototype(Scriptable m) {
prototype = m;
}
/**
* Returns the parent (enclosing) scope of the object.
*/
public Scriptable getParentScope() {
return parent;
}
/**
* Sets the parent (enclosing) scope of the object.
*/
public void setParentScope(Scriptable m) {
parent = m;
}
public Object[] getIds() {
return members.getIds(false);
}
public static Object wrap(Scriptable scope, Object obj, Class staticType)
{
if (obj == null)
return obj;
Context cx = Context.getCurrentContext();
if (cx != null && cx.wrapHandler != null) {
Object result = cx.wrapHandler.wrap(scope, obj, staticType);
if (result != null)
return result;
}
Class cls = obj.getClass();
if (staticType != null && staticType.isPrimitive()) {
if (staticType == Void.TYPE)
return Undefined.instance;
if (staticType == Character.TYPE)
return new Integer((int) ((Character) obj).charValue());
return obj;
}
if (cls.isArray())
return NativeJavaArray.wrap(scope, obj);
if (obj instanceof Scriptable)
return obj;
if (Context.useJSObject && jsObjectClass != null &&
staticType != jsObjectClass && jsObjectClass.isInstance(obj))
{
try {
return jsObjectGetScriptable.invoke(obj, ScriptRuntime.emptyArgs);
}
catch (InvocationTargetException e) {
// Just abandon conversion from JSObject
}
catch (IllegalAccessException e) {
// Just abandon conversion from JSObject
}
}
return new NativeJavaObject(scope, obj, staticType);
}
public Object unwrap() {
return javaObject;
}
public String getClassName() {
return "JavaObject";
}
Function getConverter(String converterName) {
Object converterFunction = get(converterName, this);
if (converterFunction instanceof Function) {
return (Function) converterFunction;
}
return null;
}
Object callConverter(Function converterFunction)
throws JavaScriptException
{
Function f = (Function) converterFunction;
return f.call(Context.getContext(), f.getParentScope(),
this, new Object[0]);
}
Object callConverter(String converterName)
throws JavaScriptException
{
Function converter = getConverter(converterName);
if (converter == null) {
Object[] errArgs = { converterName, javaObject.getClass().getName() };
throw Context.reportRuntimeError(
Context.getMessage("msg.java.conversion.implicit_method",
errArgs));
}
return callConverter(converter);
}
public Object getDefaultValue(Class hint) {
if (hint == null || hint == ScriptRuntime.StringClass)
return javaObject.toString();
try {
if (hint == ScriptRuntime.BooleanClass)
return callConverter("booleanValue");
if (hint == ScriptRuntime.NumberClass) {
return callConverter("doubleValue");
}
// fall through to error message
} catch (JavaScriptException jse) {
// fall through to error message
}
throw Context.reportRuntimeError(
Context.getMessage("msg.default.value", null));
}
/**
* Determine whether we can/should convert between the given type and the
* desired one. This should be superceded by a conversion-cost calculation
* function, but for now I'll hide behind precedent.
*/
public static boolean canConvert(Object fromObj, Class to) {
int weight = NativeJavaObject.getConversionWeight(fromObj, to);
return (weight < CONVERSION_NONE);
}
static final int JSTYPE_UNDEFINED = 0; // undefined type
static final int JSTYPE_NULL = 1; // null
static final int JSTYPE_BOOLEAN = 2; // boolean
static final int JSTYPE_NUMBER = 3; // number
static final int JSTYPE_STRING = 4; // string
static final int JSTYPE_JAVA_CLASS = 5; // JavaClass
static final int JSTYPE_JAVA_OBJECT = 6; // JavaObject
static final int JSTYPE_JAVA_ARRAY = 7; // JavaArray
static final int JSTYPE_OBJECT = 8; // Scriptable
public static final byte CONVERSION_TRIVIAL = 1;
public static final byte CONVERSION_NONTRIVIAL = 0;
public static final byte CONVERSION_NONE = 99;
/**
* Derive a ranking based on how "natural" the conversion is.
* The special value CONVERSION_NONE means no conversion is possible,
* and CONVERSION_NONTRIVIAL signals that more type conformance testing
* is required.
* Based on
* <a href="http://www.mozilla.org/js/liveconnect/lc3_method_overloading.html">
* "preferred method conversions" from Live Connect 3</a>
*/
public static int getConversionWeight(Object fromObj, Class to) {
int fromCode = NativeJavaObject.getJSTypeCode(fromObj);
int result = CONVERSION_NONE;
switch (fromCode) {
case JSTYPE_UNDEFINED:
if (to == ScriptRuntime.StringClass ||
to == ScriptRuntime.ObjectClass) {
result = 1;
}
break;
case JSTYPE_NULL:
if (!to.isPrimitive()) {
result = 1;
}
break;
case JSTYPE_BOOLEAN:
// "boolean" is #1
if (to == Boolean.TYPE) {
result = 1;
}
else if (to == ScriptRuntime.BooleanClass) {
result = 2;
}
else if (to == ScriptRuntime.ObjectClass) {
result = 3;
}
else if (to == ScriptRuntime.StringClass) {
result = 4;
}
break;
case JSTYPE_NUMBER:
if (to.isPrimitive()) {
if (to == Double.TYPE) {
result = 1;
}
else if (to != Boolean.TYPE) {
result = 1 + NativeJavaObject.getSizeRank(to);
}
}
else {
if (to == ScriptRuntime.StringClass) {
// native numbers are #1-8
result = 9;
}
else if (to == ScriptRuntime.ObjectClass) {
result = 10;
}
else if (ScriptRuntime.NumberClass.isAssignableFrom(to)) {
// "double" is #1
result = 2;
}
}
break;
case JSTYPE_STRING:
if (to == ScriptRuntime.StringClass) {
result = 1;
}
else if (to == ScriptRuntime.ObjectClass) {
result = 2;
}
else if (to.isPrimitive() && to != Boolean.TYPE) {
if (to == Character.TYPE) {
result = 3;
}
else {
result = 4;
}
}
break;
case JSTYPE_JAVA_CLASS:
if (to == ScriptRuntime.ClassClass) {
result = 1;
}
else if (Context.useJSObject && jsObjectClass != null &&
jsObjectClass.isAssignableFrom(to)) {
result = 2;
}
else if (to == ScriptRuntime.ObjectClass) {
result = 3;
}
else if (to == ScriptRuntime.StringClass) {
result = 4;
}
break;
case JSTYPE_JAVA_OBJECT:
case JSTYPE_JAVA_ARRAY:
if (to == ScriptRuntime.StringClass) {
result = 2;
}
else if (to.isPrimitive() && to != Boolean.TYPE) {
result =
(fromCode == JSTYPE_JAVA_ARRAY) ?
CONVERSION_NONTRIVIAL :
2 + NativeJavaObject.getSizeRank(to);
}
else {
Object javaObj = fromObj;
if (javaObj instanceof NativeJavaObject) {
javaObj = ((NativeJavaObject)javaObj).unwrap();
}
if (to.isInstance(javaObj)) {
result = CONVERSION_NONTRIVIAL;
}
}
break;
case JSTYPE_OBJECT:
// Other objects takes #1-#3 spots
if (Context.useJSObject && jsObjectClass != null &&
jsObjectClass.isAssignableFrom(to)) {
result = 1;
}
else if (fromObj instanceof NativeArray && to.isArray()) {
// This is a native array conversion to a java array
// Array conversions are all equal, and preferable to object
// and string conversion, per LC3.
result = 1;
}
else if (to == ScriptRuntime.ObjectClass) {
result = 2;
}
else if (to == ScriptRuntime.StringClass) {
result = 3;
}
else if (to.isPrimitive() || to != Boolean.TYPE) {
result = 3 + NativeJavaObject.getSizeRank(to);
}
break;
}
return result;
}
static int getSizeRank(Class aType) {
if (aType == Double.TYPE) {
return 1;
}
else if (aType == Float.TYPE) {
return 2;
}
else if (aType == Long.TYPE) {
return 3;
}
else if (aType == Integer.TYPE) {
return 4;
}
else if (aType == Short.TYPE) {
return 5;
}
else if (aType == Character.TYPE) {
return 6;
}
else if (aType == Byte.TYPE) {
return 7;
}
else if (aType == Boolean.TYPE) {
return CONVERSION_NONE;
}
else {
return 8;
}
}
static int getJSTypeCode(Object value) {
if (value == null) {
return JSTYPE_NULL;
}
else if (value == Undefined.instance) {
return JSTYPE_UNDEFINED;
}
else if (value instanceof Scriptable) {
if (value instanceof NativeJavaClass) {
return JSTYPE_JAVA_CLASS;
}
else if (value instanceof NativeJavaArray) {
return JSTYPE_JAVA_ARRAY;
}
else if (value instanceof NativeJavaObject) {
return JSTYPE_JAVA_OBJECT;
}
else {
return JSTYPE_OBJECT;
}
}
else {
Class valueClass = value.getClass();
if (valueClass == ScriptRuntime.StringClass) {
return JSTYPE_STRING;
}
else if (valueClass == ScriptRuntime.BooleanClass) {
return JSTYPE_BOOLEAN;
}
else if (value instanceof Number) {
return JSTYPE_NUMBER;
}
else if (valueClass == ScriptRuntime.ClassClass) {
return JSTYPE_JAVA_CLASS;
}
else if (valueClass.isArray()) {
return JSTYPE_JAVA_ARRAY;
}
else {
return JSTYPE_JAVA_OBJECT;
}
}
}
/**
* Type-munging for field setting and method invocation.
* Conforms to LC3 specification
*/
public static Object coerceType(Class type, Object value) {
if (value != null && value.getClass() == type) {
return value;
}
switch (NativeJavaObject.getJSTypeCode(value)) {
case JSTYPE_NULL:
// raise error if type.isPrimitive()
if (type.isPrimitive()) {
reportConversionError(value, type);
}
return null;
case JSTYPE_UNDEFINED:
if (type == ScriptRuntime.StringClass ||
type == ScriptRuntime.ObjectClass) {
return "undefined";
}
else {
reportConversionError("undefined", type);
}
break;
case JSTYPE_BOOLEAN:
// Under LC3, only JS Booleans can be coerced into a Boolean value
if (type == Boolean.TYPE ||
type == ScriptRuntime.BooleanClass ||
type == ScriptRuntime.ObjectClass) {
return value;
}
else if (type == ScriptRuntime.StringClass) {
return value.toString();
}
else {
reportConversionError(value, type);
}
break;
case JSTYPE_NUMBER:
if (type == ScriptRuntime.StringClass) {
return ScriptRuntime.toString(value);
}
else if (type == ScriptRuntime.ObjectClass) {
return coerceToNumber(Double.TYPE, value);
}
else if ((type.isPrimitive() && type != Boolean.TYPE) ||
ScriptRuntime.NumberClass.isAssignableFrom(type)) {
return coerceToNumber(type, value);
}
else {
reportConversionError(value, type);
}
break;
case JSTYPE_STRING:
if (type == ScriptRuntime.StringClass ||
type == ScriptRuntime.ObjectClass) {
return value;
}
else if (type == Character.TYPE ||
type == ScriptRuntime.CharacterClass) {
// Special case for converting a single char string to a
// character
// Placed here because it applies *only* to JS strings,
// not other JS objects converted to strings
if (((String)value).length() == 1) {
return new Character(((String)value).charAt(0));
}
else {
return coerceToNumber(type, value);
}
}
else if ((type.isPrimitive() && type != Boolean.TYPE) ||
ScriptRuntime.NumberClass.isAssignableFrom(type)) {
return coerceToNumber(type, value);
}
else {
reportConversionError(value, type);
}
break;
case JSTYPE_JAVA_CLASS:
if (Context.useJSObject && jsObjectClass != null &&
(type == ScriptRuntime.ObjectClass ||
jsObjectClass.isAssignableFrom(type))) {
return coerceToJSObject(type, (Scriptable)value);
}
else {
if (value instanceof Wrapper) {
value = ((Wrapper)value).unwrap();
}
if (type == ScriptRuntime.ClassClass ||
type == ScriptRuntime.ObjectClass) {
return value;
}
else if (type == ScriptRuntime.StringClass) {
return value.toString();
}
else {
reportConversionError(value, type);
}
}
break;
case JSTYPE_JAVA_OBJECT:
case JSTYPE_JAVA_ARRAY:
if (type.isPrimitive()) {
if (type == Boolean.TYPE) {
reportConversionError(value, type);
}
return coerceToNumber(type, value);
}
else {
if (value instanceof Wrapper) {
value = ((Wrapper)value).unwrap();
}
if (type == ScriptRuntime.StringClass) {
return value.toString();
}
else {
if (type.isInstance(value)) {
return value;
}
else {
reportConversionError(value, type);
}
}
}
break;
case JSTYPE_OBJECT:
if (Context.useJSObject && jsObjectClass != null &&
(type == ScriptRuntime.ObjectClass ||
jsObjectClass.isAssignableFrom(type))) {
return coerceToJSObject(type, (Scriptable)value);
}
else if (type == ScriptRuntime.StringClass) {
return ScriptRuntime.toString(value);
}
else if (type.isPrimitive()) {
if (type == Boolean.TYPE) {
reportConversionError(value, type);
}
return coerceToNumber(type, value);
}
else if (type.isInstance(value)) {
return value;
}
else if (type.isArray() && value instanceof NativeArray) {
// Make a new java array, and coerce the JS array components
// to the target (component) type.
NativeArray array = (NativeArray) value;
long length = array.jsGet_length();
Class arrayType = type.getComponentType();
Object Result = Array.newInstance(arrayType, (int)length);
for (int i = 0 ; i < length ; ++i) {
try {
Array.set(Result, i, coerceType(arrayType,
array.get(i, array)));
}
catch (EvaluatorException ee) {
reportConversionError(value, type);
}
}
return Result;
}
else {
reportConversionError(value, type);
}
break;
}
return value;
}
static Object coerceToJSObject(Class type, Scriptable value) {
// If JSObject compatibility is enabled, and the method wants it,
// wrap the Scriptable value in a JSObject.
if (ScriptRuntime.ScriptableClass.isAssignableFrom(type))
return value;
try {
Object ctorArgs[] = { value };
return jsObjectCtor.newInstance(ctorArgs);
} catch (InstantiationException instEx) {
throw new EvaluatorException("error generating JSObject wrapper for " +
value);
} catch (IllegalArgumentException argEx) {
throw new EvaluatorException("JSObject constructor doesn't want [Scriptable]!");
} catch (InvocationTargetException e) {
throw WrappedException.wrapException(e.getTargetException());
} catch (IllegalAccessException accessEx) {
throw new EvaluatorException("JSObject constructor is protected/private!");
}
}
static Object coerceToNumber(Class type, Object value) {
Class valueClass = value.getClass();
// Character
if (type == Character.TYPE || type == ScriptRuntime.CharacterClass) {
if (valueClass == ScriptRuntime.CharacterClass) {
return value;
}
return new Character((char)toInteger(value,
ScriptRuntime.CharacterClass,
(double)Character.MIN_VALUE,
(double)Character.MAX_VALUE));
}
// Double, Float
if (type == ScriptRuntime.ObjectClass ||
type == ScriptRuntime.DoubleClass || type == Double.TYPE) {
return valueClass == ScriptRuntime.DoubleClass
? value
: new Double(toDouble(value));
}
if (type == ScriptRuntime.FloatClass || type == Float.TYPE) {
if (valueClass == ScriptRuntime.FloatClass) {
return value;
}
else {
double number = toDouble(value);
if (Double.isInfinite(number) || Double.isNaN(number)
|| number == 0.0) {
return new Float((float)number);
}
else {
double absNumber = Math.abs(number);
if (absNumber < (double)Float.MIN_VALUE) {
return new Float((number > 0.0) ? +0.0 : -0.0);
}
else if (absNumber > (double)Float.MAX_VALUE) {
return new Float((number > 0.0) ?
Float.POSITIVE_INFINITY :
Float.NEGATIVE_INFINITY);
}
else {
return new Float((float)number);
}
}
}
}
// Integer, Long, Short, Byte
if (type == ScriptRuntime.IntegerClass || type == Integer.TYPE) {
if (valueClass == ScriptRuntime.IntegerClass) {
return value;
}
else {
return new Integer((int)toInteger(value,
ScriptRuntime.IntegerClass,
(double)Integer.MIN_VALUE,
(double)Integer.MAX_VALUE));
}
}
if (type == ScriptRuntime.LongClass || type == Long.TYPE) {
if (valueClass == ScriptRuntime.LongClass) {
return value;
}
else {
/* Long values cannot be expressed exactly in doubles.
* We thus use the largest and smallest double value that
* has a value expressible as a long value. We build these
* numerical values from their hexidecimal representations
* to avoid any problems caused by attempting to parse a
* decimal representation.
*/
final double max = Double.longBitsToDouble(0x43dfffffffffffffL);
final double min = Double.longBitsToDouble(0xc3e0000000000000L);
return new Long(toInteger(value,
ScriptRuntime.LongClass,
min,
max));
}
}
if (type == ScriptRuntime.ShortClass || type == Short.TYPE) {
if (valueClass == ScriptRuntime.ShortClass) {
return value;
}
else {
return new Short((short)toInteger(value,
ScriptRuntime.ShortClass,
(double)Short.MIN_VALUE,
(double)Short.MAX_VALUE));
}
}
if (type == ScriptRuntime.ByteClass || type == Byte.TYPE) {
if (valueClass == ScriptRuntime.ByteClass) {
return value;
}
else {
return new Byte((byte)toInteger(value,
ScriptRuntime.ByteClass,
(double)Byte.MIN_VALUE,
(double)Byte.MAX_VALUE));
}
}
return new Double(toDouble(value));
}
static double toDouble(Object value) {
if (value instanceof Number) {
return ((Number)value).doubleValue();
}
else if (value instanceof String) {
return ScriptRuntime.toNumber((String)value);
}
else if (value instanceof Scriptable) {
if (value instanceof Wrapper) {
// XXX: optimize tail-recursion?
return toDouble(((Wrapper)value).unwrap());
}
else {
return ScriptRuntime.toNumber(value);
}
}
else {
Method meth;
try {
meth = value.getClass().getMethod("doubleValue", null);
}
catch (NoSuchMethodException e) {
meth = null;
}
catch (SecurityException e) {
meth = null;
}
if (meth != null) {
try {
return ((Number)meth.invoke(value, null)).doubleValue();
}
catch (IllegalAccessException e) {
// XXX: ignore, or error message?
reportConversionError(value, Double.TYPE);
}
catch (InvocationTargetException e) {
// XXX: ignore, or error message?
reportConversionError(value, Double.TYPE);
}
}
return ScriptRuntime.toNumber(value.toString());
}
}
static long toInteger(Object value, Class type, double min, double max) {
double d = toDouble(value);
if (Double.isInfinite(d) || Double.isNaN(d)) {
// Convert to string first, for more readable message
reportConversionError(ScriptRuntime.toString(value), type);
}
if (d > 0.0) {
d = Math.floor(d);
}
else {
d = Math.ceil(d);
}
if (d < min || d > max) {
// Convert to string first, for more readable message
reportConversionError(ScriptRuntime.toString(value), type);
}
return (long)d;
}
static void reportConversionError(Object value, Class type) {
Object[] args = { value.toString(),
NativeJavaMethod.javaSignature(type)
};
throw Context.reportRuntimeError(
Context.getMessage("msg.conversion.not.allowed", args));
}
public static void initJSObject() {
if (!Context.useJSObject)
return;
// if netscape.javascript.JSObject is in the CLASSPATH, enable JSObject
// compatability wrappers
jsObjectClass = null;
try {
jsObjectClass = Class.forName("netscape.javascript.JSObject");
Class ctorParms[] = { ScriptRuntime.ScriptableClass };
jsObjectCtor = jsObjectClass.getConstructor(ctorParms);
jsObjectGetScriptable = jsObjectClass.getMethod("getScriptable",
new Class[0]);
} catch (ClassNotFoundException classEx) {
// jsObjectClass already null
} catch (NoSuchMethodException methEx) {
// jsObjectClass already null
}
}
/**
* The prototype of this object.
*/
protected Scriptable prototype;
/**
* The parent scope of this object.
*/
protected Scriptable parent;
protected Object javaObject;
protected JavaMembers members;
private Hashtable fieldAndMethods;
static Class jsObjectClass;
static Constructor jsObjectCtor;
static Method jsObjectGetScriptable;
}

View File

@@ -1,237 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Frank Mitchell
* Mike Shaver
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.lang.reflect.*;
/**
* This class reflects Java packages into the JavaScript environment. We
* lazily reflect classes and subpackages, and use a caching/sharing
* system to ensure that members reflected into one JavaPackage appear
* in all other references to the same package (as with Packages.java.lang
* and java.lang).
*
* @author Mike Shaver
* @see NativeJavaArray
* @see NativeJavaObject
* @see NativeJavaClass
*/
public class NativeJavaPackage extends ScriptableObject {
// we know these are packages so we can skip the class check
// note that this is ok even if the package isn't present.
static final String[] commonPackages = {
"java.lang",
"java.lang.reflect",
"java.io",
"java.math",
"java.util",
"java.util.zip",
"java.text",
"java.text.resources",
"java.applet",
};
public static Scriptable init(Scriptable scope)
throws PropertyException
{
NativeJavaPackage packages = new NativeJavaPackage("");
packages.setPrototype(getObjectPrototype(scope));
packages.setParentScope(scope);
// We want to get a real alias, and not a distinct JavaPackage
// with the same packageName, so that we share classes and packages
// that are underneath.
NativeJavaPackage javaAlias = (NativeJavaPackage)packages.get("java",
packages);
// It's safe to downcast here since initStandardObjects takes
// a ScriptableObject.
ScriptableObject global = (ScriptableObject) scope;
global.defineProperty("Packages", packages, ScriptableObject.DONTENUM);
global.defineProperty("java", javaAlias, ScriptableObject.DONTENUM);
for (int i = 0; i < commonPackages.length; i++)
packages.forcePackage(commonPackages[i]);
NativeJavaObject.initJSObject();
Method[] m = FunctionObject.findMethods(NativeJavaPackage.class,
"jsFunction_getClass");
FunctionObject f = new FunctionObject("getClass", m[0], global);
global.defineProperty("getClass", f, ScriptableObject.DONTENUM);
// I think I'm supposed to return the prototype, but I don't have one.
return packages;
}
// set up a name which is known to be a package so we don't
// need to look for a class by that name
void forcePackage(String name) {
NativeJavaPackage pkg;
int end = name.indexOf('.');
if (end == -1)
end = name.length();
String id = name.substring(0, end);
Object cached = super.get(id, this);
if (cached != null && cached instanceof NativeJavaPackage) {
pkg = (NativeJavaPackage) cached;
} else {
String newPackage = packageName.length() == 0
? id
: packageName + "." + id;
pkg = new NativeJavaPackage(newPackage);
pkg.setParentScope(this);
pkg.setPrototype(this.prototype);
super.put(id, this, pkg);
}
if (end < name.length())
pkg.forcePackage(name.substring(end+1));
}
public NativeJavaPackage(String packageName) {
this.packageName = packageName;
}
public String getClassName() {
return "JavaPackage";
}
public boolean has(String id, int index, Scriptable start) {
return true;
}
public void put(String id, Scriptable start, Object value) {
// Can't add properties to Java packages. Sorry.
}
public void put(int index, Scriptable start, Object value) {
throw Context.reportRuntimeError(
Context.getMessage("msg.pkg.int", null));
}
public Object get(String id, Scriptable start) {
return getPkgProperty(id, start, true);
}
public Object get(int index, Scriptable start) {
return NOT_FOUND;
}
synchronized Object getPkgProperty(String name, Scriptable start,
boolean createPkg)
{
Object cached = super.get(name, start);
if (cached != NOT_FOUND)
return cached;
String newPackage = packageName.length() == 0
? name
: packageName + "." + name;
Context cx = Context.getContext();
SecuritySupport ss = cx.getSecuritySupport();
Scriptable newValue;
try {
if (ss != null && !ss.visibleToScripts(newPackage))
throw new ClassNotFoundException();
Class newClass = ScriptRuntime.loadClassName(newPackage);
newValue = NativeJavaClass.wrap(getTopLevelScope(this), newClass);
newValue.setParentScope(this);
newValue.setPrototype(this.prototype);
} catch (ClassNotFoundException ex) {
if (createPkg) {
NativeJavaPackage pkg = new NativeJavaPackage(newPackage);
pkg.setParentScope(this);
pkg.setPrototype(this.prototype);
newValue = pkg;
} else {
newValue = null;
}
}
if (newValue != null) {
// Make it available for fast lookup and sharing of
// lazily-reflected constructors and static members.
super.put(name, start, newValue);
}
return newValue;
}
public Object getDefaultValue(Class ignored) {
return toString();
}
public String toString() {
return "[JavaPackage " + packageName + "]";
}
public static Scriptable jsFunction_getClass(Context cx,
Scriptable thisObj,
Object[] args,
Function funObj)
{
if (args.length > 0 && args[0] instanceof NativeJavaObject) {
NativeJavaObject nativeJavaObj = (NativeJavaObject) args[0];
Scriptable result = getTopLevelScope(thisObj);
Class cl = nativeJavaObj.unwrap().getClass();
// Evaluate the class name by getting successive properties of
// the string to find the appropriate NativeJavaClass object
String name = "Packages." + cl.getName();
int offset = 0;
for (;;) {
int index = name.indexOf('.', offset);
String propName = index == -1
? name.substring(offset)
: name.substring(offset, index);
Object prop = result.get(propName, result);
if (!(prop instanceof Scriptable))
break; // fall through to error
result = (Scriptable) prop;
if (index == -1)
return result;
offset = index+1;
}
}
throw Context.reportRuntimeError(
Context.getMessage("msg.not.java.obj", null));
}
private String packageName;
}

View File

@@ -1,198 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
/**
* This class implements the Math native object.
* See ECMA 15.8.
* @author Norris Boyd
*/
public class NativeMath extends ScriptableObject {
public static Scriptable init(Scriptable scope)
throws PropertyException
{
NativeMath m = new NativeMath();
m.setPrototype(getObjectPrototype(scope));
m.setParentScope(scope);
String[] names = { "atan", "atan2", "ceil",
"cos", "floor", "random",
"sin", "sqrt", "tan" };
m.defineFunctionProperties(names, java.lang.Math.class,
ScriptableObject.DONTENUM);
// These functions exist in java.lang.Math, but
// are overloaded. Define our own wrappers.
String[] localNames = { "acos", "asin", "abs", "exp", "max", "min",
"round", "pow", "log" };
m.defineFunctionProperties(localNames, NativeMath.class,
ScriptableObject.DONTENUM);
/*
have to fix up the length property for max & min
which are varargs form, but need to have a length of 2
*/
((FunctionObject)m.get("max", scope)).setLength((short)2);
((FunctionObject)m.get("min", scope)).setLength((short)2);
final int attr = ScriptableObject.DONTENUM |
ScriptableObject.PERMANENT |
ScriptableObject.READONLY;
m.defineProperty("E", new Double(Math.E), attr);
m.defineProperty("PI", new Double(Math.PI), attr);
m.defineProperty("LN10", new Double(2.302585092994046), attr);
m.defineProperty("LN2", new Double(0.6931471805599453), attr);
m.defineProperty("LOG2E", new Double(1.4426950408889634), attr);
m.defineProperty("LOG10E", new Double(0.4342944819032518), attr);
m.defineProperty("SQRT1_2", new Double(0.7071067811865476), attr);
m.defineProperty("SQRT2", new Double(1.4142135623730951), attr);
// We know that scope is a Scriptable object since we
// constrained the type on initStandardObjects.
ScriptableObject global = (ScriptableObject) scope;
global.defineProperty("Math", m, ScriptableObject.DONTENUM);
return m;
}
public NativeMath() {
}
public String getClassName() {
return "Math";
}
public static double abs(double d) {
if (d == 0.0)
return 0.0; // abs(-0.0) should be 0.0, but -0.0 < 0.0 == false
else if (d < 0.0)
return -d;
else
return d;
}
public static double acos(double d) {
if ((d != d)
|| (d > 1.0)
|| (d < -1.0))
return Double.NaN;
return Math.acos(d);
}
public static double asin(double d) {
if ((d != d)
|| (d > 1.0)
|| (d < -1.0))
return Double.NaN;
return Math.asin(d);
}
public static double max(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
double result = Double.NEGATIVE_INFINITY;
if (args.length == 0)
return result;
for (int i = 0; i < args.length; i++) {
double d = ScriptRuntime.toNumber(args[i]);
if (d != d) return d;
result = Math.max(result, d);
}
return result;
}
public static double min(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
double result = Double.POSITIVE_INFINITY;
if (args.length == 0)
return result;
for (int i = 0; i < args.length; i++) {
double d = ScriptRuntime.toNumber(args[i]);
if (d != d) return d;
result = Math.min(result, d);
}
return result;
}
public static double round(double d) {
if (d != d)
return d; // NaN
if (d == Double.POSITIVE_INFINITY || d == Double.NEGATIVE_INFINITY)
return d;
long l = Math.round(d);
if (l == 0) {
// We must propagate the sign of d into the result
if (d < 0.0)
return ScriptRuntime.negativeZero;
return d == 0.0 ? d : 0.0;
}
return (double) l;
}
public static double pow(double x, double y) {
if (y == 0)
return 1.0; // Java's pow(NaN, 0) = NaN; we need 1
if ((x == 0) && (y < 0)) {
Double d = new Double(x);
if (d.equals(new Double(0))) // x is +0
return Double.POSITIVE_INFINITY; // Java is -Infinity
/* if x is -0 and y is an odd integer, -Infinity */
if (((int)y == y) && (((int)y & 0x1) == 1))
return Double.NEGATIVE_INFINITY;
return Double.POSITIVE_INFINITY;
}
return Math.pow(x, y);
}
public static double exp(double d) {
if (d == Double.POSITIVE_INFINITY)
return d;
if (d == Double.NEGATIVE_INFINITY)
return 0.0;
return Math.exp(d);
}
public static double log(double x) {
if (x < 0)
return Double.NaN; // Java's log(<0) = -Infinity; we need NaN
return Math.log(x);
}
}

View File

@@ -1,162 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Mike McCabe
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
/**
* This class implements the Number native object.
*
* See ECMA 15.7.
*
* @author Norris Boyd
*/
public class NativeNumber extends ScriptableObject {
public static void finishInit(Scriptable scope,
FunctionObject ctor, Scriptable proto)
{
final int attr = ScriptableObject.DONTENUM |
ScriptableObject.PERMANENT |
ScriptableObject.READONLY;
String[] names = { "NaN", "POSITIVE_INFINITY", "NEGATIVE_INFINITY",
"MAX_VALUE", "MIN_VALUE" };
double[] values = { ScriptRuntime.NaN, Double.POSITIVE_INFINITY,
Double.NEGATIVE_INFINITY, Double.MAX_VALUE,
Double.MIN_VALUE };
for (int i=0; i < names.length; i++) {
ctor.defineProperty(names[i], new Double(values[i]), attr);
}
}
private static final int MAX_PRECISION = 100;
/**
* Zero-parameter constructor: just used to create Number.prototype
*/
public NativeNumber() {
doubleValue = defaultValue;
}
public NativeNumber(double number) {
doubleValue = number;
}
public String getClassName() {
return "Number";
}
public static Object jsConstructor(Context cx, Object[] args,
Function funObj, boolean inNewExpr)
{
double d = args.length >= 1
? ScriptRuntime.toNumber(args[0])
: defaultValue;
if (inNewExpr) {
// new Number(val) creates a new Number object.
return new NativeNumber(d);
}
// Number(val) converts val to a number value.
return new Double(d);
}
public String toString() {
return jsFunction_toString(Undefined.instance);
}
public String jsFunction_toString(Object base) {
int i = base == Undefined.instance
? 10
: ScriptRuntime.toInt32(base);
return ScriptRuntime.numberToString(doubleValue, i);
}
public double jsFunction_valueOf() {
return doubleValue;
}
public String jsFunction_toLocaleString(Object arg) {
return toString();
}
public String jsFunction_toFixed(Object arg) {
/* We allow a larger range of precision than
ECMA requires; this is permitted by ECMA. */
return num_to(arg, DToA.DTOSTR_FIXED, DToA.DTOSTR_FIXED,
-20, MAX_PRECISION, 0);
}
public String jsFunction_toExponential(Object arg) {
/* We allow a larger range of precision than
ECMA requires; this is permitted by ECMA. */
return num_to(arg, DToA.DTOSTR_STANDARD_EXPONENTIAL,
DToA.DTOSTR_EXPONENTIAL, 0, MAX_PRECISION, 1);
}
public String jsFunction_toPrecision(Object arg) {
/* We allow a larger range of precision than
ECMA requires; this is permitted by ECMA. */
return num_to(arg, DToA.DTOSTR_STANDARD,
DToA.DTOSTR_PRECISION, 1, MAX_PRECISION, 0);
}
private String num_to(Object arg, int zeroArgMode,
int oneArgMode, int precisionMin, int precisionMax, int precisionOffset)
{
int precision;
if (arg == Undefined.instance) {
precision = 0;
oneArgMode = zeroArgMode;
} else {
precision = ScriptRuntime.toInt32(arg);
if (precision < precisionMin || precision > precisionMax) {
Object args[] = new Object[1];
args[0] = Integer.toString(precision);
throw NativeGlobal.constructError(
Context.getCurrentContext(), "RangeError",
ScriptRuntime.getMessage("msg.bad.precision", args),
this);
}
}
StringBuffer result = new StringBuffer();
DToA.JS_dtostr(result, oneArgMode, precision + precisionOffset, doubleValue);
return result.toString();
}
private static final double defaultValue = +0.0;
private double doubleValue;
}

View File

@@ -1,193 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Mike McCabe
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.util.Hashtable;
/**
* This class implements the Object native object.
* See ECMA 15.2.
* @author Norris Boyd
*/
public class NativeObject extends ScriptableObject {
public static void finishInit(Scriptable scope, FunctionObject ctor,
Scriptable proto)
{
Object obj = proto.get("valueOf", proto);
((FunctionObject) obj).setLength((short) 0);
}
public String getClassName() {
return "Object";
}
public static Object jsConstructor(Context cx, Object[] args,
Function ctorObj, boolean inNewExpr)
throws JavaScriptException
{
if (!inNewExpr) {
// FunctionObject.construct will set up parent, proto
return ctorObj.construct(cx, ctorObj.getParentScope(), args);
}
if (args.length == 0 || args[0] == null ||
args[0] == Undefined.instance)
{
return new NativeObject();
}
return ScriptRuntime.toObject(ctorObj.getParentScope(), args[0]);
}
public String toString() {
Context cx = Context.getContext();
if (cx != null)
return jsFunction_toString(cx, this, null, null);
else
return "[object " + getClassName() + "]";
}
public static String jsFunction_toString(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
if (cx.getLanguageVersion() != cx.VERSION_1_2)
return "[object " + thisObj.getClassName() + "]";
return toSource(cx, thisObj, args, funObj);
}
public static String toSource(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
Scriptable m = thisObj;
if (cx.iterating == null)
cx.iterating = new Hashtable(31);
if (cx.iterating.get(m) == Boolean.TRUE) {
return "{}"; // stop recursion
} else {
StringBuffer result = new StringBuffer("{");
Object[] ids = m.getIds();
for(int i=0; i < ids.length; i++) {
if (i > 0)
result.append(", ");
Object id = ids[i];
String idString = ScriptRuntime.toString(id);
Object p = (id instanceof String)
? m.get((String) id, m)
: m.get(((Number) id).intValue(), m);
if (p instanceof String) {
result.append(idString + ":\""
+ ScriptRuntime
.escapeString(ScriptRuntime.toString(p))
+ "\"");
} else {
/* wrap changes to cx.iterating in a try/finally
* so that the reference always gets removed, and
* we don't leak memory. Good place for weak
* references, if we had them.
*/
try {
cx.iterating.put(m, Boolean.TRUE); // stop recursion.
result.append(idString + ":" + ScriptRuntime.toString(p));
} finally {
cx.iterating.remove(m);
}
}
}
result.append("}");
return result.toString();
}
}
public static Object jsFunction_valueOf(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
return thisObj;
}
public static Object jsFunction_hasOwnProperty(Context cx,
Scriptable thisObj,
Object[] args,
Function funObj)
{
if (args.length != 0)
if (thisObj.has(ScriptRuntime.toString(args[0]), thisObj))
return Boolean.TRUE;
return Boolean.FALSE;
}
public static Object jsFunction_propertyIsEnumerable(Context cx,
Scriptable thisObj,
Object[] args,
Function funObj)
{
try {
if (args.length != 0) {
String name = ScriptRuntime.toString(args[0]);
if (thisObj.has(name, thisObj)) {
int a = ((ScriptableObject)thisObj).getAttributes(name, thisObj);
if ((a & ScriptableObject.DONTENUM) == 0)
return Boolean.TRUE;
}
}
}
catch (PropertyException x) {
}
catch (ClassCastException x) {
}
return Boolean.FALSE;
}
public static Object jsFunction_isPrototypeOf(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
if (args.length != 0 && args[0] instanceof Scriptable) {
Scriptable v = (Scriptable) args[0];
do {
v = v.getPrototype();
if (v == thisObj)
return Boolean.TRUE;
} while (v != null);
}
return Boolean.FALSE;
}
}

View File

@@ -1,172 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Roger Lawrence
* Mike McCabe
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.io.StringReader;
import java.io.IOException;
/**
* The JavaScript Script object.
*
* Note that the C version of the engine uses XDR as the format used
* by freeze and thaw. Since this depends on the internal format of
* structures in the C runtime, we cannot duplicate it.
*
* Since we cannot replace 'this' as a result of the compile method,
* this class has a dual nature. Generated scripts will have a null
* 'script' field and will override 'exec' and 'call'. Scripts created
* using the JavaScript constructor will forward requests to the
* nonnull 'script' field.
*
* @since 1.3
* @author Norris Boyd
*/
public class NativeScript extends NativeFunction implements Script {
public NativeScript() {
}
/**
* Returns the name of this JavaScript class, "Script".
*/
public String getClassName() {
return "Script";
}
/**
* Initialize script.
*
* Does nothing here, but scripts will override with code
* to initialize contained functions, regexp literals, etc.
*/
public void initScript(Scriptable scope) {
}
/**
* The Java method defining the JavaScript Script constructor.
*
*/
public static Object jsConstructor(Context cx, Object[] args,
Function ctorObj, boolean inNewExpr)
{
String source = args.length == 0
? ""
: ScriptRuntime.toString(args[0]);
Scriptable scope = cx.ctorScope;
if (scope == null)
scope = ctorObj;
return compile(scope, source);
}
public static Script compile(Scriptable scope, String source) {
Context cx = Context.getContext();
StringReader reader = new StringReader(source);
try {
int[] linep = { 0 };
String filename = Context.getSourcePositionFromStack(linep);
if (filename == null) {
filename = "<Script object>";
linep[0] = 1;
}
Object securityDomain =
cx.getSecurityDomainForStackDepth(5);
return cx.compileReader(scope, reader, filename, linep[0],
securityDomain);
}
catch (IOException e) {
throw new RuntimeException("Unexpected IOException");
}
}
public Scriptable jsFunction_compile(String source) {
script = compile(null, source);
return this;
}
public Object jsFunction_exec() throws JavaScriptException {
Object[] msgArgs = { "exec" };
throw Context.reportRuntimeError(
Context.getMessage("msg.cant.call.indirect", msgArgs));
}
public static Object jsFunction_toString(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
Script thisScript = ((NativeScript) thisObj).script;
if (thisScript == null)
thisScript = (Script) thisObj;
Scriptable scope = getTopLevelScope(thisObj);
return cx.decompileScript(thisScript, scope, 0);
}
/*
* Override method in NativeFunction to avoid ever returning "anonymous"
*/
public String jsGet_name() {
return "";
}
/**
* Execute the script.
*
* Will be overridden by generated scripts; needed to implement Script.
*/
public Object exec(Context cx, Scriptable scope)
throws JavaScriptException
{
return script == null ? Undefined.instance : script.exec(cx, scope);
}
public Object call(Context cx, Scriptable scope, Scriptable thisObj,
Object[] args)
throws JavaScriptException
{
return exec(cx, scope);
}
public Scriptable construct(Context cx, Scriptable scope, Object[] args)
throws JavaScriptException
{
String message = Context.getMessage("msg.script.is.not.constructor", null);
throw Context.reportRuntimeError(message);
}
private Script script;
}

View File

@@ -1,747 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Tom Beauvais
* Norris Boyd
* Mike McCabe
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.lang.reflect.Method;
import java.util.Vector;
/**
* This class implements the String native object.
*
* See ECMA 15.5.
*
* String methods for dealing with regular expressions are
* ported directly from C. Latest port is from version 1.40.12.19
* in the JSFUN13_BRANCH.
*
* @author Mike McCabe
* @author Norris Boyd
*/
public class NativeString extends ScriptableObject implements Wrapper {
/**
* Zero-parameter constructor: just used to create String.prototype
*/
public NativeString() {
string = defaultValue;
}
public static void finishInit(Scriptable scope, FunctionObject ctor,
Scriptable proto)
{
// Most of the methods of String.prototype are "vararg" form
// so that they can convert the "this" value to string, rather
// than being restricted to just operating on NativeString
// objects. However, this means that the values of the "length"
// properties of these methods are set to 1 by the constructor
// for FunctionObject. We must therefore fetch the function
// objects and set the length to the appropriate value.
String[] specialLengthNames = { "indexOf",
"lastIndexOf",
"substring",
"toUpperCase",
"toLowerCase",
"toString",
};
short[] specialLengthValues = { 2,
2,
2,
0,
0,
0,
};
for (int i=0; i < specialLengthNames.length; i++) {
Object obj = proto.get(specialLengthNames[i], proto);
((FunctionObject) obj).setLength(specialLengthValues[i]);
}
}
public NativeString(String s) {
string = s;
}
public String getClassName() {
return "String";
}
public static String jsStaticFunction_fromCharCode(Context cx,
Scriptable thisObj,
Object[] args,
Function funObj)
{
if (args.length < 1)
return "";
StringBuffer s = new java.lang.StringBuffer();
for (int i=0; i < args.length; i++) {
s.append(ScriptRuntime.toUint16(args[i]));
}
return s.toString();
}
public static Object jsConstructor(Context cx, Object[] args,
Function ctorObj, boolean inNewExpr)
{
String s = args.length >= 1
? ScriptRuntime.toString(args[0])
: defaultValue;
if (inNewExpr) {
// new String(val) creates a new String object.
return new NativeString(s);
}
// String(val) converts val to a string value.
return s;
}
public String toString() {
return string;
}
/* ECMA 15.5.4.2: 'the toString function is not generic.' */
public String jsFunction_toString() {
return string;
}
public String jsFunction_valueOf() {
return string;
}
/* Make array-style property lookup work for strings.
* XXX is this ECMA? A version check is probably needed. In js too.
*/
public Object get(int index, Scriptable start) {
if (index >= 0 && index < string.length())
return string.substring(index, index + 1);
return super.get(index, start);
}
public void put(int index, Scriptable start, Object value) {
if (index >= 0 && index < string.length())
return;
super.put(index, start, value);
}
/**
*
* See ECMA 15.5.4.[4,5]
*/
public static String jsFunction_charAt(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
if (args.length < 1)
args = ScriptRuntime.padArguments(args, 1);
// this'll return 0 if undefined... seems
// to be ECMA.
String target = ScriptRuntime.toString(thisObj);
double pos = ScriptRuntime.toInteger(args[0]);
if (pos < 0 || pos >= target.length())
return "";
return target.substring((int)pos, (int)pos + 1);
}
public static double jsFunction_charCodeAt(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
if (args.length < 1)
args = ScriptRuntime.padArguments(args, 1);
String target = ScriptRuntime.toString(thisObj);
double pos = ScriptRuntime.toInteger(args[0]);
if (pos < 0 || pos >= target.length()) {
return ScriptRuntime.NaN;
}
return target.charAt((int)pos);
}
/**
*
* See ECMA 15.5.4.6. Uses Java String.indexOf()
* OPT to add - BMH searching from jsstr.c.
*/
public static int jsFunction_indexOf(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
if (args.length < 2)
args = ScriptRuntime.padArguments(args, 2);
String target = ScriptRuntime.toString(thisObj);
String search = ScriptRuntime.toString(args[0]);
double begin = ScriptRuntime.toInteger(args[1]);
if (begin > target.length()) {
return -1;
} else {
if (begin < 0)
begin = 0;
return target.indexOf(search, (int)begin);
}
}
/**
*
* See ECMA 15.5.4.7
*
*/
public static int jsFunction_lastIndexOf(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
if (args.length < 2)
args = ScriptRuntime.padArguments(args, 2);
String target = ScriptRuntime.toString(thisObj);
String search = ScriptRuntime.toString(args[0]);
double end = ScriptRuntime.toNumber(args[1]);
if (end != end || end > target.length())
end = target.length();
else if (end < 0)
end = 0;
return target.lastIndexOf(search, (int)end);
}
/*
* Used by js_split to find the next split point in target,
* starting at offset ip and looking either for the given
* separator substring, or for the next re match. ip and
* matchlen must be reference variables (assumed to be arrays of
* length 1) so they can be updated in the leading whitespace or
* re case.
*
* Return -1 on end of string, >= 0 for a valid index of the next
* separator occurrence if found, or the string length if no
* separator is found.
*/
private static int find_split(Function funObj, String target,
String separator, Object re,
int[] ip, int[] matchlen, boolean[] matched,
String[][] parensp)
{
int i = ip[0];
int length = target.length();
Context cx = Context.getContext();
int version = cx.getLanguageVersion();
/*
* Perl4 special case for str.split(' '), only if the user has selected
* JavaScript1.2 explicitly. Split on whitespace, and skip leading w/s.
* Strange but true, apparently modeled after awk.
*/
if (version == Context.VERSION_1_2 &&
re == null && separator.length() == 1 && separator.charAt(0) == ' ')
{
/* Skip leading whitespace if at front of str. */
if (i == 0) {
while (i < length && Character.isWhitespace(target.charAt(i)))
i++;
ip[0] = i;
}
/* Don't delimit whitespace at end of string. */
if (i == length)
return -1;
/* Skip over the non-whitespace chars. */
while (i < length
&& !Character.isWhitespace(target.charAt(i)))
i++;
/* Now skip the next run of whitespace. */
int j = i;
while (j < length && Character.isWhitespace(target.charAt(j)))
j++;
/* Update matchlen to count delimiter chars. */
matchlen[0] = j - i;
return i;
}
/*
* Stop if past end of string. If at end of string, we will
* return target length, so that
*
* "ab,".split(',') => new Array("ab", "")
*
* and the resulting array converts back to the string "ab,"
* for symmetry. NB: This differs from perl, which drops the
* trailing empty substring if the LIMIT argument is omitted.
*/
if (i > length)
return -1;
/*
* Match a regular expression against the separator at or
* above index i. Return -1 at end of string instead of
* trying for a match, so we don't get stuck in a loop.
*/
if (re != null) {
return cx.getRegExpProxy().find_split(funObj, target,
separator, re,
ip, matchlen, matched,
parensp);
}
/*
* Deviate from ECMA by never splitting an empty string by any separator
* string into a non-empty array (an array of length 1 that contains the
* empty string).
*/
if (version != Context.VERSION_DEFAULT && version < Context.VERSION_1_3
&& length == 0)
return -1;
/*
* Special case: if sep is the empty string, split str into
* one character substrings. Let our caller worry about
* whether to split once at end of string into an empty
* substring.
*
* For 1.2 compatibility, at the end of the string, we return the length as
* the result, and set the separator length to 1 -- this allows the caller
* to include an additional null string at the end of the substring list.
*/
if (separator.length() == 0) {
if (version == Context.VERSION_1_2) {
if (i == length) {
matchlen[0] = 1;
return i;
}
return i + 1;
}
return (i == length) ? -1 : i + 1;
}
/* Punt to j.l.s.indexOf; return target length if seperator is
* not found.
*/
if (ip[0] >= length)
return length;
i = target.indexOf(separator, ip[0]);
return (i != -1) ? i : length;
}
/**
* See ECMA 15.5.4.8. Modified to match JS 1.2 - optionally takes
* a limit argument and accepts a regular expression as the split
* argument.
*/
public static Object jsFunction_split(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
String target = ScriptRuntime.toString(thisObj);
// create an empty Array to return;
Scriptable scope = getTopLevelScope(funObj);
Scriptable result = ScriptRuntime.newObject(cx, scope, "Array", null);
// return an array consisting of the target if no separator given
// don't check against undefined, because we want
// 'fooundefinedbar'.split(void 0) to split to ['foo', 'bar']
if (args.length < 1) {
result.put(0, result, target);
return result;
}
// Use the second argument as the split limit, if given.
boolean limited = (args.length > 1) && (args[1] != Undefined.instance);
long limit = 0; // Initialize to avoid warning.
if (limited) {
/* Clamp limit between 0 and 1 + string length. */
limit = ScriptRuntime.toUint32(args[1]);
if (limit > target.length())
limit = 1 + target.length();
}
String separator = null;
int[] matchlen = { 0 };
Object re = null;
RegExpProxy reProxy = cx.getRegExpProxy();
if (reProxy != null && reProxy.isRegExp(args[0])) {
re = args[0];
} else {
separator = ScriptRuntime.toString(args[0]);
matchlen[0] = separator.length();
}
// split target with separator or re
int[] ip = { 0 };
int match;
int len = 0;
boolean[] matched = { false };
String[][] parens = { null };
while ((match = find_split(funObj, target, separator, re, ip,
matchlen, matched, parens)) >= 0)
{
if ((limited && len >= limit) || (match > target.length()))
break;
String substr;
if (target.length() == 0)
substr = target;
else
substr = target.substring(ip[0], match);
result.put(len, result, substr);
len++;
/*
* Imitate perl's feature of including parenthesized substrings
* that matched part of the delimiter in the new array, after the
* split substring that was delimited.
*/
if (re != null && matched[0] == true) {
int size = parens[0].length;
for (int num = 0; num < size; num++) {
if (limited && len >= limit)
break;
result.put(len, result, parens[0][num]);
len++;
}
matched[0] = false;
}
ip[0] = match + matchlen[0];
if (cx.getLanguageVersion() < Context.VERSION_1_3
&& cx.getLanguageVersion() != Context.VERSION_DEFAULT)
{
/*
* Deviate from ECMA to imitate Perl, which omits a final
* split unless a limit argument is given and big enough.
*/
if (!limited && ip[0] == target.length())
break;
}
}
return result;
}
/**
*
* See ECMA 15.5.4.[9,10]
*/
public static String jsFunction_substring(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
if (args.length < 1)
args = ScriptRuntime.padArguments(args, 1);
String target = ScriptRuntime.toString(thisObj);
int length = target.length();
double start = ScriptRuntime.toInteger(args[0]);
double end;
if (start < 0)
start = 0;
else if (start > length)
start = length;
if (args.length == 1) {
end = length;
} else {
end = ScriptRuntime.toInteger(args[1]);
if (end < 0)
end = 0;
else if (end > length)
end = length;
// swap if end < start
if (end < start) {
if (cx.getLanguageVersion() != Context.VERSION_1_2) {
double temp = start;
start = end;
end = temp;
} else {
// Emulate old JDK1.0 java.lang.String.substring()
end = start;
}
}
}
return target.substring((int)start, (int)end);
}
/**
*
* See ECMA 15.5.4.[11,12]
*/
public static String jsFunction_toLowerCase(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
String target = ScriptRuntime.toString(thisObj);
return target.toLowerCase();
}
public static String jsFunction_toUpperCase(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
String target = ScriptRuntime.toString(thisObj);
return target.toUpperCase();
}
public double jsGet_length() {
return (double) string.length();
}
/**
* Non-ECMA methods.
*/
public static String jsFunction_substr(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
String target = ScriptRuntime.toString(thisObj);
if (args.length < 1)
return target;
double begin = ScriptRuntime.toInteger(args[0]);
double end;
int length = target.length();
if (begin < 0) {
begin += length;
if (begin < 0)
begin = 0;
} else if (begin > length) {
begin = length;
}
if (args.length == 1) {
end = length;
} else {
end = ScriptRuntime.toInteger(args[1]);
if (end < 0)
end = 0;
end += begin;
if (end > length)
end = length;
}
return target.substring((int)begin, (int)end);
}
/**
* Python-esque sequence operations.
*/
public static String jsFunction_concat(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
StringBuffer result = new StringBuffer();
result.append(ScriptRuntime.toString(thisObj));
for (int i = 0; i < args.length; i++)
result.append(ScriptRuntime.toString(args[i]));
return result.toString();
}
public static String jsFunction_slice(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
String target = ScriptRuntime.toString(thisObj);
if (args.length != 0) {
double begin = ScriptRuntime.toInteger(args[0]);
double end;
int length = target.length();
if (begin < 0) {
begin += length;
if (begin < 0)
begin = 0;
} else if (begin > length) {
begin = length;
}
if (args.length == 1) {
end = length;
} else {
end = ScriptRuntime.toInteger(args[1]);
if (end < 0) {
end += length;
if (end < 0)
end = 0;
} else if (end > length) {
end = length;
}
if (end < begin)
end = begin;
}
return target.substring((int)begin, (int)end);
}
return target;
}
/**
* HTML composition aids.
*/
private String tagify(String begin, String end, String value) {
StringBuffer result = new StringBuffer();
result.append('<');
result.append(begin);
if (value != null) {
result.append('=');
result.append(value);
}
result.append('>');
result.append(this.string);
result.append("</");
result.append((end == null) ? begin : end);
result.append('>');
return result.toString();
}
public String jsFunction_bold() {
return tagify("B", null, null);
}
public String jsFunction_italics() {
return tagify("I", null, null);
}
public String jsFunction_fixed() {
return tagify("TT", null, null);
}
public String jsFunction_strike() {
return tagify("STRIKE", null, null);
}
public String jsFunction_small() {
return tagify("SMALL", null, null);
}
public String jsFunction_big() {
return tagify("BIG", null, null);
}
public String jsFunction_blink() {
return tagify("BLINK", null, null);
}
public String jsFunction_sup() {
return tagify("SUP", null, null);
}
public String jsFunction_sub() {
return tagify("SUB", null, null);
}
public String jsFunction_fontsize(String value) {
return tagify("FONT SIZE", "FONT", value);
}
public String jsFunction_fontcolor(String value) {
return tagify("FONT COLOR", "FONT", value);
}
public String jsFunction_link(String value) {
return tagify("A HREF", "A", value);
}
public String jsFunction_anchor(String value) {
return tagify("A NAME", "A", value);
}
public static Object jsFunction_equals(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
String target = ScriptRuntime.toString(thisObj);
String strOther = ScriptRuntime.toString(args[0]);
return new Boolean(target.equals(strOther));
}
public static Object jsFunction_equalsIgnoreCase(Context cx,
Scriptable thisObj,
Object[] args,
Function funObj)
{
String target = ScriptRuntime.toString(thisObj);
String strOther = ScriptRuntime.toString(args[0]);
return new Boolean(target.equalsIgnoreCase(strOther));
}
/**
* Unwrap this NativeString as a j.l.String for LiveConnect use.
*/
public Object unwrap() {
return string;
}
public static Object jsFunction_match(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
throws JavaScriptException
{
return checkReProxy(cx).match(cx, thisObj, args, funObj);
}
public static Object jsFunction_search(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
throws JavaScriptException
{
return checkReProxy(cx).search(cx, thisObj, args, funObj);
}
public static Object jsFunction_replace(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
throws JavaScriptException
{
return checkReProxy(cx).replace(cx, thisObj, args, funObj);
}
private static RegExpProxy checkReProxy(Context cx) {
RegExpProxy result = cx.getRegExpProxy();
if (result == null) {
throw cx.reportRuntimeError(cx.getMessage("msg.no.regexp", null));
}
return result;
}
private static final String defaultValue = "";
private String string;
}

View File

@@ -1,173 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.lang.reflect.Method;
/**
* This class implements the object lookup required for the
* <code>with</code> statement.
* It simply delegates every action to its prototype except
* for operations on its parent.
*/
public class NativeWith implements Scriptable {
public static void init(Scriptable scope) {
NativeWith w = new NativeWith();
w.setPrototype(ScriptableObject.getObjectPrototype(scope));
Method[] m = FunctionObject.findMethods(NativeWith.class,
"jsConstructor");
FunctionObject f = new FunctionObject("With", m[0], scope);
f.addAsConstructor(scope, w);
}
public NativeWith() {
}
public NativeWith(Scriptable parent, Scriptable prototype) {
this.parent = parent;
this.prototype = prototype;
}
public String getClassName() {
return "With";
}
public boolean has(String id, Scriptable start) {
if (start == this)
start = prototype;
return prototype.has(id, start);
}
public boolean has(int index, Scriptable start) {
if (start == this)
start = prototype;
return prototype.has(index, start);
}
public Object get(String id, Scriptable start) {
if (start == this)
start = prototype;
return prototype.get(id, start);
}
public Object get(int index, Scriptable start) {
if (start == this)
start = prototype;
return prototype.get(index, start);
}
public void put(String id, Scriptable start, Object value) {
if (start == this)
start = prototype;
prototype.put(id, start, value);
}
public void put(int index, Scriptable start, Object value) {
if (start == this)
start = prototype;
prototype.put(index, start, value);
}
public void delete(String id) {
prototype.delete(id);
}
public void delete(int index) {
prototype.delete(index);
}
public Scriptable getPrototype() {
return prototype;
}
public void setPrototype(Scriptable prototype) {
this.prototype = prototype;
}
public Scriptable getParentScope() {
return parent;
}
public void setParentScope(Scriptable parent) {
this.parent = parent;
}
public Object[] getIds() {
return prototype.getIds();
}
public Object getDefaultValue(Class typeHint) {
return prototype.getDefaultValue(typeHint);
}
public boolean hasInstance(Scriptable value) {
return prototype.hasInstance(value);
}
public static Object jsConstructor(Context cx, Object[] args,
Function ctorObj, boolean inNewExpr)
{
Object[] msgArgs = { "With" };
throw Context.reportRuntimeError(
Context.getMessage("msg.cant.call.indirect", msgArgs));
}
public static Object newWithSpecial(Context cx, Object[] args,
Function ctorObj, boolean inNewExpr)
{
if (!inNewExpr) {
Object[] errArgs = { "With" };
throw Context.reportRuntimeError(Context.getMessage
("msg.only.from.new", errArgs));
}
ScriptRuntime.checkDeprecated(cx, "With");
Scriptable scope = ScriptableObject.getTopLevelScope(ctorObj);
NativeWith thisObj = new NativeWith();
thisObj.setPrototype(args.length == 0
? ScriptableObject.getClassPrototype(scope,
"Object")
: ScriptRuntime.toObject(scope, args[0]));
thisObj.setParentScope(scope);
return thisObj;
}
private Scriptable prototype;
private Scriptable parent;
private Scriptable constructor;
}

View File

@@ -1,469 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Roger Lawrence
* Mike McCabe
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.util.*;
/**
* This class implements the root of the intermediate representation.
*
* @author Norris Boyd
* @author Mike McCabe
*/
public class Node implements Cloneable {
public Node(int nodeType) {
type = nodeType;
}
public Node(int nodeType, Node child) {
type = nodeType;
first = last = child;
child.next = null;
}
public Node(int nodeType, Node left, Node right) {
type = nodeType;
first = left;
last = right;
left.next = right;
right.next = null;
}
public Node(int nodeType, Node left, Node mid, Node right) {
type = nodeType;
first = left;
last = right;
left.next = mid;
mid.next = right;
right.next = null;
}
public Node(int nodeType, Object datum) {
type = nodeType;
this.datum = datum;
}
public Node(int nodeType, Node child, Object datum) {
this(nodeType, child);
this.datum = datum;
}
public Node(int nodeType, Node left, Node right, Object datum) {
this(nodeType, left, right);
this.datum = datum;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public boolean hasChildren() {
return first != null;
}
public Node getFirstChild() {
return first;
}
public Node getLastChild() {
return last;
}
public Node getNextSibling() {
return next;
}
public Node getChildBefore(Node child) {
if (child == first)
return null;
Node n = first;
while (n.next != child) {
n = n.next;
if (n == null)
throw new RuntimeException("node is not a child");
}
return n;
}
public Node getLastSibling() {
Node n = this;
while (n.next != null) {
n = n.next;
}
return n;
}
public ShallowNodeIterator getChildIterator() {
return new ShallowNodeIterator(first);
}
public PreorderNodeIterator getPreorderIterator() {
return new PreorderNodeIterator(this);
}
public void addChildToFront(Node child) {
child.next = first;
first = child;
if (last == null) {
last = child;
}
}
public void addChildToBack(Node child) {
child.next = null;
if (last == null) {
first = last = child;
return;
}
last.next = child;
last = child;
}
public void addChildrenToFront(Node children) {
Node lastSib = children.getLastSibling();
lastSib.next = first;
first = children;
if (last == null) {
last = lastSib;
}
}
public void addChildrenToBack(Node children) {
if (last != null) {
last.next = children;
}
last = children.getLastSibling();
if (first == null) {
first = children;
}
}
/**
* Add 'child' before 'node'.
*/
public void addChildBefore(Node newChild, Node node) {
if (newChild.next != null)
throw new RuntimeException(
"newChild had siblings in addChildBefore");
if (first == node) {
newChild.next = first;
first = newChild;
return;
}
Node prev = getChildBefore(node);
addChildAfter(newChild, prev);
}
/**
* Add 'child' after 'node'.
*/
public void addChildAfter(Node newChild, Node node) {
if (newChild.next != null)
throw new RuntimeException(
"newChild had siblings in addChildAfter");
newChild.next = node.next;
node.next = newChild;
if (last == node)
last = newChild;
}
public void removeChild(Node child) {
Node prev = getChildBefore(child);
if (prev == null)
first = first.next;
else
prev.next = child.next;
if (child == last) last = prev;
child.next = null;
}
public void replaceChild(Node child, Node newChild) {
newChild.next = child.next;
if (child == first) {
first = newChild;
} else {
Node prev = getChildBefore(child);
prev.next = newChild;
}
if (child == last)
last = newChild;
child.next = null;
}
public static final int
TARGET_PROP = 1,
BREAK_PROP = 2,
CONTINUE_PROP = 3,
ENUM_PROP = 4,
FUNCTION_PROP = 5,
TEMP_PROP = 6,
LOCAL_PROP = 7,
CODEOFFSET_PROP = 8,
FIXUPS_PROP = 9,
VARS_PROP = 10,
USES_PROP = 11,
REGEXP_PROP = 12,
CASES_PROP = 13,
DEFAULT_PROP = 14,
CASEARRAY_PROP = 15,
SOURCENAME_PROP = 16,
SOURCE_PROP = 17,
TYPE_PROP = 18,
SPECIAL_PROP_PROP = 19,
LABEL_PROP = 20,
FINALLY_PROP = 21,
LOCALCOUNT_PROP = 22,
/*
the following properties are defined and manipulated by the
optimizer -
TARGETBLOCK_PROP - the block referenced by a branch node
VARIABLE_PROP - the variable referenced by a BIND or NAME node
LASTUSE_PROP - that variable node is the last reference before
a new def or the end of the block
ISNUMBER_PROP - this node generates code on Number children and
delivers a Number result (as opposed to Objects)
DIRECTCALL_PROP - this call node should emit code to test the function
object against the known class and call diret if it
matches.
*/
TARGETBLOCK_PROP = 23,
VARIABLE_PROP = 24,
LASTUSE_PROP = 25,
ISNUMBER_PROP = 26,
DIRECTCALL_PROP = 27,
BASE_LINENO_PROP = 28,
END_LINENO_PROP = 29,
SPECIALCALL_PROP = 30;
public static final int // this value of the ISNUMBER_PROP specifies
BOTH = 0, // which of the children are Number types
LEFT = 1,
RIGHT = 2;
private static String propNames[];
private static final String propToString(int propType) {
if (Context.printTrees && propNames == null) {
// If Context.printTrees is false, the compiler
// can remove all these strings.
String[] a = {
"target",
"break",
"continue",
"enum",
"function",
"temp",
"local",
"codeoffset",
"fixups",
"vars",
"uses",
"regexp",
"switches",
"cases",
"default",
"casearray",
"sourcename",
"source",
"type",
"special_prop",
"label",
"finally",
"localcount",
"targetblock",
"variable",
"lastuse",
"isnumber",
"directcall",
"base_lineno",
"end_lineno",
"specialcall"
};
propNames = a;
}
return propNames[propType-1];
}
public Object getProp(int propType) {
if (props == null)
return null;
return props.get(new Integer(propType));
}
public void putProp(int propType, Object prop) {
if (props == null)
props = new Hashtable(2);
if (prop == null)
props.remove(new Integer(propType));
else
props.put(new Integer(propType), prop);
}
public Object getDatum() {
return datum;
}
public void setDatum(Object datum) {
this.datum = datum;
}
public int getInt() {
return ((Number) datum).intValue();
}
public double getDouble() {
return ((Number) datum).doubleValue();
}
public long getLong() {
return ((Number) datum).longValue();
}
public String getString() {
return (String) datum;
}
public Node cloneNode() {
Node result;
try {
result = (Node) super.clone();
result.next = null;
result.first = null;
result.last = null;
}
catch (CloneNotSupportedException e) {
throw new RuntimeException(e.getMessage());
}
return result;
}
public String toString() {
if (Context.printTrees) {
StringBuffer sb = new StringBuffer(TokenStream.tokenToName(type));
if (type == TokenStream.TARGET) {
sb.append(" ");
sb.append(hashCode());
}
if (datum != null) {
sb.append(' ');
sb.append(datum.toString());
}
if (props == null)
return sb.toString();
Enumeration keys = props.keys();
Enumeration elems = props.elements();
while (keys.hasMoreElements()) {
Integer key = (Integer) keys.nextElement();
Object elem = elems.nextElement();
sb.append(" [");
sb.append(propToString(key.intValue()));
sb.append(": ");
switch (key.intValue()) {
case FIXUPS_PROP : // can't add this as it recurses
sb.append("fixups property");
break;
case SOURCE_PROP : // can't add this as it has unprintables
sb.append("source property");
break;
case TARGETBLOCK_PROP : // can't add this as it recurses
sb.append("target block property");
break;
case LASTUSE_PROP : // can't add this as it is dull
sb.append("last use property");
break;
default :
sb.append(elem.toString());
break;
}
sb.append("]");
}
return sb.toString();
}
return null;
}
public String toStringTree() {
return toStringTreeHelper(0);
}
private String toStringTreeHelper(int level) {
if (Context.printTrees) {
StringBuffer s = new StringBuffer();
for (int i=0; i < level; i++) {
s.append(" ");
}
s.append(toString());
s.append('\n');
ShallowNodeIterator iterator = getChildIterator();
if (iterator != null) {
while (iterator.hasMoreElements()) {
Node n = (Node) iterator.nextElement();
if (n.getType() == TokenStream.FUNCTION) {
Node p = (Node) n.getProp(Node.FUNCTION_PROP);
if (p != null)
n = p;
}
s.append(n.toStringTreeHelper(level+1));
}
}
return s.toString();
}
return "";
}
public Node getFirst() { return first; }
public Node getNext() { return next; }
protected int type; // type of the node; TokenStream.NAME for example
protected Node next; // next sibling
protected Node first; // first element of a linked list of children
protected Node last; // last element of a linked list of children
protected Hashtable props;
protected Object datum; // encapsulated data; depends on type
}

View File

@@ -1,712 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Roger Lawrence
* Mike McCabe
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.util.Hashtable;
import java.util.Stack;
import java.util.Vector;
/**
* This class transforms a tree to a lower-level representation for codegen.
*
* @see Node
* @author Norris Boyd
*/
public class NodeTransformer {
/**
* Return new instance of this class. So that derived classes
* can override methods of the transformer.
*/
public NodeTransformer newInstance() {
return new NodeTransformer();
}
public IRFactory createIRFactory(TokenStream ts, Scriptable scope) {
return new IRFactory(ts, scope);
}
public Node transform(Node tree, Node enclosing, TokenStream ts,
Scriptable scope)
{
loops = new Stack();
loopEnds = new Stack();
inFunction = tree.getType() == TokenStream.FUNCTION;
if (!inFunction) {
addVariables(tree, getVariableTable(tree));
}
irFactory = createIRFactory(ts, scope);
// to save against upchecks if no finally blocks are used.
boolean hasFinally = false;
PreorderNodeIterator iterator = tree.getPreorderIterator();
Node node;
while ((node = iterator.nextNode()) != null) {
int type = node.getType();
typeswitch:
switch (type) {
case TokenStream.FUNCTION:
if (node == tree) {
// Add the variables to variable table, the
// parameters were added earlier.
VariableTable vars = getVariableTable(tree);
addVariables(tree, vars);
// Add return to end if needed.
Node stmts = node.getLastChild();
Node lastStmt = stmts.getLastChild();
if (lastStmt == null ||
lastStmt.getType() != TokenStream.RETURN)
{
stmts.addChildToBack(new Node(TokenStream.RETURN));
}
} else {
if (inFunction) {
// Nested functions require activation objects.
((FunctionNode) tree).setRequiresActivation(true);
}
FunctionNode fnNode = (FunctionNode)
node.getProp(Node.FUNCTION_PROP);
addParameters(fnNode);
NodeTransformer inner = newInstance();
fnNode = (FunctionNode)
inner.transform(fnNode, tree, ts, scope);
node.putProp(Node.FUNCTION_PROP, fnNode);
Vector fns = (Vector) tree.getProp(Node.FUNCTION_PROP);
if (fns == null) {
fns = new Vector(7);
tree.putProp(Node.FUNCTION_PROP, fns);
}
fns.addElement(fnNode);
}
break;
case TokenStream.LABEL:
{
Node child = node.getFirstChild();
node.removeChild(child);
String id = child.getString();
// check against duplicate labels...
for (int i=loops.size()-1; i >= 0; i--) {
Node n = (Node) loops.elementAt(i);
if (n.getType() == TokenStream.LABEL) {
String otherId = (String)n.getProp(Node.LABEL_PROP);
if (id.equals(otherId)) {
Object[] errArgs = { id };
String message = Context.getMessage("msg.dup.label",
errArgs);
reportMessage(Context.getContext(), message, node,
tree, true, scope);
break typeswitch;
}
}
}
node.putProp(Node.LABEL_PROP, id);
/* Make a target and put it _after_ the following
* node. And in the LABEL node, so breaks get the
* right target.
*/
Node breakTarget = new Node(TokenStream.TARGET);
Node parent = iterator.getCurrentParent();
Node next = node.getNextSibling();
while (next != null &&
(next.getType() == TokenStream.LABEL ||
next.getType() == TokenStream.TARGET))
next = next.getNextSibling();
if (next == null)
break;
parent.addChildAfter(breakTarget, next);
node.putProp(Node.BREAK_PROP, breakTarget);
if (next.getType() == TokenStream.LOOP) {
node.putProp(Node.CONTINUE_PROP,
next.getProp(Node.CONTINUE_PROP));
}
loops.push(node);
loopEnds.push(breakTarget);
break;
}
case TokenStream.SWITCH:
{
Node breakTarget = new Node(TokenStream.TARGET);
Node parent = iterator.getCurrentParent();
parent.addChildAfter(breakTarget, node);
// make all children siblings except for selector
Node sib = node;
Node child = node.getFirstChild().next;
while (child != null) {
Node next = child.next;
node.removeChild(child);
parent.addChildAfter(child, sib);
sib = child;
child = next;
}
node.putProp(Node.BREAK_PROP, breakTarget);
loops.push(node);
loopEnds.push(breakTarget);
node.putProp(Node.CASES_PROP, new Vector(13));
break;
}
case TokenStream.DEFAULT:
case TokenStream.CASE:
{
Node sw = (Node) loops.peek();
if (type == TokenStream.CASE) {
Vector cases = (Vector) sw.getProp(Node.CASES_PROP);
cases.addElement(node);
} else {
sw.putProp(Node.DEFAULT_PROP, node);
}
break;
}
case TokenStream.NEWLOCAL : {
Integer localCount
= (Integer)(tree.getProp(Node.LOCALCOUNT_PROP));
if (localCount == null) {
tree.putProp(Node.LOCALCOUNT_PROP, new Integer(1));
}
else {
tree.putProp(Node.LOCALCOUNT_PROP,
new Integer(localCount.intValue() + 1));
}
}
break;
case TokenStream.LOOP:
loops.push(node);
loopEnds.push(node.getProp(Node.BREAK_PROP));
break;
case TokenStream.WITH:
{
if (inFunction) {
// With statements require an activation object.
((FunctionNode) tree).setRequiresActivation(true);
}
loops.push(node);
Node leave = node.getNextSibling();
if (leave.getType() != TokenStream.LEAVEWITH) {
throw new RuntimeException("Unexpected tree");
}
loopEnds.push(leave);
break;
}
case TokenStream.TRY:
{
Node finallytarget = (Node)node.getProp(Node.FINALLY_PROP);
if (finallytarget != null) {
hasFinally = true;
loops.push(node);
loopEnds.push(finallytarget);
}
Integer localCount
= (Integer)(tree.getProp(Node.LOCALCOUNT_PROP));
if (localCount == null) {
tree.putProp(Node.LOCALCOUNT_PROP, new Integer(1));
}
else {
tree.putProp(Node.LOCALCOUNT_PROP,
new Integer(localCount.intValue() + 1));
}
break;
}
case TokenStream.TARGET:
case TokenStream.LEAVEWITH:
if (!loopEnds.empty() && loopEnds.peek() == node) {
loopEnds.pop();
loops.pop();
}
break;
case TokenStream.RETURN:
{
/* If we didn't support try/finally, it wouldn't be
* necessary to put LEAVEWITH nodes here... but as
* we do need a series of JSR FINALLY nodes before
* each RETURN, we need to ensure that each finally
* block gets the correct scope... which could mean
* that some LEAVEWITH nodes are necessary.
*/
if (!hasFinally)
break; // skip the whole mess.
Node parent = iterator.getCurrentParent();
for (int i=loops.size()-1; i >= 0; i--) {
Node n = (Node) loops.elementAt(i);
int elemtype = n.getType();
if (elemtype == TokenStream.TRY) {
Node jsrnode = new Node(TokenStream.JSR);
Object jsrtarget = n.getProp(Node.FINALLY_PROP);
jsrnode.putProp(Node.TARGET_PROP, jsrtarget);
parent.addChildBefore(jsrnode, node);
} else if (elemtype == TokenStream.WITH) {
parent.addChildBefore(new Node(TokenStream.LEAVEWITH),
node);
}
}
break;
}
case TokenStream.BREAK:
case TokenStream.CONTINUE:
{
Node loop = null;
boolean labelled = node.hasChildren();
String id = null;
if (labelled) {
/* get the label */
Node child = node.getFirstChild();
id = child.getString();
node.removeChild(child);
}
int i;
Node parent = iterator.getCurrentParent();
for (i=loops.size()-1; i >= 0; i--) {
Node n = (Node) loops.elementAt(i);
int elemtype = n.getType();
if (elemtype == TokenStream.WITH) {
parent.addChildBefore(new Node(TokenStream.LEAVEWITH),
node);
} else if (elemtype == TokenStream.TRY) {
Node jsrFinally = new Node(TokenStream.JSR);
Object jsrTarget = n.getProp(Node.FINALLY_PROP);
jsrFinally.putProp(Node.TARGET_PROP, jsrTarget);
parent.addChildBefore(jsrFinally, node);
} else if (!labelled &&
(elemtype == TokenStream.LOOP ||
(elemtype == TokenStream.SWITCH &&
type == TokenStream.BREAK)))
{
/* if it's a simple break/continue, break from the
* nearest enclosing loop or switch
*/
loop = n;
break;
} else if (labelled &&
elemtype == TokenStream.LABEL &&
id.equals((String)n.getProp(Node.LABEL_PROP)))
{
loop = n;
break;
}
}
int propType = type == TokenStream.BREAK
? Node.BREAK_PROP
: Node.CONTINUE_PROP;
Node target = loop == null
? null
: (Node) loop.getProp(propType);
if (loop == null || target == null) {
String message;
if (!labelled) {
// didn't find an appropriate target
if (type == TokenStream.CONTINUE) {
message = Context.getMessage
("msg.continue.outside", null);
} else {
message = Context.getMessage
("msg.bad.break", null);
}
} else if (loop != null) {
message = Context.getMessage("msg.continue.nonloop",
null);
} else {
Object[] errArgs = { id };
message = Context.getMessage
("msg.undef.label", errArgs);
}
reportMessage(Context.getContext(), message, node,
tree, true, scope);
node.setType(TokenStream.NOP);
break;
}
node.setType(TokenStream.GOTO);
node.putProp(Node.TARGET_PROP, target);
break;
}
case TokenStream.CALL:
if (isSpecialCallName(tree, node))
node.putProp(Node.SPECIALCALL_PROP, Boolean.TRUE);
visitCall(node, tree);
break;
case TokenStream.NEW:
if (isSpecialCallName(tree, node))
node.putProp(Node.SPECIALCALL_PROP, Boolean.TRUE);
visitNew(node, tree);
break;
case TokenStream.DOT:
{
Node right = node.getLastChild();
right.setType(TokenStream.STRING);
break;
}
case TokenStream.EXPRSTMT:
node.setType(inFunction ? TokenStream.POP : TokenStream.POPV);
break;
case TokenStream.OBJECT:
{
Vector regexps = (Vector) tree.getProp(Node.REGEXP_PROP);
if (regexps == null) {
regexps = new Vector(3);
tree.putProp(Node.REGEXP_PROP, regexps);
}
regexps.addElement(node);
Node n = new Node(TokenStream.OBJECT);
iterator.replaceCurrent(n);
n.putProp(Node.REGEXP_PROP, node);
break;
}
case TokenStream.VAR:
{
ShallowNodeIterator i = node.getChildIterator();
Node result = new Node(TokenStream.BLOCK);
while (i.hasMoreElements()) {
Node n = i.nextNode();
if (!n.hasChildren())
continue;
Node init = n.getFirstChild();
n.removeChild(init);
Node asn = (Node) irFactory.createAssignment(
TokenStream.NOP, n, init, null,
false);
Node pop = new Node(TokenStream.POP, asn, node.getDatum());
result.addChildToBack(pop);
}
iterator.replaceCurrent(result);
break;
}
case TokenStream.DELPROP:
case TokenStream.SETNAME:
{
if (!inFunction || inWithStatement())
break;
Node bind = node.getFirstChild();
if (bind == null || bind.getType() != TokenStream.BINDNAME)
break;
String name = bind.getString();
if (name.equals("arguments")) {
// use of "arguments" requires an activation object.
((FunctionNode) tree).setRequiresActivation(true);
}
VariableTable vars = getVariableTable(tree);
if (vars.get(name) != null) {
if (type == TokenStream.SETNAME) {
node.setType(TokenStream.SETVAR);
bind.setType(TokenStream.STRING);
} else {
// Local variables are by definition permanent
Node n = new Node(TokenStream.PRIMARY,
new Integer(TokenStream.FALSE));
iterator.replaceCurrent(n);
}
}
break;
}
case TokenStream.GETPROP:
if (inFunction) {
Node n = node.getFirstChild().getNextSibling();
String name = n == null ? "" : n.getString();
if (name.equals("arguments") ||
(name.equals("length") &&
Context.getContext().getLanguageVersion() ==
Context.VERSION_1_2))
{
// Use of "arguments" or "length" in 1.2 requires
// an activation object.
((FunctionNode) tree).setRequiresActivation(true);
}
}
break;
case TokenStream.NAME:
{
if (!inFunction || inWithStatement())
break;
String name = node.getString();
if (name.equals("arguments")) {
// Use of "arguments" requires an activation object.
((FunctionNode) tree).setRequiresActivation(true);
}
VariableTable vars = getVariableTable(tree);
if (vars.get(name) != null) {
node.setType(TokenStream.GETVAR);
}
break;
}
}
}
return tree;
}
protected void addVariables(Node tree, VariableTable vars) {
// OPT: a whole pass to collect variables seems expensive.
// Could special case to go into statements only.
boolean inFunction = tree.getType() == TokenStream.FUNCTION;
PreorderNodeIterator iterator = tree.getPreorderIterator();
Hashtable ht = null;
Node node;
while ((node = iterator.nextNode()) != null) {
int nodeType = node.getType();
if (inFunction && nodeType == TokenStream.FUNCTION &&
node != tree)
{
// In a function with both "var x" and "function x",
// disregard the var statement, independent of order.
String name = node.getString();
if (name == null)
continue;
vars.removeLocal(name);
if (ht == null)
ht = new Hashtable();
ht.put(name, Boolean.TRUE);
}
if (nodeType != TokenStream.VAR)
continue;
ShallowNodeIterator i = node.getChildIterator();
while (i.hasMoreElements()) {
Node n = i.nextNode();
if (ht == null || ht.get(n.getString()) == null)
vars.addLocal(n.getString());
}
}
}
protected void addParameters(FunctionNode fnNode) {
VariableTable vars = fnNode.getVariableTable();
Node args = fnNode.getFirstChild();
if (args.getType() == TokenStream.LP && vars.getParameterCount() == 0)
{
// Add parameters
ShallowNodeIterator i = args.getChildIterator();
while (i.hasMoreElements()) {
Node n = i.nextNode();
String arg = n.getString();
vars.addParameter(arg);
}
}
}
protected void visitNew(Node node, Node tree) {
}
protected void visitCall(Node node, Node tree) {
/*
* For
* Call(GetProp(a, b), c, d) // or GetElem...
* we wish to evaluate as
* Call(GetProp(tmp=a, b), tmp, c, d)
*
* for
* Call(Name("a"), b, c)
* we wish to evaluate as
* Call(GetProp(tmp=GetBase("a"), "a"), tmp, b, c)
*
* and for
* Call(a, b, c);
* we wish to evaluate as
* Call(tmp=a, Parent(tmp), c, d)
*/
Node left = node.getFirstChild();
// count the arguments
int argCount = 0;
Node arg = left.getNextSibling();
while (arg != null) {
arg = arg.getNextSibling();
argCount++;
}
boolean addGetThis = false;
if (left.getType() == TokenStream.NAME) {
VariableTable vars = getVariableTable(tree);
String name = left.getString();
if (inFunction && vars.get(name) != null && !inWithStatement()) {
// call to a var. Transform to Call(GetVar("a"), b, c)
left.setType(TokenStream.GETVAR);
// fall through to code to add GetParent
} else {
// transform to Call(GetProp(GetBase("a"), "a"), b, c)
node.removeChild(left);
left.setType(TokenStream.GETBASE);
Node str = left.cloneNode();
str.setType(TokenStream.STRING);
Node getProp = new Node(TokenStream.GETPROP, left, str);
node.addChildToFront(getProp);
left = getProp;
// Conditionally set a flag to add a GETTHIS node.
// The getThis entry in the runtime will take a
// Scriptable object intended to be used as a 'this'
// and make sure that it is neither a With object or
// an activation object.
// Executing getThis requires at least two instanceof
// tests, so we only include it if we are currently
// inside a 'with' statement, or if we are executing
// a script (to protect against an eval inside a with).
addGetThis = inWithStatement() || !inFunction;
// fall through to GETPROP code
}
}
if (left.getType() != TokenStream.GETPROP &&
left.getType() != TokenStream.GETELEM)
{
node.removeChild(left);
Node tmp = irFactory.createNewTemp(left);
Node use = irFactory.createUseTemp(tmp);
use.putProp(Node.TEMP_PROP, tmp);
Node parent = new Node(TokenStream.PARENT, use);
node.addChildToFront(parent);
node.addChildToFront(tmp);
return;
}
Node leftLeft = left.getFirstChild();
left.removeChild(leftLeft);
Node tmp = irFactory.createNewTemp(leftLeft);
left.addChildToFront(tmp);
Node use = irFactory.createUseTemp(tmp);
use.putProp(Node.TEMP_PROP, tmp);
if (addGetThis)
use = new Node(TokenStream.GETTHIS, use);
node.addChildAfter(use, left);
}
protected boolean inWithStatement() {
for (int i=loops.size()-1; i >= 0; i--) {
Node n = (Node) loops.elementAt(i);
if (n.getType() == TokenStream.WITH)
return true;
}
return false;
}
/**
* Return true if the node is a call to a function that requires
* access to the enclosing activation object.
*/
private boolean isSpecialCallName(Node tree, Node node) {
Node left = node.getFirstChild();
boolean isSpecial = false;
if (left.getType() == TokenStream.NAME) {
String name = left.getString();
isSpecial = name.equals("eval") || name.equals("With");
} else {
if (left.getType() == TokenStream.GETPROP) {
String name = left.getLastChild().getString();
isSpecial = name.equals("exec");
}
}
if (isSpecial) {
// Calls to these functions require activation objects.
if (inFunction)
((FunctionNode) tree).setRequiresActivation(true);
return true;
}
return false;
}
protected VariableTable createVariableTable() {
return new VariableTable();
}
protected VariableTable getVariableTable(Node tree) {
if (inFunction) {
return ((FunctionNode)tree).getVariableTable();
}
VariableTable result = (VariableTable)(tree.getProp(Node.VARS_PROP));
if (result == null) {
result = createVariableTable();
tree.putProp(Node.VARS_PROP, result);
}
return result;
}
protected void reportMessage(Context cx, String msg, Node stmt,
Node tree, boolean isError,
Scriptable scope)
{
Object obj = stmt.getDatum();
int lineno = 0;
if (obj != null && obj instanceof Integer)
lineno = ((Integer) obj).intValue();
Object prop = tree == null
? null
: tree.getProp(Node.SOURCENAME_PROP);
if (isError) {
if (scope != null)
throw NativeGlobal.constructError(
cx, "SyntaxError", msg, scope,
(String) prop, lineno, 0, null);
else
cx.reportError(msg, (String) prop, lineno, null, 0);
}
else
cx.reportWarning(msg, (String) prop, lineno, null, 0);
}
protected Stack loops;
protected Stack loopEnds;
protected boolean inFunction;
protected IRFactory irFactory;
}

View File

@@ -1,52 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
// API class
package org.mozilla.javascript;
/**
* Thrown if call is attempted on an object that is not a function.
*/
public class NotAFunctionException extends Exception {
public NotAFunctionException() {
}
public NotAFunctionException(String detail) {
super(detail);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,92 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Roger Lawrence
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.util.Stack;
/**
* This class implements a preorder tree iterator for the Node class.
*
* @see Node
* @author Norris Boyd
*/
public class PreorderNodeIterator {
public PreorderNodeIterator(Node n) {
start = n;
stack = new Stack();
}
public Node currentNode() {
return current;
}
public Node getCurrentParent() {
return currentParent;
}
public Node nextNode() {
if (current == null)
return current = start;
if (current.first != null) {
stack.push(current);
currentParent = current;
current = current.first;
} else {
current = current.next;
boolean isEmpty;
for (;;) {
isEmpty = stack.isEmpty();
if (isEmpty || current != null)
break;
current = (Node) stack.pop();
current = current.next;
}
currentParent = isEmpty ? null : (Node) stack.peek();
}
return current;
}
public void replaceCurrent(Node newNode) {
currentParent.replaceChild(current, newNode);
current = newNode;
}
private Node start;
private Node current;
private Node currentParent;
private Stack stack;
}

View File

@@ -1,50 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
// API class
package org.mozilla.javascript;
/**
* Thrown if errors are detected while attempting to define a property of
* a host object from a Java class or method, or if a property is not found.
*/
public class PropertyException extends Exception {
public PropertyException(String detail) {
super(detail);
}
}

View File

@@ -1,71 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Roger Lawrence
*
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
/**
* A proxy for the regexp package, so that the regexp package can be
* loaded optionally.
*
* @author Norris Boyd
*/
public interface RegExpProxy {
public Object executeRegExp(Object regExp, Scriptable scopeObj,
String str, int indexp[], boolean test);
public boolean isRegExp(Object obj);
public Object newRegExp(Context cx, Scriptable scope, String source,
String global, boolean flat);
public Object match(Context cx, Scriptable thisObj, Object[] args,
Function funObj)
throws JavaScriptException;
public Object search(Context cx, Scriptable thisObj, Object[] args,
Function funObj)
throws JavaScriptException;
public Object replace(Context cx, Scriptable thisObj, Object[] args,
Function funObj)
throws JavaScriptException;
public int find_split(Function funObj, String target, String separator,
Object re, int[] ip, int[] matchlen,
boolean[] matched, String[][] parensp);
}

View File

@@ -1,73 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
// API class
package org.mozilla.javascript;
/**
* All compiled scripts implement this interface.
* <p>
* This class encapsulates script execution relative to an
* object scope.
* @since 1.3
* @author Norris Boyd
*/
public interface Script {
/**
* Execute the script.
* <p>
* The script is executed in a particular runtime Context, which
* must be associated with the current thread.
* The script is executed relative to a scope--definitions and
* uses of global top-level variables and functions will access
* properties of the scope object. For compliant ECMA
* programs, the scope must be an object that has been initialized
* as a global object using <code>Context.initStandardObjects</code>.
* <p>
*
* @param cx the Context associated with the current thread
* @param scope the scope to execute relative to
* @return the result of executing the script
* @see org.mozilla.javascript.Context#initStandardObjects
* @exception JavaScriptException if an uncaught JavaScript exception
* occurred while executing the script
*/
public Object exec(Context cx, Scriptable scope)
throws JavaScriptException;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,335 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
// API class
package org.mozilla.javascript;
/**
* This is interface that all objects in JavaScript must implement.
* The interface provides for the management of properties and for
* performing conversions.
* <p>
* Host system implementors may find it easier to extend the ScriptableObject
* class rather than implementing Scriptable when writing host objects.
* <p>
* There are many static methods defined in ScriptableObject that perform
* the multiple calls to the Scriptable interface needed in order to
* manipulate properties in prototype chains.
* <p>
*
* @see org.mozilla.javascript.ScriptableObject
* @author Norris Boyd
* @author Nick Thompson
* @author Brendan Eich
*/
public interface Scriptable {
/**
* Get the name of the set of objects implemented by this Java class.
* This corresponds to the [[Class]] operation in ECMA and is used
* by Object.prototype.toString() in ECMA.<p>
* See ECMA 8.6.2 and 15.2.4.2.
*/
public String getClassName();
/**
* Value returned from <code>get</code> if the property is not
* found.
*/
public static final Object NOT_FOUND = new Object();
/**
* Get a named property from the object.
*
* Looks property up in this object and returns the associated value
* if found. Returns NOT_FOUND if not found.
* Note that this method is not expected to traverse the prototype
* chain. This is different from the ECMA [[Get]] operation.
*
* Depending on the property selector, the runtime will call
* this method or the form of <code>get</code> that takes an
* integer:
* <table>
* <tr><th>JavaScript code</th><th>Java code</th></tr>
* <tr><td>a.b </td><td>a.get("b", a)</td></tr>
* <tr><td>a["foo"] </td><td>a.get("foo", a)</td></tr>
* <tr><td>a[3] </td><td>a.get(3, a)</td></tr>
* <tr><td>a["3"] </td><td>a.get(3, a)</td></tr>
* <tr><td>a[3.0] </td><td>a.get(3, a)</td></tr>
* <tr><td>a["3.0"] </td><td>a.get("3.0", a)</td></tr>
* <tr><td>a[1.1] </td><td>a.get("1.1", a)</td></tr>
* <tr><td>a[-4] </td><td>a.get(-4, a)</td></tr>
* </table>
* <p>
* The values that may be returned are limited to the following:
* <UL>
* <LI>java.lang.Boolean objects</LI>
* <LI>java.lang.String objects</LI>
* <LI>java.lang.Number objects</LI>
* <LI>org.mozilla.javascript.Scriptable objects</LI>
* <LI>null</LI>
* <LI>The value returned by Context.getUndefinedValue()</LI>
* <LI>NOT_FOUND</LI>
* </UL>
* @param name the name of the property
* @param start the object in which the lookup began
* @return the value of the property (may be null), or NOT_FOUND
* @see org.mozilla.javascript.Context#getUndefinedValue
*/
public Object get(String name, Scriptable start);
/**
* Get a property from the object selected by an integral index.
*
* Identical to <code>get(String, Scriptable)</code> except that
* an integral index is used to select the property.
*
* @param index the numeric index for the property
* @param start the object in which the lookup began
* @return the value of the property (may be null), or NOT_FOUND
* @see org.mozilla.javascript.Scriptable#get(String,Scriptable)
*/
public Object get(int index, Scriptable start);
/**
* Indicates whether or not a named property is defined in an object.
*
* Does not traverse the prototype chain.<p>
*
* The property is specified by a String name
* as defined for the <code>get</code> method.<p>
*
* @param name the name of the property
* @param start the object in which the lookup began
* @return true if and only if the named property is found in the object
* @see org.mozilla.javascript.Scriptable#get
* @see org.mozilla.javascript.ScriptableObject#getProperty
*/
public boolean has(String name, Scriptable start);
/**
* Indicates whether or not an indexed property is defined in an object.
*
* Does not traverse the prototype chain.<p>
*
* The property is specified by an integral index
* as defined for the <code>get</code> method.<p>
*
* @param index the numeric index for the property
* @param start the object in which the lookup began
* @return true if and only if the indexed property is found in the object
* @see org.mozilla.javascript.Scriptable#get
* @see org.mozilla.javascript.ScriptableObject#getProperty
*/
public boolean has(int index, Scriptable start);
/**
* Sets a named property in this object.
* <p>
* The property is specified by a string name
* as defined for <code>get</code>.
* <p>
* The possible values that may be passed in are as defined for
* <code>get</code>. A class that implements this method may choose
* to ignore calls to set certain properties, in which case those
* properties are effectively read-only.<p>
* For properties defined in a prototype chain,
* use <code>putProperty</code> in ScriptableObject. <p>
* Note that if a property <i>a</i> is defined in the prototype <i>p</i>
* of an object <i>o</i>, then evaluating <code>o.a = 23</code> will cause
* <code>set</code> to be called on the prototype <i>p</i> with
* <i>o</i> as the <i>start</i> parameter.
* To preserve JavaScript semantics, it is the Scriptable
* object's responsibility to modify <i>o</i>. <p>
* This design allows properties to be defined in prototypes and implemented
* in terms of getters and setters of Java values without consuming slots
* in each instance.<p>
* <p>
* The values that may be set are limited to the following:
* <UL>
* <LI>java.lang.Boolean objects</LI>
* <LI>java.lang.String objects</LI>
* <LI>java.lang.Number objects</LI>
* <LI>org.mozilla.javascript.Scriptable objects</LI>
* <LI>null</LI>
* <LI>The value returned by Context.getUndefinedValue()</LI>
* </UL><p>
* Note that <code>has</code> will be called by the runtime first before
* <code>set</code> is called to determine in which object the
* property is defined.
* Note that this method is not expected to traverse the prototype chain,
* which is different from the ECMA [[Put]] operation.
* @param name the name of the property
* @param start the object whose property is being set
* @param value value to set the property to
* @see org.mozilla.javascript.Scriptable#has
* @see org.mozilla.javascript.Scriptable#get
* @see org.mozilla.javascript.ScriptableObject#putProperty
*/
public void put(String name, Scriptable start, Object value);
/**
* Sets an indexed property in this object.
* <p>
* The property is specified by an integral index
* as defined for <code>get</code>.<p>
*
* Identical to <code>put(String, Scriptable, Object)</code> except that
* an integral index is used to select the property.
*
* @param index the numeric index for the property
* @param start the object whose property is being set
* @param value value to set the property to
* @see org.mozilla.javascript.Scriptable#has
* @see org.mozilla.javascript.Scriptable#get
* @see org.mozilla.javascript.Scriptable#put(String,Scriptable,Object)
* @see org.mozilla.javascript.ScriptaleObject#putProperty
*/
public void put(int index, Scriptable start, Object value);
/**
* Removes a property from this object.
* This operation corresponds to the ECMA [[Delete]] except that
* the no result is returned. The runtime will guarantee that this
* method is called only if the property exists. After this method
* is called, the runtime will call Scriptable.has to see if the
* property has been removed in order to determine the boolean
* result of the delete operator as defined by ECMA 11.4.1.
* <p>
* A property can be made permanent by ignoring calls to remove
* it.<p>
* The property is specified by a String name
* as defined for <code>get</code>.
* <p>
* To delete properties defined in a prototype chain,
* see deleteProperty in ScriptableObject.
* @param name the identifier for the property
* @see org.mozilla.javascript.Scriptable#get
* @see org.mozilla.javascript.ScriptableObject#deleteProperty
*/
public void delete(String name);
/**
* Removes a property from this object.
*
* The property is specified by an integral index
* as defined for <code>get</code>.
* <p>
* To delete properties defined in a prototype chain,
* see deleteProperty in ScriptableObject.
*
* Identical to <code>delete(String)</code> except that
* an integral index is used to select the property.
*
* @param index the numeric index for the property
* @see org.mozilla.javascript.Scriptable#get
* @see org.mozilla.javascript.ScriptableObject#deleteProperty
*/
public void delete(int index);
/**
* Get the prototype of the object.
* @return the prototype
*/
public Scriptable getPrototype();
/**
* Set the prototype of the object.
* @param prototype the prototype to set
*/
public void setPrototype(Scriptable prototype);
/**
* Get the parent scope of the object.
* @return the parent scope
*/
public Scriptable getParentScope();
/**
* Set the parent scope of the object.
* @param parent the parent scope to set
*/
public void setParentScope(Scriptable parent);
/**
* Get an array of property ids.
*
* Not all property ids need be returned. Those properties
* whose ids are not returned are considered non-enumerable.
*
* @return an array of Objects. Each entry in the array is either
* a java.lang.String or a java.lang.Number
*/
public Object[] getIds();
/**
* Get the default value of the object with a given hint.
* The hints are String.class for type String, Number.class for type
* Number, Scriptable.class for type Object, and Boolean.class for
* type Boolean. <p>
*
* A <code>hint</code> of null means "no hint".
*
* See ECMA 8.6.2.6.
*
* @param hint the type hint
* @return the default value
*/
public Object getDefaultValue(Class hint);
/**
* The instanceof operator.
*
* <p>
* The JavaScript code "lhs instanceof rhs" causes rhs.hasInstance(lhs) to
* be called.
*
* <p>
* The return value is implementation dependent so that embedded host objects can
* return an appropriate value. See the JS 1.3 language documentation for more
* detail.
*
* <p>This operator corresponds to the proposed EMCA [[HasInstance]] operator.
*
* @param instance The value that appeared on the LHS of the instanceof
* operator
*
* @return an implementation dependent value
*/
public boolean hasInstance(Scriptable instance);
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,123 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
// API class
package org.mozilla.javascript;
/**
* This class describes the support needed to implement security.
* <p>
* Three main pieces of functionality are required to implement
* security for JavaScript. First, it must be possible to define
* classes with an associated security context. (This security
* context may be any object that has meaning to an embedding;
* for a client-side JavaScript embedding this would typically
* be an origin URL and/or a digital certificate.) Next it
* must be possible to get the current class context so that
* the implementation can determine securely which class is
* requesting a privileged action. And finally, it must be
* possible to map a class back into a security context so that
* additional classes may be defined with that security context.
* <p>
* These three pieces of functionality are encapsulated in the
* SecuritySupport class.
*
* @see org.mozilla.javascript.Context
* @see java.lang.ClassLoader
* @since 1.4 Release 2
* @author Norris Boyd
*/
public interface SecuritySupport {
/**
* Define and load a Java class.
* <p>
* In embeddings that care about security, the securityDomain
* must be associated with the defined class such that a call to
* getsecurityDomain with that class will return this security
* context.
* <p>
* @param name the name of the class
* @param data the bytecode of the class
* @param securityDomain some object specifying the security
* context of the code that is defining this class.
* Embeddings that don't care about security may allow
* null here. This value propagated from the values passed
* into methods of Context that evaluate scripts.
* @see java.lang.ClassLoader#defineClass
*/
public Class defineClass(String name, byte[] data,
Object securityDomain);
/**
* Get the current class Context.
* <p>
* This functionality is supplied by SecurityManager.getClassContext,
* but only one SecurityManager may be instantiated in a single JVM
* at any one time. So implementations that care about security must
* provide access to this functionality through this interface.
* <p>
* Note that the 0th entry of the returned array should be the class
* of the caller of this method. So if this method is implemented by
* calling SecurityManager.getClassContext, this method must allocate
* a new, shorter array to return.
*/
public Class[] getClassContext();
/**
* Return the security context associated with the given class.
* <p>
* If <code>cl</code> is a class defined through a call to
* SecuritySupport.defineClass, then return the security
* context from that call. Otherwise return null.
* @param cl a class potentially defined by defineClass
* @return a security context object previously passed to defineClass
*/
public Object getSecurityDomain(Class cl);
/**
* Return true iff the Java class with the given name should be exposed
* to scripts.
* <p>
* An embedding may filter which Java classes are exposed through
* LiveConnect to JavaScript scripts.
* @param fullClassName the full name of the class (including the package
* name, with '.' as a delimiter). For example the
* standard string class is "java.lang.String"
* @return whether or not to reveal this class to scripts
*/
public boolean visibleToScripts(String fullClassName);
}

View File

@@ -1,69 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Roger Lawrence
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.util.Enumeration;
/**
* This class implements a child iterator for the Node class.
*
* @see Node
* @author Norris Boyd
*/
public class ShallowNodeIterator implements Enumeration {
public ShallowNodeIterator(Node n) {
current = n;
}
public boolean hasMoreElements() {
return current != null;
}
public Object nextElement() {
return nextNode();
}
public Node nextNode() {
Node result = current;
current = current.next;
return result;
}
private Node current;
}

View File

@@ -1,222 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* John Bandhauer
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
// DEBUG API class
package org.mozilla.javascript;
/**
* This interface supports managing incrementally updated source text items.
* <p>
* Items have immutable names. They can be valid or invalid. They can
* accumulate text, but existing text can not be overwritten. They can be
* marked as 'complete', 'aborted', etc. They can be cleared of all text.
* See status flags for details.
*
* @see org.mozilla.javascript.SourceTextManager
* @author John Bandhauer
*/
public interface SourceTextItem
{
/**
* Possible status values...
*/
/**
* Item just created, no text added yet.
*/
public static final int INITED = 0;
/**
* Item has some text, likely that more will be added.
*/
public static final int PARTIAL = 1;
/**
* Item has all the text it is going to get.
*/
public static final int COMPLETED = 2;
/**
* User aborted loading of text, some text may be in item.
*/
public static final int ABORTED = 3;
/**
* Loading of text failed, some text may be in item.
*/
public static final int FAILED = 4;
/**
* Whatever text was in item has been cleared by a consumer.
*/
public static final int CLEARED = 5;
/**
* Item has be marked as invalid and has no useful information.
*/
public static final int INVALID = 6;
/**
* Append some text.
* <p>
* This only succeeds if status is INITED or PARTIAL.
*
* @param text String to append
* @return true if succeeded, false if failed
*/
public boolean append(String text);
/**
* Append a char.
* <p>
* This only succeeds if status is INITED or PARTIAL.
*
* @param c char to append
* @return true if succeeded, false if failed
*/
public boolean append(char c);
/**
* Append a char from a char[].
* <p>
* This only succeeds if status is INITED or PARTIAL.
*
* @param buf char[] from which to append
* @param offset offset into char[] from which to append
* @param count count of chars to append
* @return true if succeeded, false if failed
*/
public boolean append(char[] buf, int offset, int count);
/**
* Set status to COMPLETED.
* <p>
* meaning: all the text is there, it is complete, no problems.
* This only succeeds if status is INITED or PARTIAL.
*
* @return true if succeeded, false if failed
*/
public boolean complete();
/**
* Set status to ABORTED.
* <p>
* meaning: some text might be there, but user aborted text loading.
* This only succeeds if status is INITED or PARTIAL.
*
* @return true if succeeded, false if failed
*/
public boolean abort();
/**
* Set status to FAILED.
* <p>
* meaning: some text might be there, but loading failed.
* This only succeeds if status is INITED or PARTIAL.
*
* @return true if succeeded, false if failed
*/
public boolean fail();
/**
* Clear the text and set status to CLEARED.
* <p>
* meaning: consumer of the text has what he wants, leave this
* as an emptly placeholder.
* This succeeds unless status is INVALID.
*
* @return true if succeeded, false if failed
*/
public boolean clear();
/**
* Clear the text and set status to INVALID.
* <p>
* meaning: This item is not to be used, likely the SourceTextManager
* has been asked to create a new item (with potentially different
* text) in its place.
* This succeeds unless status is INVALID.
*
* @return true if succeeded, false if failed
*/
public boolean invalidate();
/**
* Get the Current Text.
*
* @return the text, null if INVALID
*/
public String getText();
/**
* Get the name.
*
* @return the name (immutable).
*/
public String getName();
/**
* Get the status.
*
* @return the current status
*/
public int getStatus();
/**
* Get the validity status.
*
* @return true if item is valid, false if not
*/
public boolean isValid();
/**
* Get a counter representing the modification count of the item.
* <p>
* Any consumer of the item may look at this value and store it at one
* point in time and then later look at the value again. If the
* value has increased, then the consumer can know that the item has
* been modified in some way and can then take the appropriate action.
* If the count has not changed from one point in time to another,
* then the item is guarenteed to not have changed in any way.
*
* NOTE: this value is not guaranteed to start at 0;
*
* @return the alter count
*/
public int getAlterCount();
}

View File

@@ -1,82 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* John Bandhauer
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
// DEBUG API class
package org.mozilla.javascript;
import java.util.Enumeration;
/**
* This interface supports managing incrementally updated source text.
*
* @see org.mozilla.javascript.SourceTextItem
* @see org.mozilla.javascript.Context#setSourceTextManager
* @author John Bandhauer
*/
public interface SourceTextManager
{
/**
* Create a new item.
* <p>
* A new item is always created. If an item with this name already exists,
* then that preexisting iten is is set as invalid.
*
* @param name item name - in most embedings this will be a URL or filename
* @return new item
*/
public SourceTextItem newItem(String name);
/**
* Get an existing item.
* <p>
* If an item with this name already exists, then return it. Otherwise,
* return null.
*
* @param name item name - in most embedings this will be a URL or filename
* @return existing item (or null if none)
*/
public SourceTextItem getItem(String name);
/**
* Get all items.
* <p>
* Takes a snapshot of the list of all items and returns an Enumeration.
*
* @return snapshot Enumeration of all items
*/
public Enumeration getAllItems();
}

View File

@@ -1,182 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Mike McCabe
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
/*
* A quick and dirty driver for testing and timing the scanner, parser
* and optimizer.
*/
package org.mozilla.javascript;
import java.io.*;
import java.lang.reflect.*;
class TestScan
{
public static void main(String[] args) throws IOException {
String file = null;
String opt = "nt";
int level = 0;
if (args.length == 1) {
file = args[0];
opt = "-nt";
}
else if (args.length == 2) {
file = args[1];
opt = args[0];
}
else if (args.length == 3 && args[0].equals("-opt")) {
level = Integer.parseInt(args[1]);
file = args[2];
opt = "-opt";
}
else if (args.length > 1 && args[0].equals("-compile")) {
opt = "-compile";
if (args.length == 3) {
file = args[2];
level = Integer.parseInt(args[1]);
} else if (args.length == 2) {
file = args[1];
} else {
usage();
System.exit(1);
}
}
else {
usage();
System.exit(1);
}
scan(opt, file, level);
}
public static void scan(String opt, String file, int level)
throws IOException
{
FileReader in = null;
// We might call scan from js, and so might not get an interned string.
opt = opt.intern();
try {
in = new FileReader(file);
}
catch (FileNotFoundException ex) {
System.out.println("couldn't open file " + file);
System.exit(1);
}
Context cx = new Context();
try {
cx.enter();
}
catch (Throwable t) {
}
if (opt == "-compile") {
cx.setOptimizationLevel(level);
cx.compileReader(null, in, file, 1, null);
return;
}
TokenStream ts = new TokenStream(in, null, file, 1);
if (opt == "-scan") {
int foo;
while ((foo = ts.getToken()) != ts.EOF) {
if (Context.printTrees)
System.out.println(ts.tokenToString(foo));
}
}
else if (opt == "-ir") {
IRFactory nf = new IRFactory(ts, null);
Parser p = new Parser(nf);
Node parsetree = (Node) p.parse(ts);
System.out.print(parsetree.toStringTree());
}
else if (opt == "-nt") {
IRFactory nf = new IRFactory(ts, null);
NodeTransformer nt = new NodeTransformer();
Parser p = new Parser(nf);
Node parsetree = (Node) p.parse(ts);
nt.transform(parsetree, null, ts, null);
System.out.print(parsetree.toStringTree());
}
else if (opt == "-opt") {
IRFactory nf = new IRFactory(ts, null);
NodeTransformer nt = new NodeTransformer();
Parser p = new Parser(nf);
Node parsetree = (Node) p.parse(ts);
nt.transform(parsetree, null, ts, null);
cx.setOptimizationLevel(level);
try {
Class optimizerClass
= Class.forName("org.mozilla.javascript.optimizer.Optimizer");
Object theOptimizer = optimizerClass.newInstance();
Class parameterTypes[] = { Node.class, Integer.class };
Method runOptimizer =
optimizerClass.getDeclaredMethod("optimize", parameterTypes);
Object a[] = { parsetree, new Integer(level) };
runOptimizer.invoke(theOptimizer, a);
System.out.print(parsetree.toStringTree());
}
catch (Exception x) {
System.out.println(x);
}
}
else {
usage();
return;
}
}
static void usage() {
System.err.println("usage: TestScan " +
"[-compile [level] | -scan | -ir | -nt | -opt " +
"[level] ] filename.js");
System.err.println("\t-compile [level] " +
"- compile the given file and return, for profiling");
System.err.println("\t-scan " +
"- list tokens");
System.err.println("\t-ir " +
"- print Internal Representation parse tree");
System.err.println("\t-nt " +
"- print NodeTransformed IR tree");
System.err.println("\t-opt [level] " +
"- print transformed and optimized IR tree");
System.err.println();
System.err.println("(note that nothing may be printed by the above if " +
"Context.printTrees is false.)");
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,139 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
/**
* This class implements the Undefined value in JavaScript.
*/
public class Undefined implements Scriptable {
static final public Scriptable instance = new Undefined();
public String getClassName() {
return "undefined";
}
public boolean has(String id, Scriptable start) {
return false;
}
public boolean has(int index, Scriptable start) {
return false;
}
public Object get(String id, Scriptable start) {
throw reportError();
}
public Object get(int index, Scriptable start) {
throw reportError();
}
public void put(String id,Scriptable start, Object value) {
throw reportError();
}
public void put(int index, Scriptable start, Object value) {
throw reportError();
}
public void delete(String id) {
throw reportError();
}
public void delete(int index) {
throw reportError();
}
public short getAttributes(String id, Scriptable start) {
throw reportError();
}
public short getAttributes(int index, Scriptable start) {
throw reportError();
}
public void setAttributes(String id, Scriptable start, short attributes) {
throw reportError();
}
public void setAttributes(int index, Scriptable start, short attributes) {
throw reportError();
}
public Scriptable getPrototype() {
throw reportError();
}
public void setPrototype(Scriptable prototype) {
throw reportError();
}
public Scriptable getParentScope() {
throw reportError();
}
public void setParentScope(Scriptable parent) {
throw reportError();
}
public Object[] getIds() {
throw reportError();
}
public Object getDefaultValue(Class cl) {
if (cl == ScriptRuntime.StringClass)
return "undefined";
if (cl == ScriptRuntime.NumberClass)
return ScriptRuntime.NaNobj;
if (cl == ScriptRuntime.BooleanClass)
return Boolean.FALSE;
return this;
}
public boolean hasInstance(Scriptable value) {
throw reportError();
}
public boolean instanceOf(Scriptable prototype) {
return false;
}
private RuntimeException reportError() {
String message = Context.getMessage("msg.undefined", null);
return Context.reportRuntimeError(message);
}
}

View File

@@ -1,161 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Roger Lawrence
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.io.*;
import java.util.*;
public class VariableTable {
public int size()
{
return itsVariables.size();
}
public int getParameterCount()
{
return varStart;
}
public LocalVariable createLocalVariable(String name, boolean isParameter)
{
return new LocalVariable(name, isParameter);
}
public LocalVariable get(int index)
{
return (LocalVariable)(itsVariables.elementAt(index));
}
public LocalVariable get(String name)
{
Integer vIndex = (Integer)(itsVariableNames.get(name));
if (vIndex != null)
return (LocalVariable)(itsVariables.elementAt(vIndex.intValue()));
else
return null;
}
public int getOrdinal(String name) {
Integer vIndex = (Integer)(itsVariableNames.get(name));
if (vIndex != null)
return vIndex.intValue();
else
return -1;
}
public String getName(int index)
{
return ((LocalVariable)(itsVariables.elementAt(index))).getName();
}
public void establishIndices()
{
for (int i = 0; i < itsVariables.size(); i++) {
LocalVariable lVar = (LocalVariable)(itsVariables.elementAt(i));
lVar.setIndex(i);
}
}
public void addParameter(String pName)
{
Integer pIndex = (Integer)(itsVariableNames.get(pName));
if (pIndex != null) {
LocalVariable p = (LocalVariable)
(itsVariables.elementAt(pIndex.intValue()));
if (p.isParameter()) {
Object[] errorArgs = { pName };
String message = Context.getMessage("msg.dup.parms", errorArgs);
Context.reportWarning(message, null, 0, null, 0);
}
else { // there's a local variable with this name, blow it off
itsVariables.removeElementAt(pIndex.intValue());
}
}
int curIndex = varStart++;
LocalVariable lVar = createLocalVariable(pName, true);
itsVariables.insertElementAt(lVar, curIndex);
itsVariableNames.put(pName, new Integer(curIndex));
}
public void addLocal(String vName)
{
Integer vIndex = (Integer)(itsVariableNames.get(vName));
if (vIndex != null) {
LocalVariable v = (LocalVariable)
(itsVariables.elementAt(vIndex.intValue()));
if (v.isParameter()) {
// this is o.k. the parameter subsumes the variable def.
}
else {
return;
}
}
int index = itsVariables.size();
LocalVariable lVar = createLocalVariable(vName, false);
itsVariables.addElement(lVar);
itsVariableNames.put(vName, new Integer(index));
}
// This should only be called very early in compilation
public void removeLocal(String name) {
Integer i = (Integer) itsVariableNames.get(name);
if (i != null) {
itsVariables.removeElementAt(i.intValue());
itsVariableNames.remove(name);
Hashtable ht = new Hashtable(11);
Enumeration e = itsVariableNames.keys();
while (e.hasMoreElements()) {
Object k = e.nextElement();
Integer v = (Integer) itsVariableNames.get(k);
int v2 = v.intValue();
if (v2 > i.intValue())
v = new Integer(v2 - 1);
ht.put(k, v);
}
itsVariableNames = ht;
}
}
// a list of the formal parameters and local variables
protected Vector itsVariables = new Vector();
// mapping from name to index in list
protected Hashtable itsVariableNames = new Hashtable(11);
protected int varStart; // index in list of first variable
}

View File

@@ -1,68 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Marshall Cline
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
// API class
package org.mozilla.javascript;
/**
* Embeddings that wish to provide their own custom wrappings for Java
* objects may implement this interface and call Context.setWrapHandler.
* @see org.mozilla.javascript.Context#setWrapHandler
*/
public interface WrapHandler {
/**
* Wrap the object.
* <p>
* The value returned must be one of
* <UL>
* <LI>java.lang.Boolean</LI>
* <LI>java.lang.String</LI>
* <LI>java.lang.Number</LI>
* <LI>org.mozilla.javascript.Scriptable objects</LI>
* <LI>The value returned by Context.getUndefinedValue()</LI>
* <LI>null</LI>
* <p>
* If null is returned, the value obj will be wrapped as if
* no WrapHandler had been called.
* </UL>
* @param scope the scope of the executing script
* @param obj the object to be wrapped
* @staticType the static type of the object to be wrapped
* @return the wrapped value.
*/
public Object wrap(Scriptable scope, Object obj, Class staticType);
}

View File

@@ -1,115 +0,0 @@
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express oqr
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Rhino code, released
* May 6, 1999.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1997-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
package org.mozilla.javascript;
import java.lang.reflect.InvocationTargetException;
/**
* A wrapper for runtime exceptions.
*
* Used by the JavaScript runtime to wrap and propagate exceptions that occur
* during runtime.
*
* @author Norris Boyd
*/
public class WrappedException extends EvaluatorException implements Wrapper {
/**
* Create a new exception wrapped around an existing exception.
*
* @param exception the exception to wrap
*/
public WrappedException(Throwable exception) {
super(exception.getMessage());
this.exception = exception.fillInStackTrace();
}
/**
* Get the message for the exception.
*
* Delegates to the wrapped exception.
*/
public String getMessage() {
return "WrappedException of " + exception.toString();
}
/**
* Gets the localized message.
*
* Delegates to the wrapped exception.
*/
public String getLocalizedMessage() {
return "WrappedException of " + exception.getLocalizedMessage();
}
/**
* Get the wrapped exception.
*
* @return the exception that was presented as a argument to the
* constructor when this object was created
*/
public Throwable getWrappedException() {
return exception;
}
/**
* Get the wrapped exception.
*
* @return the exception that was presented as a argument to the
* constructor when this object was created
*/
public Object unwrap() {
return exception;
}
/**
* Wrap an exception.
*
* Provides special cases for EvaluatorExceptions (which are returned
* as-is), and InvocationTargetExceptions (which are unwrapped and
* passed to a recursive call to wrapException).<p>
*
* Otherwise the exception is simply wrapped in a WrappedException.
*/
public static EvaluatorException wrapException(Throwable e) {
if ((e instanceof InvocationTargetException))
e = ((InvocationTargetException) e).getTargetException();
if (e instanceof EvaluatorException)
return (EvaluatorException) e;
return new WrappedException(e);
}
private Throwable exception;
}

Some files were not shown because too many files have changed in this diff Show More