Compare commits

..

2126 Commits

Author SHA1 Message Date
sdv%sparc.spb.su
53866ece4f workaround for bug=30927
git-svn-id: svn://10.0.0.236/branches/M15-patch@72213 18797224-902f-48f8-a5cc-f745e15eee43
2000-06-14 11:34:36 +00:00
(no author)
350be55313 This commit was manufactured by cvs2svn to create branch 'M15-patch'.
git-svn-id: svn://10.0.0.236/branches/M15-patch@52901 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-06 02:47:16 +00:00
dmose%mozilla.org
ce50f7d151 updated license boilerplate to xPL 1.1, a=chofmann@netscape.com,r=endico@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@52900 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-06 02:47:15 +00:00
dmose%mozilla.org
fe6a96903d updated license boilerplated to xPL 1.1, a=chofmann@netscape.com,r=endico@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@52899 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-06 02:24:22 +00:00
endico%mozilla.org
33c31375b8 temporarily disabled this while dmose lands mpl licence change
git-svn-id: svn://10.0.0.236/trunk@52898 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-06 02:21:15 +00:00
dmose%mozilla.org
4136bb9b85 updated license boilerplated to xPL 1.1, a=chofmann@netscape.com,r=endico@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@52897 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-06 02:11:51 +00:00
taek%netscape.com
502dbdb8c2 updated to use /share/builds/components
git-svn-id: svn://10.0.0.236/trunk@52895 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-06 02:11:18 +00:00
dmose%mozilla.org
fa6f75bbee updated license boilerplated to xPL 1.1, a=chofmann
git-svn-id: svn://10.0.0.236/trunk@52894 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-06 02:06:26 +00:00
endico%mozilla.org
1f4659c914 temporarily turn off bonsai while dmose lands the mpl 1.1 licence
git-svn-id: svn://10.0.0.236/trunk@52893 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-06 02:03:13 +00:00
rpotts%netscape.com
6d25185793 bug #7428. Added support for connection timeout. Now if a connection cannot be made within 35 seconds, the transport times out.
git-svn-id: svn://10.0.0.236/trunk@52892 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-06 01:32:34 +00:00
sspitzer%netscape.com
cffac19a5f fix for #18064, r=alecf, a=choffman.
only create the local mail account if the user migrates from imap, or if the
user creates an imap server and they don't have a local mail account.


git-svn-id: svn://10.0.0.236/trunk@52891 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-06 01:22:28 +00:00
pollmann%netscape.com
63b5916e8b Bug 17995: Don't reset selection when adding an option to a combobox, as it caused reframing and a crash. r=harishd a=choffman
git-svn-id: svn://10.0.0.236/trunk@52890 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-06 00:54:54 +00:00
drapeau%eng.sun.com
c38feba394 r=fur@netscape.com, approval=chofmann@netscape.com. Fix for bug 5369
("[PP]Crash on startup because of Java Plug-in 1.3 for Netscape
Navigator.")  Make the code more bulletproof by checking for NULL
arguments to several methods.  If JVM isn't running, jEnv arg should
be NULL.

This doesn't entirely fix the problem of a JVM gone awry in all cases;
in the case of this particular bug, the Sun JDK 1.3 Beta HotSpot VM
caused an error, and there's no way for Mozilla code to detect this
failure mode.  The fix for that half of the problem is to use the new
JDK 1.3 Early Access VM, which does not exhibit the problem.


git-svn-id: svn://10.0.0.236/trunk@52888 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-06 00:24:42 +00:00
selmer%netscape.com
aa6d4da1fe Only put selected components in config's build
git-svn-id: svn://10.0.0.236/trunk@52887 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-06 00:04:08 +00:00
joki%netscape.com
acb57210c3 Fix for bug 17835. Free JS event listeners when the JS object they're registered on goes away. a:chofmann r:vidur
git-svn-id: svn://10.0.0.236/trunk@52886 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 23:37:40 +00:00
mscott%netscape.com
334b29cffa (not part of the build)
GetProtcocolHandler needs to pass in the uri we are trying to open so the
listener can pick an appropriate p.h. based on the protocol of the uri. (if
they so choose).


git-svn-id: svn://10.0.0.236/trunk@52885 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 23:26:16 +00:00
mscott%netscape.com
fb3eea6b4a (not part of the build)
1) add OpenURIVia support.
2) reimplent DispatchContent so we ask the listener if it can handle the content. Then when (if) we find
a content listener that can handle it, call DoContent.
3) if we can't find a content listener, go to the registry and try to find a registered content handler.
This part isn't finished as eventually i need to be going to the category manager instead of forming
the progid for the content handler myself.


git-svn-id: svn://10.0.0.236/trunk@52884 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 23:06:16 +00:00
mscott%netscape.com
4eb1a093e9 Add OpenURIVia which takes a static IP address.
(not part of the build)


git-svn-id: svn://10.0.0.236/trunk@52883 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 23:03:58 +00:00
mscott%netscape.com
cc6179325b (not part of build)
Add notion of CanHandleContent. This is supposed to be a light weight method for the implementor
such that the uri loader can ask right off the top if the listener can handle a particular content
type. If it can, then later on, the uir loader may call DoContent to actually handle it.


git-svn-id: svn://10.0.0.236/trunk@52882 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 22:54:53 +00:00
mscott%netscape.com
ab2f6ea0db add a new line at the end of the file
(not part of the seamonkey build)


git-svn-id: svn://10.0.0.236/trunk@52881 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 22:53:21 +00:00
mscott%netscape.com
53828293ef (not part of the seamonkey build!)
remove CanHandleConent. I don't think we need this. Also remove notion of getting a parent
content handler. This doesn't make sense anymore for how I'm defining a content handler.
Added progid prefix for content handler.


git-svn-id: svn://10.0.0.236/trunk@52880 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 22:52:35 +00:00
karnaze%netscape.com
49e55fa057 bugs 17138, 17168 and others - col allocation involving colspans honors constraints; pct colspans were allocating incorrectly if pct cols existed.
git-svn-id: svn://10.0.0.236/trunk@52879 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 22:36:59 +00:00
karnaze%netscape.com
c5c9738319 crash on abc - calls EnsureColumns upon entering reflow if appropriate
git-svn-id: svn://10.0.0.236/trunk@52878 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 22:33:04 +00:00
putterman%netscape.com
4ee15a0425 Workaround for 18088. make delete toolbar button work for thread pane. reviewed by
hangas approved by chofmann.


git-svn-id: svn://10.0.0.236/trunk@52877 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 22:21:41 +00:00
norris%netscape.com
1996d97ba3 Unify evaluation code to improve consistency and improve code size.
git-svn-id: svn://10.0.0.236/trunk@52875 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 22:18:24 +00:00
slamm%netscape.com
e5f4e7c849 Fix for bug 18017, "No sidebar panels in messenger." r=hangas a=chofmann
git-svn-id: svn://10.0.0.236/trunk@52871 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 22:10:29 +00:00
mjudge%netscape.com
b476111e67 fix review by sfrasier, approved choffman. simple fix to get first letter style frames/paragraphs to show their selection. simply notifies children that the selection bit should be "on"
git-svn-id: svn://10.0.0.236/trunk@52870 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 22:09:16 +00:00
fur%netscape.com
c8cc3fe9b2 Checkpoint
git-svn-id: svn://10.0.0.236/trunk@52867 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 21:58:37 +00:00
alecf%netscape.com
be87817fb0 fix for #17763 - initialize cellFrame so that if it's not found, the null check succeeds
r=hyatt
a=chofmann


git-svn-id: svn://10.0.0.236/trunk@52866 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 21:51:42 +00:00
norris%netscape.com
bef3328b2f Remove JSuncaughtExceptionLine, use an error reporter to report line number info instead.
git-svn-id: svn://10.0.0.236/trunk@52865 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 21:48:05 +00:00
norris%netscape.com
aebde57816 Improve performance of the non-error call code.
git-svn-id: svn://10.0.0.236/trunk@52862 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 21:23:10 +00:00
rpotts%netscape.com
fba1c662d5 bug #17500 (r=warren). Added code to fire an OnStopNotification to the parent load group if an active group is canceled.
git-svn-id: svn://10.0.0.236/trunk@52861 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 20:51:11 +00:00
selmer%netscape.com
a4236232dc Fixups
git-svn-id: svn://10.0.0.236/trunk@52858 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 19:18:33 +00:00
kin%netscape.com
81ed65e99b Temporary Fix for dogfood blocker bugs #18002 and #18006. With kipp's
permission, I backed out his fix for bug #1413 from
layout/html/base/src/nsContainerFrame.cpp revision 1.68.
Will re-check in kipp's fix after M11 is branched.
r=buster@netscape.com  a=chofmann


git-svn-id: svn://10.0.0.236/trunk@52857 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 17:42:21 +00:00
rjc%netscape.com
b4795254b6 Fix bug # 17675. Review: waterson. Approval: chofmann.
git-svn-id: svn://10.0.0.236/trunk@52852 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 09:28:42 +00:00
tbogard%aol.net
5fe04f058d Implemented so pretty straight forward pass through methods.
git-svn-id: svn://10.0.0.236/trunk@52851 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 09:07:57 +00:00
mscott%netscape.com
b5afeda640 (not part of the seamonkey build)
define and implement nsDocumentOpenInfo. Implement uri loader::OpenURI. This is the first pass at
my implementation it isn't complete and it doesn't use the registry for getting
 protocol handlers and content handlers yet...but it's a start


git-svn-id: svn://10.0.0.236/trunk@52849 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 06:01:40 +00:00
mscott%netscape.com
cddea4bf18 (not part of the seamonkey build)
include nsISupportsUtils.h


git-svn-id: svn://10.0.0.236/trunk@52848 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 06:01:05 +00:00
mscott%netscape.com
e1c9ba38b3 (not part of the seamonkey build!)
expanded OpenURI interface to take all the required arguments we need in order to really open the uri.
This includes adding the command, window target, event sink getter, load group and channel context.
Added dispatchContent method which is used by the doc open info's to talk back to the uri loader.
DispatchContent takes an opened channel and the uri content listener.


git-svn-id: svn://10.0.0.236/trunk@52847 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 06:00:36 +00:00
mscott%netscape.com
586a405369 (not part of the seamonkey build!)
doContent now returns a boolean called abortProcess. if the listener wants to handle the content without
 returning a stream listener, i.e. it wants the uri loader to stop doing anything else with this content,
then it returns true for abort process.


git-svn-id: svn://10.0.0.236/trunk@52846 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 05:59:42 +00:00
waterson%netscape.com
3aed471de6 Bug 18058. Remove 'commandDispatcher' from interface; obsolete, and leaky. r=hyatt, a=chofmann
git-svn-id: svn://10.0.0.236/trunk@52844 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 05:31:15 +00:00
waterson%netscape.com
ca247c028b Bug 18058. Remove 'commandDispatcher' from interface; obsolete. r=hyatt, a=chofmann
git-svn-id: svn://10.0.0.236/trunk@52843 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 05:30:56 +00:00
jefft%netscape.com
2b02c816a3 fixed bug 17928 - undo is not working for thread pane; this is the backend fix of the problem; creating TransactionManager in nsMsgWindow instead of in nsMessenger; r=bienvenu,a=chofmann
git-svn-id: svn://10.0.0.236/trunk@52842 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 05:23:15 +00:00
brendan%mozilla.org
77646a1480 Remove nsIFrameReflow.h deadwood (r=waterson).
git-svn-id: svn://10.0.0.236/trunk@52841 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 05:00:39 +00:00
dougt%netscape.com
1cf333f618 Backing out changes due to nsCOMPtr build problems.
git-svn-id: svn://10.0.0.236/trunk@52840 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 03:32:33 +00:00
dougt%netscape.com
fced92a57e backing out changes. looks like this stuff is untested in a full build.
git-svn-id: svn://10.0.0.236/trunk@52839 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 03:31:04 +00:00
cls%seawood.org
dc0901d830 Fix for the template variable change from <T> to <nsISupports>. r=dougt
git-svn-id: svn://10.0.0.236/trunk@52838 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 03:11:03 +00:00
hangas%netscape.com
b0cc23dd32 Command updating and dispatching changes for menu items. Fixes 17848. r=hyatt, a=chofmann
git-svn-id: svn://10.0.0.236/trunk@52837 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 02:21:47 +00:00
dougt%netscape.com
8d74ce705f Changed ownership module inside xpcom/proxy to remove cached objects passed their owner's lifespan.
Removed out of band callback in xpcom/proxy
Fixed webshell leak due to xpcom/proxy. (17009)
Just about everything is now a comptr, god save us. :-)

r=jband, a=brendan.


git-svn-id: svn://10.0.0.236/trunk@52836 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 02:21:46 +00:00
dougt%netscape.com
d73bc37e66 Fix for 17842. Make nsCOMPtr<nsISupports> should not be weak typed. scc's
this change to me and since he is on vacation until monday and I need this
for an M11 bug, I am checking it in.   I am hoping it is the right
thing to do.

a=brendan.


git-svn-id: svn://10.0.0.236/trunk@52835 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 02:18:46 +00:00
alecf%netscape.com
a92195a3a9 implement EnsureRowIsVisible for bug #17763
r=scottip


git-svn-id: svn://10.0.0.236/trunk@52834 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 02:02:09 +00:00
sspitzer%netscape.com
0fdb0ed03c fix warning and fix bug #18036, r=bienvenu, a=chofmann.
prevent the infinite loop when applying filters to mail if a filter
rule uses an arbitrary header.


git-svn-id: svn://10.0.0.236/trunk@52833 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 01:58:03 +00:00
mcafee%netscape.com
5478f9dda3 Switching to use NS_WITH_SERVICE macro as specified in (5403); removing spurious clipboard service instance in nsEditorEventListeners.cpp. r=akkana, a=chofmann.
git-svn-id: svn://10.0.0.236/trunk@52832 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 01:29:49 +00:00
sdagley%netscape.com
e6b6878f91 Fix to larryh's earlier checkin to implement bug #17558. Previous fix from bad diff would always result in an error trying to create a file that already existed (should only be an error in certain cases). r=sfraser
git-svn-id: svn://10.0.0.236/trunk@52831 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 01:18:07 +00:00
waterson%netscape.com
808d64da48 Fix leak with nsCOMPtr. r=brendan, a=brendan
git-svn-id: svn://10.0.0.236/trunk@52830 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 00:52:23 +00:00
selmer%netscape.com
45c7e5cf11 Tweak prior checkin a little
git-svn-id: svn://10.0.0.236/trunk@52829 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 00:49:23 +00:00
jfrancis%netscape.com
6d48eccaa5 bug 17744; a=choffman; r=floppy moose
git-svn-id: svn://10.0.0.236/trunk@52828 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 00:46:06 +00:00
waterson%netscape.com
7335ede542 Fix leak with nsCOMPtr. r=brendan, a=brendan
git-svn-id: svn://10.0.0.236/trunk@52827 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 00:44:10 +00:00
selmer%netscape.com
c9b01acbd6 Fixups to generatelist & related handling of listbox type widgets
git-svn-id: svn://10.0.0.236/trunk@52826 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 00:36:17 +00:00
matt%netscape.com
34a8cb4799 fix for bug 18042 by adding close window tag r=mcafee
git-svn-id: svn://10.0.0.236/trunk@52825 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 00:34:48 +00:00
larryh%netscape.com
1f62cd6fa3 BugZilla 17558. PR_Open() gets PR_EXCL flag
git-svn-id: svn://10.0.0.236/trunk@52824 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 00:21:39 +00:00
despotdaemon%netscape.com
3189ded990 Pseudo-automatic update of changes made by vishy@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@52823 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 00:09:17 +00:00
pollmann%netscape.com
b98eecf039 Bug 17431: Clean house in form and form control destructors to allow reframing r=harishd a=choffman
git-svn-id: svn://10.0.0.236/trunk@52822 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 23:16:47 +00:00
sfraser%netscape.com
d76ff386a5 Fixes for 16723 -- fix error returns from imglib. Remove and re-add files to project to fix the case of the filenames. r=pnunn, a=chofmann.
git-svn-id: svn://10.0.0.236/trunk@52820 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 23:11:48 +00:00
sfraser%netscape.com
c0ec1f713e Fixes for 16723 -- fix error returns from imglib. r=pnunn, a=chofmann.
git-svn-id: svn://10.0.0.236/trunk@52819 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 23:11:11 +00:00
sfraser%netscape.com
1fcc54491d Fixes for 16723 -- fix error handling so that errors from image allocation are propogated back to imglib.. r=pnunn, a=chofmann.
git-svn-id: svn://10.0.0.236/trunk@52818 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 22:47:24 +00:00
rods%netscape.com
e34b01ce89 Commented out the reset of the list when an option gets added
Fixes crashers 17836, 17852, 17965 r=kmcclusk


git-svn-id: svn://10.0.0.236/trunk@52817 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 22:45:10 +00:00
mcafee%netscape.com
451b1f9771 Fixing JS error when loading prefs; skipping assertion in nsPrefWindow::ChangePanel() that is not needed for prefs to function, left a comment there so we can fix that later. (14663) a=matt, r=chofmann.
git-svn-id: svn://10.0.0.236/trunk@52816 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 22:39:21 +00:00
sfraser%netscape.com
b5daf46f31 Fixes for 18029 and 16723 -- fix image drawing on Mac to use GWorlds, and put in api to lock and unlock pixels. Pass a real nsDrawingSurface to the image, instead oif a cast GrafPtr. r=pnunn, a=chofmann.
git-svn-id: svn://10.0.0.236/trunk@52815 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 22:36:21 +00:00
sfraser%netscape.com
db24ddd87b Fixes for 18029 and 16723 -- fix image drawing on Mac to use GWorlds, and put in api to lock and unlock pixels. r=pnunn, a=chofmann.
git-svn-id: svn://10.0.0.236/trunk@52814 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 22:32:22 +00:00
sfraser%netscape.com
28261a4ca0 Fixes for 18029 and 16723 -- fix image drawing on Mac to use GWorlds, and put in api to lock and unlock pixels. Leave more free space in the heap for image (GWorld) pixels. r=pnunn, a=chofmann.
git-svn-id: svn://10.0.0.236/trunk@52813 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 22:29:02 +00:00
sfraser%netscape.com
2d10f84704 Fixes for 18029 and 16723 -- fix image drawing on Mac to use GWorlds, and put in api to lock and unlock pixels. Adding new error module for libimg. r=pnunn, a=chofmann.
git-svn-id: svn://10.0.0.236/trunk@52812 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 22:27:36 +00:00
sfraser%netscape.com
1cf929984f Fixes for 18029 and 16723 -- fix image drawing on Mac to use GWorlds, and put in api to lock and unlock pixels. r=pnunn, a=chofmann.
git-svn-id: svn://10.0.0.236/trunk@52811 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 22:26:57 +00:00
nisheeth%netscape.com
59271d7e21 r=norris,warren,radha. a=chofmann. Fix for bug 1646. Javascript: URLS were not getting loaded properly because the webshell was changing its notion of the current document (by setting mURL and mReferrer) too eagerly. Now, it does so only after the nsDocLoader::LoadDocument() in DoLoadURL() returns successfully.
git-svn-id: svn://10.0.0.236/trunk@52809 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 22:09:46 +00:00
pinkerton%netscape.com
7f537da550 add "status" area to the bottom so that bottom scroll arrow on MacOS is visible (r=slamm, bug# 8266).
git-svn-id: svn://10.0.0.236/trunk@52808 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 22:04:17 +00:00
nisheeth%netscape.com
45eec85b6b r=norris,warren,radha. a=chofmann. Fix for 1646. Javascript: urls return NS_ERROR_DOM_RETVAL_UNDEFINED when the javascript: url evaluates into an undefined value. This error is propagated back up to nsWebShell::DoLoadURL().
git-svn-id: svn://10.0.0.236/trunk@52807 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 22:02:19 +00:00
varada%netscape.com
027697488c updating accountsetup.ini to deal with workspace
git-svn-id: svn://10.0.0.236/trunk@52805 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 21:48:32 +00:00
varada%netscape.com
fee0b89b42 updating makefile to create the WSTemplate
git-svn-id: svn://10.0.0.236/trunk@52804 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 21:47:27 +00:00
sfraser%netscape.com
df972eb658 Did a 'Remove object code and compact' on this project, and tidied up some access paths to try to eliminate the CodeWarrior hangs. a=leaf
git-svn-id: svn://10.0.0.236/trunk@52802 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 21:16:02 +00:00
valeski%netscape.com
8cf0748300 10736, r=andreas.otte@primus-online.de. Actually I'm more like the reviewer here. Andreas submitted this optimization to MakeAbsolute (it uses minimal memory routines and minimal parsing. this means performance increase by a factor of 10 for this method). I'm checking it in for him.
git-svn-id: svn://10.0.0.236/trunk@52800 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 20:31:36 +00:00
neeti%netscape.com
1fe4d7149a fix for MLK bug 15818, every ImageURLImpl leaks.r=pnunn, a=chofmann.
git-svn-id: svn://10.0.0.236/trunk@52799 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 20:24:25 +00:00
selmer%netscape.com
81e77a0f71 Dynamic component checkbox initialization
git-svn-id: svn://10.0.0.236/trunk@52798 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 20:19:27 +00:00
sspitzer%netscape.com
aa210a0654 better fix for #17597, r=mscott, a=chofmann.
instead of setting the action for the url, check if we have a channel listener.
this is a cleaner fix, and now the quoting back end doesn't need to know about
the nntp url.


git-svn-id: svn://10.0.0.236/trunk@52796 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 20:02:31 +00:00
jefft%netscape.com
f295b6af47 fixed bug 15069 && 12345 -- passing in file:/// instead of file:// as the file url spec; r=bienvenu, a=chofmann
git-svn-id: svn://10.0.0.236/trunk@52795 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 19:47:21 +00:00
waterson%netscape.com
487d4b32af Bug 17953, 17959. Fix nsXULElement leaks by using nsCOMPtrs. r=warren, a=chofmann
git-svn-id: svn://10.0.0.236/trunk@52794 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 19:44:38 +00:00
waterson%netscape.com
9530e8d060 Bug 17955. Don't unnecessarily add script event listeners to temporary nodes used for overlay hookup. r=hyatt, a=chofmann
git-svn-id: svn://10.0.0.236/trunk@52793 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 19:43:43 +00:00
putterman%netscape.com
8b6bdd6f64 Fix for 17987. Approved by chofmann and reviewed by hangas.
git-svn-id: svn://10.0.0.236/trunk@52792 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 19:38:11 +00:00
kipp%netscape.com
b20b0d0a0e r=vidur; bug=17372; found a case where a trailing shy character on a line would trigger an infinite loop iff the shy character was the only piece of text after a text frame had been continued
git-svn-id: svn://10.0.0.236/trunk@52791 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 19:34:36 +00:00
waterson%netscape.com
143a89ffc8 Bug 17847. Fix 'commandupdater' hookup for master document. r=hyatt, a=chofmann
git-svn-id: svn://10.0.0.236/trunk@52790 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 18:37:58 +00:00
jefft%netscape.com
d7f7734495 fixed bug 17925 -- pop3 get all message again; restore old behavior; always set leave message on server; r=rhp, a=chofmann
git-svn-id: svn://10.0.0.236/trunk@52786 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 15:27:29 +00:00
rhp%netscape.com
2bd2bc6f06 Changes for String Bundle problem in forwarding - Bug #: 12345 - r: jefft - approved: chofmann
git-svn-id: svn://10.0.0.236/trunk@52785 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 13:59:26 +00:00
waterson%netscape.com
8c5481dd42 Bug 11501. Tree has regressed s.t. it is necessary to have a <treecol>; add it here. r=hyatt, a=jack
git-svn-id: svn://10.0.0.236/trunk@52784 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 08:57:52 +00:00
waterson%netscape.com
9f071c70b6 Bug 17946. Trees must be contained within a fixed div. r=hyatt, a=jack
git-svn-id: svn://10.0.0.236/trunk@52783 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 08:33:08 +00:00
sgehani%netscape.com
9c16ff2bfc No longer delete core file if it existed before running the installer: now only deleted if downloaded. Also, cleaned up the terminal window UI.
Only affects the standalone Install Wizard app, not the browser or mail.

[r=ssu, a=chofmann]


git-svn-id: svn://10.0.0.236/trunk@52782 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 08:23:55 +00:00
jefft%netscape.com
7ff57f52b5 partial fix for bug 12345 - unable to forward message; check for valid url before calling msg_pick_real_name() to prevent crashing; r=rhp, a=chofmann
git-svn-id: svn://10.0.0.236/trunk@52781 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 06:25:36 +00:00
beard%netscape.com
7670b1d344 moved System.exit() to end of main.
git-svn-id: svn://10.0.0.236/trunk@52780 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 06:15:55 +00:00
beard%netscape.com
a669c996d6 moved System.exit() to end of main
git-svn-id: svn://10.0.0.236/trunk@52779 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 06:07:35 +00:00
beard%netscape.com
a297c877e2 JShell properties files.
git-svn-id: svn://10.0.0.236/trunk@52778 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 06:06:40 +00:00
beard%netscape.com
09e0a51db2 factored out common code to locate a source file on lxr or bonsai
git-svn-id: svn://10.0.0.236/trunk@52777 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 06:06:13 +00:00
beard%netscape.com
881e796d98 communicates with cvsblame.cgi to assign blame to lines of a source file.
git-svn-id: svn://10.0.0.236/trunk@52776 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 06:05:52 +00:00
troy%netscape.com
66ca226b8a b=#17315. Changed DeletingFrameSubtree() to also look at the continuing
frames.


git-svn-id: svn://10.0.0.236/trunk@52775 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 05:23:11 +00:00
ducarroz%netscape.com
d3ee736373 Fix for bug 17902. Fix various FCC problems as well error display. R=alecf, A=chofmann
git-svn-id: svn://10.0.0.236/trunk@52774 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 04:58:06 +00:00
sspitzer%netscape.com
baf56f68cb fix for #17597. reply to a news article doesn't quote the body.
the problem was when we ran the nntp url to get the message we weren't
calling OnDataAvailabe() on the channel listener.  the reason is the channel
listener only got poked when ActionDisplayArticle was set as the action on
the nntp url.  but this wouldn't be the case when we got run from the Quoting backend.  I added a new action, and made sure to set it when running the url from the quoting back end, and then made sure the nntp backend did the right thing.

r=alecf, a=chofmann


git-svn-id: svn://10.0.0.236/trunk@52773 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 04:31:09 +00:00
jj%netscape.com
f66e87957c set installer target directory to "Mozilla Folder" and changed "bin" to "viewer" to reflect the Mac tree structure.
git-svn-id: svn://10.0.0.236/trunk@52771 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 03:01:29 +00:00
jj%netscape.com
2efb8c65ad . moved 'Component Registry' from [browser] to [install]
. removed 'default_prefs.js' and 'chrome:registry.rdf'
. added 'viewer:' in front of _each_ line (parser root change)


git-svn-id: svn://10.0.0.236/trunk@52770 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 03:01:25 +00:00
jj%netscape.com
498764afb0 fixed components lists for [Easy install] and variable names for module sizes.
git-svn-id: svn://10.0.0.236/trunk@52769 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 03:01:24 +00:00
beard%netscape.com
48f9184ff1 bug #17847, fix clobbering of mSlots->mAttributes in GetAttributes(). r=waterson, a=chofmann
git-svn-id: svn://10.0.0.236/trunk@52768 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 02:56:54 +00:00
slamm%netscape.com
a8fb89cee4 Do run-length encoding for the raw data option. End revision records with a period. Buffer the raw data output.
git-svn-id: svn://10.0.0.236/trunk@52767 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 02:14:56 +00:00
hyatt%netscape.com
4353fd2505 Partial fix for 17848. Part 1 of 2. 2nd part will be checked in by hangas. r=hangas, a=brendan
git-svn-id: svn://10.0.0.236/trunk@52766 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 01:59:04 +00:00
waterson%netscape.com
9d4795faed Bug 17024. Fix mClassList leak; add bloaty stats for nsClassList. r=hyatt a=chofmann
git-svn-id: svn://10.0.0.236/trunk@52765 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 01:50:47 +00:00
waterson%netscape.com
a65db3660c Bug 15146. Don't eagerly create a <xul:menu>'s contents. r=hyatt a=brendan
git-svn-id: svn://10.0.0.236/trunk@52764 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 01:49:34 +00:00
waterson%netscape.com
744719ecdb Bug 15146. Fix charset overlay template; don't force menus to be open; r=hyatt a=brendan
git-svn-id: svn://10.0.0.236/trunk@52763 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 01:48:46 +00:00
mccabe%netscape.com
46ecd1ff3b Link fixes. Not part of the Mozilla build.
git-svn-id: svn://10.0.0.236/trunk@52762 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 00:35:31 +00:00
beard%netscape.com
396d175b3c can handle multiple inputs, now using common FileLocator class to generate blame/lxr URLs.
git-svn-id: svn://10.0.0.236/trunk@52761 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 00:24:26 +00:00
beard%netscape.com
9cc1992ed4 Uses CVS/Entries to determine the revision of a checked out file.
git-svn-id: svn://10.0.0.236/trunk@52760 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 00:10:12 +00:00
pinkerton%netscape.com
b2e6d58834 Fix bug 15276 by flushing the data to the clipboard right before app shuts down. (r=davidm).
git-svn-id: svn://10.0.0.236/trunk@52759 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 00:08:59 +00:00
rogerl%netscape.com
388bc22458 Removed - not an ECMA thing and supplanted by a different mechanism.
git-svn-id: svn://10.0.0.236/trunk@52758 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 00:01:00 +00:00
rogerl%netscape.com
859165ee97 Fix back-reference parsing from going too far in source string
git-svn-id: svn://10.0.0.236/trunk@52757 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-04 00:00:14 +00:00
rogerl%netscape.com
ec90446de8 Replaced Closure object with FunctionObject clone
git-svn-id: svn://10.0.0.236/trunk@52756 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 23:59:35 +00:00
rogerl%netscape.com
74b9419214 Removed NativeClosure
git-svn-id: svn://10.0.0.236/trunk@52755 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 23:58:51 +00:00
rogerl%netscape.com
830d037821 Fix nested finally endless loop.
Replaced Closure object with FunctionObject clone.


git-svn-id: svn://10.0.0.236/trunk@52754 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 23:57:56 +00:00
rogerl%netscape.com
ee745b4cbf Add closure support
git-svn-id: svn://10.0.0.236/trunk@52753 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 23:56:28 +00:00
rogerl%netscape.com
02ca74c760 Removing NativeClosure
git-svn-id: svn://10.0.0.236/trunk@52752 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 23:55:59 +00:00
mcafee%netscape.com
555440d16c ftp & http proxy settings got reversed in the UI (15165). r=slamm, a=chofmann.
git-svn-id: svn://10.0.0.236/trunk@52751 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 23:53:15 +00:00
nisheeth%netscape.com
e3cf2c3428 r=harishd, a=chofmann. Fix for bugs 11992, 10563. New lines get reported in the XML document prolog. Now, JS errors in XML report correct line numbers.
git-svn-id: svn://10.0.0.236/trunk@52750 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 23:50:16 +00:00
slamm%netscape.com
13a4379130 Add feature for beard and his leak soup tool. Return raw data if 'data=1' is added as a parameter. Cleaned up some code too.
git-svn-id: svn://10.0.0.236/trunk@52749 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 23:37:44 +00:00
mcafee%netscape.com
adc6cb1f75 We were using the wrong pref to enable JS (14660). r=slamm, a=chofmann
git-svn-id: svn://10.0.0.236/trunk@52748 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 23:10:47 +00:00
hangas%netscape.com
99a452e913 Fix for bug 16189, which allows undo/redo to be used in the thread pane of mail/news. r-jefft a=chofmann
git-svn-id: svn://10.0.0.236/trunk@52746 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 23:03:12 +00:00
rogerl%netscape.com
aa1271a477 Not a part of SeaMonkey Build
- new LiveConnect AIX4.3 makefile for server builds


git-svn-id: svn://10.0.0.236/trunk@52745 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 22:55:03 +00:00
varada%netscape.com
5c09a71e2a getting rid of root variable in che file
git-svn-id: svn://10.0.0.236/trunk@52744 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 22:44:24 +00:00
rhp%netscape.com
8276a693be Fix for null pointer access - Bug #17597 - r: jefft - approved: chofmann
git-svn-id: svn://10.0.0.236/trunk@52743 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 22:35:04 +00:00
rhp%netscape.com
3f83ba7a62 Fix for null pointer access - Bug #17597 - r: jefft approved: chofmann
git-svn-id: svn://10.0.0.236/trunk@52742 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 22:34:30 +00:00
radha%netscape.com
8f70df6307 Fix for bug # 17893. Pass the url to nsISessionHistory::Add().Don't set
nsWebShell::mURL too early in the loading process.
r=law,nisheeth


git-svn-id: svn://10.0.0.236/trunk@52741 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 22:30:44 +00:00
varada%netscape.com
5908cc6076 getting rid of spaces in cck.ini
git-svn-id: svn://10.0.0.236/trunk@52740 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 22:27:29 +00:00
varada%netscape.com
777e334a14 getting rid of spaces in the inifiles and changing titles
git-svn-id: svn://10.0.0.236/trunk@52739 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 22:27:06 +00:00
varada%netscape.com
193096cba0 installing wizardmachine.ini inthe dist directory
git-svn-id: svn://10.0.0.236/trunk@52738 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 22:24:09 +00:00
varada%netscape.com
6663eb3602 This file will contain the nameof the application
git-svn-id: svn://10.0.0.236/trunk@52737 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 22:23:48 +00:00
varada%netscape.com
9d146034cd message box in interpret
git-svn-id: svn://10.0.0.236/trunk@52736 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 22:22:54 +00:00
varada%netscape.com
c2f62d838f getting rid of root variable from the che files
git-svn-id: svn://10.0.0.236/trunk@52735 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 22:22:31 +00:00
rods%netscape.com
c7fa28614d added two more tests
git-svn-id: svn://10.0.0.236/trunk@52734 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 22:14:42 +00:00
rods%netscape.com
17f32ce4ba Initial checkin of test
git-svn-id: svn://10.0.0.236/trunk@52733 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 22:14:25 +00:00
kipp%netscape.com
8fae81516b r=joki; fixed the ancient and venerable bug 1413 by noting that the code was using an optimization that wasn't always valid and that one that optimization wasn't valid, the slower path must be used...I commented the fix fairly solidly
git-svn-id: svn://10.0.0.236/trunk@52732 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 22:09:00 +00:00
akkana%netscape.com
7e907a0c91 Fix key event bustage: treat DOM_VK_RETURN and DOM_VK_ENTER equivalently. r=ftang,joki a=chofmann,leaf
git-svn-id: svn://10.0.0.236/trunk@52731 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 22:05:45 +00:00
kipp%netscape.com
44a7143485 updated document regardling block and line-layout operation; this is html documents that are not part of the build nor part of any install process, etc.
git-svn-id: svn://10.0.0.236/trunk@52730 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 21:11:37 +00:00
joki%netscape.com
68b221d555 Fixing dom event key set errors. bug 17887, a:chofmann
git-svn-id: svn://10.0.0.236/trunk@52729 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 20:53:13 +00:00
joki%netscape.com
e151377558 Reverting key set to previous version. Fixes 17887. a:chofmann r:brade.
git-svn-id: svn://10.0.0.236/trunk@52728 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 20:40:35 +00:00
endico%mozilla.org
0ee8ded981 fixed a bunch of typos. Also, handleCheckinMail.tc was replaced by handleCheckinMail.pl
git-svn-id: svn://10.0.0.236/trunk@52727 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 20:33:57 +00:00
blizzard%redhat.com
e72f94df90 patch to fix backspacing from quy@igelaus.com.au. a=choffman
git-svn-id: svn://10.0.0.236/trunk@52726 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 20:25:19 +00:00
alecf%netscape.com
b5de07e079 fix for blocker #17882
a=leaf


git-svn-id: svn://10.0.0.236/trunk@52723 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 19:47:17 +00:00
rogerl%netscape.com
9f777f2bad Added defn of AIX4_3 to help fix dup typedef int8,int16 etc
git-svn-id: svn://10.0.0.236/trunk@52720 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 18:56:17 +00:00
slamm%netscape.com
8fc0df1c8f Ignore a few more warnings caused by lame unix header files.
git-svn-id: svn://10.0.0.236/trunk@52719 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 18:52:13 +00:00
gagan%netscape.com
34d286f60f Last of the leftover files... that didn't include the API change.
git-svn-id: svn://10.0.0.236/trunk@52716 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 09:33:03 +00:00
gagan%netscape.com
8dc7bd557e Modified the call to match the new signature of CreateTransport. a=mcafee.
git-svn-id: svn://10.0.0.236/trunk@52715 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 08:52:04 +00:00
gagan%netscape.com
4ef759b3d4 Removed an extra free that cvs merge put in!
git-svn-id: svn://10.0.0.236/trunk@52714 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 08:21:37 +00:00
gagan%netscape.com
cb1a2aee98 Argh... speed kills. Removed this conflict that I accidently checked in.
git-svn-id: svn://10.0.0.236/trunk@52713 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 08:19:54 +00:00
gagan%netscape.com
8f3ae7048a Fixes 11708,15477 and partial 14610. r=warren. We now pass a print host for displaying in status messages that is different than the hostname connecting to. Also added Keep-Alive support (turned on by user_pref("network.http.keep-alive",1))We also honor the "network.proxy.type" preference to turn the proxy use on and off.
git-svn-id: svn://10.0.0.236/trunk@52712 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 08:17:59 +00:00
gagan%netscape.com
4ac72526b1 Fixes 11708,15477 and partial 14610. r=warren. We now pass a print host for displaying in status messages that is different than the hostname connecting to. Also added Keep-Alive support (turned on by user_pref("network.http.keep-alive",1))
git-svn-id: svn://10.0.0.236/trunk@52711 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 08:14:38 +00:00
gagan%netscape.com
e67319abec *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@52710 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 08:12:18 +00:00
gagan%netscape.com
6bf9a22c91 Added printHost parameter for use in status messages in cases where printHost is different than the connecting host (as in the case of proxies) Fixes bug 11708. r=warren.
git-svn-id: svn://10.0.0.236/trunk@52709 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 08:11:39 +00:00
sgehani%netscape.com
60ed9bf4bb Removing obsolete prefix files. (Replaced by nsInstallerPrefix* and mozInstallerPrefix*.)
git-svn-id: svn://10.0.0.236/trunk@52708 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 08:06:59 +00:00
pavlov%netscape.com
0f628926da work on nsIWidget r=alecf
git-svn-id: svn://10.0.0.236/trunk@52707 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 08:04:59 +00:00
sgehani%netscape.com
ee85b8ad76 Chnage MIW target name to Mozilla Installer [r=sfraser].
git-svn-id: svn://10.0.0.236/trunk@52706 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 07:54:28 +00:00
sgehani%netscape.com
9d8269b689 1> Extraction of all files rather than regexp core_*/* search.
2> Prepare installer to work off of local archives for CD scenario and Mozilla (no sdinst.dll).                                    
3> Fix build warnings.                                                    
4> Separated out Netscape and Mozilla specific targets.    
5> Separated out Netscape and Mozilla specfic resources.
                                                                                      
[r=sfraser]


git-svn-id: svn://10.0.0.236/trunk@52705 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 07:53:59 +00:00
mscott%netscape.com
6ade5969e3 work around for Bug 17065
for bienvenu
r=mscott


git-svn-id: svn://10.0.0.236/trunk@52704 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 07:53:44 +00:00
mscott%netscape.com
7b3899b763 Some work arounds to HIDE Bug #17065 which causes us to hang when parsing large imap folders on linux.
WE still have the problme where the ui thread is stealing events from the imap thread and processing them
on the ui thread.

We're just working around it so folks can use linux imap mail. This code was jointly written with bienvenu.

r=bienvenu/mscott


git-svn-id: svn://10.0.0.236/trunk@52703 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 07:52:45 +00:00
sgehani%netscape.com
dd18053d33 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@52702 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 07:50:01 +00:00
dveditz%netscape.com
3f4468adf1 fixes 8271,6410,12694 and similar startup/registry problems
git-svn-id: svn://10.0.0.236/trunk@52701 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 07:46:38 +00:00
dveditz%netscape.com
3330477d88 shutting up copious warnings using /W4 on MSVC
git-svn-id: svn://10.0.0.236/trunk@52700 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 07:39:19 +00:00
dveditz%netscape.com
acf32d6fc2 Changing registry keys to a mozilla-centric name rather than netscape.
git-svn-id: svn://10.0.0.236/trunk@52699 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 07:36:03 +00:00
pavlov%netscape.com
c5f9102c78 work on scrolling, CSS2 native system colors, etc. r=mcafee
git-svn-id: svn://10.0.0.236/trunk@52697 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 07:34:50 +00:00
alecf%netscape.com
cb89931340 add open="true" to all the account
r=scottip
no bug, it's cosmetic/usability thing


git-svn-id: svn://10.0.0.236/trunk@52696 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 07:33:08 +00:00
mccabe%netscape.com
793e09ae44 Fix many nsInterfaceInfo leaks, thanks in part to patches provided by Patrick Beard. Fixes 15855. Some remain.
Clear up build warnings, and quiet nsInterfaceInfomanager debug output unless DEBUG_iim.  Makes startup a li'l less noisy.  Fixes 15628.

r=jband


git-svn-id: svn://10.0.0.236/trunk@52695 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 07:23:37 +00:00
alecf%netscape.com
e92bd577aa fix for #17214 - consolidate all username and hostname handling so that escaping/unescaping happens logically
git-svn-id: svn://10.0.0.236/trunk@52694 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 07:16:59 +00:00
joki%netscape.com
c6ca4a722e added files: mozilla/dom/src/events/nsJSKeyEvent.cpp
git-svn-id: svn://10.0.0.236/trunk@52693 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 07:12:13 +00:00
joki%netscape.com
c79e9c67d2 Changes to DOM events to accomodate the new breakdown of events into mouse and key events. This fixes a couple of bug, though the main one is 13406. Involves changes to multiple DOM generated file as well as fixing up usage of DOM event api usage in editor, rdf, and xul. r:vidur
git-svn-id: svn://10.0.0.236/trunk@52691 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 07:11:45 +00:00
putterman%netscape.com
ff8a8db130 return rv instead of NS_OK so that we only return null targets with NS_RDF_NO_VALUE.
This stops a bunch of assertions.  reviewed by alecf.


git-svn-id: svn://10.0.0.236/trunk@52690 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 07:09:56 +00:00
waterson%netscape.com
f4ec813667 Bug 13252. Build content for current template before recursing to build content for children. r=alecf.
git-svn-id: svn://10.0.0.236/trunk@52689 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 06:59:49 +00:00
buster%netscape.com
1115c0f4da fixed bug 17792 (text set via DOM displays in HTL password control)
r=myself, I'll take the heat if this goes bad.  It's a very simple change.
The text control optimization was turned on for single line text controls,
and turned off for text areas.  With this change, the optimization is also
turned off for password fields.  This shouldn't effect performance in any
noticable way, because there are very rarely more than one or two password
controls on a single page.  The optimization in the case of password fields
isn't worth the extra code and complexity for dealing with replacing
characters with '*'


git-svn-id: svn://10.0.0.236/trunk@52688 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 06:53:07 +00:00
sgehani%netscape.com
40645c00d1 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@52687 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 06:12:10 +00:00
davidm%netscape.com
eb18a1b917 3110
r= morse
modification to get single sign on back


git-svn-id: svn://10.0.0.236/trunk@52686 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 06:07:53 +00:00
ftang%netscape.com
74098be2bc back out 1.32 to fix 17811. This will break 14914
git-svn-id: svn://10.0.0.236/trunk@52685 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 05:47:25 +00:00
dcone%netscape.com
6d4e070e6b Fixed a divide by zero crasher, and cleaned up borders. r=buster
git-svn-id: svn://10.0.0.236/trunk@52684 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 05:46:01 +00:00
dp%netscape.com
86bb1af06f Eliminating use of nsService class in preparation for making services
usable with COMPtrs.


git-svn-id: svn://10.0.0.236/trunk@52683 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 05:41:43 +00:00
dp%netscape.com
df73ba585b Deny GetService() requests which cause Creation of new objects on
shutdown. r=jband, r=ScottPutterman


git-svn-id: svn://10.0.0.236/trunk@52682 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 05:38:45 +00:00
dp%netscape.com
e537410a85 Removing nsIShutdown listener usage for ServiceManager.
git-svn-id: svn://10.0.0.236/trunk@52681 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 05:36:30 +00:00
danm%netscape.com
7de071230b instead of using the thread hashtable's enumerator while processing events (a Mac-specific habit), build and use a parallel linked list structure. hashtable and list want unification someday. fixes bug 16551. r:brendan@netscape.com
git-svn-id: svn://10.0.0.236/trunk@52680 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 05:30:49 +00:00
davidm%netscape.com
7a25b6fe62 8673 ShutDown() should try to close all open windows.
r=sfraser
set tryToClose function and proprogate out if the close was sucessfull


git-svn-id: svn://10.0.0.236/trunk@52679 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 05:28:02 +00:00
davidm%netscape.com
ad7f1ff33f 8673 ShutDown() should try to close all open windows.
r= hangas


git-svn-id: svn://10.0.0.236/trunk@52678 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 05:26:31 +00:00
davidm%netscape.com
16e407c7ff 12539 Crash when quitting browser while bookmark properties dialog
r = saari
 nsINetPrompt implementation
r morse


git-svn-id: svn://10.0.0.236/trunk@52677 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 05:25:21 +00:00
davidm%netscape.com
218749a885 6552 Browser-generated forms not triggering single-signon
switch to use nsINetPrompt so that single sign lives again
r morse


git-svn-id: svn://10.0.0.236/trunk@52676 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 05:24:01 +00:00
davidm%netscape.com
793f6ff27d 6552 Browser-generated forms not triggering single-signon
add nsINetPrompt for single sign on
r morse


git-svn-id: svn://10.0.0.236/trunk@52675 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 05:21:49 +00:00
davidm%netscape.com
77cd59699a First Checked In.
git-svn-id: svn://10.0.0.236/trunk@52674 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 05:19:39 +00:00
warren%netscape.com
fa66ea22fe Structural changes for MakeAbsolute performance. bug#10736 r=valeski
git-svn-id: svn://10.0.0.236/trunk@52673 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 05:13:44 +00:00
warren%netscape.com
c34a2941df Made nsIInputStreamChannel scriptable and constructable from component manager. bug#15294
git-svn-id: svn://10.0.0.236/trunk@52672 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 05:09:20 +00:00
warren%netscape.com
335afbc323 Fixed more bustage from gordon's checking -- missing vtable symbols for nsDNSRequest's (unused) nsIRequest interface.
git-svn-id: svn://10.0.0.236/trunk@52671 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 04:57:34 +00:00
sgehani%netscape.com
8b93319dca Fix build bustage for cathleen.
git-svn-id: svn://10.0.0.236/trunk@52670 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 04:30:14 +00:00
beard%netscape.com
afdb749e2c First Checked In.
git-svn-id: svn://10.0.0.236/trunk@52669 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 04:26:41 +00:00
waldemar%netscape.com
50364b8107 Removed distribution restrictions because this is part of the language spec
git-svn-id: svn://10.0.0.236/trunk@52668 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 03:59:31 +00:00
waldemar%netscape.com
9c4cb1eacb Updated to Mozilla 1.1 license
git-svn-id: svn://10.0.0.236/trunk@52667 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 03:58:07 +00:00
mscott%netscape.com
9dc7572e8b (not part of the seamonkey build!!)
no longer need nsURILoaderCIDs.h


git-svn-id: svn://10.0.0.236/trunk@52666 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 03:55:39 +00:00
mscott%netscape.com
e59a60cd4c (not part of the seamonkey build!!!!)
name change of nsURIDispatcher to nsIURILoader


git-svn-id: svn://10.0.0.236/trunk@52665 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 03:53:33 +00:00
mscott%netscape.com
6ef6f80a98 one more tweak for Bug #17825
r=sspitzer


git-svn-id: svn://10.0.0.236/trunk@52664 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 03:51:12 +00:00
gagan%netscape.com
c1350f1279 Added file. Not in the build. Some utility code for color console messages on Unix. Using this is simple- Declare PRINTF_FOO in the scope of your printf statements where FOO is one of the colors in (YELLOW, RED, CYAN, BLUE, MAGENTA, GREEN) and any printfs in that scope will print in color. You may also start and stop colors by using STARTF00 and ENDCOLOR. So you can try something like printf(STARTRED "Red " STARTBLUE "Blue" ENDCOLOR);
git-svn-id: svn://10.0.0.236/trunk@52663 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 03:43:13 +00:00
pierre%netscape.com
cff215812e Fix from py8ieh=bugzilla@bath.ac.uk for bugs 12765 and 12766. Updated link/visited/out-of-date declarations for hover/focus/active. r=me
git-svn-id: svn://10.0.0.236/trunk@52662 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 03:19:04 +00:00
jj%netscape.com
0e29d47284 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@52661 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 03:17:47 +00:00
bienvenu%netscape.com
5ca1658c79 add cancel method to nntp protocol r=mscott
git-svn-id: svn://10.0.0.236/trunk@52660 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 03:17:36 +00:00
bienvenu%netscape.com
cea102d05c add cancel method to mailbox and pop protocol r=mscott
git-svn-id: svn://10.0.0.236/trunk@52659 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 03:17:15 +00:00
bienvenu%netscape.com
5b5b7371ea fix build warnings, r=putterman, add cancel method to protocol r=mscott
git-svn-id: svn://10.0.0.236/trunk@52658 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 03:16:26 +00:00
mscott%netscape.com
a3d9d45365 Bug #17825 --> pass nsIMsgWindow into SetWindow instead of a msgStatus feedback object in order
to fix save attachements.
r=sspitzer


git-svn-id: svn://10.0.0.236/trunk@52657 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 03:12:58 +00:00
akkana%netscape.com
9ee5feb4b3 Part of bratell@lysator.liu.se's fix to the nsHTMLToTXTSinkStream. r=akkana
git-svn-id: svn://10.0.0.236/trunk@52656 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 03:08:04 +00:00
akkana%netscape.com
8e7977a75f Contribution by Daniel Bratell <bratell@lysator.liu.se> to implement
format=flowed for mail plaintext output. r=akkana and (I think) rhp.


git-svn-id: svn://10.0.0.236/trunk@52655 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 02:46:16 +00:00
jj%netscape.com
f64d069264 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@52654 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 02:44:58 +00:00
akkana%netscape.com
ec594ff4cd Contribution by Daniel Bratell <bratell@lysator.liu.se> to implement
format=flowed for mail plaintext output.  Restructures the plaintext
output wrapping code, wholly or partially fixes numerous bugs in plaintext
output (13278, 13442, 17823, 17824, 13753, 12551), makes the automated
tests work on Windows and adds some new automated tests. r=akkana.


git-svn-id: svn://10.0.0.236/trunk@52653 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 02:44:44 +00:00
jj%netscape.com
16fbda6ce8 File Removed.
git-svn-id: svn://10.0.0.236/trunk@52652 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 02:44:27 +00:00
gordon%netscape.com
1c497557b9 Fix more of my bustage: pass clientContext parameter back on callbacks from nsDNSService::Lookup(). r=warren.
git-svn-id: svn://10.0.0.236/trunk@52651 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 02:42:52 +00:00
danm%netscape.com
0aac10ff9d oops! Observe() was checked in flawed in 1.90. gtk may one day have noticed. r:noman@odyssey.org
git-svn-id: svn://10.0.0.236/trunk@52650 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 02:29:59 +00:00
varada%netscape.com
d313f9eb9b checking in right cck.che
git-svn-id: svn://10.0.0.236/trunk@52649 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 02:21:02 +00:00
cmanske%netscape.com
77285a1fb7 Changed Mail Compose XUL to use new comboboxes on toolbar (bug 17098).
git-svn-id: svn://10.0.0.236/trunk@52648 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 02:18:01 +00:00
warren%netscape.com
dc473b8de3 Fixed Gordon's wackage.
git-svn-id: svn://10.0.0.236/trunk@52647 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 02:18:00 +00:00
selmer%netscape.com
114c2d4d83 Stupid, remove jar_s/zlib_s since not using it!
git-svn-id: svn://10.0.0.236/trunk@52646 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 02:10:04 +00:00
selmer%netscape.com
662527d103 Stupid, remove ifuncns.obj since not using it!
git-svn-id: svn://10.0.0.236/trunk@52645 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 02:08:55 +00:00
cathleen%netscape.com
7c3533ab68 fixed bug #17774. prevent crash when UI name is passed as null.
also moved mPatchList to allocate hashtable to nsIntall::Patch().  r=dougt


git-svn-id: svn://10.0.0.236/trunk@52644 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 02:01:02 +00:00
varada%netscape.com
2c76c5f5ed changing the template name from ws_template to wstemplate
git-svn-id: svn://10.0.0.236/trunk@52643 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 01:58:43 +00:00
varada%netscape.com
0ccce7f199 fixing bug #6558 adding new show config info button in checklist.ini and changing text of show sum button on build page to reflect the same
git-svn-id: svn://10.0.0.236/trunk@52642 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 01:57:07 +00:00
selmer%netscape.com
00b336668e Big honking checkin for Install Builder
git-svn-id: svn://10.0.0.236/trunk@52641 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 01:51:54 +00:00
nisheeth%netscape.com
424a4cc34c r=vidur. Fix for bug 9075. Return NS_OK instead of NS_ERROR_NOT_IMPLEMENTED from nsXMLDocument::GetDocType(). This allows script parsing to continue after a document.doctype JS statement is encountered.
git-svn-id: svn://10.0.0.236/trunk@52640 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 01:48:54 +00:00
alecf%netscape.com
1bb6cf2186 fix message datasource so it doesn't return an error back to RDF
partial fix for #17811
r=putterman


git-svn-id: svn://10.0.0.236/trunk@52639 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 01:38:54 +00:00
wtc%netscape.com
fb1a3c22e8 Bugzilla bug #15906: add support for the GC leak detector. Contributed
by Patrick Beard <beard@netscape.com>.


git-svn-id: svn://10.0.0.236/trunk@52638 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 01:37:19 +00:00
kmcclusk%netscape.com
fe5984a76a nsIScriptableRegion instances can now be created on WIN32.
nsbug=12465; r=beard@netscape.com


git-svn-id: svn://10.0.0.236/trunk@52637 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 01:37:12 +00:00
wtc%netscape.com
64b8be9959 Bugzilla bug #15906: use the GC leak detector. Contributed by
Patrick Beard <beard@netscape.com>.


git-svn-id: svn://10.0.0.236/trunk@52636 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 01:33:03 +00:00
jj%netscape.com
ad629fba04 Added 'Component Registry' + removed 14 xpi engine files from [core] + renamed modules [xpiengine]->[install] and [core]->[browser]
git-svn-id: svn://10.0.0.236/trunk@52635 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 01:31:35 +00:00
gordon%netscape.com
49947504d3 Basic Mac implementation of async DNS. r=warren, patrick; part of bug:10731.
git-svn-id: svn://10.0.0.236/trunk@52634 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 01:24:51 +00:00
gordon%netscape.com
66130367d8 Mac specific interrupt<->thread synchronization mechanism, required for async Mac dns.
r=warren, patrick, wtc, srinivas, larryh; part of bug:10731.


git-svn-id: svn://10.0.0.236/trunk@52633 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 01:22:58 +00:00
rods%netscape.com
9b02da0b6f put quotes around all button i.e. type="button"
rearranged all focus,hover & active rules and put them in that order.
r=kmcclusk, part of 14951


git-svn-id: svn://10.0.0.236/trunk@52632 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 01:01:55 +00:00
cmanske%netscape.com
cabfc8b277 Fixed bugs 17098, 17808, and a lot of UI cleanup. Rewrote Image Properties dialog so More/Fewer works and layout is better. Moved image URLs from DTD to CSS files. r=brade
git-svn-id: svn://10.0.0.236/trunk@52631 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 00:48:26 +00:00
terry%mozilla.org
435176df52 Whoops! Was reporting ASSIGNED bugs as being closed. Also, changed
it to report the resolution of the bug instead of the word "closed".
Many thanks to dbaron@fas.harvard.edu for suggesting this change, and
reporting the bug.


git-svn-id: svn://10.0.0.236/trunk@52630 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 00:44:29 +00:00
kipp%netscape.com
eed8ac6824 r=troy; remove another 4 bytes from each block frame for a total of 10% today :-)
git-svn-id: svn://10.0.0.236/trunk@52629 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 00:42:12 +00:00
kipp%netscape.com
fbfbed8f89 r=troy; Removed old garbage code that referred to an unused symbol from nsHTMLParts.h
git-svn-id: svn://10.0.0.236/trunk@52628 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 00:41:42 +00:00
mstoltz%netscape.com
2656423bf8 Fixed windows breakage in standalone by adding a typedef
git-svn-id: svn://10.0.0.236/trunk@52627 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 00:41:20 +00:00
rogerl%netscape.com
6701db0533 Not a part of SeaMonkey Build
- added lnker option for server folks


git-svn-id: svn://10.0.0.236/trunk@52626 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 00:28:51 +00:00
mjudge%netscape.com
9252d81168 small fix from pierre on use of the style system. pierre reviewed.
git-svn-id: svn://10.0.0.236/trunk@52625 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 00:11:49 +00:00
kmcclusk%netscape.com
a30e4bc896 Removed call to mWebShell->Repaint in nsHTMLFrameInnerFrame::Reflow. This eliminates
multiple repaints of the content area in Mozilla when the content area is resized.
The mWebShell->SetBounds is sufficient since it invalidates the webshell window.
bug 16270; r= rods@netscape.com


git-svn-id: svn://10.0.0.236/trunk@52624 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 00:11:40 +00:00
jfrancis%netscape.com
3d0b1d674f fix for 17673;r=sfraser
git-svn-id: svn://10.0.0.236/trunk@52623 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 00:07:37 +00:00
rods%netscape.com
13ee3e3b3d Add CountAllChild to count all the option and optgroup elements so lists
get sized correctly when no rows are specified
r=kmcclusk, bug=4050


git-svn-id: svn://10.0.0.236/trunk@52622 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 00:07:01 +00:00
rods%netscape.com
50248ce5b0 Added code to size the button appropriately when style sets the size and
make it clip for drawing.
NOTE: This is a temporary fix for bug #17474


git-svn-id: svn://10.0.0.236/trunk@52621 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 00:05:30 +00:00
rods%netscape.com
89ba99747a Combos now size correctly when the size is specified via style
r=kmcclusk, b=16317


git-svn-id: svn://10.0.0.236/trunk@52620 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 00:03:32 +00:00
kmcclusk%netscape.com
a09d34ccd1 Fixed places where SetProperty and Reset were missing the nsIPresContext argument.
This fixed 6 warnings and cases where reset and set property where not working properly for
all form elements. r = rods@netscape.com.


git-svn-id: svn://10.0.0.236/trunk@52619 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 00:01:13 +00:00
rods%netscape.com
913fe3b85c removed a line that wasn't needed and caused a warning r=kmcclusk
git-svn-id: svn://10.0.0.236/trunk@52618 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 23:54:40 +00:00
bienvenu%netscape.com
381c484f1a turn meteors back off, per mscott's request and review
git-svn-id: svn://10.0.0.236/trunk@52617 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 23:46:54 +00:00
mstoltz%netscape.com
fc96225344 Created helper class nsZipRead to hold read state information. That way
one nsJAR can support multiple input streams. r=norris


git-svn-id: svn://10.0.0.236/trunk@52616 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 23:46:09 +00:00
norris%netscape.com
2323d5792a Fix
10194 Possible security vulnerability in "chrome:" protocol - acce
14979 "chrome" protocol allows accessing arbitrary files on the lo
r=vidur


git-svn-id: svn://10.0.0.236/trunk@52615 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 23:44:27 +00:00
kipp%netscape.com
29b0107f3f Fixed up comments in test file list
git-svn-id: svn://10.0.0.236/trunk@52614 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 23:43:25 +00:00
kipp%netscape.com
e4bab0a0e6 r=troy; Shrink block frames by 4 bytes per instance by making the overflow-lines instance variable a frame property
git-svn-id: svn://10.0.0.236/trunk@52613 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 23:42:52 +00:00
robinf%netscape.com
f5e6d0785f fixing M11 bug 15335
git-svn-id: svn://10.0.0.236/trunk@52612 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 23:42:48 +00:00
pinkerton%netscape.com
72f9201ec6 rewrote item detection code to handle the case where the toolbar isn't in a frame that is at 0,0 (like windows with the menu bar above the personal toolbar). (r=saari, bug #17800).
git-svn-id: svn://10.0.0.236/trunk@52611 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 23:42:16 +00:00
kipp%netscape.com
f734a9cc39 r=troy; Added a new frame property atom
git-svn-id: svn://10.0.0.236/trunk@52610 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 23:42:13 +00:00
pollmann%netscape.com
78899987be Bug 7554: HTML Labels now pass JS events to form element the label is for
r=harishd


git-svn-id: svn://10.0.0.236/trunk@52609 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 23:38:17 +00:00
jband%netscape.com
f26efbdd12 r=mccabe use NS_NewTimer stuff only on Win32 in this test code. This avoids Unix build order problems that were keeping the xpconnect test components from working at all.
git-svn-id: svn://10.0.0.236/trunk@52608 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 23:35:54 +00:00
cls%seawood.org
3e1a9ca95a Removed unused NECKO ifdefs.
a=leaf


git-svn-id: svn://10.0.0.236/trunk@52607 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 23:34:03 +00:00
jband%netscape.com
e1ba1048c5 r=mccabe make output from xpcshell's new 'dump' method go to the same place as output of 'print': stdout rather than stderr
git-svn-id: svn://10.0.0.236/trunk@52606 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 23:31:09 +00:00
alecf%netscape.com
79451301a6 fix for #12703 - don't hold onto XULElements after they have been removed from the tree - don't bother checking mDocument because it will be null when the content has been removed from the document
r=hyatt


git-svn-id: svn://10.0.0.236/trunk@52605 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 23:30:33 +00:00
ducarroz%netscape.com
ab0bddd10c Fix for bug 17768. Set ProgID to soemething else than an empty string. R=rhp
git-svn-id: svn://10.0.0.236/trunk@52604 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 23:29:51 +00:00
nisheeth%netscape.com
2d91e8e29f Fix bug 15304. Added a flag to bscmake.exe. Only executed when the browse_info target is used.
git-svn-id: svn://10.0.0.236/trunk@52603 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 23:29:48 +00:00
sspitzer%netscape.com
baa984b1b1 fix #16457, r=mscott. if an error occurs in the SMTP protocol state machine, we may need to pop up the alert right then, and not when we get back to the url listener, because we'd loose the error text from the SMTP server. these changes
pop up the alert and set the error code so that the url listener doesn't try to
pop up another alert.  define a bunch of new error codes, and remove nsMsgTransition.h, which was defining all the MK_ error codes that were in there.
are no longer needed.


git-svn-id: svn://10.0.0.236/trunk@52602 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 23:27:46 +00:00
cls%seawood.org
a95990ff7f No need to generate obsolete network Makefiles
git-svn-id: svn://10.0.0.236/trunk@52601 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 23:27:45 +00:00
selmer%netscape.com
c4d5dc11d9 New Makefile system for builds
git-svn-id: svn://10.0.0.236/trunk@52600 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 23:25:41 +00:00
nhotta%netscape.com
fac05a4ebc Added a call to encoder finish, this allows encoder to write out remaining data such as escape sequences of ISO-2022-JP, bug 17805, r=ftang.
git-svn-id: svn://10.0.0.236/trunk@52599 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 23:24:10 +00:00
valeski%netscape.com
f63ddf59d3 r=cyeh, forcing PR_LOGGING for ftp in release builds
git-svn-id: svn://10.0.0.236/trunk@52598 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 23:24:06 +00:00
bienvenu%netscape.com
c5b3a013a5 remove the imap channel from the load group when finished running r=mscott
git-svn-id: svn://10.0.0.236/trunk@52597 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 23:22:29 +00:00
akhil.arora%sun.com
38a11db343 17802 r=drapeau@eng.sun.com Workshop C++ 5.0 needs a cast
git-svn-id: svn://10.0.0.236/trunk@52596 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 22:57:58 +00:00
rogerl%netscape.com
9871278292 Added Kurt Westerfeld's fix for 'undefined is not a function' message.
git-svn-id: svn://10.0.0.236/trunk@52595 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 22:52:10 +00:00
dmose%mozilla.org
83e38c06cc updated license boilerplate to xPL v1.1
git-svn-id: svn://10.0.0.236/trunk@52594 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 22:43:10 +00:00
cls%seawood.org
7190f1f2a8 Use #elif not #elseif
git-svn-id: svn://10.0.0.236/trunk@52593 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 22:36:59 +00:00
dmose%mozilla.org
20069a7cf6 updated license boilerplate to xPL v1.1
git-svn-id: svn://10.0.0.236/trunk@52592 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 22:23:59 +00:00
petitta%netscape.com
5a257f75ca initailizes the dist directory
git-svn-id: svn://10.0.0.236/trunk@52590 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 22:21:05 +00:00
petitta%netscape.com
29a164a7ec add include file InitDist.win
git-svn-id: svn://10.0.0.236/trunk@52589 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 22:15:36 +00:00
terry%mozilla.org
927e36576b Due to popular request, "bug changed" mail will only report changes in
state on dependent bugs if they move from an 'open' to a 'closed'
state, or visa-versa.  Also, if there are more than 5 bugs on the
list, then we won't even try to generate the details (doing so only
generates lots of extra mail that is too hard to parse anyway.)


git-svn-id: svn://10.0.0.236/trunk@52588 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 22:14:11 +00:00
pavlov%netscape.com
a90526ccd9 add scriptable region to unix factory fixes bug 12465 r=slamm
git-svn-id: svn://10.0.0.236/trunk@52587 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 21:57:14 +00:00
ssu%netscape.com
857b4649d5 fixing redness on mac tinderbox. #else if doesn't work. Changed it to #elseif
git-svn-id: svn://10.0.0.236/trunk@52586 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 21:50:07 +00:00
pinkerton%netscape.com
21dea39deb turn off very verbose debug output. r=saari
git-svn-id: svn://10.0.0.236/trunk@52585 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 21:39:47 +00:00
bienvenu%netscape.com
3b1ca7dd5b more work to hook up stop button, r=mscott 17743
git-svn-id: svn://10.0.0.236/trunk@52584 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 21:36:59 +00:00
jfrancis%netscape.com
e109f40aa7 changed bogus node type to br to get rid of annoying space in empty editors; r=kin
git-svn-id: svn://10.0.0.236/trunk@52583 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 21:35:21 +00:00
rhp%netscape.com
51c892b441 Changes to remove ToCString() calls - Bug #'s: 17580 17581 - r: nhotta
git-svn-id: svn://10.0.0.236/trunk@52582 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 21:31:32 +00:00
pinkerton%netscape.com
3490d404ad add text/plain flavor acceptance to dragOver on personal toolbar and set canDrop on drag session so win32 uses the correct cursor feedback. (r=saari).
git-svn-id: svn://10.0.0.236/trunk@52581 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 21:28:14 +00:00
cata%netscape.com
f404d8e1ea Fixing typo in dtd file. Checkin for momoi, r=cata, bug=17018.
git-svn-id: svn://10.0.0.236/trunk@52580 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 21:27:02 +00:00
jefft%netscape.com
2c52d1343a fixed bug 16540 - 4.x Pop3 prefs not being heeded; ported over as server specific prefs, also added logging facility, less query interface, more cached capability on server; r=bienvenu
git-svn-id: svn://10.0.0.236/trunk@52579 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 21:20:47 +00:00
waldemar%netscape.com
3d577f8188 Added more no-line-break constraints, simplified visibility treatment, and added named function arguments
git-svn-id: svn://10.0.0.236/trunk@52578 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 21:12:04 +00:00
nhotta%netscape.com
5612e1f8a8 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@52577 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 21:09:05 +00:00
nhotta%netscape.com
5b9bc9b77b Removing a file (not part of the build), this project file was checked in as a text instead of binary.
git-svn-id: svn://10.0.0.236/trunk@52576 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 21:08:38 +00:00
pinkerton%netscape.com
00599502a2 set event struct type for drag events. previously uninitialized and caused random things to occur during drags (r=saari).
git-svn-id: svn://10.0.0.236/trunk@52575 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 21:04:40 +00:00
waterson%netscape.com
2fa1de35a2 Don't enable drag & drop on scrollbars. r=pink,hyatt
git-svn-id: svn://10.0.0.236/trunk@52574 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 21:03:46 +00:00
msw%gimp.org
ceb7def2a5 applied patch in 14263 to build xpconnect as a component on
Linux/alpha.  Should also fix 13601, 11847.
r=jband@netscape.com


git-svn-id: svn://10.0.0.236/trunk@52573 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 21:03:13 +00:00
ftang%netscape.com
f80890ee10 fix one typo. add new locale name for Chinese. r=nhotta
git-svn-id: svn://10.0.0.236/trunk@52572 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 20:58:47 +00:00
tonyr%fbdesigns.com
25d9029cf4 Fixed discovery of mail folders to import when multiple MAPI message stores are in use
git-svn-id: svn://10.0.0.236/trunk@52571 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 20:58:37 +00:00
harishd%netscape.com
0bce4f45ab No bug number.
Improvement to table performance by reducing
the number of context switch calls.

r=vidur


git-svn-id: svn://10.0.0.236/trunk@52570 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 20:58:12 +00:00
matt%netscape.com
86cd62a5d8 fix for bug 14634 r-hangas
git-svn-id: svn://10.0.0.236/trunk@52569 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 20:57:22 +00:00
tonyr%fbdesigns.com
873914c889 Fix to escape From lines in Outlook Express 5.0 message bodies
git-svn-id: svn://10.0.0.236/trunk@52568 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 20:57:21 +00:00
morse%netscape.com
9410e061b6 fix bug 17645, high-order bit on cookie character getting garbled, r=dp
git-svn-id: svn://10.0.0.236/trunk@52567 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 20:56:13 +00:00
waldemar%netscape.com
5123dfaa8d Fixed constraint positioning bug
git-svn-id: svn://10.0.0.236/trunk@52566 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 20:54:44 +00:00
matt%netscape.com
d1c10fc10e fix for bug 14634 r-bill
git-svn-id: svn://10.0.0.236/trunk@52565 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 20:51:29 +00:00
matt%netscape.com
c018d1acdc fix for bug 6830 and 14634 r-bill
git-svn-id: svn://10.0.0.236/trunk@52564 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 20:49:49 +00:00
sgehani%netscape.com
119d8e6f37 Fixed bugs 10540, 9148. Libjar now reads teh central directory headers as opposed to the local file headers. This enables us to glean permissions informationand restore file mode upon extraction. A side-effect is the bug 10540 fix where the Install.Execute() API now works on Linux since we restore the execute bits in temporarily extracted files. [r=ssu]
git-svn-id: svn://10.0.0.236/trunk@52563 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 20:37:28 +00:00
slamm%netscape.com
19101eea26 Bloat: Change coloring algorithm. Set the baseline every time there is a jump up or down.
git-svn-id: svn://10.0.0.236/trunk@52562 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 20:09:20 +00:00
rogerl%netscape.com
3ee7564f6a More RegExp back reference specification mucking about.
git-svn-id: svn://10.0.0.236/trunk@52561 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 20:04:57 +00:00
rogerl%netscape.com
bbab2a24a8 Fixed up for Java vs. ECMA definitions in edge cases
git-svn-id: svn://10.0.0.236/trunk@52560 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 20:04:16 +00:00
tbogard%aol.net
14fc302c46 Changed URIDispatcher to URILoader throughout.
git-svn-id: svn://10.0.0.236/trunk@52559 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 19:36:43 +00:00
mscott%netscape.com
24c042e752 Add cvsignore file for uriloader\build
git-svn-id: svn://10.0.0.236/trunk@52558 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 19:21:49 +00:00
mscott%netscape.com
3088a6720d (not part of the build!)
add .cvsignore file


git-svn-id: svn://10.0.0.236/trunk@52557 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 19:21:01 +00:00
mscott%netscape.com
ce5a53f536 this directory is not part of the build!!!
add .cvsignore file


git-svn-id: svn://10.0.0.236/trunk@52556 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 19:18:04 +00:00
mscott%netscape.com
84368cfe83 this directory isn't part of the build!!!!
add a Makefile for uriloader\build


git-svn-id: svn://10.0.0.236/trunk@52555 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 19:09:50 +00:00
mscott%netscape.com
a31f301140 (This directory isn't part of the build!!)
Add a Makefile for the uriloader base directory.


git-svn-id: svn://10.0.0.236/trunk@52554 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 19:09:15 +00:00
akhil.arora%sun.com
1c67d02237 17610 r=akhil.arora@sun.com, fix=Denis Sharypov <sdv@sparc.spb.su>
Cosmetic changes to remove warnings generated by Visual C++ compiler
Do not link with unneccessary library raptorgfx in makefile.win
Use JAVAHOME to point to JDK instead of hardcoding the path


git-svn-id: svn://10.0.0.236/trunk@52553 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 18:52:14 +00:00
akhil.arora%sun.com
5b541fa64b 17610 r=Denis Sharypov <sdv@sparc.spb.su>
Make code const correct to remove warnings from workshop 5.0 compiler


git-svn-id: svn://10.0.0.236/trunk@52552 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 18:42:53 +00:00
kipp%netscape.com
37b2efc82c r=ftang; Fixed regression in linux font rendering caused by case sensitivity being required for the character set lookups
git-svn-id: svn://10.0.0.236/trunk@52551 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 18:20:05 +00:00
kipp%netscape.com
b3604151b4 Fixed bug 17698 - prepended srcdir to each of the resources being installed
git-svn-id: svn://10.0.0.236/trunk@52550 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 15:53:17 +00:00
kipp%netscape.com
63a86eb8cd fixed bug 15316 by tweaking the html style sheet as the author of the bug suggested
git-svn-id: svn://10.0.0.236/trunk@52549 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 15:49:50 +00:00
kipp%netscape.com
941b74b495 r=troy; fixed bugs 2636 and 17636 - line layout issues for some more edge cases (nobr's with floaters in them) and handling of nbsp
git-svn-id: svn://10.0.0.236/trunk@52548 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 15:44:57 +00:00
karnaze%netscape.com
bf8bc966c9 ComputeDesiredHeight - removed potential error if first child is not a row group.
git-svn-id: svn://10.0.0.236/trunk@52547 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 15:41:38 +00:00
buster%netscape.com
2bbfb06080 bug 17727 ([dogfood] Password not showing stars for default values unless we click inside the field.)
r=brade

change is in nsGfxTextControl.cpp.  I used to just blindly set the text of the underlying text frame.
Now I check if it's a password field, and replace the display text with '*' if it is.


git-svn-id: svn://10.0.0.236/trunk@52546 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 15:12:47 +00:00
rods%netscape.com
be66a15de9 updated the tests
git-svn-id: svn://10.0.0.236/trunk@52545 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 14:51:20 +00:00
rods%netscape.com
f75283d60b initial
git-svn-id: svn://10.0.0.236/trunk@52544 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 14:44:55 +00:00
syd%netscape.com
0887d1ab7b The code doesn't check to see if commandNode is non-NULL. It actually does,
but too late.

Before:
< 	var value = commandNode.getAttribute(valueAttribute);
< 	if ( commandNode && value )
< 		commandNode.setAttribute('value', value);
It looks to see if commandNode is non-NULL *after* it uses it to get "value".
After:
> 	if ( commandNode ) {
> 		var value = commandNode.getAttribute(valueAttribute);
> 		if ( value )
> 			commandNode.setAttribute('value', value);
> 	}

r=BenB


git-svn-id: svn://10.0.0.236/trunk@52543 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 12:29:57 +00:00
ftang%netscape.com
5a4cba5ec3 fix bug 14914. r=cata (several weeks ago). change the GetEncoder/GetDecoder from a loop which create/destroy/IsEqual of nsString to use PROGID directly
git-svn-id: svn://10.0.0.236/trunk@52542 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 08:49:20 +00:00
idk%eng.sun.com
4a0f268246 17747
Added "ifdef OJI_DISABLE"
in case OJI_DISABLE we will have binaries working without oji
Apdated README


git-svn-id: svn://10.0.0.236/trunk@52541 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 08:07:09 +00:00
rpotts%netscape.com
05c908d920 bug #3469 (r=warren). Fixing nsLoadGroup::Cancel() to call cancel on all active transports and subgroups...
git-svn-id: svn://10.0.0.236/trunk@52540 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 08:00:07 +00:00
warren%netscape.com
857d05a688 Made nsHTTPEncodeStream seekable (for reposting form data). Bug #17685. r=waterson
git-svn-id: svn://10.0.0.236/trunk@52539 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 07:43:37 +00:00
mccabe%netscape.com
b3f3e6c4bc Reverting lib fix to fix impending bustage.
git-svn-id: svn://10.0.0.236/trunk@52538 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 07:39:51 +00:00
shaver%netscape.com
dd157213ab updated nsSample.js, long overdue (r=brendan)
git-svn-id: svn://10.0.0.236/trunk@52537 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 07:36:25 +00:00
valeski%netscape.com
f9329cacef adding some keyword support back in
git-svn-id: svn://10.0.0.236/trunk@52536 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 07:18:44 +00:00
dmose%mozilla.org
68d3ee8a2a updating license to xPL 1.1
git-svn-id: svn://10.0.0.236/trunk@52535 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 07:16:31 +00:00
ftang%netscape.com
202313d853 check in the patch submit by Jonas Utterstrom <jonas.utterstrom@vittran.norrnod.se in message news://news.mozilla.org/381B3757.FEC144BC%40vittran.norrnod.se fix bug 17706. r=ftang
git-svn-id: svn://10.0.0.236/trunk@52534 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 07:01:44 +00:00
dmose%mozilla.org
8135a379f0 updating license to xPL 1.1
git-svn-id: svn://10.0.0.236/trunk@52533 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 06:56:28 +00:00
ftang%netscape.com
b93e1edb98 add debuggin message for bug 7571. r=nhotta
git-svn-id: svn://10.0.0.236/trunk@52532 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 06:54:37 +00:00
mccabe%netscape.com
b13865d0da Another stab at linking with the timer static library - this time using EXTRA_DSO_LDOPTS.
r=jband


git-svn-id: svn://10.0.0.236/trunk@52531 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 06:53:58 +00:00
dmose%mozilla.org
c6627a15ce removing stubfe files from the trunk; these are only relevant in the MozillaClassic branch
git-svn-id: svn://10.0.0.236/trunk@52530 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 06:51:30 +00:00
warren%netscape.com
1d1448afe5 Made nsIUnicharStreamLoader be scriptable and deal with an xpcom observer instead of a proc pointer and void*. Part of bug#11159. r=nisheeth,kipp,pierre
git-svn-id: svn://10.0.0.236/trunk@52529 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 06:49:44 +00:00
valeski%netscape.com
ea48e3cc05 putting www.*.com trick back in
git-svn-id: svn://10.0.0.236/trunk@52528 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 06:43:19 +00:00
waterson%netscape.com
e8d88c499c Fix two more leaks that I forgot to check in.
git-svn-id: svn://10.0.0.236/trunk@52527 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 06:40:38 +00:00
dmose%mozilla.org
2ccab49e6d updating license boilerplate to xPL v1.1
git-svn-id: svn://10.0.0.236/trunk@52526 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 06:38:29 +00:00
dmose%mozilla.org
377be09812 updating license boilerplate to xPL v1.1
git-svn-id: svn://10.0.0.236/trunk@52525 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 06:27:30 +00:00
waterson%netscape.com
c33933dfdc remove CTOR and DTOR counters, because the descendant classes will all
account for this space. r=warren


git-svn-id: svn://10.0.0.236/trunk@52524 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 06:21:07 +00:00
dmose%mozilla.org
9fc7780ead updating license boilerplate to xPL v1.1
git-svn-id: svn://10.0.0.236/trunk@52523 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 06:20:05 +00:00
valeski%netscape.com
55265a0fbb pulling non-qualified host-to-keyword server logic
git-svn-id: svn://10.0.0.236/trunk@52522 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 06:18:01 +00:00
dmose%mozilla.org
630d8b77f1 updating license boilerplate
git-svn-id: svn://10.0.0.236/trunk@52521 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 06:13:48 +00:00
troy%netscape.com
1ab461f4c6 r=pierre@netscape.com
Fix compiler warning


git-svn-id: svn://10.0.0.236/trunk@52520 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 06:07:12 +00:00
troy%netscape.com
0481fd6a2b Real fix for my build bustage. Kipp had commened the offending code out to
keep the build going


git-svn-id: svn://10.0.0.236/trunk@52519 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 06:06:46 +00:00
jband%netscape.com
5cd00daf35 - Add test code for calling back via a timer on potentially other JSConetxt
to the xpconnect echo interface. This will help fix bug 17736. This includes
using nsITimer which is a pretty messed up xpcom interface w/o a factory.

- Added dump() to xpcshell to make it compatible with browsers debug
output method.

- reformat beard's leak fix to follow 80 column rule.

- Add a missing dont_AddRef to avoid a leak in some debug code.

r=mccabe


git-svn-id: svn://10.0.0.236/trunk@52518 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 05:55:29 +00:00
nisheeth%netscape.com
3810554e35 r=nisheeth. Fix for bug 12323. Thanks to Ian Hickson (py8ieh=bugzilla@bath.ac.uk) for the patch. Only lowercase chars are accepted in the stylesheet PI.
git-svn-id: svn://10.0.0.236/trunk@52517 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 05:49:57 +00:00
troy%netscape.com
8c862baf0d Changed QueryInterface() to check for nsIFrameDebug
git-svn-id: svn://10.0.0.236/trunk@52516 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 05:49:11 +00:00
dmose%mozilla.org
ab8bcb5065 updating license boilerplate
git-svn-id: svn://10.0.0.236/trunk@52515 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 05:38:33 +00:00
warren%netscape.com
54581e51ee Added some sanity assertions. r=gagan
git-svn-id: svn://10.0.0.236/trunk@52514 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 05:38:22 +00:00
warren%netscape.com
afd6573875 Fix for bad refcount tracing. r=buster,nisheeth
git-svn-id: svn://10.0.0.236/trunk@52513 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 05:37:04 +00:00
waterson%netscape.com
b2a8f1f15e Fix two leaks courtesy evaughan.
git-svn-id: svn://10.0.0.236/trunk@52512 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 05:36:08 +00:00
warren%netscape.com
ddf6490f7b Removed dependence on neckoutil functions. Part of bug#11159. Not in the build yet.
git-svn-id: svn://10.0.0.236/trunk@52511 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 05:31:56 +00:00
buster%netscape.com
b599517d9a fixed bug 17689 r=jfrancis
git-svn-id: svn://10.0.0.236/trunk@52510 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 05:16:41 +00:00
tbogard%aol.net
aa0f04f201 Changed NS_ASSERTION to NS_WARN_IF_FALSE to avoid crashing people when condition is met. r=hyatt.
git-svn-id: svn://10.0.0.236/trunk@52509 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 05:14:27 +00:00
tbogard%aol.net
62ce3cdd71 Changed NS_NOTREACHED to be NS_WARN_IF_FALSE() so as to not crash everyone. r=sfraser.
git-svn-id: svn://10.0.0.236/trunk@52508 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 05:12:05 +00:00
valeski%netscape.com
8cf9738323 11869, r=warren. passing the http spec all the way into http rather than passing a simple uri into the service newChannel().
git-svn-id: svn://10.0.0.236/trunk@52507 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 05:05:44 +00:00
morse%netscape.com
cf72289b9d fix ui regressons in cookie viewer, code=rgoodger, r=morse
git-svn-id: svn://10.0.0.236/trunk@52506 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 05:04:57 +00:00
morse%netscape.com
c465ca23ff fix ui regressons in signon viewer, code=rgoodger, r=morse
git-svn-id: svn://10.0.0.236/trunk@52505 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 05:04:19 +00:00
valeski%netscape.com
52d16678ac missed a case
git-svn-id: svn://10.0.0.236/trunk@52504 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 04:22:12 +00:00
valeski%netscape.com
ff5c4380e5 16910, r=mcafee. FTP now uses thread pools. it also provides some status to the webshell. and it no longer uses the server's defualt path.
git-svn-id: svn://10.0.0.236/trunk@52503 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 04:04:23 +00:00
valeski%netscape.com
af0f3e7b0b 11869, r=mcafee. adding keyword protocol handler to the build. mac still needs to be hooked up.
git-svn-id: svn://10.0.0.236/trunk@52502 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 04:01:35 +00:00
valeski%netscape.com
43382f61e2 11869, r = travis. we no longer to the www.*.com trick as it is handled by the keyword protocol handler. we now kick qualifying requests to the keyword protocol handler.
git-svn-id: svn://10.0.0.236/trunk@52501 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 04:00:07 +00:00
hangas%netscape.com
ab9a0355a1 Progress on Command Updating and Dispatching (15127). r=scottip
git-svn-id: svn://10.0.0.236/trunk@52500 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 03:55:59 +00:00
pinkerton%netscape.com
35ff47ccc3 making the drop feedback be 2 pixels wide, not one (r=saari).
git-svn-id: svn://10.0.0.236/trunk@52499 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 03:55:44 +00:00
pinkerton%netscape.com
e182909557 fix for #16463 (crash when frames involved in a drag went away) and nsCOMPtrizing a lot of things (r=saari).
git-svn-id: svn://10.0.0.236/trunk@52498 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 03:55:14 +00:00
pinkerton%netscape.com
871ab8e113 add ability to have a sub-frame (such as an inner box) be the area which is where the draggable content resides.
git-svn-id: svn://10.0.0.236/trunk@52497 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 03:54:24 +00:00
pinkerton%netscape.com
e5be208b97 add new drop area attribute for identifying subframes of a toolbar where the real content is.
git-svn-id: svn://10.0.0.236/trunk@52496 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 03:53:58 +00:00
pinkerton%netscape.com
d9fc856c54 turn d&d on personal toolbar back on and clean it up after new xul file rewrite.
git-svn-id: svn://10.0.0.236/trunk@52495 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 03:53:30 +00:00
slamm%netscape.com
19446f1058 Partial fix for bug 17722, "No [Sidebar] Panels for mac". We should probably copy the entire directory, but adding a MANIFEST file to profile/defaults would mess up Linux and Windows. May need to add Makefiles for them too. r=pinkerton.
git-svn-id: svn://10.0.0.236/trunk@52494 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 03:49:14 +00:00
pollmann%netscape.com
b1d9af131b Removing null code. No bug number. r=nisheeth
git-svn-id: svn://10.0.0.236/trunk@52493 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 03:48:04 +00:00
pavlov%netscape.com
21d2358524 add unix makefiles for docshell r=mcafee,paulmac. also changed IDL to C++ in the two .cpp files' emacs comments and added a newline at the end of them (files not built by default)
git-svn-id: svn://10.0.0.236/trunk@52492 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 03:43:10 +00:00
pavlov%netscape.com
0ab35801a3 clamp down sizes < 2^15 r=dbaron@fas.harvard.edu r=paulmac ;) fixes bug 2564
git-svn-id: svn://10.0.0.236/trunk@52491 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 03:38:23 +00:00
bienvenu%netscape.com
e1b2ce4a78 add code for hooking up stop button,r=putterman 12016
git-svn-id: svn://10.0.0.236/trunk@52490 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 03:34:45 +00:00
slamm%netscape.com
bd6f30c5cb File dependency not needed anymore. Fix build bustage. r=mcafee.
git-svn-id: svn://10.0.0.236/trunk@52489 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 02:57:23 +00:00
mcafee%netscape.com
5a6348e661 Adding pavlov to modeless pref dialog patch, improved some assertion comments. r=pavlov
git-svn-id: svn://10.0.0.236/trunk@52488 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 02:43:04 +00:00
brendan%mozilla.org
bed10de2c0 Fixed getter/setters, pave way for brutal sharing (15146, r=shaver@mozilla.org,rogerl@netscape.com)
git-svn-id: svn://10.0.0.236/trunk@52487 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 02:23:50 +00:00
cathleen%netscape.com
93f291a8ea adding in missing chrome and res files for mac packager
git-svn-id: svn://10.0.0.236/trunk@52486 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 02:22:50 +00:00
waterson%netscape.com
df32caa941 Fix manky nsCOMPtr asserts.
git-svn-id: svn://10.0.0.236/trunk@52485 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 02:02:27 +00:00
varada%netscape.com
9d03b5a02f fixing bug #6666 marking the readme and license checkboxes as default
git-svn-id: svn://10.0.0.236/trunk@52484 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:58:11 +00:00
rogerl%netscape.com
15318a9b2b Changed -n to regular since the error is getting detected in the code now.
git-svn-id: svn://10.0.0.236/trunk@52483 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:55:59 +00:00
mcafee%netscape.com
e555659f6b NECKO=1 is on by default now. this was removed from the Makefile name-space this past weekend and needs to be removed here. Adding necko directories by default, removing netwerk/makefiles. Adding netwerk/protocols/keyword/Makefiles for valeski. r=slamm.
git-svn-id: svn://10.0.0.236/trunk@52482 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:54:54 +00:00
alecf%netscape.com
d3116d95c6 fix bustage, forgot this file in my last checkin
git-svn-id: svn://10.0.0.236/trunk@52481 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:53:28 +00:00
dmose%mozilla.org
361fd99522 updated license boilerplate
git-svn-id: svn://10.0.0.236/trunk@52480 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:51:54 +00:00
pollmann%netscape.com
4b235a7aef Removing null code. No bug number. r=nisheeth
git-svn-id: svn://10.0.0.236/trunk@52479 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:50:15 +00:00
beard%netscape.com
9c32d2f87e need to be able to Quit viewer via AppleEvent. r=sfraser
git-svn-id: svn://10.0.0.236/trunk@52478 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:49:52 +00:00
dmose%mozilla.org
9dba8ec0b3 updating license boilerplate
git-svn-id: svn://10.0.0.236/trunk@52476 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:46:24 +00:00
waldemar%netscape.com
3cc6fe040f Added basic no-line-break constraints matching JavaScript 1.x
git-svn-id: svn://10.0.0.236/trunk@52475 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:46:05 +00:00
waldemar%netscape.com
f48012bb56 Added no-line-break constraints
git-svn-id: svn://10.0.0.236/trunk@52474 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:45:31 +00:00
waldemar%netscape.com
b6e92d2926 Fixed comment
git-svn-id: svn://10.0.0.236/trunk@52473 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:45:14 +00:00
waldemar%netscape.com
d8924f3115 Added :no-line-break
git-svn-id: svn://10.0.0.236/trunk@52472 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:44:24 +00:00
varada%netscape.com
854153ad1b fixing bug #6664 making CDlayout as the default marked checkbox in the info page
git-svn-id: svn://10.0.0.236/trunk@52471 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:44:06 +00:00
waldemar%netscape.com
82cd9877d0 Fixed annoying use of *error-output* that would always bring the listener window to the front while compiling a grammar
git-svn-id: svn://10.0.0.236/trunk@52470 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:43:52 +00:00
dp%netscape.com
1b8c8d2216 Changing use of NS_WITH_SERVICE() as GetService() to GetService(). r=warren
git-svn-id: svn://10.0.0.236/trunk@52469 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:40:46 +00:00
dp%netscape.com
3e684b542b Changing misuse of NS_WITH_SERVICE() to GetService(). r=warren
git-svn-id: svn://10.0.0.236/trunk@52468 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:40:14 +00:00
ssu%netscape.com
26a5cb95b3 Fixes bug #17562. r=sgehani. This checkin does not affect tinderbox.
The other checkin to fix this bug only affects the windows platforms.


git-svn-id: svn://10.0.0.236/trunk@52467 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:38:10 +00:00
pinkerton%netscape.com
6671a998a4 allow mouse event coordinates to be accessed with d&d events in addition to mouse events, since d&d events have the same structure as mouse events. (r=joki).
git-svn-id: svn://10.0.0.236/trunk@52466 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:38:01 +00:00
ssu%netscape.com
7c2c8f0ecb fixing bug #17562. r=sgehani
Fixes problem with not detecting xpinstall reboot return error.


git-svn-id: svn://10.0.0.236/trunk@52465 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:36:41 +00:00
pinkerton%netscape.com
64f2e921ee add rule for drop feedback on personal toolbar (r=hyatt).
git-svn-id: svn://10.0.0.236/trunk@52464 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:35:42 +00:00
pinkerton%netscape.com
7262c47353 fix for bug 17381 where leaving the frame before a drag gesture was began caused the event target to be set incorrectly. (r=saari).
git-svn-id: svn://10.0.0.236/trunk@52463 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:34:16 +00:00
rogerl%netscape.com
9259c87a92 That's much cooler - i'm putting the 0 case back then.
git-svn-id: svn://10.0.0.236/trunk@52462 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:31:45 +00:00
pavlov%netscape.com
268235e424 break in the switch, don't fall through *doh* r=duncan@be.com
git-svn-id: svn://10.0.0.236/trunk@52460 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:25:00 +00:00
cls%seawood.org
6533b90ce6 Added detection for alphaev6. Submitted by Matt Wilson <msw@redhat.com>.
git-svn-id: svn://10.0.0.236/trunk@52459 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:24:16 +00:00
nhotta%netscape.com
a468c6983c Fixed a typo in the entity definition, r=ftang.
git-svn-id: svn://10.0.0.236/trunk@52458 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:19:19 +00:00
tbogard%aol.net
0154b52329 Second phase of changing NS_ENSURE() to NS_ENSURE_TRUE() and NS_ENSURE_NOT() to NS_ENSURE_FALSE(). r=hyatt
git-svn-id: svn://10.0.0.236/trunk@52457 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:18:52 +00:00
nisheeth%netscape.com
add2edbda0 r=pollmann. Check local DTD directory for dtd files and, if found, load them from there.
git-svn-id: svn://10.0.0.236/trunk@52456 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:16:37 +00:00
pavlov%netscape.com
59b22727bd added .cvsignore file r=slamm
git-svn-id: svn://10.0.0.236/trunk@52455 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:16:09 +00:00
waterson%netscape.com
410ac67f93 Add 'miscellaneous' debug prefs to house 'disable XUL cache' pref UI.
git-svn-id: svn://10.0.0.236/trunk@52454 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:14:50 +00:00
waterson%netscape.com
9ba00de102 Bug 15146. Brutal sharing, Phase III. Turn on protoype, script, and style sheet caching. r=hyatt
git-svn-id: svn://10.0.0.236/trunk@52453 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:14:07 +00:00
alecf%netscape.com
54bfc70eea cleanup NS_IMPL_MODULE and friends
- define new nsModuleComponentInfo and use it instead of components_t
- use size_t instead of unsigned int
- add some docs
- allow user to define own module name


git-svn-id: svn://10.0.0.236/trunk@52452 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:12:32 +00:00
danm%netscape.com
44d6b4c7e5 removing implementation of nsIShutdownListener. it was redundant, anyway. r:dp@netscape.com
git-svn-id: svn://10.0.0.236/trunk@52451 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:10:35 +00:00
tbogard%aol.net
c98bf7e9a6 **Not hooked up to build** Implemented Repaint. Changed document to be a readonly attribute. Added a SetDocument that takes a contentType. Implemented this. Changed all the idl methods to be lower-case.
git-svn-id: svn://10.0.0.236/trunk@52450 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:04:25 +00:00
rogerl%netscape.com
81ef7e0434 Needed string parameter in order to pass type comparison correctly.
Added missing TITLE declaration.


git-svn-id: svn://10.0.0.236/trunk@52449 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:03:52 +00:00
rogerl%netscape.com
dff3a32176 Moved nested function out - new ECMA definition.
git-svn-id: svn://10.0.0.236/trunk@52448 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:02:55 +00:00
rogerl%netscape.com
ceaebd4804 Put test case in eval statement to catch error.
git-svn-id: svn://10.0.0.236/trunk@52447 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:02:03 +00:00
rogerl%netscape.com
a027094b30 Added missing TITLE declaration
git-svn-id: svn://10.0.0.236/trunk@52446 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:01:34 +00:00
troy%netscape.com
aa355b810b See if the Mac is any happier with this
git-svn-id: svn://10.0.0.236/trunk@52445 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 00:21:47 +00:00
varada%netscape.com
cc411daf35 removing unix line endings
git-svn-id: svn://10.0.0.236/trunk@52444 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 23:47:43 +00:00
dmose%mozilla.org
03ec794132 updated license boilerplate
git-svn-id: svn://10.0.0.236/trunk@52443 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 23:33:56 +00:00
varada%netscape.com
9efe8d599f fix for bug#9097
git-svn-id: svn://10.0.0.236/trunk@52442 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 23:33:13 +00:00
valeski%netscape.com
9862db5a48 not in build. updating keyword protocol handler to use new api.
git-svn-id: svn://10.0.0.236/trunk@52441 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 23:33:05 +00:00
troy%netscape.com
c1c6ae68cd Changed GetFrameName() calls to use nsIFrameDebug interface
git-svn-id: svn://10.0.0.236/trunk@52440 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 23:29:27 +00:00
kipp%netscape.com
824e50d549 Fixed compilation bustage by using nsIFrameDebug to invoke list and regression data methods
git-svn-id: svn://10.0.0.236/trunk@52439 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 23:29:05 +00:00
troy%netscape.com
af506bd6c9 Temporary change
git-svn-id: svn://10.0.0.236/trunk@52438 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 23:21:20 +00:00
rogerl%netscape.com
5df87dc67e Belay that, the tests were fine, the code HAS changed.
git-svn-id: svn://10.0.0.236/trunk@52437 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 23:16:00 +00:00
troy%netscape.com
cf64589783 Fixed problem with GetFrameName() being defines in non-debug build
git-svn-id: svn://10.0.0.236/trunk@52436 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 23:12:32 +00:00
larryh%netscape.com
d3f1c46ba5 BugZilla 17558. Add PR_Open() PR_EXCL flag
git-svn-id: svn://10.0.0.236/trunk@52435 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 22:59:27 +00:00
kipp%netscape.com
d8d82e0637 r=rods; bug=17518; I updated the html.css file to select on 'a[href]' instead of 'a' so that the focus properties and related style properties would only apply to anchors with href's
git-svn-id: svn://10.0.0.236/trunk@52434 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 22:54:14 +00:00
tbogard%aol.net
94697e0452 Changed NS_ENSURE_NOT() to use NS_ENSURE_FALSE() per API change.
git-svn-id: svn://10.0.0.236/trunk@52433 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 22:54:06 +00:00
kipp%netscape.com
f8fb68c673 r=troy; fixed compiliation issue for debug builds
git-svn-id: svn://10.0.0.236/trunk@52432 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 22:45:20 +00:00
leaf%mozilla.org
368f25d7ee adding mozilla/uriloader for mscott
git-svn-id: svn://10.0.0.236/trunk@52431 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 22:43:22 +00:00
kipp%netscape.com
7ae532db2a r=troy; fixed bug 14982 - the problem was that empty continuations of an inline non-replaced element (e.g. 'span') were impact line-height calculations when they should effectively disappear
git-svn-id: svn://10.0.0.236/trunk@52430 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 22:38:17 +00:00
kipp%netscape.com
a98ac534c3 latest and greatest tests for block dom functions
git-svn-id: svn://10.0.0.236/trunk@52429 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 22:36:42 +00:00
akkana%netscape.com
1824e7ce91 Fix Sun build bustage: older gcc can't do nsCOMPtr on a forward type
git-svn-id: svn://10.0.0.236/trunk@52428 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 22:16:15 +00:00
troy%netscape.com
3513334988 Moved a bunch of stuff out to a nsIFrameDebug interface
git-svn-id: svn://10.0.0.236/trunk@52427 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 22:12:45 +00:00
dp%netscape.com
8a02a9884b Removing extra release happening on a service. NS_WITH_SERVICE() will
take care of this release.


git-svn-id: svn://10.0.0.236/trunk@52426 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 21:57:14 +00:00
akkana%netscape.com
0df1ff715c Formatting whitespace changes only
git-svn-id: svn://10.0.0.236/trunk@52425 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 21:53:50 +00:00
putterman%netscape.com
897d9e027c Release mNativeDragTarget to fix leaks. no bug. reviewed by rods.
git-svn-id: svn://10.0.0.236/trunk@52424 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 21:53:06 +00:00
sspitzer%netscape.com
07d441b61a fix for #16119. this variable is not defined out of the scope of the loop, so
it was undefined.


git-svn-id: svn://10.0.0.236/trunk@52423 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 21:51:16 +00:00
mscott%netscape.com
5492a19059 Don't build new uri idl interfaces in netwerk.
they've been moved to uriloader.


git-svn-id: svn://10.0.0.236/trunk@52422 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 21:49:55 +00:00
radha%netscape.com
d0a23025d8 Remove the extra AddRef to nsHistoryLayoutState. r=pollmann, bug #16496
git-svn-id: svn://10.0.0.236/trunk@52421 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 21:47:54 +00:00
mscott%netscape.com
e1c9192da5 remove these uri dispatching interfaces from netwerk.
they live in uriloader now.


git-svn-id: svn://10.0.0.236/trunk@52420 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 21:47:26 +00:00
alecf%netscape.com
a15001ef11 fix twisties in the thread pane and account manager by responding to GetTarget() along the child arcs like #child and #MessageChild bug #13551
r=scottip


git-svn-id: svn://10.0.0.236/trunk@52419 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 21:46:07 +00:00
mscott%netscape.com
099420f43e none of these interfaces were being used yet.
they've been moved into mozilla\uriloader.


git-svn-id: svn://10.0.0.236/trunk@52418 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 21:45:29 +00:00
tbogard%aol.net
ae3cd9e2ce Changed NS_ENSURE_NOT to NS_ENSURE_FALSE to reflect API change. r=hyatt
git-svn-id: svn://10.0.0.236/trunk@52417 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 21:43:56 +00:00
dveditz%netscape.com
5ed2cd7fa7 taking a crack at some ports bustage. r=pnunn
git-svn-id: svn://10.0.0.236/trunk@52416 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 21:35:50 +00:00
akkana%netscape.com
9dd7ffd0ef 17275, 16285, 15204: Switch to using nsISaveAsCharset for both charset and entity conversion. r=nhotta
git-svn-id: svn://10.0.0.236/trunk@52415 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 21:34:44 +00:00
tbogard%aol.net
46a7117699 Changed NS_ENSURE_NOT to NS_ENSURE_FALSE to reflect API change. r=hyatt
git-svn-id: svn://10.0.0.236/trunk@52414 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 21:27:09 +00:00
tbogard%aol.net
8d4c0ac47e Changed NS_ENSURE_NOT to NS_ENSURE_FALSE to reflect API change.
git-svn-id: svn://10.0.0.236/trunk@52413 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 21:25:52 +00:00
tbogard%aol.net
87358978bd Changed NS_ASSERTION to use NS_WARN_IF_FALSE. r=pavlov
git-svn-id: svn://10.0.0.236/trunk@52412 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 21:24:24 +00:00
dp%netscape.com
ff9db70a07 Removing release on a service as this would be taken care by the
NS_WITH_SERVICE() macro. r=danm


git-svn-id: svn://10.0.0.236/trunk@52411 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 21:16:24 +00:00
Jerry.Kirk%Nexwarecorp.com
2bc6161677 Remove call to nsIThread::SetMainThread() and clean up things a bit.
r=kedl


git-svn-id: svn://10.0.0.236/trunk@52410 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 20:52:52 +00:00
warren%netscape.com
933e7aa1a8 Minor cleanup
git-svn-id: svn://10.0.0.236/trunk@52409 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 20:50:04 +00:00
warren%netscape.com
793d674760 Eliminating netwerk/util
git-svn-id: svn://10.0.0.236/trunk@52408 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 20:48:12 +00:00
valeski%netscape.com
42d0478ba8 removing early xpcom proxy release change from earlier in the weekend.
git-svn-id: svn://10.0.0.236/trunk@52407 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 20:37:13 +00:00
varada%netscape.com
bd12ec528f fix for bug #6568 - showing summary in the first page
git-svn-id: svn://10.0.0.236/trunk@52406 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 20:13:16 +00:00
idk%eng.sun.com
307fe1df58 fix for 17454
changed strncmp to PL_strncasecmp


git-svn-id: svn://10.0.0.236/trunk@52405 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 20:04:57 +00:00
tbogard%aol.net
e885439545 Changed some m_* to m*.
git-svn-id: svn://10.0.0.236/trunk@52404 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 19:57:15 +00:00
mscott%netscape.com
2a86ddb6f8 (not part of the seamonkey build)
top level Makefile for uriloader


git-svn-id: svn://10.0.0.236/trunk@52403 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 19:56:25 +00:00
mscott%netscape.com
cc0ac6a407 not part of the seamonkey build
add makefile for the uriloader\build directory.


git-svn-id: svn://10.0.0.236/trunk@52402 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 19:52:49 +00:00
mscott%netscape.com
4f15b3e7bd not part of the seamonkey build
add CID header file and uri loader module class.


git-svn-id: svn://10.0.0.236/trunk@52401 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 19:52:25 +00:00
mscott%netscape.com
9cbec3ba42 not part of the seamonkey build.
add top level makefile.win for uriloader.


git-svn-id: svn://10.0.0.236/trunk@52400 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 19:51:45 +00:00
mscott%netscape.com
604569330e not part of the seamonkey build
remove class id and progid from the interface


git-svn-id: svn://10.0.0.236/trunk@52399 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 19:51:05 +00:00
mscott%netscape.com
82bbc3b0eb (not part of the seamonkey build!)
export nsURIDispatcher.h


git-svn-id: svn://10.0.0.236/trunk@52398 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 19:49:09 +00:00
idk%eng.sun.com
b338802f73 fix for 17449
added checkings for NULL


git-svn-id: svn://10.0.0.236/trunk@52397 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 19:39:26 +00:00
varada%netscape.com
13b7afe705 fixes to bug 5434
git-svn-id: svn://10.0.0.236/trunk@52396 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 19:14:29 +00:00
varada%netscape.com
56c344a8d0 cleanup code for customizationlist
git-svn-id: svn://10.0.0.236/trunk@52395 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 18:10:26 +00:00
varada%netscape.com
fb8cb373a0 cleanup code for checklist
git-svn-id: svn://10.0.0.236/trunk@52394 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 18:09:31 +00:00
briano%netscape.com
e2c9ed766a Automated update
git-svn-id: svn://10.0.0.236/trunk@52393 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 15:45:17 +00:00
rods%netscape.com
23778b8c16 Check to see if the option being added has the "selected" property, if it
does then the list needs to be reinitialized.
r=dcone, bug #17519


git-svn-id: svn://10.0.0.236/trunk@52392 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 15:41:17 +00:00
kipp%netscape.com
bac454b0b5 Added address information to the dump content diagnostic code
git-svn-id: svn://10.0.0.236/trunk@52391 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 15:38:05 +00:00
kipp%netscape.com
c6c74d8fe2 r=ftang (someday); fixed bug 17130 - the problem was that nbsp's were being mapped into spaces by the text-transformer which is normally good, but for the purposes of line-breaking look-ahead was bad. I added code to revert the post-transformed spaces into nbsp's before using the line-breaker
git-svn-id: svn://10.0.0.236/trunk@52390 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 15:36:02 +00:00
kipp%netscape.com
283a28a5d4 r=ftang (someday); fixed 17559 regression - there were a few cases where characters > 127 were leaking out without setting the mHasMultibyte flag that were triggering painting bugs on macs...
git-svn-id: svn://10.0.0.236/trunk@52389 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 15:32:37 +00:00
cls%seawood.org
9981b6e5e7 Tested various build options, marked some broken, unmarked others that have been fixed. Removed obsolete options.
git-svn-id: svn://10.0.0.236/trunk@52388 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 15:32:02 +00:00
kipp%netscape.com
2cabf1bf40 Disabled debug noise I accidently checked in (whoops!)
git-svn-id: svn://10.0.0.236/trunk@52387 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 15:31:04 +00:00
cls%seawood.org
aabaf48158 Remove the extra -D_XXX_SOURCE_ flags for Linux builds.
git-svn-id: svn://10.0.0.236/trunk@52386 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 15:29:31 +00:00
kipp%netscape.com
63ae90acca r=troy; reworked the way that blocks inside of inline elements are handled. It's all in the frame construction code now (bugs 15999, 16737)
git-svn-id: svn://10.0.0.236/trunk@52385 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 15:24:57 +00:00
kipp%netscape.com
333bf3d48a Added address information to the dump content diagnostic code
git-svn-id: svn://10.0.0.236/trunk@52384 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 15:23:06 +00:00
kipp%netscape.com
e5672a7cbf Added another frame property
git-svn-id: svn://10.0.0.236/trunk@52383 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 15:22:25 +00:00
jfrancis%netscape.com
8ad4c60be3 fix for bugs: 16724, 16855; r=sfraser
git-svn-id: svn://10.0.0.236/trunk@52382 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 15:15:56 +00:00
jfrancis%netscape.com
53c8075ee8 fixes for bugs: 16361,12253,15696,15734; r=sfraser
git-svn-id: svn://10.0.0.236/trunk@52381 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 15:15:35 +00:00
dp%netscape.com
a1cbbe03aa Removing double check for failure. Checking for nsresult is sufficient.
git-svn-id: svn://10.0.0.236/trunk@52380 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 08:54:06 +00:00
tbogard%aol.net
188cbf9d0b Added some checks to verify calling of the nsIDocShellFile and nsIDocShellEdit functions.
git-svn-id: svn://10.0.0.236/trunk@52379 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 07:53:24 +00:00
tbogard%aol.net
1b8869ef46 Changed NS_ENSURE to be NS_ENSURE_TRUE.
git-svn-id: svn://10.0.0.236/trunk@52378 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 07:45:38 +00:00
tbogard%aol.net
e1325fa173 Changed NS_ENSURE and NS_ENSURE_NOT occurences to be NS_ENSURE_TRUE and NS_ENSURE_FALSE respectively.
git-svn-id: svn://10.0.0.236/trunk@52377 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 07:40:19 +00:00
tbogard%aol.net
e3a1567dcc Changed NS_ENSURE to be NS_ENSURE_TRUE. Also changed NS_ENSURE_NOT to be NS_ENSURE_FALSE. Left NS_ENSURE and NS_ENSURE_NOT, but they will soon be going away.
git-svn-id: svn://10.0.0.236/trunk@52376 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 06:59:16 +00:00
rpotts%netscape.com
6a0e6b0b2d bug #16418 (r=warren,gagan). When redirecting a URL only copy the Ref to the new URL (not the Param and Query).
git-svn-id: svn://10.0.0.236/trunk@52375 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 06:00:55 +00:00
dougt%netscape.com
908f338b00 Adding a set accessor to the permissions functions. Needed by the xpinstall
folks.


git-svn-id: svn://10.0.0.236/trunk@52374 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 04:44:56 +00:00
tbogard%aol.net
fe0b504eac Added comment around frame stuff to explain lack of ref-counting.
git-svn-id: svn://10.0.0.236/trunk@52373 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 04:03:03 +00:00
tbogard%aol.net
2766610a72 Implemented GetZoom and SetZoom. Removed some left over comment code.
git-svn-id: svn://10.0.0.236/trunk@52372 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 04:02:24 +00:00
troy%netscape.com
5143eb0b1d Added nsIFrameDebug interface
git-svn-id: svn://10.0.0.236/trunk@52371 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 03:34:43 +00:00
bienvenu%netscape.com
0828780018 fix updating of folders after imap/moves r=mscott bug 12491
git-svn-id: svn://10.0.0.236/trunk@52370 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 01:10:08 +00:00
bienvenu%netscape.com
b3ee9d6099 add support for pending counts for imap folders r=mscott
git-svn-id: svn://10.0.0.236/trunk@52369 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 01:06:29 +00:00
mscott%netscape.com
059b0b18ff remove shut down listener stuff.
r=bienvenu


git-svn-id: svn://10.0.0.236/trunk@52368 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 00:57:49 +00:00
mscott%netscape.com
c3e35b09e6 remove shutdown listener stuff.
r=bienvenu


git-svn-id: svn://10.0.0.236/trunk@52367 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 00:56:19 +00:00
mscott%netscape.com
3c8f842dd1 remove shutdown listener code.
r=bienvenu


git-svn-id: svn://10.0.0.236/trunk@52366 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 00:55:06 +00:00
tonyr%fbdesigns.com
f0bafa3901 Added Outlook mail and address book import functionality
git-svn-id: svn://10.0.0.236/trunk@52365 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 00:46:18 +00:00
bienvenu%netscape.com
90413c1803 add method to find out if folder is in open window r=putterman
git-svn-id: svn://10.0.0.236/trunk@52364 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-31 22:21:55 +00:00
tbogard%aol.net
86bf83a5cb Changed NS_IMETHOD to NS_IMETHODIMP on implemented function.
git-svn-id: svn://10.0.0.236/trunk@52363 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-31 07:38:44 +00:00
beard%netscape.com
46857947de made more robust with partial output.
git-svn-id: svn://10.0.0.236/trunk@52362 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-31 06:05:09 +00:00
dp%netscape.com
76860bfac3 Removing use of nsIShutdownListener r=sspitzer
git-svn-id: svn://10.0.0.236/trunk@52361 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-31 05:02:55 +00:00
troy%netscape.com
3300906c1f b=15742. Changed Reflow() to invalidate the child's bounds if we're forced
to do a second reflow because we didn't correctly predict whether the vertical
scrollbar was needed. Because the second reflow changes the display width we
need to repaint


git-svn-id: svn://10.0.0.236/trunk@52360 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-31 04:04:32 +00:00
troy%netscape.com
c53de3fb2f b=17507. Changed Reflow() to use "available height" instead of "computed
height" when reflowing child frames. What was happening was that the child
table frame didn't fit and was trying to split. That should only happen when
we're paginated


git-svn-id: svn://10.0.0.236/trunk@52359 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-31 03:39:24 +00:00
troy%netscape.com
248afe72e1 b=17573. Changed mRowIndex to be signed integer (was unsigned integer) but
field. This allows it be negative, which some of the table code is depending
on


git-svn-id: svn://10.0.0.236/trunk@52358 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-31 03:15:52 +00:00
brendan%mozilla.org
9c83cbc655 Gross workaround for VC5 bug.
git-svn-id: svn://10.0.0.236/trunk@52357 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-31 03:04:02 +00:00
jband%netscape.com
9a6507c902 fix typo that was causing bustage on some compilers
git-svn-id: svn://10.0.0.236/trunk@52356 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-31 03:02:43 +00:00
dmose%mozilla.org
5c49b2dcfa removing qtfe files from the tip, since qtfe is only ever destined to build on the MozillaClassic branch; approved=arnt@troll.no
git-svn-id: svn://10.0.0.236/trunk@52355 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-31 02:29:26 +00:00
beard%netscape.com
fdd0b24390 changed the CID for "component://netscape/gfx/region" to use new NS_SCRIPTABLEREGION_CID. r=pavlov
git-svn-id: svn://10.0.0.236/trunk@52354 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-31 02:28:32 +00:00
beard%netscape.com
f871d649af switched to NS_IMPL_ISUPPORTS1, no longer supports QI to nsIRegion. r=pavlov
git-svn-id: svn://10.0.0.236/trunk@52353 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-31 02:26:10 +00:00
beard%netscape.com
8070950a1a removed scriptable region hackery, switched to NS_IMPLE_ISUPPORTS1. r=pavlov
git-svn-id: svn://10.0.0.236/trunk@52352 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-31 02:26:06 +00:00
beard%netscape.com
2f5831d91f cleaned up factory to use nsCOMPtrs, modern NS_IMPL* macros, support for creating scriptable regions. r=pavlov
git-svn-id: svn://10.0.0.236/trunk@52351 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-31 02:26:03 +00:00
beard%netscape.com
48e85583a8 added NS_SCRIPTABLE_REGION_CID. r=pavlov
git-svn-id: svn://10.0.0.236/trunk@52350 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-31 02:25:59 +00:00
tbogard%aol.net
74d906dbdf Fixed changes to use the GetPresShell rather than using the now removed member variable.
git-svn-id: svn://10.0.0.236/trunk@52348 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-31 02:05:21 +00:00
brendan%mozilla.org
f980be0221 (13163, r=alecf, scc, waterson, others; names available on request)
- Fix most of bug 13163 (see TODO for rest).  This entails adding a version-string argument to nsIScriptContext::EvaluateString and passing it around lots of places in content sinks. 

- Fix leaks and confusion about mSecurityManager and mNameSpaceManager in nsJSEnvironment.cpp.  These still need to move from nsJSContext to nsGlobalWindow or thereabouts, jband and vidur are looking at that. 

- Added comments and expanded tabs in nsJSEnvironment.cpp, esp. to EvaluateString.  Also changed various nsresult vars to be named rv.  Also restored brace/style conformity to nsJSProtocolHandler.cpp. 

- Factored CompileFunction from AddScriptEventListener to pave the way for brutal sharing of compiled JS event handlers via JS_CloneFunctionObject. 

- Lots of nsCOMPtr uses added.  I'm using one for mNameSpaceManager.  Hold mSecurityManager as a service explicitly, on the other hand (awaiting scc's fix to allow comptrs for services), and release in nsJSContext's dtor (fixing a leak).  These two managers should be moved to the window object -- TODO item below. 

- Hold JSRuntimeService along with JSRuntime for live of nsJSEnvironment, fix for shaver. 

- Fix window.setTimeout etc. so the filename and line number of the timeout expr is propagated.  This meant factoring nsJSUtils.cpp code. 

- Fix all content sinks to use the same, and up-to-date JavaScript version parsing (whether for script type or for old language attribute); also fix SplitMimeType clones to strip whitespace. 

- With waterson, fix bug in brutal-sharing version of XUL content sink: script src= should not evaluate the inline content of its tag.


git-svn-id: svn://10.0.0.236/trunk@52347 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-31 00:43:30 +00:00
scc%netscape.com
65b7cd0c03 changed the mechanism underlying |do_QueryInterface| to decouple |nsCOMPtr| from services, |nsIWeakReference|, etc. This change fixes bug #17364, and paves the way for making |nsCOMPtr| cooperate with services. r=valeski (additional builds done by dmose and syd)
git-svn-id: svn://10.0.0.236/trunk@52346 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-31 00:35:48 +00:00
scc%netscape.com
3872148e22 removed incorrect use of private class name in favor of |do_QueryInterface|, part of the fix for bug #17364, r=valeski (additional builds done by dmose, and syd)
git-svn-id: svn://10.0.0.236/trunk@52345 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-31 00:32:15 +00:00
syd%netscape.com
dc0e84da8f Add xpcom.dll to link line so test will link with scc changes make about this time. r=scc
git-svn-id: svn://10.0.0.236/trunk@52344 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-31 00:22:53 +00:00
pavlov%netscape.com
e4422a7744 better fix for twips rounding problems patch_from=dbaron@fas.harvard.edu r=me
git-svn-id: svn://10.0.0.236/trunk@52343 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-31 00:09:52 +00:00
sgehani%netscape.com
1a10f1bfca Turning on Mac Install Wizard. [r=ssu]
git-svn-id: svn://10.0.0.236/trunk@52342 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 23:04:41 +00:00
sgehani%netscape.com
42a5d3afe8 *** NOT PART OF BUILD ***
Added "About..." box.


git-svn-id: svn://10.0.0.236/trunk@52341 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 22:29:26 +00:00
sgehani%netscape.com
2eefd82de8 Changes to accomodate ASEncoder for bug 17096 (new interfaces: GUI and AppleScript to accept folders to decode and encode). [r=dveditz]
git-svn-id: svn://10.0.0.236/trunk@52340 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 22:24:09 +00:00
sgehani%netscape.com
c148d9293b First Checked In.
git-svn-id: svn://10.0.0.236/trunk@52339 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 22:21:38 +00:00
sgehani%netscape.com
1d98e513a5 *** NOT PART OF BUILD ***
Fixes for bug 17096. New interfaces (GUI and AppleScript) that accept folders to encode and decode.


git-svn-id: svn://10.0.0.236/trunk@52338 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 22:21:28 +00:00
sgehani%netscape.com
9318031900 Fixing static targets to be usable by MIW once again: removed new nsJARInputStream from the static targets. For real this time...
git-svn-id: svn://10.0.0.236/trunk@52337 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 22:18:31 +00:00
sgehani%netscape.com
66089af9ca Backed out change temporarily.
git-svn-id: svn://10.0.0.236/trunk@52336 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 22:03:46 +00:00
sgehani%netscape.com
43165f999b Fixing static targets to be usable by MIW once again: removed new nsJARInputStream from the statis targets.
git-svn-id: svn://10.0.0.236/trunk@52335 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 21:56:51 +00:00
beard%netscape.com
95ab15987f MLK: fix device context leak, bug=15380, r=scc
git-svn-id: svn://10.0.0.236/trunk@52334 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 20:18:31 +00:00
beard%netscape.com
7eff69da6d MLK: fixed nsICSSDeclaration leak, bug=15380, r=kipp
git-svn-id: svn://10.0.0.236/trunk@52333 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 20:17:40 +00:00
dp%netscape.com
ab8b41ac6e Fixing viewer starup assert on SetMainThread() happening twice.
git-svn-id: svn://10.0.0.236/trunk@52332 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 17:17:12 +00:00
troy%netscape.com
bf93831e8b Removed call to SetMainThread() because it was triggering an assert. Turns
out NS_InitXPCOM() does it so we don't need to do it twice


git-svn-id: svn://10.0.0.236/trunk@52331 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 16:44:04 +00:00
buster%netscape.com
33e56d70f4 huge performance work for text controls
we now display the content of a single line text control using a child pseudo frame
until the text control first gets focus.  at that time, a webshell and editor are created on the fly.
fixed bug bug 14727
r=rods


git-svn-id: svn://10.0.0.236/trunk@52330 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 16:33:00 +00:00
buster%netscape.com
12d91fc204 added pseudo style for single line text controls
bug 14727
r=rods


git-svn-id: svn://10.0.0.236/trunk@52329 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 16:31:11 +00:00
buster%netscape.com
2da450442d added DOM notification up to frame system for text control value changes
part of  bug 14727
r=rods


git-svn-id: svn://10.0.0.236/trunk@52328 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 16:30:33 +00:00
buster%netscape.com
2669825bf4 added pseudo-style for single line text controls. bug 14727
git-svn-id: svn://10.0.0.236/trunk@52327 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 16:29:32 +00:00
troy%netscape.com
23e130e01b Added nsHTMLReflowState.h
git-svn-id: svn://10.0.0.236/trunk@52326 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 16:16:45 +00:00
alecf%netscape.com
78d06b8fcf make buttons class="push"
only a test, not part of product


git-svn-id: svn://10.0.0.236/trunk@52325 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 07:39:07 +00:00
alecf%netscape.com
225dbf24eb update debug menu to reflect new DOMViewer location
(debug only not part of product)


git-svn-id: svn://10.0.0.236/trunk@52324 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 07:38:12 +00:00
alecf%netscape.com
20afa40ad0 fix a warning
r=pavlov


git-svn-id: svn://10.0.0.236/trunk@52323 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 07:32:23 +00:00
alecf%netscape.com
4eaeb0af68 move DOM viewer into chrome so that DOM security doesn't f us up again
only a test, not part of the product


git-svn-id: svn://10.0.0.236/trunk@52322 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 07:23:07 +00:00
alecf%netscape.com
4c4a69c07f more tweaks for boehm to catch up with the nsILeakDetector work
git-svn-id: svn://10.0.0.236/trunk@52321 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 07:06:26 +00:00
dp%netscape.com
0b96f92229 Removing shutdown listener. Releasing gCaseConv on XPCOM Shutdown r=kipp
git-svn-id: svn://10.0.0.236/trunk@52320 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 06:45:45 +00:00
beard%netscape.com
015fa0cad4 fixed up -blame option to use line marking.
git-svn-id: svn://10.0.0.236/trunk@52319 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 05:59:02 +00:00
alecf%netscape.com
1cd1d3967c more adding of class="dialog" to dialogs
git-svn-id: svn://10.0.0.236/trunk@52318 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 05:55:15 +00:00
beard%netscape.com
2300c27a4f fix nsIInterfaceInfoManager leak. bug=15380, r=jband
git-svn-id: svn://10.0.0.236/trunk@52317 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 05:48:07 +00:00
alecf%netscape.com
2dd3c4eacc add class="dialog" to mailnews prefs panes
this and last checkin r=rgoodger@ihug.co.nz


git-svn-id: svn://10.0.0.236/trunk@52316 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 05:46:04 +00:00
alecf%netscape.com
75c3ca9e17 add class="dialog" to all pref window dialogs
enable languages pane and fix XUL
disable smart_browsing pane (because it was crashing)


git-svn-id: svn://10.0.0.236/trunk@52315 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 05:44:23 +00:00
beard%netscape.com
ceb9cf186d changed gInstanceClassName from char[256] to const char* to save space. r=sfraser
git-svn-id: svn://10.0.0.236/trunk@52314 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 04:02:54 +00:00
beard%netscape.com
9a3ae339ee changed gInstanceClassName from char[256] to const char* to save space. added NS_IF_RELEASE(mFontMetrics) to destructor to fix memory leak. bug=15380, r=sfraser
git-svn-id: svn://10.0.0.236/trunk@52313 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 04:02:50 +00:00
danm%netscape.com
cd569b141a insert cast necessary on one of the "other" platforms
git-svn-id: svn://10.0.0.236/trunk@52312 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 03:13:55 +00:00
troy%netscape.com
6210745a33 Updated to not export nsIFrameReflow.h
git-svn-id: svn://10.0.0.236/trunk@52311 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 02:53:36 +00:00
troy%netscape.com
19db355c46 Changed to not export nsIFrameReflow.h
git-svn-id: svn://10.0.0.236/trunk@52310 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 02:52:43 +00:00
troy%netscape.com
88c4d96e2c Folded reflow functions into nsIFrame and eliminated nsIFrameReflow and
nsIHTMLReflow. This saves 4 bytes per frame and cleans things up


git-svn-id: svn://10.0.0.236/trunk@52309 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 02:52:11 +00:00
tbogard%aol.net
f5d99c2cec Removed mPresShell and mPresContext from the base class. Added internal getter function GetPresShell to retrieve presShell objects. Added a pointer to mContentViewer. Changed LoadURI* to take a presContext. Changed SetDocument to take a presContext. Changed the attribute presContext to be read only.
git-svn-id: svn://10.0.0.236/trunk@52308 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 02:30:13 +00:00
akhil.arora%sun.com
4e94fff191 r=akhil.arora@sun.com, fix by Denis Sharypov <sdv@sparc.spb.su>
13271: the wrong method was being called in ProcessingInstructionImpl.cpp
13338: handle null input arguments gracefully without crashing


git-svn-id: svn://10.0.0.236/trunk@52307 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 02:14:28 +00:00
beard%netscape.com
85fd5baad4 moved call to nsIThread::SetMainThread() to NS_InitXPCOM. r=warren
git-svn-id: svn://10.0.0.236/trunk@52306 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 01:53:03 +00:00
beard%netscape.com
7cf4142599 added call to nsIThread::SetMainThread(), to ensure users of XPCOM get a main thread mapped. r=warren
git-svn-id: svn://10.0.0.236/trunk@52305 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 01:52:55 +00:00
nisheeth%netscape.com
2d10931ddb Fix for bug 17540. Uncommented the call to nsFrameManager::CantRenderReplacedElement().
git-svn-id: svn://10.0.0.236/trunk@52303 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 01:31:49 +00:00
beard%netscape.com
15bc1a40b1 Removed statically constructed nsAutoString LinkCommand, moved inside nsWebShell::LoadURL(). This prevents calling printf before main runs on MacOS, which messes up the console window. r=sfraser
git-svn-id: svn://10.0.0.236/trunk@52302 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 01:23:01 +00:00
waterson%netscape.com
89a8c47740 '#if 0' DOM crawling code in toolbar frame to avoid over-eager generation of content model from RDF. GetElementsByTagName() is evil! r=pinkerton,hyatt
git-svn-id: svn://10.0.0.236/trunk@52301 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 01:21:44 +00:00
beard%netscape.com
20f6524e69 Fix proxied objects leak. r=sfraser, bug=15380
git-svn-id: svn://10.0.0.236/trunk@52300 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 01:17:24 +00:00
tbogard%aol.net
7b140eafb2 Removed zoom now that it has been moved out of the nsIGenericWindow interface.
git-svn-id: svn://10.0.0.236/trunk@52299 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 00:53:41 +00:00
tbogard%aol.net
069e0c0ab7 Moved zoom attribute from nsIGenericWindow to nsIDocShell. Updated zoom documentation.
git-svn-id: svn://10.0.0.236/trunk@52298 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 00:52:57 +00:00
hangas%netscape.com
bd127b8712 Fixed OK/Cancel button appearance by using globalOverlay.xul r=mscott
git-svn-id: svn://10.0.0.236/trunk@52297 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 00:14:52 +00:00
hangas%netscape.com
273c3a1673 Image transparency problem fixed by Andrew Niese.
git-svn-id: svn://10.0.0.236/trunk@52296 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 00:07:21 +00:00
tbogard%aol.net
945c6841ea Removed mDocument in favor of the preferred way of getting the document from the content viewer.
git-svn-id: svn://10.0.0.236/trunk@52295 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-30 00:02:38 +00:00
tbogard%aol.net
bc6a15f81a Changed a call to QueryInterface to use CallQueryInterface which helps with type checking.
git-svn-id: svn://10.0.0.236/trunk@52294 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 23:59:20 +00:00
valeski%netscape.com
0e08363c68 warning fixes, again :(
git-svn-id: svn://10.0.0.236/trunk@52293 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 23:35:06 +00:00
evaughan%netscape.com
1f41bc5a41 Fixed bug in example. -r hyatt
git-svn-id: svn://10.0.0.236/trunk@52292 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 23:27:26 +00:00
Jerry.Kirk%Nexwarecorp.com
95ed3035d3 Fixing FillPolygon code in nsRenderingPh.cpp
Adding debug code in nsDrawingSurfacePh  to find the crash.
r=kedl


git-svn-id: svn://10.0.0.236/trunk@52291 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 23:18:16 +00:00
Jerry.Kirk%Nexwarecorp.com
7d754fa3e8 Changing mClipSibling to False in preparation to popup change
Pavlov is working on/thinking about... I'm sure he will see it my
way eventually...
r=kedl


git-svn-id: svn://10.0.0.236/trunk@52290 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 23:16:57 +00:00
mjudge%netscape.com
c750a7c32d reviewed by hyatt bug of someone elses but in my code. dont know number. simple check for null
git-svn-id: svn://10.0.0.236/trunk@52289 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 23:12:44 +00:00
mjudge%netscape.com
2dee462ae3 i cannot find the bug# it is for selecting inside forms. we need to turn off selection in certain frames based on the style. this sets up it to work once we figure out the style rule to set.
git-svn-id: svn://10.0.0.236/trunk@52288 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 23:07:07 +00:00
colin%theblakes.com
a3feb440b1 Only define MDCPUCFG if HOST_NSPR_MDCPUCFG is defined. r=cls
git-svn-id: svn://10.0.0.236/trunk@52287 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 23:03:15 +00:00
rogerl%netscape.com
b817d51d4b I changed the exepcted value for object.toString() calls on the empty
object - There's no clear documentation of the result, but the source
code unambiguously calls 'js_obj_toSource', which inserts the extra '()'
under the version1_2 flag, so I believe this is the correct result.


git-svn-id: svn://10.0.0.236/trunk@52286 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 23:02:17 +00:00
valeski%netscape.com
2eefe93ceb 17521, r = mscott. FTP authentication dialogs we're looping if canceled. I also changed a bunch of string getter routines to take XPIDLCStrings. there was speculation during the reveiw that there might be some casting problems on other platforms. if this is the case either case the XPIDLCString to (const char *) or call me and I'll do it.
git-svn-id: svn://10.0.0.236/trunk@52285 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 23:00:52 +00:00
edburns%acm.org
31ca3266f1 r=marklin
#17358
approver=edburns
author=edburns

This fix enables webclient to work with the latest mozilla.  For now.


git-svn-id: svn://10.0.0.236/trunk@52284 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 22:51:06 +00:00
rogerl%netscape.com
b16f4bc0c7 Changed to account for latest ECMA spec on back-references vs. octal
git-svn-id: svn://10.0.0.236/trunk@52283 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 22:50:43 +00:00
rogerl%netscape.com
fa193f41c1 New ECMA spec for no argument calls to max & min - should return +/- Inf
git-svn-id: svn://10.0.0.236/trunk@52282 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 22:48:33 +00:00
brendan%mozilla.org
ba803ea225 Add JS_VersionToString and JS_StringToVersion, updated Impl. Version (13163, r=shaver@mozilla.org).
git-svn-id: svn://10.0.0.236/trunk@52281 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 22:44:35 +00:00
akkana%netscape.com
d167106925 Remove one GDK_question. Trivial one-line fix
git-svn-id: svn://10.0.0.236/trunk@52280 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 22:37:18 +00:00
cmanske%netscape.com
1095535469 Fixed Composer UI to adjust to latest global CSS changes. Mostly needed to add appropriate class to titled buttons. Change editorshell to stop throbber animation even if editor fails to initialize. r=sfraser
git-svn-id: svn://10.0.0.236/trunk@52279 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 22:33:34 +00:00
jefft%netscape.com
01d415eebe fixed bug 12131 -- message counts not updated after a move/copy; call UpdateFolder() after move/copy is done; r=bienvenu
git-svn-id: svn://10.0.0.236/trunk@52278 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 22:28:55 +00:00
rogerl%netscape.com
8760c5b5e8 r=norris
Change for ECMA spec. - String.charCodeAt, etc call ToInteger on index.
Ditto - String.match(re) was constructing /undefined/ instead of empty
regexp.


git-svn-id: svn://10.0.0.236/trunk@52277 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 22:27:33 +00:00
rogerl%netscape.com
853e43bd31 r=norris
Opinion was that Script.exec() should execute in global scope, not caller.


git-svn-id: svn://10.0.0.236/trunk@52276 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 22:25:25 +00:00
rogerl%netscape.com
dcacacf7d7 r=norris
Fixed accidental eating of exceptions (match loop didn't terminate on
failure). New ECMA definition (again) of back reference format.


git-svn-id: svn://10.0.0.236/trunk@52275 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 22:23:36 +00:00
rogerl%netscape.com
e8f1c05ca6 r=norris
New ECMA behaviour for max & min.


git-svn-id: svn://10.0.0.236/trunk@52274 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 22:21:54 +00:00
rogerl%netscape.com
2ed88ba80b r=norris
Upgrading to new ECMA - conversionError subsumed by TypeError.


git-svn-id: svn://10.0.0.236/trunk@52273 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 22:20:23 +00:00
rogerl%netscape.com
69933e9f74 r=norris, Bug#16984
New error message for function.apply arguments.


git-svn-id: svn://10.0.0.236/trunk@52272 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 22:19:04 +00:00
rpotts%netscape.com
021f44ae53 Fixed crash during error condition in END_WRITE... (r=warren)
git-svn-id: svn://10.0.0.236/trunk@52271 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 22:14:52 +00:00
evaughan%netscape.com
0fa061c765 Made tabs us visibility instead of shrinking their children to 0,0.
Made it possible to change the look for the selected tab.


git-svn-id: svn://10.0.0.236/trunk@52270 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 22:13:57 +00:00
waterson%netscape.com
0d6ebd6b12 Pull script object and event listener list out of slots and into delegate to avoid faulting a heavyweight element. Fix EnsureSlots() to _not_ do a bunch of extra work that is already being done when we create an element from its prototype. Use nsCOMPtr's in nsXULAttributes to avoid leak of nsIStyleRule. r=hyatt
git-svn-id: svn://10.0.0.236/trunk@52269 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 22:09:20 +00:00
varada%netscape.com
b1f24224b8 fix for bug #14012 viewfile function to open the files and open url to open html
git-svn-id: svn://10.0.0.236/trunk@52268 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 21:57:00 +00:00
rchen%netscape.com
604931010d Add Localization Notes
git-svn-id: svn://10.0.0.236/trunk@52267 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 21:53:20 +00:00
mscott%netscape.com
29d7ee003b first created.
git-svn-id: svn://10.0.0.236/trunk@52266 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 21:49:19 +00:00
mscott%netscape.com
6ad3ce8ee3 Moving URI dispatching code into its new home in mozilla\uriloader. I'll be removing
the existing files that I put in netwerk very soon.


git-svn-id: svn://10.0.0.236/trunk@52265 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 21:46:18 +00:00
rchen%netscape.com
6be0ffb4ca Add localization notes
git-svn-id: svn://10.0.0.236/trunk@52264 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 21:40:07 +00:00
rchen%netscape.com
89f810c614 Add Localization Notes
git-svn-id: svn://10.0.0.236/trunk@52263 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 21:37:43 +00:00
bienvenu%netscape.com
fa7e1e0f1e fix body filters, r=sspitzer 17058
git-svn-id: svn://10.0.0.236/trunk@52262 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 21:33:44 +00:00
rchen%netscape.com
beb892e3f0 Add Localization notes
git-svn-id: svn://10.0.0.236/trunk@52261 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 21:27:41 +00:00
rogerl%netscape.com
338c55ea1d New, spawned from AIX4.2.mk.
git-svn-id: svn://10.0.0.236/trunk@52260 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 21:14:31 +00:00
rchen%netscape.com
394244ab39 Add Localization notes
git-svn-id: svn://10.0.0.236/trunk@52259 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 21:12:26 +00:00
alecf%netscape.com
ea62024583 fix a broken class= r=sspitzer
git-svn-id: svn://10.0.0.236/trunk@52258 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 21:11:06 +00:00
alecf%netscape.com
ee5415192d add class="dialog push" to the profile wizard UI r=sspitzer
git-svn-id: svn://10.0.0.236/trunk@52257 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 21:10:53 +00:00
alecf%netscape.com
928787debd add class="dialog push" to all pref windows r=sspitzer
git-svn-id: svn://10.0.0.236/trunk@52256 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 21:01:41 +00:00
rchen%netscape.com
e6e52fc833 Add localization notes
git-svn-id: svn://10.0.0.236/trunk@52255 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 20:58:42 +00:00
rchen%netscape.com
280221ed46 Add Localization notes
git-svn-id: svn://10.0.0.236/trunk@52254 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 20:52:42 +00:00
alecf%netscape.com
52ddc97b98 fix titledbutton class to "dialog push"
r=shaver


git-svn-id: svn://10.0.0.236/trunk@52253 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 20:51:41 +00:00
valeski%netscape.com
7559ac64c5 15590 - build warnings prompted some variable name changes. Also replaced nsVoidArray usage w/ nsCStringArrays. Added some null checks. converted some raw ptrs to com ptrs.
16968 - bugzilla wasn't progress through bug lists via "next" "prev" links. we now set cookie headers from within x-multi-mixed-replace data.


git-svn-id: svn://10.0.0.236/trunk@52252 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 20:50:06 +00:00
karnaze%netscape.com
7868fc24c7 new regression test
git-svn-id: svn://10.0.0.236/trunk@52251 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 20:47:33 +00:00
valeski%netscape.com
85c426971e 15590, r=kipp. added a nsCStringArray class so the cool string array functionality could be used for CStrings too. this checkin is *part* of a fix to the bug
git-svn-id: svn://10.0.0.236/trunk@52250 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 20:47:17 +00:00
putterman%netscape.com
9c5e4137a1 Fix for 17556. Reviewed by alecf. Newsgroups show abbreviated name in folder pane.
git-svn-id: svn://10.0.0.236/trunk@52249 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 20:46:15 +00:00
cata%netscape.com
324e2f56a7 Fix for bug #17018, r=cata, checkin for momoi.
git-svn-id: svn://10.0.0.236/trunk@52248 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 20:41:21 +00:00
despotdaemon%netscape.com
e9ccfad854 Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@52247 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 20:41:01 +00:00
cata%netscape.com
eb0df2c879 Fix for bug #16186 build warnings; eliminating unused var.
git-svn-id: svn://10.0.0.236/trunk@52246 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 20:32:00 +00:00
cata%netscape.com
b855e5dd72 Fix for bug #15706; r=nhotta
git-svn-id: svn://10.0.0.236/trunk@52245 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 20:29:40 +00:00
rchen%netscape.com
bca34cf5da Add Localization Notes
git-svn-id: svn://10.0.0.236/trunk@52244 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 20:28:18 +00:00
karnaze%netscape.com
b2c6378cf2 bug 17375 - better checks and casting before calling DidAppendRow
git-svn-id: svn://10.0.0.236/trunk@52243 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 20:25:13 +00:00
rchen%netscape.com
a74e27b3f5 Add localization notes
git-svn-id: svn://10.0.0.236/trunk@52242 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 20:24:48 +00:00
harishd%netscape.com
bb63ac5e3f Fix fof bug 15674 - Putting back char* buffer.
r=akkana


git-svn-id: svn://10.0.0.236/trunk@52241 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 19:59:09 +00:00
akkana%netscape.com
1645b0ed7a Only output the xif.xif debug file if DEBUG_XIF is defined. Requested by sfraser
git-svn-id: svn://10.0.0.236/trunk@52240 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 19:36:30 +00:00
akkana%netscape.com
e367bbd2be 17305: Add ? to the list of fakie-shifted keycodes. r=pavlov
git-svn-id: svn://10.0.0.236/trunk@52239 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 19:33:57 +00:00
morse%netscape.com
e3e9faf88f fix bug 14932, mozilla asserts if client-wallet is disabled, r=neeti
git-svn-id: svn://10.0.0.236/trunk@52238 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 19:31:30 +00:00
jefft%netscape.com
5b125a705f partial fix for bug 17034; decode encoded words prior setting to the composition fields; r=nhotta,rhp
git-svn-id: svn://10.0.0.236/trunk@52237 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 19:23:29 +00:00
slamm%netscape.com
3b0382f6c1 Use tb_find_build_record() instead of find_build_record().
git-svn-id: svn://10.0.0.236/trunk@52236 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 19:20:53 +00:00
slamm%netscape.com
3fd6cb1d50 Fix 17347. Initialize the 'View | Sidebar' menu to the correct state. r=mozbot.
git-svn-id: svn://10.0.0.236/trunk@52235 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 19:17:22 +00:00
slamm%netscape.com
45e93dc267 Get min heights correct so that the sidebar will collapse. r=evaughan.
git-svn-id: svn://10.0.0.236/trunk@52234 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 19:16:38 +00:00
slamm%netscape.com
8769efefd3 Add license.
git-svn-id: svn://10.0.0.236/trunk@52233 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 19:13:42 +00:00
vidur%netscape.com
a595e9b30a Fix for double frame creation for scripts that document.write content that causes sink context creation. Fix that allows the last children of a body to be flushed. R=harishd
git-svn-id: svn://10.0.0.236/trunk@52232 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 19:07:24 +00:00
slamm%netscape.com
0e1f052c66 Spit and polish. Take 2. Do not put 'undef' in 'my' list.
git-svn-id: svn://10.0.0.236/trunk@52231 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 19:01:14 +00:00
slamm%netscape.com
4c48633d37 Somethings not working. Backup
git-svn-id: svn://10.0.0.236/trunk@52230 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 18:54:32 +00:00
pnunn%netscape.com
66c14dd8b7 part of fix for bug#15817. r: akkana. strong suggestion by kipp. Do the right
thing in image container destructor.


git-svn-id: svn://10.0.0.236/trunk@52229 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 18:53:03 +00:00
slamm%netscape.com
731c45ad0c Clean up global names. Spit and polish. Fix '-w' warnings.
git-svn-id: svn://10.0.0.236/trunk@52228 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 18:52:04 +00:00
pnunn%netscape.com
f742f7e4fd fix for bug#17076. r: akkana. Puts data stream mime check before component
loading instead of after a component load failure.


git-svn-id: svn://10.0.0.236/trunk@52227 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 18:51:09 +00:00
ducarroz%netscape.com
e83ba4c213 Fix for bug 17493, We need to cleanup any GCI commands from the URI when generating a file name. R=rhp
git-svn-id: svn://10.0.0.236/trunk@52226 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 18:50:05 +00:00
warren%netscape.com
dfe868a09a Fixed round-off error computing bloat total.
git-svn-id: svn://10.0.0.236/trunk@52225 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 18:48:37 +00:00
varada%netscape.com
3e9b7b7fb2 fix for bug #17459 by adding another depend function onnext
git-svn-id: svn://10.0.0.236/trunk@52224 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 18:36:52 +00:00
varada%netscape.com
4f3ab7cb05 fix for bug #17459 as well as some clean up
git-svn-id: svn://10.0.0.236/trunk@52223 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 18:35:58 +00:00
sspitzer%netscape.com
db726a6afc fix for #17555. get all the default files, including panels.rdf
git-svn-id: svn://10.0.0.236/trunk@52222 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 18:29:07 +00:00
buster%netscape.com
3fe2b88255 more implementation
some nits to conform more to seamonkey coding conventions.


git-svn-id: svn://10.0.0.236/trunk@52221 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 18:25:57 +00:00
warren%netscape.com
7e5a7e1258 Fixed parsing of bloat log when value was nan, or class contained ::.
git-svn-id: svn://10.0.0.236/trunk@52220 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 18:05:09 +00:00
warren%netscape.com
a237edb9e7 Made the leak/bloat baseline only be the min over the last 5 entries.
git-svn-id: svn://10.0.0.236/trunk@52219 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 17:19:54 +00:00
kipp%netscape.com
363a93452d Fixed solaris build bustage
git-svn-id: svn://10.0.0.236/trunk@52218 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 15:20:20 +00:00
troy%netscape.com
de2a95b57c Space reduction. We now save 8 bytes per row frame by eliminating the max
top/bottom margin data members which are no longer needed


git-svn-id: svn://10.0.0.236/trunk@52217 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 14:40:58 +00:00
kipp%netscape.com
aaabce0894 r=troy; bugs 12958 and 12760; reworked the way that first-letter frames are created and updated. We now support incremental content changes even when first-letter style applies.
git-svn-id: svn://10.0.0.236/trunk@52216 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 14:39:48 +00:00
kipp%netscape.com
96da767847 r=troy; fixed a crash bug in the debug logic found while fixing 12958
git-svn-id: svn://10.0.0.236/trunk@52215 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 14:36:00 +00:00
kipp%netscape.com
5f8b23824a r=troy; api changes for 12958, 12760 and preperations for 17377
git-svn-id: svn://10.0.0.236/trunk@52214 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 14:35:36 +00:00
kipp%netscape.com
f35516791b r=troy; cleaned up resize reflow optimization logic and prepared it for fixing bug #17737 (not yet fixed!)
git-svn-id: svn://10.0.0.236/trunk@52213 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 14:34:53 +00:00
kipp%netscape.com
5a0f716ef3 r=troy; fixed letter frame logic to use the line layout to flow frames so that white-space trimming, for example, would work right
git-svn-id: svn://10.0.0.236/trunk@52212 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 14:34:01 +00:00
kipp%netscape.com
b3ecfed51c r=troy; updated api slightly to support fixes to bug 12760, 12958 and some resize-reflow optimization bugs
git-svn-id: svn://10.0.0.236/trunk@52211 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 14:33:26 +00:00
kipp%netscape.com
a2f8cba30c r=troy; use new line-layout api to help with some resize-reflow optimization bugs
git-svn-id: svn://10.0.0.236/trunk@52210 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 14:32:11 +00:00
rods%netscape.com
c01e8f06c0 Allows radiobuttons to remove themselves from the named radio group
when deleted factored the code
r=kmcclusk, bug 17418


git-svn-id: svn://10.0.0.236/trunk@52209 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 13:56:30 +00:00
rods%netscape.com
24bb2c855d removes itself from the radio group when it is destructed
r=kmcclusk, bug 17418


git-svn-id: svn://10.0.0.236/trunk@52208 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 13:54:58 +00:00
rods%netscape.com
38a193d9b4 clears the the checked item on removal
r=kmcclusk,bug 17418


git-svn-id: svn://10.0.0.236/trunk@52207 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 13:53:50 +00:00
kin%netscape.com
5fae6982e3 Fix for bug #16176: [DOGFOOD] need to annotate line frames with whitespace trim
layout/base/src/nsCaret.cpp
        - Modified DrawCaretWithContext so that we only
          adjust the caret position if we are within the
          frame's bounds.

    layout/html/base/src/nsTextFrame.cpp
        - Modified GetPointFromOffset() to add the width
          of a space if the offset is after a trailing space
          and it was trimmed off the frame.

r=sfraser@netscape.com


git-svn-id: svn://10.0.0.236/trunk@52206 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 13:43:11 +00:00
Jerry.Kirk%Nexwarecorp.com
e08673c042 Fixes for drawing the new Chrome. Had to explicitly call PgFlush
to flush the draw stream from the memory context into the off screen
buffer. I think this is a bug in Photon, but for now this is the fix.
r=kedl


git-svn-id: svn://10.0.0.236/trunk@52205 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 12:53:58 +00:00
pavlov%netscape.com
f24c85975a remove some tabs and add a check for null (bug 17252) r=syd
git-svn-id: svn://10.0.0.236/trunk@52204 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 09:03:53 +00:00
pavlov%netscape.com
385f05a7b1 fix for bugs 17234,17416 r=tor,bruce
git-svn-id: svn://10.0.0.236/trunk@52203 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 08:36:47 +00:00
pavlov%netscape.com
594fc96d9f fix for 15942 and some performance tests/code r=syd
git-svn-id: svn://10.0.0.236/trunk@52202 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 08:24:09 +00:00
danm%netscape.com
8dd72754a2 treat the return key, like enter, as if the default dialog button had been pressed. part of fix for bug 17529. r:saari@netscape.com
git-svn-id: svn://10.0.0.236/trunk@52201 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 06:17:07 +00:00
danm%netscape.com
12fd34f1ce dialog now uses okCancelButtons overlay. partial fix for bug 17529 r:hangas@netscape.com
git-svn-id: svn://10.0.0.236/trunk@52200 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 06:12:26 +00:00
cmanske%netscape.com
d779af105f Changed hover style for FormatToolbar for consistency with new UI
git-svn-id: svn://10.0.0.236/trunk@52199 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 06:04:48 +00:00
beard%netscape.com
73ee8b0ee5 added transitive closure size computation.
git-svn-id: svn://10.0.0.236/trunk@52198 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 06:04:01 +00:00
jband%netscape.com
d8b2fc8146 r=shaver@mozilla.org
- Fix for bug 13419 - xpconnect calls wrapped JS objects on wrong JSContext.
Added code to use the nsThreadJSContextStack in order to call wrapped
JS object on the JSContext that is current for the running thread.

We've made the rule that xpconnect only supports one JSRuntime. We
partially enforce that here by enforcing that the JSContext on which
we will run code hails from the same JSRuntime as the JSContext on
which the wrapper for the JS code was built.

Because it is perfectly legal for the nsThreadJSContextStack to be empty
if a wrapped JS object is being called from code other than a DOM event,
this system will lazily create a JSContext for the current thread and
maintain it in TLS. This JSContext is used as necessary. If it uses such
a JSContext that was not already on the nsThreadJSContextStack then the
system will temporarily push that JSContext onto the nsThreadJSContextStack
during the course of the function call being performed. This is all managed
my a new auto class: AutoPushCompatibleJSContext. This is used in the two
places where wrapped JS code is called from native code.

[the two places where this system is invoked are currently disabled due to
the fact that the DOM code makes bad assumptions about the JSContext on
which DOM objects can be accessed. We are working to fix that and then this
code will be enabled.]

- Add #ifdef XPC_DETECT_LEADING_UPPERCASE_ACCESS_ERRORS code that will help
users when we do things like fix bug 14460. As soon as we make more of the
idl declarations of methods leadingLowercase then we will have
LeadingUppercase calls from JS breaking at runtime. It is expected that this
will especially be a problem for coders working with the same interfaces
from both C++ and JS (since from C++ an interface has LeadingUpper methods and
the *same* interface seen from JS has leadingLowecase names). This code
(as suggested by shaver) will print out an informative error message when
it detects the misuse. This is currently enabled for DEBUG builds only.

- Copy code from xpcshell to TestXPC to use the JSRuntimeSerivce.

r=norris@netscape.com
- Check to see if a wrapped JS object has a QueryInterface property before
trying to call that method. This is a speed optimization. It also and makes
norris happy because his perrenial breakpoint in jsReportErrorNumber is not
getting hit (even though the old code was safe).


git-svn-id: svn://10.0.0.236/trunk@52197 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 05:42:41 +00:00
mcafee%netscape.com
b3a2df9860 Updating legend to match new output format.
git-svn-id: svn://10.0.0.236/trunk@52196 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 05:02:00 +00:00
troy%netscape.com
58248e0de3 Fix for bug #16649. Didn't actually change anything. Just restored some
code that was clobbered by revision 3.153


git-svn-id: svn://10.0.0.236/trunk@52195 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 04:57:02 +00:00
morse%netscape.com
4f5d2bc5d5 get ready for integration with http/ftp authentication, r=davidm
git-svn-id: svn://10.0.0.236/trunk@52194 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 04:51:27 +00:00
sspitzer%netscape.com
1bb663bbef fix for #8717. performance is good enough to bump this back to 500.
still more work to be done, as this is a per-server pref now, I think.


git-svn-id: svn://10.0.0.236/trunk@52193 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 04:49:41 +00:00
mcafee%netscape.com
dbd1674956 No spaces so units don't go on next line.
git-svn-id: svn://10.0.0.236/trunk@52192 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 04:45:52 +00:00
sspitzer%netscape.com
e36c5874dc fix it so that if you have something selected, and you hit enter, it starts with that profile.
git-svn-id: svn://10.0.0.236/trunk@52191 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 04:40:20 +00:00
bienvenu%netscape.com
9187011a29 changes to use nsIMsgWindow r=putterman
git-svn-id: svn://10.0.0.236/trunk@52190 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 04:39:06 +00:00
mcafee%netscape.com
d977243f6d oops left out b units
git-svn-id: svn://10.0.0.236/trunk@52189 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 04:36:17 +00:00
mcafee%netscape.com
d2807b6f90 Better units, r=brendan
git-svn-id: svn://10.0.0.236/trunk@52188 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 04:30:56 +00:00
morse%netscape.com
6bc4bb23b5 provide compatibility with single signon, r=davidm
git-svn-id: svn://10.0.0.236/trunk@52187 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 04:30:38 +00:00
cmanske%netscape.com
55b30027eb Reduced size of Named Anchor proxy icon used in editor page to minimize layout disturbance when present. Changed colors.
git-svn-id: svn://10.0.0.236/trunk@52186 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 04:23:36 +00:00
sspitzer%netscape.com
3441bfea68 fix for #16231, r=mscott. make the file locator know about panels.rdf.
if <profile>/panels.rdf doesn't exist, copy the default to that location.


git-svn-id: svn://10.0.0.236/trunk@52185 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 04:02:25 +00:00
sspitzer%netscape.com
61aed8f307 fix for #16231, r=mscott. use the file locator (which caches the profile directory) instead of going through the profile service.
git-svn-id: svn://10.0.0.236/trunk@52184 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 04:02:20 +00:00
sspitzer%netscape.com
fc22d0aa61 remove the GetCurrentProfileDirFromJS() method from the nsIProfile interface. the only one using it was the sidebar js, but now that uses the fileLocator. r=mscott.
git-svn-id: svn://10.0.0.236/trunk@52183 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 04:01:22 +00:00
rginda%ndcico.com
0da4aac936 ** NOT PART OF THE SEAMONKEY DEFAULT BUILD **
* xul/tests/index.html
Content update.

* xul/tests/test3-output-loud.css
Added ugly style.

* Makefile.in, makefile.win
Updated to install new style.


git-svn-id: svn://10.0.0.236/trunk@52182 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 03:33:01 +00:00
warren%netscape.com
74b069723b Moved purify stuff into xpcom/base for the benefit of all.
git-svn-id: svn://10.0.0.236/trunk@52181 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 03:28:22 +00:00
warren%netscape.com
1fae170c08 Adding pure.h pure_api.c to the build. bug#16695
git-svn-id: svn://10.0.0.236/trunk@52180 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 03:26:50 +00:00
warren%netscape.com
3e59dc9845 Took out bogus error message.
git-svn-id: svn://10.0.0.236/trunk@52179 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 03:19:11 +00:00
waterson%netscape.com
4c9f59d49c Fix SizeOf() operation.
git-svn-id: svn://10.0.0.236/trunk@52178 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 03:07:38 +00:00
cmanske%netscape.com
941b2da9d7 Style adjustment for Composer DisplayMode toolbar
git-svn-id: svn://10.0.0.236/trunk@52177 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 02:58:37 +00:00
cmanske%netscape.com
f320760ce4 Color adjustment for Composer DisplayMode toolbar
git-svn-id: svn://10.0.0.236/trunk@52176 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 02:47:47 +00:00
warren%netscape.com
d4cac369ff Printed out TOTAL line for showbuilds.cgi
git-svn-id: svn://10.0.0.236/trunk@52175 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 02:39:10 +00:00
cathleen%netscape.com
7754b4e90e update unix packaging list for missing chrome and res files (editor, xpinstall... )
git-svn-id: svn://10.0.0.236/trunk@52174 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 02:37:27 +00:00
cmanske%netscape.com
aa538bb21b Added 'Throbber' to Composer - more UI adjustments for new skin. Tweaked new toolbar images. r=sfraser
git-svn-id: svn://10.0.0.236/trunk@52173 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 02:33:51 +00:00
kipp%netscape.com
877bf64923 Implement the LIBMALLOC_NOFREE flag; add in support for memory fill count which increases the malloc by N and fills it with a pattern to help detect overruns and random memory corruptions
git-svn-id: svn://10.0.0.236/trunk@52172 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 02:19:25 +00:00
kipp%netscape.com
71e57e9bc0 Disabled some of my own debugging noise
git-svn-id: svn://10.0.0.236/trunk@52171 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 02:17:55 +00:00
rhp%netscape.com
aa26800137 Fix for message display - Bug #17481 - r: jefft
git-svn-id: svn://10.0.0.236/trunk@52170 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 02:17:10 +00:00
ssu%netscape.com
a9a91fcc7c fixing bugs #16935 and #11581. r=dvedtiz.
The first fix reverses the way xpinstall aborts/cleans up itself.  The
correct way is to undo the commands it ran in backwards order.

The second fixes problem with a install.js script not having called
finalizeInstall() yet still installing files.


git-svn-id: svn://10.0.0.236/trunk@52169 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 02:15:56 +00:00
kipp%netscape.com
87ff88fc08 nuked another silly warning because I got tired of seeing it
git-svn-id: svn://10.0.0.236/trunk@52168 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 02:06:33 +00:00
kipp%netscape.com
f748008a0b I added logic to the viewers browser window to disable javascript initiated popups during web crawling; I also fixed the web crawler to only initiate a new load after a previous document ends not a subdocument (again!)
git-svn-id: svn://10.0.0.236/trunk@52167 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 02:06:09 +00:00
kipp%netscape.com
20e3748d92 I added logic to the viewers browser window to disable javascript initiated popups during web crawling
git-svn-id: svn://10.0.0.236/trunk@52166 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 02:05:16 +00:00
gagan%netscape.com
213f166414 Fixed bug 17393. We were firing an OnStopRequest for redirect's response completion. That messes up imagelib which starts to reset/abort streams. r=waterson
git-svn-id: svn://10.0.0.236/trunk@52165 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 01:55:58 +00:00
kipp%netscape.com
0f8e430077 r=troy; fixed code to properly remove reflowc ommands when cancelling
git-svn-id: svn://10.0.0.236/trunk@52164 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 01:53:56 +00:00
wtc%netscape.com
407de78336 Need to set the reuseaddr socket option before PR_Bind, now that
PR_Bind no longer sets that option automatically (see Bugzilla #17184).


git-svn-id: svn://10.0.0.236/trunk@52163 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 01:41:34 +00:00
wtc%netscape.com
4adfa873d2 Bugzilla bug #15858: fixed compiler warnings.
git-svn-id: svn://10.0.0.236/trunk@52162 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 01:33:54 +00:00
jj%netscape.com
0410c9f36b added [xpiengine] module and rename 'ChromeRegistry' to 'ChomeRegistry' to be consistent with this typo across the tree.
git-svn-id: svn://10.0.0.236/trunk@52161 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 01:25:51 +00:00
waterson%netscape.com
6d0e00cdd4 Bug 15146. Brutal content model sharing, Phase II. XUL content sink now constructs prototype documents; 'real' content model constructed from walking prototype. Landed XUL_SHARING_19991027_BRANCH (derived from XUL_SHARING_19991022_BRANCH). See branch comments for details. r=hyatt.
git-svn-id: svn://10.0.0.236/trunk@52160 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 01:21:15 +00:00
mcafee%netscape.com
19573259fb typo, r=slamm
git-svn-id: svn://10.0.0.236/trunk@52159 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 01:21:06 +00:00
waterson%netscape.com
5a02e1350c Bug 15146. Remove usage of nsIXUL[Child|Parent]Document, nsIXULDocumentInfo. Now obsolete with brutal sharing. r=hyatt
git-svn-id: svn://10.0.0.236/trunk@52158 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 01:19:20 +00:00
dougt%netscape.com
72ec0f3079 adding license.
git-svn-id: svn://10.0.0.236/trunk@52157 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 01:10:00 +00:00
kipp%netscape.com
e8cc21c4c3 New tests (not part of any build)
git-svn-id: svn://10.0.0.236/trunk@52156 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 00:59:41 +00:00
warren%netscape.com
e6e16569fb Added 1k fudge factor.
git-svn-id: svn://10.0.0.236/trunk@52155 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 00:40:04 +00:00
sspitzer%netscape.com
695d6778d8 don't specify the height and width, let it size to content. otherwise, the buttons on the bottom don't show up.
git-svn-id: svn://10.0.0.236/trunk@52154 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 00:26:43 +00:00
mccabe%netscape.com
5124ea8599 adding comments
git-svn-id: svn://10.0.0.236/trunk@52153 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 00:26:19 +00:00
sspitzer%netscape.com
e8194ccfb1 cleaning up comments
git-svn-id: svn://10.0.0.236/trunk@52152 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-29 00:09:27 +00:00
mcafee%netscape.com
af1c129e99 Reverted to mozilla.org url because of problems with loading resource:
git-svn-id: svn://10.0.0.236/trunk@52151 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 23:32:13 +00:00
nhotta%netscape.com
978eb5faf1 Adding entity property files to packages, r=ftang.
git-svn-id: svn://10.0.0.236/trunk@52150 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 23:31:30 +00:00
putterman%netscape.com
2df3525f9d More work on 17376. reviewed by bienvenu. Store open folder and keep array of msgWindows.
git-svn-id: svn://10.0.0.236/trunk@52149 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 23:27:21 +00:00
harishd%netscape.com
3d1723b618 Fix for bugs
1312   - Mapped all  HTML 4.0x FPIs to NOQUIRKS mode.
2749   - Tweaked strict comment handling code. -> r=rickg
17148 - Making sure that BeginContext() is ended only by EndContext()
17113, 1262 - Made AddLeaf(), in DTD,  to be cautious in handling text tokens.

Using bit-wise search  for IsContainer() instead of looping. ( nsElementTable )

Fixed warnings.

r=pollmann


git-svn-id: svn://10.0.0.236/trunk@52148 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 23:25:59 +00:00
mcafee%netscape.com
a6b5e55d70 Fixed extra my's that break in some versions of perl
git-svn-id: svn://10.0.0.236/trunk@52147 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 23:24:39 +00:00
sspitzer%netscape.com
a19b0a701f only show profiles that haven't been migrated in the Profile Selection dialog.
git-svn-id: svn://10.0.0.236/trunk@52146 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 23:24:05 +00:00
sspitzer%netscape.com
139ca8b52d adding "Mozilla Select Profile" (aka -SelectProfile) for the mac.
git-svn-id: svn://10.0.0.236/trunk@52145 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 23:19:02 +00:00
mcafee%netscape.com
14b918a812 Adding bloat formatting, baseline mechanism. warren/mcafee
git-svn-id: svn://10.0.0.236/trunk@52144 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 23:18:50 +00:00
sspitzer%netscape.com
9b563bc4a7 adding -SelectProfile for the mac.
git-svn-id: svn://10.0.0.236/trunk@52143 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 23:17:44 +00:00
sspitzer%netscape.com
761883462c checking in ben goodger's (rgoodger@ihug.co.nz) profile selection UI.
r=sspitzer

I made changes so that:

1)  exit quits the app, and doesn't start up app with the last current profile
2)  fix a spelling error (personalisation -> personalization), this is en-US, not en-UK
3)  fix it so start actually starts the selected profile.
4)  -SelectProfile launches this new dialog
5)  if the user starts with no command line, and they have more than one profile, they get -SelectProfile, and not -installer.


git-svn-id: svn://10.0.0.236/trunk@52142 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 23:08:46 +00:00
mcafee%netscape.com
cb42bc5347 switching to static pages.
git-svn-id: svn://10.0.0.236/trunk@52141 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 23:02:49 +00:00
mcafee%netscape.com
5d276fc49d fixing log rename problem. code=warren
git-svn-id: svn://10.0.0.236/trunk@52140 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 23:02:10 +00:00
sspitzer%netscape.com
39084ddb75 add support for SelectProfile
git-svn-id: svn://10.0.0.236/trunk@52139 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 22:56:00 +00:00
ftang%netscape.com
725ca86a3c fix bustage.
git-svn-id: svn://10.0.0.236/trunk@52138 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 22:38:58 +00:00
warren%netscape.com
25f7059c43 Fixed the fact that all pdb files get called default.pdb (which made it hard to debug when there was more than one test file in a directory). r=cyeh
git-svn-id: svn://10.0.0.236/trunk@52137 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 22:36:22 +00:00
rbs%maths.uq.edu.au
cdfb86c649 Catching up with recent changes of the nsIFrame API
git-svn-id: svn://10.0.0.236/trunk@52136 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 22:30:28 +00:00
waterson%netscape.com
ed6d691c92 Remove unused references to nsIXULChildDocument and nsIXULParentDocument.
git-svn-id: svn://10.0.0.236/trunk@52135 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 22:18:21 +00:00
pepper%netscape.com
856f1ee86f Added a newline to the end of file so that AIX and HP compilers are happy.
r=mgleeson


git-svn-id: svn://10.0.0.236/trunk@52134 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 22:17:43 +00:00
rbs%maths.uq.edu.au
4ea4c2ba26 Adding Dave Fiddes' patch for a MOZ_MATHML CFLAGS
git-svn-id: svn://10.0.0.236/trunk@52133 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 22:17:13 +00:00
waterson%netscape.com
c13911024a Remove redundant registration of well-formed DTD. r=rickg
git-svn-id: svn://10.0.0.236/trunk@52132 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 22:15:18 +00:00
waterson%netscape.com
0509ac6c24 Put column headers back in to folder pane. r=hyatt.
git-svn-id: svn://10.0.0.236/trunk@52131 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 22:14:14 +00:00
mccabe%netscape.com
c568cf9bed Add an API entry point for building JS Date objects from millisecond values.
Patches courtesy Chris Houck.  r=mccabe.


git-svn-id: svn://10.0.0.236/trunk@52130 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 22:11:41 +00:00
rhp%netscape.com
b3f1a34e11 Fix for sending plain text as binary files - Bug #16393 - r: mscott
git-svn-id: svn://10.0.0.236/trunk@52129 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 22:09:27 +00:00
norris%netscape.com
a825f1738a work on bug 7270.
r=mstoltz.
Implement netscape.security.PrivilegeManager callbacks.


git-svn-id: svn://10.0.0.236/trunk@52128 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 22:09:03 +00:00
mscott%netscape.com
58da4d1cc2 part of url dispatching framework.
build nsURLDispatcher.cpp


git-svn-id: svn://10.0.0.236/trunk@52127 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 22:08:57 +00:00
ftang%netscape.com
949f26b1d9 remove nsIDOMTextRange.h nsIDOMTextRangeList.h. fix bug 12756. r=tague
git-svn-id: svn://10.0.0.236/trunk@52126 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 22:05:42 +00:00
wtc%netscape.com
2989da583b Bugzilla bug #17486: need parentheses around a & operator in an expression
git-svn-id: svn://10.0.0.236/trunk@52125 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 22:03:08 +00:00
srinivas%netscape.com
894660c683 Export version descriptor. Bugzilla 4742
git-svn-id: svn://10.0.0.236/trunk@52123 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 21:28:46 +00:00
bienvenu%netscape.com
7a179cfe09 fix mac build bustage
git-svn-id: svn://10.0.0.236/trunk@52122 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 21:20:40 +00:00
mcafee%netscape.com
4a058b42d1 Ignore tree directories.
git-svn-id: svn://10.0.0.236/trunk@52120 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 21:16:44 +00:00
dmose%mozilla.org
0d77d490d6 script to update license boilerplate in source files
git-svn-id: svn://10.0.0.236/trunk@52119 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 21:16:29 +00:00
rpotts%netscape.com
4626597396 cleanup - removed unnecessary code checking that mRequest != nsnull. Now the mRequest is allocated at channel construction and the channel is deleted if the request allocation fails...
git-svn-id: svn://10.0.0.236/trunk@52118 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 21:15:56 +00:00
ssu%netscape.com
cc23cb4fd5 added new resource string. This is related to bug #17391. r=dbragg.
Affects only windows platforms.


git-svn-id: svn://10.0.0.236/trunk@52117 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 21:13:28 +00:00
alecf%netscape.com
32ed46c795 fix casting problem on solaris
git-svn-id: svn://10.0.0.236/trunk@52116 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 21:13:06 +00:00
ssu%netscape.com
da07ac32b1 fixing bug #17391. r=dbragg.
Fixes problem with calculating available disk space under
Win95/win98.  Affects only windows platforms.


git-svn-id: svn://10.0.0.236/trunk@52115 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 21:12:24 +00:00
warren%netscape.com
052c27feff Fixed thing that chops off final digit.
git-svn-id: svn://10.0.0.236/trunk@52114 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 21:06:36 +00:00
racham%netscape.com
8f6655fb4a r=gayatrib. Fix for Bug 16414. If the profile dir is deleted it always gets rebuilt based on the path it gets from registry
git-svn-id: svn://10.0.0.236/trunk@52113 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 21:05:26 +00:00
dp%netscape.com
f2caaa1890 Converting to module. r=kipp
git-svn-id: svn://10.0.0.236/trunk@52112 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 20:59:49 +00:00
dp%netscape.com
b3499577af Convering to nsIModule. r=kipp
git-svn-id: svn://10.0.0.236/trunk@52111 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 20:57:29 +00:00
dp%netscape.com
da7c33e34c Remove delete on nsISupports. r=kipp
git-svn-id: svn://10.0.0.236/trunk@52110 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 20:44:45 +00:00
nhotta%netscape.com
b6d38ed4f7 Check input for the null pointer and empty string, bug 17287, r=ducarroz,jefft.
git-svn-id: svn://10.0.0.236/trunk@52109 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 20:41:45 +00:00
nisheeth%netscape.com
ce3c186894 r=nisheeth. Fix for bug 17237 from Rick Gessner (rickg@netscape.com). Thanks, Rick.
git-svn-id: svn://10.0.0.236/trunk@52108 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 20:40:08 +00:00
mscott%netscape.com
33fe7bdd57 Build new uri dispatching interfaces on the Mac.
git-svn-id: svn://10.0.0.236/trunk@52107 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 20:38:16 +00:00
mscott%netscape.com
1e3a7c2073 export uri dispatching interfaces.
git-svn-id: svn://10.0.0.236/trunk@52106 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 20:37:58 +00:00
despotdaemon%netscape.com
a82717bab8 Pseudo-automatic update of changes made by yueheng.xu@intel.com.
git-svn-id: svn://10.0.0.236/trunk@52105 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 20:34:51 +00:00
rods%netscape.com
189a26e941 Listboxes now obey CSS specifed sizes
r=kmcclusk,related to bug 16317


git-svn-id: svn://10.0.0.236/trunk@52104 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 20:31:23 +00:00
radha%netscape.com
ca4f530508 Fix for form values not maintained while going forward. bug # 16377. r=law
git-svn-id: svn://10.0.0.236/trunk@52103 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 20:29:43 +00:00
akhil.arora%sun.com
1aa54f66ab updated list of things todo, removing stuff that has been done
git-svn-id: svn://10.0.0.236/trunk@52102 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 20:28:20 +00:00
akhil.arora%sun.com
d6ca20f368 r=akhil.arora@sun.com By Igor Nekrestyanov <nis@sparc.spb.su>
Minor changes to handle unicode strings properly


git-svn-id: svn://10.0.0.236/trunk@52101 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 20:26:27 +00:00
sspitzer%netscape.com
3a3c45b57c fix warnings. r=valeski
git-svn-id: svn://10.0.0.236/trunk@52100 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 20:25:43 +00:00
kmcclusk%netscape.com
89bd3d196e Removed stray semi-colon after NS_DECL_ISUPPORTS bug=17235 r=rods@netscape.com
git-svn-id: svn://10.0.0.236/trunk@52099 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 20:24:19 +00:00
alecf%netscape.com
5ecb0c11b3 prepare to consolidate server URI creation - create a new property of incoming servers, the local store type, and construct the URL from there.
r=sspitzer


git-svn-id: svn://10.0.0.236/trunk@52098 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 20:22:06 +00:00
alecf%netscape.com
2e274875d3 more cleanup work - now retrieve the server at URI creation time, so that GetServer() is really fast, and just forward calls to GetUsername and GetPassword() to the server. r=sspitzer
git-svn-id: svn://10.0.0.236/trunk@52097 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 20:19:57 +00:00
terry%mozilla.org
7d80bedb81 Back out last change -- specific to mozilla.org, not to general consumers of bugzilla.
git-svn-id: svn://10.0.0.236/trunk@52096 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 20:18:03 +00:00
bienvenu%netscape.com
f488902f5d work on body filters and search r=mscott
git-svn-id: svn://10.0.0.236/trunk@52095 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 20:13:22 +00:00
valeski%netscape.com
b853096819 16968, r=gagan. Changed the way HTTP header notification occurs. now the channel does the notification. Also added SetREsponseHeaders() to the nsIHTTPChannel iface which allows outside users to add response headers (such as nsMultiMIMEConv/bugzilla) and have the new headers perculate to observers. also fixed HTTP handler leak, r=dp on that one.
git-svn-id: svn://10.0.0.236/trunk@52094 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 20:12:59 +00:00
endico%mozilla.org
9b799b1100 Try to herd netscape communicator users away from bugzilla. "if your browser has a blue N logo go report the bug to netscape". This wording may be wrong later on but it works for now.
git-svn-id: svn://10.0.0.236/trunk@52093 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 20:12:52 +00:00
mcafee%netscape.com
296f21777f Updating legend for C, bloaty stats.
git-svn-id: svn://10.0.0.236/trunk@52092 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 19:47:47 +00:00
varada%netscape.com
b921af7d24 fix for bug #12715 import feature for nci files
git-svn-id: svn://10.0.0.236/trunk@52091 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 19:26:35 +00:00
varada%netscape.com
7a333b1d09 fix for change in copydir function
git-svn-id: svn://10.0.0.236/trunk@52090 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 19:25:56 +00:00
warren%netscape.com
16156488f8 Enhanced delta report. Breakdown by what's new, what's changed, etc.
git-svn-id: svn://10.0.0.236/trunk@52089 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 18:57:37 +00:00
despotdaemon%netscape.com
04b5eac48c Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@52088 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 17:59:13 +00:00
norris%netscape.com
0d74bb8fa4 Fix spelling of contributor's name.
git-svn-id: svn://10.0.0.236/trunk@52087 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 17:43:43 +00:00
troy%netscape.com
aa66ccecfa Elimninated compiler warning
git-svn-id: svn://10.0.0.236/trunk@52086 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 14:46:41 +00:00
ftang%netscape.com
bd4b9fbaf5 fix two comment after brade review and point out my error in prev checkin. r=brade
git-svn-id: svn://10.0.0.236/trunk@52085 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 14:46:37 +00:00
troy%netscape.com
3cb8f38164 Eliminated compiler warning
git-svn-id: svn://10.0.0.236/trunk@52084 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 14:46:06 +00:00
troy%netscape.com
5149a61f62 Added more diagnostic code
git-svn-id: svn://10.0.0.236/trunk@52083 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 14:38:14 +00:00
kipp%netscape.com
1786d79429 bug=17320; Fixed a purify warning
git-svn-id: svn://10.0.0.236/trunk@52082 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 14:33:34 +00:00
ftang%netscape.com
85c96d612c move all end of line # comment to the previous line. Remove all end of line tab and whitespace. Need this to fix Trad Chinese IME. Somehow our property file reader do not treat # as start of comment in a key value pair line. r=brade
git-svn-id: svn://10.0.0.236/trunk@52081 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 14:28:22 +00:00
vidur%netscape.com
1173466bfc Added a version of window.close, which when alled from script that defers actual closure if it is invoked from the script context of the window itself. Fixes bug 15261. R=joki.
git-svn-id: svn://10.0.0.236/trunk@52080 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 14:12:56 +00:00
ftang%netscape.com
c3b0a312fc remove unnecessary #ifdef USE_XIM. r=pavlov
git-svn-id: svn://10.0.0.236/trunk@52079 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 13:16:07 +00:00
Jerry.Kirk%Nexwarecorp.com
4385e8d68e Call PtAppAddFd instead of PtAppAddFdPri because of redraw bugs it
was causing.
r=kedl


git-svn-id: svn://10.0.0.236/trunk@52078 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 12:43:46 +00:00
dp%netscape.com
f06f488185 Removing use of mRefCnt directly. Also, removed all use of refcounted
variable as creations were always refcounted. r=kipp


git-svn-id: svn://10.0.0.236/trunk@52077 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 11:42:15 +00:00
srinivas%netscape.com
a6569800ce Include system files for BeOS; checkin for <duncan@be.com>.
git-svn-id: svn://10.0.0.236/trunk@52076 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 11:40:33 +00:00
rickg%netscape.com
7d94513269 fixed bug17387 (pre-constructing DTD's). r=warren
git-svn-id: svn://10.0.0.236/trunk@52075 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 09:26:19 +00:00
cmanske%netscape.com
450e220228 More changes to Composer for new skin (mostly new images).
git-svn-id: svn://10.0.0.236/trunk@52073 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 08:42:30 +00:00
warren%netscape.com
afff9da3ba Fixed bug in calculating leak total.
git-svn-id: svn://10.0.0.236/trunk@52072 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 08:35:53 +00:00
warren%netscape.com
4677dd631f Changed file transport to facilitate jar: protocol -- parameterized by nsIFileSystem. Bug#12579 r=gagan,gayatrib
git-svn-id: svn://10.0.0.236/trunk@52070 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 08:02:07 +00:00
rickg%netscape.com
b14a509c76 fixed bug17388, dtd leak; r=mscott
git-svn-id: svn://10.0.0.236/trunk@52069 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 07:53:21 +00:00
tbogard%aol.net
cd2764bb20 Changes made to reflect changes in nsIGenericWindow and nsIScrollable.
git-svn-id: svn://10.0.0.236/trunk@52068 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 07:52:08 +00:00
tbogard%aol.net
8e4af380cc Removed RemoveFocus() from nsIGenericWindow. Moved SizeToContent() to nsIHTMLDocShell. Added setCurScrollPosEx and setScrollRangeEx to nsIScrollable. Moved a bunch of code from nsHTMLDocShell into the base class. Commented out some stuff. Everything should compile now.
git-svn-id: svn://10.0.0.236/trunk@52067 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 07:51:10 +00:00
mscott%netscape.com
3587a59aa7 build mime before compose so we can make sure nsIMimeStreamConverter.idl has been exported
before compose IDL files try to use it.


git-svn-id: svn://10.0.0.236/trunk@52066 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 07:23:20 +00:00
dougt%netscape.com
32412a1f03 Fix for this mornings crasher (17352) r=pavlov, mscott
git-svn-id: svn://10.0.0.236/trunk@52065 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 06:44:36 +00:00
ducarroz%netscape.com
a282d4acf9 another Mac bustage fix. Caught before it appears
git-svn-id: svn://10.0.0.236/trunk@52064 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 06:01:43 +00:00
ducarroz%netscape.com
d4df792c85 Fix Mac bustage for mscott.
Add build instruction for mozilla:mailnews:mime:public:MANIFEST_IDL.


git-svn-id: svn://10.0.0.236/trunk@52063 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 05:45:22 +00:00
mscott%netscape.com
1bac65d756 Remove incorrect export of nsIMimeStreamConverter.idl
git-svn-id: svn://10.0.0.236/trunk@52062 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 05:42:15 +00:00
mscott%netscape.com
1b39aa1dd7 more work to try to fix the mac build.
git-svn-id: svn://10.0.0.236/trunk@52061 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 05:39:14 +00:00
ducarroz%netscape.com
eaa801e49e Fix for bug 17405. We need to skip entry that aren't valid during the search. R=mscott (he has also approved the fact I checking despite a red tree)
git-svn-id: svn://10.0.0.236/trunk@52060 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 05:34:07 +00:00
mscott%netscape.com
dbf6bce997 Fix windows build breakage. Try to build mime before compose so the IDL files
get exported first.


git-svn-id: svn://10.0.0.236/trunk@52058 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 05:08:36 +00:00
mscott%netscape.com
5c68fcaafc fix mac build by exporting nsIMimeStreamConverter.idl
git-svn-id: svn://10.0.0.236/trunk@52057 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 04:56:12 +00:00
waterson%netscape.com
31deb6a74d Unix filenames are case-sensitive.
git-svn-id: svn://10.0.0.236/trunk@52056 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 04:36:04 +00:00
mscott%netscape.com
888899af25 Bug #16927 --> when quoting a message, don't try to force a message URI into a protcol url. Convert the rdf uri
into a url and use that instead. For quoting the msg, use NS_NewChannel and AsyncOpen. some cleanup to fix
some ref counting stuff including supporting a new interface. Using the component manager
to create the quote listener instead of using new.
r=rhp


git-svn-id: svn://10.0.0.236/trunk@52055 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 04:22:08 +00:00
mscott%netscape.com
1bc43aaac4 Use nsCOMPtr. Add nsIMsgQuoteListener support, remove some extra member variables that we didn't need.
r=rhp


git-svn-id: svn://10.0.0.236/trunk@52054 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 04:21:30 +00:00
mscott%netscape.com
5daada9f2c Bug #16927 add nsIMsgQuoteListener interface
r=rhp


git-svn-id: svn://10.0.0.236/trunk@52053 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 04:21:02 +00:00
mscott%netscape.com
08f1d9c5a8 Bug #16927 --> add msg quote listener to module.
r=rhp


git-svn-id: svn://10.0.0.236/trunk@52052 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 04:20:41 +00:00
mscott%netscape.com
3b5d377a59 Bug #16927 --> add class id for msg quote listener
r=rhp


git-svn-id: svn://10.0.0.236/trunk@52051 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 04:19:59 +00:00
karnaze%netscape.com
15d92465ad simplified caching of column frames. split out collapsing border processing into nsBorderCollapser (checked in previously). r=troy
git-svn-id: svn://10.0.0.236/trunk@52050 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 04:09:39 +00:00
karnaze%netscape.com
0ddb8bf0bc added files: mozilla/layout/html/table/src/nsTableBorderCollapser.cpp
git-svn-id: svn://10.0.0.236/trunk@52049 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 04:06:36 +00:00
karnaze%netscape.com
b363aea0eb new class for collapsing borders, extracted from nsTableFrame, r=troy
git-svn-id: svn://10.0.0.236/trunk@52045 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 03:51:55 +00:00
braddr%puremagic.com
d8fb5871d7 Move all nsIEnumerator usage over to NS_ENUMERATOR_FALSE from NS_COMFALSE in anticipation of nixing NS_COMFALSE in the near future.
r=scc


git-svn-id: svn://10.0.0.236/trunk@52044 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 03:16:48 +00:00
brendan%mozilla.org
da68e2dcd8 Fix bogus assertion (r=shaver@mozilla.org) found by chouck@geocast.com.
git-svn-id: svn://10.0.0.236/trunk@52043 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 02:50:15 +00:00
fur%netscape.com
50f46042f0 Removed unused variable declaration to eliminate warning
git-svn-id: svn://10.0.0.236/trunk@52042 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 02:48:32 +00:00
srinivas%netscape.com
bc406e3e1e Add PR_Block/Unblock_Interrupt functions. Bugzilla 17055
git-svn-id: svn://10.0.0.236/trunk@52041 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 02:48:01 +00:00
fur%netscape.com
dbcd581b59 Eliminated references to long-dead jsaddr.[ch].
Note: These files only used in standalone JS, not SeaMonkey build.


git-svn-id: svn://10.0.0.236/trunk@52040 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 02:45:01 +00:00
fur%netscape.com
e969fa7f4f Removed unused files - they have been dead for years
git-svn-id: svn://10.0.0.236/trunk@52039 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 02:42:49 +00:00
tbogard%aol.net
d9cd4dc3b8 Pushed many of the method implementations done by buster from nsHTMLDocShell into the base class.
git-svn-id: svn://10.0.0.236/trunk@52038 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 02:20:44 +00:00
mscott%netscape.com
5bfc03c26e part of url dispatching.
export the uri dispatching interfaces.
no reviewer for this makefile change.


git-svn-id: svn://10.0.0.236/trunk@52037 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 02:05:12 +00:00
danm%netscape.com
d5cb9410ae moving initial content focus from OnEndDocumentLoad to Show. Reinstating SetSizeFromXUL. reduces new window flashing and allows gtk windows to size from JS. r:hyatt@netscape.com
git-svn-id: svn://10.0.0.236/trunk@52036 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 01:52:49 +00:00
mscott%netscape.com
df0cb24c86 Checking this in for hangas. Fixes the grey menus in the compose window.
r=mscott


git-svn-id: svn://10.0.0.236/trunk@52035 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 01:52:13 +00:00
cmanske%netscape.com
c0c0bb47c7 Fixed bugs 16690, 16991. Also made UI changes to adjust for new 'skin' r=sfraser
git-svn-id: svn://10.0.0.236/trunk@52034 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 01:51:07 +00:00
nisheeth%netscape.com
151090fbb2 r=nisheeth. Fix for bug 9781 submitted by Johnny Stenbeck (jst@citec.fi). Thanks Johnny.
git-svn-id: svn://10.0.0.236/trunk@52033 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 01:50:37 +00:00
hangas%netscape.com
9c4609c831 Fixed throbber id, bug 17271. r=german
git-svn-id: svn://10.0.0.236/trunk@52032 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 01:44:29 +00:00
law%netscape.com
85c96d1199 Bug #14999; remove last vestiges of app core usage; r=sfraser@netscape.com
git-svn-id: svn://10.0.0.236/trunk@52031 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 01:41:16 +00:00
law%netscape.com
41c8a495f1 Bug #14999, removing last vestiges of app core usage; r=sfraser@netscape.com
git-svn-id: svn://10.0.0.236/trunk@52030 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 01:39:33 +00:00
nisheeth%netscape.com
f341433a7c r=dp. Fix for bug 17411. Commenting out the call to nsFrameManager::CantRenderReplacedElement for now. This should let us open up the tree while dp and pnunn figure out the right fix.
git-svn-id: svn://10.0.0.236/trunk@52029 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 01:20:34 +00:00
tbogard%aol.net
f996be0ecd Changed nativeWindow* parentNativeWindow back to nativeWindow parentNativeWindow.
git-svn-id: svn://10.0.0.236/trunk@52028 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 00:45:13 +00:00
despotdaemon%netscape.com
20ec29f713 Pseudo-automatic update of changes made by andreww@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@52027 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 00:11:01 +00:00
hoa.nguyen%intel.com
a56d99d249 Initialize cookie manager. Allows cgi scripts to set and retrieve cookies through viewer. r=edburns@acm.org
git-svn-id: svn://10.0.0.236/trunk@52026 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 23:58:49 +00:00
buster%netscape.com
1f5101db18 added a bunch of initial implementation. does not compile yet, but that's ok because docshell isn't part of the build yet.
git-svn-id: svn://10.0.0.236/trunk@52025 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 23:50:19 +00:00
jfrancis%netscape.com
f4bfa77ae5 fix for 17056: making a list in empty doc didnt work; also making a new list item didn't work. r=floppy moose
git-svn-id: svn://10.0.0.236/trunk@52024 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 23:44:33 +00:00
sfraser%netscape.com
3b974396c6 Add the various menu-related arrow gifs. fixes bug 17368. r=jfrancis
git-svn-id: svn://10.0.0.236/trunk@52023 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 23:40:51 +00:00
jj%netscape.com
adfe3c048e First Checked In.
git-svn-id: svn://10.0.0.236/trunk@52022 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 23:39:46 +00:00
putterman%netscape.com
7e1db2ef27 This should stop build bustage for clobber builds.
git-svn-id: svn://10.0.0.236/trunk@52021 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 23:39:15 +00:00
locka%iol.ie
74ff2dc2f4 Fixed some bugs in the copy to clipboard operation.
Control now calls NS_ShutdownXPCOM during destruction


git-svn-id: svn://10.0.0.236/trunk@52020 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 23:19:27 +00:00
locka%iol.ie
7eff36db02 Added a menu to the dialog.
Implemented tests for cut, copy, paste, select all


git-svn-id: svn://10.0.0.236/trunk@52019 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 23:17:51 +00:00
cata%netscape.com
1bb10c65f4 I'm checking in for momoi, r=cata, bug #17018, Charset Menu usability workaround.
git-svn-id: svn://10.0.0.236/trunk@52018 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 23:10:51 +00:00
ftang%netscape.com
657f0d5580 fix the delete last IME text problem. bug13494 . There are another fix in nsHTMLEditRules.cpp related this but I forget to put the bug # there. r=tague
git-svn-id: svn://10.0.0.236/trunk@52017 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 23:05:24 +00:00
troy%netscape.com
c96591767e b=6674, r=karnaze@netscape.com
Changed Paint() to set the clip rect only when the collapse offset isn't
(0, 0)


git-svn-id: svn://10.0.0.236/trunk@52016 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 23:01:21 +00:00
kipp%netscape.com
3a2fe236a8 r=troy; fixed bug #17346 - the nsTextFormatter self test code found a bug in the nsTextFragment ctor code...
git-svn-id: svn://10.0.0.236/trunk@52015 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 23:01:16 +00:00
hangas%netscape.com
5fb3a93517 Cleaned up bad style rules in global.css - should result in noticable performance improvement. Converted <titledbutton> rules to all use a class, this way we can be specific about how each type of button should look. Added line between columns in tree headers. Indented treecell contents. Cleaned up mail and AB toolbars. Fixed reflow and other drawing issues with toolbar buttons on new skins. Fixed problems in results tree on AB window. Other misc visual changes. Fixed bug 16530, changing the word Messenger to Mail. r=german/hyatt
git-svn-id: svn://10.0.0.236/trunk@52014 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 23:01:09 +00:00
cathleen%netscape.com
c249ccc29e adding missing editor chrome file to mac packaging list
git-svn-id: svn://10.0.0.236/trunk@52013 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:59:04 +00:00
ftang%netscape.com
c31d69ed3f add debugging code. fix remove last uncomited IMEText. r=jfrancis
git-svn-id: svn://10.0.0.236/trunk@52012 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:56:36 +00:00
akkana%netscape.com
018a1629cf 17305: Fix ? handling. Also add myself to a debug ifdef. r=pavlov
git-svn-id: svn://10.0.0.236/trunk@52011 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:53:52 +00:00
tague%netscape.com
282a0d9dcf Fixed bug #16463 - can't create profile with Danish version of Mozilla. I modified the locale mapping code to correct a bug where DA was getting mapped to LANG_DUTCH. r=nhotta@netscape.com
git-svn-id: svn://10.0.0.236/trunk@52010 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:52:56 +00:00
bienvenu%netscape.com
d6e604a886 turn on date filters, r=mscott 10416
git-svn-id: svn://10.0.0.236/trunk@52009 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:45:18 +00:00
nisheeth%netscape.com
fa55e685cc r=pollmann, troy. Fix for bug 10564. Added some error checking code to prevent crashes reported on low memory configurations.
git-svn-id: svn://10.0.0.236/trunk@52008 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:45:05 +00:00
sdagley%netscape.com
41a1603c9d __MD_GetEnv now calls standard C's getenv if environment variable not in NSPR's table. r=beard
git-svn-id: svn://10.0.0.236/trunk@52007 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:44:48 +00:00
sspitzer%netscape.com
637de3c1b6 fix for #17285 and #17397. r=mscott.
properly migrate pop and nntp servers from 4.x that were not on the default ports (110 and 119, respectively).
also, set the default port pref to be -1, so that if we don't set the port, it gets set to -1.


git-svn-id: svn://10.0.0.236/trunk@52006 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:44:34 +00:00
morse%netscape.com
af16ae652b bug 17339, document.cookie throwing exception, r=neeti
git-svn-id: svn://10.0.0.236/trunk@52005 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:43:49 +00:00
rginda%ndcico.com
dece5d007f **NOT PART OF THE SEAMONKEY DEFAULT BUILD**
* xul/tests/test3-output-loud.css
Added css for "loud" style.

* xul/tests/blue_rock.gif
Added pic for new default style, from Eterm background collection.

* makefile.win, Makefile.in
Add blue_rock.gif to install files.

* js/lib/irc.js
Strip \r characters from input.

* xul/tests/index.html
Updated content.

* xul/tests/test3-handlers.js
Create userlist object onJoin if it isnt already there.

* xul/tests/test3-output-default.css
New default style.

* xul/tests/test3-static.js
Added irc.freei.net server to top of EFNet network.  This server does not
require the ident service, which is blocked by the NS firewall.

* xul/tests/test3.xul
Added "loud" style to menu (old default style.)


git-svn-id: svn://10.0.0.236/trunk@52004 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:42:47 +00:00
morse%netscape.com
cfdf03bc1a bug 17120, can't startup if cookie dll missing, r=valeski
git-svn-id: svn://10.0.0.236/trunk@52003 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:41:36 +00:00
putterman%netscape.com
32be2053bd Added nsIMsgWindow.idl and nsIMsgRDFDataSource.idl
git-svn-id: svn://10.0.0.236/trunk@52002 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:40:34 +00:00
putterman%netscape.com
dd42c6ee85 Added nsMsgWindow.cpp
git-svn-id: svn://10.0.0.236/trunk@52001 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:39:37 +00:00
morse%netscape.com
0eb9ff94e0 part of bug 8227, dereferencing problems, r=rickg
git-svn-id: svn://10.0.0.236/trunk@52000 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:38:48 +00:00
putterman%netscape.com
ff9a018c1e Started work on 17376. reviewed by bienvenu. create an object that knows about
mailnews window data and pass it through backend.


git-svn-id: svn://10.0.0.236/trunk@51999 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:38:47 +00:00
cathleen%netscape.com
59a2f543c7 adding missing editor chrome files
git-svn-id: svn://10.0.0.236/trunk@51998 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:35:37 +00:00
matt%netscape.com
e180142807 fix for bug 15169 r-morse
git-svn-id: svn://10.0.0.236/trunk@51997 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:33:35 +00:00
matt%netscape.com
5077a5368d 17218 r-mcafee
git-svn-id: svn://10.0.0.236/trunk@51996 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:31:58 +00:00
rogerl%netscape.com
2bfa05205d Changed commandline option for classpath to 'classpath' instead of 'cp'
git-svn-id: svn://10.0.0.236/trunk@51995 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:22:56 +00:00
bienvenu%netscape.com
f3513af6e6 fix a couple ref-counting problems on news dbs, reviewed last week by sspitzer
git-svn-id: svn://10.0.0.236/trunk@51994 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:19:42 +00:00
bienvenu%netscape.com
6b1312845e fix off by one error computing display name from naked email address
git-svn-id: svn://10.0.0.236/trunk@51993 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:18:12 +00:00
rogerl%netscape.com
f891c9ebb9 Error message for apply argument type
git-svn-id: svn://10.0.0.236/trunk@51992 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:17:44 +00:00
rogerl%netscape.com
f3ae1fcf7a ECMA handling of undefined args for call & apply.
git-svn-id: svn://10.0.0.236/trunk@51991 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:17:05 +00:00
rogerl%netscape.com
7a5d5c9ad9 Handle LINE & SOURCEFILE in dumpIcode
Fix bug in multiple try/catch clauses after a catch - the tryStackTop was
being decremented twice.


git-svn-id: svn://10.0.0.236/trunk@51990 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:16:15 +00:00
rogerl%netscape.com
a8627f0cf6 Handle missing arg in match_or_replace
git-svn-id: svn://10.0.0.236/trunk@51989 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:14:46 +00:00
bienvenu%netscape.com
6b7fd317c4 turn on history ab collection for msg sending r=jefft, bug 14447
git-svn-id: svn://10.0.0.236/trunk@51988 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:14:37 +00:00
rhp%netscape.com
e735146e7c Fix for Unicode quoting to plain text compose - Bug: 15465 r: bienvenu
git-svn-id: svn://10.0.0.236/trunk@51987 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:11:51 +00:00
rogerl%netscape.com
89da4b6f9b ECMA specified handling of NaN inputs for max & min
git-svn-id: svn://10.0.0.236/trunk@51986 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:11:43 +00:00
rogerl%netscape.com
800a7e2800 Subsumed ConversionError into TypeError
git-svn-id: svn://10.0.0.236/trunk@51985 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:10:36 +00:00
mscott%netscape.com
e2730e12e8 Bug #17352 --> temporarily hide this crasher by inserting an extra
ref count of the event queue. this is horrible since we are introducing
a leak. we need to examine the ownership model of event queues for the app
shell. I'm going to get pavlov to help me look at fixing this bug for real.
r=dougt
a=gramps,granrose


git-svn-id: svn://10.0.0.236/trunk@51984 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 22:00:54 +00:00
dmose%mozilla.org
1710bfc387 updating license boilerplate in all files; checkin approved by leif@netscape.com
git-svn-id: svn://10.0.0.236/trunk@51980 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 21:02:40 +00:00
braddr%puremagic.com
1dde1a4f56 Ooops.. tree closed, better back these out for now. Sorry.
git-svn-id: svn://10.0.0.236/trunk@51979 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 21:01:37 +00:00
larryh%netscape.com
dfb30043a3 BugZilla 17374. Add PROffset types
git-svn-id: svn://10.0.0.236/trunk@51978 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 20:29:22 +00:00
braddr%puremagic.com
7767d9393b Move all nsIEnumerator usage over to NS_ENUMERATOR_FALSE from NS_COMFALSE
in anticipation of nixing NS_COMFALSE in the near future.
r=scc (please contact him should there be any build issues)


git-svn-id: svn://10.0.0.236/trunk@51977 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 20:24:21 +00:00
bienvenu%netscape.com
642710bf52 fix race condition opening imap folder r=mscott, build stopper
git-svn-id: svn://10.0.0.236/trunk@51976 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 19:15:20 +00:00
kipp%netscape.com
0637f2c48a Backed out chris's accidental checkin (don't ask)
git-svn-id: svn://10.0.0.236/trunk@51973 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 15:57:35 +00:00
karnaze%netscape.com
03e8200f99 hello
git-svn-id: svn://10.0.0.236/trunk@51972 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 15:55:31 +00:00
vidur%netscape.com
48577bac14 Update mNumFlushed counts when we do a synchronous notification (in scripts, for example). This is so that a call to FlushTags while we're executing a script sees the context stack in an updated state. Fixes bug 14042. R=joki.
git-svn-id: svn://10.0.0.236/trunk@51971 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 14:03:15 +00:00
Jerry.Kirk%Nexwarecorp.com
a4c99c7c93 Finished implementing ListenToEventQueue.
r=kedl


git-svn-id: svn://10.0.0.236/trunk@51970 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 11:36:21 +00:00
idk%eng.sun.com
3b03dc263a bugId 17329
Added PlugletSecurityContext class.
Set ProxyJNI security context to PlugletSecurityContext
(see 15902)


git-svn-id: svn://10.0.0.236/trunk@51969 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 09:33:06 +00:00
hyatt%netscape.com
a036d65c5c working on theme switching r=pavlov
git-svn-id: svn://10.0.0.236/trunk@51966 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 09:24:23 +00:00
idk%eng.sun.com
ab0a4a932c bugId 17316
Added 4 demo pluglets
a = laa@sparc.spb.su
r = idk@eng.sun.com


git-svn-id: svn://10.0.0.236/trunk@51965 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 09:10:36 +00:00
nisheeth%netscape.com
cd137af4d4 Fix for bug 15633. Fixing build warning with the patch submitted by James Clark (jjc@jclark.com). r=nisheeth
git-svn-id: svn://10.0.0.236/trunk@51964 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 07:39:57 +00:00
briano%netscape.com
3387e5dd13 Automated update
git-svn-id: svn://10.0.0.236/trunk@51962 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 07:15:10 +00:00
nisheeth%netscape.com
74d8a9e437 Added --enable-detec-webshell-leaks autoconf flag.
git-svn-id: svn://10.0.0.236/trunk@51961 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 07:14:42 +00:00
nisheeth%netscape.com
0ca61f6f5c Added --enable-detect-webshell-leaks autoconf flag.
git-svn-id: svn://10.0.0.236/trunk@51960 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 07:13:48 +00:00
mcafee%netscape.com
dc2ef44aa6 switching to absolute leak/bloat numbers.
git-svn-id: svn://10.0.0.236/trunk@51959 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 07:02:25 +00:00
rpotts%netscape.com
d54c2a54d9 bug #13054. r=mscott,warren. Reworked how data is written to the network. I consolidated the writing of nsIBufferInputStreams and nsIInputStreams and limited the amount of data being wrtten at once to MAX_IO_TRANSFER_SIZE...
git-svn-id: svn://10.0.0.236/trunk@51957 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 06:51:12 +00:00
mscott%netscape.com
26a5e7abea Bug #14928 --> url dispatching. Adding initial scaffolding for the uri dispatcher service.
(not part of the build yet)


git-svn-id: svn://10.0.0.236/trunk@51956 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 06:49:42 +00:00
rpotts%netscape.com
207123458e bug #16897. Consolidated the firing of OnStopRequest into the nsHTTPChannel. This is also called if a transport fails to be created...
git-svn-id: svn://10.0.0.236/trunk@51955 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 06:48:53 +00:00
sfraser%netscape.com
e025da23ff Ooops, maybe we do need one of those paths after all. r=floppy
git-svn-id: svn://10.0.0.236/trunk@51954 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 06:48:35 +00:00
mscott%netscape.com
c438ffca68 added a url dispatching comment.
git-svn-id: svn://10.0.0.236/trunk@51953 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 06:48:19 +00:00
sfraser%netscape.com
5258fa6070 Another teeny project fix -- remove obsolete lib/xp paths in the two static targets (which are not built anyway). r=moose
git-svn-id: svn://10.0.0.236/trunk@51952 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 06:44:44 +00:00
sfraser%netscape.com
f825fcb394 Fix the output file (RDF.header -> chrome.headers) so that .h file generation dependencies work properly. Fixes the red tree. r=mscott
git-svn-id: svn://10.0.0.236/trunk@51951 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 06:42:07 +00:00
rpotts%netscape.com
072f7a0e0b These are pollmanns changes for bug #8209 and other related POSTing bugs r=rpotts
git-svn-id: svn://10.0.0.236/trunk@51950 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 06:35:03 +00:00
mcafee%netscape.com
f3b4ca8e81 switching to absolute leak/bloat numbers.
git-svn-id: svn://10.0.0.236/trunk@51949 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 06:34:28 +00:00
sfraser%netscape.com
e48c7f6f32 Really change to using the NSComponent library. the opt target still had NSStartup. r=moose.
git-svn-id: svn://10.0.0.236/trunk@51948 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 06:31:40 +00:00
pavlov%netscape.com
30d2acfd1b check for null r=alecf
git-svn-id: svn://10.0.0.236/trunk@51944 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 05:51:05 +00:00
putterman%netscape.com
6263816942 Fix for 17277. reviewed by mscott. Delete selects next message instead of previous.
git-svn-id: svn://10.0.0.236/trunk@51942 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 04:46:12 +00:00
bienvenu%netscape.com
226d2a5c5f add accessor for load group on doc loader r=rpotts
git-svn-id: svn://10.0.0.236/trunk@51941 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 04:44:42 +00:00
troy%netscape.com
fd1d6fc2a3 Changed view to be stored as a frame property instead of a member data
of nsFrame


git-svn-id: svn://10.0.0.236/trunk@51940 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 03:56:14 +00:00
mccabe%netscape.com
f192186834 Undo overly-hasty backout. This reinstates part of my recent checkin.
git-svn-id: svn://10.0.0.236/trunk@51939 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 03:44:38 +00:00
saari%netscape.com
a9ec68967c Making popups not steal activation on MacOS. r: pinkerton, no bug number that I'm aware of
git-svn-id: svn://10.0.0.236/trunk@51938 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 03:32:35 +00:00
tbogard%aol.net
1d0ea94a3d Create an initialization structure to hold data until window created. Added a lot of implementation for many of the accessors. Filled in a lot of other first cut implementation.
git-svn-id: svn://10.0.0.236/trunk@51936 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 02:45:49 +00:00
tbogard%aol.net
144854adac For some reason to get an nsRect implementation you have to link with gfx. Yeah, that's componentized!
git-svn-id: svn://10.0.0.236/trunk@51935 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 02:44:49 +00:00
beard%netscape.com
98fb6ecb62 make warnings not terminate build. fix bustage, r=mccabe
git-svn-id: svn://10.0.0.236/trunk@51934 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 02:44:34 +00:00
tbogard%aol.net
d23ee135fa Boundary checking.
git-svn-id: svn://10.0.0.236/trunk@51933 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 02:44:01 +00:00
tbogard%aol.net
7c66962d85 A little more documentation.
git-svn-id: svn://10.0.0.236/trunk@51932 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 02:43:37 +00:00
hyatt%netscape.com
4639154a7f making the chrome registry work with dynamic overlays r=pavlov
git-svn-id: svn://10.0.0.236/trunk@51931 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 02:21:05 +00:00
mccabe%netscape.com
8522d5db78 Debust mac-specific \r-related tree breakage.
git-svn-id: svn://10.0.0.236/trunk@51927 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 01:28:59 +00:00
troy%netscape.com
c04dab44f6 Change to some assertions in debug mode
git-svn-id: svn://10.0.0.236/trunk@51925 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 00:53:15 +00:00
mccabe%netscape.com
cde9269c1b Various fixes to xpidl. Note that this checkin will cause a rebuild of everything that depends on nsISupports.h. Fixes courtesy Mike Shaver, with small tweaks by McCabe. r=shaver, r=mccabe.
- Fix to bug 17013; have xpidl produce an error when encountering a native declaration without an associated (c++-name).

- remove many DEBUG_shaver lines.

- provide xpidl_tree_warning as a fallback for libIDL versions for which IDL_tree warning is bad, and NULL-proof our message callback function.  Also remove a 1k buffer limit from the message callback function.

- make enum in IDL files an error.  We don't support it, and love consts instead.

- Fix to 12684; don't allow [retval] parameter + return or multiple [retval] parameters.

- Fix to 13390; make non-{short,long} const a fatal error.


git-svn-id: svn://10.0.0.236/trunk@51924 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 00:37:39 +00:00
hangas%netscape.com
825694f714 Fixed the order of the stop and reload buttons on the browser. r=german
git-svn-id: svn://10.0.0.236/trunk@51923 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 00:17:16 +00:00
ftang%netscape.com
94bc1e8092 add debugging code. change code so we won't call MapDBCSAttributeArrayToUnicodeOffsets when we are not composition. Sent length == 0 TextEvent if we got nothhing in IME_COMPOSITION. This is needed to delete the last unconverted text in IME. r=tague
git-svn-id: svn://10.0.0.236/trunk@51922 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 00:14:46 +00:00
ftang%netscape.com
1a8b9b5ddb implement input method highlight. r=tague
git-svn-id: svn://10.0.0.236/trunk@51921 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 00:10:03 +00:00
jj%netscape.com
e14a41074a workaround to accept wildcards on Mac -- granrose. r=jj
git-svn-id: svn://10.0.0.236/trunk@51918 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-27 00:03:54 +00:00
rods%netscape.com
beb6aa3e8b At kipp's suggestion I added a EnterReflowLock before and a ExitReflowLock
after my AppendReflowCommand. The reflow command gets "kicked off"
and it is now fixed. r=kipp, b=14771


git-svn-id: svn://10.0.0.236/trunk@51916 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 23:34:46 +00:00
sspitzer%netscape.com
71d282e592 fix for #17212, r=mscott.
migrate imap servers that have the port in the name (like nsmail-2:143)


git-svn-id: svn://10.0.0.236/trunk@51915 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 23:34:30 +00:00
rods%netscape.com
d8ca5cd972 removed an unused variable and an extra decl and call to remove two warnings
r=none


git-svn-id: svn://10.0.0.236/trunk@51914 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 23:28:51 +00:00
mccabe%netscape.com
2cdb9d67e3 Fix IDL to use native <idl-name>(<C++-name>); instead of just native <idl-name>; This is prep to make the tree compile with a new error mode landing in xpidl shortly.
Preperatory to a fix to 17013; I'm doing this as a separate checkin to avoid any checkin-skew danger.

r=shaver.


git-svn-id: svn://10.0.0.236/trunk@51913 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 23:26:28 +00:00
rods%netscape.com
bdb148b62f changed param in the initializer to aContent instead of nsnull
r=kmcclusk,b=17015


git-svn-id: svn://10.0.0.236/trunk@51912 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 23:21:14 +00:00
gagan%netscape.com
22e24a8da0 Fixed bugs 11677 (perf) 13837 (spaces) 14380 (leading spaces) 14707 (-1) 15069 (file://) r=valeski
git-svn-id: svn://10.0.0.236/trunk@51911 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 23:16:34 +00:00
cmanske%netscape.com
3054ed7de9 Fixed bugs 6278, 9758, 17014, 17071, 17160. r=sfraser,mjudge
git-svn-id: svn://10.0.0.236/trunk@51910 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 23:13:00 +00:00
mcafee%netscape.com
214b95844f Clear alarm from AliveTest, this was causing alternating green/orange status. Thanks to alecf/slamm for debugging help.
git-svn-id: svn://10.0.0.236/trunk@51909 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 23:10:35 +00:00
cmanske%netscape.com
f92e65e679 Part of fix for 17160, remove TextEditor from Tasks menu. r=mjudge
git-svn-id: svn://10.0.0.236/trunk@51908 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 23:07:41 +00:00
rhp%netscape.com
013f4b1591 Cleaning up some comments.
git-svn-id: svn://10.0.0.236/trunk@51907 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 23:06:27 +00:00
tbogard%aol.net
bb01dd252a Implemented the Destroy() method.... Which basically boils down to us returning out that we don't support the method. :)
git-svn-id: svn://10.0.0.236/trunk@51905 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 22:59:33 +00:00
wtc%netscape.com
f6437b73b9 Bugzilla bug #17188: NSPR should not automatically set the SO_KEEPALIVE
socket option on a new TCP socket. The HAVE_SOCKET_KEEPALIVE macro is
obsolete. r=srinivas@netscape.com.
Modified files: _beos.h, _os2.h, _unixos.h, _win16.h, _win95.h, _winnt.h,
prsocket.c, and ptio.c.


git-svn-id: svn://10.0.0.236/trunk@51902 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 22:58:55 +00:00
tbogard%aol.net
9e1e7d7a18 Implemented a number of methods for the doc shell attributes. Setup and Init structure which is used to accept the settings of attributes until Create() is called.
git-svn-id: svn://10.0.0.236/trunk@51900 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 22:56:59 +00:00
rhp%netscape.com
428cbd6498 Update changes for Mac project...again
git-svn-id: svn://10.0.0.236/trunk@51898 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 22:56:18 +00:00
tbogard%aol.net
0701f384c9 Updated some of the documentation.
git-svn-id: svn://10.0.0.236/trunk@51895 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 22:54:26 +00:00
rhp%netscape.com
3aa41ccbdf Update changes for Mac project
git-svn-id: svn://10.0.0.236/trunk@51894 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 22:47:55 +00:00
norris%netscape.com
0949cbb8b9 Fix 16836 "Security error accessing DOM elements inside an IFrame"
r=vidur@netscape.com
Also, bug 16536 "Security disallows opening resource URL" no longer occurs after this fix.


git-svn-id: svn://10.0.0.236/trunk@51893 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 22:45:32 +00:00
rhp%netscape.com
0d96648b4a Changes for better text display and format flowed - Bug #16507 - r: rhp since this is externally contributed
git-svn-id: svn://10.0.0.236/trunk@51892 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 22:43:25 +00:00
pinkerton%netscape.com
ae7c4c1605 File Removed.
git-svn-id: svn://10.0.0.236/trunk@51891 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 22:38:54 +00:00
pinkerton%netscape.com
884c5020ad use new chrome idl project instead of generated header file (r=hyatt).
git-svn-id: svn://10.0.0.236/trunk@51890 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 22:38:40 +00:00
pinkerton%netscape.com
3ef9a724a2 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@51889 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 22:37:45 +00:00
slamm%netscape.com
50be5003d6 Add entity for bookmarks menu on personal toolbar
git-svn-id: svn://10.0.0.236/trunk@51888 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 22:10:15 +00:00
varada%netscape.com
2c49380653 fixes for bug #8977 9097
git-svn-id: svn://10.0.0.236/trunk@51887 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 22:07:57 +00:00
valeski%netscape.com
89e72a3976 fixing bustage
git-svn-id: svn://10.0.0.236/trunk@51886 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 22:07:50 +00:00
jj%netscape.com
699e8eca27 File Removed.
git-svn-id: svn://10.0.0.236/trunk@51885 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 21:53:43 +00:00
dougt%netscape.com
d11e61e41f People will not like to see my debugging info about object retention. Remov
ing #define.


git-svn-id: svn://10.0.0.236/trunk@51884 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 21:44:02 +00:00
brade%netscape.com
f6a4506783 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@51883 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 21:27:05 +00:00
terry%mozilla.org
02502d0c41 Fixed perl warning.
git-svn-id: svn://10.0.0.236/trunk@51882 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 21:14:01 +00:00
varada%netscape.com
abe68f9fc4 fixing string.ini for online help from show example
git-svn-id: svn://10.0.0.236/trunk@51881 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 21:13:16 +00:00
varada%netscape.com
c1d12e4258 fixing checklist.ini for online help
git-svn-id: svn://10.0.0.236/trunk@51880 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 21:12:56 +00:00
varada%netscape.com
ff6e49dbb9 fix for bug#10810 if Help=Online;url is included in the ini file then the online help is launched with that url
git-svn-id: svn://10.0.0.236/trunk@51879 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 21:10:39 +00:00
valeski%netscape.com
f94df2ee59 17270, r=dougt@netscape.com. These changes move FTP from interface pointers to COMptrs. There is also a variable name change, mUrl -> mURL. Also some extraneous pipe code has been removed.
git-svn-id: svn://10.0.0.236/trunk@51878 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 20:55:50 +00:00
mstoltz%netscape.com
c48a5396a0 Fixed Windows breakage from converting const nsZIpItem* to nsZipItem*. r=dveditz
git-svn-id: svn://10.0.0.236/trunk@51877 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 20:45:21 +00:00
mscott%netscape.com
a29d572364 Bug #14928 -- > url dispatching. Change DoContent to return a stream listener instead of
a nsIContentViewer.
r=travis


git-svn-id: svn://10.0.0.236/trunk@51876 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 20:35:21 +00:00
rogerl%netscape.com
1aa494ee2b Changed from pic to PIC for Solaris build per Vishy.
git-svn-id: svn://10.0.0.236/trunk@51875 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 20:34:55 +00:00
pinkerton%netscape.com
9cbdc1b888 add case for unicode flavor, which i guess was forgotten before. now apps that request unicode get unicode. bug# 16267 r=hyatt/pav. thanks to VYV03354@nifty.ne.jp for pointing this out.
git-svn-id: svn://10.0.0.236/trunk@51874 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 20:33:30 +00:00
pinkerton%netscape.com
3490b579c3 Cleaned up the code and fixed a bug where data was not being null terminated on winNT.
partial fix for bug #16267 (r=hyatt/pav).


git-svn-id: svn://10.0.0.236/trunk@51873 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 20:31:54 +00:00
ftang%netscape.com
4c6ccd7e59 change #ifdef DEBUG_tague to #if defined(DEBUG_tague) || defined(DEBUG_ftang)
git-svn-id: svn://10.0.0.236/trunk@51872 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 20:17:36 +00:00
nhotta%netscape.com
643eb34912 Unicode encoder related change for unmapped characters.
If unicode encoder cannot map a character to the target encoding, it returns used unicode length including the unmapped character.
That is true for all encoder except ISO-2022-JP (bug #15706). Changed the callers to match the encoder behavior. bug 8865, r=cata.


git-svn-id: svn://10.0.0.236/trunk@51871 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 20:16:11 +00:00
ftang%netscape.com
a72076d654 fix IME assertion problem . r=jfrancis
git-svn-id: svn://10.0.0.236/trunk@51870 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 20:04:47 +00:00
putterman%netscape.com
8189fffdfb No bug. reviewed by bienvenu. OnKeyDeleted wasn't sending the correct parent
thread value because the message was being deleted before we saved off the parent.


git-svn-id: svn://10.0.0.236/trunk@51869 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 19:52:20 +00:00
slamm%netscape.com
861592dd89 Tweak sidebar styles. r=german.
git-svn-id: svn://10.0.0.236/trunk@51868 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 19:45:25 +00:00
dougt%netscape.com
f769dc5560 merging FILESEP and DIRECTORY_SEPARATOR. they both do the same thing.
git-svn-id: svn://10.0.0.236/trunk@51867 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 19:45:18 +00:00
slamm%netscape.com
595ab124a0 Use real separator on personal toolbar menus. r=hyatt
git-svn-id: svn://10.0.0.236/trunk@51866 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 19:44:22 +00:00
slamm%netscape.com
7d6ce80686 Add bookmarks button (bug #14502) to personal toolbar. Fix spacing of buttons on personal toolbar. r=hyatt
git-svn-id: svn://10.0.0.236/trunk@51865 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 19:43:32 +00:00
mstoltz%netscape.com
ea05167e43 Added GetInputStream function to nsJAR in order to extract files into memory rather than to disk. Created nsJARInputStream to carry this data. Most of the code for this change went into nsZipArchive, which now handles either file output or output to memory. bug=16077 r=dveditz
git-svn-id: svn://10.0.0.236/trunk@51864 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 19:43:26 +00:00
dougt%netscape.com
94bbe207a4 Cleanup.
Removing convertTo* routines

Not hooked up to build yet.


git-svn-id: svn://10.0.0.236/trunk@51863 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 19:34:56 +00:00
dougt%netscape.com
c10be2aa21 1) Change ownership model internally. (17009)
2) Fixed IMAP password dialog problems by adding a PR_SLEEP() in
   nested event loop.
3) Now using a pushed event loop.

r=valeski, mscott.


git-svn-id: svn://10.0.0.236/trunk@51862 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 19:30:50 +00:00
valeski%netscape.com
6f9e12e047 17144. api change to nsIIOService.idl made last night missed the javascript caller in here
git-svn-id: svn://10.0.0.236/trunk@51861 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 19:08:10 +00:00
nhotta%netscape.com
b6cdf6cb47 Added charset propertiy files so the charset conversion to work properly (for win and mac, unix didn't have the problem), 17254, r=ftang.
git-svn-id: svn://10.0.0.236/trunk@51860 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 19:06:41 +00:00
jfrancis%netscape.com
bb138b3c5c reworking editor IME supoprt; r=kin; bugs: 13576, 11878, 11994, 13494, 16432
git-svn-id: svn://10.0.0.236/trunk@51859 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 18:54:47 +00:00
rhp%netscape.com
b4e2e646cf Just adding new files...NOT PART OF THE BUILD!
git-svn-id: svn://10.0.0.236/trunk@51858 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 18:50:08 +00:00
despotdaemon%netscape.com
cceb1924b6 Pseudo-automatic update of changes made by mcs@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@51857 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 17:55:28 +00:00
norris%netscape.com
e544596aa2 Remove method duplication in NativeGlobal.
Add javadoc comments to EcmaError.


git-svn-id: svn://10.0.0.236/trunk@51856 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 17:22:23 +00:00
norris%netscape.com
9be2ae4e35 Get filename and line number into uncaught exception reports.
git-svn-id: svn://10.0.0.236/trunk@51855 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 17:06:12 +00:00
slamm%netscape.com
0f3c71a001 Need path to gunzip. This should be configured.
git-svn-id: svn://10.0.0.236/trunk@51854 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 16:56:00 +00:00
terry%mozilla.org
4f2f6dae6d Update version to 1.3 (which means unstable, tip-of-CVS version).
git-svn-id: svn://10.0.0.236/trunk@51853 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 15:49:58 +00:00
terry%mozilla.org
8f7faa2f78 Fixed perl error caused by previous change.
git-svn-id: svn://10.0.0.236/trunk@51852 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 15:48:25 +00:00
terry%mozilla.org
abfa77727b Make version number be 1.2, we will be spinning a tarball.
git-svn-id: svn://10.0.0.236/trunk@51850 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 15:37:12 +00:00
vidur%netscape.com
1291c59ad4 Replaced delete operator calls with Recycle(). R=joki
git-svn-id: svn://10.0.0.236/trunk@51849 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 14:56:41 +00:00
vidur%netscape.com
252d9255a6 Switched HTML content sink to be more incremental in content creation. Fixes bugs 11141, 854, et. al. R=kipp
git-svn-id: svn://10.0.0.236/trunk@51848 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 14:55:51 +00:00
dcone%netscape.com
73c37400ce Added a clip for the borders and fixed how they are rendered. r=karnaze
bugs:10311,8737,14566


git-svn-id: svn://10.0.0.236/trunk@51847 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 14:34:17 +00:00
rods%netscape.com
e181f8b3fa addedmore tests
git-svn-id: svn://10.0.0.236/trunk@51846 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 14:16:15 +00:00
rods%netscape.com
6c5ee72d6b initial add
git-svn-id: svn://10.0.0.236/trunk@51845 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 14:15:51 +00:00
rods%netscape.com
aaced0b882 The button "active" state needed one more pixel width in the border
r=dcone,b=17154


git-svn-id: svn://10.0.0.236/trunk@51844 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 14:05:49 +00:00
warren%netscape.com
7230bc55ee Fixed NewChannel to pass null for new originalURL argument.
git-svn-id: svn://10.0.0.236/trunk@51843 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 10:37:37 +00:00
hyatt%netscape.com
2d7de08a49 more stubbing out of dynamic overlays r=pavlov
git-svn-id: svn://10.0.0.236/trunk@51842 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 10:03:13 +00:00
tbogard%aol.net
ca83b4534f Added a CanHandleContentType to identify if a given instantiated docShell can handle the requested document type.
git-svn-id: svn://10.0.0.236/trunk@51841 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 09:51:36 +00:00
warren%netscape.com
b9f22ce6f8 Fixed missed change to NewInputStreamChannel
git-svn-id: svn://10.0.0.236/trunk@51840 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 09:51:01 +00:00
warren%netscape.com
fe1c294273 Added nsIChannel::GetOriginalURI so that we can get back to the original chrome file (bug#17144). r=rpotts,mscott
git-svn-id: svn://10.0.0.236/trunk@51839 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 09:16:24 +00:00
endico%mozilla.org
7ecb2f45fd make the grep for server error not so noisy 2>&1
git-svn-id: svn://10.0.0.236/trunk@51838 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 08:37:07 +00:00
hyatt%netscape.com
1ca2484933 change from strings to URIs r=pavlov
git-svn-id: svn://10.0.0.236/trunk@51837 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 08:21:32 +00:00
hyatt%netscape.com
f54d64efad stubbing out dynamic overlay loading and converting chrome registry to IDL r=pavlov
git-svn-id: svn://10.0.0.236/trunk@51836 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 08:13:25 +00:00
mscott%netscape.com
2e56fd5c66 Bug #14928 --> url dispatching. convert nsIContentHandler.idl, nsIURIDispatcher.idl and nsIContentListener.idl
into .h files.
no reviewer yet. the code review for url dispatching will come later.


git-svn-id: svn://10.0.0.236/trunk@51835 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 07:11:44 +00:00
mscott%netscape.com
bd9b666efc Bug #14928 --> first pass at several key interfaces for url dispatching.
Not part of the build and no reviewer yet. The review will come later on when we review url dispatching


git-svn-id: svn://10.0.0.236/trunk@51834 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 07:10:27 +00:00
slamm%netscape.com
a174cc125d New sidebar ui. One panel open at a time. No bug (yet...). r=pavlov
git-svn-id: svn://10.0.0.236/trunk@51832 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 05:46:00 +00:00
ramiro%fateware.com
2f58cc8fd3 Fix the invocation of regxpcom.
git-svn-id: svn://10.0.0.236/trunk@51831 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 05:42:33 +00:00
rpotts%netscape.com
58b6be1d08 Cleanup - changed setter/getter methods to an attribute.
git-svn-id: svn://10.0.0.236/trunk@51830 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 04:49:56 +00:00
rpotts%netscape.com
4c6919a678 Added CancelPendingChannel(...) which allows a nsHTTPChannel to remove itself from the list of pending requests if it is cancelled... This was causing a leak :-(
git-svn-id: svn://10.0.0.236/trunk@51829 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 04:49:23 +00:00
rpotts%netscape.com
1d93a7a7ae Cleanup - Moved the PostData stream from the nsHTTPChannel to the nsHTTPRequest... The PostStream is now released once the request has been sent to the server since it is no longer useful. Fixed up Cancel to remove the channel from the list of pending requests if necessary.
git-svn-id: svn://10.0.0.236/trunk@51828 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 04:48:26 +00:00
rpotts%netscape.com
dc04d4b53b Cleanup - Removed NSPIPE2 ifdefs. Fixed up the nsHTTPResponse constructor which no longer takes a nsIInputStream.
git-svn-id: svn://10.0.0.236/trunk@51827 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 04:45:03 +00:00
troy%netscape.com
bd46e7911f Changed SetView/GetView to take an additional argument which is the
pres context


git-svn-id: svn://10.0.0.236/trunk@51822 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 04:44:41 +00:00
rpotts%netscape.com
a3b472c211 Cleanup - Removed unused methods and members. Changed char* member to nsCString
git-svn-id: svn://10.0.0.236/trunk@51821 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 04:43:19 +00:00
rods%netscape.com
3c48aa841c minor changes to previous checkin to handle css sizing like NavQuirks
b=6695,r=none


git-svn-id: svn://10.0.0.236/trunk@51820 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 04:29:20 +00:00
mcafee%netscape.com
3b76676f40 Moved process killing stuff into killproc(), added alarm timeout for bloattest. code=alecf, r=mcafee
git-svn-id: svn://10.0.0.236/trunk@51819 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 04:07:03 +00:00
rods%netscape.com
8aef13e868 Completely rewrote the the Reflow for gfx text controls, factored out separate
reflow paths for NavQuirks and Standard mode. Also, Standard mode reflow now obeys
cols rows etc. Although there may be a little code bloat, this will make maintaining
the input text and textarea much much easier.
r=kmcclusk, b=6695,7461


git-svn-id: svn://10.0.0.236/trunk@51818 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 03:46:18 +00:00
pollmann%netscape.com
052a729260 Bug 17079: URL encoding of form element values should convert + to %2B and / as needed: r=nisheeth
git-svn-id: svn://10.0.0.236/trunk@51817 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 03:08:17 +00:00
morse%netscape.com
4b5a4b8e5d code cleanup, r=rickg
git-svn-id: svn://10.0.0.236/trunk@51816 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 02:46:34 +00:00
nisheeth%netscape.com
aea3ade8fe Follow-up to fix for bug 10456. I made the earlier changes to the non-Necko part of the code! Making the same changes to the ifdef NECKO part.
git-svn-id: svn://10.0.0.236/trunk@51815 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 02:42:23 +00:00
tbogard%aol.net
2e96f47e2e Changed nsIProgress::addListener and nsIWebBrowser::addListener to be addProgressListener and addWebBrowserListener respectively. This is to avoid confusing name conflicts. Implemented nsIWebBrowser::GetDocument() and nsIWebBrowser::GetDocShell().
git-svn-id: svn://10.0.0.236/trunk@51814 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 02:37:14 +00:00
tbogard%aol.net
254fe24a86 Removed nsIWebBrowserListener in favor of the new more generic nsIInterfaceRequestor. Added some interface boundary parameter validation. Added implementation for add and remove listener.
git-svn-id: svn://10.0.0.236/trunk@51813 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 02:26:57 +00:00
tbogard%aol.net
566e36cc10 Added some documentation.
git-svn-id: svn://10.0.0.236/trunk@51812 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 02:23:38 +00:00
sgehani%netscape.com
499a258aa7 Fixes bug 11209: we now detect free space larger than 2^32 bytes in the Install Wizard. [r=cathleen]
git-svn-id: svn://10.0.0.236/trunk@51811 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 02:12:00 +00:00
sgehani%netscape.com
95d88cbf7b Fixes bug 17190: extract only core_*/* files to obtain the XPInstall engine run by the Install Wizard. [r=cathleen]
git-svn-id: svn://10.0.0.236/trunk@51810 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 02:08:56 +00:00
wtc%netscape.com
f8f5eb822d Added missing function declarations to eliminate compiler warnings.
Checked in on behalf of Colin Blakes <colin@theblakes.com>.


git-svn-id: svn://10.0.0.236/trunk@51809 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 02:01:38 +00:00
nisheeth%netscape.com
aef9243c78 Bugs 10456, 15027, 11948. r=harishd. We no longer try to load up external DTD files unless those DTD files are referred to via a chrome url.
git-svn-id: svn://10.0.0.236/trunk@51808 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 01:58:41 +00:00
wtc%netscape.com
be5e5badd8 Bugzilla bug #17184: PR_Bind should not set the SO_REUSEADDR socket
option.  The HAVE_SOCKET_REUSEADDR macro is now obsolete.  Tests
that depended on the old PR_Bind behavior needs to call PR_SetSocketOption
before PR_Bind.
Modified files: _beos.h, _os2.h, _unixos.h, _win16.h, _win95.h, _winnt.h,
prsocket.c, ptio.c, accept.c, acceptread.c, sel_spd.c, servr_kk.c,
servr_ku.c, servr_uk.c, and servr_uu.c.


git-svn-id: svn://10.0.0.236/trunk@51807 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 01:58:10 +00:00
pavlov%netscape.com
bca7914d4c merge some changes that got dropped somehow during the landing r=hyatt
git-svn-id: svn://10.0.0.236/trunk@51806 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 01:54:39 +00:00
tbogard%aol.net
67f77212c6 Updated to use new nsDocShellBase class. Removed a bunch of code from this level so it instead can be pulled from the base class.
git-svn-id: svn://10.0.0.236/trunk@51802 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 01:46:22 +00:00
tbogard%aol.net
2541c54b1d Added basedocshell library to the list of bound libraries.
git-svn-id: svn://10.0.0.236/trunk@51801 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 01:45:11 +00:00
tbogard%aol.net
97c0df855a Created a base class library that will provide the shared docShell implmentation.
git-svn-id: svn://10.0.0.236/trunk@51800 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 01:44:00 +00:00
slamm%netscape.com
10813277ec Fix typo.
git-svn-id: svn://10.0.0.236/trunk@51799 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 01:40:23 +00:00
tbogard%aol.net
04e0ba7204 added files: mozilla/xpcom/base/nsIInterfaceRequestor.idl
git-svn-id: svn://10.0.0.236/trunk@51798 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 01:37:45 +00:00
tbogard%aol.net
67b737d3e4 Adding nsIInterfaceRequestor.idl to the list of built IDL files.
git-svn-id: svn://10.0.0.236/trunk@51797 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 01:37:29 +00:00
waqar%netscape.com
17e91e8ab8 # 15904
r vidur
d fixes a problem where first character of the comment was being destroyed.


git-svn-id: svn://10.0.0.236/trunk@51796 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 01:30:55 +00:00
edburns%acm.org
4dcff0c574 r=edburns@acm.org
author=idk@eng.sun.com
#16149
approver=edburns@acm.org


git-svn-id: svn://10.0.0.236/trunk@51795 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 01:29:09 +00:00
mccabe%netscape.com
0683dd99f5 Initial checkin of mozbot code-reviewing functionality.
git-svn-id: svn://10.0.0.236/trunk@51794 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 01:22:00 +00:00
Jerry.Kirk%Nexwarecorp.com
d6610d45df Trying to fix complex clipping to reduce redraws in apprunner.
Also fixed key handling for CTRL-keys.
r=kedl


git-svn-id: svn://10.0.0.236/trunk@51793 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 01:13:20 +00:00
scc%netscape.com
6f74b3fb2f Don't |delete| interface pointers. Use |AddRef()| and |Release()| instead. Bug #16762, r=pinkerton.
git-svn-id: svn://10.0.0.236/trunk@51792 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 00:49:33 +00:00
Jerry.Kirk%Nexwarecorp.com
18c97ff34d Fixing problem with &nbsp; being put into empty text fields
This is relly more of a hack, not a fix.
Bug 16886	r=kedl


git-svn-id: svn://10.0.0.236/trunk@51791 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 00:45:24 +00:00
Jerry.Kirk%Nexwarecorp.com
b7f540b9f2 Pulling out changes that made nsAppShell inherit from nsIObserver
that danm thought I should make cause he changed his mind.
r=kedl


git-svn-id: svn://10.0.0.236/trunk@51790 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 00:42:08 +00:00
hangas%netscape.com
08883ca9a8 new ui. r=pavlov,german,hyatt
git-svn-id: svn://10.0.0.236/trunk@51789 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 00:39:19 +00:00
sgehani%netscape.com
7eccb655b3 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@51788 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 00:35:41 +00:00
sgehani%netscape.com
bf1287cb0c *** NOT PART OF BUILD ***
Added ASEncoder tool -- AppleSingle encoder and decoder -- with two interfaces: 

1> Menu and file selector based GUI
2> AppleScript interface (or callable from any OSA compliant scriptable component)

Fixes bug: 16947.


git-svn-id: svn://10.0.0.236/trunk@51787 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 00:34:40 +00:00
pinkerton%netscape.com
a5ef534d81 fix leak of grippy structs when toolbox went away. (r=bienvenu).
git-svn-id: svn://10.0.0.236/trunk@51786 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 00:22:48 +00:00
ducarroz%netscape.com
6d43e18270 Checking it again as for reason, the file I've checked in last time is corrupted.
git-svn-id: svn://10.0.0.236/trunk@51785 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 00:16:33 +00:00
jefft%netscape.com
002757422d fixed bug 17176 -- [DOGFOOD] [Reqression] Can't save attachment; we are not generating message uri correctly; r=mscott
git-svn-id: svn://10.0.0.236/trunk@51784 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 00:07:27 +00:00
bienvenu%netscape.com
b361c28994 turn off meteors and spinning barber pole for now r=mscott
git-svn-id: svn://10.0.0.236/trunk@51783 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 23:45:19 +00:00
ssu%netscape.com
719cf747d3 updated/added/removed install error values to accomodate the fileop
routines checked in over the weekend. r=sgehani.


git-svn-id: svn://10.0.0.236/trunk@51782 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 23:44:09 +00:00
ducarroz%netscape.com
e45bf9a654 Fix build bustage for nhotta
git-svn-id: svn://10.0.0.236/trunk@51781 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 23:29:24 +00:00
nhotta%netscape.com
bcc540225b Changed unicode conversion for mail send.
Added a fallback for unmapped characters, moved entity conversion after the unicode conversion as the fallback, avoided to convert twice for text/html case, part of bug fix 15475, r=rhp.


git-svn-id: svn://10.0.0.236/trunk@51780 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 23:21:30 +00:00
ssu%netscape.com
879c9f145f fixed parameter problem during compilation for sgehani. r=sgehani
git-svn-id: svn://10.0.0.236/trunk@51779 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 23:16:46 +00:00
kipp%netscape.com
3cbf0c252a Added missing resources
git-svn-id: svn://10.0.0.236/trunk@51778 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 23:06:05 +00:00
sgehani%netscape.com
32a0978c7e Fix for bug 17137: added complete and abort routines for mac alias creation XPInstall API. [r=ssu]
git-svn-id: svn://10.0.0.236/trunk@51777 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 23:05:44 +00:00
kipp%netscape.com
60ea075c3f Reduce the number of cases that trigger noisy debug noise
git-svn-id: svn://10.0.0.236/trunk@51776 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 23:05:31 +00:00
kipp%netscape.com
dfe78df5d9 Turned off some more debug noise
git-svn-id: svn://10.0.0.236/trunk@51775 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 23:05:15 +00:00
kipp%netscape.com
4bb755ead2 r=ftang,brade, bug=16886,9101 - the text transformer was letting some nbsp's through in a few special cases; the text transformer also squelches shy characters now (9101)
git-svn-id: svn://10.0.0.236/trunk@51774 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 23:04:51 +00:00
kipp%netscape.com
ae6b64e566 r=troy, bug=10497; we now support min/max width/height for image elements
git-svn-id: svn://10.0.0.236/trunk@51773 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 23:03:50 +00:00
kipp%netscape.com
df248f10b1 Quieted down some debug noise and added a missing newline to a printf
git-svn-id: svn://10.0.0.236/trunk@51772 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 23:02:43 +00:00
law%netscape.com
6f73e6604a Bug #14999; last holdout that was using toolkit app core - changed to use OpenDialog; r=davidm@netscape.com
git-svn-id: svn://10.0.0.236/trunk@51771 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 23:02:05 +00:00
dougt%netscape.com
11d905c2a9 ack! what was I thinking.
#ifdef'ing not including!!


git-svn-id: svn://10.0.0.236/trunk@51770 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:57:40 +00:00
morse%netscape.com
8bd629f104 fix bug 17172 -- wrong cookie is displayed, r=goodsger
git-svn-id: svn://10.0.0.236/trunk@51769 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:56:24 +00:00
kmcclusk%netscape.com
9bb05775e0 Register nsFormProcessor service to exercise nsIFormProcessor interface.
bug 17060. r=karnaze@netscape.com


git-svn-id: svn://10.0.0.236/trunk@51768 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:54:12 +00:00
karnaze%netscape.com
f98a03f3ac bug 16284, 14159 nested auto table with percent cells was not growing auto table. nested coord or percent table was only getting min size.
git-svn-id: svn://10.0.0.236/trunk@51767 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:49:51 +00:00
dougt%netscape.com
bb554f06d2 adding nsIFile to nsXPComInit. Currently it is #ifdef'ed off.
bug 13320


git-svn-id: svn://10.0.0.236/trunk@51766 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:48:44 +00:00
kmcclusk%netscape.com
2f7a2a20da Call nsIFormProcessor service if it has been registered for each value submitted.
bug=17060 r=karnaze@netscape.com


git-svn-id: svn://10.0.0.236/trunk@51765 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:48:43 +00:00
dougt%netscape.com
49cd195acc changed license.
git-svn-id: svn://10.0.0.236/trunk@51764 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:45:56 +00:00
dougt%netscape.com
ea0c601803 Initial checkin of nsIFile test. bug 13320. r=dougt
Not hooked up to build, yet.


git-svn-id: svn://10.0.0.236/trunk@51763 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:45:12 +00:00
dougt%netscape.com
a2ec5f969a Initial checkin of nsIFile windows implementation. bug 13320. r=dougt
Not hooked up to build, yet.


git-svn-id: svn://10.0.0.236/trunk@51762 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:44:42 +00:00
akhil.arora%sun.com
bb01f7852c 15579 r=akhil.arora@sun.com Checkin by Igor Nekrestyanov <nis@sparc.spb.su>
Implementation of DOM Events from the W3c DOM Level 2 current working draft


git-svn-id: svn://10.0.0.236/trunk@51761 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:42:40 +00:00
dougt%netscape.com
6c8ce03672 adding a progID and className. r=me.
NOT PART OF THE BUILD, YET


git-svn-id: svn://10.0.0.236/trunk@51760 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:33:55 +00:00
dougt%netscape.com
6839959ccf Change net module notification to make proxies lazy. r=dveditz, mozbot.
This reduces memory overhead.


git-svn-id: svn://10.0.0.236/trunk@51759 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:31:59 +00:00
tbogard%aol.net
ae51cb2bce Added new nsIInterfaceRequestor interface. r=dp
git-svn-id: svn://10.0.0.236/trunk@51758 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:31:40 +00:00
law%netscape.com
168d68ed9c Bug #14999; use OpenDialog instead of toolkit app core; r=radha@netscape.com
git-svn-id: svn://10.0.0.236/trunk@51757 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:30:40 +00:00
kmcclusk%netscape.com
64e09df2b9 Export nsIFormProcessor.h on Mac. bug=17060; r=karnaze@netscape.com
git-svn-id: svn://10.0.0.236/trunk@51756 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:29:22 +00:00
norris%netscape.com
a6a5735f6c Fix 11963 Need security controls on javascript: urls
r=mstoltz@netscape.com


git-svn-id: svn://10.0.0.236/trunk@51755 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:23:25 +00:00
norris%netscape.com
68023d9210 Use NS_GET_IID, remove dead code, clean up error conditions for XPConnect security calls.
r=jband


git-svn-id: svn://10.0.0.236/trunk@51754 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:22:16 +00:00
norris%netscape.com
2c73987122 Expose referrer from web shell.
r=travis
needed for bug 11963.


git-svn-id: svn://10.0.0.236/trunk@51753 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:20:10 +00:00
ftang%netscape.com
80f773ac31 fix not enough gap between IME selection problem. r=erik
git-svn-id: svn://10.0.0.236/trunk@51752 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:18:41 +00:00
ftang%netscape.com
13ed9a026b delete nsTextRange array after dispatch the text event. fix wrong array indexing. Fix platform to NS attribute mapping problem. r=tague
git-svn-id: svn://10.0.0.236/trunk@51751 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:17:09 +00:00
rods%netscape.com
2c0b3223a2 Export nsIFormProcessor.h on Linux. bug=17060 r=karnaze@netscape.com
git-svn-id: svn://10.0.0.236/trunk@51750 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:14:21 +00:00
rhp%netscape.com
a2e9eb0c8e Fix for extra conversion - r: nhotta
git-svn-id: svn://10.0.0.236/trunk@51749 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:13:39 +00:00
akkana%netscape.com
b3f6f6906c 15463: Re-enable XIM code, add keycode mappings for shifted characters
git-svn-id: svn://10.0.0.236/trunk@51748 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:11:23 +00:00
putterman%netscape.com
2a9fdcf10a Fixes 12894. Messages show up bold again if they are unread. reviewed by bienvenu.
git-svn-id: svn://10.0.0.236/trunk@51747 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:10:32 +00:00
alecf%netscape.com
6436fc3afa fix for #17187 - return NS_RDF_NO_VALUE when any particular GetTarget() calls fail
r=bienvenu


git-svn-id: svn://10.0.0.236/trunk@51746 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:09:07 +00:00
kmcclusk%netscape.com
cee3171b28 Removed build warning caused by overloaded GetDesiredSize. bug=15575. r=buster@netscape.com
git-svn-id: svn://10.0.0.236/trunk@51745 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:06:41 +00:00
nhotta%netscape.com
58f8c6d8d9 Added MsgUtil.lib and MsgUtilDebug.lib to the project, part of bug fix 15475.
git-svn-id: svn://10.0.0.236/trunk@51744 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:04:23 +00:00
nhotta%netscape.com
b5fc1e2670 Changed MIME header encoder in unicode conversion. Instead of skipping unmapped characters,
call the fallback funcion (puts a question mark for an unmapped char), part of bug fix 15475, r=rhp.


git-svn-id: svn://10.0.0.236/trunk@51743 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:03:09 +00:00
putterman%netscape.com
c473237102 Fix 17107. A bunch of view navigation bugs. Reviewed by bienvenu. It fixes:
1.  Next message with no selection finds the next message
2.  It no longer redisplays current message if Next Message finds no next message.
3.  Next/Previous message works if last/first message is selected.


git-svn-id: svn://10.0.0.236/trunk@51742 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:02:58 +00:00
kmcclusk%netscape.com
3a21a346ef Export nsIFormProcessor.h. bug=17060. r=karnaze@netscape.com
git-svn-id: svn://10.0.0.236/trunk@51741 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 22:01:19 +00:00
kmcclusk%netscape.com
389e1be499 First time checked in. Used to provide data during form submission. bug 17060. r=karnaze@netscape.com
git-svn-id: svn://10.0.0.236/trunk@51740 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 21:59:39 +00:00
brade%netscape.com
b77f113bda fix plain text editor (r=cmanske@netscape.com)
git-svn-id: svn://10.0.0.236/trunk@51739 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 21:57:11 +00:00
brade%netscape.com
56be896120 fix plain text editor (r=cmanske@netscape.com, jfrancis@netscape.com)
git-svn-id: svn://10.0.0.236/trunk@51738 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 21:56:37 +00:00
nisheeth%netscape.com
427d3f559c Ongoing work to get macros for timing modules up and running. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@51737 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 20:59:35 +00:00
jefft%netscape.com
86ba1460c9 fixed bug 17179 -- [dogfood] [BLOCKER] Sending a message does not work; escape the recipient list fixes the problem; r=mscott, a=granrose
git-svn-id: svn://10.0.0.236/trunk@51735 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 20:17:01 +00:00
brendan%mozilla.org
b3a1017637 - Chouck's changes to grow a JSIdArray if necessary in JS_Enumerate, with my
code review and fixes (r=chouck@geocast.com).  He needs this cuz he has no
  knowledge of exact number of properties before new-style enumerating them.
- Patch up jsdbgapi.c a bit -- it needs to use OBJ_GET_ATTRIBUTES and new APIs
  to do a better job describing properties to a debugger.
- Add JSMSG_CANT_DESCRIBE_PROPS for bogus non-native error case in jsdbgapi.c.
- Fix "Inappropriate" => "invalid" in JSMSG_BAD_ARRAY_LENGTH message.


git-svn-id: svn://10.0.0.236/trunk@51734 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 19:24:03 +00:00
wtc%netscape.com
50b0c89090 Bugzilla bug #17093: made plevent.c independent of any internal NSPR
headers (primpl.h in particular).  Tested on Linux, Solaris, Win32,
and Mac. r=srinivas@netscape.com
Modified files: lib/ds/Makefile, lib/ds/Makefile.in, lib/ds/plevent.c


git-svn-id: svn://10.0.0.236/trunk@51733 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 19:20:58 +00:00
rhp%netscape.com
b8a92b1146 Fix for composition quoting and cleanup for dogfood - Bug# 16703 16907 7518 - r: bienvenu
git-svn-id: svn://10.0.0.236/trunk@51732 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 19:04:56 +00:00
rhp%netscape.com
2624eb5719 Fix for attachments not visible and display crashers - Bug #: 16367 16786 - r: bienvenu
git-svn-id: svn://10.0.0.236/trunk@51731 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 19:02:39 +00:00
slamm%netscape.com
3ea969fa03 Need double quotes instead of single quotes to get variable values (fix bloat.pl).
git-svn-id: svn://10.0.0.236/trunk@51730 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 18:02:06 +00:00
norris%netscape.com
10dca74c3e Add contributors.
git-svn-id: svn://10.0.0.236/trunk@51729 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 17:52:48 +00:00
norris%netscape.com
32c0c98b21 Add license text.
git-svn-id: svn://10.0.0.236/trunk@51728 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 17:41:49 +00:00
norris%netscape.com
0034cf42f1 Add license boilerplate.
git-svn-id: svn://10.0.0.236/trunk@51727 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 17:36:20 +00:00
slamm%netscape.com
c6ce018a7f Need to 'require' treedata.pl to get warnings and bloat pattern strings.
git-svn-id: svn://10.0.0.236/trunk@51726 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 17:31:39 +00:00
norris%netscape.com
72dc3d0896 Should get ReferenceError exception for name not found.
git-svn-id: svn://10.0.0.236/trunk@51723 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 16:41:24 +00:00
norris%netscape.com
f8261501a4 Add contributors.
git-svn-id: svn://10.0.0.236/trunk@51722 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 16:40:30 +00:00
pavlov%netscape.com
36aeea55b5 don't install registry.rdf r=ramiro
git-svn-id: svn://10.0.0.236/trunk@51718 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 14:57:24 +00:00
pavlov%netscape.com
e70752a644 makefile changes for the Editor to editor.css change r=hyatt,ramiro
git-svn-id: svn://10.0.0.236/trunk@51717 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 14:56:35 +00:00
kin%netscape.com
d9ba7b42e8 Fix for bug #16701: Editor API Log playback of Insert HRule crashes in DOM code
and     bug #16848: DOM Crash
  - Removed extra NS_RELEASE(attrPrivate) call that was releasing
    attrPrivate one too many times, and causing nsDOMAttributeMap::SetNamedItem() to crash.
r=vidur@netscape.com


git-svn-id: svn://10.0.0.236/trunk@51716 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 14:15:34 +00:00
morse%netscape.com
abe3c3c6c8 fixed typos, no code review
git-svn-id: svn://10.0.0.236/trunk@51715 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 13:13:48 +00:00
rods%netscape.com
8df8f94df3 added some more tests
git-svn-id: svn://10.0.0.236/trunk@51714 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 13:03:47 +00:00
duncan%be.com
5cabd411f1 Fix build under BeOS. r=dveditz
git-svn-id: svn://10.0.0.236/trunk@51713 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 06:22:43 +00:00
nisheeth%netscape.com
341cd407a6 Macros for doing performance analysis of modules in Mozilla. This file is not part of the build yet.
git-svn-id: svn://10.0.0.236/trunk@51712 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 05:29:20 +00:00
varada%netscape.com
70051f68b3 clearing up some code
git-svn-id: svn://10.0.0.236/trunk@51711 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 05:14:12 +00:00
tbogard%aol.net
58ff9e6cc4 Added build directory to build a DLL for various docShells.
git-svn-id: svn://10.0.0.236/trunk@51710 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 04:53:13 +00:00
tbogard%aol.net
34c9d3fa3e Clarified some documentation.
git-svn-id: svn://10.0.0.236/trunk@51709 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 04:51:59 +00:00
tbogard%aol.net
4cab253cb0 Fixed a Caps problem.
git-svn-id: svn://10.0.0.236/trunk@51708 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 04:51:15 +00:00
tbogard%aol.net
14fc92dac1 Framed out the nsHTMLDocShell implementation. Setup to build a library.
git-svn-id: svn://10.0.0.236/trunk@51707 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 04:50:22 +00:00
tbogard%aol.net
671fe34afb Defined what nsCHTMLDocShell implements and included the appropriate header files.
git-svn-id: svn://10.0.0.236/trunk@51706 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 04:48:14 +00:00
karnaze%netscape.com
46cade08ac bug 5799 - considers percentage width of multiple cells when figuring width of auto table.
git-svn-id: svn://10.0.0.236/trunk@51705 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 04:34:28 +00:00
karnaze%netscape.com
18a5e00d6a new regression tests
git-svn-id: svn://10.0.0.236/trunk@51704 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 04:30:54 +00:00
tbogard%aol.net
9fa90714c2 Just added support for an NS_IMPL_ISUPPORTS 7 - 10.
git-svn-id: svn://10.0.0.236/trunk@51703 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 03:42:10 +00:00
varada%netscape.com
55871f81f5 fix for bug #17011 create copy (for config)invokes a window with text relevant to copy in it
git-svn-id: svn://10.0.0.236/trunk@51702 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 03:26:48 +00:00
gagan%netscape.com
e14999de24 Added profiling info for measuring performance when doing -all. Test case only.
git-svn-id: svn://10.0.0.236/trunk@51701 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 02:22:30 +00:00
varada%netscape.com
27f90cbea7 fix for bug 16977 - only edit fields showing up in the show summary button
git-svn-id: svn://10.0.0.236/trunk@51700 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 01:54:32 +00:00
dp%netscape.com
5871c388a1 bug# 15513 Removing dlldeps.cpp from RDF unix build. Patch from
waterson r=dp


git-svn-id: svn://10.0.0.236/trunk@51699 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 00:37:24 +00:00
sdagley%netscape.com
737d3b892e Pre-emptive fix for Mac (and possibly some ports) build bustage - if you're going to use a variable to contain a debug output file name it helps if the variable is declared on all platforms the code compiles for.
git-svn-id: svn://10.0.0.236/trunk@51698 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-25 00:29:15 +00:00
rickg%netscape.com
0aa148382a fixed FMM (in debug code); r=kmcclusk
git-svn-id: svn://10.0.0.236/trunk@51697 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 23:48:00 +00:00
mcafee%netscape.com
15b4b203b5 Adding XPCOM_MEM_BLOAT_LOG=1 for RunBloatTest.
git-svn-id: svn://10.0.0.236/trunk@51696 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 22:37:34 +00:00
gagan%netscape.com
bd175bcc62 Fixed bug 15963. Host: headers were not including port numbers. r=mozbot,a=self. (/msg mozbot do these diffs look ok to you? Should I continue with my checkin? <CR> mozbot: That is interesting. Please continue. )
git-svn-id: svn://10.0.0.236/trunk@51695 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 22:20:52 +00:00
warren%netscape.com
c9c3ab2262 Fixed up dll loading for Windows. It was silently failing.
git-svn-id: svn://10.0.0.236/trunk@51694 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 22:01:09 +00:00
dp%netscape.com
ccb30ad195 bug#16742 Fixing delete on nsISupports. Thanks for patch from
<heikki@citec.fi> Plus using IMPL_ and DECL_ macros and removing
operating on refcnt directly. r=troy r=dp


git-svn-id: svn://10.0.0.236/trunk@51693 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 16:19:42 +00:00
tonyr%fbdesigns.com
c9b397be49 Updated address book cls id names that changed
git-svn-id: svn://10.0.0.236/trunk@51692 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 16:09:21 +00:00
rods%netscape.com
5926a49df7 added more tests
git-svn-id: svn://10.0.0.236/trunk@51691 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 16:04:17 +00:00
rods%netscape.com
a16142db50 updated test
git-svn-id: svn://10.0.0.236/trunk@51690 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 15:07:41 +00:00
rods%netscape.com
26d3fe5556 added file
git-svn-id: svn://10.0.0.236/trunk@51689 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 15:07:25 +00:00
rods%netscape.com
6579bbdd80 added more tests
git-svn-id: svn://10.0.0.236/trunk@51688 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 14:05:44 +00:00
ramiro%fateware.com
b15a17bfcb Simplify the package list file.
git-svn-id: svn://10.0.0.236/trunk@51687 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 13:44:34 +00:00
pavlov%netscape.com
185c67ee12 remove registry.rdf r=hyatt
git-svn-id: svn://10.0.0.236/trunk@51686 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 09:57:49 +00:00
pavlov%netscape.com
f346c3e821 fix build problems on linux r=hyatt
git-svn-id: svn://10.0.0.236/trunk@51685 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 09:20:49 +00:00
warren%netscape.com
b9ca6db5fa Fixed logic for XPCOM_MEM_LOG_CLASSES case.
git-svn-id: svn://10.0.0.236/trunk@51684 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 09:13:52 +00:00
hyatt%netscape.com
68f0c59d3a chrome registry can now be dynamically built from RDF fragments t=pavlov
git-svn-id: svn://10.0.0.236/trunk@51683 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 09:00:41 +00:00
hyatt%netscape.com
e3d0859994 making chrome registry not be a single uber datasource anymore r=pavlov
git-svn-id: svn://10.0.0.236/trunk@51682 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 07:27:12 +00:00
rpotts%netscape.com
c275b7fca5 Backing out the fix for bug #15560. This fixes the editor regression - bug #16937
git-svn-id: svn://10.0.0.236/trunk@51681 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 07:26:54 +00:00
pavlov%netscape.com
697deffc1d rename PrefsWindow.xul so that it can be better friends with the chrome registry r=hyatt
git-svn-id: svn://10.0.0.236/trunk@51679 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 07:16:45 +00:00
pavlov%netscape.com
35c3e18a5e rename to be happy with the chrome registry r=hyatt
git-svn-id: svn://10.0.0.236/trunk@51678 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 07:07:04 +00:00
pavlov%netscape.com
17d1767696 renaming file to be consistant with chrome registry
git-svn-id: svn://10.0.0.236/trunk@51677 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 07:00:53 +00:00
hyatt%netscape.com
f44eb6e877 make registry work without needing an rdf datasource r=pavlov
git-svn-id: svn://10.0.0.236/trunk@51676 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 06:59:30 +00:00
hyatt%netscape.com
dd85258734 renaming skin.css to global.css r=pavlov
git-svn-id: svn://10.0.0.236/trunk@51675 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 06:58:38 +00:00
dp%netscape.com
5f7aa39be5 bug#16742 Fixing delete on nsISupports. Thanks for patch from <heikki@citec.fi> Plus using IMPL_ and DECL_ macros and removing operating on refcnt directly. r=dp
git-svn-id: svn://10.0.0.236/trunk@51674 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 04:41:17 +00:00
beard%netscape.com
b500a68477 changed GC_abort() to call ExitToShell() rather than abort(). bug=15906
git-svn-id: svn://10.0.0.236/trunk@51673 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 03:26:10 +00:00
rods%netscape.com
d0c68ca52f Simple changed from COLOR_DESKTOP to COLOR_APPWORKSPACE for appworkspace enum
for css 2 color setting
fixes bug 16853,r=none


git-svn-id: svn://10.0.0.236/trunk@51672 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 03:03:38 +00:00
beard%netscape.com
964164ffe9 removed obsolete access paths. r=sfraser
git-svn-id: svn://10.0.0.236/trunk@51671 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 02:45:17 +00:00
varada%netscape.com
676eaa791f fix to bug #16981 changed Text field to editbox so that value can be enterred
git-svn-id: svn://10.0.0.236/trunk@51670 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 02:23:44 +00:00
varada%netscape.com
de47ad8dca fix to bug#16973 - nci file editor field is made dynamic text - can be changed only using file browsing
git-svn-id: svn://10.0.0.236/trunk@51669 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 02:18:17 +00:00
varada%netscape.com
66774f2d49 fix for bug #7850 - have to call function depend on the Next button on the ini file
git-svn-id: svn://10.0.0.236/trunk@51668 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 02:04:37 +00:00
ssu%netscape.com
2aa8ec93a3 fixes bugs #15394, #15603, part of #15644, and #15487. r=sgehani. The
xpinstall fileops functions have been updated to perform error detection
as much as it can prior to executing the command.


git-svn-id: svn://10.0.0.236/trunk@51667 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-24 01:07:45 +00:00
mscott%netscape.com
684b3cc1bb Bug #16927 add GetMessageUrlFromUri to nsIMsgMessageService
r=sspitzer


git-svn-id: svn://10.0.0.236/trunk@51666 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 23:39:57 +00:00
mscott%netscape.com
0b058cd771 Bug #16927 implement GetMessageUrlFromUri
r=sspitzer


git-svn-id: svn://10.0.0.236/trunk@51665 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 23:39:28 +00:00
troy%netscape.com
d79892b99d Changed nsTextFrame to be derived from nsFrame instead of nsSplittableFrame.
nsTextFrame now has only a next-in-flow pointer and no prev-in-flow pointer.
Subclass nsContinuingTextFrame is used for continuing text frames; it has a
prev-in-flow pointer. This saves 4 bytes


git-svn-id: svn://10.0.0.236/trunk@51664 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 23:19:14 +00:00
troy%netscape.com
5859acba05 Space reductions for nsTableRowFrame. Changed mInitializedChildren to be a
frame state bit, and changed mMinRowSpan and mRowIndex to be packed into
one 32-bit field. Total savings of 8 bytes per row frame


git-svn-id: svn://10.0.0.236/trunk@51663 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 23:08:30 +00:00
dp%netscape.com
1e5c5df64f bug#16742 Fixing delete on nsISupports. Thanks for patch from
<heikki@citec.fi> r=dp


git-svn-id: svn://10.0.0.236/trunk@51662 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 17:34:55 +00:00
dp%netscape.com
b534e205fe bug#16742 Fixing delete on nsISupports. Thanks for patch from <heikki@citec.fi> Plus using IMPL_ and DECL_ macros and removing operating on refcnt directly. r=dp
git-svn-id: svn://10.0.0.236/trunk@51661 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 17:33:29 +00:00
duncan%be.com
5ebdcee645 Make profile manager build under BeOS.
r=sspitzer


git-svn-id: svn://10.0.0.236/trunk@51660 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 17:13:55 +00:00
beard%netscape.com
8678f1bdd7 never consider code offsets greater than the offset of the instruction, which ensures that the returned file offset is always correct. bug=15906
git-svn-id: svn://10.0.0.236/trunk@51659 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 15:57:31 +00:00
tbogard%aol.net
ac565dc536 Framed out nsWebBrowser implementation. Basically just added all the interface functions. Code now has a place to live.
git-svn-id: svn://10.0.0.236/trunk@51658 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 07:56:27 +00:00
tbogard%aol.net
92612afa70 Added some includes of the interfaces that make up nsCWebBrowser
git-svn-id: svn://10.0.0.236/trunk@51657 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 07:55:39 +00:00
tbogard%aol.net
e9e6e9c241 Just changed some comments and function ordering.
git-svn-id: svn://10.0.0.236/trunk@51656 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 07:51:45 +00:00
jband%netscape.com
d7cf1d350b r=mccabe
Primarily fixes to properly handle nsIXPCSecurityManager vetos of
xpconnect activities.

- The code was not propagating security manager vetos of native wrapping up
through xpconnect internals. So, xpconnect was erroneously masking the
security exception with its own 'failed to convert param' exception.
This effects the signatures of nsXPCWrappedNative::GetNewOrUsedWrapper
and nsXPCWrappedJSClass::GetNewOrUsedClass.

- This propagation also helps with the problem that sometimes interfaces
are not set as [scriptable] and we did not make that clear as the source
of xpconnect's failure to convert a param in calling a method. Now this
specific class of exceptions is indicated in the JS exception object when
this happens.

- Added an explicit call to js_ForceGC on shutdown of xpcshell to aid in
avoiding 'false positives' in leak detection

- Return JS_FALSE rather than JS_TRUE when an exception is thrown in
xpcjsid to make the jsengine notices the exception.

- Move #includes that others added in xpcmodule.cpp to xpcprivate.h in
order to maintain the include conventions of this module.

- Avoid throwing an exception if it represents a security manager veto
and the security manager set an exception already.

- Replace uses of nsCOMTypeInfo<> added by scc with NS_GET_IID macros.

- Fixed a methodname misspelling because reviewers care about stuff
like that :)


git-svn-id: svn://10.0.0.236/trunk@51655 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 07:20:04 +00:00
tbogard%aol.net
398c14c4d0 Just added support for an NS_IMPL_ISUPPORTS6.
git-svn-id: svn://10.0.0.236/trunk@51654 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 06:55:45 +00:00
dp%netscape.com
40ee849701 bug# 16742 Fixing delete on nsISupports Thanks for patch from <heikki@citec.fi>. r=dp
git-svn-id: svn://10.0.0.236/trunk@51639 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 06:15:31 +00:00
dp%netscape.com
cc26158c98 bug#16742 Fixing delete on nsISupports. Thanks for patch from
<heikki@citec.fi> Plus using IMPL_ and DECL_ macros and removing
operating on refcnt directly. r=dp


git-svn-id: svn://10.0.0.236/trunk@51638 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 05:45:41 +00:00
dp%netscape.com
259487cdf7 bug#16762 Removing delete on a nsISupports. Thanks to
<heikki@citec.fi> Plus changes to use DECL_ and IMPL_ macros and not
hand define mrefcnt. r=dp


git-svn-id: svn://10.0.0.236/trunk@51637 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 05:31:46 +00:00
ducarroz%netscape.com
6a5732fdec Bug 14258, implement Send Page, R=alecf
git-svn-id: svn://10.0.0.236/trunk@51636 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 04:51:40 +00:00
dougt%netscape.com
9544338359 Modification based on design review.
(THIS IS NOT PART OF THE BUILD YET)


git-svn-id: svn://10.0.0.236/trunk@51635 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 04:51:35 +00:00
ducarroz%netscape.com
798afa71eb Bug 14258, implement Send Page. R=alecf
git-svn-id: svn://10.0.0.236/trunk@51634 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 04:50:20 +00:00
varada%netscape.com
35cf097c8a fix for bug #10806
git-svn-id: svn://10.0.0.236/trunk@51633 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 03:41:41 +00:00
varada%netscape.com
fd98dc9090 fix for bug #5987
git-svn-id: svn://10.0.0.236/trunk@51632 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 03:30:43 +00:00
warren%netscape.com
95063f0074 Fixed warnings.
git-svn-id: svn://10.0.0.236/trunk@51631 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 03:16:27 +00:00
warren%netscape.com
dc65f370b6 Extended docs to talk about new env vars, and how to read bloat logs.
git-svn-id: svn://10.0.0.236/trunk@51630 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 03:16:23 +00:00
warren%netscape.com
c8d6aed234 Cleaned up nsTraceRefcnt environment variables. r=kipp,beard
git-svn-id: svn://10.0.0.236/trunk@51629 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 03:16:19 +00:00
troy%netscape.com
c16f001bc8 Changed Run() to give priority to system messages when pumping
messsages. These are the same changes that I made to viewer's message
pump on 9/13/99


git-svn-id: svn://10.0.0.236/trunk@51628 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 03:09:30 +00:00
rickg%netscape.com
a553c7ea86 fixed infinite-loop bug 17045 by conditioning control loop. r=buster
git-svn-id: svn://10.0.0.236/trunk@51627 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 03:06:19 +00:00
troy%netscape.com
feca3d387f Changed Clear() to check for a shared node arena
git-svn-id: svn://10.0.0.236/trunk@51626 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 03:04:21 +00:00
troy%netscape.com
3972c8f69a Removed a comment
git-svn-id: svn://10.0.0.236/trunk@51624 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 02:27:07 +00:00
nisheeth%netscape.com
b6ce91bcb5 r=troy. Siblings of frames get traversed iteratively during capturing/restoring of state. Earlier they were traversed recursively which was causing the call stack to grow too large.
git-svn-id: svn://10.0.0.236/trunk@51623 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 01:43:49 +00:00
slamm%netscape.com
7c904e3aa8 Add bloat processing. Cleanup tacky code.
git-svn-id: svn://10.0.0.236/trunk@51622 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 01:43:28 +00:00
slamm%netscape.com
1cd3dc4f49 Take out debug statement.
git-svn-id: svn://10.0.0.236/trunk@51621 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 01:35:40 +00:00
beard%netscape.com
4d41f52154 added line hiliting in -blame mode.
git-svn-id: svn://10.0.0.236/trunk@51619 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 01:33:42 +00:00
sspitzer%netscape.com
cfadbaffa1 remove pref-select.html, it is obsolete.
git-svn-id: svn://10.0.0.236/trunk@51616 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 01:29:09 +00:00
sspitzer%netscape.com
992247191f remove PrefsWindow.html, it is obsolete.
git-svn-id: svn://10.0.0.236/trunk@51615 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 01:26:07 +00:00
slamm%netscape.com
e95f03bd55 Parse build logs for bloat data from warren@netscape.com's bloat tool.
git-svn-id: svn://10.0.0.236/trunk@51614 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 01:22:41 +00:00
selmer%netscape.com
2cee86d35e Include IB into the wizard
git-svn-id: svn://10.0.0.236/trunk@51613 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 01:21:09 +00:00
slamm%netscape.com
4d6f026b73 Load bloat data. Clean up load_who().
git-svn-id: svn://10.0.0.236/trunk@51612 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 01:18:25 +00:00
slamm%netscape.com
5b100726d8 Add bloat data to tree cells that have it.
git-svn-id: svn://10.0.0.236/trunk@51611 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 01:18:04 +00:00
pavlov%netscape.com
da0e9ca233 add ScrollRect method to nsIWidget -- implimented on linux and stubbed in nsBaseWidget for mac and windows. Added ifdef'd scrolling code that makes scrolling really fast on linux. Updated nsIWidget.idl (not built) to merge some changes from a branch and added ScrollRect. Added ifdefs for using gtk_fixed instead of gtk_layout as part of the new scrolling code.
git-svn-id: svn://10.0.0.236/trunk@51610 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 01:17:20 +00:00
bienvenu%netscape.com
b9244d6491 cleanup dbs at shutdown, r=mscott
git-svn-id: svn://10.0.0.236/trunk@51609 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 01:13:10 +00:00
morse%netscape.com
6045d43774 fix bug 16753, memory leak, r=rjc
git-svn-id: svn://10.0.0.236/trunk@51608 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 01:01:58 +00:00
gagan%netscape.com
e5e1218aae Post requests are now only read upto the specified amount. Not in the build.
git-svn-id: svn://10.0.0.236/trunk@51607 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 00:47:24 +00:00
varada%netscape.com
91451df7a3 fixes to bug#14014
git-svn-id: svn://10.0.0.236/trunk@51606 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 00:38:51 +00:00
varada%netscape.com
5ea1cd0e4c fixes to bug #2794
git-svn-id: svn://10.0.0.236/trunk@51605 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 00:38:06 +00:00
beard%netscape.com
d7abad5a6c fixing breakage by #undef BlockAllocCat
git-svn-id: svn://10.0.0.236/trunk@51604 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 00:21:17 +00:00
ramiro%fateware.com
0816082384 Add lots of comments. Deal with %dir. Deal with duplicate entries.
Properly call regxpcom each time components get installed.
Not part of SeaMonkey.


git-svn-id: svn://10.0.0.236/trunk@51603 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 00:15:23 +00:00
selmer%netscape.com
17b7d985c2 Fixups to makefile system for globals dll
git-svn-id: svn://10.0.0.236/trunk@51602 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 00:12:13 +00:00
selmer%netscape.com
a1f6f3c1a3 Feeble first DLL for IB
git-svn-id: svn://10.0.0.236/trunk@51601 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 00:10:24 +00:00
pnunn%netscape.com
efe6dfa795 fix for mac bustage. pnunn.
git-svn-id: svn://10.0.0.236/trunk@51600 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-23 00:10:14 +00:00
selmer%netscape.com
52de2be8a7 adding globals
git-svn-id: svn://10.0.0.236/trunk@51598 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 23:46:35 +00:00
selmer%netscape.com
36e4eb89ff globalizing includes
git-svn-id: svn://10.0.0.236/trunk@51597 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 23:45:20 +00:00
dmose%mozilla.org
d924535fa1 cmd/winfe lives on in the MozillaClassic branch only. removing from the trunk. a=leaf@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@51596 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 23:44:52 +00:00
selmer%netscape.com
5b578df427 globals into a dll
git-svn-id: svn://10.0.0.236/trunk@51595 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 23:42:02 +00:00
sspitzer%netscape.com
1668a389f4 make the xul look pretty by using html fieldsets and legends.
git-svn-id: svn://10.0.0.236/trunk@51593 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 23:31:05 +00:00
ramiro%fateware.com
295053baa2 Dont put the static rdfutil thing inside the FORCE_ALL block. r=alecf.
git-svn-id: svn://10.0.0.236/trunk@51592 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 23:28:30 +00:00
selmer%netscape.com
00ffb48018 Globals implementation
git-svn-id: svn://10.0.0.236/trunk@51591 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 23:28:27 +00:00
sspitzer%netscape.com
54b8cc865e changes for correctness and to make the pref ui look better.
git-svn-id: svn://10.0.0.236/trunk@51590 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 23:27:43 +00:00
sspitzer%netscape.com
aaff3bbf7e make the xul look pretty by using html fieldsets and legends.
fix #17078:  fix the xul so that pref-messages.xul stops asserting like mad or crashing.


git-svn-id: svn://10.0.0.236/trunk@51589 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 23:25:18 +00:00
sspitzer%netscape.com
17aab81855 make the xul look pretty by using html fieldsets and legends.
git-svn-id: svn://10.0.0.236/trunk@51588 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 23:22:52 +00:00
endico%mozilla.org
bb01bac34c improve error message mailed when cvs update dies
git-svn-id: svn://10.0.0.236/trunk@51587 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 23:07:44 +00:00
beard%netscape.com
f0acfa932d #include "xp_mcom.h" to fix link breakage.
git-svn-id: svn://10.0.0.236/trunk@51586 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 22:58:28 +00:00
radha%netscape.com
3139e13324 Turning off debug flag that got set in my previous checkin
git-svn-id: svn://10.0.0.236/trunk@51585 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 22:58:16 +00:00
beard%netscape.com
fb7e21676d MLK: Fixed implementations of QueryInterface, AddRef, and Release to perform correct reference counting. bug=15380, r=evaughan
git-svn-id: svn://10.0.0.236/trunk@51584 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 22:50:01 +00:00
pnunn%netscape.com
0ac69a866f To fix mac bustage. pnunn.
git-svn-id: svn://10.0.0.236/trunk@51583 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 22:48:04 +00:00
beard%netscape.com
2a64a10c92 synched.
git-svn-id: svn://10.0.0.236/trunk@51582 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 22:39:51 +00:00
beard%netscape.com
5d5cc2a548 changed SharedGlobal.java to Global.java
git-svn-id: svn://10.0.0.236/trunk@51581 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 22:39:23 +00:00
norris%netscape.com
986ea91e68 Changes for improved errors-as-exceptions handling.
git-svn-id: svn://10.0.0.236/trunk@51578 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 22:02:58 +00:00
norris%netscape.com
92ab48d1d8 Use simpler, more widely applicable structure for global. Also avoids test failure for Function called as a function.
git-svn-id: svn://10.0.0.236/trunk@51577 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 22:00:21 +00:00
endico%mozilla.org
9b64c7df39 cvs error notification was busted
git-svn-id: svn://10.0.0.236/trunk@51576 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:59:10 +00:00
norris%netscape.com
a59a557d7d A NativeString object shouldn't be unwrapped to a primitive.
git-svn-id: svn://10.0.0.236/trunk@51575 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:58:54 +00:00
pnunn%netscape.com
4791c61ec9 bug#16785: forgot to checkin the include file change. Removing old, obsolete get image type call.
pnunn.


git-svn-id: svn://10.0.0.236/trunk@51574 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:46:56 +00:00
danm%netscape.com
abe94c118b set window title using multibyte. submitted by jamestoder@yahoo.com. r:ftang@netscape.com, by lack of timely objection.
git-svn-id: svn://10.0.0.236/trunk@51573 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:45:19 +00:00
sspitzer%netscape.com
35c39da3d2 fix typo. #17087.
"I think about the education that I missed.  but then my homework was never quite like this.  Got it bad, got it bad, got it bad..."


git-svn-id: svn://10.0.0.236/trunk@51572 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:41:13 +00:00
danm%netscape.com
0750508062 making GetACPString parameter const. part of submission from jamestoder@yahoo.com. r:me
git-svn-id: svn://10.0.0.236/trunk@51571 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:41:04 +00:00
akkana%netscape.com
e9db800eb8 Update a few of the standalone tests. Not part of the build
git-svn-id: svn://10.0.0.236/trunk@51570 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:35:16 +00:00
gagan%netscape.com
78b44f58d8 a dummy post request file for testing post requests in HTTP. not in the build.
git-svn-id: svn://10.0.0.236/trunk@51569 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:27:38 +00:00
gagan%netscape.com
6955bb58c9 Added /post test as well. Not in the build.
git-svn-id: svn://10.0.0.236/trunk@51568 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:24:57 +00:00
gagan%netscape.com
ce76e5ae7d Added stuff to the test server to handle post requests as well. Not in the build.
git-svn-id: svn://10.0.0.236/trunk@51567 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:21:30 +00:00
ftang%netscape.com
59e649828f fix locale mapping for CLE. r=ftang
git-svn-id: svn://10.0.0.236/trunk@51566 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:11:50 +00:00
bienvenu%netscape.com
0ef6e9d38d one more news leak fix r=sspitzer
git-svn-id: svn://10.0.0.236/trunk@51565 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:11:17 +00:00
alecf%netscape.com
31378ed4eb update status
git-svn-id: svn://10.0.0.236/trunk@51564 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:06:59 +00:00
pnunn%netscape.com
c4d7a55705 bug#16785. r:neeti@netscape.com. Clean up after changing mime handling in imglib.
git-svn-id: svn://10.0.0.236/trunk@51563 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:06:28 +00:00
alecf%netscape.com
ba7f0a4cb5 prefwindow is now a service thanks to nsIModule conversion
git-svn-id: svn://10.0.0.236/trunk@51562 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:06:26 +00:00
srinivas%netscape.com
2068a5408d OpenVMS updates by colin@theblakes.com
git-svn-id: svn://10.0.0.236/trunk@51561 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:06:08 +00:00
alecf%netscape.com
450ceda4e0 convert nsPrefWindow to a module
prefwindow was doing it's own singleton management, so changed it to use getService()


git-svn-id: svn://10.0.0.236/trunk@51560 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:05:31 +00:00
bienvenu%netscape.com
16ace9def7 one more addrbook memory leak fix r=mscott
git-svn-id: svn://10.0.0.236/trunk@51559 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:04:45 +00:00
pnunn%netscape.com
42f2519c84 bug#15585. r:neeti@netscape.com. Fix build warnings.
git-svn-id: svn://10.0.0.236/trunk@51558 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:04:28 +00:00
pnunn%netscape.com
4be52ad659 Bug#13505: r:neeti@netscape.com. Replace str()'s with nsCRT()'s & nspr()'s.
git-svn-id: svn://10.0.0.236/trunk@51556 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:03:52 +00:00
akkana%netscape.com
10a4fb8f22 16988: filter out BR type=_moz, which the editor inserts. r=syd
git-svn-id: svn://10.0.0.236/trunk@51555 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:03:29 +00:00
scc%netscape.com
866732108c File Removed.
git-svn-id: svn://10.0.0.236/trunk@51554 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:02:15 +00:00
srinivas%netscape.com
bf8979df4c PR_SetThreadPriority should set the priority unconditionally.
git-svn-id: svn://10.0.0.236/trunk@51553 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:01:51 +00:00
racham%netscape.com
3f91090fc5 r=sspitzer. Fix for bug 16209. This checkin fixes mozregistry entries to avoid crashes from M9 or builds prior to that
git-svn-id: svn://10.0.0.236/trunk@51552 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:00:53 +00:00
jefft%netscape.com
8f8c3afe28 fixed bug 11892 - [dogfood] When Name or Address of a recipient includes 8-bit characters address is incorrectly formed; not quoting name part of an email address; calling GetPath() instead of GetFileName() for all recipients; r=rhp, mscott
git-svn-id: svn://10.0.0.236/trunk@51551 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:00:07 +00:00
srinivas%netscape.com
d303858686 Fixed typo in debug statement.
git-svn-id: svn://10.0.0.236/trunk@51550 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 20:59:34 +00:00
srinivas%netscape.com
fe52fa5602 Defined _MD_PIPEAVAILABLE; checkin for "Duncan Wilcox" <duncan@be.com>.
git-svn-id: svn://10.0.0.236/trunk@51549 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 20:58:00 +00:00
srinivas%netscape.com
46e9b52597 Map the SO_BROADCAST option to invalid option, when not supported by the
system.


git-svn-id: svn://10.0.0.236/trunk@51548 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 20:56:25 +00:00
jband%netscape.com
d8c9cc6cae commiting patch from Duncan Wilcox <duncan@be.com> to get prototype right in prep for inline assembly call - some pick compilers didn't like unsigned int when it was really uint32. r=jband
git-svn-id: svn://10.0.0.236/trunk@51547 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 20:53:05 +00:00
jefft%netscape.com
5dd4804e4c fixed bug 17069 - Save As...File format list for saving a selected message shows a .hml for the HTML format; fix typo; r=bienvenu
git-svn-id: svn://10.0.0.236/trunk@51546 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 20:52:56 +00:00
srinivas%netscape.com
1a74d3549b Add PR_SendFile to the PRIOMethods tables to enable use in layered FDs.
Bugzilla #17012.


git-svn-id: svn://10.0.0.236/trunk@51545 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 20:49:19 +00:00
radha%netscape.com
a285ab741e Clean up of Session History apis. Corresponding changes to the users of SH. r=mcafee. No bug #.
git-svn-id: svn://10.0.0.236/trunk@51544 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 20:48:07 +00:00
ducarroz%netscape.com
b21e040071 Fix for bug 15201. We need to convert back the result from UTF-8 to Unicode. R=mscott, bienvenu
git-svn-id: svn://10.0.0.236/trunk@51543 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 20:37:42 +00:00
bienvenu%netscape.com
8ce16092ef fix leaks in news/nntp r=sspitzer
git-svn-id: svn://10.0.0.236/trunk@51542 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 20:33:04 +00:00
bienvenu%netscape.com
598ff07fea fix memory leaks in vcard and calendar factories r=rhp
git-svn-id: svn://10.0.0.236/trunk@51541 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 20:32:02 +00:00
mcafee%netscape.com
0f2352836a Fixing some mis-use error cases, adding comments. Added --testonly flag. code=slamm, r=mcafee
git-svn-id: svn://10.0.0.236/trunk@51540 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 20:31:56 +00:00
slamm%netscape.com
085f841b9d Fix typo.
git-svn-id: svn://10.0.0.236/trunk@51539 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 19:16:40 +00:00
slamm%netscape.com
cb3e8e41cc Add some comments. Describe data structures. Tidy up a bit.
git-svn-id: svn://10.0.0.236/trunk@51538 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 18:53:56 +00:00
norris%netscape.com
ee5e7e9f37 Shouldn't test for equality against the message string, which is implementation independent.
git-svn-id: svn://10.0.0.236/trunk@51537 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 18:33:46 +00:00
slamm%netscape.com
5c43a70394 Add filter for long long constants. Make sure summary table includes everyone (fix off by one error).
git-svn-id: svn://10.0.0.236/trunk@51536 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 17:34:16 +00:00
norris%netscape.com
484a8455bd Don't print out control characters that break the driver.
git-svn-id: svn://10.0.0.236/trunk@51535 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 17:31:59 +00:00
norris%netscape.com
38e1413a00 Fix formatting.
git-svn-id: svn://10.0.0.236/trunk@51534 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 16:58:30 +00:00
norris%netscape.com
e763168909 Fix javadoc
git-svn-id: svn://10.0.0.236/trunk@51533 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 16:56:56 +00:00
jmas%softcatala.org
85ccdaf936 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@51532 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 15:53:29 +00:00
troy%netscape.com
d16381b6f3 Removed 5 convenience functions from nsIFrame
git-svn-id: svn://10.0.0.236/trunk@51531 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 14:53:52 +00:00
kipp%netscape.com
2ed3a3fc6a Removed some more warnings
git-svn-id: svn://10.0.0.236/trunk@51530 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 14:51:41 +00:00
dcone%netscape.com
fd397214fb Fixed warning.
git-svn-id: svn://10.0.0.236/trunk@51529 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 13:29:06 +00:00
srinivas%netscape.com
be42687878 PL_ProcessPendingEvents() dispatches only those events currently on the
queue. Added a static helper function (_pl_GetEventCount) that locks the
monitor and counts the number of events in the queue. Checkin for troy.


git-svn-id: svn://10.0.0.236/trunk@51528 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 13:28:39 +00:00
dcone%netscape.com
d23e143664 Fixed the rounding on some transform math. r=kmkclusky
git-svn-id: svn://10.0.0.236/trunk@51527 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 13:28:22 +00:00
rods%netscape.com
285da5c5be adding test cases for form controls
git-svn-id: svn://10.0.0.236/trunk@51526 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 12:46:13 +00:00
braddr%puremagic.com
2e3aacd5dd Change NS_COMFALSE to NS_ERROR_INVALID_ARG. Every caller of LookupName
tests explicitly for NS_OK currently.
r=sleestack


git-svn-id: svn://10.0.0.236/trunk@51525 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 08:03:15 +00:00
briano%netscape.com
3e0f0a58b5 Automated update
git-svn-id: svn://10.0.0.236/trunk@51524 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 07:15:11 +00:00
ramiro%fateware.com
a5d3f6cc70 Removing the badly rotten MOZ_STRIP_NOT_EXPORTED hack. We now have a better
way to accomplish the same thing using linker version scripts.
r=cls@seawood.org


git-svn-id: svn://10.0.0.236/trunk@51521 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 07:11:43 +00:00
braddr%puremagic.com
5d7d8cded2 Change NS_COMFALSE to NS_ERROR_ABORT throughout the space manager.
r=smfr for these two files, and r=scc for the previous file


git-svn-id: svn://10.0.0.236/trunk@51520 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 06:49:50 +00:00
dp%netscape.com
7162f4cdbb bug# 9221 Fixing autoreg terminating on bad aliases. We now let it go
as far as possible ignoring errors. r=sfraser


git-svn-id: svn://10.0.0.236/trunk@51519 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 06:32:26 +00:00
rpotts%netscape.com
c6e185762b Fix build bustage on platforms that require full infor for nsCOMPtrs...
git-svn-id: svn://10.0.0.236/trunk@51518 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 05:56:19 +00:00
ramiro%fateware.com
4b4d193abc More rpm work in progress. Work around some bugs in rules.mk.
git-svn-id: svn://10.0.0.236/trunk@51517 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 05:55:29 +00:00
braddr%puremagic.com
ef38d2fd9c Change NS_COMFALSE instances to NS_ERROR_ABORT's
git-svn-id: svn://10.0.0.236/trunk@51516 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 05:32:31 +00:00
wtc%netscape.com
e83d506ed5 Removed temporary depend:clean hack.
git-svn-id: svn://10.0.0.236/trunk@51515 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 05:29:48 +00:00
rpotts%netscape.com
99e00aec99 bug #13054 (r=warren,gagan). Reworked the way requests are sent to the server. Now requests can be of an arbitrary size...
git-svn-id: svn://10.0.0.236/trunk@51514 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 05:13:01 +00:00
ramiro%fateware.com
dbec4b872f Link in raptorgfx dynamically to make the component properly loadable.
regxpcom was breaking on this one.  r=valeski


git-svn-id: svn://10.0.0.236/trunk@51513 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 05:06:39 +00:00
valeski%netscape.com
aedd1c1253 fixing build warning
git-svn-id: svn://10.0.0.236/trunk@51512 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 04:56:24 +00:00
valeski%netscape.com
3f594fbcb6 fixing build warning
git-svn-id: svn://10.0.0.236/trunk@51511 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 04:48:31 +00:00
dp%netscape.com
7da3eadc15 beautify...
git-svn-id: svn://10.0.0.236/trunk@51510 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 04:47:14 +00:00
valeski%netscape.com
5310cb0ddc removing last reference to nsFtpStreamListenerEvent.h. Actually it was a commented out line.
git-svn-id: svn://10.0.0.236/trunk@51508 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 04:33:19 +00:00
valeski%netscape.com
3d07f98f12 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@51507 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 04:32:18 +00:00
sfraser%netscape.com
f90deff3a6 Fixing Mac FTP projects for valeski
git-svn-id: svn://10.0.0.236/trunk@51506 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 04:24:08 +00:00
valeski%netscape.com
5f29d72129 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@51505 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 04:22:54 +00:00
valeski%netscape.com
d1271b7aa4 adding connection cache interface
git-svn-id: svn://10.0.0.236/trunk@51504 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 04:11:12 +00:00
valeski%netscape.com
455aa3e358 14659, r=dougt. FTP now uses xpcom proxies to send stream listener notifications back to the channel thread. it also uses them to access connections from the protocol handler cache.
git-svn-id: svn://10.0.0.236/trunk@51503 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 04:10:46 +00:00
valeski%netscape.com
77339b5eec 17039, r=dougt. Releasing QI'd proxy object was causing a crash. this is a temp work around.
git-svn-id: svn://10.0.0.236/trunk@51502 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 04:07:53 +00:00
troy%netscape.com
3a327d90e7 Fixed compiler warning about unused variable
git-svn-id: svn://10.0.0.236/trunk@51501 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 04:01:23 +00:00
rods%netscape.com
f690c63c37 Changed the parameter of the CalcNavQuirksSize to take the input spec instead of the length
not it properly calculates the number of cols and rows when in NavQuiks mode
r=kmcclusk, part of bug 7461


git-svn-id: svn://10.0.0.236/trunk@51498 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 03:14:03 +00:00
ramiro%fateware.com
21e92e4270 Made the spec file actually work. Not part of SeaMonkey.
git-svn-id: svn://10.0.0.236/trunk@51497 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 02:55:21 +00:00
ramiro%fateware.com
36b1b32126 Fixed the mozilla script. Not part of anything.
git-svn-id: svn://10.0.0.236/trunk@51496 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 02:54:23 +00:00
kipp%netscape.com
1a6f5307c4 r=pavlov; fixed up prioritization of the plevent queue so that it's lower than the normal priority; this fixes UI starvation on long document loads AND lets timers through so that painting works (bugs 7455, 6048, etc.)
git-svn-id: svn://10.0.0.236/trunk@51495 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 02:47:02 +00:00
tbogard%aol.net
e68aa79d1d Added building of the DLL.
git-svn-id: svn://10.0.0.236/trunk@51494 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 02:36:35 +00:00
tbogard%aol.net
1709ffcde6 Framed out nsWebBrowser. Added nsCWebBrowser definition. Setup to build library.
git-svn-id: svn://10.0.0.236/trunk@51493 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 02:35:18 +00:00
tbogard%aol.net
e598aadeba Fixed some syntax errors.
git-svn-id: svn://10.0.0.236/trunk@51492 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 02:32:28 +00:00
tbogard%aol.net
b577f2a1bc Framed out nsWebBrowserSetup. Added nsCWebBrowserSetup specification. Setup building of the library.
git-svn-id: svn://10.0.0.236/trunk@51491 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 02:30:51 +00:00
tbogard%aol.net
6408004f20 Fixed the naming.... Added some comments.
git-svn-id: svn://10.0.0.236/trunk@51490 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 02:29:29 +00:00
tbogard%aol.net
ee49ae552f Added nsCHTMLDocShell.
git-svn-id: svn://10.0.0.236/trunk@51489 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 02:27:42 +00:00
tbogard%aol.net
3dc8aba7a4 Added a C++ include of nsIPresContext.h
git-svn-id: svn://10.0.0.236/trunk@51488 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 02:26:35 +00:00
sspitzer%netscape.com
6eb15ceb38 add pref-mailnews.js, which has the necessary (but currently not working) JS for the color picker.
rewrite the xul so that the html select heeds the quote prefs.  (#15230)

use a color picker instead of an empty html select.


git-svn-id: svn://10.0.0.236/trunk@51487 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 02:10:49 +00:00
sspitzer%netscape.com
0cfb0a45bd make the PrefWindow work for html select dom elements, instead of just html input dom elements.
right now, it only works for int prefs.  fix #15230, heed and reflect the quoted style and quoted size prefs
in the html select widget in pref-mailnews.xul.

rewrite the html select elements in the pref xul, to work correctly.
remove unused, commented out xul to avoid confusion.

add new option for "yesterday" for the news offline download pref.
use nsCOMPtr. use PR_snprintf() to avoid potential buffer overruns.
use #defines to clean up the code.  use PR_sscanf instead of sscanf.

r=mscott


git-svn-id: svn://10.0.0.236/trunk@51486 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 02:09:18 +00:00
troy%netscape.com
54572af2e6 r=karnaze@netscape.com
Save 8 bytes per table cell frame by eliminating mCollapseOffset and
using a frame property instead.


git-svn-id: svn://10.0.0.236/trunk@51485 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 02:06:22 +00:00
bienvenu%netscape.com
de04e9ade9 always update folders when clicking on them r=putterman
git-svn-id: svn://10.0.0.236/trunk@51484 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 01:59:50 +00:00
amusil%netscape.com
d522c5e798 Changed FALSE to XP PR_FALSE
git-svn-id: svn://10.0.0.236/trunk@51483 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 01:54:36 +00:00
brendan%mozilla.org
9ef594d4bf Avoid gratuitous initialization and extra sets of ok (r=shaver@mozilla.org).
git-svn-id: svn://10.0.0.236/trunk@51482 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 01:44:47 +00:00
scc%netscape.com
ef634d5f6b remove nsIVariant.h and nsVariant.cpp as per bug #16987 and changes already in for Unix (thanks brad) and Mac, r=danm
git-svn-id: svn://10.0.0.236/trunk@51481 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 01:33:03 +00:00
endico%mozilla.org
49ce32b0ec oops forgot to add the newsbot directory to the path "../newsbot/newsbot.html",
git-svn-id: svn://10.0.0.236/trunk@51480 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 01:32:59 +00:00
alecf%netscape.com
11dd83ae66 update status
git-svn-id: svn://10.0.0.236/trunk@51479 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 01:27:08 +00:00
slamm%netscape.com
242640cfa1 Get the relative prefix for the static page correct.
git-svn-id: svn://10.0.0.236/trunk@51478 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 01:23:48 +00:00
amusil%netscape.com
547d0559fa Address book fix. DB file now gets closed in the destructor. Reviewed by bienvenu.
git-svn-id: svn://10.0.0.236/trunk@51477 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 01:18:42 +00:00
wtc%netscape.com
89df62c930 Bugsplat bug #366500: use the default, PRLock-based atomic stack
implementation on OSF1. r=larryh,srinivas@netscape.com.
Modified files: _osf1.h, osf1.c.


git-svn-id: svn://10.0.0.236/trunk@51476 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 01:10:00 +00:00
alecf%netscape.com
ab99f0ec36 nsIModulize mime emitters - porkjockey work, r=sspitzer
git-svn-id: svn://10.0.0.236/trunk@51475 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 01:05:04 +00:00
dp%netscape.com
f7af54f40f bug# 15046 Preventing deletion of dll when getfactory fails. r=shaver,kipp
git-svn-id: svn://10.0.0.236/trunk@51474 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 01:04:16 +00:00
dp%netscape.com
51386ed041 Fixed warning of unused variable.
git-svn-id: svn://10.0.0.236/trunk@51473 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 01:02:29 +00:00
alecf%netscape.com
6b7dfaa5e0 start to consolidate URL and URI parsing into the base classes: remove a whole bunch of protocol-specific code in favor of generalization
basically, more fixes for #14437
r=scottip


git-svn-id: svn://10.0.0.236/trunk@51471 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 01:02:08 +00:00
dougt%netscape.com
a0ac058370 fix for bug 13894. Hooks up the notification from necko. r=cathleen.
git-svn-id: svn://10.0.0.236/trunk@51470 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 00:53:01 +00:00
endico%mozilla.org
596192f62c the names of the files to be wrapped must be given relative to the root of the tree. in this case: "../newsbot/newsbot.html"
git-svn-id: svn://10.0.0.236/trunk@51469 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 00:45:56 +00:00
evaughan%netscape.com
997f5f6291 Fixed bug 9442. reviewed by Hyatt.
git-svn-id: svn://10.0.0.236/trunk@51468 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 00:38:22 +00:00
mjudge%netscape.com
64c9150aab massive checkin for underlying implementation of key handling from javascript and home/end breakage and.. selecting around NON-text frames. like arrowing around an image for example. 16636,16655 and another i cannot find. r=kin r=hyatt a=me
git-svn-id: svn://10.0.0.236/trunk@51467 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 00:19:18 +00:00
endico%mozilla.org
6cb5db5eff escape quotes around ALIGN=\"right\"
git-svn-id: svn://10.0.0.236/trunk@51466 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 00:14:43 +00:00
kipp%netscape.com
845644f460 Alloc another iid
git-svn-id: svn://10.0.0.236/trunk@51465 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 00:12:31 +00:00
scc%netscape.com
9d0d4095c3 remove "nsVariant.cpp" from the project, and "nsIVariant.h" from the MANIFEST, as per bug #16987, r=sfraser
git-svn-id: svn://10.0.0.236/trunk@51464 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 00:12:03 +00:00
kipp%netscape.com
b9ad416be8 Clean up other dirt
git-svn-id: svn://10.0.0.236/trunk@51463 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 00:11:54 +00:00
kipp%netscape.com
7944188008 Whoops, missed this during my checkin :-(
git-svn-id: svn://10.0.0.236/trunk@51462 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 00:11:31 +00:00
davidm%netscape.com
302f64fb59 2425 [PP] Mac: Apprunner doesn't gracefully quit at shutdown or r
r = sdagley


git-svn-id: svn://10.0.0.236/trunk@51461 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 00:01:45 +00:00
beard%netscape.com
56b367cb81 added parent links, so you can go to the objects referring to a given link.
git-svn-id: svn://10.0.0.236/trunk@51460 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 23:58:28 +00:00
beard%netscape.com
dfaa46c552 broke out from leaksoup.java so it can be used by tracesoup.
git-svn-id: svn://10.0.0.236/trunk@51459 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 23:55:25 +00:00
beard%netscape.com
f8e8fae5ce annotates refcount traces with blame/lxr URLs
git-svn-id: svn://10.0.0.236/trunk@51458 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 23:54:39 +00:00
endico%mozilla.org
62819eff8a align bottom row to the right. <TR ALIGN="right"> doesn't seem to work in mozilla
git-svn-id: svn://10.0.0.236/trunk@51457 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 23:52:41 +00:00
terry%mozilla.org
575dc47298 Make "checkins in last 7 days" link work better in worlds with
multiple repositories.


git-svn-id: svn://10.0.0.236/trunk@51454 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 23:42:39 +00:00
nisheeth%netscape.com
9888b796b2 Fixing Unix warnings. r=harishd
git-svn-id: svn://10.0.0.236/trunk@51452 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 23:27:02 +00:00
akkana%netscape.com
0ab9b94827 Fix a runtime error message -- r= (and suggested by) dp
git-svn-id: svn://10.0.0.236/trunk@51451 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 23:12:31 +00:00
karnaze%netscape.com
9ecfbb54e1 new regression tests
git-svn-id: svn://10.0.0.236/trunk@51450 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 22:52:00 +00:00
terry%mozilla.org
2df0186c7f Wasn't working right with multiple repositories.
git-svn-id: svn://10.0.0.236/trunk@51449 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 22:51:50 +00:00
wtc%netscape.com
096120daf6 Fixed a small mistake in the previous checkin.
git-svn-id: svn://10.0.0.236/trunk@51448 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 22:51:06 +00:00
danm%netscape.com
4e8be85212 removing (unused) references to nsIWebShell.h. requested by buster@netscape.com, bug 16510, r:me
git-svn-id: svn://10.0.0.236/trunk@51447 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 22:47:50 +00:00
leaf%mozilla.org
b541cbb7e8 adding !endif to complete !if
git-svn-id: svn://10.0.0.236/trunk@51446 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 22:40:16 +00:00
endico%mozilla.org
a85345a59b get rid of the <DIV>s and <SPAN>s since we have the rdf file now. the <SPAN> around the article link was messing up the link because they were intertwined <SPAN><A></SPAN>text</A>
git-svn-id: svn://10.0.0.236/trunk@51445 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 22:38:21 +00:00
wtc%netscape.com
358dfee800 Bugsplat bug #365031: moved the definition of PRStack from pratom.h
to primpl.h so that it is not exported.
Bugsplat bug #364813: declare 'prstk_head' volatile, to prevent compiler
from optimizing away references in a loop.
r=larryh,srinivas@netscape.com


git-svn-id: svn://10.0.0.236/trunk@51444 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 22:36:35 +00:00
karnaze%netscape.com
a2ae4b6656 bug 5799 - width of auto width table considers percentage cells when they are small relative to the rest of the table. r=dcone
git-svn-id: svn://10.0.0.236/trunk@51443 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 22:36:21 +00:00
karnaze%netscape.com
ed05316f46 bug 12012 - RemoveFrame was using stale style display. r=dcone
git-svn-id: svn://10.0.0.236/trunk@51442 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 22:33:30 +00:00
mscott%netscape.com
83fec44fd6 Bug #16538 --> FetchMessage takes a stream listener and we should try to create a necko channel for the url,
and call AsyncRead on the channel, passing in the stream listener instead of trying to run the imap url
through the normal means. This fixes the problem where the channel wasn't properly initialized when
copying a imap message to a local folder.
r=jefft,bienvenu


git-svn-id: svn://10.0.0.236/trunk@51441 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 22:33:24 +00:00
wtc%netscape.com
646d7cec23 Temporary depend:clean hack.
git-svn-id: svn://10.0.0.236/trunk@51440 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 22:32:14 +00:00
mscott%netscape.com
fb7a12a36e Bug #16538 --> we need to add nsIStreamObserver to the QI method for this class in order to avoid an assertion
with my fix to bug #16538. I also replaced the handle rolled QueryInterface method with macro.
r=jefft,bienvenu


git-svn-id: svn://10.0.0.236/trunk@51438 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 22:31:27 +00:00
wtc%netscape.com
c2f76119ac Bugzilla bug #16994: fixed compilation problems on platforms without
long longs. r=larryh@netscape.com.  Thanks to Chris Seawood
<cls@seawood.org> for the bug report.


git-svn-id: svn://10.0.0.236/trunk@51437 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 22:28:14 +00:00
cata%netscape.com
dd434afd5e bug #16754, r=erik, fixing memory leak
git-svn-id: svn://10.0.0.236/trunk@51436 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 22:25:44 +00:00
braddr%puremagic.com
8c0a2f84e7 Remove references to nsVariant.cpp and nsIVariant.h.
r=scc


git-svn-id: svn://10.0.0.236/trunk@51435 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 22:24:17 +00:00
bienvenu%netscape.com
f52e7bdb86 fix syncing of imap flags change to db r=mscott,16839
git-svn-id: svn://10.0.0.236/trunk@51434 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 22:23:25 +00:00
pnunn%netscape.com
62438f020b bug#13505. Replacing str functions with nsCRT functions, nspr functions.
pnunn@netscape.com  r:jfrancis@netscape.com


git-svn-id: svn://10.0.0.236/trunk@51433 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 22:23:24 +00:00
rods%netscape.com
c33c65e90f changed the padding so it is adding in the correct left right instead of top bottom
r=kmcclusk, Bug #16936


git-svn-id: svn://10.0.0.236/trunk@51432 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 22:22:32 +00:00
bienvenu%netscape.com
612130b82a check for null when marking header read, r=mscott
git-svn-id: svn://10.0.0.236/trunk@51431 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 22:22:07 +00:00
jst%citec.fi
953ba7bb6a Make printing use only enabled stylesheets. No bug, r=kipp@netscape.com and dcone@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@51430 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 22:20:37 +00:00
rogerl%netscape.com
605c46e143 Loop from 1 instead of 0 since the test result parsing gets messed up by
the null strings not containing 'PASSED'. The 0 case isn't all that
important for upperCase testing.


git-svn-id: svn://10.0.0.236/trunk@51429 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 22:18:52 +00:00
terry%mozilla.org
3b70db325d Add some more debugging output.
git-svn-id: svn://10.0.0.236/trunk@51428 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 22:04:13 +00:00
ftang%netscape.com
908e81fe11 change the input method highligh code from 2 style to 4 styles. r=mjudge
git-svn-id: svn://10.0.0.236/trunk@51427 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 22:01:18 +00:00
jevering%netscape.com
1e20da8f66 Enabling boehm leak detector, r=dp bug#15906
git-svn-id: svn://10.0.0.236/trunk@51426 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 21:59:15 +00:00
jevering%netscape.com
42df555a0b Enabling GC detector, r=dp, bug #15906
git-svn-id: svn://10.0.0.236/trunk@51425 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 21:56:47 +00:00
srinivas%netscape.com
52c617580c Invoke the native acknowledge notify routine only when queue is non-empty.
Checkin for kipp@netscape.com.


git-svn-id: svn://10.0.0.236/trunk@51424 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 21:52:02 +00:00
akkana%netscape.com
e6c9a60dab 16706: Call the rules code to delete the bogus node before inserting html, to fix the new mail reply code. r=jfrancis
git-svn-id: svn://10.0.0.236/trunk@51423 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 21:51:47 +00:00
kipp%netscape.com
adc0fff019 Added two new tests
git-svn-id: svn://10.0.0.236/trunk@51422 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 21:46:52 +00:00
endico%mozilla.org
f535016cde oops use '&', not '%'
git-svn-id: svn://10.0.0.236/trunk@51421 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 21:44:39 +00:00
cata%netscape.com
6499857292 bug #15690, r=ftang, removing bogus rules which were affecting the menu template
git-svn-id: svn://10.0.0.236/trunk@51420 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 21:42:40 +00:00
danm%netscape.com
5ecf5615a7 observe EventQueue creation and deletion. r:hyatt@netscape.com
git-svn-id: svn://10.0.0.236/trunk@51419 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 21:36:25 +00:00
ramiro%fateware.com
1a2e9974f2 Use "(NSINSTALL) -D" instead of direct "mkdir" r=shaver.
git-svn-id: svn://10.0.0.236/trunk@51418 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 21:35:37 +00:00
danm%netscape.com
49ae6251f8 adding method ListenToEventQueue (moving EventQueue observation from appshells to appshellservice) r:hyatt@netscape.com
git-svn-id: svn://10.0.0.236/trunk@51417 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 21:34:57 +00:00
dp%netscape.com
32ccfffb02 bug#14656 Circular release problem of component manager. Fixed by
adding shutdown() method that gets called before the last
release. Enabled only for dp & shaver until we resolve js coredump.


git-svn-id: svn://10.0.0.236/trunk@51416 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 21:34:39 +00:00
dp%netscape.com
a87080011d Making sample better by using COMPtr r=waterson
git-svn-id: svn://10.0.0.236/trunk@51415 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 21:32:17 +00:00
dp%netscape.com
480412f60c Addding xpcom init and shutdown. r=waterson
git-svn-id: svn://10.0.0.236/trunk@51414 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 21:31:53 +00:00
nisheeth%netscape.com
dd57891add Install util.lib to the dist directory in the libs phase rather than the install phase.
git-svn-id: svn://10.0.0.236/trunk@51413 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 21:31:26 +00:00
endico%mozilla.org
35cedcf521 html escape gt and lt symbols in the View Article url
git-svn-id: svn://10.0.0.236/trunk@51412 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 21:22:44 +00:00
rhp%netscape.com
7889a5e148 Fix for duplicate body text in Multipart related message - Bug #16992 - r: mscott
git-svn-id: svn://10.0.0.236/trunk@51411 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 21:18:54 +00:00
mcafee%netscape.com
220ec361b8 Fixing evaughan's last change. r=law
git-svn-id: svn://10.0.0.236/trunk@51410 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 21:14:59 +00:00
brade%netscape.com
1706386f49 add nsTextContentDataChange.cpp a=leaf@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@51409 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 21:14:19 +00:00
ramiro%fateware.com
5244db774f More rpm packaging work in progress. Not part of anything.
git-svn-id: svn://10.0.0.236/trunk@51408 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 21:12:50 +00:00
edburns%acm.org
24e8fb82df Bug: 15606
r=shaver
approver=av

I would like to take the time to personally thank Mike Shaver for all the hard
work he has done to make this bugfix possible.


git-svn-id: svn://10.0.0.236/trunk@51407 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 21:09:21 +00:00
rickg%netscape.com
3e6139004b changed default font-size for viewsource; r=none;
git-svn-id: svn://10.0.0.236/trunk@51406 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 21:05:17 +00:00
mcafee%netscape.com
e9e6fdee20 Backing out evaughan's change which broke linux/solaris. a=mcafee
git-svn-id: svn://10.0.0.236/trunk@51405 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 21:05:02 +00:00
troy%netscape.com
46c5c77d91 Removed unused 4-byte "mMaxElementSize" member data
git-svn-id: svn://10.0.0.236/trunk@51404 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 20:51:04 +00:00
kipp%netscape.com
e4442e8177 r=troy; added nsTextContentChangeData to the build
git-svn-id: svn://10.0.0.236/trunk@51403 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 20:48:43 +00:00
kipp%netscape.com
1e9fb71c5d Support navigators built-in image types internal-gopher-*
git-svn-id: svn://10.0.0.236/trunk@51402 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 20:48:04 +00:00
kipp%netscape.com
e5f0e5328b Fixed percolation of nbsp's into the transformed buffer (bug 16886)
git-svn-id: svn://10.0.0.236/trunk@51401 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 20:47:36 +00:00
kipp%netscape.com
c54e23defe r=troy; Optimize append text reflows to only reflow the new part of the text
git-svn-id: svn://10.0.0.236/trunk@51400 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 20:46:05 +00:00
kipp%netscape.com
fee0551895 moved debug logic for dumping reflow commands so that we can dump them without requiring the incremental reflow verification logic to run
git-svn-id: svn://10.0.0.236/trunk@51399 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 20:45:39 +00:00
kipp%netscape.com
6b290bc673 r=troy; bug: 15153; fixed problem with style-change reflows not being propogated properly
git-svn-id: svn://10.0.0.236/trunk@51398 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 20:44:58 +00:00
kipp%netscape.com
57dac66f2e r=troy; bugs: 13196; fixed floating table reflow issues found in 13196 by storing floater max-element-size for later retrieval
git-svn-id: svn://10.0.0.236/trunk@51397 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 20:44:22 +00:00
locka%iol.ie
9ff1e618b5 Changed scope of some helper methods
git-svn-id: svn://10.0.0.236/trunk@51396 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 20:44:06 +00:00
kipp%netscape.com
88d3d6afe1 r=troy; bugs: 15153, 13196; fixed problem with style-change reflows not being propogated properly; also fixed floating table reflow issues found in 13196 by storing floater max-element-size for later retrieval
git-svn-id: svn://10.0.0.236/trunk@51395 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 20:43:48 +00:00
kipp%netscape.com
6156c0fb7a Export the gopher images
git-svn-id: svn://10.0.0.236/trunk@51394 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 20:42:18 +00:00
kipp%netscape.com
199585b860 Use nsTextContentChangeData to pass down to the reflow logic the effect on the text
git-svn-id: svn://10.0.0.236/trunk@51393 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 20:40:51 +00:00
kipp%netscape.com
6ef7b73278 new file for text reflow optimiziation
git-svn-id: svn://10.0.0.236/trunk@51392 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 20:40:25 +00:00
bienvenu%netscape.com
90299835ef fix addrbook mem leaks and mismatched delete r=mscott\
git-svn-id: svn://10.0.0.236/trunk@51391 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 20:36:02 +00:00
bienvenu%netscape.com
9b4f0c0032 fix msg compose and send mem leaks, ipw, and mismatched delete r=mscott
git-svn-id: svn://10.0.0.236/trunk@51390 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 20:35:26 +00:00
rickg%netscape.com
eb5f25dfe9 changed default font-size for viewsource; r=none;
git-svn-id: svn://10.0.0.236/trunk@51389 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 20:34:02 +00:00
locka%iol.ie
f4438b41e1 Added support for drag and drop of Internet Shortcut files
git-svn-id: svn://10.0.0.236/trunk@51388 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 20:32:52 +00:00
kipp%netscape.com
90d4423420 r=troy; Added a property for max-element-size storage for fixing bug 13196
git-svn-id: svn://10.0.0.236/trunk@51387 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 20:23:05 +00:00
kipp%netscape.com
4fe7cefb4a r=troy; Added nsITextContetChangeData to help optimize modifications of large text elements
git-svn-id: svn://10.0.0.236/trunk@51386 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 20:22:02 +00:00
evaughan%netscape.com
f1d7499417 Fixed some warnings: reviewed -hyatt
git-svn-id: svn://10.0.0.236/trunk@51385 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 20:17:51 +00:00
ramiro%fateware.com
0fed380744 Fix #ifdef DEBUG_ramiro build bustage.
git-svn-id: svn://10.0.0.236/trunk@51384 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 19:56:05 +00:00
matt%netscape.com
426f9c3ea3 Adding manual proxies -r by bill
git-svn-id: svn://10.0.0.236/trunk@51383 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 19:53:19 +00:00
ssu%netscape.com
f923fbd1b1 fixed bug #15309. r=dbragg. it now creates an empty Plugins directory within Seamonkey. Not part of tinderbox. would only affect windows.
git-svn-id: svn://10.0.0.236/trunk@51382 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 19:50:36 +00:00
ramiro%fateware.com
ced5d07b70 Fix #ifdef DEBUG_ramiro build bustage.
git-svn-id: svn://10.0.0.236/trunk@51381 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 19:30:29 +00:00
selmer%netscape.com
206cd25152 Fix enabling when last NCIfile is deleted
git-svn-id: svn://10.0.0.236/trunk@51379 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 18:39:26 +00:00
terry%mozilla.org
49666a52cb Fix perl warning.
git-svn-id: svn://10.0.0.236/trunk@51378 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 18:19:48 +00:00
kipp%netscape.com
da5a072040 new
git-svn-id: svn://10.0.0.236/trunk@51374 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 16:20:53 +00:00
briano%netscape.com
363f0cb92d Automated update
git-svn-id: svn://10.0.0.236/trunk@51373 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 15:00:22 +00:00
ramiro%fateware.com
a3613fc446 Work in progress to add reasonable rpm packaging support for the beast.
NOT PART OF THE SEAMONKEY BUILD.


git-svn-id: svn://10.0.0.236/trunk@51372 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 14:57:38 +00:00
ssu%netscape.com
d5686c3a21 fixing bug #16470. Not part of Tinderbox. Not part of seamonkey core code. r=pavlov. Would affect only windows.
git-svn-id: svn://10.0.0.236/trunk@51371 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 07:24:46 +00:00
tbogard%aol.net
8cf4ca3ed6 Added changes from buster.
git-svn-id: svn://10.0.0.236/trunk@51370 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 06:59:48 +00:00
ssu%netscape.com
ef19fe31d7 removing editor from install build process. Not part of Tinderbox. Not part of seamonkey code. Would affect only windows platforms.
git-svn-id: svn://10.0.0.236/trunk@51369 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 06:44:27 +00:00
tbogard%aol.net
2f9603aabc Added nsITextScroll.idl.
git-svn-id: svn://10.0.0.236/trunk@51368 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 06:41:03 +00:00
pierre%netscape.com
2123a4d227 Fix build bustage
git-svn-id: svn://10.0.0.236/trunk@51367 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 06:40:00 +00:00
tbogard%aol.net
75207bcf9a More changes from buster.
git-svn-id: svn://10.0.0.236/trunk@51366 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 05:52:54 +00:00
pierre%netscape.com
6b7990dcc7 Enabled MOZ_PERF_METRICS in the Mac build:
- updated DefinesMozilla.h
- fixed stopwatch.cpp
- created libutilIDL.mcp
- added StopWatch exports to libutil.exp
- added xpcom.shlb to libutil.mcp
- added libutil.shlb to htmlparser.mcp, layout.mcp, webshell.mcp


git-svn-id: svn://10.0.0.236/trunk@51365 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 05:41:45 +00:00
sfraser%netscape.com
68467cb1bb File Removed.
git-svn-id: svn://10.0.0.236/trunk@51364 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 05:37:53 +00:00
sfraser%netscape.com
7bac435457 Removed nsEditorFactory.cpp and nsEditorShellFactory.cpp which are no longer needed. r=pavlov
git-svn-id: svn://10.0.0.236/trunk@51363 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 05:37:04 +00:00
sfraser%netscape.com
a627d5676e Removal of calls to PR_MumbleMonitor, which were way too heavy-handed for the job. Replaced with PR_AtomicInc/Decrement. part of module sweep, r=morse, pavlov
git-svn-id: svn://10.0.0.236/trunk@51362 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 05:36:21 +00:00
pierre%netscape.com
1e94740a0f First Checked In.
git-svn-id: svn://10.0.0.236/trunk@51361 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 05:35:26 +00:00
mcafee%netscape.com
ca26c9bcab Moved to mozilla/tools/tinderbox (client-side script).
git-svn-id: svn://10.0.0.236/trunk@51360 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 05:20:02 +00:00
mcafee%netscape.com
f7f718532b Added bloat test. Also added --testonly to skip building process. Fixed bloatdiff to put its output to stdout. r=warren
git-svn-id: svn://10.0.0.236/trunk@51359 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 05:16:54 +00:00
troy%netscape.com
dced08401d r=kipp@netscape.com
Added API to get/set properties on frames. Also changed nsContainerFrame
to use a property to implement the frame overflow list. This saves 4 bytes
per container frames


git-svn-id: svn://10.0.0.236/trunk@51358 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 05:11:43 +00:00
waterson%netscape.com
41c3d0afa5 Fix solaris (and other unsupported platforms).
git-svn-id: svn://10.0.0.236/trunk@51357 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 04:28:07 +00:00
waterson%netscape.com
a8195254ae Change nsTraceRefCnt::WalkTheStack() to accept stream.
git-svn-id: svn://10.0.0.236/trunk@51355 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 03:45:38 +00:00
sfraser%netscape.com
aed61fd72a Removed an errant semicolon in a IID declaration. r=floppy moose
git-svn-id: svn://10.0.0.236/trunk@51354 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 03:45:20 +00:00
waterson%netscape.com
035b04b87b Change nsTraceRefcnt::WalkTheStack() to accept stream.
git-svn-id: svn://10.0.0.236/trunk@51353 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 03:45:12 +00:00
waterson%netscape.com
21abead461 Modify nsTraceRefcnt::WalkTheStack() to accept a stream. Other misc formatting fixup. work really done by beard, r=waterson.
git-svn-id: svn://10.0.0.236/trunk@51352 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 03:44:37 +00:00
tbogard%aol.net
ce03f0d9f0 More additions suggested by buster. Not all final, still working out the interfaces.
git-svn-id: svn://10.0.0.236/trunk@51351 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 03:23:31 +00:00
tbogard%aol.net
c8d824834b More changes to the interface. Merging in changes from buster.
git-svn-id: svn://10.0.0.236/trunk@51350 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 03:01:33 +00:00
tbogard%aol.net
619f3992f7 Added new nsIDocShellContainer.idl to the build list.
git-svn-id: svn://10.0.0.236/trunk@51349 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 03:01:10 +00:00
tbogard%aol.net
3b01cf0bec First Check-in.
git-svn-id: svn://10.0.0.236/trunk@51348 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 03:00:07 +00:00
nisheeth%netscape.com
205adceff6 Should not affect build. Include stopwatch object code if MOZ_PERF is defined.
git-svn-id: svn://10.0.0.236/trunk@51347 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 02:47:56 +00:00
dveditz%netscape.com
7d2157e059 mac bustage
git-svn-id: svn://10.0.0.236/trunk@51346 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 02:46:21 +00:00
nisheeth%netscape.com
569e1a2fb1 Fixed warnings. Enabled code to build on UNIX. r=pollmann
git-svn-id: svn://10.0.0.236/trunk@51345 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 02:32:01 +00:00
endico%mozilla.org
8f060eb994 remove the full path names on newsbot.html and wrapped.html so wrap.pl doesn't add "../" to everything. communicator doesn't mind this but it breaks msie and probably mozilla
git-svn-id: svn://10.0.0.236/trunk@51344 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 02:30:21 +00:00
briano%netscape.com
4f1d9b3a36 Automated update
git-svn-id: svn://10.0.0.236/trunk@51343 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 02:15:10 +00:00
nisheeth%netscape.com
3871dd508d Will not affect build. Add support for --enable-perf-metrics autoconf flag that will switch on the reporting of timing information about gecko's layout processes.
git-svn-id: svn://10.0.0.236/trunk@51342 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 02:01:49 +00:00
varada%netscape.com
6475343232 changing all edit fields with browse buttons to non editable scripts
git-svn-id: svn://10.0.0.236/trunk@51341 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 01:56:54 +00:00
dveditz%netscape.com
92654b5840 Missed a test
git-svn-id: svn://10.0.0.236/trunk@51340 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 01:47:28 +00:00
selmer%netscape.com
bea6cdd46f Don't need -MDd in CFLAGS
git-svn-id: svn://10.0.0.236/trunk@51339 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 01:42:48 +00:00
bienvenu%netscape.com
4e7faff324 fix memory leaks and mismatched frees r=jefft
git-svn-id: svn://10.0.0.236/trunk@51338 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 01:42:00 +00:00
bienvenu%netscape.com
4392913cc3 fix mismatched free
git-svn-id: svn://10.0.0.236/trunk@51337 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 01:40:08 +00:00
bienvenu%netscape.com
10931ccb41 another memory leak fix for mime
git-svn-id: svn://10.0.0.236/trunk@51336 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 01:37:03 +00:00
beard%netscape.com
6bfc31a469 fix :: bustage.
git-svn-id: svn://10.0.0.236/trunk@51334 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 01:07:50 +00:00
dveditz%netscape.com
6b0912645b Changing nsFileSpec Copy and Move function names to match their
functionality, and also to free up the namespace for a *real* Copy
and Move that allow renaming the leaf name rather than just copying
into different directories (i.e. to make backup files). r=ssu


git-svn-id: svn://10.0.0.236/trunk@51333 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 00:40:39 +00:00
hoa.nguyen%intel.com
ed3c26548f Optimized decoder. Removed warnings.
git-svn-id: svn://10.0.0.236/trunk@51332 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 00:17:48 +00:00
beard%netscape.com
a27e6a0c95 when GC_DEBUG is off, try to use GC_malloc_ignore_off_page for large blocks. Since GC_MALLOC always returns cleared blocks, don't bother clearning. r=gordon, bug=15906
git-svn-id: svn://10.0.0.236/trunk@51331 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 00:17:28 +00:00
dp%netscape.com
af64d101fa Fixed crash on -f file on quit by using async proxy post event as
opposed to calling quit directly. r=dougt


git-svn-id: svn://10.0.0.236/trunk@51330 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 00:15:30 +00:00
beard%netscape.com
72a36eba4b use nsILeakDetector service. r=gordon, bug=15906
git-svn-id: svn://10.0.0.236/trunk@51329 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 00:13:07 +00:00
karnaze%netscape.com
fb5466f5e4 bug 14915 - fix crash.
git-svn-id: svn://10.0.0.236/trunk@51328 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 00:11:55 +00:00
beard%netscape.com
b582d5259b added GC_address_to_source, MWUnmangle exports. r=gordon, bug=15906
git-svn-id: svn://10.0.0.236/trunk@51327 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 00:09:14 +00:00
beard%netscape.com
eb87b84391 added nsEnvironment.cpp. r=gordon, bug=15906
git-svn-id: svn://10.0.0.236/trunk@51326 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 00:08:13 +00:00
rods%netscape.com
3133a0f78a removed the PR_MAX forcing the y offset to be zero or greater. Not sure why it was doing this.
r=kmcclusk Bug #16152


git-svn-id: svn://10.0.0.236/trunk@51325 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 00:06:23 +00:00
beard%netscape.com
abf884842d added GC_address_to_source, MWUnmangle stubs. r=gordon, bug=15906
git-svn-id: svn://10.0.0.236/trunk@51324 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 00:06:13 +00:00
sspitzer%netscape.com
81245102fa fix for #15231, r=mscott. get the fixed_width pref to stick.
the problem was we had it as an int pref, when it was a bool pref.


git-svn-id: svn://10.0.0.236/trunk@51323 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 00:05:50 +00:00
hoa.nguyen%intel.com
4b7e9a7a5a Optimized decoder.
git-svn-id: svn://10.0.0.236/trunk@51322 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 00:05:16 +00:00
beard%netscape.com
b12276db98 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@51321 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 00:05:05 +00:00
hoa.nguyen%intel.com
b52252a4aa Correctly check for the HZ converter engine state.
git-svn-id: svn://10.0.0.236/trunk@51320 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-21 00:03:52 +00:00
nhotta%netscape.com
dbcb2cc74d Fix a warning, it was assigning NULL to char type, r=ftang.
git-svn-id: svn://10.0.0.236/trunk@51319 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 23:55:31 +00:00
nhotta%netscape.com
3e99f5b0b8 Adding a wrapper function for a new i18n interface, part of bug fix 15475, r=rhp.
git-svn-id: svn://10.0.0.236/trunk@51318 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 23:51:25 +00:00
cmanske%netscape.com
661bf267b9 Fixed bug 16923. r=mjudge
git-svn-id: svn://10.0.0.236/trunk@51317 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 23:50:20 +00:00
rods%netscape.com
dd80c9dd09 added check for null frame. The child frame can be null when a comment node exists as
one of the children of the select. r=kmcclusk, Bug #16355


git-svn-id: svn://10.0.0.236/trunk@51316 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 23:35:38 +00:00
endico%mozilla.org
48d6ca301e clairify that the 'mozilla' module contains the entire 'current' repository, not everything including all the branches.
git-svn-id: svn://10.0.0.236/trunk@51315 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 23:30:50 +00:00
pierre%netscape.com
a7cee2ccb1 #15636 "Cleanup build warnings". Some compilers issued a "hidden virtual method" warning because only one of the two implementations of GetDesiredSize() was overridden. r=slamm.
git-svn-id: svn://10.0.0.236/trunk@51314 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 23:30:29 +00:00
hoa.nguyen%intel.com
cfe11b1fd4 Changed from char types to PRUint8.
git-svn-id: svn://10.0.0.236/trunk@51313 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 23:21:56 +00:00
wtc%netscape.com
e0c8d6770c Made comments match code.
git-svn-id: svn://10.0.0.236/trunk@51312 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 23:19:31 +00:00
harishd%netscape.com
6cd114ddff Fix for the bustage.
r=pollmann


git-svn-id: svn://10.0.0.236/trunk@51311 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 23:14:50 +00:00
wtc%netscape.com
eacb3c22ae Bugsplat bug #366840: PR_StringToNetAddr needs to set the address family
field of the PRNetAddr structure. Added a new test str2addr.c for this
bug. r=larryh@netscape.com
Modified files: prnetdb.c, pr/tests/runtests.ksh, pr/tests/Makefile,
    pr/tests/Makefile.in
Added file: pr/tests/str2addr.c


git-svn-id: svn://10.0.0.236/trunk@51310 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 23:07:38 +00:00
mcafee%netscape.com
9fa424b571 Moving bloatdiff.pl from webtools/tinderbox (server) to here (client).
git-svn-id: svn://10.0.0.236/trunk@51309 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 22:35:48 +00:00
harishd%netscape.com
676f148787 Fixed Bug 16285 - Replaced char* with nsCAutoString for mBuffer.
This fixes the crash on doing Ctrl-c in editor.

r=akkana


git-svn-id: svn://10.0.0.236/trunk@51308 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 22:35:12 +00:00
harishd%netscape.com
8cccb6a457 Fixed Bug 16014 - Rectifed a glitch in illegal-content handling code.
r=pollmann


git-svn-id: svn://10.0.0.236/trunk@51307 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 22:32:10 +00:00
alecf%netscape.com
e0db5266e6 turn news into a nsIModule
r=sspitzer
(porkjockey work)


git-svn-id: svn://10.0.0.236/trunk@51306 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 22:30:02 +00:00
akkana%netscape.com
49f4e5d7aa 16726: don't print the doctype information in plaintext output. r=cmanske
git-svn-id: svn://10.0.0.236/trunk@51305 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 22:27:14 +00:00
edburns%acm.org
25735aa125 bug: 16842
reviewer: edburns
approver: edburns

Changed raptor to gk in makefile as appropriate.


git-svn-id: svn://10.0.0.236/trunk@51304 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 22:02:34 +00:00
rods%netscape.com
54bbcb0dfd added code to the destructor to make sure the list get rolled up.
r=kmcclusk bug 15912


git-svn-id: svn://10.0.0.236/trunk@51303 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 21:59:04 +00:00
alecf%netscape.com
8d5865d224 clean up nsIMsgFolder API in preparation for fixing a number of bugs, most importantly #14437
r=scottip


git-svn-id: svn://10.0.0.236/trunk@51302 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 21:58:21 +00:00
dmose%mozilla.org
9cdfa509fd macfe lives on in the MozillaClassic branch, but there's no longer a need for it on the trunk. a=smfr@netscape.com
git-svn-id: svn://10.0.0.236/trunk@51301 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 21:53:27 +00:00
endico%mozilla.org
47e168172c add m10 tree for the Design Patterns contest
git-svn-id: svn://10.0.0.236/trunk@51300 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 21:52:08 +00:00
endico%mozilla.org
3d25df00ed merge old changes from when we moved to komodo
git-svn-id: svn://10.0.0.236/trunk@51299 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 21:48:49 +00:00
mscott%netscape.com
2faa0c76f6 optimize nsImapBuildMessageURI to use a nsCAutoString. This saves us an extra allocation of the string later on.
r=sspitzer


git-svn-id: svn://10.0.0.236/trunk@51298 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 21:41:18 +00:00
scc%netscape.com
a83d58083d Now InstallFromManifest "xpcom/components/MANIFEST_COMPONENTS" to get some javascript installed in the apps "Components" directory. This corresponds to work shaver has already done on the other platforms. r=sfraser
git-svn-id: svn://10.0.0.236/trunk@51297 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 21:31:46 +00:00
srinivas%netscape.com
ecb0569df7 The "-mno-486" compiler option is no longer relevant and not supported
in new gcc compilers (v2.95). Bug #15975.


git-svn-id: svn://10.0.0.236/trunk@51296 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 21:19:53 +00:00
bienvenu%netscape.com
0169c2df6e more memory leak fixes, r=mscott
git-svn-id: svn://10.0.0.236/trunk@51295 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 21:18:25 +00:00
bienvenu%netscape.com
3d780d6859 fix rdf resource value leaks r=jefft
git-svn-id: svn://10.0.0.236/trunk@51294 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 21:12:00 +00:00
scc%netscape.com
b029ca73a2 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@51293 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 21:03:21 +00:00
mscott%netscape.com
899ebce13b Bug #16814 --> i found a problem which may be causing us to block in the imap protocol when downloading larger
attachments or images. Basically, the nsMsgLineStreamBuffer class had a fence post bug when determining
if it had enough room to read in more bytes. If the # of free bytes in the stream buffer was 1 byte and we
had just one byte of data left to read in from the incoming stream, we would fail to read in that one byte.
r=sspitzer


git-svn-id: svn://10.0.0.236/trunk@51292 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 21:01:58 +00:00
ftang%netscape.com
c683bbd987 do not do TypedText if the character code is 0. r=brade. Fix bug 16570 and 16811
git-svn-id: svn://10.0.0.236/trunk@51291 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 21:01:20 +00:00
bienvenu%netscape.com
d6cfea3e69 fix mime memory leaks, mostly strings, r=rhp
git-svn-id: svn://10.0.0.236/trunk@51290 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 21:00:02 +00:00
waldemar%netscape.com
28941388eb Changed bottom expressions to syntax error throws
git-svn-id: svn://10.0.0.236/trunk@51289 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 20:58:07 +00:00
waldemar%netscape.com
8a4ea2ca19 Added upper-case Greek letters
git-svn-id: svn://10.0.0.236/trunk@51288 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 20:57:37 +00:00
danm%netscape.com
fe06bcf74b no longer used
git-svn-id: svn://10.0.0.236/trunk@51287 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 20:51:16 +00:00
bienvenu%netscape.com
21c7cb6d78 fix memory leaks of uri's and a progress string r=mscott
git-svn-id: svn://10.0.0.236/trunk@51286 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 20:49:45 +00:00
briano%netscape.com
bd0b8a085b Automated update
git-svn-id: svn://10.0.0.236/trunk@51285 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 20:45:41 +00:00
bienvenu%netscape.com
004de2f422 fix memory leaks in address book r=mscott
git-svn-id: svn://10.0.0.236/trunk@51284 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 20:41:27 +00:00
mcafee%netscape.com
8d734dfcc2 Adding support for --enable-logrefcnt; off by default in optimized builds, we need this for tinderbox. code=dp, r=mcafee
git-svn-id: svn://10.0.0.236/trunk@51283 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 20:40:01 +00:00
law%netscape.com
64d7ceb5a2 Fix for bug #9131; add dependent=yes feature on find dialog so it behaves properly; r=matt@netscape.com
git-svn-id: svn://10.0.0.236/trunk@51282 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 20:36:08 +00:00
bienvenu%netscape.com
f1140e8c6e fix memory leak of notification uri r=dougt
git-svn-id: svn://10.0.0.236/trunk@51281 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 20:30:42 +00:00
akkana%netscape.com
b05d4de40d 15777: Don't declare the same function-static symbol twice in the same file, because some versions of gcc can't deal with it. r=mcafee
git-svn-id: svn://10.0.0.236/trunk@51280 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 20:20:38 +00:00
mcafee%netscape.com
f097b7a2a4 Reviewing and applying pavlov's fix for extra row in color palette. (14315)
git-svn-id: svn://10.0.0.236/trunk@51279 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 20:14:13 +00:00
akkana%netscape.com
2a83eeebf7 16795: Make arrow keys work again.
The gtk event for arrow keys has length=0, but we still need to generate
KeyDown, KeyPress, etc. events for these keys.  r=pavlov


git-svn-id: svn://10.0.0.236/trunk@51277 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 20:04:40 +00:00
dougt%netscape.com
48fd2584d2 removing an extra release (16832)
Now doing a QI when getting a proxy so that the IID matches the |in| real
object.

r=jud


git-svn-id: svn://10.0.0.236/trunk@51276 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 20:04:20 +00:00
akkana%netscape.com
60d8465f63 16844: modifier key presses shouldn't insert anything into the editor. r=brade
git-svn-id: svn://10.0.0.236/trunk@51275 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 20:02:44 +00:00
varada%netscape.com
459ff2f953 fixes for bug #14014 changed EditBox types to Text in the widgets
git-svn-id: svn://10.0.0.236/trunk@51274 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 19:59:00 +00:00
putterman%netscape.com
3a0d0bf033 Fixes 15771 and 10603. Scrolling up in tree widget doesn't lose treeitems. r=hyatt.
git-svn-id: svn://10.0.0.236/trunk@51273 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 19:48:58 +00:00
bienvenu%netscape.com
6b88f85516 fix memory leak of literal string creating rdf node r=scottip
git-svn-id: svn://10.0.0.236/trunk@51272 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 19:06:53 +00:00
scc%netscape.com
0d129de64e eliminate warnings, r=shaver
git-svn-id: svn://10.0.0.236/trunk@51271 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 18:59:00 +00:00
waterson%netscape.com
95123cee1f Bug 15146. Factor nsXULElement's members into prototype and optional 'slots' for heavyweight elements. r=hyatt.
git-svn-id: svn://10.0.0.236/trunk@51270 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 18:55:32 +00:00
cmanske%netscape.com
353d58e800 Fixed bug 16868. r=brade
git-svn-id: svn://10.0.0.236/trunk@51269 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 18:43:56 +00:00
nisheeth%netscape.com
ddb8cb8f28 Changes should not affect build. Ongoing work to make the stopwatch code build on Unix.
git-svn-id: svn://10.0.0.236/trunk@51268 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 18:43:34 +00:00
bienvenu%netscape.com
b205486bc1 fix memory leak of default pref dir file spec r=sspitzer
git-svn-id: svn://10.0.0.236/trunk@51267 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 18:42:30 +00:00
bienvenu%netscape.com
09d199c08a fix memory leaks with mime string bundles and v-cards r=rhp
git-svn-id: svn://10.0.0.236/trunk@51266 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 18:41:49 +00:00
sspitzer%netscape.com
ee0c7447a5 fix for #16820, #16821. r=alecf, a=leaf. fix the pre-select the compose "From" identity
based on the selection in the folder pane.  it broken when I removed the FindServerUsingURI()
method a few days ago.  all better now.


git-svn-id: svn://10.0.0.236/trunk@51265 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 18:31:26 +00:00
leila.garin%eng.sun.com
74762b6d76 Added BWTestThread.java in makefiles, removed print stmt. from TestLoader
git-svn-id: svn://10.0.0.236/trunk@51264 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 17:21:23 +00:00
terry%mozilla.org
3e3cacb732 Ignore the "shadow" and "temp" directories.
git-svn-id: svn://10.0.0.236/trunk@51263 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 16:26:04 +00:00
kipp%netscape.com
deab3a6af2 new
git-svn-id: svn://10.0.0.236/trunk@51262 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 15:31:51 +00:00
kipp%netscape.com
aecc167cc9 Use local images
git-svn-id: svn://10.0.0.236/trunk@51261 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 15:31:26 +00:00
kipp%netscape.com
d4e0127173 Made test run locally without a net
git-svn-id: svn://10.0.0.236/trunk@51260 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 15:31:11 +00:00
terry%mozilla.org
970e03fe63 Fix perl warning.
git-svn-id: svn://10.0.0.236/trunk@51259 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 15:17:37 +00:00
dcone%netscape.com
9abd146c48 Fixed the rounded border rendering code to obey solid, and none style types.
Also bumped all the rounded rects onto pixel boundaries before rendering.


git-svn-id: svn://10.0.0.236/trunk@51258 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 14:46:27 +00:00
law%netscape.com
df6e65595b Fix for bug #?????; Avoid false positive on check for -f cmd line option; r=warren@netscape.com
git-svn-id: svn://10.0.0.236/trunk@51257 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 14:40:25 +00:00
karnaze%netscape.com
6418d90654 Remove caching cell spacing as margin on cells, reducing 16 bytes and avoiding potentially unique style contexts; simplified cell margin calculations; r=troy
git-svn-id: svn://10.0.0.236/trunk@51256 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 14:18:56 +00:00
cmanske%netscape.com
5e0a77611f Fixed bugs 12515, 16493,16494,16495,16692,16794,most of 9758. Replaced old 'target' icon with interim 'anchor' icon. r=sfraser
git-svn-id: svn://10.0.0.236/trunk@51255 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 14:15:25 +00:00
terry%mozilla.org
bf28c3efd8 Fix perl warning.
git-svn-id: svn://10.0.0.236/trunk@51254 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 14:12:43 +00:00
mscott%netscape.com
2f8bc8e00f Bug #16843 and #16832 where we were crashing when dismissing dialogs. this may not be the final
fix but in an earlier change to this file today, this class stopped addreffing an event queue member variable.
But the dtor still released a reference to the event queue that it didn't have!
The eventual fix may be to put the addref back in there but I need to talk to dougt about this.

this is real danm's fix. i'm the reviewer.


git-svn-id: svn://10.0.0.236/trunk@51253 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 08:35:36 +00:00
danm%netscape.com
f98e5e2bc8 fixing obvious flaw in Unlink. r:waterson@netscape.com
git-svn-id: svn://10.0.0.236/trunk@51252 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 08:35:04 +00:00
tbogard%aol.net
501277d9f2 Integrated some changes made by buster. Still talking some them over, but here for now.
git-svn-id: svn://10.0.0.236/trunk@51251 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 07:37:37 +00:00
cls%seawood.org
47d0316267 Some compilers complain if you declare variables after a potential goto call so move the declarations to the top of the function. Should fix the linux libc5 SM-Ports tinderbox & gcc 2.95 builds.
a=mscott


git-svn-id: svn://10.0.0.236/trunk@51250 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 05:40:05 +00:00
cls%seawood.org
31fb034e97 Use PRBool instead of bool as some compilers do not understand bool. Should fix a couple of SM-Ports tinderboxen.
r=sfraser a=mscott


git-svn-id: svn://10.0.0.236/trunk@51249 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 05:37:18 +00:00
waldemar%netscape.com
e9e8df96c5 Removed types from bottom expressions
git-svn-id: svn://10.0.0.236/trunk@51245 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 02:27:53 +00:00
waldemar%netscape.com
ed5c56be64 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@51244 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 02:27:34 +00:00
law%netscape.com
95fc4f832f Fixes for bug #16789; permit OpenDialog to work on hidden window even if document load has not completed yet; r=norris@netscape.com, r=danm@netscape.com
git-svn-id: svn://10.0.0.236/trunk@51243 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 01:25:41 +00:00
cmanske%netscape.com
a978b9e92b Changed a comment. This and last checkin were reviewed by mjudge
git-svn-id: svn://10.0.0.236/trunk@51241 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 01:06:05 +00:00
cmanske%netscape.com
22bf05aebd Adding menu item to start Composer from Browser debug menu as workaround for bug 16789 (can't start editor on command line). Also removed editor init page from code that's not even run?
git-svn-id: svn://10.0.0.236/trunk@51240 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 01:03:39 +00:00
edburns%acm.org
8af706c11b Added Swing webclient test code and windows makefile mods.
Author=Ann Sunhachawee
r=edburns@acm.org
Approver=edburns@acm.org
Bug=http://bugzilla.mozilla.org/show_bug.cgi?id=16842


git-svn-id: svn://10.0.0.236/trunk@51239 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 00:49:28 +00:00
waldemar%netscape.com
cc0c52492a Changed syntax of getters and setters to "get name" and "set name". Relaxed grammar constraints on definitions. Changed over to colon syntax for types. Added local visibility and block modifiers.
git-svn-id: svn://10.0.0.236/trunk@51238 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 00:46:31 +00:00
evaughan%netscape.com
e5f071ac53 fixed numerous warnings. Reviewed by Hyatt.
git-svn-id: svn://10.0.0.236/trunk@51237 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 00:46:21 +00:00
waldemar%netscape.com
83bc932793 Removed octal escapes. Replaced bottom by throw of syntax error.
git-svn-id: svn://10.0.0.236/trunk@51236 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 00:43:58 +00:00
waldemar%netscape.com
db1c1b6e5e Removed octals. Removed rational-to-integer, which was replaced by semantic subtyping. Replaced bottom by throw of syntax error.
git-svn-id: svn://10.0.0.236/trunk@51235 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 00:43:22 +00:00
waldemar%netscape.com
11aeb1c87d Removed rational-to-integer and types in bottom calls, which were replaced by semantic subtyping
git-svn-id: svn://10.0.0.236/trunk@51234 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 00:42:17 +00:00
waldemar%netscape.com
f02f9a2f0c Removed rational-to-integer, which was replaced by semantic subtyping
git-svn-id: svn://10.0.0.236/trunk@51233 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 00:41:59 +00:00
waldemar%netscape.com
1234934b00 Added semantic subtyping, throw, and catch
git-svn-id: svn://10.0.0.236/trunk@51232 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 00:40:55 +00:00
waldemar%netscape.com
bc5b327059 Fixed bug that would sometimes emit a newline between a backslash and its following escaped character
git-svn-id: svn://10.0.0.236/trunk@51231 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 00:40:04 +00:00
terry%mozilla.org
60beb90ee5 Fixed stupid perl warning.
git-svn-id: svn://10.0.0.236/trunk@51230 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 00:27:16 +00:00
alecf%netscape.com
30aa1d1d5c remove old gifs
git-svn-id: svn://10.0.0.236/trunk@51229 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 00:19:23 +00:00
alecf%netscape.com
ba963eb07e remove old gif
git-svn-id: svn://10.0.0.236/trunk@51228 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 00:18:32 +00:00
alecf%netscape.com
1bfdda92a8 remove unused images
git-svn-id: svn://10.0.0.236/trunk@51227 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 00:15:50 +00:00
mcafee%netscape.com
fcf9fe791f minor whitespace
git-svn-id: svn://10.0.0.236/trunk@51226 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 00:14:23 +00:00
larryh%netscape.com
2efaf6b409 BugSplat 367096
git-svn-id: svn://10.0.0.236/trunk@51225 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 00:12:37 +00:00
norris%netscape.com
b2e9644e2b Work on 1646 [DOGFOOD] javascript: URLs aren't working
r=mstoltz


git-svn-id: svn://10.0.0.236/trunk@51224 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 00:12:04 +00:00
alecf%netscape.com
59c413637f remove old gifs
git-svn-id: svn://10.0.0.236/trunk@51223 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 00:11:46 +00:00
larryh%netscape.com
eb823e8216 BugSplat 367096
git-svn-id: svn://10.0.0.236/trunk@51222 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 00:07:01 +00:00
terry%mozilla.org
11426df64d Fixed stupid perl warning.
git-svn-id: svn://10.0.0.236/trunk@51221 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 00:06:41 +00:00
kipp%netscape.com
7903586ee4 Removed some silly warnings
git-svn-id: svn://10.0.0.236/trunk@51220 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 00:06:12 +00:00
despotdaemon%netscape.com
4f6f8b68b0 Pseudo-automatic update of changes made by jmas@softcatala.org.
git-svn-id: svn://10.0.0.236/trunk@51219 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 23:58:29 +00:00
kipp%netscape.com
32b2148862 Added new test
git-svn-id: svn://10.0.0.236/trunk@51218 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 23:53:31 +00:00
despotdaemon%netscape.com
fc8c4bd300 Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@51217 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 23:51:38 +00:00
pollmann%netscape.com
e0757a21ca Bug 15729: Fall back to content when getting text value; r=vidur
git-svn-id: svn://10.0.0.236/trunk@51216 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 23:43:58 +00:00
selmer%netscape.com
b2360b9a85 fix for crash on cancel newconfig dialog
git-svn-id: svn://10.0.0.236/trunk@51215 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 23:43:13 +00:00
alecf%netscape.com
959275c4ac return null identity on null or empty key
no bug
r=sspitzer


git-svn-id: svn://10.0.0.236/trunk@51214 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 23:37:54 +00:00
dveditz%netscape.com
c097cd276c reenabling 6986-fix for the mac, r-dougt
git-svn-id: svn://10.0.0.236/trunk@51213 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 23:17:54 +00:00
despotdaemon%netscape.com
efa03bb824 Pseudo-automatic update of changes made by jmas@softcatala.org.
git-svn-id: svn://10.0.0.236/trunk@51212 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 23:13:07 +00:00
leaf%mozilla.org
843c7df9fb adding mozilla/embedding and mozilla/docshell to SeaMonkeyCore
git-svn-id: svn://10.0.0.236/trunk@51211 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 23:09:34 +00:00
kipp%netscape.com
3096ad4a52 r=ftang; fixed off by one error that made return value oPrev inconsistent
git-svn-id: svn://10.0.0.236/trunk@51210 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 23:06:27 +00:00
kipp%netscape.com
4befc8fe5e Added more tests
git-svn-id: svn://10.0.0.236/trunk@51209 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 23:04:55 +00:00
kipp%netscape.com
2d9044ac40 new
git-svn-id: svn://10.0.0.236/trunk@51208 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 23:04:33 +00:00
kipp%netscape.com
9c72c46de9 Fixed O(N^2) debug logic bug; speed up paint loop by avoiding painting too much now that we have combined-area (bug 7455, 12297)
git-svn-id: svn://10.0.0.236/trunk@51207 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 23:04:19 +00:00
kipp%netscape.com
bbbab95269 update to new nsTextTransformer api
git-svn-id: svn://10.0.0.236/trunk@51206 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 23:01:58 +00:00
kipp%netscape.com
6b051cc38a r=ftang; rewrite to fix 16656, parts of 7455
git-svn-id: svn://10.0.0.236/trunk@51205 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 23:01:45 +00:00
kipp%netscape.com
d6884c9b41 Init text-transformer during module setup to save cycles (bug 7455)
git-svn-id: svn://10.0.0.236/trunk@51204 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 23:01:23 +00:00
amusil%netscape.com
1d95656844 Fixed bug in editing anonymous attributes in database. Now all attributes get modified instead
of only the first.


git-svn-id: svn://10.0.0.236/trunk@51203 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 22:46:29 +00:00
tbogard%aol.net
c820ac974d More documentation and clean-up of the interfaces.
git-svn-id: svn://10.0.0.236/trunk@51202 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 22:40:28 +00:00
tbogard%aol.net
e5684d8a64 Added some documentation.
git-svn-id: svn://10.0.0.236/trunk@51201 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 22:39:57 +00:00
nisheeth%netscape.com
fedd700745 Checkin does not affect build. If MOZ_PERF is set to 1 define the compiler define MOZ_PERF_METRICS for the windows build.
git-svn-id: svn://10.0.0.236/trunk@51200 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 22:37:53 +00:00
valeski%netscape.com
cc447b7234 14659, r=gagan&warren&dougt
Misc. FTP changes:
*increased FTP buffer read/write size from 4k to 8k.
*removed un-needed (for now) SetPASV() for FTP connection thread
*string optimizations
*FTP Connection thread now uses the NS_IMPL_ISUPPORTS4 macro for addref, rel, and QI methods.
*connection cache key api consolidation (Get()/Remove() combo turned into Remove(key)).

Authentication dialog changes:
*Authentication dialog now includes host name the user is trying to connect to.

nsIRequest support:
*FTP Connection thread now maintains a member variable pointing to it's event queue. It also pumps the event queue in the main loop.
*FTP Connection thread now implemented the nsIRequest interface (never called directly; only via the nsFTPChannel api)
*FTP Channel now uses an xpcom proxy object to make the nsIRequest api calls on the FTP Connection thread.

FTP protocol interpretation changes:
*FTP now handles servers that send multi-line greetings in the first Read() (we blocked indefinately before)
*FTP now parses the parent working directory properly (used to always treat it as '/')


git-svn-id: svn://10.0.0.236/trunk@51199 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 22:37:47 +00:00
dougt%netscape.com
0377b9291c Fix for bug 16818. xpcom proxy does not handle classes with two or more
interfaces correctly.  What happens is the real object is addref
incorrectly and will never be deleted.

r=jud


git-svn-id: svn://10.0.0.236/trunk@51198 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 22:35:54 +00:00
dp%netscape.com
fabbeba48e Fixed warnings. r=pam nunn
git-svn-id: svn://10.0.0.236/trunk@51197 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 22:28:38 +00:00
nisheeth%netscape.com
b7fab4e31c Changes should not affect the build. Renaming the RAPTOR_PERF_METRICS ifdef to MOZ_PERF_METRICS.
git-svn-id: svn://10.0.0.236/trunk@51196 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 22:27:20 +00:00
dp%netscape.com
bf856b8053 Converting implementations of QueryInterface() to the std one. This
fixes bugs in the previous implementation that caused unbalanced
refcounts and premature releases. Thanks for rpotts for the heads
up. r=pam nunn


git-svn-id: svn://10.0.0.236/trunk@51195 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 22:27:08 +00:00
cathleen%netscape.com
1f3c5b3ef3 add txmgr.xpt to core list, like the rest of the editor files.
also removed a couple of obsolete files from the list


git-svn-id: svn://10.0.0.236/trunk@51194 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 22:03:29 +00:00
pnunn%netscape.com
c88ef4fe6e clean up associated with bug#15817, gif decoder. r: dp@netscape.com.
Removing obsolete file.


git-svn-id: svn://10.0.0.236/trunk@51193 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 22:02:49 +00:00
warren%netscape.com
077b0c94d4 Added 'PageCycler' code so that we can iterate through URL loads (by calling mozilla.exe -f <file-of-urls>). We need this for adding bloat/leaks info to tinderbox. r=law
git-svn-id: svn://10.0.0.236/trunk@51192 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 22:01:28 +00:00
danm%netscape.com
855118ba4a retire event queues even on Windows when they're no longer used. part of bug 15856. r:hyatt@netscape.com
git-svn-id: svn://10.0.0.236/trunk@51191 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 22:00:12 +00:00
rods%netscape.com
2a900deed8 The code that checked to see whether it should explicitly set focus on the gfx's containing widget
now uget the new focused content's frame instead of using the mCurrentTarget. The mCurrentTarget
is correct for a mouse down but incorrect for a "tab". This is because the mCurrentTarget points at
the currently focused content for a tab event, instead of the new content.
r=joki, bug 11162


git-svn-id: svn://10.0.0.236/trunk@51190 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 21:57:43 +00:00
pnunn%netscape.com
cc3d6490a5 bug# 16785. r: dp, valeski, neeti. Send mimetype info from channel to imglib.
If no decoder, sniff data stream for mime info.


git-svn-id: svn://10.0.0.236/trunk@51189 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 21:49:20 +00:00
alla%lysator.liu.se
cba2b194ce Update the GtkMozilla widget so it works. Also updated the streaming interface
so that it works with Necko. Small cleanups.
Fixes 16576 and 14975. r=shaver


git-svn-id: svn://10.0.0.236/trunk@51188 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 21:46:33 +00:00
norris%netscape.com
0b51721d30 Remove references to unsupported JVM_ calls. Needed for bug 16577.
r=shaver


git-svn-id: svn://10.0.0.236/trunk@51187 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 21:45:29 +00:00
dp%netscape.com
41b9a6b713 Removing prototype of NS_NewDocumentElementFrame. r=evaughan
git-svn-id: svn://10.0.0.236/trunk@51186 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 21:40:54 +00:00
locka%iol.ie
1e319234e1 Implemented ShowContextMenu so that CBrowse can display custom popup menus in response to right mouse clicks
git-svn-id: svn://10.0.0.236/trunk@51185 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 21:39:42 +00:00
tbogard%aol.net
ab0c88be9a Ooops, last night removing one warning uncovered another. r=gimpy
git-svn-id: svn://10.0.0.236/trunk@51184 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 21:34:21 +00:00
terry%mozilla.org
d1fca29577 Need to value_quote() things that go into VALUE attributes in HTML.
git-svn-id: svn://10.0.0.236/trunk@51183 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 21:27:41 +00:00
despotdaemon%netscape.com
a0b1fe8617 Pseudo-automatic update of changes made by paw@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@51182 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 21:26:55 +00:00
endico%mozilla.org
2e29901945 align "edit products" at the top so its not lost 3 screens down in the products list.
git-svn-id: svn://10.0.0.236/trunk@51181 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 21:26:39 +00:00
bienvenu%netscape.com
bad04c3403 fix nsImapProtocol leaks r=mscott, no bug #
git-svn-id: svn://10.0.0.236/trunk@51180 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 21:24:31 +00:00
pierre%netscape.com
9264bc9c89 added stopwatch.cpp to the mac build for nisheeth
git-svn-id: svn://10.0.0.236/trunk@51179 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 21:12:14 +00:00
slamm%netscape.com
4481922240 Handle clicks properly. Fix for 14857 and 11986. r=rjc
git-svn-id: svn://10.0.0.236/trunk@51178 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 21:11:39 +00:00
cathleen%netscape.com
2d960ed1c1 additional cleanup, and previous checked in added wallet chrome files, partial fix for bug 15220
git-svn-id: svn://10.0.0.236/trunk@51177 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 21:09:04 +00:00
rogerl%netscape.com
4e16b4e094 r=norris
Delayed functionDef from creating property until after the body parses
succesfully.


git-svn-id: svn://10.0.0.236/trunk@51176 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 21:07:45 +00:00
mscott%netscape.com
2fc150a6c8 no bug number. I found that we were making an extra copy of the message body before writing it to the stream.
I was able to fix this by using a nsCString instead of an nsString for the message body. Also, audited the file
to use nsCAutoString instead of nsString to save some extra copying. Used NS_WITH_SERVICE macros for componenet
mananager and register service. Added some com ptr useage too.
r=rhp


git-svn-id: svn://10.0.0.236/trunk@51175 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 21:06:42 +00:00
rogerl%netscape.com
d0725e4d4e r=norris
Fixed bug #12951 - var if for..in statement should always be of type
string.


git-svn-id: svn://10.0.0.236/trunk@51174 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 21:06:03 +00:00
neeti%netscape.com
ee6aa2ffd0 updating status
git-svn-id: svn://10.0.0.236/trunk@51172 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 21:03:33 +00:00
cathleen%netscape.com
0fffda37f6 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@51170 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 21:02:43 +00:00
mscott%netscape.com
6823e8565b Bug #16538 --> pass the emitter into NS_NewPipe as a pipe observer.
r=jefft


git-svn-id: svn://10.0.0.236/trunk@51169 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 21:02:27 +00:00
mscott%netscape.com
7524389c82 Bug #16538 --> the emitter now supports nsIPipeObserver and we'll now flush our output stream when we are told
it is full. This fixes the problem where large attachements were truncated at 32K.
r=jefft


git-svn-id: svn://10.0.0.236/trunk@51168 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 21:01:54 +00:00
Jerry.Kirk%Nexwarecorp.com
c40a73a776 Fixes to correct lots of extra drawing because of incorrectly clipped regions
Bug #16698 r=kedl


git-svn-id: svn://10.0.0.236/trunk@51167 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 20:50:17 +00:00
selmer%netscape.com
2ff1cb0969 CheckListBox supports descriptions (bug #4884)
git-svn-id: svn://10.0.0.236/trunk@51166 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 20:30:18 +00:00
norris%netscape.com
d201925571 7261 Connect XPConnect visibility filter to query principals
Reviewed by mstoltz.


git-svn-id: svn://10.0.0.236/trunk@51165 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 20:28:24 +00:00
rods%netscape.com
15f62c11c2 cleaned up warning, result hidding another, r=kmcclusk, (no bug)
git-svn-id: svn://10.0.0.236/trunk@51164 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 19:59:06 +00:00
rods%netscape.com
959963c9b8 fixed several warning and fixed setting the wrap property enum to off r=kmcclusk, bug 16770
git-svn-id: svn://10.0.0.236/trunk@51163 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 19:58:07 +00:00
rods%netscape.com
88de486c18 removed comma after last enum, warning clean up, r=kmcclusk (no bug)
git-svn-id: svn://10.0.0.236/trunk@51162 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 19:56:35 +00:00
varada%netscape.com
0d2cedd9ae setting focus in edit boxes in dialog boxeson init
git-svn-id: svn://10.0.0.236/trunk@51161 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 19:53:40 +00:00
beard%netscape.com
45cf1dc448 for JBindery runner, added System.exit()
git-svn-id: svn://10.0.0.236/trunk@51160 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 19:43:31 +00:00
rpotts%netscape.com
0f75f32b71 bug #15560. Changed the LoadGroup to fire notifications via PLEvents to stop reenterency.
git-svn-id: svn://10.0.0.236/trunk@51159 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 19:42:55 +00:00
terry%mozilla.org
d49cc3e1d1 Fixed perl warning.
git-svn-id: svn://10.0.0.236/trunk@51158 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 19:42:49 +00:00
rpotts%netscape.com
cd23316388 bug #15560. Changed the LoadGroup to fire notifications via PLEvents to stop reenterency.
git-svn-id: svn://10.0.0.236/trunk@51157 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 19:36:07 +00:00
danm%netscape.com
88e77696a0 added CreateFromIThread. r:valeski@netscape.com
git-svn-id: svn://10.0.0.236/trunk@51156 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 19:18:27 +00:00
troy%netscape.com
36419b7094 b=16781, r=vidur@netscape.com
Re-ordered destructor to delete maps after destroying the frame hierarchy


git-svn-id: svn://10.0.0.236/trunk@51154 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 19:06:37 +00:00
locka%iol.ie
1468b5f4ac Updated to include new registry entries
git-svn-id: svn://10.0.0.236/trunk@51153 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 19:06:31 +00:00
selmer%netscape.com
3fd4887790 Removing Recede...
git-svn-id: svn://10.0.0.236/trunk@51152 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 19:06:29 +00:00
selmer%netscape.com
5bdff5a335 Putting button names back
git-svn-id: svn://10.0.0.236/trunk@51151 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 19:04:11 +00:00
shaver%netscape.com
2d88ea3522 corrected assembly, from Ulrich Drepper <drepper@cygnus.com> (16612, r=shaver)
git-svn-id: svn://10.0.0.236/trunk@51150 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 19:03:01 +00:00
pollmann%netscape.com
7c466fda74 Bug 16725: Enable align attribute for iframe; r=harishd
git-svn-id: svn://10.0.0.236/trunk@51149 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 19:01:49 +00:00
selmer%netscape.com
7dac51627e Interpret functions moved to interpret.cpp; memory allocations cleaned up
git-svn-id: svn://10.0.0.236/trunk@51148 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 18:58:38 +00:00
leila.garin%eng.sun.com
46abc39ebf New perl automated script.
git-svn-id: svn://10.0.0.236/trunk@51147 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 18:48:53 +00:00
despotdaemon%netscape.com
494eaeb121 Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@51146 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 17:34:13 +00:00
despotdaemon%netscape.com
8b64d99548 Pseudo-automatic update of changes made by exv@randomc.com.
git-svn-id: svn://10.0.0.236/trunk@51145 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 17:20:25 +00:00
terry%mozilla.org
9195dc1900 Fixed perl warnings.
git-svn-id: svn://10.0.0.236/trunk@51144 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 16:41:40 +00:00
norris%netscape.com
bd1c7245f6 Fixed bug. We weren't loading classes in bottom-up dependency order.
Subject:
            Re: another getClassLoader exception
       Date:
            Mon, 18 Oct 1999 22:01:24 -0400
      From:
            Andrew Wason <aw@softcom.com>
        To:
            norris@netscape.com (Norris Boyd)
        CC:
            Howard Lin <howard@softcom.com>
 References:
            1 , 2




At 05:03 PM 10/18/99 -0700, Norris Boyd wrote:
>Are you still seeing this problem?


Yes.  I just did a CVS update to get the latest stuff and we still have
this problem.

I wrote a standalone sample program that duplicates the problem.  Run
JSSupport and you should get this exception:

defineClass org.mozilla.javascript.gen.c2
Exception in thread "main" java.lang.NoClassDefFoundError:
org/mozilla/javascript/gen/c1
         at java.lang.ClassLoader.resolveClass0(Native Method)
         at java.lang.ClassLoader.resolveClass(ClassLoader.java:545)
         at
JSSupport$MySecuritySupport$DataClassLoader.loadClass(JSSupport.java:89)
         at JSSupport$MySecuritySupport.defineClass(JSSupport.java:47)
         at org.mozilla.javascript.optimizer.Codegen.compile(Codegen.java,
Compiled Code)
         at org.mozilla.javascript.Context.compile(Context.java:1761)
         at org.mozilla.javascript.Context.compile(Context.java:1691)
         at org.mozilla.javascript.Context.compileReader(Context.java:810)
         at org.mozilla.javascript.Context.evaluateReader(Context.java:725)
         at org.mozilla.javascript.Context.evaluateString(Context.java:692)
         at JSSupport.<init>(JSSupport.java:20)
         at JSSupport.main(JSSupport.java:9)



Andrew



>--N
>
>Andrew Wason wrote:
>
> > At 04:54 PM 10/12/99 -0700, Norris Boyd wrote:
> > >I just checked in changes so that the class calling ScriptRuntime (c5
> in your
> > >case) will load the class itself using the normal Java classloading
> mechanism
> > >rather than an explicit call to the class loader. I pushed the bits up
> to the
> > >ftp site, but it takes a bit to propagate.
> >
> > I get this exception now (debugging statements are from my code):
> >
> > SecuritySupport.defineClass org.mozilla.javascript.gen.c5
> > DataClassLoader.loadClass org.mozilla.javascript.gen.c5
> > DataClassLoader.loadClass org.mozilla.javascript.gen.c4
> > using default loader com.softcom.realjava.PluginClassLoader@da9486a0
> > java.lang.NoClassDefFoundError: org/mozilla/javascript/gen/c4
> >          at java.lang.ClassLoader.resolveClass0(Native Method)
> >          at java.lang.ClassLoader.resolveClass(ClassLoader.java:545)
> >          at
> >
> com.softcom.realjava.plugins.RealJavaScript$RealJavaScriptSecuritySupport$Da
> > taClassLoader.loadClass(RealJavaScript.java:410)
> >          at
> >
> com.softcom.realjava.plugins.RealJavaScript$RealJavaScriptSecuritySupport.de
> > fineClass(RealJavaScript.java:352)
> >          at org.mozilla.javascript.optimizer.Codegen.compile(Codegen.java,
> > Compiled Code)
> >          at org.mozilla.javascript.Context.compile(Context.java:1761)
> >          at org.mozilla.javascript.Context.compile(Context.java:1691)
> >          at org.mozilla.javascript.Context.compileReader(Context.java:810)
> >
> > So when c5 is being loaded by my SecuritySupport, it also needs to load c4.
> > I decompiled org.mozilla.javascript.gen.c5 and it's constant pool
> > references CLASS org.mozilla.javascript.gen.c4, so c5 is dependent on c4
> > being loadable.  Is the problem that c5 is being loaded before the
> > optimizer has defined c4?
> >
> > I get the above exception for some classes and not others.  It seems
> > consistent that I always get it for classes with dependencies on other
> > optimizer classes that haven't been generated yet.
> >
> > Andrew
> >
> > --
> > Andrew Wason
> > SoftCom, Inc.
> > aw@softcom.com

--
Andrew Wason
SoftCom, Inc.
aw@softcom.com



   JSSupport.java

                  Name:
                         JSSupport.java
                   Type:
                         Java Source File (text/java)
                Encoding:
                         base64


git-svn-id: svn://10.0.0.236/trunk@51143 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 16:38:23 +00:00
terry%mozilla.org
c94f0dfbd5 Fixed perl warnings.
git-svn-id: svn://10.0.0.236/trunk@51142 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 16:33:06 +00:00
terry%mozilla.org
4d41190cf3 This was using complicated perl features I don't understand, so I simplified it and it works now...
git-svn-id: svn://10.0.0.236/trunk@51141 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 16:24:48 +00:00
terry%mozilla.org
fae1be4423 Fixed perl warning.
git-svn-id: svn://10.0.0.236/trunk@51140 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 15:07:27 +00:00
terry%mozilla.org
c51e515d06 Fix perl warnings.
git-svn-id: svn://10.0.0.236/trunk@51139 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 15:05:16 +00:00
brade%netscape.com
736ea51be4 add images from Dan Haddix (r=pavlov@pavlov.net)
git-svn-id: svn://10.0.0.236/trunk@51138 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 14:53:55 +00:00
bienvenu%netscape.com
22abb4e345 fix ref count logging on nsMimeImpl r=warren
git-svn-id: svn://10.0.0.236/trunk@51137 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 14:50:09 +00:00
brade%netscape.com
d885aed29d add images from Dan Haddix (r=rods@netscape.com)
git-svn-id: svn://10.0.0.236/trunk@51136 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 14:44:01 +00:00
troy%netscape.com
0bdf9140d7 Changes to frame property API (code's not being used yet)
git-svn-id: svn://10.0.0.236/trunk@51135 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 14:41:55 +00:00
rods%netscape.com
186216cd35 changed font-family and margin settings for input text and textareas
r-kmcclusk, Bug #4072


git-svn-id: svn://10.0.0.236/trunk@51134 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 13:39:59 +00:00
brade%netscape.com
f27c8ca4ba function for image map editor added (contributed by Dan Haddix)
git-svn-id: svn://10.0.0.236/trunk@51133 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 13:34:34 +00:00
brade%netscape.com
156010fda2 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@51132 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 13:32:22 +00:00
brade%netscape.com
2eaffc0b34 add images for Dan Haddix (image map editor)
git-svn-id: svn://10.0.0.236/trunk@51131 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 13:31:25 +00:00
rods%netscape.com
d3a58b07b8 Changed the sizing comparison for NavQuirks in debug mode to get the font family and size
for the input text  and textarea, I also changed the border calc for only when the
the size is explicitly set.
r=kmcclusk, Bug #3040,11285


git-svn-id: svn://10.0.0.236/trunk@51130 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 11:59:01 +00:00
rods%netscape.com
701a5f632f Moved GetWrapProperty to nsFormControlHelper
Changed add the added of scrollbar sizes for Standard mode
r=kmcclusk, Bug #3040,11285


git-svn-id: svn://10.0.0.236/trunk@51129 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 11:58:53 +00:00
rods%netscape.com
94117fe06b Added methods for getting a frame's current font and
for calculating the nsIFormControlFrame's NavQuirks size
Added two methods for getting the "wrap" property and andded a new enum
for for testing against instead of a string
Added a method for calculating the size when in NavQuirks modes, this currently
duplicates the algorithms for for input text and textareas
r=kmcclusk, Bug #3040,11285


git-svn-id: svn://10.0.0.236/trunk@51128 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 11:58:50 +00:00
rods%netscape.com
4df3a52095 Removed old commented out code and unused comments. r=kmcclusk, (no bug)
git-svn-id: svn://10.0.0.236/trunk@51127 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 11:35:17 +00:00
rods%netscape.com
7df83f9c8c Added a method in the debug build to return the Navigator size for a given
for control for a given font family and size. Used for NavQuirks testing only.
r=kmcclusk, Bugs #3040, 4072


git-svn-id: svn://10.0.0.236/trunk@51126 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 11:34:00 +00:00
rickg%netscape.com
6dafd0deac fixed bug 16584; CRCRLF not handled correctly. r=syd
git-svn-id: svn://10.0.0.236/trunk@51125 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 08:52:30 +00:00
tbogard%aol.net
b70777ae81 Removed the last of gimpy's warnings. r=gimpy.
git-svn-id: svn://10.0.0.236/trunk@51124 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 08:03:11 +00:00
jband%netscape.com
88ae89c00d trivial fix to get rid of warning from copy/paste error - was passing unused argument to printf
git-svn-id: svn://10.0.0.236/trunk@51123 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 08:00:29 +00:00
tbogard%aol.net
4d16c8e921 Another warning. r=gimpy.
git-svn-id: svn://10.0.0.236/trunk@51122 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 07:59:20 +00:00
tbogard%aol.net
b17c3685f5 Fixed a few more of gimpy's warnings..... Oh, we found a bug there. r=gimpy Total warnings now under 200!
git-svn-id: svn://10.0.0.236/trunk@51121 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 07:57:51 +00:00
tbogard%aol.net
8b7f08fbc0 Removing gimpy's warnings. r=gimpy. This brings us down to 200. :)
git-svn-id: svn://10.0.0.236/trunk@51120 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 07:50:55 +00:00
tbogard%aol.net
ceae1958d8 Removed border from the XUL browser, editor, and iframe tags. This allows content coming up in chromeless pop-up windows not be visually cluttered with a needless border. r=hyatt.
git-svn-id: svn://10.0.0.236/trunk@51119 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 07:40:44 +00:00
cls%seawood.org
beb3488154 Add newline at end of file for broken compilers.
git-svn-id: svn://10.0.0.236/trunk@51118 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 06:40:25 +00:00
beard%netscape.com
8af0179bfb changed NSLibraryStartup.o to NSComponentStartup.o, since it's really a component. r=jband
git-svn-id: svn://10.0.0.236/trunk@51117 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 06:31:49 +00:00
jband%netscape.com
defd5464f8 fixing brendan's copy/paste bug that broke gc. r=shaver
git-svn-id: svn://10.0.0.236/trunk@51116 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 05:58:07 +00:00
dp%netscape.com
ab76ab5c8c Fixing warning. Moved declaration into if 0 block.
git-svn-id: svn://10.0.0.236/trunk@51115 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 05:49:04 +00:00
cls%seawood.org
8644b9e14b Use PR_TRUE instead of c++ keyword "true" in case of broken/out-of-date compilers.
r=syd


git-svn-id: svn://10.0.0.236/trunk@51114 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 05:38:27 +00:00
cls%seawood.org
0d7e9393fb Syncing Makefile.ins with srinivas' previous checkin.
r=shaver


git-svn-id: svn://10.0.0.236/trunk@51113 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 05:30:36 +00:00
troy%netscape.com
85565b9667 Changed a comment
git-svn-id: svn://10.0.0.236/trunk@51112 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 05:00:30 +00:00
troy%netscape.com
670fa6c8d6 Change to code that's not currently being used. Before it gets used it
will get code reviewed


git-svn-id: svn://10.0.0.236/trunk@51111 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 04:52:33 +00:00
troy%netscape.com
a34fdc41e1 Didn't actually change anything. Just moved two functions up higher in the
file to make the Solaris compiler happy...


git-svn-id: svn://10.0.0.236/trunk@51110 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 04:50:34 +00:00
selmer%netscape.com
727f93afc4 Minor cleanup
git-svn-id: svn://10.0.0.236/trunk@51109 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 03:46:54 +00:00
alecf%netscape.com
5e8b124880 event targets for checkboxes now reflect reality
(just a test, not part of product)


git-svn-id: svn://10.0.0.236/trunk@51108 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 03:16:45 +00:00
jefft%netscape.com
668bbc4967 removed obsolete menubar xul tag; fixed bug 16145; r=rhp, ducarroz; a=dp
git-svn-id: svn://10.0.0.236/trunk@51107 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 03:08:43 +00:00
waterson%netscape.com
6a8fd22671 Obsolete.
git-svn-id: svn://10.0.0.236/trunk@51106 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 03:05:25 +00:00
beard%netscape.com
de43edf0b2 fixed histogram sorting.
git-svn-id: svn://10.0.0.236/trunk@51105 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 03:03:12 +00:00
pierre%netscape.com
bdfce7679a Fix build in Mac embedding apps after last week's changes in nsIWebShell.
git-svn-id: svn://10.0.0.236/trunk@51104 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 03:02:01 +00:00
pierre%netscape.com
f1aa92ba58 Fix a crash in Mac embedding apps: HasGfxScrollBars() checks for null pointer after calling GetPrefs().
git-svn-id: svn://10.0.0.236/trunk@51103 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 03:00:47 +00:00
alecf%netscape.com
de2e6cfb95 land new DOMViewer branch
no reviewer, not part of product, just a test


git-svn-id: svn://10.0.0.236/trunk@51102 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 02:46:45 +00:00
selmer%netscape.com
7f47a31e88 Fixes to make enable/disable work in checklist.ini
git-svn-id: svn://10.0.0.236/trunk@51100 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 02:41:48 +00:00
Jerry.Kirk%Nexwarecorp.com
9518fbd96c moving Push/PopThreadEventQueue to nsIEventQueueService.
This is required to get anythinbg to work now...
r=danm@netscape.com


git-svn-id: svn://10.0.0.236/trunk@51099 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 02:26:53 +00:00
endico%mozilla.org
b6decda29b search patterns are limited to 29 characters due to the -n option in glimpse
git-svn-id: svn://10.0.0.236/trunk@51098 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 02:14:09 +00:00
despotdaemon%netscape.com
77a9ed2910 Pseudo-automatic update of changes made by pfong@julian.uwo.ca.
git-svn-id: svn://10.0.0.236/trunk@51097 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 02:04:40 +00:00
alecf%netscape.com
6557db6b98 Start to land DOMViewer branch (extension - not part of product)
git-svn-id: svn://10.0.0.236/trunk@51096 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 02:01:40 +00:00
selmer%netscape.com
e654e9fdbb Changed interpretation & initialization to use onInit and onCommand INI file directives
git-svn-id: svn://10.0.0.236/trunk@51094 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 01:30:18 +00:00
slamm%netscape.com
0bbf0c1cfd Fix build bustage
git-svn-id: svn://10.0.0.236/trunk@51093 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 01:29:44 +00:00
sspitzer%netscape.com
ed6cbe944d other part of fix for #15235. fix send later. r=alecf
git-svn-id: svn://10.0.0.236/trunk@51092 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 01:24:25 +00:00
sspitzer%netscape.com
a8b4e077c5 part of fix for #15235. get send later to work again. r=alecf
git-svn-id: svn://10.0.0.236/trunk@51091 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 01:23:54 +00:00
despotdaemon%netscape.com
49bc011b9b Pseudo-automatic update of changes made by jfalzon@julian.uwo.ca.
git-svn-id: svn://10.0.0.236/trunk@51090 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 01:11:16 +00:00
dougt%netscape.com
fa7e2137bd Fix for bug 14784. Moved pref item up. r=cathleen.
git-svn-id: svn://10.0.0.236/trunk@51089 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 01:01:51 +00:00
despotdaemon%netscape.com
569c5aba2d Pseudo-automatic update of changes made by scosta@julian.uwo.ca.
git-svn-id: svn://10.0.0.236/trunk@51088 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 00:51:34 +00:00
srinivas%netscape.com
263860675d Update with post-3.5 fixes on the tip
git-svn-id: svn://10.0.0.236/trunk@51087 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 00:40:39 +00:00
pierre%netscape.com
51196f76b4 Fix #12737 "-moz-fixed should be compat mode only". Overwrites the fixed font family with the normal font family in navQuirks mode only. r=pollmann.
git-svn-id: svn://10.0.0.236/trunk@51086 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 00:31:45 +00:00
Jerry.Kirk%Nexwarecorp.com
3b650617aa Removed some hacks that were no longer necessary because of fixes made
on GFX side to fix nsRegion and the double buffer routines. Also
removed the DOUBLE_CLICK messages as directed by someone, I forget now who.
Bug 16698 r=Michael.Kedl@Nexwarecorp.com


git-svn-id: svn://10.0.0.236/trunk@51085 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 00:29:33 +00:00
Jerry.Kirk%Nexwarecorp.com
03c368d1b3 Various fixes to correct bugs in nsRegionPh and to correct clipping
done by the double buffer routines.
Bug# 16698 r=Michael.Kedl@Nexwarecorp.com


git-svn-id: svn://10.0.0.236/trunk@51084 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 00:27:56 +00:00
selmer%netscape.com
a711824bea Enable/Disable for Network builds
git-svn-id: svn://10.0.0.236/trunk@51083 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 00:27:21 +00:00
terry%mozilla.org
c4afb2ebc0 Fixed perl warning.
git-svn-id: svn://10.0.0.236/trunk@51082 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 00:25:42 +00:00
terry%mozilla.org
42d190d77d Fixed stupid perl warning.
git-svn-id: svn://10.0.0.236/trunk@51081 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 00:20:52 +00:00
terry%mozilla.org
877a31dd8a Fix potential security hole (and I think some perl warnings.)
git-svn-id: svn://10.0.0.236/trunk@51080 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 00:17:54 +00:00
larryh%netscape.com
a6a41c799e BugZilla 16566
git-svn-id: svn://10.0.0.236/trunk@51079 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 00:15:05 +00:00
terry%mozilla.org
2249323ac8 Fixed perl warnings -- this module no longer defines its own "die" routine.
git-svn-id: svn://10.0.0.236/trunk@51078 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 00:07:23 +00:00
despotdaemon%netscape.com
4654177ca6 Pseudo-automatic update of changes made by jhuntley@julian.uwo.ca.
git-svn-id: svn://10.0.0.236/trunk@51077 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 00:05:52 +00:00
terry%mozilla.org
a4508fd4ea Fixed stupid perl warning.
git-svn-id: svn://10.0.0.236/trunk@51076 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 00:04:59 +00:00
nhotta%netscape.com
a310c234a4 Fixing the linux build bustage.
git-svn-id: svn://10.0.0.236/trunk@51075 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 00:03:57 +00:00
edburns%acm.org
d2f14fa650 r=neeti@netscape.com
bug: 16679
approved by: neeti@netscape.com

Return NS_ERROR_FAILURE when a cookie is not found.


git-svn-id: svn://10.0.0.236/trunk@51074 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 00:03:33 +00:00
terry%mozilla.org
35043c37a6 Fixed stupid perl warning.
git-svn-id: svn://10.0.0.236/trunk@51073 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 00:02:42 +00:00
terry%mozilla.org
282909ff22 Fixed stupid perl warnings.
git-svn-id: svn://10.0.0.236/trunk@51072 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 23:57:58 +00:00
despotdaemon%netscape.com
0f0eb4c9e6 Pseudo-automatic update of changes made by shaver@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@51070 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 23:53:02 +00:00
srinivas%netscape.com
fcf52e9477 Initial version
git-svn-id: svn://10.0.0.236/trunk@51068 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 23:46:10 +00:00
jband%netscape.com
039dd4adee checking in code to fix bug 12768 submitted by Dan.Oscarsson@trab.se. Needed a 'const char*' tmp varible to work with a 'const char*' buffer that was passed in. The same problem is in both js.c and xpcshell.cpp. r=jband
git-svn-id: svn://10.0.0.236/trunk@51066 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 23:45:39 +00:00
terry%mozilla.org
f8f7d2f6fc Fixed stupid perl warning.
git-svn-id: svn://10.0.0.236/trunk@51065 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 23:42:25 +00:00
terry%mozilla.org
565f556bd3 Fixed stupid perl warning.
git-svn-id: svn://10.0.0.236/trunk@51064 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 23:35:57 +00:00
alecf%netscape.com
bd2182e45d add big comment describing how this dialog works
(no reviewer, no bug, just comments)


git-svn-id: svn://10.0.0.236/trunk@51063 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 23:35:53 +00:00
alecf%netscape.com
dd194c9fb7 fix for #15685
r=sspitzer
rdf: prefix on XML attributes was confusing the template


git-svn-id: svn://10.0.0.236/trunk@51062 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 23:35:22 +00:00
nhotta%netscape.com
fc73fd2088 Checking in a fix for the linux build bastage,
git-svn-id: svn://10.0.0.236/trunk@51061 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 23:32:45 +00:00
terry%mozilla.org
94c58cd2a0 Oops; fixed perl error.
git-svn-id: svn://10.0.0.236/trunk@51060 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 23:32:03 +00:00
terry%mozilla.org
6856a7ee21 Fixed stupid perl warning.
git-svn-id: svn://10.0.0.236/trunk@51059 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 23:23:08 +00:00
jband%netscape.com
fb63cac2a5 checking in bug 16629 fix to cbegle's xpconnect tests submitted by green@FreeBSD.org. This fixes screwy longlong test methods. r=jband
git-svn-id: svn://10.0.0.236/trunk@51058 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 23:20:16 +00:00
alecf%netscape.com
88779549b8 fix typedef so this compiles with boehm's own makefile or mozilla's makefile.in
git-svn-id: svn://10.0.0.236/trunk@51057 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 23:17:02 +00:00
alecf%netscape.com
35edd9a187 we should actually be using generic threads so unhide this stuff
git-svn-id: svn://10.0.0.236/trunk@51056 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 23:15:44 +00:00
briano%netscape.com
2f40b34ffb Automated update
git-svn-id: svn://10.0.0.236/trunk@51055 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 23:15:10 +00:00
alecf%netscape.com
ad85636e7f build boehm when flag is used r=sspitzer
(last checkin also r=sspitzer)


git-svn-id: svn://10.0.0.236/trunk@51054 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 23:14:16 +00:00
alecf%netscape.com
a6598d4a1c add flag for boehm (doesn't quite work yet)
git-svn-id: svn://10.0.0.236/trunk@51053 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 23:13:47 +00:00
waterson%netscape.com
ffa36fb99e Move nsXULElement declaration into the header file.
git-svn-id: svn://10.0.0.236/trunk@51052 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 23:05:35 +00:00
terry%mozilla.org
8662f77243 Fixed stupid perl warning.
git-svn-id: svn://10.0.0.236/trunk@51051 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 23:04:40 +00:00
terry%mozilla.org
93cd29ad2b Massive spank to put "use strict" in all Bonsai code.
git-svn-id: svn://10.0.0.236/trunk@51050 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 22:55:01 +00:00
alecf%netscape.com
36d234884e remove makefiles that arent' part of the module anymore
git-svn-id: svn://10.0.0.236/trunk@51049 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 22:49:05 +00:00
rickg%netscape.com
217ed89f11 fixed bug16624; r=buster. Buffer used to translate unicode entities in forms wasn't being truncated.
git-svn-id: svn://10.0.0.236/trunk@51048 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 22:39:58 +00:00
ducarroz%netscape.com
4f836323d6 Fix for bug 15313 & 15536. .txt files are now interpreted as XML document. Therefore we need to load a .html file even if it content is purely plain text. R=rhp
git-svn-id: svn://10.0.0.236/trunk@51047 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 22:38:54 +00:00
sspitzer%netscape.com
01d0e55136 fix for #16259, r=alecf. use the right line endings on the mac. now, instead of putting the LINEBREAK in every string, and then
writing every string to the stream, we do the line ending when we write to the stream.


git-svn-id: svn://10.0.0.236/trunk@51046 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 22:38:53 +00:00
slamm%netscape.com
3981b8f2c8 Update checkout target. Add logging. Stop on conflicts. r=dougt
git-svn-id: svn://10.0.0.236/trunk@51045 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 22:33:32 +00:00
nhotta%netscape.com
25c87328ce Changed interface and implementation of nsIEntityConverter,
more entity support (before Latin1 only), added a string based interface. Bug fix 8865, r=ftang.


git-svn-id: svn://10.0.0.236/trunk@51044 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 22:33:14 +00:00
cata%netscape.com
76ebba554f Conversion to Module. Reviewed by dp. Bug #15589.
git-svn-id: svn://10.0.0.236/trunk@51043 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 22:23:28 +00:00
troy%netscape.com
c8965f4626 r=kipp@netscape.com Moved ownership of root frame (and frame hierarchy) over to
the frame manager


git-svn-id: svn://10.0.0.236/trunk@51042 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 22:20:37 +00:00
ftang%netscape.com
2476a575cf fix bug 16656, change the test condiction for NS_PRECONDICTION. also add some error checking code for null ptr. r=erik
git-svn-id: svn://10.0.0.236/trunk@51041 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 22:17:16 +00:00
waterson%netscape.com
911c570602 Remove nsRDFElement.cpp
git-svn-id: svn://10.0.0.236/trunk@51040 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 22:08:39 +00:00
waterson%netscape.com
7a9241890d Rename nsRDFElement to nsXULElement; rename nsXULElement to nsXULAggregateElement.
git-svn-id: svn://10.0.0.236/trunk@51039 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 22:08:15 +00:00
waterson%netscape.com
ce617a2441 Rename nsRDFElement to nsXULElement.
git-svn-id: svn://10.0.0.236/trunk@51038 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 22:07:36 +00:00
rhp%netscape.com
eff48efacc Change for separating inline attachments - Bug #16367 - r: bienvenu
git-svn-id: svn://10.0.0.236/trunk@51037 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 22:07:02 +00:00
buster%netscape.com
a8ec8337df some extremely minor cleanup of bugs found by ftang. Thanks, frank.
git-svn-id: svn://10.0.0.236/trunk@51036 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 21:59:19 +00:00
akhil.arora%sun.com
b931259907 16427 r=akhil.arora@sun.com fixed by Denis Sharypov <sdv@sparc.spb.su>
Found some more instances where the DOM spec says that it is not an error
  to return a NULL. Do not throw exceptions in these cases.


git-svn-id: svn://10.0.0.236/trunk@51035 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 21:53:20 +00:00
pavlov%netscape.com
b8fadf3327 clean up wizard code a bit
git-svn-id: svn://10.0.0.236/trunk@51034 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 21:52:03 +00:00
rods%netscape.com
ef34fa6834 Links will now scroll into view when they get focus and anchors now respond
to the .focus call from script. r=kmcclusk, Bug #15198


git-svn-id: svn://10.0.0.236/trunk@51033 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 21:49:38 +00:00
rods%netscape.com
a1a74387d0 Move code to handle focus event into the correct switch statement
r=kmcclusk, bug 7133


git-svn-id: svn://10.0.0.236/trunk@51032 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 21:47:31 +00:00
akhil.arora%sun.com
479581e81f 16488 r=akhil.arora@sun.com fixed by Denis Sharypov <sdv@sparc.spb.su>
Copy/Paste error- createEntityReference was calling the wrong coreDOM method


git-svn-id: svn://10.0.0.236/trunk@51031 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 21:44:57 +00:00
pavlov%netscape.com
9bfe6151f6 new files
git-svn-id: svn://10.0.0.236/trunk@51030 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 21:44:15 +00:00
law%netscape.com
25e63cd81a Bug #14999; stop using toolkit app core; r=sfraser@netscape.com
git-svn-id: svn://10.0.0.236/trunk@51029 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 21:39:18 +00:00
law%netscape.com
45245a0e3f Bug #14999; stop using toolkit app core (added JavaScript[Debug].shlb to this project); r=sfraser@netscape.com
git-svn-id: svn://10.0.0.236/trunk@51028 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 21:36:57 +00:00
norris%netscape.com
cb1dcdbdc6 Part of bug 7261 "Connect XPConnect visibility filter to query principals"
Reviewed by rhp@netscape.com.


git-svn-id: svn://10.0.0.236/trunk@51027 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 21:35:52 +00:00
waterson%netscape.com
08c93a00f3 Bug 15558. Fix personal toolbar style rules (patch courtesy dbaron@fas.harvard.edu). r=matt
git-svn-id: svn://10.0.0.236/trunk@51026 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 21:35:28 +00:00
law%netscape.com
c4ca3de4e5 Bug #14999; stop using toolkit app core; r=davidm@netscape.com
git-svn-id: svn://10.0.0.236/trunk@51025 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 21:33:29 +00:00
pavlov%netscape.com
329e721fff update file list
git-svn-id: svn://10.0.0.236/trunk@51024 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 21:30:40 +00:00
law%netscape.com
1c3ac7d8fe Bug #14999; stop using toolkit app core; r=ducarroz@netscape.com
git-svn-id: svn://10.0.0.236/trunk@51023 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 21:29:54 +00:00
bienvenu%netscape.com
cf9daf3b34 change shutdown code to go through nsMessengerBootstrap instead of relying on service shutdown listener or destructors getting called r=alecf
git-svn-id: svn://10.0.0.236/trunk@51022 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 21:16:23 +00:00
ssu%netscape.com
ef93fdf802 fixing bug #16694. fixes crash bug in the select components dialog in the windows installer. r=sgehani. Affects only windows platform.
git-svn-id: svn://10.0.0.236/trunk@51021 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 21:15:09 +00:00
dp%netscape.com
068b895d74 Removing extra backslashes at the end of the install lines. Fixing
build.


git-svn-id: svn://10.0.0.236/trunk@51020 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 20:43:11 +00:00
sspitzer%netscape.com
80c75c7ae1 fix warnings. following alecf's recommendations, remove the FindServerUsingURI() method from the nsIMsgAccountManager, remove CreateFolderInDatasource() from nsIMsgFolder, change several methods in nsMsgCopy to return nsresult, and have nsIMsgFolder ** as an outparam, use GetResource() instead of CreateFolderInDatasource(). use NS_SUCCEEDED() instead of comparing against NS_OK directly.
git-svn-id: svn://10.0.0.236/trunk@51019 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 20:42:06 +00:00
brade%netscape.com
f24babcd8f make doEditor create an html editor rather than the plaintext editor. (bug #16681; r=sfraser@netscape.com)
git-svn-id: svn://10.0.0.236/trunk@51018 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 20:27:14 +00:00
harishd%netscape.com
cd72403513 Fix for Bug 16126 -- Error message was not getting propagated
to the parser ( CNavDTD::AddLeaf() )
Related to bug 16578 - Throwing userdefined tags to the floor
( what we used to do before ). This will avoid people from being
blocked.   Will work on a fix later.

r=nisheeth


git-svn-id: svn://10.0.0.236/trunk@51017 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 20:23:27 +00:00
selmer%netscape.com
f641e35434 Enable BoldText type
git-svn-id: svn://10.0.0.236/trunk@51016 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 20:22:21 +00:00
troy%netscape.com
16faac45a3 Removed delete operators (they had no implementation, they were private so
they wern't accidently called), because HP compiler generated an error if
new operator was public but delete operator was private


git-svn-id: svn://10.0.0.236/trunk@51015 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 20:16:49 +00:00
nhotta%netscape.com
83699f202b Add new propertie files for html entity, part of bug fix 8865, r=ftang.
git-svn-id: svn://10.0.0.236/trunk@51014 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 20:02:20 +00:00
tonyr%fbdesigns.com
b46af177f3 Added string bundles for the mailnews import tools
git-svn-id: svn://10.0.0.236/trunk@51013 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 19:58:07 +00:00
dougt%netscape.com
921610c409 Fix for 16700. Isolating CreateTransport into new function.
r=gagan.


git-svn-id: svn://10.0.0.236/trunk@51012 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 19:43:34 +00:00
warren%netscape.com
895b2679fc Made bloatdiff distinguish between no change in leaks, and infinite leakage (no leak before, but leak now).
git-svn-id: svn://10.0.0.236/trunk@51011 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 19:43:29 +00:00
selmer%netscape.com
ef18489b86 Corrected tab sort order
git-svn-id: svn://10.0.0.236/trunk@51010 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 19:39:42 +00:00
Jerry.Kirk%Nexwarecorp.com
614348b081 Installed our own PtMainLoop() function that can be exited to allow
the Create Profile Manager to display a dialog, then exit the GUI and display
a different dialog.
Bug# 16667 r=Michael.Kedl@Nexwarecorp.com


git-svn-id: svn://10.0.0.236/trunk@51009 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 19:34:07 +00:00
selmer%netscape.com
fb6169fb87 Temporary fixes for tab ordering
git-svn-id: svn://10.0.0.236/trunk@51008 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 19:23:11 +00:00
warren%netscape.com
91a872ec09 Took out redundant MOZ_COUNT_CTOR/DTOR calls.
git-svn-id: svn://10.0.0.236/trunk@51007 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 19:21:53 +00:00
slamm%netscape.com
900a118dd2 Landing of SIDEBAR_19991007_BRANCH. r=waterson
git-svn-id: svn://10.0.0.236/trunk@51006 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 19:21:52 +00:00
radha%netscape.com
b1aa689e2b Mail news regresion with replying to a message. r=mscott bug # 16550
git-svn-id: svn://10.0.0.236/trunk@51005 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 19:09:27 +00:00
warren%netscape.com
0ae271237a Made it implement nsIURL as well as nsIURI.
git-svn-id: svn://10.0.0.236/trunk@51004 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 19:07:16 +00:00
warren%netscape.com
671c8baf13 Cleanup to use nsCOMPtrs.
git-svn-id: svn://10.0.0.236/trunk@51003 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 19:06:57 +00:00
warren%netscape.com
a270067a3a Took out redundant MOZ_COUNT_CTOR/DTOR calls.
git-svn-id: svn://10.0.0.236/trunk@51002 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 19:06:21 +00:00
troy%netscape.com
a431ec5d07 b=16615. Two line change. Added check for case of root node being a leaf.
The rest of the changes are NOT yet in use. They willbe reviewed by Kipp before
they're turned on


git-svn-id: svn://10.0.0.236/trunk@51001 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 19:02:09 +00:00
akkana%netscape.com
ae4dba7c09 Remove two ifdef DEBUG_akkana lines that were left in when someone
changed the implementation of ConvertContentToXIF, so that I can
compile again.  This won't affect anyone but me.  r=kipp


git-svn-id: svn://10.0.0.236/trunk@51000 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 19:01:56 +00:00
troy%netscape.com
3a3c120af6 b=16652, r=troy@netscape.com
Patch from Johnny Stenback that breaks a weak link reference


git-svn-id: svn://10.0.0.236/trunk@50999 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 19:00:49 +00:00
shaver%netscape.com
408093c6c7 fix // comment in C file (r=brade)
git-svn-id: svn://10.0.0.236/trunk@50998 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 19:00:18 +00:00
rogerl%netscape.com
b4ac2f29ae Changed tests for ECMA 3 definition of array.length handling.
git-svn-id: svn://10.0.0.236/trunk@50995 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 16:55:44 +00:00
pavlov%netscape.com
2a38ab0914 revert some key code to pre branch landing so that typing works correctly
git-svn-id: svn://10.0.0.236/trunk@50993 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 16:08:16 +00:00
danm%netscape.com
21960bf642 adding PR_LOGging to event queue handling. r:hyatt@netscape.com
git-svn-id: svn://10.0.0.236/trunk@50992 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 15:09:50 +00:00
danm%netscape.com
c4ec5e4d7e moving Push/PopThreadEventQueue to nsIEventQueueService. r:hyatt@netscape.com
git-svn-id: svn://10.0.0.236/trunk@50991 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 15:08:45 +00:00
danm%netscape.com
5bb4aa8eb3 synching with nsWebShellWindow 1.219 (nsIModalWindowSupport removed). r:hyatt@netscape.com
git-svn-id: svn://10.0.0.236/trunk@50990 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 15:06:38 +00:00
danm%netscape.com
2d0400db89 removing nsIModalWindowSupport r:hyatt@netscape.com
git-svn-id: svn://10.0.0.236/trunk@50989 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 15:05:17 +00:00
danm%netscape.com
8e456a4690 moving Push/PopThreadEventQueue to nsIEventQueueService r:hyatt@netscape.com
git-svn-id: svn://10.0.0.236/trunk@50988 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 15:04:18 +00:00
danm%netscape.com
1dff151de6 patch nsEventQueue leak in GetProxyObject r:hyatt@netscape.com
git-svn-id: svn://10.0.0.236/trunk@50987 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 15:01:40 +00:00
danm%netscape.com
0b71323316 event queues own and delete themselves when they're done. bug 15856 r:hyatt@netscape.com
git-svn-id: svn://10.0.0.236/trunk@50986 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 14:59:57 +00:00
danm%netscape.com
e200e99d65 new r:hyatt@netscape.com
git-svn-id: svn://10.0.0.236/trunk@50985 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 14:57:07 +00:00
ftang%netscape.com
c18bf1d357 1. add asserting code to check null ptr
2. add if code and return NS_ERROR_NULL_POINTER if the ptr is null
3. add code to check return value 
r=myself


git-svn-id: svn://10.0.0.236/trunk@50984 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 14:48:41 +00:00
karnaze%netscape.com
905268d150 added #ifdef for debug printing.
git-svn-id: svn://10.0.0.236/trunk@50983 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 13:48:19 +00:00
karnaze%netscape.com
0b5271c1c7 bug 15958(partial) - uses mComputedWidth instead of availableSize.width. r=buster; asked hook for permission, got no response.
git-svn-id: svn://10.0.0.236/trunk@50982 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 13:47:01 +00:00
karnaze%netscape.com
aef57f8136 bug 15993 - in quirks mode allocates space for a 1 pixel border if the content is empty and the table has a border. It was incorrectly, doing this even if the content was not empty. r=buster; asked permission from hook and got no response.
git-svn-id: svn://10.0.0.236/trunk@50981 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 13:45:41 +00:00
dveditz%netscape.com
038ada687d stopgap for mysterious Mac bustage
git-svn-id: svn://10.0.0.236/trunk@50980 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 12:58:58 +00:00
dveditz%netscape.com
ddf8086d83 generate unique regkeys (6986)
git-svn-id: svn://10.0.0.236/trunk@50979 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 12:06:19 +00:00
srinivas%netscape.com
e8fb19a369 Include fcntl.h always. Bugizlla #16630.
git-svn-id: svn://10.0.0.236/trunk@50978 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 11:13:23 +00:00
dveditz%netscape.com
48a1d530ed variable name change to silence warning
git-svn-id: svn://10.0.0.236/trunk@50977 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 08:35:39 +00:00
dveditz%netscape.com
64356116f8 cleaning up warnings 15626; removing RegisterService/UnregisterService calls per request from dp
git-svn-id: svn://10.0.0.236/trunk@50976 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 05:56:15 +00:00
rickg%netscape.com
756b010b94 another WIP for bug 13536; added charset notification back in; r=harish
git-svn-id: svn://10.0.0.236/trunk@50975 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 05:14:38 +00:00
buster%netscape.com
7653742295 fixed bug 16486, r=brade@netscape.com
windows widget code handles control-key combinations correctly.


git-svn-id: svn://10.0.0.236/trunk@50974 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 03:39:48 +00:00
jband%netscape.com
8013d6bb78 fix typo in comment
git-svn-id: svn://10.0.0.236/trunk@50972 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 02:54:26 +00:00
jband%netscape.com
0a174a879e r=mccabe (I'll be adding more comments to the headers as requested)
Implement nsIXPCNativeCallContext to meet user feature
requirements. This allows simpler implementation of reflection of
native classes into JavaScript in cases where they need to
support legacy interfaces that include optional parameters and
method name overloading. This also provides a general mechanism
for native methods to discover if they were called from JS code,
exactly what JS parameters were passed, explicitly return jsvals,
and throw explicit jsvals without interference from xpconnect.
With test cases.


git-svn-id: svn://10.0.0.236/trunk@50971 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 02:53:04 +00:00
mcafee%netscape.com
6d347761bd Adding perl-path to match other tinderbox files.
git-svn-id: svn://10.0.0.236/trunk@50970 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 01:34:45 +00:00
rickg%netscape.com
c1b9043596 forgot to check this in for viewsource; bug13536; r=harish
git-svn-id: svn://10.0.0.236/trunk@50969 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-18 00:46:33 +00:00
dveditz%netscape.com
57ed2f138a hoping this fixes the mac bustage
git-svn-id: svn://10.0.0.236/trunk@50968 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 23:55:56 +00:00
pavlov%netscape.com
0d172a490d work around for not being able to type in text fields on unix without them closing your apps.
16564 and 16542 r=smfr


git-svn-id: svn://10.0.0.236/trunk@50966 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 23:27:50 +00:00
karnaze%netscape.com
a06cb090a4 new regression tests. does not affect build.
git-svn-id: svn://10.0.0.236/trunk@50965 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 23:26:02 +00:00
bienvenu%netscape.com
3f482a5e18 fix leak of profile dir in addr book session
git-svn-id: svn://10.0.0.236/trunk@50964 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 22:16:32 +00:00
shaver%netscape.com
b2f619e9fa fixing build by removing leftover #endif
git-svn-id: svn://10.0.0.236/trunk@50963 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 22:15:34 +00:00
dveditz%netscape.com
ea80c313d6 Added NR_RegFlush (14909, required for 16283/16600); warning cleanup (15626) r=shaver
git-svn-id: svn://10.0.0.236/trunk@50962 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 21:47:53 +00:00
karnaze%netscape.com
cf41a16010 new regression test, doesn't affect build.
git-svn-id: svn://10.0.0.236/trunk@50961 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 21:46:13 +00:00
dveditz%netscape.com
9d59534945 Added nsIRegistry::Flush (bug 16283, required for 16600), r=shaver
git-svn-id: svn://10.0.0.236/trunk@50960 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 21:45:53 +00:00
morse%netscape.com
04d5d271eb fix bug 16319, stop assertion failure, r=dp
git-svn-id: svn://10.0.0.236/trunk@50959 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 21:41:50 +00:00
shaver%netscape.com
8c73db21d3 make View->Use Stylesheet use type=radio. (r=hyatt)
git-svn-id: svn://10.0.0.236/trunk@50958 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 21:38:21 +00:00
shaver%netscape.com
f2a09249da Added support for type="radio" (pick-one) XP menus.
Cleaned up nsFrame class declaration a bit.
Added some API entries to nsIMenuFrame in support of type="radio"'s
pick-one behaviour.
Renamed UpdateMenuChecked to UpdateMenuSpecialState.
Removed stale string-splitting code in CreateAnonymousContent.
(r=hyatt,mcafee)


git-svn-id: svn://10.0.0.236/trunk@50957 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 21:37:37 +00:00
mscott%netscape.com
ee5e86e569 Bug #16394 --> no longer need to call intialize after creating a url
r=jefft


git-svn-id: svn://10.0.0.236/trunk@50956 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 20:04:59 +00:00
mscott%netscape.com
e396ccade3 Bug #16394 --> extract user name from the url spec. Don't force us to pass it in on initialize.
r=jefft


git-svn-id: svn://10.0.0.236/trunk@50955 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 20:04:40 +00:00
mscott%netscape.com
79e9036238 Bug #16394 --> Initialize now has no arguments.
r=jefft


git-svn-id: svn://10.0.0.236/trunk@50954 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 20:04:08 +00:00
mscott%netscape.com
71ebac111b Bug #16394 --> call Initialize function on url after we create one
r=jefft


git-svn-id: svn://10.0.0.236/trunk@50953 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 20:03:37 +00:00
briano%netscape.com
81d0f9cde9 Automated update
git-svn-id: svn://10.0.0.236/trunk@50952 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 15:30:18 +00:00
cls%seawood.org
3f3f4e0c22 r=pavlov
Add temporary --enable-nspr-autoconf option to allow platforms to test the newly added autoconf setup for nspr (bug 11893) before turning it on as default.


git-svn-id: svn://10.0.0.236/trunk@50951 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 15:16:47 +00:00
cls%seawood.org
5e7ffdc098 Bug 11893. r=shaver
Sync the autoconf Makefile.ins.


git-svn-id: svn://10.0.0.236/trunk@50950 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 15:12:41 +00:00
warren%netscape.com
a53c95056f Added .txt to delta file name.
git-svn-id: svn://10.0.0.236/trunk@50949 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 07:57:45 +00:00
warren%netscape.com
a0fc33207e Changed format slightly.
git-svn-id: svn://10.0.0.236/trunk@50948 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 07:52:19 +00:00
warren%netscape.com
990cda09f3 Changed format slightly.
git-svn-id: svn://10.0.0.236/trunk@50947 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 07:50:09 +00:00
warren%netscape.com
6a7c1e6176 Added bloat log diffing program.
git-svn-id: svn://10.0.0.236/trunk@50946 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 07:42:27 +00:00
warren%netscape.com
bc35fd61d0 Accidently got added in the wrong directory.
git-svn-id: svn://10.0.0.236/trunk@50945 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 07:30:25 +00:00
rickg%netscape.com
d16fa469ea removed warnings; no material code affected
git-svn-id: svn://10.0.0.236/trunk@50944 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 07:01:10 +00:00
karnaze%netscape.com
c96e8acd42 new regression test. does not affect code.
git-svn-id: svn://10.0.0.236/trunk@50943 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 05:17:41 +00:00
karnaze%netscape.com
0ee3058ec4 new regression test
git-svn-id: svn://10.0.0.236/trunk@50942 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 03:42:37 +00:00
troy%netscape.com
c04a6a88dc r=karnaze@netscape.com Cc'd hyatt@netscape.com
Space optimization. mBorderEdges is no longer an embedded object. Now it's
allocated when needed (for collapsing border model tables only). This saves
80 bytes per table cell frame for the normal HTML case of adjacent border
model


git-svn-id: svn://10.0.0.236/trunk@50941 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 03:30:11 +00:00
karnaze%netscape.com
84d23e1d2e bug 11321 - Renamed kidMaxElementSize to localKidMaxElementSize and renamed pKidMaxElementSize to kidMaxElementSize and fixed the incorrect usage.
git-svn-id: svn://10.0.0.236/trunk@50940 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 03:17:53 +00:00
karnaze%netscape.com
906709b8b6 bug 11321 - the frame constructor sets the primary frame when an anonymous table or row group frame is involved.
git-svn-id: svn://10.0.0.236/trunk@50939 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 03:15:13 +00:00
rickg%netscape.com
1a6a40a3c6 Fix (perf) bug 13536 dealing with viewsource; r=kmcclusk.
Viewsource is now based on XML. These changes make viewsource 2X faster,
30% smaller (in obj code), and uses between 30-60% less markup overhead.
This update also enables stylesheet usage on viewsource, which is controlled
by the viewsource namespace  in html.css.

Also, note that viewsource remains (and always has been) fully incremental.
Remaining performance issues are in contentsink as shown in quantify runs.


git-svn-id: svn://10.0.0.236/trunk@50938 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 02:50:38 +00:00
rickg%netscape.com
7f8bd4a5fc improve debug timing code for ongoing perf work; not enabled in normal build. r=peterl
git-svn-id: svn://10.0.0.236/trunk@50937 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 02:45:26 +00:00
sgehani%netscape.com
9868a31060 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@50936 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 01:39:40 +00:00
sgehani%netscape.com
0c1e14a45f File Removed.
git-svn-id: svn://10.0.0.236/trunk@50935 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 01:36:14 +00:00
warren%netscape.com
c81e025f6f Added bloat log diffing program.
git-svn-id: svn://10.0.0.236/trunk@50934 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-17 00:19:29 +00:00
morse%netscape.com
f4c14fbc7e remove build warning, r=jar
git-svn-id: svn://10.0.0.236/trunk@50933 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 23:37:28 +00:00
morse%netscape.com
2464d177c4 fix bug 15137, open->openDialog, r=jar
git-svn-id: svn://10.0.0.236/trunk@50932 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 23:36:22 +00:00
bienvenu%netscape.com
65fd934be9 fix memory leak of user name r=mscott
git-svn-id: svn://10.0.0.236/trunk@50931 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 22:44:55 +00:00
bienvenu%netscape.com
170bb762af fix leaks in mime xul emitters r=rhp
git-svn-id: svn://10.0.0.236/trunk@50930 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 20:49:06 +00:00
bienvenu%netscape.com
a6a7ff9957 fix memory leak in install notifier r=dougt
git-svn-id: svn://10.0.0.236/trunk@50929 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 20:48:36 +00:00
morse%netscape.com
051b2edf1a fix bug 10434, memory leak detection, r=sfraser
git-svn-id: svn://10.0.0.236/trunk@50928 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 19:34:10 +00:00
rickg%netscape.com
b03845b337 updated FAQ section of nsString documentation
git-svn-id: svn://10.0.0.236/trunk@50927 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 18:45:18 +00:00
rickg%netscape.com
3169a02cfa WIP bug13536; r=peterl; this code is not used yet
git-svn-id: svn://10.0.0.236/trunk@50926 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 18:22:24 +00:00
bienvenu%netscape.com
21e8b134dc fix build bustage
git-svn-id: svn://10.0.0.236/trunk@50925 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 18:16:21 +00:00
bienvenu%netscape.com
0ddfb1fd70 remove unused all threads table r=davidmc
git-svn-id: svn://10.0.0.236/trunk@50924 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 17:55:59 +00:00
troy%netscape.com
3e862c4fc9 Space optimization, r=karnaze@netscape.com Cc'd hyatt@netscape.com
Save 4 bytes by eliminating the mCalculated data member which wasn't being used


git-svn-id: svn://10.0.0.236/trunk@50923 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 16:17:07 +00:00
bienvenu%netscape.com
74fc660d77 fix memory leaks r=mscott
git-svn-id: svn://10.0.0.236/trunk@50922 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 15:43:26 +00:00
karnaze%netscape.com
60203265cd added 2 additional file lists to regression tests to work around new javascript bug.
git-svn-id: svn://10.0.0.236/trunk@50921 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 05:26:22 +00:00
peterl%netscape.com
be312e3eea Made style rules work against nsIMutableStyleContext
r=troy


git-svn-id: svn://10.0.0.236/trunk@50920 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 04:06:04 +00:00
peterl%netscape.com
f3c05f912b Added new style data accessors.
Added nsIMutableStyleContext interface.
Made style rules work against nsIMutableStyleContext
r=troy


git-svn-id: svn://10.0.0.236/trunk@50919 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 04:05:59 +00:00
neeti%netscape.com
a279c2f778 updating status
git-svn-id: svn://10.0.0.236/trunk@50918 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 03:07:59 +00:00
neeti%netscape.com
f3b4c01e52 Converted dll to use nsIModule - bug 14034, r=dp
git-svn-id: svn://10.0.0.236/trunk@50916 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 03:05:55 +00:00
neeti%netscape.com
a87ba00c59 Converted dll to use nsIModule -bug 14034, r=jband
git-svn-id: svn://10.0.0.236/trunk@50915 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 03:04:16 +00:00
rhp%netscape.com
5839f11126 Changes to display when a message is coming from a 5.0 client - Bug #7518 - r: mscott
git-svn-id: svn://10.0.0.236/trunk@50914 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 02:38:24 +00:00
selmer%netscape.com
347b70512d CheckListBox used
git-svn-id: svn://10.0.0.236/trunk@50913 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 02:01:01 +00:00
selmer%netscape.com
9a7f96144c CheckListBox incorporated
git-svn-id: svn://10.0.0.236/trunk@50912 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 02:00:18 +00:00
warren%netscape.com
5cf514e9ae Added total/summary information to bloat log. Made LogNewXPCOM/LogDeleteXPCOM only be needed for losing architectures.
git-svn-id: svn://10.0.0.236/trunk@50911 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 01:57:18 +00:00
jevering%netscape.com
70a261fb73 The nsLeakDetector.cpp file now requires a few extra header files which weren't being exported on win
git-svn-id: svn://10.0.0.236/trunk@50910 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 01:44:52 +00:00
jevering%netscape.com
f66066c2c8 Removed a define I shouldn't have checked in.
git-svn-id: svn://10.0.0.236/trunk@50909 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 01:41:14 +00:00
varada%netscape.com
6f328194ff fixes to bug#7717 on exiting the wizard you get a message stating that data has been saved
git-svn-id: svn://10.0.0.236/trunk@50908 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 01:40:06 +00:00
jevering%netscape.com
6660a0bc5b Hooking up the Boehm collector.
Can we please call this thing the Bone Collector?  That would be much cooler.
Thank you drive through.


git-svn-id: svn://10.0.0.236/trunk@50907 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 01:22:01 +00:00
troy%netscape.com
6722de88b9 Added some new code that's not in use yet
git-svn-id: svn://10.0.0.236/trunk@50906 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 00:55:48 +00:00
rickg%netscape.com
85a81f49a8 WIP for bug13536; r=plinss
git-svn-id: svn://10.0.0.236/trunk@50905 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 00:39:24 +00:00
varada%netscape.com
54ba582bb1 new struct in header file
git-svn-id: svn://10.0.0.236/trunk@50904 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 00:16:36 +00:00
beard%netscape.com
7bd68dd578 added code to initialize/shutdown the leak detector. bug=15906, r=alecf
git-svn-id: svn://10.0.0.236/trunk@50903 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 00:06:37 +00:00
beard%netscape.com
774e39f024 renamed NSInitGarbageCollector/NSShutdownGarbageCollector to NS_, and returning nsresult. Moved leak report file to nsLeakDetector.cpp. bug=15906, r=alecf
git-svn-id: svn://10.0.0.236/trunk@50902 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 00:06:36 +00:00
beard%netscape.com
371afc89ab added nsLeakDetector.cpp to build. bug=15906, r=alecf
git-svn-id: svn://10.0.0.236/trunk@50901 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 00:03:45 +00:00
beard%netscape.com
a743954b5c maded entire file conditionally compile #if defined(GC_LEAK_DETECTOR). bug=15906, r=alecf
git-svn-id: svn://10.0.0.236/trunk@50900 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-16 00:02:26 +00:00
jevering%netscape.com
f820994c06 More windows porting of the boehm collector.
git-svn-id: svn://10.0.0.236/trunk@50899 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 23:45:47 +00:00
bienvenu%netscape.com
7ce48293df fix memory leak of registry location r=warren
git-svn-id: svn://10.0.0.236/trunk@50898 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 23:45:45 +00:00
cyeh%netscape.com
942579f723 proxy checkin for terry@mozilla.org. quiet warnings about uninitialized
variables at runtime


git-svn-id: svn://10.0.0.236/trunk@50897 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 23:43:52 +00:00
nisheeth%netscape.com
c916cc6da1 Changes do not get built in regular build. Fix timing hooks in the parser.
git-svn-id: svn://10.0.0.236/trunk@50896 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 23:42:09 +00:00
kipp%netscape.com
66125fa907 r=troy; revised nsITextContent api to simplify it and the consumers; this is done as prep work for bug 9101
git-svn-id: svn://10.0.0.236/trunk@50895 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 23:36:07 +00:00
sdagley%netscape.com
8916be1144 Fix #15740 - now check for immediate errors from async i/o calls. Also ensure that io_pending flag for the thread is cleared if we complete the async call before calling WaitOnThisThread(). r=sfraser
git-svn-id: svn://10.0.0.236/trunk@50894 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 23:35:27 +00:00
kipp%netscape.com
a1aaea4959 r=troy; fixed bug 7093 by carefully pre-computed the collapsed top margin before reflowing the child block and then using that value to properly acquire the available space; In addition, I had to fix an incremental reflow bug associated with this problem
git-svn-id: svn://10.0.0.236/trunk@50893 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 23:35:10 +00:00
terry%mozilla.org
6f2641b237 Fixed what I believe is just a stupid typo. (This code really needs to have
"use strict" added to it all, and with all the resulting cleanup.)


git-svn-id: svn://10.0.0.236/trunk@50892 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 23:31:22 +00:00
kipp%netscape.com
17b485a261 Wiped out another warning
git-svn-id: svn://10.0.0.236/trunk@50891 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 23:29:21 +00:00
kipp%netscape.com
ae469e66fe new
git-svn-id: svn://10.0.0.236/trunk@50890 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 23:25:02 +00:00
peterl%netscape.com
e8a5d2e937 Added namespace ID to the AttributeChanged notification
Part of the fix for Bug 15153
r=troy


git-svn-id: svn://10.0.0.236/trunk@50889 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 23:17:53 +00:00
peterl%netscape.com
bba68903df Added namespace ID to the AttributeChanged notification
Part fo the fix for Bug 15153
r=troy


git-svn-id: svn://10.0.0.236/trunk@50888 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 23:16:45 +00:00
terry%mozilla.org
762178f097 Fixed a bunch of "undefined variable" warnings.
git-svn-id: svn://10.0.0.236/trunk@50887 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 23:16:32 +00:00
peterl%netscape.com
5e2e0d9a32 Changed reported namespace of attributes from HTML to None.
r=vidur
Also added namespace ID to the AttributeChanged method
Part of the fix for Bug 15153
r=troy


git-svn-id: svn://10.0.0.236/trunk@50886 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 23:15:17 +00:00
peterl%netscape.com
48baad18a6 Added code to detect generated content that depends on attributes and reflow when the attribute changes
Fix for Bug 15153
r=pierre
Also added namespace ID to the AttributeChanged method
r=troy


git-svn-id: svn://10.0.0.236/trunk@50885 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 23:14:44 +00:00
varada%netscape.com
d237a54c3d fixes to bug #5987 changed the values of the buttons in the ini files
git-svn-id: svn://10.0.0.236/trunk@50884 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 22:56:37 +00:00
varada%netscape.com
15123c9a18 fixing bug #5987 - introduced three new fields in VARS in the ini files - cancel back and next - use those to change the text on the buttons
git-svn-id: svn://10.0.0.236/trunk@50883 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 22:55:06 +00:00
troy%netscape.com
52071cf0b1 Added some new code that isn't being used
git-svn-id: svn://10.0.0.236/trunk@50882 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 22:53:24 +00:00
gagan%netscape.com
7c5bb7d019 Added "resolving host" status notification for eSocketState_Created. No bug number. r=law.
git-svn-id: svn://10.0.0.236/trunk@50881 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 22:47:24 +00:00
jefft%netscape.com
f34b34e8a2 back out unneed changes which cause downloading messages to hang; bug 16338, r=bienvenu
git-svn-id: svn://10.0.0.236/trunk@50880 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 22:26:32 +00:00
sfraser%netscape.com
a529a81529 Added nsJSXULEditorElement and nsXULEditorElement for travis. r=travis.
git-svn-id: svn://10.0.0.236/trunk@50879 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 22:21:43 +00:00
waqar%netscape.com
2e88f3fb20 #9777
r vidur@netscape.com
d The issue was resolved by DOM commitie to allow SplitText to give an error
only on if the start of split is larger than the length. If it is same lenght
it is allowed.


git-svn-id: svn://10.0.0.236/trunk@50878 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 22:18:23 +00:00
beard%netscape.com
b457512e99 added nsLeakDetector.idl. bug=15906, r=alecf
git-svn-id: svn://10.0.0.236/trunk@50877 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 22:17:53 +00:00
cmanske%netscape.com
d3b17dbcb9 Fixed bugs 16316, 16494, 16495, all relating to editor file open, saving, and window title issues. r=law
git-svn-id: svn://10.0.0.236/trunk@50876 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 22:06:41 +00:00
tbogard%aol.net
a7ed2ac01b Changed TextEditorAppShell.xul to use the new XUL editor tag instead of html:iframe. Changed EditorStartup to take an element. Changed EditorStartup to request the EditorShell from the editorElement rather than doing a createInstance and QI. r=hyatt
git-svn-id: svn://10.0.0.236/trunk@50875 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:58:49 +00:00
jevering%netscape.com
19f7cec6df Windows makefile for boehm collector.
git-svn-id: svn://10.0.0.236/trunk@50874 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:57:31 +00:00
jevering%netscape.com
7a40245954 Forget continuation line - boehm collector work.
git-svn-id: svn://10.0.0.236/trunk@50873 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:56:51 +00:00
tbogard%aol.net
2aa2164659 Changed html:iframe to the new XUL editor tag. r=hyatt
git-svn-id: svn://10.0.0.236/trunk@50872 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:54:42 +00:00
norris%netscape.com
0ad2206225 Fix 16166 setTimeout() security problem
r=mstoltz


git-svn-id: svn://10.0.0.236/trunk@50871 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:52:37 +00:00
cls%seawood.org
84b2db2829 Files not used by build. Attempting to resolve cvs checkin problem. a=srinivas,leaf
git-svn-id: svn://10.0.0.236/trunk@50870 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:42:20 +00:00
Jerry.Kirk%Nexwarecorp.com
777d2a990a Fix for viewer bustage on Neutrino. Added call to nsIThread::SetMainThread
in main() of viewer so that it can retrieved in other cases. R=vidur


git-svn-id: svn://10.0.0.236/trunk@50869 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:39:30 +00:00
fur%netscape.com
1242a2627f Renamed variable to avoid a compiler warning. R: mccabe
git-svn-id: svn://10.0.0.236/trunk@50868 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:38:04 +00:00
shaver%netscape.com
a8a9b25086 Make View->Sidebar a type=checkbox menuitem (r=slamm)
git-svn-id: svn://10.0.0.236/trunk@50867 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:37:53 +00:00
cls%seawood.org
b8f8ee7596 Files not used by build. Attempting to resolve cvs checkin problem. a=srinivas,leaf
git-svn-id: svn://10.0.0.236/trunk@50866 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:36:53 +00:00
beard%netscape.com
c69becfcc9 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@50865 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:36:04 +00:00
bienvenu%netscape.com
cb256a41dc fix shutdown leak by resetting host session list r=jefft
git-svn-id: svn://10.0.0.236/trunk@50864 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:35:55 +00:00
beard%netscape.com
ef31ca76db using dumpMemoryLeaks() instead of about:bloat?leaks. bug=15906, r=hyatt
git-svn-id: svn://10.0.0.236/trunk@50863 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:35:18 +00:00
beard%netscape.com
202835974e added dumpMemoryLeaks(). bug=15906, r=hyatt
git-svn-id: svn://10.0.0.236/trunk@50862 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:35:11 +00:00
akhil.arora%sun.com
e3af9ebeab 13260 r=akhil.arora@sun.com Fixed by Denis Sharypov <sdv@sparc.spb.su>
Added checks for integer arguments being outside of legal range and
  throw exceptions if not.


git-svn-id: svn://10.0.0.236/trunk@50861 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:25:56 +00:00
cmanske%netscape.com
b3ffd2ef95 Fixed bug 15442 - use about:blank for empty doc URL for editor. r=law
git-svn-id: svn://10.0.0.236/trunk@50860 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:24:45 +00:00
mccabe%netscape.com
dc9018f2ee Fix line editing support for the standalone XPCOM-enabled JavaScript shell. To aid debugging on unix platforms.
To use, define JS_READLINE when compiling mozilla/js/src/xpconnect/shell.

r=shaver


git-svn-id: svn://10.0.0.236/trunk@50859 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:23:53 +00:00
tbogard%aol.net
bb54504747 Adding support for retrieving the EditorShell from editor element. r=hyatt
git-svn-id: svn://10.0.0.236/trunk@50858 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:21:10 +00:00
brade%netscape.com
cb5f04d59d use the proper function calls to get the status for alt, shift and meta keys. bug #16486. reviewed valeski@netscape.com
git-svn-id: svn://10.0.0.236/trunk@50857 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:20:57 +00:00
kipp%netscape.com
6b0a23c77d Nuke some more warnings
git-svn-id: svn://10.0.0.236/trunk@50855 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:18:32 +00:00
scc%netscape.com
38a4215c26 Bug #15292, r=dp. Made the component manager inherit from |nsSupportsWeakReference|, fixed its |QueryInterface()| appropriately, and added casts in two places that became ambiguous now that the component manager had multiple |nsISupports| in it. Now one can hold a weak reference to the component manager using |nsIWeakReference|.
git-svn-id: svn://10.0.0.236/trunk@50853 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:14:43 +00:00
law%netscape.com
d169b3d37b Fix for bugs #16525 and #16527, Remove menu separator when not link or frame, add back in missing items; r=matt@netscape.com
git-svn-id: svn://10.0.0.236/trunk@50850 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:13:31 +00:00
shaver%netscape.com
130160f659 Add support for type="checkbox" in <menuitem>.
Converted small pile of PRBool to PRPackedBool for space savings.
r=hyatt


git-svn-id: svn://10.0.0.236/trunk@50849 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:13:24 +00:00
law%netscape.com
fbce7337a4 Fix for bug #16269, add resizable feature to view-source window, r=danm@netscape.com
git-svn-id: svn://10.0.0.236/trunk@50848 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:11:22 +00:00
Jerry.Kirk%Nexwarecorp.com
bee1ad520f Handles KeyEvents the new way, not completely finished...
Bug # 16539 r=Michael.Kedl@Nexwarecorp.com


git-svn-id: svn://10.0.0.236/trunk@50847 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:10:36 +00:00
vidur%netscape.com
6fb05929c2 Fix for viewer bustage on Windows. Added call to nsIThread::SetMainThread in main() of viewer so that it can retrieved in other cases. R=kipp
git-svn-id: svn://10.0.0.236/trunk@50846 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:09:46 +00:00
tbogard%aol.net
a469976da4 Adding support for retrieving the EditorShell from editor element. r=hyatt
git-svn-id: svn://10.0.0.236/trunk@50845 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:07:27 +00:00
jefft%netscape.com
ce92446784 remove the size limit for downloading Pop3 message; bug 16338; r=bienvenu
git-svn-id: svn://10.0.0.236/trunk@50844 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 21:02:27 +00:00
waterson%netscape.com
d6562a99e8 Darnit. Didn't mean to FORCE_PR_LOG. Removing that #define.
git-svn-id: svn://10.0.0.236/trunk@50843 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 20:55:54 +00:00
tbogard%aol.net
a4dcc5f6fe First Check-in.
git-svn-id: svn://10.0.0.236/trunk@50842 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 20:51:58 +00:00
shaver%netscape.com
82e40a8366 Fix case and return value in nsIModule.idl.
Add deleteCategoryEntry and deleteCategory to nsICategoryManager.
Update nsCategoryManager.js to use new nsIModule case, and talk to the registry.
r=brendan


git-svn-id: svn://10.0.0.236/trunk@50841 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 20:51:38 +00:00
ssu%netscape.com
2c8714f0fe fixes bugs #15884 and #16220. r=dbragg. fixes Install.FileExecute for the
1 parameter format and also the function gets logged correctly in
install.log.


git-svn-id: svn://10.0.0.236/trunk@50840 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 20:50:49 +00:00
waterson%netscape.com
55b0508a7b Bug 9764. Fix HTML templates to ensure that attribute adding is namespace-agnostic. Add local variable for isUnique so that BuildContentFromTemplate will work if resource- and non-resource elements are siblings in a template. Add logging capability for debug. r=rjc.
git-svn-id: svn://10.0.0.236/trunk@50839 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 20:47:19 +00:00
ssu%netscape.com
8be86d2e54 fixes bug #6408 and #15393. r=dbragg. fixes windows installer xpinstall
error detection.  Windows platform only"


git-svn-id: svn://10.0.0.236/trunk@50838 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 20:47:15 +00:00
despotdaemon%netscape.com
3ff30eed90 Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@50837 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 20:06:46 +00:00
kipp%netscape.com
54422e686a Eliminate need for networked loaded images
git-svn-id: svn://10.0.0.236/trunk@50836 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 19:44:09 +00:00
slamm%netscape.com
5203f99e62 Need to quote parentheses in ignore pattern.
git-svn-id: svn://10.0.0.236/trunk@50835 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 18:42:27 +00:00
despotdaemon%netscape.com
4e198d349e Pseudo-automatic update of changes made by jst@citec.fi.
git-svn-id: svn://10.0.0.236/trunk@50834 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 17:14:41 +00:00
kipp%netscape.com
93d0d8d38f nuked
git-svn-id: svn://10.0.0.236/trunk@50833 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 16:58:21 +00:00
bienvenu%netscape.com
bc725fb9b5 fix crash reading messages with new profiles
git-svn-id: svn://10.0.0.236/trunk@50831 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 16:09:49 +00:00
beard%netscape.com
4afa5bff04 improved report format, included root list
git-svn-id: svn://10.0.0.236/trunk@50830 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 15:56:05 +00:00
brade%netscape.com
6f185f7761 fixes to handle for control keys (off by 1) (bug #15693) r=kin@netscape.com
git-svn-id: svn://10.0.0.236/trunk@50829 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 14:56:33 +00:00
brade%netscape.com
a7ee842442 don't allow other modifiers when cut/copy/pasting (bug #15693); this missed the keyEvent branch. r=kin@netscape.com
git-svn-id: svn://10.0.0.236/trunk@50828 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 14:52:45 +00:00
kipp%netscape.com
a41c4bbacd Removed old netlib code; changed url loading when crawling to use the event queue to fix some re-entrancy issues somewhat
git-svn-id: svn://10.0.0.236/trunk@50827 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 14:09:19 +00:00
kipp%netscape.com
f3b0bfeedb Added sorting to the debug dump data for show-frame-size and show-content-size
git-svn-id: svn://10.0.0.236/trunk@50826 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 14:08:14 +00:00
buster%netscape.com
34185693a8 bug 12221 [Dogfood] Gfx text controls need to notify on mouse events
r=rods@netscape.com
also did some associated performance work, factoring code and collapsing multiple listener
objects down to 1.  This saves a few allocations and about 60 bytes per text control.

bug 11803 Need new event for text value changing
r=hyatt@netscape.com
not dogfood approved, but the fix has been sitting in my tree for 2 weeks


git-svn-id: svn://10.0.0.236/trunk@50825 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 13:38:29 +00:00
buster%netscape.com
4225108b72 bug 11803 Need new event for text value changing
r=hyatt@netscape.com
not dogfood approved, but the fix has been sitting in my tree for 2 weeks


git-svn-id: svn://10.0.0.236/trunk@50824 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 13:37:06 +00:00
buster%netscape.com
dc3e971a7e bug 11803 Need new event for text value changing
r=hyatt@netscape.com
not dogfood, but the fix has been sitting in my tree for 2 weeks


git-svn-id: svn://10.0.0.236/trunk@50823 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 13:36:23 +00:00
buster%netscape.com
ab0550c29d no bug number, part of webshell cleanup. nsIWebShell.h was needlessly included, so I removed it
trivial change, no reviewer.


git-svn-id: svn://10.0.0.236/trunk@50822 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 13:34:45 +00:00
rods%netscape.com
a38b9c0061 Fixed focus processing, this new code is very close to version 1.54 but more robust,
this fixes bug #7133. It has been compiled and tested on Win, Mac, and Linux.
r=buster,dcone


git-svn-id: svn://10.0.0.236/trunk@50821 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 13:20:32 +00:00
despotdaemon%netscape.com
b4b7016433 Pseudo-automatic update of changes made by tomk@mitre.org.
git-svn-id: svn://10.0.0.236/trunk@50820 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 11:54:29 +00:00
hyatt%netscape.com
6c5c58d1e8 Fix for 16479. r=waterson
git-svn-id: svn://10.0.0.236/trunk@50819 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 07:54:43 +00:00
tbogard%aol.net
f56f56047f Fixed a couple of typos.
git-svn-id: svn://10.0.0.236/trunk@50818 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 07:52:50 +00:00
varada%netscape.com
818b65a0d4 inform function has been changed to take in two parameters to show the filename as well as the directory with absolute path
git-svn-id: svn://10.0.0.236/trunk@50817 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 07:45:20 +00:00
varada%netscape.com
23669a0409 changes from relative path to absolute path in interpret.cpp and validation of empty entry in ncidialog
git-svn-id: svn://10.0.0.236/trunk@50816 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 07:43:57 +00:00
jevering%netscape.com
e8deb39b49 Adding boehm collector to windows.
(not part of the build yet)


git-svn-id: svn://10.0.0.236/trunk@50815 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 07:41:54 +00:00
jevering%netscape.com
8c8649671d Adding boehm collector linkages to the windows build.
(not part of the build yet)


git-svn-id: svn://10.0.0.236/trunk@50813 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 07:40:13 +00:00
tbogard%aol.net
8fef749953 Changed the nativeWindowParent's to be a nativeWindow instead of a long. nativeWindow is a typedef'd voidStar.
git-svn-id: svn://10.0.0.236/trunk@50807 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 07:31:28 +00:00
tbogard%aol.net
9565067a46 First landing.
git-svn-id: svn://10.0.0.236/trunk@50805 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 07:23:53 +00:00
dp%netscape.com
8b5b037caf bug# 5085 Eliminating some checks at autoreg time to improve startup
performance. r=sfraser


git-svn-id: svn://10.0.0.236/trunk@50803 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 07:12:08 +00:00
waterson%netscape.com
9f70f9cb52 Add xpcnativecallcontext.cpp for jband.
git-svn-id: svn://10.0.0.236/trunk@50802 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 07:08:15 +00:00
varada%netscape.com
1882311d32 removing relative paths and evaluating absolute ones
git-svn-id: svn://10.0.0.236/trunk@50801 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 06:51:03 +00:00
dveditz%netscape.com
20b7b8aa72 expose libreg ability to delete named values in nsIRegistry. Patch from
Jonas Utterström <jonas.utterstrom@vittran.norrnod.se>, r=dveditz


git-svn-id: svn://10.0.0.236/trunk@50800 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 06:47:58 +00:00
rjc%netscape.com
9621ab20bf Fix leak in nsXULSortService (found by Boehm GC). Also, remove CTOR_COUNT stuff. Review: waterson@netscape.com
git-svn-id: svn://10.0.0.236/trunk@50798 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 06:27:02 +00:00
brendan%mozilla.org
f2330eb459 1. Fixed missing JS_LOCK_GC in JS_YieldRequest, commented other badness there.
2.  Cleaned up ugly JS_GC_Flag typedef name and put XXXbe comment in there for
    next time: someone seems to have patched around a deadlock that has since
    bit chouck@geocast.com.
3.  Fixed gcDisabled by moving it from cx to rt and updating it atomically.
4.  Fixed ECMA violation where for (var i, j in o) ... was permitted; only one
    variable is allowed.
(Item 4 was a bug on rogerl's list, since closed?  r=shaver@mozilla.org.)


git-svn-id: svn://10.0.0.236/trunk@50795 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 05:46:42 +00:00
sspitzer%netscape.com
37928e864b fix possible solaris bustage by including the nsIFoo.h files when we have nsCOMPtr<nsIFoo> foo;
git-svn-id: svn://10.0.0.236/trunk@50794 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 05:10:28 +00:00
jband%netscape.com
32f352bb68 adding new empty placeholder file to the build. Will also add it to Mac project via camelot and put real stuff in it after all is stable. r=jband :)
git-svn-id: svn://10.0.0.236/trunk@50793 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 05:09:08 +00:00
sspitzer%netscape.com
b3c21470de more fixes to get copies and sent folder prefs to work right.
now, mailbox:// urls work.
change the logic of LocateMessageFolder() to be:

if (the target folder is not "anyfolder://") then {
	find the folder and return it if your find it.
	if you can't find it, create it in the datasource and return the folder.  see bug #14591
}
else {
	look for the default folder in any server associated with the current identity.
	if you find it, return it.
}


git-svn-id: svn://10.0.0.236/trunk@50790 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 05:03:03 +00:00
waterson%netscape.com
daa650308d Unclutter stuff by using nsCOMPtr in the nsElementMap::ContentListItem. Add leakenmacros to ContentListItem. Fix a leak in the the internal enumerator routine. Comment the internal enumerator routine since it's kinda funky. Add 'tag name' to the log messages.
git-svn-id: svn://10.0.0.236/trunk@50789 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 04:45:43 +00:00
sspitzer%netscape.com
f6806b13d3 remove unused variablable to fix a couple warnings.
git-svn-id: svn://10.0.0.236/trunk@50788 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 04:33:21 +00:00
shaver%netscape.com
103a22ed8e fix obj_getCount to property destroy state and propagate error (r=jband)
git-svn-id: svn://10.0.0.236/trunk@50787 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 04:32:46 +00:00
kin%netscape.com
9af25b17a4 Fix for bug #15360: Drag Selecting, Clicking, then Clicking leaves caret cruft.
r=troy@netscape.com,kipp@netscape.com,evaughan@netscape.com,beard@netscape.com

layout/html/base/src/nsGfxScrollFrame.cpp
    - Renamed all occurrences of ScrollPositionChanged() to
      to ScrollPositionDidChange() to match changes made
      to nsIScrollPositionListener.
    - Added ScrollPositionWillChange() stub method.

layout/html/base/src/nsPresShell.cpp
    - Added PresShellViewEventListener class that implements the
      nsIScrollPositionListener and nsICompositeListener view
      interfaces. This allows us to turn caret rendering on and off
      when scrolling and repainting to prevent leaving caret cruft
      on the screen.
    - PresShellViewEventListener is created in InitialReflow(), and
      released in ~PresShell().

view/public/Makefile.in
view/public/makefile.win
view/public/MANIFEST
    - Added nsICompositeListener to list of files to be exported.

view/public/nsICompositeListener.h
    - New file. Implementers of this interface can register themselves
      with the view manager to receive notification before and after
      a view is composited/refreshed.

view/public/nsIScrollPositionListener.h
    - Added a ScrollPositionWillChange() method.
    - Changed ScrollPositionChanged() to ScrollPositionDidChange().

view/public/nsIViewManager.h
    - Added AddCompositeListener() and RemoveCompositeListener methods.

view/src/nsScrollingView.cpp
view/src/nsScrollingView.h
    - Added NotifyScrollPositionWillChange() and
      NotifyScrollPositionDidChange() methods.
    - Modified HandleScrollEvent() to call NotifyScrollPositionWill/DidChange()
      methods. Added temporary offsetX and offsetY variables to allow us
      to calculate new offsets without changing mOffsetX and mOffsetY before
      notifications are sent out.

view/src/nsScrollPortView.cpp
    - Changed ScrollPositionChanged() to ScrollPositionDidChange().
    - Modified ScrollTo() to call the listener's ScrollPositionWillChange()
      method.

view/src/nsViewManager.cpp
view/src/nsViewManager.h
    - Added AddCompositeListener() and RemoveCompositeListener() methods.
    - Added support for CompositeListener notifications in the Refresh()
      methods for regions and rects.
    - Fix for bug #15901: [DOGFOOD] Selected text does not clear when you type
      Modified UpdateView() so that rects with zero width and height are
      no longer added to our damage region.
      r=beard@netscape.com


git-svn-id: svn://10.0.0.236/trunk@50786 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 04:29:30 +00:00
karnaze%netscape.com
dcf8e1f205 new regression test.
git-svn-id: svn://10.0.0.236/trunk@50785 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 04:29:09 +00:00
waterson%netscape.com
033d3bbd40 Fix compiler warning; r=rjc.
git-svn-id: svn://10.0.0.236/trunk@50784 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 04:26:46 +00:00
neeti%netscape.com
34b93b8117 updating status
git-svn-id: svn://10.0.0.236/trunk@50783 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 04:20:40 +00:00
karnaze%netscape.com
ef61c5a72c pass2 reflow doesn't request max element sizes to help with bug 14855. Reviewers didn't respond.
git-svn-id: svn://10.0.0.236/trunk@50782 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 04:09:22 +00:00
brendan%mozilla.org
7c13a9f3b1 Rename ToSource to uneval (r=shaver@mozilla.org,terry@geocast.com).
git-svn-id: svn://10.0.0.236/trunk@50781 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 04:07:59 +00:00
neeti%netscape.com
898eb50d34 Converted to use nsIModule to prepare for memory leaks fixing. Bug# 14034. r=sspitzer
git-svn-id: svn://10.0.0.236/trunk@50780 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 04:06:43 +00:00
neeti%netscape.com
6b6c7716c8 Converted to use nsIModule to prepare for memory leaks fixing. Bug# 14034. r=alecf
git-svn-id: svn://10.0.0.236/trunk@50779 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 04:06:14 +00:00
neeti%netscape.com
351b6ca2c6 Converted to use nsIModule to prepare for memory leaks fixing. Bug# 14034. r=waterson
git-svn-id: svn://10.0.0.236/trunk@50778 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 04:05:22 +00:00
beard%netscape.com
08cd03a169 fixed 2 string memory leaks (bug #15380). r=saari
git-svn-id: svn://10.0.0.236/trunk@50777 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 03:57:45 +00:00
radha%netscape.com
d7784c7d67 Send out OnStartDocumentLoad(0 notifications for visits to
anchors in a page. bug # 11631 15441. r=law. Got clearance from travis too


git-svn-id: svn://10.0.0.236/trunk@50776 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 03:50:47 +00:00
bienvenu%netscape.com
78b763db4d more of addrbook memory leak fixes r=mscott
git-svn-id: svn://10.0.0.236/trunk@50774 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 03:50:21 +00:00
radha%netscape.com
d6dbd3db1f fixing session history for frames. I accidently broke the behavior in
my monday's checkin. No bug #. r=law


git-svn-id: svn://10.0.0.236/trunk@50773 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 03:49:29 +00:00
troy%netscape.com
be2abd7a2c Patch from jst@citec.fi r=troy@netscape.com
Part of a fix for crash when expanding/collapsing toolbars. Change to
DeletingFrameSubtree() to make sure it examines the additional child
list as well as the principal child list


git-svn-id: svn://10.0.0.236/trunk@50772 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 03:37:10 +00:00
waterson%netscape.com
1464bedb39 Bug 16402. Make sure that literals addref (and release) the RDF service. Make sure to deal with edge Unregister[Resource|Literal] conditions; e.g., being called to unregister a literal when none was ever registered. r=rjc
git-svn-id: svn://10.0.0.236/trunk@50771 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 03:36:04 +00:00
jband%netscape.com
df5ae28aef r=shaver
- Fixed two similar cases where code was missing one level of
pointer dereference in terminating a copied string. Was trashing
data further up the stack.
- Use 'nsAllocator::Free' in two similar cases where 'delete' was
mistakenly used. Error pointed out by Purify.


git-svn-id: svn://10.0.0.236/trunk@50770 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 03:31:09 +00:00
rhp%netscape.com
2caa1592a8 Fix for email names with embedded &'s - Bug #16383 r=jefft
git-svn-id: svn://10.0.0.236/trunk@50769 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 03:27:33 +00:00
troy%netscape.com
8ec1b4ee83 Space savings. r=kipp@netscape.com
Re-implemented DST code to use separate objects for leaf nodes and
internal nodes. This reduces the per node size from 16 bytes to (on
average) 13 bytes per node


git-svn-id: svn://10.0.0.236/trunk@50768 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 03:18:28 +00:00
troy%netscape.com
9c1337b86f Space savings. r=karnaze@netscape.com Cc'd hyatt@netscape.com
Eliminated member data mIsContentEmpty and now we use a frame state bit
instead. This saves 4 bytes of space per table cell frame


git-svn-id: svn://10.0.0.236/trunk@50767 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 03:14:59 +00:00
shaver%netscape.com
9a4de938e7 make xpcshell use jsrtsvc, and let jsrtsvc handle JS_Shutdown (r=jband)
git-svn-id: svn://10.0.0.236/trunk@50766 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 03:05:48 +00:00
bienvenu%netscape.com
0eddf3358e fix memory leak of nsIURI in Set and GetAttribute r=waterson
git-svn-id: svn://10.0.0.236/trunk@50765 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 02:59:37 +00:00
srinivas%netscape.com
cc0b044bfe Autoconf for NSPR. Checkin for cls@seawood.org. Bugzilla #11893.
git-svn-id: svn://10.0.0.236/trunk@50764 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 02:42:36 +00:00
srinivas%netscape.com
6f136bc3f5 Autoconf for NSPR. Checkin for cls@seawood.org. Bugzilla #11893.
git-svn-id: svn://10.0.0.236/trunk@50763 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 02:36:40 +00:00
peterl%netscape.com
06471a021a moved toggle and tri-state from user-modify to user-select to stay in sync with CSS3
no bug #
r=pierre


git-svn-id: svn://10.0.0.236/trunk@50762 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 02:11:09 +00:00
cls%seawood.org
e381009988 Fix for bug #13412. r=shaver
If configured using --with-extensions or --with-extension=all, enable all of the non-default extensions rather than extension "yes" or "all".


git-svn-id: svn://10.0.0.236/trunk@50761 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 02:04:09 +00:00
akhil.arora%sun.com
047329ce0a 16426 r=akhil.arora@sun.com fixed by Denis Sharypov <sdv@sparc.spb.su>
The class java.lang.RuntimeException was not being pinned


git-svn-id: svn://10.0.0.236/trunk@50760 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 01:47:04 +00:00
akhil.arora%sun.com
4e04c99aad 16427 r=akhil.arora@sun.com fixed by Denis Sharypov <sdv@sparc.spb.su>
Check before dereferencing a NULL pointer.


git-svn-id: svn://10.0.0.236/trunk@50759 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 01:43:24 +00:00
varada%netscape.com
b2e2e2a6bc change from relative to absolute path
git-svn-id: svn://10.0.0.236/trunk@50758 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 01:39:32 +00:00
sspitzer%netscape.com
0d6acc8491 fix for #14892, automatically migrate if we only have one 4.x profile and no 5.0 profiles.
r=mscott.


git-svn-id: svn://10.0.0.236/trunk@50757 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 01:38:54 +00:00
akhil.arora%sun.com
0e030fdb50 16424 r=akhil.arora@sun.com fixed by Denis Sharypov <sdv@sparc.spb.su>
Fix two problems that kept the code from compiling on Win32


git-svn-id: svn://10.0.0.236/trunk@50756 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 01:38:42 +00:00
varada%netscape.com
cbaf31ef98 getting rid of relative paths in wizardmachine.cpp and wizardui.cpp for generate lists
git-svn-id: svn://10.0.0.236/trunk@50755 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 01:38:25 +00:00
varada%netscape.com
0e04699ad6 getting rid of relative paths in accountsetup and checklist inifiles
git-svn-id: svn://10.0.0.236/trunk@50754 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 01:19:25 +00:00
despotdaemon%netscape.com
6e4309cd35 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@50753 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:57:31 +00:00
wtc%netscape.com
ef278f909e Bugsplat bug #358401: created a separate .rc file for each DLL. The
product name is "Netscape Portable Runtime" and the file descriptions
are "NSPR Library", "PLDS Library", "PLC Library", and "PRSTRMS Library".
A debug build is indicated in the file description.  The copyright years
changed to 1996-1999.
Modified files: rules.mk, lib/ds/Makefile, lib/ds/Makefile.in,
lib/libc/src/Makefile, lib/libc/src/Makefile.in,
lib/prstreams/Makefile, lib/prstreams/Makefile.in,
prinit.h, nspr.rc
Added files: plds.rc, plc.rc, prstrms.rc
Removed file: resource.h


git-svn-id: svn://10.0.0.236/trunk@50752 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:51:41 +00:00
mcafee%netscape.com
981a0b415a Add #status option so you don't have to scroll down to the tree status.
git-svn-id: svn://10.0.0.236/trunk@50751 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:50:58 +00:00
sspitzer%netscape.com
13ef2ec53a more fixes to the 4.x uri -> 5.0 uri (copies and folders) code, for windows and mac.
#14951.  r=mscott


git-svn-id: svn://10.0.0.236/trunk@50750 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:50:34 +00:00
rpotts%netscape.com
fa27c68f3e bug #16328. Share a single nsToolkit instance among all widgets.
git-svn-id: svn://10.0.0.236/trunk@50749 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:49:11 +00:00
fur%netscape.com
69272dcfcd Initial version of net data cache APIs
git-svn-id: svn://10.0.0.236/trunk@50748 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:46:41 +00:00
kipp%netscape.com
f23d12f0ae Removed two more warnings
git-svn-id: svn://10.0.0.236/trunk@50747 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:29:28 +00:00
leaf%mozilla.org
1388fcf255 adding lib/mac/embedding for pierre -leaf
git-svn-id: svn://10.0.0.236/trunk@50746 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:19:06 +00:00
cathleen%netscape.com
1ba2750fb6 adds jsurl.xpt and html.css to windows packager list
git-svn-id: svn://10.0.0.236/trunk@50745 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:14:44 +00:00
wtc%netscape.com
974a9a3d5c Backed out the Windows resource file stuff checked in in the autoconf
branch merge.  It has two problems: 1. RESOBJ is not being used.  It
has the same meaning as the existing variable RES.  2. $(RES) is added
to OBJS twice on Win32.


git-svn-id: svn://10.0.0.236/trunk@50744 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:14:09 +00:00
nhotta%netscape.com
0cbcded17a Hooking up nsISaveAsCharset to the build, part of bug fix 8865, r=ftang.
git-svn-id: svn://10.0.0.236/trunk@50743 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:13:00 +00:00
bienvenu%netscape.com
f9c5bba278 fix memory leaks opening and closing dbs r=mscott
git-svn-id: svn://10.0.0.236/trunk@50742 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:11:58 +00:00
nhotta%netscape.com
dbcdcc135b Changed to get a charset name from a locale instead of hard code, also fixed a memory leak, bug=10816, r=tague
git-svn-id: svn://10.0.0.236/trunk@50741 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:11:38 +00:00
nhotta%netscape.com
54747068e8 Additional fallback for not charset labeled input, bug=15766, r=rhp
git-svn-id: svn://10.0.0.236/trunk@50740 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:08:42 +00:00
nhotta%netscape.com
58752631d9 Hooking up nsISaveAsCharset to the build, part of bug fix 8865, r=ftang.
git-svn-id: svn://10.0.0.236/trunk@50739 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:05:23 +00:00
bienvenu%netscape.com
284cea9db5 fix mork linked list which was disabling more than one table change from getting recorded r=davidmc
git-svn-id: svn://10.0.0.236/trunk@50738 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:05:10 +00:00
shaver%netscape.com
62dca335b0 Fix for 15480 (menu reflow from content change).
Use <titledbutton>, not <div>, for accelerator text to fix alignment
and improve performance _ever_ so slightly.
Initial support for checked menus (needs more magic).
(r=hyatt)


git-svn-id: svn://10.0.0.236/trunk@50737 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:59:18 +00:00
wtc%netscape.com
ad9bb8908b Removed the rule for $(PURE_LIBRARY), which was accidentally
resurrected in the autoconf checkin.


git-svn-id: svn://10.0.0.236/trunk@50736 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:55:27 +00:00
shaver%netscape.com
f3548d4772 case correction, scriptability and deprecative comment for nsIEnumerator (r=waterson,brendan)
git-svn-id: svn://10.0.0.236/trunk@50734 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:52:59 +00:00
mjudge%netscape.com
8633625794 oops. for got to check this in last time. bug number is 14795
git-svn-id: svn://10.0.0.236/trunk@50733 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:52:42 +00:00
norris%netscape.com
9323b18962 Fix a Unix warning by removing an unused local variable
git-svn-id: svn://10.0.0.236/trunk@50732 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:49:36 +00:00
norris%netscape.com
d8ebef8633 correct a comment.
git-svn-id: svn://10.0.0.236/trunk@50731 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:49:05 +00:00
kmcclusk%netscape.com
d8ff43782f Set vertical-align:baseline for input[type=image] to make it compatible with Nav 4.x
bug #16370; r=rods@netscape.com


git-svn-id: svn://10.0.0.236/trunk@50730 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:48:02 +00:00
pollmann%netscape.com
806e3f40cd Bugs 16450, 11979, 16576: Add back a CRLF I took out of the form post headers; r=harishd
git-svn-id: svn://10.0.0.236/trunk@50729 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:47:08 +00:00
davidm%netscape.com
b8febcc271 14974 apprunner fails to start up on B&W G3 8.6
Add file to generate logs on the mac
r sdagley


git-svn-id: svn://10.0.0.236/trunk@50728 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:46:27 +00:00
norris%netscape.com
814809437c Fix bug 16303. r=alecf@netscape.com
git-svn-id: svn://10.0.0.236/trunk@50727 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:45:40 +00:00
davidm%netscape.com
4d52510e79 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@50726 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:45:20 +00:00
kmcclusk%netscape.com
440593ffd1 When submitting a form using a "get" method only add the ? if the href does not end in a ?.
bug #16137 r=rods@netscape.com


git-svn-id: svn://10.0.0.236/trunk@50725 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:45:02 +00:00
kmcclusk%netscape.com
9827b1d455 Return the value of the option element value attribute if it is present otherwise return
the content of the option. bug #16158. r=rods@netscape.com


git-svn-id: svn://10.0.0.236/trunk@50724 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:41:40 +00:00
morse%netscape.com
19b5a1e558 fix bug 16357, memory leak, r=neeti
git-svn-id: svn://10.0.0.236/trunk@50723 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:37:35 +00:00
harishd%netscape.com
1cd0327569 Bug fix 2749 - Tweaked comment handling in quirks mode.
Bug fix 15992 - Line breaks within script and style were not getting counted
Related to bug 15423 - Rectified a glitch in Nav. DTD code where a doctype tag
                                         was opening up a body.
Userdefined tags are now treated as containers.
Added Kipp's Leaky Tool

r=pollmann.


git-svn-id: svn://10.0.0.236/trunk@50722 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:37:21 +00:00
morse%netscape.com
75a2c4fce1 fix bug 16348, memory leak, r=neeti
git-svn-id: svn://10.0.0.236/trunk@50721 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:36:50 +00:00
sdagley%netscape.com
6f9ff35120 Enforce _MD_DEFAULT_STACK_SIZE as the minimum stack size on Mac. r=beard
git-svn-id: svn://10.0.0.236/trunk@50720 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:33:13 +00:00
pepper%netscape.com
7f58cc3a0b Changed friend declaration to make HP compilers happy.
aCC requires a decl of friend class ClassName instead of friend ClassName.
r=peterl@netscape.com,mgleeson@netscape.com


git-svn-id: svn://10.0.0.236/trunk@50719 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:31:07 +00:00
ssu%netscape.com
6277f3a3b3 fixes bug #16246, #16312, #16344, #16308. r=dbragg@netscape.com. fixes crash bug if the install file operation fails. no longer crashes.
git-svn-id: svn://10.0.0.236/trunk@50718 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:30:56 +00:00
kipp%netscape.com
a4a3169649 r=dougt; fixed a warning
git-svn-id: svn://10.0.0.236/trunk@50717 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:30:39 +00:00
sdagley%netscape.com
072fc1a666 Marking all Mac threads as GCable for leak detector work. Bug #15906. r=beard
git-svn-id: svn://10.0.0.236/trunk@50716 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:29:34 +00:00
pepper%netscape.com
0c627abfcd Added missing newline at end of file to make the HP compilers happy.
r=mgleeson@netscape.com


git-svn-id: svn://10.0.0.236/trunk@50715 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:28:17 +00:00
alecf%netscape.com
3185d0a81d add boehm to apprunner
(flag not active in build yet)


git-svn-id: svn://10.0.0.236/trunk@50714 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:27:45 +00:00
alecf%netscape.com
4d423eecaf add boehm leak detector support to xpcom on linux
(these flags not active in the build yet)


git-svn-id: svn://10.0.0.236/trunk@50713 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:26:41 +00:00
wtc%netscape.com
0317a9ec8d Bugsplat bug #365543: removed the PRIntn typecast in the definition of
PR_TRUE and PR_FALSE.


git-svn-id: svn://10.0.0.236/trunk@50712 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:25:01 +00:00
alecf%netscape.com
c8460fa4ce tweaks to make generic_threads work on linux
not part of build


git-svn-id: svn://10.0.0.236/trunk@50711 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:24:34 +00:00
alecf%netscape.com
2fce42c8be more tweaks to make beard's generic_threads stuff work on linux
linux already has some of these routines implemented with pthread-specifics
not part of build = no reviewer/bug


git-svn-id: svn://10.0.0.236/trunk@50710 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:22:17 +00:00
mgleeson1%netscape.com
34c5281c43 r=pepper HPUX specific change - enable 64-bit int for js
git-svn-id: svn://10.0.0.236/trunk@50709 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:20:27 +00:00
wtc%netscape.com
463f69ae27 Bugzilla bug #14126: quote $(OS_RELEASE) in the shell command.
Thanks to Greg Noel <GregNoel@san.rr.com> for the bug report
and the fix.  Reviewed by Greg Noel and tested on several flavors
of Linux (x86, sparc, alpha, and ppc) and FreeBSD.


git-svn-id: svn://10.0.0.236/trunk@50708 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:17:38 +00:00
mcafee%netscape.com
8ebe80d3dc Better warning messages. r=pavlov.
git-svn-id: svn://10.0.0.236/trunk@50707 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:13:39 +00:00
kipp%netscape.com
37a76d8a25 r=Tomi.Leppikangas@oulu.fi; landed his patch for solaris build issues
git-svn-id: svn://10.0.0.236/trunk@50706 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:11:44 +00:00
kipp%netscape.com
63bce01588 Fixed edge case where line bounds wasn't quite accurate which causes the combined rect to not match which now wastes memory; only affects right aligned lines
git-svn-id: svn://10.0.0.236/trunk@50705 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:10:59 +00:00
kipp%netscape.com
18e9b9d2f5 r=troy; Reworked nsLineBox api to allow for reduced storage overhead; fixed bug 16252 while keeping bug 12709 fixed
git-svn-id: svn://10.0.0.236/trunk@50704 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:10:03 +00:00
jband%netscape.com
b3711cec39 Fixing leaks found by beard...
- Fixed leaked nsID ptr. bug 16373. This alsothrows a JS
exception when JS callers call createInstance or getService
using an (optional) param that is not an iid. This had been a
'XXX' in the code.
- Moved a release call out of just the error condition block in
setting up a ServiceReleaser. I should have caught this one, but
few of my tests use services :(  I have hopes that the whole
ServiceReleaser will become unnecessary as the ServiceManager
system changes and simply calling NS_RELEASE on a service becomes
sufficient.
- Cleaned up an addref/release pair in a setter (need to move to
nsComPtrs!) r=beard


git-svn-id: svn://10.0.0.236/trunk@50703 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:08:59 +00:00
kipp%netscape.com
dde9a9185e r=troy; Use a custom frame type so that bullets show up properly in the frame sizing data
git-svn-id: svn://10.0.0.236/trunk@50702 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:08:58 +00:00
kipp%netscape.com
3f737c9dc4 r=troy; Added some more atoms so that Dframe sizing data is more particular for line boxes
git-svn-id: svn://10.0.0.236/trunk@50701 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:08:31 +00:00
kipp%netscape.com
873c0b8d47 r=troy; Added a #define to prevent future code crashes
git-svn-id: svn://10.0.0.236/trunk@50700 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:08:04 +00:00
ftang%netscape.com
2a3924d2e0 fix Shift+a does not produce A in editor problem. We need to clean up isShift before we send. r=pavlov
git-svn-id: svn://10.0.0.236/trunk@50699 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:04:57 +00:00
kipp%netscape.com
a542382c77 Added a new table regression test
git-svn-id: svn://10.0.0.236/trunk@50698 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 22:58:41 +00:00
terry%mozilla.org
909afc64d2 Patch by holger@holger.om.org (Holger Schurig) -- was not correctly fixing up the 'when' column in the bugs_activity table.
git-svn-id: svn://10.0.0.236/trunk@50697 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 22:35:12 +00:00
terry%mozilla.org
270c5df832 Patch by holger@holger.om.org (Holger Schurig) -- get the permissions right on the shadow directory.
git-svn-id: svn://10.0.0.236/trunk@50696 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 22:32:44 +00:00
ftang%netscape.com
da9f453e91 fix problem with url bar trancation. Do not send extra key press for non A-Z0-9
git-svn-id: svn://10.0.0.236/trunk@50695 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 21:49:49 +00:00
brade%netscape.com
6bc5327b10 add nspr shlb to optimized too (to fix probably future mac bustage); remove bad path (r=sfraser@netscape.com)
git-svn-id: svn://10.0.0.236/trunk@50694 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 20:34:38 +00:00
ssu%netscape.com
0acd8acee3 fixing bug #16242. approved by leaf. r=leaf. removes jre122 from the mozilla installer. not part of tinderbox. would only affect windows.
git-svn-id: svn://10.0.0.236/trunk@50693 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 20:23:22 +00:00
brade%netscape.com
9c363797fa add nspr shlb to debug to fix mac build bustage
git-svn-id: svn://10.0.0.236/trunk@50692 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 20:18:30 +00:00
dmose%mozilla.org
f0ad8b22a7 fix to cope with checkins.when column name change to checkins.ci_when
git-svn-id: svn://10.0.0.236/trunk@50691 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 20:10:30 +00:00
ftang%netscape.com
0abb41fb24 fix the problem taht PageUp/PageDown/Up/Down/Left/Right/Home/End does not work after we land the keyevent branch. add missing isMeta code there
git-svn-id: svn://10.0.0.236/trunk@50690 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 20:03:00 +00:00
ftang%netscape.com
2d2a382150 landing keyEvent_19991004_BRANCH
bugs # see the log of the check in into branch
author/reviewer:
mozilla/layout/base/src/nsRangeList.cpp brade/mjudge
mozilla/layout/html/forms/src/nsGfxTextControlFrame.cpp brade/ftang
mozilla/layout/events/src/nsDOMEvent.cpp brade/joki
mozilla/layout/events/src/nsEventStateManager.cpp brade/joki
mozilla/widget/public/nsGUIEvent.h akkana/ftang
mozilla/widget/src/windows/nsWindow.cpp ftang/mjudge
mozilla/widget/src/windows/nsWindow.h ftang/mjudge
mozilla/widget/src/mac/nsTextAreaWidget.cpp brade/ftang
mozilla/widget/src/mac/nsMacEventHandler.cpp brade/simon
mozilla/widget/src/xpwidgets/nsKeyBindMgr.cpp brade/ftang
mozilla/widget/src/gtk/nsGtkEventHandler.cpp akkana/?
mozilla/widget/src/gtk/nsWidget.cpp erik/ftang
mozilla/layout/xul/base/src/nsTreeCellFrame.cpp brade/ftang
mozilla/editor/base/nsEditorEventListeners.cpp brade/akkana
mozilla/editor/base/nsHTMLEditor.cpp brade/akkana
mozilla/rdf/content/src/nsXULKeyListener.cpp ftang/saari
fix the master bug- 15693
fix at least, but not limited to, the following bugs
10158,11956,6053,9333,10901,14348,6449,11845,13016,14410,15657,15307,15842,13856


git-svn-id: svn://10.0.0.236/trunk@50688 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 18:27:01 +00:00
alecf%netscape.com
74f7c311eb fix back/forward buttons, #16415
a=leaf


git-svn-id: svn://10.0.0.236/trunk@50687 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 18:26:13 +00:00
terry%mozilla.org
210deb53ba Fix invalid SQL introduced by last patch.
git-svn-id: svn://10.0.0.236/trunk@50686 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 17:34:00 +00:00
terry%mozilla.org
e121b35d4c Allow sorting of status whiteboard column.
git-svn-id: svn://10.0.0.236/trunk@50685 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 17:21:43 +00:00
srinivas%netscape.com
3b846f9edf Add autoconf for NSPR. Check in for cls@seawood.org. Buzill 11893
git-svn-id: svn://10.0.0.236/trunk@50684 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 15:09:11 +00:00
rods%netscape.com
f2b4462a33 This corrects an erroneous checkin made on monday, fixes bug #16362 r=dcone
git-svn-id: svn://10.0.0.236/trunk@50683 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 14:55:08 +00:00
srinivas%netscape.com
e68238933b Autconf for NSPR. Checkin for cls@seawood.org. Bugzill #11893.
git-svn-id: svn://10.0.0.236/trunk@50682 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 14:50:38 +00:00
kipp%netscape.com
49f795c9c9 Make necko work with the viewer again
git-svn-id: svn://10.0.0.236/trunk@50681 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 14:43:59 +00:00
brade%netscape.com
bbc03d38ad remove dbl-click message (per joki); dblclick message is causing bug #14990; r=sfraser@netscape.com
git-svn-id: svn://10.0.0.236/trunk@50680 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 14:22:22 +00:00
brade%netscape.com
eb9061c0ef add nsXULControllers.cpp for hyatt (fix mac bustage)
git-svn-id: svn://10.0.0.236/trunk@50679 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 14:14:55 +00:00
brade%netscape.com
093237bea8 add nsIControllers.idl for hyatt (fix mac build bustage)
git-svn-id: svn://10.0.0.236/trunk@50678 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 13:56:34 +00:00
morse%netscape.com
9cbd053f44 fix bug 10434, memory leak detection, r=kin
git-svn-id: svn://10.0.0.236/trunk@50677 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 13:50:36 +00:00
morse%netscape.com
789e4a6e68 fix bug 10434, memory leak detection, r=valeski
git-svn-id: svn://10.0.0.236/trunk@50676 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 13:36:33 +00:00
hyatt%netscape.com
b895b64505 Fixing warnings. r=travis
git-svn-id: svn://10.0.0.236/trunk@50675 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 12:02:32 +00:00
hyatt%netscape.com
3e56d44211 Fixing linux bustage. Typo in makefile.
git-svn-id: svn://10.0.0.236/trunk@50674 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 11:18:03 +00:00
tbogard%aol.net
226a10c27a Changed the content area of navigator to use the new browser tag rather than html:iframe. r=hyatt.
git-svn-id: svn://10.0.0.236/trunk@50673 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 11:00:21 +00:00
hyatt%netscape.com
9259952dca Landing re-architected command dispatcher. r=hangas(XUL/JS), saari(C++)
git-svn-id: svn://10.0.0.236/trunk@50672 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 10:58:25 +00:00
tbogard%aol.net
d548e091c7 Fixed a number of incorrect assumptions of the attribute retrieval so it would now work with the of new XUL content nodes (iframe, browser, editor). r=hyatt.
git-svn-id: svn://10.0.0.236/trunk@50671 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 10:58:04 +00:00
tbogard%aol.net
e623d0cd2b Adding construction for new XUL tags "iframe", "editor", and "browser". r=hyatt.
git-svn-id: svn://10.0.0.236/trunk@50670 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 10:55:24 +00:00
tbogard%aol.net
645b1aba54 Adding new XUL tags, "iframe", "browser", "editor". r=hyatt.
git-svn-id: svn://10.0.0.236/trunk@50669 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 10:54:32 +00:00
tbogard%aol.net
9cb4c25b8a Added rules for the new browser, editor and iframe types. r=hyatt
git-svn-id: svn://10.0.0.236/trunk@50668 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 10:50:10 +00:00
sgehani%netscape.com
04a7745986 *** NOT PART OF BUILD ***
Fixed bug 11216: Cascading dependencies feature
   
Fixed bug 14320: Parser and action support for the LAUNCHAPP atribute
   
Fixed bug 14322: Mouse over displays component description
   
Fixed bug 16224: Mac Install Wizard crashing when installing custom components


git-svn-id: svn://10.0.0.236/trunk@50667 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 08:30:29 +00:00
sgehani%netscape.com
e33d697bbd Divide by 1024 rather than 1000 when calculating component install sizes. [r=ssu]
git-svn-id: svn://10.0.0.236/trunk@50666 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 08:15:35 +00:00
locka%iol.ie
3e4a7413ef Seperated webshell initialisation/termination out into their own methods. Added support to run Mozilla control from any directory with calls to the new NS_InitXPCOM and some new registry keys.
git-svn-id: svn://10.0.0.236/trunk@50665 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 07:46:55 +00:00
locka%iol.ie
e08fc8df48 Added context popup menu resources
git-svn-id: svn://10.0.0.236/trunk@50664 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 07:44:40 +00:00
locka%iol.ie
9d3f958db2 Added simple working implementation of drag and drop. Control now accepts a URL dragged and dropped from the IE address bar.
git-svn-id: svn://10.0.0.236/trunk@50663 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 07:43:50 +00:00
alecf%netscape.com
4cb578fb28 fix for #16303 - work around DOM security by specifying absolute chrome URLs
patch from norris, r=alecf


git-svn-id: svn://10.0.0.236/trunk@50662 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 07:07:43 +00:00
alecf%netscape.com
067e9e08c7 more tweaks to actually make this do useful things with linux - override malloc with GC_malloc
git-svn-id: svn://10.0.0.236/trunk@50659 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 05:34:21 +00:00
alecf%netscape.com
b7e4e49c84 make this link on rh60 - the pthreads that comes with rh60 doesn't allow direct access to __pthread_initial_thread_box, which was only used as a test anyway
git-svn-id: svn://10.0.0.236/trunk@50658 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 05:33:46 +00:00
troy%netscape.com
3007f63368 b=15388,15408 r=peterl@netscape.com
Made it so that for absolutely positioned frames we pass in the containing
block width/height to the HTML reflow state, rather than have it compute it.
This means we get a bottom up size rather than a top down size. That fixes
a problem where for containing blocks with a specified 'height' of 'auto' we
weren't correctly calculating the containing block height


git-svn-id: svn://10.0.0.236/trunk@50657 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 04:56:50 +00:00
troy%netscape.com
bc13612958 b=16238. Fix discussed with evaughan@netscape. One line change to make sure
the default area frame flag of NS_BLOCK_SPACE_MGR is used for scrolled
elements


git-svn-id: svn://10.0.0.236/trunk@50656 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 04:47:18 +00:00
warren%netscape.com
18d4872487 Reordered columns as per macafee's suggestion.
git-svn-id: svn://10.0.0.236/trunk@50655 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 04:37:13 +00:00
troy%netscape.com
50fb78a575 Space reductions for nsTableFrame. r=karnaze@netscape.com and changes Cc'd to
Hyatt. Tested extensively in apprunner (now mozilla). Change was to reduce from
10 to 5 the default size of the mColumnWidths array (note that the array is
dynamically grown if necessary). This reduces by 20 bytes the minimum table
frame size


git-svn-id: svn://10.0.0.236/trunk@50654 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 04:27:01 +00:00
karnaze%netscape.com
43efe84083 bug 15247 - ComputeAvailableTableWidth accounts for margins
git-svn-id: svn://10.0.0.236/trunk@50653 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 04:03:20 +00:00
karnaze%netscape.com
14d9729d57 cells with width=0 become auto, added comments
git-svn-id: svn://10.0.0.236/trunk@50652 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 04:01:26 +00:00
karnaze%netscape.com
1c91cf67ee new regression tests
git-svn-id: svn://10.0.0.236/trunk@50651 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 03:59:42 +00:00
ssu%netscape.com
661f8f1993 fixing bug #16064. checking in for dveditz@netscape.com. r=ssu@netscape.com. This fixes the crash under win98 when running from the windows installer.
git-svn-id: svn://10.0.0.236/trunk@50650 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 03:26:22 +00:00
srinivas%netscape.com
33f38025b2 Enable specification of minimum stack size.
git-svn-id: svn://10.0.0.236/trunk@50649 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 02:33:14 +00:00
jefft%netscape.com
f59d48eecf enable message move/copy {File Here} menu item; bug 13880, r= hangas
git-svn-id: svn://10.0.0.236/trunk@50648 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 02:20:02 +00:00
rhp%netscape.com
36d221edd9 Fix for attachment count - bug #16076 - reviewer: jefft
git-svn-id: svn://10.0.0.236/trunk@50647 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 02:05:20 +00:00
alecf%netscape.com
e39c37dd58 one down, one to go
git-svn-id: svn://10.0.0.236/trunk@50646 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 02:01:40 +00:00
beard%netscape.com
2975241aaf added support for "about:bloat?leaks". bug=15906,r=warren
git-svn-id: svn://10.0.0.236/trunk@50645 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 01:56:49 +00:00
varada%netscape.com
60280cb48a fix for bug #6348 -new field called Title is to be added in each ini file for the show example
git-svn-id: svn://10.0.0.236/trunk@50644 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 01:56:43 +00:00
evaughan%netscape.com
c89e48e233 Fixed gfx scrollbars style rule. Reviewed by Hyatt
git-svn-id: svn://10.0.0.236/trunk@50642 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 01:55:41 +00:00
alecf%netscape.com
af6d54dbdd convert to nsIModule
r=sspitzer
no bug


git-svn-id: svn://10.0.0.236/trunk@50640 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 01:40:27 +00:00
mcafee%netscape.com
ea6a04a363 Backing out quotes change for (14663), r=matt
git-svn-id: svn://10.0.0.236/trunk@50639 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 01:38:22 +00:00
varada%netscape.com
9acc778e9e bug #10361 config in title
git-svn-id: svn://10.0.0.236/trunk@50637 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 01:23:02 +00:00
varada%netscape.com
9b7d72b4f3 fix for bug #10361 - make neccessary changes in ini files in the title
git-svn-id: svn://10.0.0.236/trunk@50636 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 01:21:01 +00:00
bienvenu%netscape.com
48263cb73e real fix for build bustage
git-svn-id: svn://10.0.0.236/trunk@50635 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 01:02:23 +00:00
peterl%netscape.com
946d493f92 moved style rule cascading logic into a stand-alone rule processor
the rule processor can now cascade rules from multiple style sheets
fix for bug 12401 & 12106
r=pierre


git-svn-id: svn://10.0.0.236/trunk@50634 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 00:59:21 +00:00
peterl%netscape.com
c7896988cd factored out parsing of style attribute
deferred parsing of style attribute until content
is connected to a document
Fix for bug 14986
r=vidur


git-svn-id: svn://10.0.0.236/trunk@50633 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 00:57:37 +00:00
peterl%netscape.com
866322d95e added an assertion to help track down Bug 14238
r=troy


git-svn-id: svn://10.0.0.236/trunk@50632 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 00:56:30 +00:00
cyeh%netscape.com
8ba9c7c1f8 move megahal initialization so that if there is a nick collision and we
die, we at least don't leave a forked process behind.


git-svn-id: svn://10.0.0.236/trunk@50631 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 00:44:37 +00:00
don%netscape.com
7491373c1e Fixed build bustage.
git-svn-id: svn://10.0.0.236/trunk@50630 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 00:39:45 +00:00
varada%netscape.com
0a71d36864 rewriting verifyval to compare values
git-svn-id: svn://10.0.0.236/trunk@50629 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 00:39:31 +00:00
Jerry.Kirk%Nexwarecorp.com
5f745cfd66 These changes fix a draw problem when a top-level window was Move'd
Bug=16325 r=Michael.Kedl@Nexwarecorp.com


git-svn-id: svn://10.0.0.236/trunk@50628 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 00:33:49 +00:00
cmanske%netscape.com
1347e8f244 Fixed bugs 16204, 16118, 15831,15448,14342(partial) r=mjudge
git-svn-id: svn://10.0.0.236/trunk@50627 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 00:13:27 +00:00
cmanske%netscape.com
376ee7ffc4 Fixed bug 16118, part of fix for 14342. Reduced size of ender input widget. r=hyatt,hangas
git-svn-id: svn://10.0.0.236/trunk@50626 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 00:13:21 +00:00
beard%netscape.com
c49f31fb70 fixing a memory leak, just use an nsAutoString. bug=15380, r=harishd
git-svn-id: svn://10.0.0.236/trunk@50625 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 23:59:27 +00:00
alecf%netscape.com
064759d0a6 make this compile with -pedantic on Linux 2.2
git-svn-id: svn://10.0.0.236/trunk@50624 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 23:58:25 +00:00
alecf%netscape.com
4cc8b798cc add new makefile for our build system
git-svn-id: svn://10.0.0.236/trunk@50623 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 23:58:09 +00:00
alecf%netscape.com
e8c68e85db move old Boehm makefile to Makefile.unix
(not part of build)


git-svn-id: svn://10.0.0.236/trunk@50622 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 23:57:38 +00:00
bienvenu%netscape.com
2d2078838d add close method to datasources, r=mscott, no bug, but fixes some shutdown memory leaks
git-svn-id: svn://10.0.0.236/trunk@50621 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 23:55:57 +00:00
beard%netscape.com
06ca9ef5c4 make stack crawl instructions addresses reflect call site, not return address. bug=15906, r=rjc
git-svn-id: svn://10.0.0.236/trunk@50620 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 23:45:40 +00:00
beard%netscape.com
a0aa1b960a Rewrote using Mac file I/O, since MSL can only manage 35 FILEs. bug=15906, r=rjc
git-svn-id: svn://10.0.0.236/trunk@50619 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 23:45:03 +00:00
beard%netscape.com
34cb9deb75 for now, let leak detector reclaim block. bug=15906, r=rjc
git-svn-id: svn://10.0.0.236/trunk@50618 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 23:44:55 +00:00
beard%netscape.com
6dfda342cc html-ized the report, added -blame option.
git-svn-id: svn://10.0.0.236/trunk@50617 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 23:42:49 +00:00
alecf%netscape.com
416447022b fix typo (gif not dif)
talked to cmanske about this, no review necessary


git-svn-id: svn://10.0.0.236/trunk@50616 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 23:39:52 +00:00
dveditz%netscape.com
c5129bc74b added directory recursion feature to makecopy.exe, r=dougt
git-svn-id: svn://10.0.0.236/trunk@50615 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 23:37:24 +00:00
varada%netscape.com
59aaafb7d0 fix for bug #6569
git-svn-id: svn://10.0.0.236/trunk@50614 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 21:30:51 +00:00
terry%mozilla.org
10a148d16b Removing the last vote on a bug was causing an SQL error.
git-svn-id: svn://10.0.0.236/trunk@50611 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 20:17:01 +00:00
selmer%netscape.com
9c33ecf2b8 fix 15325 - don't allow dupl config
git-svn-id: svn://10.0.0.236/trunk@50607 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 19:55:13 +00:00
selmer%netscape.com
73b2bf9d78 Can't have commands after a Reload
git-svn-id: svn://10.0.0.236/trunk@50606 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 19:24:41 +00:00
wtc%netscape.com
78e2d8b9b1 Fixed an error of incorrect return value type in _MD_DeleteSharedMemory.
git-svn-id: svn://10.0.0.236/trunk@50603 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 19:17:05 +00:00
larryh%netscape.com
c2335df585 NSPR 3.5 landing
git-svn-id: svn://10.0.0.236/trunk@50602 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 18:32:42 +00:00
rbs%maths.uq.edu.au
28de62d660 [MathML] Fix to get the scriptlevel style context back, and minor cleanups.
git-svn-id: svn://10.0.0.236/trunk@50600 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 15:10:14 +00:00
karnaze%netscape.com
d0d34df829 bug 11026 - AllocateUnconstrained was off by 1 twip in some cases. bug 14159 - cell is not fixed width if an auto cell in the same col has a larger desired size for backward compatibilty.
git-svn-id: svn://10.0.0.236/trunk@50599 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 14:44:22 +00:00
kipp%netscape.com
9c0c764b13 Removed an unsupported argument (-f)
git-svn-id: svn://10.0.0.236/trunk@50598 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 14:43:04 +00:00
karnaze%netscape.com
12a011a2e9 removed handling of 0 width cells in ComputeAvailableTableWidth since it is done in nsHTMLTableElement. review=kmcclusk
git-svn-id: svn://10.0.0.236/trunk@50597 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 14:39:33 +00:00
karnaze%netscape.com
b893071648 added comments
git-svn-id: svn://10.0.0.236/trunk@50596 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 14:36:28 +00:00
gagan%netscape.com
6d496c35bf Argh... fix my last fix.
git-svn-id: svn://10.0.0.236/trunk@50595 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 12:16:08 +00:00
gagan%netscape.com
14334bc5ea Fix build bustage on windows.
git-svn-id: svn://10.0.0.236/trunk@50594 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 11:50:14 +00:00
gagan%netscape.com
22f1039803 Fix the windows build bustage. Bad checkin on my part!
git-svn-id: svn://10.0.0.236/trunk@50593 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 11:09:37 +00:00
gagan%netscape.com
a4426a97a5 Removing an #if 0 block that got checked in accidently with my last checkins.
git-svn-id: svn://10.0.0.236/trunk@50592 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 10:31:16 +00:00
gagan%netscape.com
8d5737519d Removed an unneccesary include statement. No bug number.
git-svn-id: svn://10.0.0.236/trunk@50591 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 10:28:10 +00:00
83 changed files with 105 additions and 24580 deletions

View File

@@ -0,0 +1,105 @@
/*
The contents of this file are subject to the Mozilla 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/MPL/
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 mozilla.org code.
The Initial Developer of the Original Code is Sun Microsystems,
Inc. Portions created by Sun are
Copyright (C) 1999 Sun Microsystems, Inc. All
Rights Reserved.
Contributor(s):
*/
#ifndef __JavaDOMGlobals_h__
#define __JavaDOMGlobals_h__
#include "jni.h"
#include "prclist.h"
#include "nsError.h"
#ifdef ERROR
#undef ERROR
#endif
class nsISupports;
class nsIDOMNode;
struct PRLogModuleInfo;
struct PRLock;
class JavaDOMGlobals {
public:
static jclass attrClass;
static jclass cDataSectionClass;
static jclass commentClass;
static jclass documentClass;
static jclass documentFragmentClass;
static jclass documentTypeClass;
static jclass domImplementationClass;
static jclass elementClass;
static jclass entityClass;
static jclass entityReferenceClass;
static jclass namedNodeMapClass;
static jclass nodeClass;
static jclass nodeListClass;
static jclass notationClass;
static jclass processingInstructionClass;
static jclass textClass;
static jfieldID nodePtrFID;
static jfieldID nodeListPtrFID;
static jfieldID domImplementationPtrFID;
static jfieldID nodeTypeAttributeFID;
static jfieldID nodeTypeCDataSectionFID;
static jfieldID nodeTypeCommentFID;
static jfieldID nodeTypeDocumentFragmentFID;
static jfieldID nodeTypeDocumentFID;
static jfieldID nodeTypeDocumentTypeFID;
static jfieldID nodeTypeElementFID;
static jfieldID nodeTypeEntityFID;
static jfieldID nodeTypeEntityReferenceFID;
static jfieldID nodeTypeNotationFID;
static jfieldID nodeTypeProcessingInstructionFID;
static jfieldID nodeTypeTextFID;
static jclass domExceptionClass;
static jmethodID domExceptionInitMID;
static jclass runtimeExceptionClass;
static jmethodID runtimeExceptionInitMID;
static const char* const DOM_EXCEPTION_MESSAGE[];
typedef enum ExceptionType { EXCEPTION_RUNTIME,
EXCEPTION_DOM } ExceptionType;
static PRLogModuleInfo* log;
static PRCList garbage;
static PRLock* garbageLock;
static PRInt32 javaMaxInt;
static void Initialize(JNIEnv *env);
static void Destroy(JNIEnv *env);
static jobject CreateNodeSubtype(JNIEnv *env,
nsIDOMNode *node);
static void AddToGarbage(nsISupports* domObject);
static void TakeOutGarbage();
static void ThrowException(JNIEnv *env,
const char * message = NULL,
nsresult rv = NS_OK,
ExceptionType exceptionType = EXCEPTION_RUNTIME);
};
#endif /* __JavaDOMGlobals_h__ */

File diff suppressed because it is too large Load Diff

View File

@@ -1,38 +0,0 @@
#
# 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 mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = \
public \
memcache \
filecache \
mgr \
build \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@@ -1,33 +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 or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..
DIRS= \
public \
mgr \
memcache \
filecache \
build \
$(NULL)
include <$(DEPTH)\config\rules.mak>

View File

@@ -1,54 +0,0 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = nkcacke
LIBRARY_NAME = necko_cache
IS_COMPONENT = 1
CPPSRCS = nsNetDataCacheModule.cpp
SHARED_LIBRARY_LIBS = \
$(DIST)/lib/libnkcachemgr_s.a \
$(DIST)/lib/libnkfilecache_s.a \
$(DIST)/lib/libnkmemcache_s.a \
$(DIST)/lib/libmozdbm_s.a \
$(DIST)/lib/libxpcomio_s.a \
$(NULL)
LOCAL_INCLUDES = \
-I$(DEPTH)/netwerk/cache/memcache \
-I$(DEPTH)/netwerk/cache/filecache \
-I$(DEPTH)/netwerk/cache/mgr \
$(NULL)
EXTRA_DSO_LDOPTS = \
$(MKSHLIB_FORCE_ALL) \
$(SHARED_LIBRARY_LIBS) \
$(MKSHLIB_UNFORCE_ALL) \
$(NULL)
include $(topsrcdir)/config/rules.mk
$(LIBRARY) $(SHARED_LIBRARY): $(SHARED_LIBRARY_LIBS) Makefile

View File

@@ -1,51 +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 or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
DEPTH=..\..\..
MODULE=nkcache
MAKE_OBJ_TYPE=DLL
DLLNAME=nkcache
DLL=.\$(OBJDIR)\$(DLLNAME).dll
CPP_OBJS= \
.\$(OBJDIR)\nsNetDataCacheModule.obj \
$(NULL)
LLIBS= \
$(DIST)\lib\nkcachemgr_s.lib \
$(DIST)\lib\nkfilecache_s.lib \
$(DIST)\lib\nkmemcache_s.lib \
$(DIST)\lib\dbm32.lib \
$(DIST)\lib\xpcom.lib \
$(LIBNSPR)
INCS = $(INCS) \
-I$(DEPTH)\netwerk\cache\memcache \
-I$(DEPTH)\netwerk\cache\filecache \
-I$(DEPTH)\netwerk\cache\mgr \
$(NULL)
include <$(DEPTH)\config\rules.mak>
install:: $(DLL)
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(DIST)\bin\components
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).lib $(DIST)\lib

View File

@@ -1,49 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* 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.
*
*/
#include "nsCOMPtr.h"
#include "nsIModule.h"
#include "nscore.h"
#include "nsIComponentManager.h"
#include "nsIServiceManager.h"
#include "nsIGenericFactory.h"
#include "nsINetDataCache.h"
#include "nsINetDataCacheManager.h"
#include "nsMemCacheCID.h"
#include "nsMemCache.h"
#include "nsNetDiskCache.h"
#include "nsNetDiskCacheCID.h"
#include "nsCacheManager.h"
// Factory method to create a new nsMemCache instance. Used
// by nsNetDataCacheModule
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMemCache, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsNetDiskCache, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsCacheManager, Init)
static nsModuleComponentInfo components[] = {
{ "Memory Cache", NS_MEM_CACHE_FACTORY_CID, NS_NETWORK_MEMORY_CACHE_PROGID, nsMemCacheConstructor },
{ "File Cache", NS_NETDISKCACHE_CID, NS_NETWORK_FILE_CACHE_PROGID, nsNetDiskCacheConstructor },
{ "Cache Manager",NS_CACHE_MANAGER_CID, NS_NETWORK_CACHE_MANAGER_PROGID,nsCacheManagerConstructor }
};
NS_IMPL_NSGETMODULE("Network Data Cache", components)

View File

@@ -1,60 +0,0 @@
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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 Mozilla Communicator.
#
# The Initial Developer of the Original Code is Intel Corp.
# Portions created by Intel Corp. are
# Copyright (C) 1999, 1999 Intel Corp. All
# Rights Reserved.
#
# Contributor(s): Yixiong Zou <yixiong.zou@intel.com>
# Carl Wong <carl.wong@intel.com>
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
VPATH = @srcdir@
srcdir = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = nkcache
LIBRARY_NAME = nkfilecache_s
REQUIRES = nspr dbm
EXTRA_DSO_LDOPTS += -L$(DIST)/lib -lmozdbm_s
EXPORTS=nsNetDiskCacheCID.h \
nsNetDiskCache.h \
nsIDBAccessor.h \
nsDBAccessor.h \
$(NULL)
CPPSRCS = \
nsDBAccessor.cpp\
nsDBEnumerator.cpp \
nsNetDiskCache.cpp \
nsDiskCacheRecord.cpp \
nsDiskCacheRecordChannel.cpp \
$(NULL)
EXTRA_LIBS = $(NSPR_LIBS)
# we don't want the shared lib, but we want to force the creation of a
# static lib.
override NO_SHARED_LIB=1
override NO_STATIC_LIB=
include $(topsrcdir)/config/rules.mk

View File

@@ -1,44 +0,0 @@
#!gmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=..\..\..
include <$(DEPTH)/config/config.mak>
MODULE = nkcache
LIBRARY_NAME = nkfilecache_s
CPP_OBJS= \
.\$(OBJDIR)\nsDBAccessor.obj \
.\$(OBJDIR)\nsDBEnumerator.obj \
.\$(OBJDIR)\nsNetDiskCache.obj \
.\$(OBJDIR)\nsDiskCacheRecord.obj \
.\$(OBJDIR)\nsDiskCacheRecordChannel.obj \
$(NULL)
EXPORTS=nsNetDiskCacheCID.h
include <$(DEPTH)\config\rules.mak>
install:: $(LIBRARY)
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
clobber::
rm -rf $(OBJDIR)
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib

View File

@@ -1,416 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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 Mozilla Communicator.
*
* The Initial Developer of the Original Code is Intel Corp.
* Portions created by Intel Corp. are
* Copyright (C) 1999, 1999 Intel Corp. All
* Rights Reserved.
*
* Contributor(s): Yixiong Zou <yixiong.zou@intel.com>
* Carl Wong <carl.wong@intel.com>
*/
/*
* This file is part of filecache implementation.
*
* nsIDBAccessor is a interface that shields all the direct database access
* method from nsNetDiskCache.
*
* nsDBAccessor is a implementation of the nsIDBAccessor interface. It
* uses dbm(Berkely) as the database.
*
* a nsDiskCacheRecord is mapped into two entries in the database,
* key->recordID
* recordID->metadata
*/
#include "nsDBAccessor.h"
#include "nscore.h"
#include "prtypes.h"
#include "plhash.h"
#include "nsCRT.h"
nsDBAccessor::nsDBAccessor() :
mDB(0) ,
mDBFile(0) ,
mSessionID(0) ,
mSessionCntr(0) ,
mDBFilesize(0)
{
mLastSyncTime = PR_IntervalNow() ;
NS_INIT_REFCNT();
}
nsDBAccessor::~nsDBAccessor()
{
Shutdown() ;
}
//
// Implement nsISupports methods
//
NS_IMPL_ISUPPORTS(nsDBAccessor, NS_GET_IID(nsIDBAccessor))
///////////////////////////////////////////////////////////
// nsIDBAccessor methods
NS_IMETHODIMP
nsDBAccessor::Init(nsIFileSpec* dbfile)
{
char* dbname ;
// this should cover all platforms.
dbfile->GetNativePath(&dbname) ;
mDBFile = dbfile ;
// FUR - how is page size chosen ? It's worth putting a comment
// in here about the possible usefulness of tuning these parameters
HASHINFO hash_info = {
16*1024 , /* bucket size */
0 , /* fill factor */
0 , /* number of elements */
0 , /* bytes to cache */
0 , /* hash function */
0} ; /* byte order */
mDB = dbopen(dbname,
O_RDWR | O_CREAT ,
0600 ,
DB_HASH ,
& hash_info) ;
nsCRT::free(dbname) ;
if(!mDB)
return NS_ERROR_FAILURE ;
// set mSessionID
DBT db_key, db_data ;
db_key.data = NS_CONST_CAST(char*, SessionKey) ;
db_key.size = PL_strlen(SessionKey) ;
int status = (*mDB->get)(mDB, &db_key, &db_data, 0) ;
if(status == -1) {
NS_ERROR("ERROR: failed get session id in database.") ;
return NS_ERROR_FAILURE ;
}
if(status == 0) {
// get the last session id
PRInt16 *old_ID = NS_STATIC_CAST(PRInt16*, db_data.data) ;
if(*old_ID < ini_sessionID) {
NS_ERROR("ERROR: Bad Session ID in database, corrupted db.") ;
return NS_ERROR_FAILURE ;
}
mSessionID = *old_ID + 1 ;
}
else if(status == 1) {
// must be a new db
mSessionID = ini_sessionID ;
}
db_data.data = NS_REINTERPRET_CAST(void*, &mSessionID) ;
db_data.size = sizeof(PRInt16) ;
// store the new session id
status = (*mDB->put)(mDB, &db_key, &db_data, 0) ;
if(status == 0) {
(*mDB->sync)(mDB, 0) ;
// initialize database filesize
return mDBFile->GetFileSize(&mDBFilesize) ;
}
else {
NS_ERROR("reset session ID failure.") ;
return NS_ERROR_FAILURE ;
}
}
NS_IMETHODIMP
nsDBAccessor::Shutdown(void)
{
if(mDB) {
(*mDB->sync)(mDB, 0) ;
(*mDB->close)(mDB) ;
mDB = nsnull ;
}
return NS_OK ;
}
NS_IMETHODIMP
nsDBAccessor::Get(PRInt32 aID, void** anEntry, PRUint32 *aLength)
{
if(!anEntry)
return NS_ERROR_NULL_POINTER ;
*anEntry = nsnull ;
*aLength = 0 ;
NS_ASSERTION(mDB, "no database") ;
DBT db_key, db_data ;
db_key.data = NS_REINTERPRET_CAST(void*, &aID) ;
db_key.size = sizeof(PRInt32) ;
int status = 0 ;
status = (*mDB->get)(mDB, &db_key, &db_data, 0) ;
if(status == 0) {
*anEntry = db_data.data ;
*aLength = db_data.size ;
return NS_OK ;
}
else if(status == 1)
return NS_OK ;
else
return NS_ERROR_FAILURE ;
}
NS_IMETHODIMP
nsDBAccessor::Put(PRInt32 aID, void* anEntry, PRUint32 aLength)
{
NS_ASSERTION(mDB, "no database") ;
DBT db_key, db_data ;
db_key.data = NS_REINTERPRET_CAST(void*, &aID) ;
db_key.size = sizeof(PRInt32) ;
db_data.data = anEntry ;
db_data.size = aLength ;
if(0 == (*mDB->put)(mDB, &db_key, &db_data, 0)) {
return Sync() ;
}
else {
return NS_ERROR_FAILURE ;
}
}
/*
* It's more important to remove the id->metadata entry first since
* key->id mapping is just a reference
*/
NS_IMETHODIMP
nsDBAccessor::Del(PRInt32 aID, void* anEntry, PRUint32 aLength)
{
NS_ASSERTION(mDB, "no database") ;
DBT db_key ;
// delete recordID->metadata
db_key.data = NS_REINTERPRET_CAST(void*, &aID) ;
db_key.size = sizeof(PRInt32) ;
PRInt32 status = -1 ;
status = (*mDB->del)(mDB, &db_key, 0) ;
if(-1 == status) {
return NS_ERROR_FAILURE ;
}
// delete key->recordID
db_key.data = anEntry ;
db_key.size = aLength ;
status = (*mDB->del)(mDB, &db_key, 0) ;
if(-1 == status) {
return NS_ERROR_FAILURE ;
}
return Sync() ;
}
NS_IMETHODIMP
nsDBAccessor::GetID(const char* key, PRUint32 length, PRInt32* aID)
{
NS_ASSERTION(mDB, "no database") ;
DBT db_key, db_data ;
db_key.data = NS_CONST_CAST(char*, key) ;
db_key.size = length ;
int status = (*mDB->get)(mDB, &db_key, &db_data, 0) ;
if(status == 0) {
// found recordID
*aID = *(NS_REINTERPRET_CAST(PRInt32*, db_data.data)) ;
return NS_OK ;
}
else if(status == 1) {
// create a new one
PRInt32 id = 0 ;
id = mSessionID << 16 | mSessionCntr++ ;
// add new id into mDB
db_data.data = NS_REINTERPRET_CAST(void*, &id) ;
db_data.size = sizeof(PRInt32) ;
status = (*mDB->put)(mDB, &db_key, &db_data, 0) ;
if(status != 0) {
NS_ERROR("updating db failure.") ;
return NS_ERROR_FAILURE ;
}
*aID = id ;
return Sync() ;
}
else {
NS_ERROR("ERROR: keydb failure.") ;
return NS_ERROR_FAILURE ;
}
}
NS_IMETHODIMP
nsDBAccessor::EnumEntry(void** anEntry, PRUint32* aLength, PRBool bReset)
{
if(!anEntry)
return NS_ERROR_NULL_POINTER ;
*anEntry = nsnull ;
*aLength = 0 ;
NS_ASSERTION(mDB, "no database") ;
PRUint32 flag ;
if(bReset)
flag = R_FIRST ;
else
flag = R_NEXT ;
DBT db_key, db_data ;
PRUint32 len = PL_strlen(SessionKey) ;
int status ;
do {
status = (*mDB->seq)(mDB, &db_key, &db_data, flag) ;
flag = R_NEXT ;
if(status == -1)
return NS_ERROR_FAILURE ;
// get next if it's a key->recordID
if(db_key.size > sizeof(PRInt32) && db_data.size == sizeof(PRInt32))
continue ;
// get next if it's a sessionID entry
if(db_key.size == len && db_data.size == sizeof(PRInt16))
continue ;
// recordID is always 32 bits long
if(db_key.size == sizeof(PRInt32))
break ;
} while(!status) ;
if (0 == status) {
*anEntry = db_data.data ;
*aLength = db_data.size ;
}
return NS_OK ;
}
/*
* returns the cached database file size.
* mDBFilesize will be updated during Sync().
*/
NS_IMETHODIMP
nsDBAccessor::GetDBFilesize(PRUint32* aSize)
{
*aSize = mDBFilesize ;
return NS_OK ;
}
NS_IMETHODIMP
nsDBAccessor::GetSpecialEntry(void** anEntry, PRUint32* aLength)
{
if(!anEntry)
return NS_ERROR_NULL_POINTER ;
*anEntry = nsnull ;
*aLength = 0 ;
DBT db_key, db_data ;
db_key.data = NS_CONST_CAST(char*, SpecialEntry) ;
db_key.size = PL_strlen(SpecialEntry) ;
int status = (*mDB->get)(mDB, &db_key, &db_data, 0) ;
if(status == -1) {
NS_ERROR("ERROR: failed get special entry in database.") ;
return NS_ERROR_FAILURE ;
}
if(status == 0) {
*anEntry = db_data.data ;
*aLength = db_data.size ;
}
return NS_OK ;
}
NS_IMETHODIMP
nsDBAccessor::SetSpecialEntry(void* anEntry, PRUint32 aLength)
{
DBT db_key, db_data ;
db_key.data = NS_CONST_CAST(char*, SpecialEntry) ;
db_key.size = PL_strlen(SpecialEntry) ;
db_data.data = anEntry ;
db_data.size = aLength ;
if(0 == (*mDB->put)(mDB, &db_key, &db_data, 0)) {
(*mDB->sync)(mDB, 0) ;
return NS_OK ;
}
else {
return NS_ERROR_FAILURE ;
}
}
/*
* sync routine is only called when the SyncInterval is reached. Otherwise
* it just returns. If db synced, the filesize will be updated at the
* same time.
*/
nsresult
nsDBAccessor::Sync(void)
{
PRIntervalTime time = PR_IntervalNow() ;
PRIntervalTime duration = time - mLastSyncTime ;
if (PR_IntervalToMilliseconds(duration) > SyncInterval) {
int status = (*mDB->sync)(mDB, 0) ;
if(status == 0) {
// printf("\tsynced\n") ;
mLastSyncTime = time ;
// update db filesize here
return mDBFile->GetFileSize(&mDBFilesize) ;
} else
return NS_ERROR_FAILURE ;
} else {
// printf("\tnot synced\n") ;
return NS_OK ;
}
}

View File

@@ -1,93 +0,0 @@
/*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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 Mozilla Communicator.
*
* The Initial Developer of the Original Code is Intel Corp.
* Portions created by Intel Corp. are
* Copyright (C) 1999, 1999 Intel Corp. All
* Rights Reserved.
*
* Contributor(s): Yixiong Zou <yixiong.zou@intel.com>
* Carl Wong <carl.wong@intel.com>
*/
/*
* This file is part of filecache implementation.
*
* nsIDBAccessor is a interface that shields all the direct database access
* method from nsNetDiskCache.
*
* nsDBAccessor is a implementation of the nsIDBAccessor interface. It
* uses dbm(Berkely) as the database.
*
*/
#ifndef _NSIDBACCESSOR_H_
#define _NSIDBACCESSOR_H_
#include "nsIDBAccessor.h"
#include "mcom_db.h"
#include "prinrval.h"
#include "nsCOMPtr.h"
// bogus string for the key of session id
static const char * const SessionKey = "SK" ;
// bogus string for the size
static const char * const SpecialEntry = "SE" ;
// initial session id number
static const PRInt16 ini_sessionID = 0xff ;
static const PRUint16 SyncInterval = 1000 ;
class nsDBAccessor : public nsIDBAccessor
{
public:
NS_DECL_ISUPPORTS
nsDBAccessor() ;
virtual ~nsDBAccessor() ;
NS_IMETHOD Init(nsIFileSpec* dbfile) ;
NS_IMETHOD Shutdown(void) ;
NS_IMETHOD Put(PRInt32 aID, void* anEntry, PRUint32 aLength) ;
NS_IMETHOD Get(PRInt32 aID, void** anEntry, PRUint32 *aLength) ;
NS_IMETHOD Del(PRInt32 aID, void* anEntry, PRUint32 aLength) ;
NS_IMETHOD GetID(const char* key, PRUint32 length, PRInt32* aID) ;
NS_IMETHOD EnumEntry(void* *anEntry, PRUint32* aLength, PRBool bReset) ;
NS_IMETHOD GetDBFilesize(PRUint32* aSize) ;
NS_IMETHOD GetSpecialEntry(void** anEntry, PRUint32 *aLength) ;
NS_IMETHOD SetSpecialEntry(void* anEntry, PRUint32 aLength) ;
protected:
nsresult Sync(void) ;
private:
DB * mDB ;
nsCOMPtr<nsIFileSpec> mDBFile ;
PRInt16 mSessionID ;
PRInt16 mSessionCntr ;
PRIntervalTime mLastSyncTime ;
PRUint32 mDBFilesize ; // cached DB filesize,
// updated on every sync for now
} ;
#endif // _NSIDBACCESSOR_H_

View File

@@ -1,108 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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 Mozilla Communicator.
*
* The Initial Developer of the Original Code is Intel Corp.
* Portions created by Intel Corp. are
* Copyright (C) 1999, 1999 Intel Corp. All
* Rights Reserved.
*
* Contributor(s): Yixiong Zou <yixiong.zou@intel.com>
* Carl Wong <carl.wong@intel.com>
*/
/*
* This file is part of filecache implementation.
*
* It implements a simple iterator for the database, see nsDBAccessor.
*/
#include "nsDBEnumerator.h"
#include "nsDiskCacheRecord.h"
nsDBEnumerator::nsDBEnumerator(nsIDBAccessor* aDB, nsNetDiskCache* aCache) :
m_DB(aDB) ,
m_DiskCache(aCache) ,
m_tempEntry(0) ,
m_tempEntry_length(0) ,
m_CacheEntry(0) ,
m_bReset(PR_TRUE)
{
NS_INIT_REFCNT();
}
nsDBEnumerator::~nsDBEnumerator()
{
NS_IF_RELEASE(m_CacheEntry) ;
}
//
// Implement nsISupports methods
//
NS_IMPL_ISUPPORTS(nsDBEnumerator, NS_GET_IID(nsIEnumerator))
/////////////////////////////////////////////////////////////////
// nsISimpleEnumerator methods
NS_IMETHODIMP
nsDBEnumerator::HasMoreElements(PRBool *_retval)
{
*_retval = PR_FALSE ;
nsresult rv = m_DB->EnumEntry(&m_tempEntry, &m_tempEntry_length, m_bReset) ;
if(NS_FAILED(rv)) {
// do some error recovery
m_DiskCache->DBRecovery() ;
return rv ;
}
m_bReset = PR_FALSE ;
if(m_tempEntry && m_tempEntry_length != 0)
*_retval = PR_TRUE ;
return NS_OK ;
}
// this routine does not create a new item by itself
// Rather it reuses the item inside the object. So if you need to use the
// item later, you have to
// create a new item specifically, using copy constructor or some other dup
// function. And don't forget to release it after you're done
//
NS_IMETHODIMP
nsDBEnumerator::GetNext(nsISupports **_retval)
{
if(!m_CacheEntry) {
m_CacheEntry = new nsDiskCacheRecord(m_DB, m_DiskCache) ;
if(m_CacheEntry)
NS_ADDREF(m_CacheEntry) ;
else
return NS_ERROR_OUT_OF_MEMORY ;
}
if(!_retval)
return NS_ERROR_NULL_POINTER ;
*_retval = nsnull ;
nsresult rv = m_CacheEntry->RetrieveInfo(m_tempEntry, m_tempEntry_length) ;
if(NS_FAILED(rv))
return rv ;
*_retval = NS_STATIC_CAST(nsISupports*, m_CacheEntry) ;
NS_ADDREF(*_retval) ; // all good getter addref
return NS_OK ;
}

View File

@@ -1,60 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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 Mozilla Communicator.
*
* The Initial Developer of the Original Code is Intel Corp.
* Portions created by Intel Corp. are
* Copyright (C) 1999, 1999 Intel Corp. All
* Rights Reserved.
*
* Contributor(s): Yixiong Zou <yixiong.zou@intel.com>
* Carl Wong <carl.wong@intel.com>
*/
/*
* This file is part of filecache implementation.
*
* It implements a simple iterator for the database, see nsDBAccessor.
*/
#ifndef _NS_DBENUMERATOR_H_
#define _NS_DBENUMERATOR_H_
#include "nsISimpleEnumerator.h"
#include "nsINetDataCacheRecord.h"
#include "nsIDBAccessor.h"
#include "nsCOMPtr.h"
#include "nsNetDiskCache.h"
#include "nsDiskCacheRecord.h"
class nsCachedDiskData ; /* forward decl */
class nsDBEnumerator : public nsISimpleEnumerator {
public:
NS_DECL_ISUPPORTS
NS_DECL_NSISIMPLEENUMERATOR
nsDBEnumerator(nsIDBAccessor* aDB, nsNetDiskCache* aCache) ;
virtual ~nsDBEnumerator() ;
private:
nsCOMPtr<nsIDBAccessor> m_DB ;
nsCOMPtr<nsNetDiskCache> m_DiskCache ;
void * m_tempEntry ;
PRUint32 m_tempEntry_length ;
nsDiskCacheRecord* m_CacheEntry ;
PRBool m_bReset ;
};
#endif // _NS_DBENUMERATOR_H_

View File

@@ -1,456 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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 Mozilla Communicator.
*
* The Initial Developer of the Original Code is Intel Corp.
* Portions created by Intel Corp. are
* Copyright (C) 1999, 1999 Intel Corp. All
* Rights Reserved.
*
* Contributor(s): Yixiong Zou <yixiong.zou@intel.com>
* Carl Wong <carl.wong@intel.com>
*/
#include "nsDiskCacheRecord.h"
#include "nsINetDataDiskCache.h"
#include "nsNetDiskCacheCID.h"
#include "nsDiskCacheRecordChannel.h"
#include "nsFileStream.h"
#include "nsIComponentManager.h"
#include "nsIServiceManager.h"
#include "nsIProtocolHandler.h"
#include "nsIIOService.h"
#include "nsIAllocator.h"
#include "plstr.h"
#include "prprf.h"
#include "prmem.h"
#include "prlog.h"
#include "prtypes.h"
#include "netCore.h"
#include "nsDBAccessor.h"
#if !defined(IS_LITTLE_ENDIAN) && !defined(IS_BIG_ENDIAN)
ERROR! Must have a byte order
#endif
#ifdef IS_LITTLE_ENDIAN
#define COPY_INT32(_a,_b) memcpy(_a, _b, sizeof(int32))
#else
#define COPY_INT32(_a,_b) /* swap */ \
do { \
((char *)(_a))[0] = ((char *)(_b))[3]; \
((char *)(_a))[1] = ((char *)(_b))[2]; \
((char *)(_a))[2] = ((char *)(_b))[1]; \
((char *)(_a))[3] = ((char *)(_b))[0]; \
} while(0)
#endif
nsDiskCacheRecord::nsDiskCacheRecord(nsIDBAccessor* db, nsNetDiskCache* aCache) :
mKey(0) ,
mKeyLength(0) ,
mRecordID(0) ,
mMetaData(0) ,
mMetaDataLength(0) ,
mDB(db) ,
mInfo(0) ,
mInfoSize(0) ,
mNumChannels(0) ,
mDiskCache(aCache)
{
NS_INIT_REFCNT();
NS_ASSERTION(mDiskCache, "Must have an nsNetDiskCache");
NS_ADDREF(mDiskCache);
}
// mem alloced. so caller should do free() on key.
NS_IMETHODIMP
nsDiskCacheRecord::Init(const char* key, PRUint32 length, PRInt32 ID)
{
NS_NewFileSpec(getter_AddRefs(mFile));
if(!mFile)
return NS_ERROR_OUT_OF_MEMORY ;
// copy key
mKeyLength = length ;
mKey = NS_STATIC_CAST(char*, nsAllocator::Alloc(mKeyLength*sizeof(char))) ;
if(!mKey)
return NS_ERROR_OUT_OF_MEMORY ;
memcpy(mKey, key, length) ;
// get RecordID
mRecordID = ID ;
// setup the file name
nsCOMPtr<nsIFileSpec> dbFolder ;
mDiskCache->GetDiskCacheFolder(getter_AddRefs(dbFolder)) ;
nsresult rv = mFile->FromFileSpec(dbFolder) ;
if(NS_FAILED(rv))
return NS_ERROR_FAILURE ;
// dir is a hash result of mRecordID%32, hope it's enough
char filename[9], dirName[3] ;
PR_snprintf(dirName, 3, "%02x", (((PRUint32)mRecordID) % 32)) ;
mFile->AppendRelativeUnixPath(dirName) ;
PR_snprintf(filename, 9, "%08x", mRecordID) ;
mFile->AppendRelativeUnixPath(filename) ;
return NS_OK ;
}
nsDiskCacheRecord::~nsDiskCacheRecord()
{
if(mKey)
nsAllocator::Free(mKey) ;
if(mMetaData)
nsAllocator::Free(mMetaData) ;
if(mInfo)
nsAllocator::Free(mInfo) ;
NS_IF_RELEASE(mDiskCache);
}
//
// Implement nsISupports methods
//
NS_IMPL_ISUPPORTS(nsDiskCacheRecord, NS_GET_IID(nsINetDataCacheRecord))
///////////////////////////////////////////////////////////////////////
// nsINetDataCacheRecord methods
// yes, mem alloced on *_retval.
NS_IMETHODIMP
nsDiskCacheRecord::GetKey(PRUint32 *length, char** _retval)
{
if(!_retval)
return NS_ERROR_NULL_POINTER ;
*length = mKeyLength ;
*_retval = NS_STATIC_CAST(char*, nsAllocator::Alloc(mKeyLength*sizeof(char))) ;
if(!*_retval)
return NS_ERROR_OUT_OF_MEMORY ;
memcpy(*_retval, mKey, mKeyLength) ;
return NS_OK ;
}
NS_IMETHODIMP
nsDiskCacheRecord::GetRecordID(PRInt32* aRecordID)
{
*aRecordID = mRecordID ;
return NS_OK ;
}
// yes, mem alloced on *_retval.
NS_IMETHODIMP
nsDiskCacheRecord::GetMetaData(PRUint32 *length, char **_retval)
{
if(!_retval)
return NS_ERROR_NULL_POINTER ;
// always null the return value first.
*_retval = nsnull ;
*length = mMetaDataLength ;
if(mMetaDataLength) {
*_retval = NS_STATIC_CAST(char*, nsAllocator::Alloc(mMetaDataLength*sizeof(char))) ;
if(!*_retval)
return NS_ERROR_OUT_OF_MEMORY ;
memcpy(*_retval, mMetaData, mMetaDataLength) ;
}
return NS_OK ;
}
NS_IMETHODIMP
nsDiskCacheRecord::SetMetaData(PRUint32 length, const char* data)
{
// set the mMetaData
mMetaDataLength = length ;
if(mMetaData)
nsAllocator::Free(mMetaData) ;
mMetaData = NS_STATIC_CAST(char*, nsAllocator::Alloc(mMetaDataLength*sizeof(char))) ;
if(!mMetaData) {
return NS_ERROR_OUT_OF_MEMORY ;
}
memcpy(mMetaData, data, length) ;
// Generate mInfo
nsresult rv = GenInfo() ;
if(NS_FAILED(rv))
return rv ;
// write through into mDB
rv = mDB->Put(mRecordID, mInfo, mInfoSize) ;
return rv ;
}
NS_IMETHODIMP
nsDiskCacheRecord::GetStoredContentLength(PRUint32 *aStoredContentLength)
{
return mFile->GetFileSize(aStoredContentLength) ;
}
// untill nsIFileSpec::Truncate() is in, we have to do all this ugly stuff
NS_IMETHODIMP
nsDiskCacheRecord::SetStoredContentLength(PRUint32 aStoredContentLength)
{
PRUint32 len = 0 ;
nsresult rv = mFile->GetFileSize(&len) ;
if(NS_FAILED(rv))
return rv ;
if(len < aStoredContentLength)
{
NS_ERROR("Error: can not set filesize to something bigger than itself.\n") ;
return NS_ERROR_FAILURE ;
}
else {
rv = mFile->Truncate(aStoredContentLength) ;
if(NS_FAILED(rv))
return rv ;
mDiskCache->m_StorageInUse -= (len - aStoredContentLength) ;
return NS_OK ;
}
}
NS_IMETHODIMP
nsDiskCacheRecord::Delete(void)
{
if(mNumChannels)
return NS_ERROR_NOT_AVAILABLE ;
PRUint32 len ;
mFile->GetFileSize(&len) ;
nsFileSpec cache_file ;
nsresult rv = mFile->GetFileSpec(&cache_file) ;
if(NS_FAILED(rv))
return NS_ERROR_FAILURE ;
cache_file.Delete(PR_TRUE) ;
// updata the storage size
mDiskCache->m_StorageInUse -= len ;
rv = mDB->Del(mRecordID, mKey, mKeyLength) ;
if(NS_FAILED(rv))
return NS_ERROR_FAILURE ;
else
return NS_OK ;
}
NS_IMETHODIMP
nsDiskCacheRecord::GetFilename(nsIFileSpec * *aFilename)
{
if(!aFilename)
return NS_ERROR_NULL_POINTER ;
*aFilename = mFile ;
NS_ADDREF(*aFilename) ;
return NS_OK ;
}
NS_IMETHODIMP
nsDiskCacheRecord::NewChannel(nsILoadGroup *loadGroup, nsIChannel **_retval)
{
nsDiskCacheRecordChannel* channel = new nsDiskCacheRecordChannel(this, loadGroup) ;
if(!channel)
return NS_ERROR_OUT_OF_MEMORY ;
nsresult rv = channel->Init() ;
if(NS_FAILED(rv))
return rv ;
NS_ADDREF(channel) ;
*_retval = NS_STATIC_CAST(nsIChannel*, channel) ;
return NS_OK ;
}
//////////////////////////////////////////////////////////////////////////
// nsDiskCacheRecord methods
// file name is represented by a url string. I hope this would be more
// generic
nsresult
nsDiskCacheRecord::GenInfo()
{
if(mInfo)
nsAllocator::Free(mInfo) ;
char* file_url=nsnull ;
PRUint32 name_len ;
mFile->GetURLString(&file_url) ;
name_len = PL_strlen(file_url)+1 ;
mInfoSize = sizeof(PRUint32) ; // checksum for mInfoSize
mInfoSize += sizeof(PRInt32) ; // RecordID
mInfoSize += sizeof(PRUint32) ; // key length
mInfoSize += mKeyLength ; // key
mInfoSize += sizeof(PRUint32) ; // metadata length
mInfoSize += mMetaDataLength ; // metadata
mInfoSize += sizeof(PRUint32) ; // filename length
mInfoSize += name_len ; // filename
void* newInfo = nsAllocator::Alloc(mInfoSize*sizeof(char)) ;
if(!newInfo) {
return NS_ERROR_OUT_OF_MEMORY ;
}
// copy the checksum mInfoSize
char* cur_ptr = NS_STATIC_CAST(char*, newInfo) ;
COPY_INT32(cur_ptr, &mInfoSize) ;
cur_ptr += sizeof(PRUint32) ;
// copy RecordID
COPY_INT32(cur_ptr, &mRecordID) ;
cur_ptr += sizeof(PRInt32) ;
// copy key length
COPY_INT32(cur_ptr, &mKeyLength) ;
cur_ptr += sizeof(PRUint32) ;
// copy key
memcpy(cur_ptr, mKey, mKeyLength) ;
cur_ptr += mKeyLength ;
// copy metadata length
COPY_INT32(cur_ptr, &mMetaDataLength) ;
cur_ptr += sizeof(PRUint32) ;
// copy metadata
memcpy(cur_ptr, mMetaData, mMetaDataLength) ;
cur_ptr += mMetaDataLength ;
// copy file name length
COPY_INT32(cur_ptr, &name_len) ;
cur_ptr += sizeof(PRUint32) ;
// copy file name
memcpy(cur_ptr, file_url, name_len) ;
cur_ptr += name_len ;
PR_ASSERT(cur_ptr == NS_STATIC_CAST(char*, newInfo) + mInfoSize);
mInfo = newInfo ;
return NS_OK ;
}
/*
* This Method suppose to get all the info from the db record
* and set them to accroding members. the original values
* will all be overwritten. only minimal error checking is performed.
*/
NS_IMETHODIMP
nsDiskCacheRecord::RetrieveInfo(void* aInfo, PRUint32 aInfoLength)
{
// reset everything
if(mInfo) {
nsAllocator::Free(mInfo) ;
mInfo = nsnull ;
}
if(mKey) {
nsAllocator::Free(mKey) ;
mKey = nsnull ;
}
if(mMetaData) {
nsAllocator::Free(mMetaData) ;
mMetaData = nsnull ;
}
char * cur_ptr = NS_STATIC_CAST(char*, aInfo) ;
char* file_url ;
PRUint32 name_len ;
// set mInfoSize
COPY_INT32(&mInfoSize, cur_ptr) ;
cur_ptr += sizeof(PRUint32) ;
// check this at least
if(mInfoSize != aInfoLength)
return NS_ERROR_FAILURE ;
// set mRecordID
COPY_INT32(&mRecordID, cur_ptr) ;
cur_ptr += sizeof(PRInt32) ;
// set mKeyLength
COPY_INT32(&mKeyLength, cur_ptr) ;
cur_ptr += sizeof(PRUint32) ;
// set mKey
mKey = NS_STATIC_CAST(char*, nsAllocator::Alloc(mKeyLength*sizeof(char))) ;
if(!mKey)
return NS_ERROR_OUT_OF_MEMORY ;
memcpy(mKey, cur_ptr, mKeyLength) ;
cur_ptr += mKeyLength ;
PRInt32 id ;
mDB->GetID(mKey, mKeyLength, &id) ;
NS_ASSERTION(id==mRecordID, "\t ++++++ bad record, somethings wrong\n") ;
// set mMetaDataLength
COPY_INT32(&mMetaDataLength, cur_ptr) ;
cur_ptr += sizeof(PRUint32) ;
// set mMetaData
mMetaData = NS_STATIC_CAST(char*, nsAllocator::Alloc(mMetaDataLength*sizeof(char))) ;
if(!mMetaData)
return NS_ERROR_OUT_OF_MEMORY ;
memcpy(mMetaData, cur_ptr, mMetaDataLength) ;
cur_ptr += mMetaDataLength ;
// get mFile name length
COPY_INT32(&name_len, cur_ptr) ;
cur_ptr += sizeof(PRUint32) ;
// get mFile native name
file_url = NS_STATIC_CAST(char*, nsAllocator::Alloc(name_len*sizeof(char))) ;
if(!file_url)
return NS_ERROR_OUT_OF_MEMORY ;
memcpy(file_url, cur_ptr, name_len) ;
cur_ptr += name_len ;
PR_ASSERT(cur_ptr == NS_STATIC_CAST(char*, aInfo) + mInfoSize);
// create mFile if Init() isn't called
if(!mFile) {
NS_NewFileSpec(getter_AddRefs(mFile));
if(!mFile)
return NS_ERROR_OUT_OF_MEMORY ;
}
// setup mFile
mFile->SetURLString(file_url) ;
return NS_OK ;
}

View File

@@ -1,71 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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 Mozilla Communicator.
*
* The Initial Developer of the Original Code is Intel Corp.
* Portions created by Intel Corp. are
* Copyright (C) 1999, 1999 Intel Corp. All
* Rights Reserved.
*
* Contributor(s): Yixiong Zou <yixiong.zou@intel.com>
* Carl Wong <carl.wong@intel.com>
*/
#ifndef _NET_CACHEDDISKDATA_H_
#define _NET_CACHEDDISKDATA_H_
#include "nsINetDataCacheRecord.h"
#include "nsCOMPtr.h"
#include "nsIDBAccessor.h"
#include "prtypes.h"
#include "nsILoadGroup.h"
#include "nsIFileChannel.h"
#include "nsNetDiskCache.h"
class nsDiskCacheRecord : public nsINetDataCacheRecord
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSINETDATACACHERECORD
protected:
nsDiskCacheRecord(nsIDBAccessor* db, nsNetDiskCache* aCache) ;
virtual ~nsDiskCacheRecord() ;
NS_IMETHOD RetrieveInfo(void* aInfo, PRUint32 aInfoLength) ;
NS_IMETHOD Init(const char* key, PRUint32 length, PRInt32 ID) ;
nsresult GenInfo(void) ;
private:
char* mKey ;
PRUint32 mKeyLength ;
PRInt32 mRecordID ;
char* mMetaData ;
PRUint32 mMetaDataLength ;
nsCOMPtr<nsIFileSpec> mFile ;
nsCOMPtr<nsIDBAccessor> mDB ;
void* mInfo ;
PRUint32 mInfoSize ;
PRUint32 mNumChannels ;
nsNetDiskCache* mDiskCache ;
friend class nsDiskCacheRecordChannel ;
friend class nsDBEnumerator ;
friend class nsNetDiskCache ;
} ;
#endif // _NET_CACHEDDISKDATA_H_

View File

@@ -1,552 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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 Mozilla Communicator.
*
* The Initial Developer of the Original Code is Intel Corp.
* Portions created by Intel Corp. are
* Copyright (C) 1999, 1999 Intel Corp. All
* Rights Reserved.
*
* Contributor(s): Yixiong Zou <yixiong.zou@intel.com>
* Carl Wong <carl.wong@intel.com>
*/
/*
* Most of the code are taken from nsFileChannel.
*/
#include "nsDiskCacheRecordChannel.h"
#include "nsIFileTransportService.h"
//#include "nsIIOService.h"
#include "nsIServiceManager.h"
#include "nsIURL.h"
#include "nsIOutputStream.h"
#include "netCore.h"
#include "nsIMIMEService.h"
#include "nsISupportsUtils.h"
//static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
static NS_DEFINE_CID(kFileTransportServiceCID, NS_FILETRANSPORTSERVICE_CID);
static NS_DEFINE_CID(kStandardURLCID, NS_STANDARDURL_CID);
static NS_DEFINE_CID(kMIMEServiceCID, NS_MIMESERVICE_CID);
// This is copied from nsMemCacheChannel, We should consolidate these two.
class WriteStreamWrapper : public nsIOutputStream
{
public:
WriteStreamWrapper(nsDiskCacheRecordChannel* aChannel,
nsIOutputStream *aBaseStream) ;
virtual ~WriteStreamWrapper() ;
static nsresult
Create(nsDiskCacheRecordChannel* aChannel, nsIOutputStream *aBaseStream, nsIOutputStream* *aWrapper) ;
NS_DECL_ISUPPORTS
NS_DECL_NSIBASESTREAM
NS_DECL_NSIOUTPUTSTREAM
private:
nsDiskCacheRecordChannel* mChannel;
nsCOMPtr<nsIOutputStream> mBaseStream;
} ;
// implement nsISupports
NS_IMPL_ISUPPORTS(WriteStreamWrapper, NS_GET_IID(nsIOutputStream))
WriteStreamWrapper::WriteStreamWrapper(nsDiskCacheRecordChannel* aChannel,
nsIOutputStream *aBaseStream)
: mChannel(aChannel), mBaseStream(aBaseStream)
{
NS_INIT_REFCNT();
NS_ADDREF(mChannel);
}
WriteStreamWrapper::~WriteStreamWrapper()
{
NS_RELEASE(mChannel);
}
nsresult
WriteStreamWrapper::Create(nsDiskCacheRecordChannel*aChannel, nsIOutputStream *aBaseStream, nsIOutputStream* * aWrapper)
{
WriteStreamWrapper *wrapper = new WriteStreamWrapper(aChannel, aBaseStream);
if (!wrapper) return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(wrapper);
*aWrapper = wrapper;
return NS_OK;
}
NS_IMETHODIMP
WriteStreamWrapper::Write(const char *aBuffer, PRUint32 aCount, PRUint32 *aNumWritten)
{
*aNumWritten = 0;
nsresult rv = mBaseStream->Write(aBuffer, aCount, aNumWritten);
mChannel->NotifyStorageInUse(*aNumWritten);
return rv;
}
NS_IMETHODIMP
WriteStreamWrapper::Flush()
{
return mBaseStream->Flush();
}
NS_IMETHODIMP
WriteStreamWrapper::Close()
{
return mBaseStream->Close();
}
nsDiskCacheRecordChannel::nsDiskCacheRecordChannel(nsDiskCacheRecord *aRecord,
nsILoadGroup *aLoadGroup)
: mRecord(aRecord) ,
mLoadGroup(aLoadGroup)
{
NS_INIT_REFCNT() ;
NS_ADDREF(mRecord);
mRecord->mNumChannels++ ;
}
nsDiskCacheRecordChannel::~nsDiskCacheRecordChannel()
{
mRecord->mNumChannels-- ;
NS_RELEASE(mRecord);
}
// I know that I gave conflicting advice on the issue of file
// transport versus file protocol handler, but I thought that the
// last word was that we would use the raw transport, when I wrote:
//
// > I just thought of an argument for the other side of the coin, i.e. the
// > benefit of *not* reusing the file protocol handler: On the Mac, it's
// > expensive to convert from a string URL to an nsFileSpec, because the Mac
// > is brain-dead and scans every directory on the path to the file. It's
// > cheaper to create a nsFileSpec for a cache file by combining a single,
// > static nsFileSpec that corresponds to the cache directory with the
// > relative path to the cache file (using nsFileSpec's operator +). This
// > operation is optimized on the Mac to avoid the scanning operation.
//
// The Mac guys will eat us alive if we do path string to nsFileSpec
// conversions for every cache file we open.
nsresult
nsDiskCacheRecordChannel::Init(void)
{
nsresult rv = mRecord->mFile->GetFileSpec(&mSpec) ;
#ifdef XP_MAC
// Don't assume we actually created a good file spec
FSSpec theSpec = mSpec.GetFSSpec();
if (!theSpec.name[0]) {
NS_ERROR("failed to create a file spec");
// Since we didn't actually create the file spec
// we return an error
return NS_ERROR_MALFORMED_URI;
}
#endif
return rv ;
}
nsresult
nsDiskCacheRecordChannel::NotifyStorageInUse(PRInt32 aBytesUsed)
{
return mRecord->mDiskCache->m_StorageInUse += aBytesUsed ;
}
// implement nsISupports
NS_IMPL_ISUPPORTS4(nsDiskCacheRecordChannel,
nsIChannel,
nsIRequest,
nsIStreamListener,
nsIStreamObserver)
// implement nsIRequest
NS_IMETHODIMP
nsDiskCacheRecordChannel::IsPending(PRBool *aIsPending)
{
*aIsPending = PR_FALSE ;
if(!mFileTransport)
return NS_OK ;
return mFileTransport->IsPending(aIsPending) ;
}
NS_IMETHODIMP
nsDiskCacheRecordChannel::Cancel(void)
{
if(!mFileTransport)
return NS_ERROR_FAILURE ;
return mFileTransport->Cancel() ;
}
NS_IMETHODIMP
nsDiskCacheRecordChannel::Suspend(void)
{
if(!mFileTransport)
return NS_ERROR_FAILURE ;
return mFileTransport->Suspend() ;
}
NS_IMETHODIMP
nsDiskCacheRecordChannel::Resume(void)
{
if(!mFileTransport)
return NS_ERROR_FAILURE ;
return mFileTransport->Resume() ;
}
// implement nsIChannel
NS_IMETHODIMP
nsDiskCacheRecordChannel::GetOriginalURI(nsIURI* *aURI)
{
// FUR - might need to implement this - not sure
return NS_ERROR_NOT_IMPLEMENTED ;
}
NS_IMETHODIMP
nsDiskCacheRecordChannel::GetURI(nsIURI * *aURI)
{
if(!mFileTransport)
return NS_ERROR_FAILURE ;
return mFileTransport->GetURI(aURI) ;
}
NS_IMETHODIMP
nsDiskCacheRecordChannel::OpenInputStream(PRUint32 aStartPosition,
PRInt32 aReadCount,
nsIInputStream* *aResult)
{
nsresult rv ;
if(mFileTransport)
return NS_ERROR_IN_PROGRESS ;
NS_WITH_SERVICE(nsIFileTransportService, fts, kFileTransportServiceCID, &rv) ;
if(NS_FAILED(rv)) return rv ;
rv = fts->CreateTransport(mSpec, "load", 0, 0, getter_AddRefs(mFileTransport)) ;
if(NS_FAILED(rv))
return rv ;
// we don't need to worry about notification callbacks
rv = mFileTransport->OpenInputStream(aStartPosition, aReadCount, aResult) ;
if(NS_FAILED(rv))
mFileTransport = nsnull ;
return rv ;
}
NS_IMETHODIMP
nsDiskCacheRecordChannel::OpenOutputStream(PRUint32 startPosition,
nsIOutputStream* *aResult)
{
nsresult rv ;
NS_ENSURE_ARG(aResult) ;
if(mFileTransport)
return NS_ERROR_IN_PROGRESS ;
nsCOMPtr<nsIOutputStream> outputStream ;
NS_WITH_SERVICE(nsIFileTransportService, fts, kFileTransportServiceCID, &rv) ;
if(NS_FAILED(rv)) return rv ;
rv = fts->CreateTransport(mSpec, "load", 0, 0, getter_AddRefs(mFileTransport)) ;
if(NS_FAILED(rv))
return rv ;
// we don't need to worry about notification callbacks
rv = mFileTransport->OpenOutputStream(startPosition, getter_AddRefs(outputStream)) ;
if(NS_FAILED(rv)) {
mFileTransport = nsnull ;
return rv ;
}
return WriteStreamWrapper::Create(this, outputStream, aResult) ;
}
NS_IMETHODIMP
nsDiskCacheRecordChannel::AsyncOpen(nsIStreamObserver *observer,
nsISupports *ctxt)
{
return NS_ERROR_NOT_IMPLEMENTED ;
}
NS_IMETHODIMP
nsDiskCacheRecordChannel::AsyncRead(PRUint32 aStartPosition,
PRInt32 aReadCount,
nsISupports *aContext,
nsIStreamListener *aListener)
{
nsresult rv ;
if(mFileTransport)
return NS_ERROR_IN_PROGRESS ;
mRealListener = aListener;
nsCOMPtr<nsIStreamListener> tempListener = this;
if (mLoadGroup) {
nsCOMPtr<nsILoadGroupListenerFactory> factory;
//
// Create a load group "proxy" listener...
//
rv = mLoadGroup->GetGroupListenerFactory(getter_AddRefs(factory));
if (factory) {
nsIStreamListener *newListener;
rv = factory->CreateLoadGroupListener(mRealListener, &newListener);
if (NS_SUCCEEDED(rv)) {
mRealListener = newListener;
NS_RELEASE(newListener);
}
}
rv = mLoadGroup->AddChannel(this, nsnull);
if (NS_FAILED(rv)) return rv;
}
NS_WITH_SERVICE(nsIFileTransportService, fts, kFileTransportServiceCID, &rv);
if (NS_FAILED(rv)) return rv;
rv = fts->CreateTransport(mSpec, "load", 0, 0, getter_AddRefs(mFileTransport));
if (NS_FAILED(rv)) return rv;
// no callbacks
rv = mFileTransport->AsyncRead(aStartPosition,
aReadCount,
aContext,
tempListener);
if (NS_FAILED(rv)) {
// release the transport so that we don't think we're in progress
mFileTransport = nsnull;
}
return rv;
}
NS_IMETHODIMP
nsDiskCacheRecordChannel::AsyncWrite(nsIInputStream *fromStream,
PRUint32 startPosition,
PRInt32 writeCount,
nsISupports *ctxt,
nsIStreamObserver *observer)
{
/*
if(!mFileTransport)
return NS_ERROR_FAILURE ;
return mFileTransport->AsyncWrite(fromStream,
startPosition,
writeCount,
ctxt,
observer) ;
*/
// I can't do this since the write is not monitored, and I won't be
// able to updata the storage.
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDiskCacheRecordChannel::GetLoadAttributes(nsLoadFlags *aLoadAttributes)
{
// Not required to be implemented, since it is implemented by cache manager
NS_ASSERTION(0, "nsDiskCacheRecordChannel method unexpectedly called");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDiskCacheRecordChannel::SetLoadAttributes(nsLoadFlags aLoadAttributes)
{
// Not required to be implemented, since it is implemented by cache manager
NS_ASSERTION(0, "nsDiskCacheRecordChannel method unexpectedly called");
return NS_ERROR_NOT_IMPLEMENTED;
}
#define DUMMY_TYPE "text/html"
NS_IMETHODIMP
nsDiskCacheRecordChannel::GetContentType(char * *aContentType)
{
nsresult rv ;
if (mSpec.IsDirectory()) {
*aContentType = nsCRT::strdup("application/http-index-format");
return *aContentType ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
else {
// I wish I can make this simplier
char* urlStr ;
mRecord->mFile->GetURLString(&urlStr) ;
// file: URLs (currently) have no additional structure beyond that provided by standard
// URLs, so there is no "outer" given to CreateInstance
nsCOMPtr<nsIURI> url;
rv = nsComponentManager::CreateInstance(kStandardURLCID, nsnull,
NS_GET_IID(nsIURI),
//(void**)&url);
getter_AddRefs(url)) ;
if (NS_FAILED(rv)) return rv;
rv = url->SetSpec((char*)urlStr);
if (NS_FAILED(rv))
return rv;
NS_WITH_SERVICE(nsIMIMEService, MIMEService, kMIMEServiceCID, &rv);
if (NS_FAILED(rv)) return rv;
rv = MIMEService->GetTypeFromURI(url, aContentType);
if (NS_SUCCEEDED(rv)) return rv;
}
// if all else fails treat it as text/html?
*aContentType = nsCRT::strdup(DUMMY_TYPE);
if (!*aContentType) {
return NS_ERROR_OUT_OF_MEMORY;
} else {
return NS_OK;
}
}
NS_IMETHODIMP
nsDiskCacheRecordChannel::GetContentLength(PRInt32 *aContentLength)
{
nsresult rv;
PRUint32 length;
rv = mRecord->mFile->GetFileSize(&length);
if (NS_SUCCEEDED(rv)) {
*aContentLength = (PRInt32)length;
} else {
*aContentLength = -1;
}
return rv;
}
NS_IMETHODIMP
nsDiskCacheRecordChannel::GetOwner(nsISupports* *aOwner)
{
*aOwner = mOwner.get() ;
NS_IF_ADDREF(*aOwner) ;
return NS_OK ;
}
NS_IMETHODIMP
nsDiskCacheRecordChannel::SetOwner(nsISupports* aOwner)
{
mOwner = aOwner ;
return NS_OK ;
}
NS_IMETHODIMP
nsDiskCacheRecordChannel::GetLoadGroup(nsILoadGroup* *aLoadGroup)
{
// Not required to be implemented, since it is implemented by cache manager
NS_ASSERTION(0, "nsDiskCacheRecordChannel method unexpectedly called");
return NS_OK ;
}
NS_IMETHODIMP
nsDiskCacheRecordChannel::SetLoadGroup(nsILoadGroup* aLoadGroup)
{
// Not required to be implemented, since it is implemented by cache manager
NS_ASSERTION(0, "nsDiskCacheRecordChannel method unexpectedly called");
return NS_OK;
}
NS_IMETHODIMP
nsDiskCacheRecordChannel::GetNotificationCallbacks(nsIInterfaceRequestor* *aNotificationCallbacks)
{
// Not required to be implemented, since it is implemented by cache manager
NS_ASSERTION(0, "nsDiskCacheRecordChannel method unexpectedly called");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDiskCacheRecordChannel::SetNotificationCallbacks(nsIInterfaceRequestor* aNotificationCallbacks)
{
// Not required to be implemented, since it is implemented by cache manager
NS_ASSERTION(0, "nsDiskCacheRecordChannel method unexpectedly called");
return NS_ERROR_NOT_IMPLEMENTED;
}
////////////////////////////////////////////////////////////////////////////////
// nsIStreamListener methods:
////////////////////////////////////////////////////////////////////////////////
NS_IMETHODIMP
nsDiskCacheRecordChannel::OnStartRequest(nsIChannel* transportChannel, nsISupports* context)
{
NS_ASSERTION(mRealListener, "No listener...");
return mRealListener->OnStartRequest(this, context);
}
NS_IMETHODIMP
nsDiskCacheRecordChannel::OnStopRequest(nsIChannel* transportChannel, nsISupports* context,
nsresult aStatus, const PRUnichar* aMsg)
{
nsresult rv;
rv = mRealListener->OnStopRequest(this, context, aStatus, aMsg);
if (mLoadGroup) {
if (NS_SUCCEEDED(rv)) {
mLoadGroup->RemoveChannel(this, context, aStatus, aMsg);
}
}
// Release the reference to the consumer stream listener...
mRealListener = null_nsCOMPtr();
mFileTransport = null_nsCOMPtr();
return rv;
}
NS_IMETHODIMP
nsDiskCacheRecordChannel::OnDataAvailable(nsIChannel* transportChannel, nsISupports* context,
nsIInputStream *aIStream, PRUint32 aSourceOffset,
PRUint32 aLength)
{
nsresult rv;
rv = mRealListener->OnDataAvailable(this, context, aIStream,
aSourceOffset, aLength);
//
// If the connection is being aborted cancel the transport. This will
// insure that the transport will go away even if it is blocked waiting
// for the consumer to empty the pipe...
//
if (NS_FAILED(rv)) {
mFileTransport->Cancel();
}
return rv;
}

View File

@@ -1,76 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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 Mozilla Communicator.
*
* The Initial Developer of the Original Code is Intel Corp.
* Portions created by Intel Corp. are
* Copyright (C) 1999, 1999 Intel Corp. All
* Rights Reserved.
*
* Contributor(s): Yixiong Zou <yixiong.zou@intel.com>
* Carl Wong <carl.wong@intel.com>
*/
#ifndef _ns_DiskCacheRecordChannel_h_
#define _ns_DiskCacheRecordChannel_h_
#include "nsIChannel.h"
#include "nsCOMPtr.h"
#include "nsDiskCacheRecord.h"
#include "nsIStreamListener.h"
/*
* This class is plagiarized from nsMemCacheChannel
*/
class nsDiskCacheRecordChannel : public nsIChannel,
public nsIStreamListener
{
public:
nsDiskCacheRecordChannel(nsDiskCacheRecord *aRecord, nsILoadGroup *aLoadGroup);
virtual ~nsDiskCacheRecordChannel() ;
// Declare nsISupports methods
NS_DECL_ISUPPORTS
// Declare nsIRequest methods
NS_DECL_NSIREQUEST
// Declare nsIChannel methods
NS_DECL_NSICHANNEL
// Declare nsIStreamObserver methods
NS_DECL_NSISTREAMOBSERVER
// Declare nsIStreamListener methods
NS_DECL_NSISTREAMLISTENER
nsresult Init(void) ;
private:
nsresult NotifyStorageInUse(PRInt32 aBytesUsed) ;
nsDiskCacheRecord* mRecord ;
nsCOMPtr<nsILoadGroup> mLoadGroup ;
nsCOMPtr<nsISupports> mOwner ;
nsCOMPtr<nsIChannel> mFileTransport ;
nsFileSpec mSpec ;
nsCOMPtr<nsIStreamListener> mRealListener;
friend class WriteStreamWrapper ;
} ;
#endif // _ns_DiskCacheRecordChannel_h_

View File

@@ -1,66 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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 Mozilla Communicator.
*
* The Initial Developer of the Original Code is Intel Corp.
* Portions created by Intel Corp. are
* Copyright (C) 1999, 1999 Intel Corp. All
* Rights Reserved.
*
* Contributor(s): Yixiong Zou <yixiong.zou@intel.com>
* Carl Wong <carl.wong@intel.com>
*/
#ifndef _NS_IDBACCESSOR_H_
#define _NS_IDBACCESSOR_H_
#include "nsISupports.h"
#include "nsIFileSpec.h"
// nsIDBAccessorIID {6AADD4D0-7785-11d3-87FE-000629D01344}
#define NS_IDBACCESSOR_IID \
{ 0x6aadd4d0, 0x7785, 0x11d3, \
{0x87, 0xfe, 0x0, 0x6, 0x29, 0xd0, 0x13, 0x44}}
// nsDBAccessorCID {6AADD4D1-7785-11d3-87FE-000629D01344}
#define NS_DBACCESSOR_CID \
{ 0x6aadd4d1, 0x7785, 0x11d3, \
{ 0x87, 0xfe, 0x0, 0x6, 0x29, 0xd0, 0x13, 0x44 }}
class nsIDBAccessor : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDBACCESSOR_IID)
NS_IMETHOD Init(nsIFileSpec* DBFile) = 0 ;
NS_IMETHOD Shutdown(void) = 0 ;
NS_IMETHOD Put(PRInt32 aID, void* anEntry, PRUint32 aLength) = 0 ;
NS_IMETHOD Get(PRInt32 aID, void** anEntry, PRUint32 *aLength) = 0 ;
NS_IMETHOD Del(PRInt32 aID, void* anEntry, PRUint32 aLength) = 0 ;
NS_IMETHOD GetID(const char* key, PRUint32 length, PRInt32* aID) = 0 ;
NS_IMETHOD EnumEntry(void* *anEntry, PRUint32* aLength, PRBool bReset) = 0 ;
NS_IMETHOD GetDBFilesize(PRUint32* aSize) = 0 ;
NS_IMETHOD GetSpecialEntry(void** anEntry, PRUint32 *aLength) = 0 ;
NS_IMETHOD SetSpecialEntry(void* anEntry, PRUint32 aLength) = 0 ;
} ;
#endif // _NS_IDBACCESSOR_H_

View File

@@ -1,704 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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 Mozilla Communicator.
*
* The Initial Developer of the Original Code is Intel Corp.
* Portions created by Intel Corp. are
* Copyright (C) 1999, 1999 Intel Corp. All
* Rights Reserved.
*
* Contributor(s): Yixiong Zou <yixiong.zou@intel.com>
* Carl Wong <carl.wong@intel.com>
*/
#include "nsNetDiskCache.h"
#include "nscore.h"
#include "plstr.h"
#include "prprf.h"
#include "prtypes.h"
#include "prio.h"
#include "prsystem.h" // Directory Seperator
#include "plhash.h"
#include "prclist.h"
#include "prmem.h"
#include "prlog.h"
#include "nsIComponentManager.h"
#include "nsIServiceManager.h"
#include "nsIPref.h"
#include "mcom_db.h"
#include "nsDBEnumerator.h"
#include "nsDiskCacheRecord.h"
#include "netCore.h"
#if !defined(IS_LITTLE_ENDIAN) && !defined(IS_BIG_ENDIAN)
ERROR! Must have a byte order
#endif
#ifdef IS_LITTLE_ENDIAN
#define COPY_INT32(_a,_b) memcpy(_a, _b, sizeof(int32))
#else
#define COPY_INT32(_a,_b) /* swap */ \
do { \
((char *)(_a))[0] = ((char *)(_b))[3]; \
((char *)(_a))[1] = ((char *)(_b))[2]; \
((char *)(_a))[2] = ((char *)(_b))[1]; \
((char *)(_a))[3] = ((char *)(_b))[0]; \
} while(0)
#endif
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID) ;
static NS_DEFINE_CID(kDBAccessorCID, NS_DBACCESSOR_CID) ;
static const PRUint32 DISK_CACHE_SIZE_DEFAULT = 5*1024*1024 ; // 5MB
static const char * const DISK_CACHE_PREF = "browser.cache.disk_cache_size";
static const char * const CACHE_DIR_PREF = "browser.cache.directory";
class nsDiskCacheRecord ;
nsNetDiskCache::nsNetDiskCache() :
m_Enabled(PR_TRUE) ,
m_NumEntries(0) ,
m_pNextCache(0) ,
m_pDiskCacheFolder(0) ,
m_StorageInUse(0) ,
m_DB(0) ,
m_DBCorrupted(PR_FALSE)
{
// set it to INF for now
m_MaxEntries = (PRUint32)-1 ;
NS_INIT_REFCNT();
}
nsNetDiskCache::~nsNetDiskCache()
{
SetSpecialEntry() ;
NS_IF_RELEASE(m_DB) ;
// FUR
// I think that, eventually, we also want a distinguished key in the DB which
// means "clean cache shutdown". You clear this flag when the db is first
// opened and set it just before the db is closed. If the db wasn't shutdown
// cleanly in a prior session, i.e. because the app crashed, on startup you
// scan all the individual files in directories and look for "orphans",
// i.e. cache files which don't have corresponding entries in the db. That's
// also when storage-in-use and number of entries would be recomputed.
//
// We don't necessarily need all this functionality immediately, though.
if(m_DBCorrupted) {
nsFileSpec cacheFolder ;
m_pDiskCacheFolder->GetFileSpec(&cacheFolder) ;
char nameInt[6] ;
for(nsDirectoryIterator di(cacheFolder, PR_FALSE); di.Exists(); di++) {
char* filename = di.Spec().GetLeafName() ;
char* pname = nameInt ;
pname = PL_strncpyz(pname, filename, 6) ;
if(PL_strcmp(pname, "trash") == 0)
RemoveFolder(di.Spec()) ;
nsCRT::free(filename) ;
}
}
}
NS_IMETHODIMP
nsNetDiskCache::Init(void)
{
nsresult rv ;
// don't initialize if no cache folder is set.
if(!m_pDiskCacheFolder) return NS_OK ;
if(!m_DB) {
m_DB = new nsDBAccessor() ;
if(!m_DB)
return NS_ERROR_OUT_OF_MEMORY ;
else
NS_ADDREF(m_DB) ;
}
// create cache sub directories
nsCOMPtr<nsIFileSpec> cacheSubDir;
rv = NS_NewFileSpec(getter_AddRefs(cacheSubDir));
for (int i=0; i < 32; i++) {
rv = cacheSubDir->FromFileSpec(m_pDiskCacheFolder) ;
if(NS_FAILED(rv))
return rv ;
char dirName[3];
PR_snprintf (dirName, 3, "%0.2x", i);
cacheSubDir->AppendRelativeUnixPath (dirName) ;
CreateDir(cacheSubDir);
}
return InitDB() ;
}
NS_IMETHODIMP
nsNetDiskCache::InitDB(void)
{
nsresult rv ;
if(!m_DBFile) {
NS_NewFileSpec(getter_AddRefs(m_DBFile)) ;
if(!m_DBFile)
return NS_ERROR_OUT_OF_MEMORY ;
}
rv = m_DBFile->FromFileSpec(m_pDiskCacheFolder) ;
if(NS_FAILED(rv))
return rv ;
m_DBFile->AppendRelativeUnixPath("cache.db") ;
rv = m_DB->Init(m_DBFile) ;
if(rv == NS_ERROR_FAILURE) {
// try recovery if error
DBRecovery() ;
}
rv = GetSpecialEntry() ;
if(rv == NS_ERROR_FAILURE) {
// try recovery if error
DBRecovery() ;
}
return rv ;
}
//////////////////////////////////////////////////////////////////////////
// nsISupports methods
NS_IMPL_ISUPPORTS3(nsNetDiskCache,
nsINetDataDiskCache,
nsINetDataCache,
nsISupports)
///////////////////////////////////////////////////////////////////////////
// nsINetDataCache Method
NS_IMETHODIMP
nsNetDiskCache::GetDescription(PRUnichar* *aDescription)
{
nsAutoString description("Disk Cache") ;
*aDescription = description.ToNewUnicode() ;
if(!*aDescription)
return NS_ERROR_OUT_OF_MEMORY ;
return NS_OK ;
}
/* don't alloc mem for nsICachedNetData.
* RecordID is generated using the same scheme in nsCacheDiskData,
* see GetCachedNetData() for detail.
*/
NS_IMETHODIMP
nsNetDiskCache::Contains(const char* key, PRUint32 length, PRBool *_retval)
{
*_retval = PR_FALSE ;
NS_ASSERTION(m_DB, "no db.") ;
PRInt32 id = 0 ;
nsresult rv = m_DB->GetID(key, length, &id) ;
if(NS_FAILED(rv)) {
// try recovery if error
DBRecovery() ;
return rv ;
}
void* info = 0 ;
PRUint32 info_size = 0 ;
rv = m_DB->Get(id, &info, &info_size) ;
if(NS_SUCCEEDED(rv) && info)
*_retval = PR_TRUE ;
if(NS_FAILED(rv)) {
// try recovery if error
DBRecovery() ;
}
return rv ;
}
/* regardless if it's cached or not, a copy of nsNetDiskCache would
* always be returned. so release it appropriately.
* if mem alloced, updata m_NumEntries also.
* for now, the new nsCachedNetData is not written into db yet since
* we have nothing to write.
*/
NS_IMETHODIMP
nsNetDiskCache::GetCachedNetData(const char* key, PRUint32 length, nsINetDataCacheRecord **_retval)
{
NS_ASSERTION(m_DB, "no db.") ;
nsresult rv = 0 ;
if (!_retval)
return NS_ERROR_NULL_POINTER ;
*_retval = nsnull ;
PRInt32 id = 0 ;
rv = m_DB->GetID(key, length, &id) ;
if(NS_FAILED(rv)) {
// try recovery if error
DBRecovery() ;
return rv ;
}
// construct an empty record
nsDiskCacheRecord* newRecord = new nsDiskCacheRecord(m_DB, this) ;
if(!newRecord)
return NS_ERROR_OUT_OF_MEMORY ;
rv = newRecord->Init(key, length, id) ;
if(NS_FAILED(rv)) {
delete newRecord ;
return rv ;
}
NS_ADDREF(newRecord) ; // addref for _retval
*_retval = (nsINetDataCacheRecord*) newRecord ;
void* info = 0 ;
PRUint32 info_size = 0 ;
rv = m_DB->Get(id, &info, &info_size) ;
if(NS_SUCCEEDED(rv) && info) {
// this is a previously cached record
nsresult r1 ;
r1 = newRecord->RetrieveInfo(info, info_size) ;
if(NS_SUCCEEDED(rv))
return NS_OK ;
else {
// probably a bad one
NS_RELEASE(newRecord) ;
*_retval = nsnull ;
return r1;
}
} else if (NS_SUCCEEDED(rv) && !info) {
// this is a new record.
m_NumEntries ++ ;
return NS_OK ;
} else {
// database error.
DBRecovery() ;
return rv ;
}
}
/* get an nsICachedNetData, mem needs to be de-alloced if not found. */
NS_IMETHODIMP
nsNetDiskCache::GetCachedNetDataByID(PRInt32 RecordID, nsINetDataCacheRecord **_retval)
{
NS_ASSERTION(m_DB, "no db.") ;
if (!_retval)
return NS_ERROR_NULL_POINTER ;
*_retval = nsnull ;
nsresult rv ;
void* info = 0 ;
PRUint32 info_size = 0 ;
rv = m_DB->Get(RecordID, &info, &info_size) ;
if(NS_SUCCEEDED(rv) && info) {
// construct an empty record if only found in db
nsDiskCacheRecord* newRecord = new nsDiskCacheRecord(m_DB, this) ;
if(!newRecord)
return NS_ERROR_OUT_OF_MEMORY ;
NS_ADDREF(newRecord) ; // addref for _retval
rv = newRecord->RetrieveInfo(info, info_size) ;
if(NS_SUCCEEDED(rv)) {
*_retval = (nsINetDataCacheRecord*) newRecord ;
return NS_OK ;
}
else {
// bad record, I guess
NS_RELEASE(newRecord) ; // release if bad things happen
return rv ;
}
} else {
NS_ERROR("Error: RecordID not in DB\n") ;
DBRecovery() ;
return rv ;
}
}
NS_IMETHODIMP
nsNetDiskCache::GetEnabled(PRBool *aEnabled)
{
*aEnabled = m_Enabled ;
return NS_OK ;
}
NS_IMETHODIMP
nsNetDiskCache::SetEnabled(PRBool aEnabled)
{
m_Enabled = aEnabled ;
return NS_OK ;
}
NS_IMETHODIMP
nsNetDiskCache::GetFlags(PRUint32 *aFlags)
{
*aFlags = FILE_PER_URL_CACHE;
return NS_OK ;
}
NS_IMETHODIMP
nsNetDiskCache::GetNumEntries(PRUint32 *aNumEntries)
{
*aNumEntries = m_NumEntries ;
return NS_OK ;
}
NS_IMETHODIMP
nsNetDiskCache::GetMaxEntries(PRUint32 *aMaxEntries)
{
*aMaxEntries = m_MaxEntries ;
return NS_OK ;
}
NS_IMETHODIMP
nsNetDiskCache::NewCacheEntryIterator(nsISimpleEnumerator **_retval)
{
NS_ASSERTION(m_DB, "no db.") ;
if(!_retval)
return NS_ERROR_NULL_POINTER ;
*_retval = nsnull ;
nsISimpleEnumerator* enumerator = new nsDBEnumerator(m_DB, this) ;
if(enumerator) {
NS_ADDREF(enumerator) ;
*_retval = enumerator ;
return NS_OK ;
}
else
return NS_ERROR_OUT_OF_MEMORY ;
}
NS_IMETHODIMP
nsNetDiskCache::GetNextCache(nsINetDataCache * *aNextCache)
{
if(!aNextCache)
return NS_ERROR_NULL_POINTER ;
*aNextCache = m_pNextCache ;
return NS_OK ;
}
NS_IMETHODIMP
nsNetDiskCache::SetNextCache(nsINetDataCache *aNextCache)
{
m_pNextCache = aNextCache ;
return NS_OK ;
}
// db size can always be measured at the last minute. Since it's hard
// to know before hand.
NS_IMETHODIMP
nsNetDiskCache::GetStorageInUse(PRUint32 *aStorageInUse)
{
NS_ASSERTION(m_DB, "no db.") ;
PRUint32 total_size = m_StorageInUse ;
/*
PRUint32 len = 0 ;
// add the size of the db.
m_DB->GetDBFilesize(&len) ;
total_size += len ;
*/
// we need size in kB
total_size = total_size >> 10 ;
*aStorageInUse = total_size ;
return NS_OK ;
}
/*
* The whole cache dirs can be whiped clean since all the cache
* files are resides in seperate hashed dirs. It's safe to do so.
*/
NS_IMETHODIMP
nsNetDiskCache::RemoveAll(void)
{
NS_ASSERTION(m_DB, "no db.") ;
NS_ASSERTION(m_pDiskCacheFolder, "no cache folder.") ;
// remove all the sub folders
nsFileSpec cacheSubDir;
for (int i=0; i < 32; i++) {
m_pDiskCacheFolder->GetFileSpec(&cacheSubDir) ;
char dirName[3];
PR_snprintf (dirName, 3, "%0.2x", i);
cacheSubDir += dirName ;
RemoveFolder(cacheSubDir) ;
}
// don't forget the db file itself
m_DB->Shutdown() ;
nsFileSpec dbfile ;
m_DBFile->GetFileSpec(&dbfile) ;
dbfile.Delete(PR_TRUE) ;
// reinitilize
return Init() ;
}
//////////////////////////////////////////////////////////////////
// nsINetDataDiskCache methods
NS_IMETHODIMP
nsNetDiskCache::GetDiskCacheFolder(nsIFileSpec * *aDiskCacheFolder)
{
*aDiskCacheFolder = nsnull ;
NS_ASSERTION(m_pDiskCacheFolder, "no cache folder.") ;
*aDiskCacheFolder = m_pDiskCacheFolder ;
NS_ADDREF(*aDiskCacheFolder) ;
return NS_OK ;
}
NS_IMETHODIMP
nsNetDiskCache::SetDiskCacheFolder(nsIFileSpec * aDiskCacheFolder)
{
if(!m_pDiskCacheFolder) {
NS_NewFileSpec(getter_AddRefs(m_pDiskCacheFolder));
if(!m_pDiskCacheFolder)
return NS_ERROR_OUT_OF_MEMORY ;
m_pDiskCacheFolder = aDiskCacheFolder ;
return Init() ;
}
else {
char *newfolder, *oldfolder ;
m_pDiskCacheFolder->GetNativePath(&oldfolder) ;
aDiskCacheFolder->GetNativePath(&newfolder) ;
if(PL_strcmp(newfolder, oldfolder) != 0) {
m_pDiskCacheFolder = aDiskCacheFolder ;
// do we need to blow away old cache before building a new one?
// return RemoveAll() ;
m_DB->Shutdown() ;
return Init() ;
} else
return NS_OK ;
}
}
//////////////////////////////////////////////////////////////////
// nsNetDiskCache methods
// create a directory (recursively)
NS_IMETHODIMP
nsNetDiskCache::CreateDir(nsIFileSpec* dir_spec)
{
PRBool does_exist ;
nsCOMPtr<nsIFileSpec> p_spec ;
dir_spec->Exists(&does_exist) ;
if(does_exist)
return NS_OK ;
nsresult rv = dir_spec->GetParent(getter_AddRefs(p_spec)) ;
if(NS_FAILED(rv))
return rv ;
p_spec->Exists(&does_exist) ;
if(!does_exist) {
CreateDir(p_spec) ;
rv = dir_spec->CreateDir() ;
if(NS_FAILED(rv))
return rv ;
}
else {
rv = dir_spec->CreateDir() ;
if(NS_FAILED(rv))
return rv ;
}
return NS_OK ;
}
// We can't afford to make a *separate* pass over the whole db on every
// startup, just to figure out m_NumEntries and m_StorageInUse. (This is a
// several second operation on a large db). We'll likely need to store
// distinguished keys in the db that contain these values and update them
// incrementally, except when failure to shut down the db cleanly is detected.
NS_IMETHODIMP
nsNetDiskCache::GetSpecialEntry(void)
{
void* pInfo ;
PRUint32 InfoSize ;
nsresult rv = m_DB->GetSpecialEntry(&pInfo, &InfoSize) ;
if(NS_FAILED(rv))
return rv ;
if(!pInfo && InfoSize == 0) {
// must be a new DB
m_NumEntries = 0 ;
m_StorageInUse = 0 ;
}
else {
char * cur_ptr = NS_STATIC_CAST(char*, pInfo) ;
// get m_NumEntries
COPY_INT32(&m_NumEntries, cur_ptr) ;
cur_ptr += sizeof(PRUint32) ;
// get m_StorageInUse
COPY_INT32(&m_StorageInUse, cur_ptr) ;
cur_ptr += sizeof(PRUint32) ;
PR_ASSERT(cur_ptr == NS_STATIC_CAST(char*, pInfo) + InfoSize);
}
return NS_OK ;
}
NS_IMETHODIMP
nsNetDiskCache::SetSpecialEntry(void)
{
PRUint32 InfoSize ;
InfoSize = sizeof m_NumEntries ;
InfoSize += sizeof m_StorageInUse ;
void* pInfo = nsAllocator::Alloc(InfoSize*sizeof(char)) ;
if(!pInfo)
return NS_ERROR_OUT_OF_MEMORY ;
char* cur_ptr = NS_STATIC_CAST(char*, pInfo) ;
COPY_INT32(cur_ptr, &m_NumEntries) ;
cur_ptr += sizeof(PRUint32) ;
COPY_INT32(cur_ptr, &m_StorageInUse) ;
cur_ptr += sizeof(PRUint32) ;
PR_ASSERT(cur_ptr == NS_STATIC_CAST(char*, pInfo) + InfoSize);
return m_DB->SetSpecialEntry(pInfo, InfoSize) ;
}
// this routine will be called everytime we have a db corruption.
// m_DB will be re-initialized, m_StorageInUse and m_NumEntries will
// be reset.
NS_IMETHODIMP
nsNetDiskCache::DBRecovery(void)
{
// rename all the sub cache dirs and remove them later during dtor.
nsresult rv = RenameCacheSubDirs() ;
if(NS_FAILED(rv))
return rv ;
// remove corrupted db file, don't care if db->shutdown fails or not.
m_DB->Shutdown() ;
nsFileSpec dbfile ;
m_DBFile->GetFileSpec(&dbfile) ;
dbfile.Delete(PR_TRUE) ;
// make sure it's not there any more
PRBool exists = dbfile.Exists() ;
if(exists) {
NS_ERROR("can't remove old db.") ;
return NS_ERROR_FAILURE ;
}
// reinitilize DB
return InitDB() ;
}
// this routine will add string "trash" to current CacheSubDir names.
// e.g. 00->trash00, 1f->trash1f. and update the m_DBCorrupted.
NS_IMETHODIMP
nsNetDiskCache::RenameCacheSubDirs(void)
{
nsCOMPtr<nsIFileSpec> cacheSubDir;
nsresult rv = NS_NewFileSpec(getter_AddRefs(cacheSubDir)) ;
for (int i=0; i < 32; i++) {
rv = cacheSubDir->FromFileSpec(m_pDiskCacheFolder) ;
if(NS_FAILED(rv))
return rv ;
char oldName[3], newName[8];
PR_snprintf(oldName, 3, "%0.2x", i) ;
cacheSubDir->AppendRelativeUnixPath(oldName) ;
// re-name the directory
PR_snprintf(newName, 8, "trash%0.2x", i) ;
rv = cacheSubDir->Rename(newName) ;
if(NS_FAILED(rv))
// TODO, error checking
return NS_ERROR_FAILURE ;
}
// update m_DBCorrupted
m_DBCorrupted = PR_TRUE ;
return NS_OK ;
}
// this routine is used by dtor and RemoveAll() to clean up dirs.
NS_IMETHODIMP
nsNetDiskCache::RemoveFolder(nsFileSpec aFolder)
{
for(nsDirectoryIterator di(aFolder, PR_FALSE); di.Exists(); di++) {
di.Spec().Delete(PR_TRUE) ;
}
aFolder.Delete(PR_FALSE) ; // recursive delete
return NS_OK ;
}

View File

@@ -1,91 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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 Mozilla Communicator.
*
* The Initial Developer of the Original Code is Intel Corp.
* Portions created by Intel Corp. are
* Copyright (C) 1999, 1999 Intel Corp. All
* Rights Reserved.
*
* Contributor(s): Yixiong Zou <yixiong.zou@intel.com>
* Carl Wong <carl.wong@intel.com>
*/
/*
* This file is part of filecache implementation.
*
* nsNetDiskCache is the main disk cache module that will create
* the cache database, and then store and retrieve nsDiskCacheRecord
* objects from it. It also contains some basic error recovery procedure.
*/
#ifndef __gen_nsNetDiskCache_h__
#define __gen_nsNetDiskCache_h__
#include "nsINetDataDiskCache.h"
#include "nsNetDiskCacheCID.h"
#include "nsCOMPtr.h"
#include "nsIPref.h"
#include "nsDBAccessor.h"
class nsIURI; /* forward decl */
class nsICachedNetData; /* forward decl */
class nsISimpleEnumerator; /* forward decl */
class nsIFileSpec; /* forward decl */
/* starting interface: nsNetDiskCache */
class nsNetDiskCache : public nsINetDataDiskCache {
public:
NS_DECL_ISUPPORTS
NS_DECL_NSINETDATACACHE
NS_DECL_NSINETDATADISKCACHE
NS_IMETHOD Init(void) ;
nsNetDiskCache() ;
virtual ~nsNetDiskCache() ;
protected:
NS_IMETHOD InitDB(void) ;
NS_IMETHOD CreateDir(nsIFileSpec* dir_spec) ;
NS_IMETHOD GetSpecialEntry(void) ;
NS_IMETHOD SetSpecialEntry(void) ;
NS_IMETHOD RenameCacheSubDirs(void) ;
NS_IMETHOD DBRecovery(void) ;
NS_IMETHOD RemoveFolder(nsFileSpec aFolder) ;
private:
PRBool m_Enabled ;
PRUint32 m_NumEntries ;
nsCOMPtr<nsINetDataCache> m_pNextCache ;
nsCOMPtr<nsIFileSpec> m_pDiskCacheFolder ;
nsCOMPtr<nsIFileSpec> m_DBFile ;
PRUint32 m_MaxEntries ;
PRUint32 m_StorageInUse ;
nsIDBAccessor* m_DB ;
// this is used to indicate a db corruption
PRBool m_DBCorrupted ;
friend class nsDiskCacheRecord ;
friend class nsDiskCacheRecordChannel ;
friend class nsDBEnumerator ;
} ;
#endif /* __gen_nsNetDiskCache_h__ */

View File

@@ -1,32 +0,0 @@
/*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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 Mozilla Communicator.
*
* The Initial Developer of the Original Code is Intel Corp.
* Portions created by Intel Corp. are
* Copyright (C) 1999, 1999 Intel Corp. All
* Rights Reserved.
*
* Contributor(s): Yixiong Zou <yixiong.zou@intel.com>
* Carl Wong <carl.wong@intel.com>
*/
#ifndef _nsNetDiskCacheCID_h_
#define _nsNetDiskCacheCID_h_
#define NS_NETDISKCACHE_CID_STR "ECFEEA00-7201-11d3-87FE-000629D01344"
#define NS_NETDISKCACHE_CID \
{ 0xecfeea00, 0x7201, 0x11d3, \
{ 0x87, 0xfe, 0x0, 0x6, 0x29, 0xd0, 0x13, 0x44 }}
#endif /* _nsNetDiskCacheCID_h_ */

View File

@@ -1,50 +0,0 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
REQUIRES = libreg xpcom
CPPSRCS = \
diskcache.cpp \
$(NULL)
SIMPLE_PROGRAMS = $(CPPSRCS:.cpp=)
ifdef NO_LD_ARCHIVE_FLAGS
LOST_SYM_LIBS = -lxpcomds_s -lxptinfo -lmozreg_s
endif
LIBS = \
-lmozjs \
-lxpcom \
-lmozdbm_s \
$(MOZ_NECKO_UTIL_LIBS) \
$(LOST_SYM_LIBS) \
$(NSPR_LIBS) \
$(NULL)
include $(topsrcdir)/config/rules.mk
LOCAL_INCLUDES = -I$(srcdir)/..
DEFINES += -DUSE_NSREG -DCACHE

View File

@@ -1,836 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsIStreamListener.h"
#include "nsIStreamObserver.h"
#include "nsIServiceManager.h"
#include "nsIInputStream.h"
#include "nsIOutputStream.h"
#include "nsIEventQueue.h"
#include "nsIEventQueueService.h"
#include "nsIChannel.h"
#include "nsCOMPtr.h"
#include "nsString.h"
#include <stdio.h>
#include <unistd.h>
#include "nsINetDataCache.h"
#include "nsINetDataCacheRecord.h"
//#include "nsMemCacheCID.h"
#include "nsNetDiskCache.h"
#include "nsIPref.h"
#include "prenv.h"
#include "nsIFileStream.h"
// Number of test entries to be placed in the cache
#define NUM_CACHE_ENTRIES 250
// Cache content stream length will have random length between zero and
// MAX_CONTENT_LENGTH bytes
#define MAX_CONTENT_LENGTH 20000
// Length of random-data cache entry key
#define CACHE_KEY_LENGTH 15
// Length of random-data cache entry meta-data
#define CACHE_METADATA_LENGTH 100
//static NS_DEFINE_CID(kMemCacheCID, NS_MEM_CACHE_FACTORY_CID);
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
static NS_DEFINE_CID(kDiskCacheCID, NS_NETDISKCACHE_CID) ;
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
static NS_DEFINE_IID(kIPrefIID, NS_IPREF_IID);
// Mapping from test case number to RecordID
static PRInt32 recordID[NUM_CACHE_ENTRIES];
static PRInt32
mapRecordIdToTestNum(PRInt32 aRecordID)
{
int i;
for (i = 0; i < NUM_CACHE_ENTRIES; i++) {
if (recordID[i] == aRecordID)
return i;
}
return -1;
}
// A supply of stream data to either store or compare with
class nsITestDataStream {
public:
virtual ~nsITestDataStream() {};
virtual PRUint32 Next() = 0;
virtual void Read(char* aBuf, PRUint32 aCount) = 0;
virtual PRBool Match(char* aBuf, PRUint32 aCount) = 0;
virtual void Skip(PRUint32 aCount) = 0;
};
// A reproducible stream of random data.
class RandomStream : public nsITestDataStream {
public:
RandomStream(PRUint32 aSeed) {
mStartSeed = mState = aSeed;
}
PRUint32 GetStartSeed() {
return mStartSeed;
}
PRUint32 Next() {
mState = 1103515245 * mState + 12345;
return mState;
}
void Read(char* aBuf, PRUint32 aCount) {
PRUint32 i;
for (i = 0; i < aCount; i++) {
*aBuf++ = Next();
}
}
PRBool
Match(char* aBuf, PRUint32 aCount) {
PRUint32 i;
for (i = 0; i < aCount; i++) {
if (*aBuf++ != (char)(Next() & 0xff))
return PR_FALSE;
}
return PR_TRUE;
}
void
Skip(PRUint32 aCount) {
while (aCount--)
Next();
}
protected:
PRUint32 mState;
PRUint32 mStartSeed;
};
// A stream of data that increments on each byte that is read, modulo 256
class CounterStream : public nsITestDataStream {
public:
CounterStream(PRUint32 aSeed) {
mStartSeed = mState = aSeed;
}
PRUint32 GetStartSeed() {
return mStartSeed;
}
PRUint32 Next() {
mState += 1;
mState &= 0xff;
return mState;
}
void Read(char* aBuf, PRUint32 aCount) {
PRUint32 i;
for (i = 0; i < aCount; i++) {
*aBuf++ = Next();
}
}
PRBool
Match(char* aBuf, PRUint32 aCount) {
PRUint32 i;
for (i = 0; i < aCount; i++) {
if (*aBuf++ != (char)Next())
return PR_FALSE;
}
return PR_TRUE;
}
void
Skip(PRUint32 aCount) {
mState += aCount;
mState &= 0xff;
}
protected:
PRUint32 mState;
PRUint32 mStartSeed;
};
static int gNumReaders = 0;
static PRUint32 gTotalBytesRead = 0;
static PRUint32 gTotalDuration = 0;
class nsReader : public nsIStreamListener {
public:
NS_DECL_ISUPPORTS
nsReader()
: mStartTime(0), mBytesRead(0)
{
NS_INIT_REFCNT();
gNumReaders++;
}
virtual ~nsReader() {
delete mTestDataStream;
gNumReaders--;
}
nsresult
Init(nsIChannel *aChannel, nsITestDataStream* aRandomStream, PRUint32 aExpectedStreamLength) {
mChannel = aChannel;
mTestDataStream = aRandomStream;
mExpectedStreamLength = aExpectedStreamLength;
mRefCnt = 1;
return NS_OK;
}
NS_IMETHOD OnStartRequest(nsIChannel* channel,
nsISupports* context) {
mStartTime = PR_IntervalNow();
return NS_OK;
}
NS_IMETHOD OnDataAvailable(nsIChannel* channel,
nsISupports* context,
nsIInputStream *aIStream,
PRUint32 aSourceOffset,
PRUint32 aLength) {
char buf[1025];
while (aLength > 0) {
PRUint32 amt;
PRBool match;
aIStream->Read(buf, sizeof buf, &amt);
if (amt == 0) break;
aLength -= amt;
mBytesRead += amt;
match = mTestDataStream->Match(buf, amt);
NS_ASSERTION(match, "Stored data was corrupted on read");
}
return NS_OK;
}
NS_IMETHOD OnStopRequest(nsIChannel* channel,
nsISupports* context,
nsresult aStatus,
const PRUnichar* aMsg) {
PRIntervalTime endTime;
PRIntervalTime duration;
endTime = PR_IntervalNow();
duration = (endTime - mStartTime);
if (NS_FAILED(aStatus)) printf("channel failed.\n");
// printf("read %d bytes\n", mBytesRead);
NS_ASSERTION(mBytesRead == mExpectedStreamLength,
"Stream in cache is wrong length");
gTotalBytesRead += mBytesRead;
gTotalDuration += duration;
// Release channel
mChannel = 0;
return NS_OK;
}
protected:
PRIntervalTime mStartTime;
PRUint32 mBytesRead;
nsITestDataStream* mTestDataStream;
PRUint32 mExpectedStreamLength;
nsCOMPtr<nsIChannel> mChannel;
};
NS_IMPL_ISUPPORTS2(nsReader, nsIStreamListener, nsIStreamObserver)
static nsIEventQueue* eventQueue;
nsresult
InitQueue() {
nsresult rv;
NS_WITH_SERVICE(nsIEventQueueService, eventQService, kEventQueueServiceCID, &rv);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get event queue service");
rv = eventQService->CreateThreadEventQueue();
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't create event queue");
rv = eventQService->GetThreadEventQueue(PR_CurrentThread(), &eventQueue);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get event queue for main thread");
return NS_OK;
}
// Process events until all streams are OnStopRequest'ed
nsresult
WaitForEvents() {
while (gNumReaders) {
eventQueue->ProcessPendingEvents();
}
return NS_OK;
}
// Read data for a single cache record and compare against testDataStream
nsresult
TestReadStream(nsINetDataCacheRecord *record, nsITestDataStream *testDataStream,
PRUint32 expectedStreamLength)
{
nsCOMPtr<nsIChannel> channel;
nsresult rv;
PRUint32 actualContentLength;
rv = record->NewChannel(0, getter_AddRefs(channel));
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
rv = record->GetStoredContentLength(&actualContentLength);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
NS_ASSERTION(actualContentLength == expectedStreamLength,
"nsINetDataCacheRecord::GetContentLength() busted ?");
nsReader *reader = new nsReader;
reader->AddRef();
rv = reader->Init(channel, testDataStream, expectedStreamLength);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
rv = channel->AsyncRead(0, -1, 0, reader);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
reader->Release();
return NS_OK;
}
// Check that records can be retrieved using their record-ID, in addition
// to using the opaque key.
nsresult
TestRecordID(nsINetDataCache *cache)
{
nsresult rv;
nsCOMPtr<nsINetDataCacheRecord> record;
RandomStream *randomStream;
PRUint32 metaDataLength;
char cacheKey[CACHE_KEY_LENGTH];
char *metaData;
PRUint32 testNum;
PRBool match;
for (testNum = 0; testNum < NUM_CACHE_ENTRIES; testNum++) {
randomStream = new RandomStream(testNum);
randomStream->Read(cacheKey, sizeof cacheKey);
rv = cache->GetCachedNetDataByID(recordID[testNum], getter_AddRefs(record));
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't obtain record using record ID");
// Match against previously stored meta-data
rv = record->GetMetaData(&metaDataLength, &metaData);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get record meta-data");
match = randomStream->Match(metaData, metaDataLength);
NS_ASSERTION(match, "Meta-data corrupted or incorrect");
nsAllocator::Free(metaData);
delete randomStream;
}
return NS_OK;
}
// Check that all cache entries in the database are enumerated and that
// no duplicates appear.
nsresult
TestEnumeration(nsINetDataCache *cache)
{
nsresult rv;
nsCOMPtr<nsINetDataCacheRecord> record;
nsCOMPtr<nsISupports> tempISupports;
nsCOMPtr<nsISimpleEnumerator> iterator;
RandomStream *randomStream;
PRUint32 metaDataLength;
char cacheKey[CACHE_KEY_LENGTH];
char *metaData;
PRUint32 testNum;
PRBool match;
PRInt32 recID;
int numRecords = 0;
// Iterate over all records in the cache
rv = cache->NewCacheEntryIterator(getter_AddRefs(iterator));
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't create new cache entry iterator");
PRBool notDone;
while (1) {
// Done iterating ?
rv = iterator->HasMoreElements(&notDone);
if (NS_FAILED(rv)) return rv;
if (!notDone)
break;
// Get next record in iteration
rv = iterator->GetNext(getter_AddRefs(tempISupports));
NS_ASSERTION(NS_SUCCEEDED(rv), "iterator bustage");
record = do_QueryInterface(tempISupports);
numRecords++;
// Get record ID
rv = record->GetRecordID(&recID);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get Record ID");
testNum = mapRecordIdToTestNum(recID);
NS_ASSERTION(testNum != -1, "Corrupted Record ID ?");
// Erase mapping from table, so that duplicate enumerations are detected
recordID[testNum] = -1;
// Make sure stream matches test data
randomStream = new RandomStream(testNum);
randomStream->Read(cacheKey, sizeof cacheKey);
// Match against previously stored meta-data
rv = record->GetMetaData(&metaDataLength, &metaData);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get record meta-data");
match = randomStream->Match(metaData, metaDataLength);
NS_ASSERTION(match, "Meta-data corrupted or incorrect");
nsAllocator::Free(metaData);
delete randomStream;
}
NS_ASSERTION(numRecords == NUM_CACHE_ENTRIES, "Iteration bug");
return NS_OK;
}
// Read the test data that was written in FillCache(), checking for
// corruption, truncation.
nsresult
TestRead(nsINetDataCache *cache)
{
nsresult rv;
PRBool inCache;
nsCOMPtr<nsINetDataCacheRecord> record;
RandomStream *randomStream;
PRUint32 metaDataLength;
char cacheKey[CACHE_KEY_LENGTH];
char *metaData, *storedCacheKey;
PRUint32 testNum, storedCacheKeyLength;
PRBool match;
for (testNum = 0; testNum < NUM_CACHE_ENTRIES; testNum++) {
randomStream = new RandomStream(testNum);
randomStream->Read(cacheKey, sizeof cacheKey);
// Ensure that entry is in the cache
rv = cache->Contains(cacheKey, sizeof cacheKey, &inCache);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
NS_ASSERTION(inCache, "nsINetDataCache::Contains error");
rv = cache->GetCachedNetData(cacheKey, sizeof cacheKey, getter_AddRefs(record));
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
// Match against previously stored meta-data
match = record->GetMetaData(&metaDataLength, &metaData);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
match = randomStream->Match(metaData, metaDataLength);
NS_ASSERTION(match, "Meta-data corrupted or incorrect");
nsAllocator::Free(metaData);
// Test GetKey() method
rv = record->GetKey(&storedCacheKeyLength, &storedCacheKey);
NS_ASSERTION(NS_SUCCEEDED(rv) &&
(storedCacheKeyLength == sizeof cacheKey) &&
!memcmp(storedCacheKey, &cacheKey[0], sizeof cacheKey),
"nsINetDataCacheRecord::GetKey failed");
nsAllocator::Free(storedCacheKey);
PRUint32 expectedStreamLength = randomStream->Next() & 0xffff;
TestReadStream(record, randomStream, expectedStreamLength);
}
WaitForEvents();
// Compute rate in MB/s
double rate = gTotalBytesRead / PR_IntervalToMilliseconds(gTotalDuration);
rate *= NUM_CACHE_ENTRIES;
rate *= 1000;
rate /= (1024 * 1024);
printf("Read %d bytes at a rate of %5.1f MB per second \n",
gTotalBytesRead, rate);
return NS_OK;
}
// Repeatedly call SetStoredContentLength() on a cache entry and make
// read the stream's data to ensure that it's not corrupted by the effect
nsresult
TestTruncation(nsINetDataCache *cache)
{
nsresult rv;
nsCOMPtr<nsINetDataCacheRecord> record;
RandomStream *randomStream;
char cacheKey[CACHE_KEY_LENGTH];
randomStream = new RandomStream(0);
randomStream->Read(cacheKey, sizeof cacheKey);
rv = cache->GetCachedNetData(cacheKey, sizeof cacheKey, getter_AddRefs(record));
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
randomStream->Skip(CACHE_METADATA_LENGTH);
PRUint32 initialStreamLength = randomStream->Next() & 0xffff;
delete randomStream;
PRUint32 i;
PRUint32 delta = initialStreamLength / 64;
for (i = initialStreamLength; i >= delta; i -= delta) {
PRUint32 expectedStreamLength = i;
// Do the truncation
record->SetStoredContentLength(expectedStreamLength);
randomStream = new RandomStream(0);
randomStream->Skip(CACHE_KEY_LENGTH + CACHE_METADATA_LENGTH + 1);
TestReadStream(record, randomStream, expectedStreamLength);
WaitForEvents();
}
return NS_OK;
}
// Write known data to random offsets in a single cache entry and test
// resulting stream for correctness.
nsresult
TestOffsetWrites(nsINetDataCache *cache)
{
nsresult rv;
nsCOMPtr<nsINetDataCacheRecord> record;
nsCOMPtr<nsIChannel> channel;
nsCOMPtr<nsIOutputStream> outStream;
char buf[512];
char cacheKey[CACHE_KEY_LENGTH];
RandomStream *randomStream;
randomStream = new RandomStream(0);
randomStream->Read(cacheKey, sizeof cacheKey);
rv = cache->GetCachedNetData(cacheKey, sizeof cacheKey, getter_AddRefs(record));
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't access record via opaque cache key");
nsCOMPtr<nsIFileSpec> file ;
record->GetFilename(getter_AddRefs(file)) ;
char* name ;
file->GetUnixStyleFilePath(&name) ;
printf(" file name is %s \n", name) ;
// Write buffer-fulls of data at random offsets into the cache entry.
// Data written is (offset % 0xff)
PRUint32 startingOffset;
PRUint32 streamLength = 0;
PRUint32 len = 0 ;
CounterStream *counterStream;
int i = 0;
for (i = 0; i < 257; i++) {
rv = record->NewChannel(0, getter_AddRefs(channel));
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
startingOffset = streamLength ? streamLength - (randomStream->Next() % sizeof buf): 0;
rv = channel->OpenOutputStream(startingOffset, getter_AddRefs(outStream));
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
truncate(name, startingOffset) ;
counterStream = new CounterStream(startingOffset);
counterStream->Read(buf, sizeof buf);
nsresult status ;
nsCOMPtr<nsIRandomAccessStore> ras = do_QueryInterface(outStream, &status);
if (NS_FAILED(status)) {
// mState = END_WRITE;
return NS_ERROR_FAILURE;
}
PRIntn offset ;
ras->Tell(&offset) ;
// printf(" offset is %d \n", offset) ;
PRUint32 numWritten;
rv = outStream->Write(buf, sizeof buf, &numWritten);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
NS_ASSERTION(numWritten == sizeof buf, "Write() bug?");
streamLength = startingOffset + sizeof buf;
rv = outStream->Close();
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't close channel");
delete counterStream;
record->GetStoredContentLength(&len) ;
if(len != streamLength)
printf(" offset = %d is wrong, filesize = %d\n", startingOffset, len) ;
}
/*
rv = record->NewChannel(0, getter_AddRefs(channel));
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
startingOffset = 208;
rv = channel->OpenOutputStream(startingOffset, getter_AddRefs(outStream));
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
counterStream = new CounterStream(startingOffset);
counterStream->Read(buf, sizeof buf);
nsresult status ;
nsCOMPtr<nsIRandomAccessStore> ras = do_QueryInterface(outStream, &status);
if (NS_FAILED(status)) {
// mState = END_WRITE;
return NS_ERROR_FAILURE;
}
PRIntn offset = 0 ;
ras->Tell(&offset) ;
printf(" offset is %d \n", offset) ;
PRUint32 numWritten;
rv = outStream->Write(buf, sizeof buf, &numWritten);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
NS_ASSERTION(numWritten == sizeof buf, "Write() bug?");
streamLength = startingOffset + sizeof buf;
rv = outStream->Close();
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't close channel");
delete counterStream;
record->GetStoredContentLength(&len) ;
if(len != streamLength)
printf(" offset = %d is wrong, filesize = %d\n", startingOffset, len) ;
*/
delete randomStream;
counterStream = new CounterStream(0);
TestReadStream(record, counterStream, streamLength);
WaitForEvents();
return NS_OK;
}
// Create entries in the network data cache, using random data for the
// key, the meta-data and the stored content data.
nsresult
FillCache(nsINetDataCache *cache)
{
nsresult rv;
PRBool inCache;
nsCOMPtr<nsINetDataCacheRecord> record;
nsCOMPtr<nsIChannel> channel;
nsCOMPtr<nsIOutputStream> outStream;
char buf[1000];
PRUint32 metaDataLength;
char cacheKey[CACHE_KEY_LENGTH];
char metaData[CACHE_METADATA_LENGTH];
PRUint32 testNum;
char *data;
RandomStream *randomStream;
PRIntervalTime startTime = PR_IntervalNow();
for (testNum = 0; testNum < NUM_CACHE_ENTRIES; testNum++) {
randomStream = new RandomStream(testNum);
randomStream->Read(cacheKey, sizeof cacheKey);
// No entry should be in cache until we add it
rv = cache->Contains(cacheKey, sizeof cacheKey, &inCache);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
NS_ASSERTION(!inCache, "nsINetDataCache::Contains error");
rv = cache->GetCachedNetData(cacheKey, sizeof cacheKey, getter_AddRefs(record));
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't access record via opaque cache key");
// Test nsINetDataCacheRecord::GetRecordID()
rv = record->GetRecordID(&recordID[testNum]);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get Record ID");
// Test nsINetDataCache::GetNumEntries()
PRUint32 numEntries = (PRUint32)-1;
rv = cache->GetNumEntries(&numEntries);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get number of cache entries");
NS_ASSERTION(numEntries == testNum + 1, "GetNumEntries failure");
// Record meta-data should be initially empty
rv = record->GetMetaData(&metaDataLength, &data);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
if ((metaDataLength != 0) || (data != 0))
return NS_ERROR_FAILURE;
// Store random data as meta-data
randomStream->Read(metaData, sizeof metaData);
record->SetMetaData(sizeof metaData, metaData);
rv = record->NewChannel(0, getter_AddRefs(channel));
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
rv = channel->OpenOutputStream(0, getter_AddRefs(outStream));
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
PRUint32 beforeOccupancy;
rv = cache->GetStorageInUse(&beforeOccupancy);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get cache occupancy");
int streamLength = randomStream->Next() & 0xffff;
int remaining = streamLength;
while (remaining) {
PRUint32 numWritten;
int amount = PR_MIN(sizeof buf, remaining);
randomStream->Read(buf, amount);
rv = outStream->Write(buf, amount, &numWritten);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
NS_ASSERTION(numWritten == (PRUint32)amount, "Write() bug?");
remaining -= amount;
}
outStream->Close();
PRUint32 afterOccupancy;
rv = cache->GetStorageInUse(&afterOccupancy);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get cache occupancy");
PRUint32 streamLengthInKB = streamLength >> 10;
NS_ASSERTION((afterOccupancy - beforeOccupancy) >= streamLengthInKB,
"nsINetDataCache::GetStorageInUse() is busted");
// *Now* there should be an entry in the cache
rv = cache->Contains(cacheKey, sizeof cacheKey, &inCache);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
NS_ASSERTION(inCache, "nsINetDataCache::Contains error");
delete randomStream;
}
PRIntervalTime endTime = PR_IntervalNow();
return NS_OK;
}
nsresult NS_AutoregisterComponents()
{
nsresult rv = nsComponentManager::AutoRegister(nsIComponentManager::NS_Startup,
NULL /* default */);
return rv;
}
PRBool initPref ()
{
nsresult rv;
NS_WITH_SERVICE(nsIPref, prefPtr, kPrefCID, &rv);
if (NS_FAILED(rv))
return false;
nsCOMPtr<nsIFileSpec> fileSpec;
rv = NS_NewFileSpec (getter_AddRefs(fileSpec));
if (NS_FAILED(rv))
return false;
nsCString defaultPrefFile = PR_GetEnv ("MOZILLA_FIVE_HOME");
if (defaultPrefFile.Length())
defaultPrefFile += "/";
else
defaultPrefFile = "./";
defaultPrefFile += "default_prefs.js";
fileSpec->SetUnixStyleFilePath (defaultPrefFile.GetBuffer());
PRBool exists = false;
fileSpec->Exists(&exists);
if (exists)
prefPtr->ReadUserPrefsFrom(fileSpec);
else
return false;
return true;
}
int
main(int argc, char* argv[])
{
initPref() ;
nsresult rv;
nsCOMPtr<nsINetDataCache> cache;
rv = NS_AutoregisterComponents();
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't register XPCOM components");
rv = nsComponentManager::CreateInstance(kDiskCacheCID, nsnull,
NS_GET_IID(nsINetDataCache),
getter_AddRefs(cache));
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't create memory cache factory");
InitQueue();
PRUnichar* description;
rv = cache->GetDescription(&description);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get cache description");
nsCAutoString descStr(description);
printf("Testing: %s\n", descStr.GetBuffer());
rv = cache->RemoveAll();
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't clear cache");
PRUint32 startOccupancy;
rv = cache->GetStorageInUse(&startOccupancy);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get cache occupancy");
PRUint32 numEntries = (PRUint32)-1;
rv = cache->GetNumEntries(&numEntries);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get number of cache entries");
NS_ASSERTION(numEntries == 0, "Couldn't clear cache");
rv = FillCache(cache);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't fill cache with random test data");
rv = TestRead(cache);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't read random test data from cache");
rv = TestRecordID(cache);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't index records using record ID");
rv = TestEnumeration(cache);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't successfully enumerate records");
rv = TestTruncation(cache);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't successfully truncate records");
rv = TestOffsetWrites(cache);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't successfully write to records using non-zero offsets");
rv = cache->RemoveAll();
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't clear cache");
rv = cache->GetNumEntries(&numEntries);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get number of cache entries");
NS_ASSERTION(numEntries == 0, "Couldn't clear cache");
PRUint32 endOccupancy;
rv = cache->GetStorageInUse(&endOccupancy);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get cache occupancy");
NS_ASSERTION(startOccupancy == endOccupancy, "Cache occupancy not correctly computed ?");
return 0;
}

View File

@@ -1,48 +0,0 @@
# Generated automatically from Makefile.in by configure.
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
VPATH = @srcdir@
srcdir = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = nkcache
LIBRARY_NAME = nkmemcache_s
REQUIRES = nspr dbm
EXPORTS=nsMemCacheCID.h \
nsMemCache.h \
$(NULL)
CPPSRCS = \
nsMemCache.cpp \
nsMemCacheRecord.cpp \
nsMemCacheChannel.cpp \
$(NULL)
# we don't want the shared lib, but we want to force the creation of a
# static lib.
override NO_SHARED_LIB=1
override NO_STATIC_LIB=
include $(topsrcdir)/config/rules.mk

View File

@@ -1,42 +0,0 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=..\..\..
include <$(DEPTH)/config/config.mak>
MODULE = nkcache
LIBRARY_NAME = nkmemcache_s
CPP_OBJS = \
.\$(OBJDIR)\nsMemCache.obj \
.\$(OBJDIR)\nsMemCacheRecord.obj \
.\$(OBJDIR)\nsMemCacheChannel.obj \
$(NULL)
EXPORTS=nsMemCacheCID.h
include <$(DEPTH)\config\rules.mak>
install:: $(LIBRARY)
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
clobber::
rm -rf $(OBJDIR)
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib

View File

@@ -1,334 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* 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.
*
*/
/**
* nsMemCache is the implementation of an in-memory network-data
* cache, used to cache the responses to network retrieval commands.
* Each cache entry may contain both content, e.g. GIF image data, and
* associated metadata, e.g. HTTP headers. Each entry is indexed by
* two different keys: a record id number and an opaque key, which is
* created by the cache manager by combining the URI with a "secondary
* key", e.g. HTTP post data.
*/
#include "nsMemCache.h"
#include "nsMemCacheRecord.h"
#include "nsIGenericFactory.h"
#include "nsString.h"
#include "nsHashtable.h"
#include "nsHashtableEnumerator.h"
#include "nsEnumeratorUtils.h"
PRInt32 nsMemCache::gRecordSerialNumber = 0;
nsMemCache::nsMemCache()
: mNumEntries(0), mOccupancy(0), mEnabled(PR_TRUE),
mHashTable(0)
{
NS_INIT_REFCNT();
}
nsMemCache::~nsMemCache()
{
nsresult rv;
rv = RemoveAll();
NS_ASSERTION(NS_SUCCEEDED(rv) && (mNumEntries == 0),
"Failure to shut down memory cache. "
"Somewhere, someone is holding references to at least one cache record");
delete mHashTable;
}
nsresult
nsMemCache::Init()
{
mHashTable = new nsHashtable(256);
if (!mHashTable)
return NS_ERROR_OUT_OF_MEMORY;
return NS_OK;
}
NS_IMPL_ISUPPORTS(nsMemCache, NS_GET_IID(nsINetDataCache))
NS_IMETHODIMP
nsMemCache::GetDescription(PRUnichar * *aDescription)
{
nsAutoString description("Memory Cache");
*aDescription = description.ToNewUnicode();
if (!*aDescription)
return NS_ERROR_OUT_OF_MEMORY;
return NS_OK;
}
NS_IMETHODIMP
nsMemCache::Contains(const char *aKey, PRUint32 aKeyLength, PRBool *aFound)
{
nsOpaqueKey *opaqueKey = new nsOpaqueKey(aKey, aKeyLength);
if (!opaqueKey)
return NS_ERROR_OUT_OF_MEMORY;
*aFound = mHashTable->Exists(opaqueKey);
delete opaqueKey;
return NS_OK;
}
NS_IMETHODIMP
nsMemCache::GetCachedNetData(const char *aKey, PRUint32 aKeyLength,
nsINetDataCacheRecord* *aRecord)
{
nsresult rv;
nsMemCacheRecord* record = 0;
nsOpaqueKey *opaqueKey2 = 0;
nsOpaqueKey *opaqueKey3 = 0;
nsOpaqueKey *opaqueKey;
opaqueKey = new nsOpaqueKey(aKey, aKeyLength);
if (!opaqueKey)
goto out_of_memory;
record = (nsMemCacheRecord*)mHashTable->Get(opaqueKey);
delete opaqueKey;
// No existing cache database entry was found. Create a new one.
// This requires two mappings in the hash table:
// Record ID ==> record
// Opaque key ==> record
if (!record) {
record = new nsMemCacheRecord;
if (!record)
goto out_of_memory;
rv = record->Init(aKey, aKeyLength, ++gRecordSerialNumber, this);
if (NS_FAILED(rv)) goto out_of_memory;
// Index the record by opaque key
opaqueKey2 = new nsOpaqueKey(record->mKey, record->mKeyLength);
if (!opaqueKey2) goto out_of_memory;
mHashTable->Put(opaqueKey2, record);
// Index the record by it's record ID
char *recordIDbytes = NS_REINTERPRET_CAST(char *, &record->mRecordID);
opaqueKey3 = new nsOpaqueKey(recordIDbytes,
sizeof record->mRecordID);
if (!opaqueKey3) {
// Clean up the first record from the hash table
mHashTable->Remove(opaqueKey);
goto out_of_memory;
}
mHashTable->Put(opaqueKey3, record);
// The hash table holds on to the record
record->AddRef();
delete opaqueKey2;
delete opaqueKey3;
mNumEntries++;
}
record->AddRef();
*aRecord = record;
return NS_OK;
out_of_memory:
delete opaqueKey2;
delete opaqueKey3;
delete record;
return NS_ERROR_OUT_OF_MEMORY;
}
NS_IMETHODIMP
nsMemCache::GetCachedNetDataByID(PRInt32 RecordID,
nsINetDataCacheRecord* *aRecord)
{
nsOpaqueKey opaqueKey(NS_REINTERPRET_CAST(const char *, &RecordID),
sizeof RecordID);
*aRecord = (nsINetDataCacheRecord*)mHashTable->Get(&opaqueKey);
if (*aRecord) {
NS_ADDREF(*aRecord);
return NS_OK;
}
return NS_ERROR_FAILURE;
}
NS_METHOD
nsMemCache::Delete(nsMemCacheRecord* aRecord)
{
nsMemCacheRecord *removedRecord;
char *recordIDbytes = NS_REINTERPRET_CAST(char *, &aRecord->mRecordID);
nsOpaqueKey opaqueRecordIDKey(recordIDbytes,
sizeof aRecord->mRecordID);
removedRecord = (nsMemCacheRecord*)mHashTable->Remove(&opaqueRecordIDKey);
NS_ASSERTION(removedRecord == aRecord, "memory cache database inconsistent");
nsOpaqueKey opaqueKey(aRecord->mKey, aRecord->mKeyLength);
removedRecord = (nsMemCacheRecord*)mHashTable->Remove(&opaqueKey);
NS_ASSERTION(removedRecord == aRecord, "memory cache database inconsistent");
aRecord->Release();
mNumEntries--;
return NS_OK;
}
NS_IMETHODIMP
nsMemCache::GetEnabled(PRBool *aEnabled)
{
NS_ENSURE_ARG(aEnabled);
*aEnabled = mEnabled;
return NS_OK;
}
NS_IMETHODIMP
nsMemCache::SetEnabled(PRBool aEnabled)
{
mEnabled = aEnabled;
return NS_OK;
}
NS_IMETHODIMP
nsMemCache::GetFlags(PRUint32 *aFlags)
{
NS_ENSURE_ARG(aFlags);
*aFlags = MEMORY_CACHE;
return NS_OK;
}
NS_IMETHODIMP
nsMemCache::GetNumEntries(PRUint32 *aNumEntries)
{
NS_ENSURE_ARG(aNumEntries);
*aNumEntries = mNumEntries;
return NS_OK;
}
NS_IMETHODIMP
nsMemCache::GetMaxEntries(PRUint32 *aMaxEntries)
{
NS_ENSURE_ARG(aMaxEntries);
*aMaxEntries = MEM_CACHE_MAX_ENTRIES;
return NS_OK;
}
static NS_METHOD
HashEntryConverter(nsHashKey *aKey, void *aValue,
void *unused, nsISupports **retval)
{
nsMemCacheRecord *record;
nsOpaqueKey *opaqueKey;
record = (nsMemCacheRecord*)aValue;
opaqueKey = (nsOpaqueKey*)aKey;
// Hash table keys that index cache entries by their record ID
// shouldn't be enumerated.
if ((opaqueKey->GetKeyLength() == sizeof(PRInt32))) {
#ifdef DEBUG
PRInt32 recordID;
record->GetRecordID(&recordID);
NS_ASSERTION(*((PRInt32*)opaqueKey->GetKey()) == recordID,
"Key has incorrect key length");
#endif
return NS_ERROR_FAILURE;
}
NS_IF_ADDREF(record);
*retval = NS_STATIC_CAST(nsISupports*, record);
return NS_OK;
}
NS_IMETHODIMP
nsMemCache::NewCacheEntryIterator(nsISimpleEnumerator* *aIterator)
{
nsCOMPtr<nsIEnumerator> iterator;
NS_ENSURE_ARG(aIterator);
NS_NewHashtableEnumerator(mHashTable, HashEntryConverter,
mHashTable, getter_AddRefs(iterator));
return NS_NewAdapterEnumerator(aIterator, iterator);
}
NS_IMETHODIMP
nsMemCache::GetNextCache(nsINetDataCache* *aNextCache)
{
NS_ENSURE_ARG(aNextCache);
*aNextCache = mNextCache;
NS_ADDREF(*aNextCache);
return NS_OK;
}
NS_IMETHODIMP
nsMemCache::SetNextCache(nsINetDataCache* aNextCache)
{
mNextCache = aNextCache;
return NS_OK;
}
NS_IMETHODIMP
nsMemCache::GetStorageInUse(PRUint32 *aStorageInUse)
{
NS_ENSURE_ARG(aStorageInUse);
// Convert from bytes to KB
*aStorageInUse = (mOccupancy >> 10);
return NS_OK;
}
NS_IMETHODIMP
nsMemCache::RemoveAll(void)
{
PRBool failed;
nsCOMPtr<nsISimpleEnumerator> iterator;
nsCOMPtr<nsISupports> recordSupports;
nsCOMPtr<nsINetDataCacheRecord> record;
nsresult rv;
failed = PR_FALSE;
rv = NewCacheEntryIterator(getter_AddRefs(iterator));
if (NS_FAILED(rv))
return rv;
PRBool notDone;
while (1) {
rv = iterator->HasMoreElements(&notDone);
if (NS_FAILED(rv)) return rv;
if (!notDone)
break;
iterator->GetNext(getter_AddRefs(recordSupports));
record = do_QueryInterface(recordSupports);
recordSupports = 0;
PRUint32 bytesUsed;
record->GetStoredContentLength(&bytesUsed);
rv = record->Delete();
if (NS_FAILED(rv)) {
failed = PR_TRUE;
continue;
}
mOccupancy -= bytesUsed;
}
if (failed)
return NS_ERROR_FAILURE;
return NS_OK;
}

View File

@@ -1,83 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* 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.
*
*/
/**
* nsMemCache is the implementation of an in-memory network-data
* cache, used to cache the responses to network retrieval commands.
* Each cache entry may contain both content, e.g. GIF image data, and
* associated metadata, e.g. HTTP headers. Each entry is indexed by
* two different keys: a record id number and an opaque key, which is
* created by the cache manager by combining the URI with a "secondary
* key", e.g. HTTP post data.
*/
#ifndef _nsMemCache_h_
#define _nsMemCache_h_
#include "nsINetDataCache.h"
// Maximum number of URIs that may be resident in the cache
#define MEM_CACHE_MAX_ENTRIES 1000
#define MEM_CACHE_SEGMENT_SIZE (1 << 12)
#define MEM_CACHE_MAX_ENTRY_SIZE (1 << 20)
class nsHashtable;
class nsMemCacheRecord;
class nsMemCache : public nsINetDataCache
{
public:
nsMemCache();
virtual ~nsMemCache();
nsresult Init();
// nsISupports methods
NS_DECL_ISUPPORTS
// nsINetDataCache methods
NS_DECL_NSINETDATACACHE
// Factory
static NS_METHOD nsMemCacheConstructor(nsISupports *aOuter, REFNSIID aIID,
void **aResult);
protected:
PRUint32 mNumEntries;
PRUint32 mOccupancy; // Memory used, in bytes
PRBool mEnabled; // If false, bypass mem cache
nsINetDataCache* mNextCache;
// Mapping from either opaque key or record ID to nsMemCacheRecord
nsHashtable* mHashTable;
// Used to assign record ID's
static PRInt32 gRecordSerialNumber;
NS_METHOD Delete(nsMemCacheRecord* aRecord);
friend class nsMemCacheRecord;
friend class nsMemCacheChannel;
};
#endif // _nsMemCache_h_

View File

@@ -1,36 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* 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.
*
*/
// XPCOM Class ID for the network data in-memory cache
#ifndef nsMEMCACHECID_h__
#define nsMEMCACHECID_h__
// {e4710560-7de2-11d3-90cb-0040056a906e}
#define NS_MEM_CACHE_FACTORY_CID \
{ \
0xe4710560, \
0x7de2, \
0x11d3, \
{0x90, 0xcb, 0x00, 0x40, 0x05, 0x6a, 0x90, 0x6e} \
}
#endif // nsMEMCACHECID_h__

View File

@@ -1,462 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* 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.
*
*/
#include "nsMemCache.h"
#include "nsMemCacheChannel.h"
#include "nsIStreamListener.h"
#include "nsIChannel.h"
#include "nsIStorageStream.h"
#include "nsIOutputStream.h"
#include "nsIServiceManager.h"
#include "nsIEventQueueService.h"
#include "nsNetUtil.h"
#include "nsILoadGroup.h"
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
static NS_DEFINE_CID(kEventQueueService, NS_EVENTQUEUESERVICE_CID);
NS_IMPL_ISUPPORTS(nsMemCacheChannel, NS_GET_IID(nsIChannel))
void
nsMemCacheChannel::NotifyStorageInUse(PRInt32 aBytesUsed)
{
mRecord->mCache->mOccupancy += aBytesUsed;
}
/**
* This class acts as an adaptor around a synchronous input stream to add async
* read capabilities. It adds methods for initiating, suspending, resuming and
* cancelling async reads.
*/
class AsyncReadStreamAdaptor : public nsIInputStream {
public:
AsyncReadStreamAdaptor(nsMemCacheChannel* aChannel, nsIInputStream *aSyncStream):
mSyncStream(aSyncStream), mDataAvailCursor(0),
mRemaining(0), mAvailable(0), mChannel(aChannel), mAborted(PR_FALSE), mSuspended(PR_FALSE)
{
NS_INIT_REFCNT();
NS_ADDREF(mChannel);
}
virtual ~AsyncReadStreamAdaptor() {
mChannel->mAsyncReadStream = 0;
NS_RELEASE(mChannel);
}
NS_DECL_ISUPPORTS
nsresult
IsPending(PRBool* aIsPending) {
*aIsPending = (mRemaining != 0) && !mAborted;
return NS_OK;
}
nsresult
Cancel(void) {
mAborted = PR_TRUE;
return mStreamListener->OnStopRequest(mChannel, mContext, NS_BINDING_ABORTED, nsnull);
}
nsresult
Suspend(void) { mSuspended = PR_TRUE; return NS_OK; }
nsresult
Resume(void) {
if (!mSuspended)
return NS_ERROR_FAILURE;
mSuspended = PR_FALSE;
return NextListenerEvent();
}
NS_IMETHOD
Available(PRUint32 *aNumBytes) { return mAvailable; }
NS_IMETHOD
Read(char* aBuf, PRUint32 aCount, PRUint32 *aBytesRead) {
if (mAborted)
return NS_ERROR_ABORT;
*aBytesRead = 0;
aCount = PR_MIN(aCount, mAvailable);
nsresult rv = mSyncStream->Read(aBuf, aCount, aBytesRead);
mAvailable -= *aBytesRead;
if (NS_FAILED(rv) && (rv != NS_BASE_STREAM_WOULD_BLOCK)) {
Fail();
return rv;
}
if (!mSuspended && !mAvailable) {
rv = NextListenerEvent();
if (NS_FAILED(rv)) {
Fail();
return rv;
}
}
return NS_OK;
}
NS_IMETHOD
Close() {
nsresult rv = mSyncStream->Close();
mSyncStream = 0;
mContext = 0;
mStreamListener = 0;
return rv;
}
nsresult
AsyncRead(PRUint32 aStartPosition, PRInt32 aReadCount,
nsISupports* aContext, nsIStreamListener* aListener) {
nsresult rv;
nsIEventQueue *eventQ;
mContext = aContext;
mStreamListener = aListener;
mRemaining = aReadCount;
NS_WITH_SERVICE(nsIIOService, serv, kIOServiceCID, &rv);
if (NS_FAILED(rv)) return rv;
NS_WITH_SERVICE(nsIEventQueueService, eventQService, kEventQueueService, &rv);
if (NS_FAILED(rv)) return rv;
rv = eventQService->GetThreadEventQueue(PR_CurrentThread(), &eventQ);
if (NS_FAILED(rv)) return rv;
rv = NS_NewAsyncStreamListener(aListener, eventQ,
getter_AddRefs(mStreamListener));
NS_RELEASE(eventQ);
if (NS_FAILED(rv)) return rv;
rv = mStreamListener->OnStartRequest(mChannel, aContext);
if (NS_FAILED(rv)) return rv;
return NextListenerEvent();
}
protected:
nsresult
Fail(void) {
mAborted = PR_TRUE;
return mStreamListener->OnStopRequest(mChannel, mContext, NS_BINDING_FAILED, nsnull);
}
nsresult
NextListenerEvent() {
PRUint32 available;
nsresult rv = mSyncStream->Available(&available);
if (NS_FAILED(rv)) return rv;
available -= mAvailable;
available = PR_MIN(available, mRemaining);
if (available) {
PRUint32 size = PR_MIN(available, MEM_CACHE_SEGMENT_SIZE);
rv = mStreamListener->OnDataAvailable(mChannel, mContext, this,
mDataAvailCursor, size);
mDataAvailCursor += size;
mRemaining -= size;
mAvailable += size;
return rv;
} else {
rv = mStreamListener->OnStopRequest(mChannel, mContext, NS_OK, nsnull);
AsyncReadStreamAdaptor* thisAlias = this;
NS_RELEASE(thisAlias);
return rv;
}
}
private:
nsCOMPtr<nsISupports> mContext; // Opaque context passed to AsyncRead()
nsCOMPtr<nsIStreamListener> mStreamListener; // Stream listener that has been proxied
nsCOMPtr<nsIInputStream> mSyncStream; // Underlying synchronous stream that is
// being converted to an async stream
PRUint32 mDataAvailCursor;
PRUint32 mRemaining; // Size of AsyncRead request less bytes for
// consumer OnDataAvailable's that were fired
PRUint32 mAvailable; // Number of bytes for which OnDataAvailable fired
nsMemCacheChannel* mChannel; // Associated memory cache channel, strong link
// but can not use nsCOMPtr
PRBool mAborted; // Abort() has been called
PRBool mSuspended; // Suspend() has been called
};
NS_IMPL_ISUPPORTS(AsyncReadStreamAdaptor, NS_GET_IID(nsIInputStream))
// The only purpose of this output stream wrapper is to adjust the cache's
// overall occupancy as new data flows into the cache entry.
class MemCacheWriteStreamWrapper : public nsIOutputStream {
public:
MemCacheWriteStreamWrapper(nsMemCacheChannel* aChannel, nsIOutputStream *aBaseStream):
mBaseStream(aBaseStream), mChannel(aChannel)
{
NS_INIT_REFCNT();
NS_ADDREF(mChannel);
}
virtual ~MemCacheWriteStreamWrapper() { NS_RELEASE(mChannel); };
static nsresult
Create(nsMemCacheChannel* aChannel, nsIOutputStream *aBaseStream, nsIOutputStream* *aWrapper) {
MemCacheWriteStreamWrapper *wrapper =
new MemCacheWriteStreamWrapper(aChannel, aBaseStream);
if (!wrapper) return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(wrapper);
*aWrapper = wrapper;
return NS_OK;
}
NS_DECL_ISUPPORTS
NS_IMETHOD
Write(const char *aBuffer, PRUint32 aCount, PRUint32 *aNumWritten) {
*aNumWritten = 0;
nsresult rv = mBaseStream->Write(aBuffer, aCount, aNumWritten);
mChannel->NotifyStorageInUse(*aNumWritten);
return rv;
}
NS_IMETHOD
Flush() { return mBaseStream->Flush(); }
NS_IMETHOD
Close() { return mBaseStream->Close(); }
private:
nsCOMPtr<nsIOutputStream> mBaseStream;
nsMemCacheChannel* mChannel;
};
NS_IMPL_ISUPPORTS(MemCacheWriteStreamWrapper, NS_GET_IID(nsIOutputStream))
nsMemCacheChannel::nsMemCacheChannel(nsMemCacheRecord *aRecord, nsILoadGroup *aLoadGroup)
: mRecord(aRecord)
{
NS_INIT_REFCNT();
mRecord->mNumChannels++;
}
nsMemCacheChannel::~nsMemCacheChannel()
{
mRecord->mNumChannels--;
}
NS_IMETHODIMP
nsMemCacheChannel::IsPending(PRBool* aIsPending)
{
*aIsPending = PR_FALSE;
if (!mAsyncReadStream)
return NS_OK;
return mAsyncReadStream->IsPending(aIsPending);
}
NS_IMETHODIMP
nsMemCacheChannel::Cancel(void)
{
if (!mAsyncReadStream)
return NS_ERROR_FAILURE;
return mAsyncReadStream->Cancel();
}
NS_IMETHODIMP
nsMemCacheChannel::Suspend(void)
{
if (!mAsyncReadStream)
return NS_ERROR_FAILURE;
return mAsyncReadStream->Suspend();
}
NS_IMETHODIMP
nsMemCacheChannel::Resume(void)
{
if (!mAsyncReadStream)
return NS_ERROR_FAILURE;
return mAsyncReadStream->Resume();
}
NS_IMETHODIMP
nsMemCacheChannel::GetOriginalURI(nsIURI * *aURI)
{
// Not required
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsMemCacheChannel::GetURI(nsIURI * *aURI)
{
// Not required to be implemented, since it is implemented by cache manager
NS_ASSERTION(0, "nsMemCacheChannel method unexpectedly called");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsMemCacheChannel::OpenInputStream(PRUint32 aStartPosition, PRInt32 aReadCount,
nsIInputStream* *aResult)
{
nsresult rv;
NS_ENSURE_ARG(aResult);
if (mInputStream)
return NS_ERROR_NOT_AVAILABLE;
rv = mRecord->mStorageStream->NewInputStream(aStartPosition, getter_AddRefs(mInputStream));
*aResult = mInputStream;
NS_ADDREF(*aResult);
return rv;
}
NS_IMETHODIMP
nsMemCacheChannel::OpenOutputStream(PRUint32 startPosition, nsIOutputStream* *aResult)
{
nsresult rv;
NS_ENSURE_ARG(aResult);
nsCOMPtr<nsIOutputStream> outputStream;
PRUint32 oldLength;
mRecord->mStorageStream->GetLength(&oldLength);
rv = mRecord->mStorageStream->GetOutputStream(startPosition, getter_AddRefs(outputStream));
if (NS_FAILED(rv)) return rv;
if (startPosition < oldLength)
NotifyStorageInUse(startPosition - oldLength);
return MemCacheWriteStreamWrapper::Create(this, outputStream, aResult);
}
NS_IMETHODIMP
nsMemCacheChannel::AsyncOpen(nsIStreamObserver *observer, nsISupports *ctxt)
{
// Not required
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsMemCacheChannel::AsyncRead(PRUint32 aStartPosition, PRInt32 aReadCount,
nsISupports *aContext, nsIStreamListener *aListener)
{
nsCOMPtr<nsIInputStream> inputStream;
nsresult rv = OpenInputStream(aStartPosition, aReadCount, getter_AddRefs(inputStream));
if (NS_FAILED(rv)) return rv;
AsyncReadStreamAdaptor *asyncReadStreamAdaptor;
asyncReadStreamAdaptor = new AsyncReadStreamAdaptor(this, inputStream);
if (!asyncReadStreamAdaptor)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(asyncReadStreamAdaptor);
mAsyncReadStream = asyncReadStreamAdaptor;
rv = asyncReadStreamAdaptor->AsyncRead(aStartPosition, aReadCount, aContext, aListener);
if (NS_FAILED(rv))
delete asyncReadStreamAdaptor;
return rv;
}
NS_IMETHODIMP
nsMemCacheChannel::AsyncWrite(nsIInputStream *fromStream, PRUint32 startPosition,
PRInt32 writeCount, nsISupports *ctxt,
nsIStreamObserver *observer)
{
// Not required to be implemented
NS_ASSERTION(0, "nsMemCacheChannel method unexpectedly called");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsMemCacheChannel::GetLoadAttributes(nsLoadFlags *aLoadAttributes)
{
// Not required to be implemented, since it is implemented by cache manager
NS_ASSERTION(0, "nsMemCacheChannel method unexpectedly called");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsMemCacheChannel::SetLoadAttributes(nsLoadFlags aLoadAttributes)
{
// Not required to be implemented, since it is implemented by cache manager
NS_ASSERTION(0, "nsMemCacheChannel method unexpectedly called");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsMemCacheChannel::GetContentType(char* *aContentType)
{
// Not required to be implemented, since it is implemented by cache manager
NS_ASSERTION(0, "nsMemCacheChannel method unexpectedly called");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsMemCacheChannel::GetContentLength(PRInt32 *aContentLength)
{
// Not required to be implemented, since it is implemented by cache manager
NS_ASSERTION(0, "nsMemCacheChannel method unexpectedly called");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsMemCacheChannel::GetOwner(nsISupports* *aOwner)
{
*aOwner = mOwner.get();
NS_IF_ADDREF(*aOwner);
return NS_OK;
}
NS_IMETHODIMP
nsMemCacheChannel::SetOwner(nsISupports* aOwner)
{
// Not required to be implemented, since it is implemented by cache manager
mOwner = aOwner;
return NS_OK;
}
NS_IMETHODIMP
nsMemCacheChannel::GetLoadGroup(nsILoadGroup* *aLoadGroup)
{
// Not required to be implemented, since it is implemented by cache manager
NS_ASSERTION(0, "nsMemCacheChannel method unexpectedly called");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsMemCacheChannel::SetLoadGroup(nsILoadGroup* aLoadGroup)
{
// Not required to be implemented, since it is implemented by cache manager
NS_ASSERTION(0, "nsMemCacheChannel method unexpectedly called");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsMemCacheChannel::GetNotificationCallbacks(nsIInterfaceRequestor* *aNotificationCallbacks)
{
// Not required to be implemented, since it is implemented by cache manager
NS_ASSERTION(0, "nsMemCacheChannel method unexpectedly called");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsMemCacheChannel::SetNotificationCallbacks(nsIInterfaceRequestor* aNotificationCallbacks)
{
// Not required to be implemented, since it is implemented by cache manager
NS_ASSERTION(0, "nsMemCacheChannel method unexpectedly called");
return NS_ERROR_NOT_IMPLEMENTED;
}

View File

@@ -1,61 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* 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.
*
*/
#ifndef _nsMemCacheChannel_h_
#define _nsMemCacheChannel_h_
#include "nsMemCacheRecord.h"
#include "nsIChannel.h"
#include "nsIInputStream.h"
#include "nsCOMPtr.h"
class AsyncReadStreamAdaptor;
class nsMemCacheChannel : public nsIChannel
{
public:
// Constructors and Destructor
nsMemCacheChannel(nsMemCacheRecord *aRecord, nsILoadGroup *aLoadGroup);
virtual ~nsMemCacheChannel();
// Declare nsISupports methods
NS_DECL_ISUPPORTS
// Declare nsIRequest methods
NS_DECL_NSIREQUEST
// Declare nsIChannel methods
NS_DECL_NSICHANNEL
protected:
void NotifyStorageInUse(PRInt32 aBytesUsed);
nsCOMPtr<nsMemCacheRecord> mRecord;
nsCOMPtr<nsIInputStream> mInputStream;
nsCOMPtr<nsISupports> mOwner;
AsyncReadStreamAdaptor* mAsyncReadStream; // non-owning pointer
friend class MemCacheWriteStreamWrapper;
friend class AsyncReadStreamAdaptor;
};
#endif // _nsMemCacheChannel_h_

View File

@@ -1,164 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* 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.
*
*/
#include "nsMemCache.h"
#include "nsMemCacheRecord.h"
#include "nsMemCacheChannel.h"
#include "nsIAllocator.h"
#include "nsStorageStream.h"
static NS_DEFINE_IID(kINetDataCacheRecord, NS_INETDATACACHERECORD_IID);
nsMemCacheRecord::nsMemCacheRecord()
: mKey(0), mKeyLength(0), mMetaData(0), mMetaDataLength(0), mNumChannels(0)
{
NS_INIT_REFCNT();
}
nsMemCacheRecord::~nsMemCacheRecord()
{
if (mMetaData)
delete[] mMetaData;
if (mKey)
delete[] mKey;
}
NS_IMPL_ISUPPORTS(nsMemCacheRecord, NS_GET_IID(nsINetDataCacheRecord))
NS_IMETHODIMP
nsMemCacheRecord::GetKey(PRUint32 *aLength, char **aResult)
{
NS_ENSURE_ARG(aResult);
*aResult = (char *)nsAllocator::Alloc(mKeyLength);
if (!*aResult)
return NS_ERROR_OUT_OF_MEMORY;
memcpy(*aResult, mKey, mKeyLength);
*aLength = mKeyLength;
return NS_OK;
}
nsresult
nsMemCacheRecord::Init(const char *aKey, PRUint32 aKeyLength,
PRUint32 aRecordID, nsMemCache *aCache)
{
nsresult rv;
NS_ASSERTION(!mKey, "Memory cache record key set multiple times");
rv = NS_NewStorageStream(MEM_CACHE_SEGMENT_SIZE, MEM_CACHE_MAX_ENTRY_SIZE,
getter_AddRefs(mStorageStream));
if (NS_FAILED(rv)) return rv;
mKey = new char[aKeyLength];
if (!mKey)
return NS_ERROR_OUT_OF_MEMORY;
memcpy(mKey, aKey, aKeyLength);
mKeyLength = aKeyLength;
mRecordID = aRecordID;
mCache = aCache;
return NS_OK;
}
NS_IMETHODIMP
nsMemCacheRecord::GetRecordID(PRInt32 *aRecordID)
{
NS_ENSURE_ARG(aRecordID);
*aRecordID = mRecordID;
return NS_OK;
}
NS_IMETHODIMP
nsMemCacheRecord::GetMetaData(PRUint32 *aLength, char **aResult)
{
NS_ENSURE_ARG(aResult);
*aResult = 0;
if (mMetaDataLength) {
*aResult = (char*)nsAllocator::Alloc(mMetaDataLength);
if (!*aResult)
return NS_ERROR_OUT_OF_MEMORY;
memcpy(*aResult, mMetaData, mMetaDataLength);
}
*aLength = mMetaDataLength;
return NS_OK;
}
NS_IMETHODIMP
nsMemCacheRecord::SetMetaData(PRUint32 aLength, const char *aData)
{
if (mMetaData)
delete[] mMetaData;
mMetaData = new char[aLength];
if (!mMetaData)
return NS_ERROR_OUT_OF_MEMORY;
memcpy(mMetaData, aData, aLength);
mMetaDataLength = aLength;
return NS_OK;
}
NS_IMETHODIMP
nsMemCacheRecord::GetStoredContentLength(PRUint32 *aStoredContentLength)
{
NS_ENSURE_ARG(aStoredContentLength);
return mStorageStream->GetLength(aStoredContentLength);
}
NS_IMETHODIMP
nsMemCacheRecord::SetStoredContentLength(PRUint32 aStoredContentLength)
{
PRUint32 before, after;
mStorageStream->GetLength(&before);
nsresult rv = mStorageStream->SetLength(aStoredContentLength);
if (NS_FAILED(rv)) return rv;
mStorageStream->GetLength(&after);
mCache->mOccupancy -= (before - after);
return NS_OK;
}
NS_IMETHODIMP
nsMemCacheRecord::Delete(void)
{
if (mNumChannels)
return NS_ERROR_NOT_AVAILABLE;
return mCache->Delete(this);
}
NS_IMETHODIMP
nsMemCacheRecord::GetFilename(nsIFileSpec* *aFilename)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsMemCacheRecord::NewChannel(nsILoadGroup *aLoadGroup, nsIChannel* *aResult)
{
NS_ENSURE_ARG(aResult);
nsMemCacheChannel* channel = new nsMemCacheChannel(this, aLoadGroup);
if (!channel)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(channel);
*aResult = NS_STATIC_CAST(nsIChannel*, channel);
return NS_OK;
}

View File

@@ -1,65 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* 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.
*
*/
#ifndef _nsMemCacheRecord_h_
#define _nsMemCacheRecord_h_
#include "nsINetDataCacheRecord.h"
#include "nsIStorageStream.h"
#include "nsCOMPtr.h"
class nsMemCache;
class nsMemCacheRecord : public nsINetDataCacheRecord
{
public:
// Declare interface methods
NS_DECL_ISUPPORTS
NS_DECL_NSINETDATACACHERECORD
protected:
// Constructors and Destructor
nsMemCacheRecord();
virtual ~nsMemCacheRecord();
nsresult Init(const char *aKey, PRUint32 aKeyLength,
PRUint32 aRecordID, nsMemCache *aCache);
char* mKey; // opaque database key for this record
PRUint32 mKeyLength; // length, in bytes, of mKey
PRInt32 mRecordID; // An alternate key for this record
char* mMetaData; // opaque URI metadata
PRUint32 mMetaDataLength; // length, in bytes, of mMetaData
nsMemCache* mCache; // weak pointer to the cache database
// that this record inhabits
nsCOMPtr<nsIStorageStream> mStorageStream;
PRUint32 mNumChannels; // Count un-Release'ed nsIChannels
friend class nsMemCache;
friend class nsMemCacheChannel;
};
#endif // _nsMemCacheRecord_h_

View File

@@ -1,55 +0,0 @@
#
# 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 mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = nkcache
LIBRARY_NAME = nkcachemgr_s
REQUIRES = nspr
EXPORTS = \
nsCacheManager.h \
$(NULL)
CPPSRCS = \
nsCacheManager.cpp \
nsCachedNetData.cpp \
nsReplacementPolicy.cpp \
nsCacheEntryChannel.cpp \
$(NULL)
LOCAL_INCLUDES = -I$(srcdir)/../public -I$(srcdir)/../include
EXTRA_LIBS = $(NSPR_LIBS)
# we don't want the shared lib, but we want to force the creation of a
# static lib.
override NO_SHARED_LIB=1
override NO_STATIC_LIB=
include $(topsrcdir)/config/rules.mk

View File

@@ -1,45 +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 or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..\..
include <$(DEPTH)/config/config.mak>
MODULE = nkcache
LIBRARY_NAME = nkcachemgr_s
CPP_OBJS = \
.\$(OBJDIR)\nsCacheManager.obj \
.\$(OBJDIR)\nsCachedNetData.obj \
.\$(OBJDIR)\nsReplacementPolicy.obj \
.\$(OBJDIR)\nsCacheEntryChannel.obj \
$(NULL)
include <$(DEPTH)\config\rules.mak>
install:: $(LIBRARY)
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
clobber::
rm -rf $(OBJDIR)
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib

View File

@@ -1,261 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 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):
* Scott Furman, fur@netscape.com
*/
#include "nsCacheManager.h"
#include "nsCacheEntryChannel.h"
#include "nsIOutputStream.h"
#include "nsIIOService.h"
#include "nsIServiceManager.h"
#include "nsIStreamListener.h"
nsCacheEntryChannel::nsCacheEntryChannel(nsCachedNetData* aCacheEntry, nsIChannel* aChannel,
nsILoadGroup* aLoadGroup):
nsChannelProxy(aChannel), mCacheEntry(aCacheEntry), mLoadGroup(aLoadGroup), mLoadAttributes(0)
{
NS_ASSERTION(aCacheEntry->mChannelCount < 0xFF, "Overflowed channel counter");
mCacheEntry->mChannelCount++;
NS_INIT_REFCNT();
}
nsCacheEntryChannel::~nsCacheEntryChannel()
{
mCacheEntry->mChannelCount--;
}
NS_IMPL_ISUPPORTS3(nsCacheEntryChannel, nsISupports, nsIChannel, nsIRequest)
// A proxy for nsIOutputStream
class CacheOutputStream : public nsIOutputStream {
public:
CacheOutputStream(nsIOutputStream *aOutputStream, nsCachedNetData *aCacheEntry):
mOutputStream(aOutputStream), mCacheEntry(aCacheEntry), mStartTime(PR_Now())
{ NS_INIT_REFCNT(); }
virtual ~CacheOutputStream() {
mCacheEntry->NoteDownloadTime(mStartTime, PR_Now());
mCacheEntry->ClearFlag(nsCachedNetData::UPDATE_IN_PROGRESS);
}
NS_DECL_ISUPPORTS
NS_IMETHOD Close() {
return mOutputStream->Close();
}
NS_IMETHOD Flush() { return mOutputStream->Flush(); }
NS_IMETHOD
Write(const char *aBuf, PRUint32 aCount, PRUint32 *aActualBytes) {
nsresult rv;
*aActualBytes = 0;
rv = mOutputStream->Write(aBuf, aCount, aActualBytes);
mCacheEntry->mLogicalLength += *aActualBytes;
if (NS_FAILED(rv)) return rv;
nsCacheManager::LimitCacheSize();
return rv;
}
protected:
nsCOMPtr<nsIOutputStream> mOutputStream;
nsCOMPtr<nsCachedNetData> mCacheEntry;
// Time at which stream was opened
PRTime mStartTime;
};
NS_IMPL_ISUPPORTS(CacheOutputStream, NS_GET_IID(nsIOutputStream))
NS_IMETHODIMP
nsCacheEntryChannel::OpenOutputStream(PRUint32 aStartPosition, nsIOutputStream* *aOutputStream)
{
nsresult rv;
nsCOMPtr<nsIOutputStream> baseOutputStream;
rv = mChannel->OpenOutputStream(aStartPosition, getter_AddRefs(baseOutputStream));
if (NS_FAILED(rv)) return rv;
mCacheEntry->NoteUpdate();
mCacheEntry->NoteAccess();
mCacheEntry->mLogicalLength = aStartPosition;
*aOutputStream = new CacheOutputStream(baseOutputStream, mCacheEntry);
if (!*aOutputStream)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*aOutputStream);
return NS_OK;
}
NS_IMETHODIMP
nsCacheEntryChannel::OpenInputStream(PRUint32 aStartPosition, PRInt32 aReadCount,
nsIInputStream* *aInputStream)
{
mCacheEntry->NoteAccess();
return mChannel->OpenInputStream(aStartPosition, aReadCount, aInputStream);
}
class CacheManagerStreamListener: public nsIStreamListener {
public:
CacheManagerStreamListener(nsIStreamListener *aListener,
nsILoadGroup *aLoadGroup, nsIChannel *aChannel):
mListener(aListener), mLoadGroup(aLoadGroup), mChannel(aChannel)
{ NS_INIT_REFCNT(); }
virtual ~CacheManagerStreamListener() {}
private:
NS_DECL_ISUPPORTS
NS_IMETHOD
OnDataAvailable(nsIChannel *channel, nsISupports *aContext,
nsIInputStream *inStr, PRUint32 sourceOffset, PRUint32 count) {
return mListener->OnDataAvailable(mChannel, aContext, inStr, sourceOffset, count);
}
NS_IMETHOD
OnStartRequest(nsIChannel *channel, nsISupports *aContext) {
if (mLoadGroup)
mLoadGroup->AddChannel(mChannel, aContext);
return mListener->OnStartRequest(mChannel, aContext);
}
NS_IMETHOD
OnStopRequest(nsIChannel *channel, nsISupports *aContext,
nsresult status, const PRUnichar *errorMsg) {
nsresult rv;
rv = mListener->OnStopRequest(mChannel, aContext, status, errorMsg);
if (mLoadGroup)
mLoadGroup->RemoveChannel(mChannel, aContext, status, errorMsg);
return rv;
}
private:
nsCOMPtr<nsIStreamListener> mListener;
nsCOMPtr<nsILoadGroup> mLoadGroup;
nsCOMPtr<nsIChannel> mChannel;
};
NS_IMPL_ISUPPORTS2(CacheManagerStreamListener, nsIStreamListener, nsIStreamObserver)
NS_IMETHODIMP
nsCacheEntryChannel::AsyncRead(PRUint32 aStartPosition, PRInt32 aReadCount,
nsISupports *aContext, nsIStreamListener *aListener)
{
nsresult rv;
mCacheEntry->NoteAccess();
nsCOMPtr<nsIStreamListener> headListener;
if (mLoadGroup) {
mLoadGroup->GetDefaultLoadAttributes(&mLoadAttributes);
// Create a load group "proxy" listener...
nsCOMPtr<nsILoadGroupListenerFactory> factory;
rv = mLoadGroup->GetGroupListenerFactory(getter_AddRefs(factory));
if (NS_SUCCEEDED(rv) && factory) {
rv = factory->CreateLoadGroupListener(aListener,
getter_AddRefs(headListener));
if (NS_FAILED(rv)) return rv;
}
} else {
headListener = aListener;
}
CacheManagerStreamListener* cacheManagerStreamListener;
nsIChannel *channelForListener;
channelForListener = mProxyChannel ? mProxyChannel.get() : NS_STATIC_CAST(nsIChannel*, this);
cacheManagerStreamListener =
new CacheManagerStreamListener(headListener, mLoadGroup, channelForListener);
if (!cacheManagerStreamListener) return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(cacheManagerStreamListener);
rv = mChannel->AsyncRead(aStartPosition, aReadCount, aContext,
cacheManagerStreamListener);
NS_RELEASE(cacheManagerStreamListener);
return rv;
}
// No async writes allowed to the cache yet
NS_IMETHODIMP
nsCacheEntryChannel::AsyncWrite(nsIInputStream *aFromStream, PRUint32 aStartPosition,
PRInt32 aWriteCount, nsISupports *aContext,
nsIStreamObserver *aObserver)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsCacheEntryChannel::GetLoadGroup(nsILoadGroup* *aLoadGroup)
{
*aLoadGroup = mLoadGroup;
return NS_OK;
}
NS_IMETHODIMP
nsCacheEntryChannel::GetLoadAttributes(nsLoadFlags *aLoadAttributes)
{
*aLoadAttributes = mLoadAttributes;
return NS_OK;
}
NS_IMETHODIMP
nsCacheEntryChannel::SetLoadAttributes(nsLoadFlags aLoadAttributes)
{
mLoadAttributes = aLoadAttributes;
return NS_OK;
}
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
NS_IMETHODIMP
nsCacheEntryChannel::GetURI(nsIURI * *aURI)
{
char* spec;
nsresult rv;
rv = mCacheEntry->GetUriSpec(&spec);
if (NS_FAILED(rv)) return rv;
NS_WITH_SERVICE(nsIIOService, serv, kIOServiceCID, &rv);
if (NS_FAILED(rv)) return rv;
rv = serv->NewURI(spec, 0, aURI);
nsAllocator::Free(spec);
return rv;
}
NS_IMETHODIMP
nsCacheEntryChannel::GetOriginalURI(nsIURI * *aURI)
{
// FIXME - should return original URI passed into NewChannel() ?
return NS_ERROR_NOT_IMPLEMENTED;
}

View File

@@ -1,82 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* 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):
* Scott Furman, fur@netscape.com
*/
#ifndef _nsCacheEntryChannel_h_
#define _nsCacheEntryChannel_h_
#include "nsCOMPtr.h"
#include "nsIChannel.h"
#include "nsCachedNetData.h"
#include "nsILoadGroup.h"
class nsIStreamListener;
// A proxy for an nsIChannel, useful when only a few nsIChannel
// methods must be overridden
class nsChannelProxy : public nsIChannel {
public:
NS_FORWARD_NSICHANNEL(mChannel->)
NS_FORWARD_NSIREQUEST(mChannel->)
protected:
nsChannelProxy(nsIChannel* aChannel):mChannel(aChannel) {};
virtual ~nsChannelProxy() {};
nsCOMPtr<nsIChannel> mChannel;
};
// Override several nsIChannel methods so that they interact with the cache manager
class nsCacheEntryChannel : public nsChannelProxy {
public:
NS_DECL_ISUPPORTS
NS_IMETHOD OpenOutputStream(PRUint32 aStartPosition, nsIOutputStream* *aOutputStream);
NS_IMETHOD OpenInputStream(PRUint32 aStartPosition, PRInt32 aReadCount,
nsIInputStream* *aInputStream);
NS_IMETHOD AsyncRead(PRUint32 aStartPosition, PRInt32 aReadCount,
nsISupports *aContext, nsIStreamListener *aListener);
NS_IMETHOD AsyncWrite(nsIInputStream *aFromStream, PRUint32 aStartPosition,
PRInt32 aWriteCount, nsISupports *aContext,
nsIStreamObserver *aObserver);
NS_IMETHOD GetLoadAttributes(nsLoadFlags *aLoadAttributes);
NS_IMETHOD SetLoadAttributes(nsLoadFlags aLoadAttributes);
NS_IMETHOD GetLoadGroup(nsILoadGroup* *aLoadGroup);
NS_IMETHOD GetURI(nsIURI * *aURI);
NS_IMETHOD GetOriginalURI(nsIURI * *aURI);
protected:
nsCacheEntryChannel(nsCachedNetData* aCacheEntry, nsIChannel* aChannel, nsILoadGroup* aLoadGroup);
virtual ~nsCacheEntryChannel();
friend class nsCachedNetData;
private:
nsCOMPtr<nsCachedNetData> mCacheEntry;
nsCOMPtr<nsILoadGroup> mLoadGroup;
nsCOMPtr<nsIChannel> mProxyChannel;
nsLoadFlags mLoadAttributes;
};
#endif // _nsCacheEntryChannel_h_

View File

@@ -1,497 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* 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):
* Scott Furman, fur@netscape.com
*/
#include "nsINetDataCache.h"
#include "nsCacheManager.h"
#include "nsCachedNetData.h"
#include "nsReplacementPolicy.h"
#include "nsString.h"
#include "nsIURI.h"
#include "nsHashtable.h"
#include "nsIComponentManager.h"
#include "nsINetDataDiskCache.h"
// Limit the number of entries in the cache to conserve memory space
// in the nsReplacementPolicy code
#define MAX_MEM_CACHE_ENTRIES 800
#define MAX_DISK_CACHE_ENTRIES 3200
// Cache capacities in MB, overridable via APIs
#define DEFAULT_MEMORY_CACHE_CAPACITY 1024
#define DEFAULT_DISK_CACHE_CAPACITY 10000
#define CACHE_HIGH_WATER_MARK(capacity) ((PRUint32)(0.98 * (capacity)))
#define CACHE_LOW_WATER_MARK(capacity) ((PRUint32)(0.97 * (capacity)))
nsCacheManager* gCacheManager = 0;
NS_IMPL_ISUPPORTS(nsCacheManager, NS_GET_IID(nsINetDataCacheManager))
nsCacheManager::nsCacheManager()
: mActiveCacheRecords(0),
mDiskCacheCapacity(DEFAULT_DISK_CACHE_CAPACITY),
mMemCacheCapacity(DEFAULT_MEMORY_CACHE_CAPACITY)
{
NS_ASSERTION(!gCacheManager, "Multiple cache managers created");
gCacheManager = this;
NS_INIT_REFCNT();
}
nsCacheManager::~nsCacheManager()
{
gCacheManager = 0;
delete mActiveCacheRecords;
delete mMemSpaceManager;
delete mDiskSpaceManager;
}
nsresult
nsCacheManager::Init()
{
nsresult rv;
mActiveCacheRecords = new nsHashtable(64);
if (!mActiveCacheRecords)
return NS_ERROR_OUT_OF_MEMORY;
// Instantiate the memory cache component
rv = nsComponentManager::CreateInstance(NS_NETWORK_MEMORY_CACHE_PROGID,
nsnull,
NS_GET_IID(nsINetDataCache),
getter_AddRefs(mMemCache));
if (NS_FAILED(rv))
return rv;
rv = nsComponentManager::CreateInstance(NS_NETWORK_FLAT_CACHE_PROGID,
nsnull,
NS_GET_IID(nsINetDataCache),
getter_AddRefs(mFlatCache));
if (NS_FAILED(rv)) {
// For now, we don't require a flat cache module to be present
if (rv != NS_ERROR_FACTORY_NOT_REGISTERED)
return rv;
}
#ifdef FILE_CACHE_IS_READY
// Instantiate the file cache component
rv = nsComponentManager::CreateInstance(NS_NETWORK_FILE_CACHE_PROGID,
nsnull,
NS_GET_IID(nsINetDataCache),
getter_AddRefs(mFileCache));
if (NS_FAILED(rv)) {
NS_WARNING("No disk cache present");
}
#endif
// Set up linked list of caches in search order
mCacheSearchChain = mMemCache;
if (mFlatCache) {
mMemCache->SetNextCache(mFlatCache);
mFlatCache->SetNextCache(mFileCache);
} else {
mMemCache->SetNextCache(mFileCache);
}
// TODO - Load any extension caches here
// Initialize replacement policy for memory cache module
mMemSpaceManager = new nsReplacementPolicy;
if (!mMemSpaceManager)
return NS_ERROR_OUT_OF_MEMORY;
rv = mMemSpaceManager->Init(MAX_MEM_CACHE_ENTRIES);
if (NS_FAILED(rv)) return rv;
rv = mMemSpaceManager->AddCache(mMemCache);
// Initialize replacement policy for disk cache modules (file
// cache and flat cache)
mDiskSpaceManager = new nsReplacementPolicy;
if (!mDiskSpaceManager)
return NS_ERROR_OUT_OF_MEMORY;
rv = mDiskSpaceManager->Init(MAX_DISK_CACHE_ENTRIES);
if (NS_FAILED(rv)) return rv;
if (mFileCache) {
rv = mDiskSpaceManager->AddCache(mFileCache);
if (NS_FAILED(rv)) return rv;
}
if (mFlatCache) {
rv = mDiskSpaceManager->AddCache(mFlatCache);
if (NS_FAILED(rv)) return rv;
}
return NS_OK;
}
NS_IMETHODIMP
nsCacheManager::GetCachedNetData(const char *aUriSpec, const char *aSecondaryKey,
PRUint32 aSecondaryKeyLength,
PRUint32 aFlags, nsICachedNetData* *aResult)
{
nsCachedNetData *cachedData;
nsresult rv;
nsINetDataCache *cache;
nsReplacementPolicy *spaceManager;
if (aFlags & CACHE_AS_FILE) {
cache = mFileCache;
spaceManager = mDiskSpaceManager;
// Ensure that cache is initialized
if (mDiskCacheCapacity == (PRUint32)-1)
return NS_ERROR_NOT_AVAILABLE;
} else if ((aFlags & BYPASS_PERSISTENT_CACHE) ||
(!mFileCache && !mFlatCache) || !mDiskCacheCapacity) {
cache = mMemCache;
spaceManager = mMemSpaceManager;
} else {
cache = mFlatCache ? mFlatCache : mFileCache;
spaceManager = mDiskSpaceManager;
}
// Construct the cache key by appending the secondary key to the URI spec
nsCAutoString cacheKey(aUriSpec);
// Insert NUL at end of URI spec
cacheKey += '\0';
if (aSecondaryKey)
cacheKey.Append(aSecondaryKey, aSecondaryKeyLength);
nsStringKey key(cacheKey);
cachedData = (nsCachedNetData*)mActiveCacheRecords->Get(&key);
// There is no existing instance of nsCachedNetData for this URL.
// Make one from the corresponding record in the cache module.
if (cachedData) {
NS_ASSERTION(cache == cachedData->mCache,
"Cannot yet handle simultaneously active requests for the "
"same URL using different caches");
NS_ADDREF(cachedData);
} else {
rv = spaceManager->GetCachedNetData(cacheKey.GetBuffer(), cacheKey.Length(),
cache, &cachedData);
if (NS_FAILED(rv)) return rv;
mActiveCacheRecords->Put(&key, cachedData);
}
*aResult = cachedData;
return NS_OK;
}
// Remove this cache entry from the list of active ones
nsresult
nsCacheManager::NoteDormant(nsCachedNetData* aEntry)
{
nsresult rv;
PRUint32 keyLength;
char* key;
nsCOMPtr<nsINetDataCacheRecord> record;
nsCachedNetData* deletedEntry;
rv = aEntry->GetRecord(getter_AddRefs(record));
if (NS_FAILED(rv)) return rv;
rv = record->GetKey(&keyLength, &key);
if (NS_FAILED(rv)) return rv;
nsStringKey hashTableKey(nsCString(key, keyLength));
deletedEntry = (nsCachedNetData*)gCacheManager->mActiveCacheRecords->Remove(&hashTableKey);
// NS_ASSERTION(deletedEntry == aEntry, "Hash table inconsistency");
return NS_OK;
}
NS_IMETHODIMP
nsCacheManager::Contains(const char *aUriSpec, const char *aSecondaryKey,
PRUint32 aSecondaryKeyLength,
PRUint32 aFlags, PRBool *aResult)
{
nsINetDataCache *cache;
nsReplacementPolicy *spaceManager;
nsCachedNetData *cachedData;
if (aFlags & CACHE_AS_FILE) {
cache = mFileCache;
spaceManager = mDiskSpaceManager;
} else if ((aFlags & BYPASS_PERSISTENT_CACHE) ||
(!mFileCache && !mFlatCache) || !mDiskCacheCapacity) {
cache = mMemCache;
spaceManager = mMemSpaceManager;
} else {
cache = mFlatCache ? mFlatCache : mFileCache;
spaceManager = mDiskSpaceManager;
}
// Construct the cache key by appending the secondary key to the URI spec
nsCAutoString cacheKey(aUriSpec);
// Insert NUL between URI spec and secondary key
cacheKey += '\0';
cacheKey.Append(aSecondaryKey, aSecondaryKeyLength);
// Locate the record using (URI + secondary key)
nsStringKey key(cacheKey);
cachedData = (nsCachedNetData*)mActiveCacheRecords->Get(&key);
if (cachedData && (cache == cachedData->mCache)) {
*aResult = PR_TRUE;
return NS_OK;
} else {
// No active cache entry, see if there is a dormant one
return cache->Contains(cacheKey.GetBuffer(), cacheKey.Length(), aResult);
}
}
NS_IMETHODIMP
nsCacheManager::GetNumEntries(PRUint32 *aNumEntries)
{
nsresult rv;
nsCOMPtr<nsISimpleEnumerator> iterator;
nsCOMPtr<nsISupports> cacheSupports;
nsCOMPtr<nsINetDataCache> cache;
PRUint32 totalEntries = 0;
rv = NewCacheModuleIterator(getter_AddRefs(iterator));
if (NS_FAILED(rv)) return rv;
while (1) {
PRBool notDone;
rv = iterator->HasMoreElements(&notDone);
if (NS_FAILED(rv)) return rv;
if (!notDone)
break;
iterator->GetNext(getter_AddRefs(cacheSupports));
cache = do_QueryInterface(cacheSupports);
PRUint32 numEntries;
rv = cache->GetNumEntries(&numEntries);
if (NS_FAILED(rv)) return rv;
totalEntries += numEntries;
}
*aNumEntries = totalEntries;
return NS_OK;
}
NS_IMETHODIMP
nsCacheManager::NewCacheEntryIterator(nsISimpleEnumerator* *aResult)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
class CacheEnumerator : public nsISimpleEnumerator
{
public:
CacheEnumerator(nsINetDataCache* aFirstCache):mCache(aFirstCache)
{ NS_INIT_REFCNT(); }
virtual ~CacheEnumerator() {};
NS_DECL_ISUPPORTS
NS_IMETHODIMP
HasMoreElements(PRBool* aMoreElements) {
*aMoreElements = (mCache != 0);
return NS_OK;
}
NS_IMETHODIMP
GetNext(nsISupports* *aSupports) {
*aSupports = mCache;
if (!mCache)
return NS_ERROR_FAILURE;
NS_ADDREF(*aSupports);
nsCOMPtr<nsINetDataCache> nextCache;
nsresult rv = mCache->GetNextCache(getter_AddRefs(nextCache));
mCache = nextCache;
return rv;
}
private:
nsCOMPtr<nsINetDataCache> mCache;
};
NS_IMPL_ISUPPORTS(CacheEnumerator, NS_GET_IID(nsISimpleEnumerator))
NS_IMETHODIMP
nsCacheManager::NewCacheModuleIterator(nsISimpleEnumerator* *aResult)
{
*aResult = new CacheEnumerator(mCacheSearchChain);
if (!*aResult)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*aResult);
return NS_OK;
}
NS_IMETHODIMP
nsCacheManager::RemoveAll(void)
{
nsresult rv, result;
nsCOMPtr<nsISimpleEnumerator> iterator;
nsCOMPtr<nsINetDataCache> cache;
nsCOMPtr<nsISupports> iSupports;
result = NS_OK;
rv = NewCacheModuleIterator(getter_AddRefs(iterator));
if (NS_FAILED(rv)) return rv;
while (1) {
PRBool notDone;
rv = iterator->HasMoreElements(&notDone);
if (NS_FAILED(rv)) return rv;
if (!notDone)
break;
iterator->GetNext(getter_AddRefs(iSupports));
cache = do_QueryInterface(iSupports);
PRUint32 cacheFlags;
rv = cache->GetFlags(&cacheFlags);
if (NS_FAILED(rv)) return rv;
if ((cacheFlags & nsINetDataCache::READ_ONLY) == 0) {
rv = cache->RemoveAll();
if (NS_FAILED(rv))
result = rv;
}
}
return result;
}
nsresult
nsCacheManager::LimitMemCacheSize()
{
nsresult rv;
nsReplacementPolicy* spaceManager;
NS_ASSERTION(gCacheManager, "No cache manager");
spaceManager = gCacheManager->mMemSpaceManager;
PRUint32 occupancy;
rv = spaceManager->GetStorageInUse(&occupancy);
if (NS_FAILED(rv)) return rv;
PRUint32 memCacheCapacity = gCacheManager->mMemCacheCapacity;
if (occupancy > CACHE_HIGH_WATER_MARK(memCacheCapacity))
return spaceManager->Evict(CACHE_LOW_WATER_MARK(memCacheCapacity));
return NS_OK;
}
nsresult
nsCacheManager::LimitDiskCacheSize()
{
nsresult rv;
nsReplacementPolicy* spaceManager;
NS_ASSERTION(gCacheManager, "No cache manager");
spaceManager = gCacheManager->mDiskSpaceManager;
PRUint32 occupancy;
rv = spaceManager->GetStorageInUse(&occupancy);
if (NS_FAILED(rv)) return rv;
PRUint32 diskCacheCapacity = gCacheManager->mDiskCacheCapacity;
if (occupancy > CACHE_HIGH_WATER_MARK(diskCacheCapacity))
return spaceManager->Evict(CACHE_LOW_WATER_MARK(diskCacheCapacity));
return NS_OK;
}
nsresult
nsCacheManager::LimitCacheSize()
{
nsresult rv;
rv = LimitDiskCacheSize();
if (NS_FAILED(rv)) return rv;
rv = LimitMemCacheSize();
if (NS_FAILED(rv)) return rv;
return NS_OK;
}
NS_IMETHODIMP
nsCacheManager::SetMemCacheCapacity(PRUint32 aCapacity)
{
mMemCacheCapacity = aCapacity;
LimitCacheSize();
return NS_OK;
}
NS_IMETHODIMP
nsCacheManager::GetMemCacheCapacity(PRUint32* aCapacity)
{
NS_ENSURE_ARG_POINTER(aCapacity);
*aCapacity = mMemCacheCapacity;
return NS_OK;
}
NS_IMETHODIMP
nsCacheManager::SetDiskCacheCapacity(PRUint32 aCapacity)
{
mDiskCacheCapacity = aCapacity;
LimitCacheSize();
return NS_OK;
}
NS_IMETHODIMP
nsCacheManager::GetDiskCacheCapacity(PRUint32* aCapacity)
{
NS_ENSURE_ARG_POINTER(aCapacity);
*aCapacity = mDiskCacheCapacity;
return NS_OK;
}
NS_IMETHODIMP
nsCacheManager::SetDiskCacheFolder(nsIFileSpec* aFolder)
{
NS_ENSURE_ARG(aFolder);
if (!mFileCache)
return NS_ERROR_NOT_AVAILABLE;
nsCOMPtr<nsINetDataDiskCache> fileCache;
fileCache = do_QueryInterface(mFileCache);
return fileCache->SetDiskCacheFolder(aFolder);
}
NS_IMETHODIMP
nsCacheManager::GetDiskCacheFolder(nsIFileSpec* *aFolder)
{
NS_ENSURE_ARG(aFolder);
if (!mFileCache)
return NS_ERROR_NOT_AVAILABLE;
nsCOMPtr<nsINetDataDiskCache> fileCache;
fileCache = do_QueryInterface(mFileCache);
return fileCache->GetDiskCacheFolder(aFolder);
}

View File

@@ -1,100 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* 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):
* Scott Furman, fur@netscape.com
*/
#ifndef _nsCacheManager_h_
#define _nsCacheManager_h_
// 2030f0b0-9567-11d3-90d3-0040056a906e
#define NS_CACHE_MANAGER_CID \
{ \
0x2030f0b0, \
0x9567, \
0x11d3, \
{0x90, 0xd3, 0x00, 0x40, 0x05, 0x6a, 0x90, 0x6e} \
}
#include "nsINetDataCacheManager.h"
#include "nsINetDataCache.h"
#include "nsCOMPtr.h"
class nsHashtable;
class nsReplacementPolicy;
class nsCachedNetData;
class nsCacheManager : public nsINetDataCacheManager {
public:
nsCacheManager();
virtual ~nsCacheManager();
NS_METHOD Init();
// nsISupports methods
NS_DECL_ISUPPORTS
// nsINetDataCacheManager methods
NS_DECL_NSINETDATACACHEMANAGER
private:
// Mapping from cache key to nsCachedNetData, but only for those cache
// entries with external references, i.e. those referred to outside the
// cache manager
nsHashtable* mActiveCacheRecords;
// Memory cache
nsCOMPtr<nsINetDataCache> mMemCache;
// Flat-file database cache; All content aggregated into single disk file
nsCOMPtr<nsINetDataCache> mFlatCache;
// stream-as-file cache
nsCOMPtr<nsINetDataCache> mFileCache;
// Unified replacement policy for flat-cache and file-cache
nsReplacementPolicy* mDiskSpaceManager;
// Replacement policy for memory cache
nsReplacementPolicy* mMemSpaceManager;
// List of caches in search order
nsINetDataCache* mCacheSearchChain;
// Combined file/flat cache capacity, in KB
PRUint32 mDiskCacheCapacity;
// Memory cache capacity, in KB
PRUint32 mMemCacheCapacity;
protected:
static nsresult NoteDormant(nsCachedNetData* aEntry);
static nsresult LimitCacheSize();
static nsresult LimitMemCacheSize();
static nsresult LimitDiskCacheSize();
friend class nsCachedNetData;
friend class CacheOutputStream;
};
#endif // _nsCacheManager_h_

File diff suppressed because it is too large Load Diff

View File

@@ -1,242 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* 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):
* Scott Furman, fur@netscape.com
*/
#ifndef _nsCachedNetData_h_
#define _nsCachedNetData_h_
#include "nsICachedNetData.h"
#include "nsCOMPtr.h"
#include "nsINetDataCacheRecord.h"
class nsINetDataCache;
class nsIStreamAsFileObserver;
class nsIStreamAsFile;
class nsIArena;
class StreamAsFileObserverClosure;
class CacheMetaData;
// Number of recent access times recorded
#define MAX_K 3
/**
* FIXME - add comment. There are a lot of these data structures resident in
* memory, so be careful about adding members unnecessarily.
*/
class nsCachedNetData : public nsICachedNetData {
public:
NS_DECL_ISUPPORTS
// nsICachedNetData methods
NS_DECL_NSICACHEDNETDATA
NS_METHOD Init(nsINetDataCacheRecord *aRecord, nsINetDataCache *aCache);
protected:
// Bits for mFlags, below
typedef enum {
DIRTY = 1 << 0, // Cache entry data needs to be flushed to database
// ==== Flags that can be set by the protocol handler ====
ALLOW_PARTIAL = 1 << 1, // Protocol handler supports partial fetching
UPDATE_IN_PROGRESS = 1 << 2, // Protocol handler now modifying cache data
// ==== Cache-entry state flags. At most one of these flags can be set ====
TRUNCATED_CONTENT = 1 << 4, // Entry contains valid content, but it has
// been truncated by cache manager
// A previously-used cache entry, which has been purged of all cached
// content and protocol-private data. This cache entry can be refilled
// with new content or it may be retained in this vestigial state
// because the usage statistics it contains will be used by the
// replacement policy if the same URI is ever cached again.
VESTIGIAL = 1 << 5,
// ==== Memory usage status bits. At most one of these flags can be set ====
RECYCLED = 1 << 8, // Previously associated database record has
// been deleted; This cache entry is available
// for recycling.
DORMANT = 1 << 9, // No references to this cache entry, except by
// the cache manager itself
// ==== Setter bits ====
LAST_MODIFIED_KNOWN = 1 <<12, // Protocol handler called SetLastModifiedTime()
EXPIRATION_KNOWN = 1 <<13, // Protocol handler called SetExpirationTime()
STALE_TIME_KNOWN = 1 <<14, // Protocol handler called SetStaleTime()
// ==== Useful flag combinations ====
// Cache entry not eligible for eviction
UNEVICTABLE = VESTIGIAL | RECYCLED | UPDATE_IN_PROGRESS,
// State flags that are in-memory only, i.e. not persistent
TRANSIENT_FLAGS = DIRTY | RECYCLED | DORMANT
} Flag;
PRBool GetFlag(Flag aFlag) { return (mFlags & aFlag) != 0; }
nsresult GetFlag(PRBool *aResult, Flag aFlag) { *aResult = GetFlag(aFlag); return NS_OK; }
// Set a boolean flag for the cache entry
nsresult SetFlag(PRBool aValue, Flag aFlag);
nsresult SetFlag(Flag aFlag) { return SetFlag(PR_TRUE, aFlag); }
nsresult ClearFlag(Flag aFlag) { return SetFlag(PR_FALSE, aFlag); }
void ComputeProfit(PRUint32 aCurrentTime);
static int Compare(const void *a, const void *b, void *unused);
void NoteAccess();
void NoteUpdate();
// Get underlying raw cache database record.
nsresult GetRecord(nsINetDataCacheRecord* *aRecord);
nsresult GetRecordID(PRInt32 *aRecordID);
nsresult Evict(PRUint32 aTruncatedContentLength);
nsresult GetFileSpec(nsIFileSpec* *aFileSpec);
void NoteDownloadTime(PRTime start, PRTime end);
// placement new for arena-allocation
void *operator new (size_t aSize, nsIArena *aArena);
friend class nsReplacementPolicy;
friend class nsCacheManager;
friend class StreamAsFile;
friend class nsCacheEntryChannel;
friend class CacheOutputStream;
friend class InterceptStreamListener;
private:
nsCachedNetData() {};
virtual ~nsCachedNetData() {};
// Initialize internal fields of this nsCachedNetData instance from the
// underlying raw cache database record.
nsresult Deserialize(PRBool aDeserializeFlags);
// Notify stream-as-file observers about change in cache entry status
nsresult Notify(PRUint32 aMessage, nsresult aError);
// Add/Remove stream-as-file observers
nsresult AddObserver(nsIStreamAsFile *aStreamAsFile, nsIStreamAsFileObserver* aObserver);
nsresult RemoveObserver(nsIStreamAsFileObserver* aObserver);
// Mark cache entry to indicate a write out to the cache database is required
void SetDirty() { mFlags |= DIRTY; }
nsresult Resurrect(nsINetDataCacheRecord *aRecord);
nsresult CommitFlags();
CacheMetaData* FindTaggedMetaData(const char* aTag, PRBool aCreate);
private:
// List of nsIStreamAsFileObserver's that will receive notification events
// when the cache manager or a client desires to delete/truncate a cache
// entry file.
StreamAsFileObserverClosure* mObservers;
// Protocol-specific meta-data, opaque to the cache manager
CacheMetaData *mMetaData;
// Next in chain for a single bucket in the replacement policy hash table
// that maps from record ID to nsCachedNetData
nsCachedNetData* mNext;
// See flag bits, above
// NOTE: 16 bit member is combined with members below for
// struct packing efficiency. Do not change order of members!
PRUint16 mFlags;
protected:
// Number of nsCacheEntryChannels referring to this record
PRUint8 mChannelCount;
// Below members are statistics kept per cache-entry, used to decide how
// profitable it will be to evict a record from the cache relative to other
// existing records. Note: times are measured in *seconds* since the
// 1/1/70 epoch, same as a unix time_t.
// Number of accesses for this cache record
// NOTE: 8 bit member is combined with members above for
// struct packing efficiency. Do not change order of members!
PRUint8 mNumAccesses;
// A reference to the underlying, raw cache database record, either as a
// pointer to an in-memory object or as a database record identifier
union {
nsINetDataCacheRecord* mRecord;
// Database record ID of associated cache record. See
// nsINetDataCache::GetRecordByID().
PRInt32 mRecordID;
};
// Weak link to parent cache
nsINetDataCache* mCache;
// Length of stored content, which may be less than storage consumed if
// compression is used
PRUint32 mLogicalLength;
// Most recent cache entry access times, used to compute access frequency
PRUint32 mAccessTime[MAX_K];
// We use modification time of the original document for replacement policy
// computations, i.e. to compute a document's age, but if we don't know it,
// we use the time that the document was last written to the cache.
union {
// Document modification time, if known.
PRUint32 mLastModifiedTime;
// Time of last cache update for this doc
PRUint32 mLastUpdateTime;
};
union {
// Time until which document is fresh, i.e. does not have to be validated
// with server and, therefore, data in cache is guaranteed usable
PRUint32 mExpirationTime;
// Heuristic time at which cached document is likely to be out-of-date
// with respect to canonical copy on server. Used for cache replacement
// policy, not for validation.
PRUint32 mStaleTime;
};
// Download time per byte, measure roughly in units of KB/s
float mDownloadRate;
// Heuristic estimate of cache entry future benefits, based on above values
float mProfit;
};
#endif // _nsCachedNetData_h_

View File

@@ -1,666 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* 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):
* Scott Furman, fur@netscape.com
*/
#include "nsReplacementPolicy.h"
#include "nsCachedNetData.h"
#include "nsQuickSort.h"
#include "nsIAllocator.h"
#include "nsIEnumerator.h"
#include "prtime.h"
#include "prbit.h"
#include "nsCOMPtr.h"
#include <math.h>
// Constant used to estimate frequency of access to a document based on size
#define CACHE_CONST_B 1.35
// A cache whose space is managed by this replacement policy
class nsReplacementPolicy::CacheInfo {
public:
CacheInfo(nsINetDataCache* aCache):mCache(aCache),mNext(0) {}
nsINetDataCache* mCache;
CacheInfo* mNext;
};
nsReplacementPolicy::nsReplacementPolicy()
: mRankedEntries(0), mCaches(0), mRecordsRemovedSinceLastRanking(0),
mNumEntries(0), mCapacityRankedEntriesArray(0), mLastRankTime(0) {}
nsReplacementPolicy::~nsReplacementPolicy()
{
if (mRankedEntries)
nsAllocator::Free(mRankedEntries);
if (mMapRecordIdToEntry)
nsAllocator::Free(mMapRecordIdToEntry);
}
nsresult
nsReplacementPolicy::Init(PRUint32 aMaxCacheEntries)
{
nsresult rv;
rv = NS_NewHeapArena(getter_AddRefs(mArena), sizeof(nsCachedNetData) * 32);
if (NS_FAILED(rv)) return rv;
mMaxEntries = aMaxCacheEntries;
mHashArrayLength = PR_CeilingLog2(aMaxCacheEntries) >> 3;
size_t numBytes = mHashArrayLength * sizeof(*mMapRecordIdToEntry);
mMapRecordIdToEntry = (nsCachedNetData**)nsAllocator::Alloc(numBytes);
if (!mMapRecordIdToEntry)
return NS_ERROR_OUT_OF_MEMORY;
nsCRT::zero(mMapRecordIdToEntry, numBytes);
return NS_OK;
}
nsresult
nsReplacementPolicy::AddCache(nsINetDataCache *aCache)
{
CacheInfo *cacheInfo = new CacheInfo(aCache);
if (!cacheInfo)
return NS_ERROR_OUT_OF_MEMORY;
cacheInfo->mNext = mCaches;
mCaches = cacheInfo;
return NS_OK;
}
PRUint32
nsReplacementPolicy::HashRecordID(PRInt32 aRecordID)
{
return ((aRecordID >> 16) ^ aRecordID) & (mHashArrayLength - 1);
}
nsCachedNetData*
nsReplacementPolicy::FindCacheEntryByRecordID(PRInt32 aRecordID, nsINetDataCache *aCache)
{
nsresult rv;
nsCachedNetData* cacheEntry;
PRUint32 bucket = HashRecordID(aRecordID);
cacheEntry = mMapRecordIdToEntry[bucket];
for (;cacheEntry; cacheEntry = cacheEntry->mNext) {
PRInt32 recordID;
rv = cacheEntry->GetRecordID(&recordID);
if (NS_FAILED(rv))
continue;
if ((recordID == aRecordID) && (cacheEntry->mCache == aCache))
return cacheEntry;
}
return 0;
}
// Add a cache entry to the hash table that maps record ID to entries
void
nsReplacementPolicy::AddCacheEntry(nsCachedNetData* aCacheEntry, PRInt32 aRecordID)
{
nsCachedNetData** cacheEntryp;
PRUint32 bucket = HashRecordID(aRecordID);
cacheEntryp = &mMapRecordIdToEntry[bucket];
while (*cacheEntryp)
cacheEntryp = &(*cacheEntryp)->mNext;
*cacheEntryp = aCacheEntry;
aCacheEntry->mNext = 0;
}
// Delete a cache entry from the hash table that maps record ID to entries
nsresult
nsReplacementPolicy::DeleteCacheEntry(nsCachedNetData* aCacheEntry)
{
nsresult rv;
PRInt32 recordID;
rv = aCacheEntry->GetRecordID(&recordID);
if (NS_FAILED(rv)) return rv;
PRUint32 bucket = HashRecordID(recordID);
nsCachedNetData** cacheEntryp;
cacheEntryp = &mMapRecordIdToEntry[bucket];
while (*cacheEntryp) {
if (*cacheEntryp == aCacheEntry) {
*cacheEntryp = aCacheEntry->mNext;
return NS_OK;
}
cacheEntryp = &(*cacheEntryp)->mNext;
}
NS_ASSERTION(0, "hash table inconsistency");
return NS_ERROR_FAILURE;
}
nsresult
nsReplacementPolicy::AddAllRecordsInCache(nsINetDataCache *aCache)
{
nsresult rv;
nsCOMPtr<nsISimpleEnumerator> iterator;
nsCOMPtr<nsISupports> iSupports;
nsCOMPtr<nsINetDataCacheRecord> record;
rv = aCache->NewCacheEntryIterator(getter_AddRefs(iterator));
if (!NS_SUCCEEDED(rv)) return rv;
while (1) {
PRBool notDone;
rv = iterator->HasMoreElements(&notDone);
if (NS_FAILED(rv)) return rv;
if (!notDone)
break;
rv = iterator->GetNext(getter_AddRefs(iSupports));
if (!NS_SUCCEEDED(rv)) return rv;
record = do_QueryInterface(iSupports);
rv = AssociateCacheEntryWithRecord(record, aCache, 0);
if (!NS_SUCCEEDED(rv)) return rv;
}
return NS_OK;
}
// Get current time and convert to seconds since the epoch
static PRUint32
now32()
{
double nowFP;
PRInt64 now64 = PR_Now();
LL_L2D(nowFP, now64);
PRUint32 now = (PRUint32)(nowFP * 1e-6);
return now;
}
void
nsCachedNetData::NoteDownloadTime(PRTime start, PRTime end)
{
double startFP, endFP, rate, duration;
LL_L2D(startFP, start);
LL_L2D(endFP, end);
duration = endFP - startFP;
// If the data arrives so fast that it can not be timed due to the clock
// granularity, assume a data arrival duration of 10 ms
if (!duration)
duration = 10000;
// Compute download rate in kB/s
rate = mLogicalLength / (duration * (1e-6 * 1024.0));
if (mDownloadRate) {
// Exponentially smooth download rate
const double alpha = 0.5;
mDownloadRate = (float)(mDownloadRate * alpha + rate * (1.0 - alpha));
} else {
mDownloadRate = (float)rate;
}
}
// 1 hour
#define MIN_HALFLIFE (60 * 60)
// 1 week
#define TYPICAL_HALFLIFE (7 * 24 * 60 * 60)
/**
* Estimate the profit that would be lost if the given cache entry was evicted
* from the cache. Profit is defined as the future expected download delay per
* byte of cached content. The profit computation is made based on projected
* frequency of access, prior download performance and a heuristic staleness
* criteria. The technique used is a variation of that described in the
* following paper:
*
* "A Case for Delay-Conscious Caching of Web Documents"
* http://www.bell-labs.com/user/rvingral/www97.html
*
* Briefly, expected profit is:
*
* (projected frequency of access) * (download time per byte) * (probability freshness)
*/
void
nsCachedNetData::ComputeProfit(PRUint32 aNow)
{
PRUint32 K, now;
if (aNow)
now = aNow;
else
now = now32();
K = PR_MIN(MAX_K, mNumAccesses);
if (!K) {
mProfit = 0;
return;
}
// Compute time, in seconds, since k'th most recent access
double timeSinceKthAccess = now - mAccessTime[K - 1];
if (timeSinceKthAccess <= 0.0) // Sanity check
timeSinceKthAccess = 1.0;
// Estimate frequency of future document access based on past
// access frequency
double frequencyAccess = K / timeSinceKthAccess;
// If we don't have much historical data on access frequency
// use a heuristic based on document size as an estimate
if (mLogicalLength) {
if (K == 1) {
frequencyAccess /= pow(mLogicalLength, CACHE_CONST_B);
} else if (K == 2) {
frequencyAccess /= pow(mLogicalLength, CACHE_CONST_B / 2);
}
}
// Estimate likelihood that data in cache is fresh, i.e.
// that it corresponds to the document on the server
double probabilityFreshness;
PRInt32 halfLife, age, docTime;
PRBool potentiallyStale;
docTime = GetFlag(LAST_MODIFIED_KNOWN) ? mLastModifiedTime : mLastUpdateTime;
age = now - docTime;
probabilityFreshness = 1.0; // Optimistic
if (GetFlag(EXPIRATION_KNOWN)) {
potentiallyStale = now > mExpirationTime;
halfLife = mExpirationTime - mLastModifiedTime;
} else if (GetFlag(STALE_TIME_KNOWN)) {
potentiallyStale = PR_TRUE;
halfLife = mStaleTime - docTime;
} else {
potentiallyStale = PR_TRUE;
halfLife = TYPICAL_HALFLIFE;
}
if (potentiallyStale) {
if (halfLife < MIN_HALFLIFE)
halfLife = MIN_HALFLIFE;
probabilityFreshness = pow(0.5, (double)age / (double)halfLife);
}
mProfit = (float)(frequencyAccess * probabilityFreshness);
if (mDownloadRate)
mProfit /= mDownloadRate;
}
// Number of entries to grow mRankedEntries array when it's full
#define STATS_GROWTH_INCREMENT 256
// Sorting predicate for NS_Quicksort
int
nsCachedNetData::Compare(const void *a, const void *b, void *unused)
{
nsCachedNetData* entryA = *(nsCachedNetData**)a;
nsCachedNetData* entryB = *(nsCachedNetData**)b;
// Percolate deleted or empty entries to the end of the mRankedEntries
// array, so that they can be recycled.
if (!entryA || entryA->GetFlag(RECYCLED)) {
if (!entryB || entryB->GetFlag(RECYCLED))
return 0;
else
return +1;
}
if (!entryB || entryB->GetFlag(RECYCLED))
return -1;
// Evicted entries (those with no content data) and active entries (those
// currently being updated) are collected towards the end of the sorted
// array just prior to the deleted cache entries, since evicted entries
// can't be re-evicted.
if (entryA->GetFlag(UPDATE_IN_PROGRESS)) {
if (entryB->GetFlag(UPDATE_IN_PROGRESS))
return 0;
else
return +1;
}
if (entryB->GetFlag(UPDATE_IN_PROGRESS))
return -1;
PRUint16 Ka = PR_MIN(MAX_K, entryA->mNumAccesses);
PRUint16 Kb = PR_MIN(MAX_K, entryB->mNumAccesses);
// Order cache entries by the number of times they've been accessed
if (Ka < Kb)
return -1;
if (Ka > Kb)
return +1;
/*
* Among records that have been accessed an equal number of times, order
* them by profit.
*/
if (entryA->mProfit > entryB->mProfit)
return +1;
if (entryA->mProfit < entryB->mProfit)
return -1;
return 0;
}
/**
* Rank cache entries in terms of their elegibility for eviction.
*/
nsresult
nsReplacementPolicy::RankRecords()
{
PRUint32 i, now;
// Add all cache records if this is the first ranking
if (!mLastRankTime) {
nsresult rv;
CacheInfo *cacheInfo;
cacheInfo = mCaches;
while (cacheInfo) {
rv = AddAllRecordsInCache(cacheInfo->mCache);
if (NS_FAILED(rv)) return rv;
cacheInfo = cacheInfo->mNext;
}
}
// Get current time and convert to seconds since the epoch
now = now32();
// Recompute profit for every known cache record, except deleted ones
for (i = 0; i < mNumEntries; i++) {
nsCachedNetData* entry = mRankedEntries[i];
if (entry && !entry->GetFlag(nsCachedNetData::RECYCLED))
entry->ComputeProfit(now);
}
NS_QuickSort(mRankedEntries, mNumEntries, sizeof *mRankedEntries,
nsCachedNetData::Compare, 0);
mNumEntries -= mRecordsRemovedSinceLastRanking;
mRecordsRemovedSinceLastRanking = 0;
mLastRankTime = now;
return NS_OK;
}
// A heuristic policy to avoid the cost of re-ranking cache records by
// profitability every single time space must be made available in the cache.
void
nsReplacementPolicy::MaybeRerankRecords()
{
// Rank at most once per minute
PRUint32 now = now32();
if ((now - mLastRankTime) >= 60)
RankRecords();
}
void
nsReplacementPolicy::CompactRankedEntriesArray()
{
if (mRecordsRemovedSinceLastRanking || !mLastRankTime)
RankRecords();
}
nsresult
nsReplacementPolicy::CheckForTooManyCacheEntries()
{
if (mCapacityRankedEntriesArray == mMaxEntries) {
return DeleteOneEntry(0);
} else {
nsresult rv;
CacheInfo *cacheInfo;
cacheInfo = mCaches;
while (cacheInfo) {
PRUint32 numEntries, maxEntries;
rv = cacheInfo->mCache->GetNumEntries(&numEntries);
if (NS_FAILED(rv)) return rv;
rv = cacheInfo->mCache->GetMaxEntries(&maxEntries);
if (NS_FAILED(rv)) return rv;
if (numEntries == maxEntries)
return DeleteOneEntry(cacheInfo->mCache);
cacheInfo = cacheInfo->mNext;
}
}
return NS_OK;
}
/**
* Create a new association between a low-level cache database record and a
* cache entry. Add the entry to the set of entries eligible for eviction from
* the cache. This would typically be done when the cache entry is created.
*/
nsresult
nsReplacementPolicy::AssociateCacheEntryWithRecord(nsINetDataCacheRecord *aRecord,
nsINetDataCache* aCache,
nsCachedNetData** aResult)
{
nsCachedNetData* cacheEntry;
nsresult rv;
// First, see if the record is already known to the replacement policy
PRInt32 recordID;
rv = aRecord->GetRecordID(&recordID);
if (NS_FAILED(rv)) return rv;
cacheEntry = FindCacheEntryByRecordID(recordID, aCache);
if (cacheEntry) {
if (aResult) {
if (cacheEntry->GetFlag(nsCachedNetData::DORMANT))
cacheEntry->Resurrect(aRecord);
NS_ADDREF(cacheEntry);
*aResult = cacheEntry;
}
return NS_OK;
}
// Compact the array of cache entry statistics, so that free entries appear
// at the end, for possible reuse.
if (mNumEntries && (mNumEntries == mCapacityRankedEntriesArray))
CompactRankedEntriesArray();
// If compaction doesn't yield available entries in the
// mRankedEntries array, then extend the array.
if (mNumEntries == mCapacityRankedEntriesArray) {
PRUint32 newCapacity;
rv = CheckForTooManyCacheEntries();
if (NS_FAILED(rv)) return rv;
newCapacity = mCapacityRankedEntriesArray + STATS_GROWTH_INCREMENT;
if (newCapacity > mMaxEntries)
newCapacity = mMaxEntries;
nsCachedNetData** newRankedEntriesArray;
PRUint32 numBytes = sizeof(nsCachedNetData*) * newCapacity;
newRankedEntriesArray =
(nsCachedNetData**)nsAllocator::Realloc(mRankedEntries, numBytes);
if (!newRankedEntriesArray)
return NS_ERROR_OUT_OF_MEMORY;
mRankedEntries = newRankedEntriesArray;
mCapacityRankedEntriesArray = newCapacity;
PRUint32 i;
for (i = mNumEntries; i < newCapacity; i++)
mRankedEntries[i] = 0;
}
// Recycle the record after the last in-use record in the array
nsCachedNetData *entry = mRankedEntries[mNumEntries];
NS_ASSERTION(!entry || !entry->GetFlag(nsCachedNetData::RECYCLED),
"Only deleted cache entries should appear at end of array");
if (!entry) {
entry = new(mArena) nsCachedNetData;
if (!entry)
return NS_ERROR_OUT_OF_MEMORY;
mRankedEntries[mNumEntries] = entry;
} else {
// Clear out recycled data structure
nsCRT::zero(entry, sizeof(*entry));
}
entry->Init(aRecord, aCache);
AddCacheEntry(entry, recordID);
// Add one reference to the cache entry from the cache manager
NS_ADDREF(entry);
if (aResult) {
// And one reference from our caller
NS_ADDREF(entry);
*aResult = entry;
}
mNumEntries++;
return NS_OK;
}
nsresult
nsReplacementPolicy::GetCachedNetData(const char* cacheKey, PRUint32 cacheKeyLength,
nsINetDataCache* aCache,
nsCachedNetData** aResult)
{
nsresult rv;
nsCOMPtr<nsINetDataCacheRecord> record;
rv = aCache->GetCachedNetData(cacheKey, cacheKeyLength,
getter_AddRefs(record));
if (NS_FAILED(rv)) return rv;
return AssociateCacheEntryWithRecord(record, aCache, aResult);
}
/**
* Delete the least desirable record from the cache database. This is used
* when the addition of another record would exceed either the cache manager or
* the cache's maximum permitted number of records.
*/
nsresult
nsReplacementPolicy::DeleteOneEntry(nsINetDataCache *aCache)
{
PRUint32 i;
nsresult rv;
nsCachedNetData *entry;
i = 0;
while (1) {
MaybeRerankRecords();
for (; i < mNumEntries; i++) {
entry = mRankedEntries[i];
if (!entry || entry->GetFlag(nsCachedNetData::RECYCLED))
continue;
if (!aCache || (entry->mCache == aCache))
break;
}
// Report error if no record found to delete
if (i == mNumEntries)
return NS_ERROR_FAILURE;
rv = entry->Delete();
if (NS_SUCCEEDED(rv)) {
rv = DeleteCacheEntry(entry);
return rv;
}
}
}
nsresult
nsReplacementPolicy::GetStorageInUse(PRUint32* aStorageInUse)
{
nsresult rv;
CacheInfo *cacheInfo;
*aStorageInUse = 0;
cacheInfo = mCaches;
while (cacheInfo) {
PRUint32 cacheStorage;
rv = cacheInfo->mCache->GetStorageInUse(&cacheStorage);
if (NS_FAILED(rv)) return rv;
*aStorageInUse += cacheStorage;
cacheInfo = cacheInfo->mNext;
}
return NS_OK;
}
/**
* Delete the least desirable records from the cache until the occupancy of the
* cache has been reduced by the given number of KB. This is used when the
* addition of more cache data would exceed the cache's capacity.
*/
nsresult
nsReplacementPolicy::Evict(PRUint32 aTargetOccupancy)
{
PRUint32 i;
nsCachedNetData *entry;
nsresult rv;
PRUint32 occupancy;
PRInt32 truncatedLength;
nsCOMPtr<nsINetDataCacheRecord> record;
MaybeRerankRecords();
for (i = 0; i < mNumEntries; i++) {
rv = GetStorageInUse(&occupancy);
if (!NS_SUCCEEDED(rv)) return rv;
if (occupancy <= aTargetOccupancy)
return NS_OK;
entry = mRankedEntries[i];
// Skip deleted/empty cache entries and ones that have already been evicted
if (!entry || entry->GetFlag(nsCachedNetData::UNEVICTABLE))
continue;
if (entry->GetFlag(nsCachedNetData::ALLOW_PARTIAL)) {
rv = entry->GetRecord(getter_AddRefs(record));
if (NS_FAILED(rv))
continue;
PRUint32 contentLength;
rv = record->GetStoredContentLength(&contentLength);
if (NS_FAILED(rv))
continue;
// Additional cache storage required, in KB
PRUint32 storageToReclaim = (occupancy - aTargetOccupancy) << 10;
truncatedLength = (PRInt32)(contentLength - storageToReclaim);
if (truncatedLength < 0)
truncatedLength = 0;
} else {
truncatedLength = 0;
}
rv = entry->Evict(truncatedLength);
}
return NS_ERROR_FAILURE;
}

View File

@@ -1,136 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* 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):
* Scott Furman, fur@netscape.com
*/
/**
* This class manages one or more caches that share a storage resource, e.g. a
* file cache and a flat-database cache might each occupy space on the disk and
* they would share a single instance of nsReplacementPolicy. The replacement
* policy heuristically chooses which cache entries to evict when storage is
* required to accommodate incoming cache data.
*/
#ifndef _nsReplacementPolicy_h_
#define _nsReplacementPolicy_h_
#include "nscore.h"
#include "nsISupportsUtils.h"
#include "nsINetDataCache.h"
#include "nsICachedNetData.h"
#include "nsIArena.h"
#include "nsCOMPtr.h"
#include "nsHashtable.h"
class nsCachedNetData;
struct PL_HashTable;
/**
* This private class is responsible for implementing the network data cache's
* replacement policy, i.e. it decides which cache data should be evicted to
* make room for new incoming data.
*/
class nsReplacementPolicy {
public:
nsReplacementPolicy();
~nsReplacementPolicy();
protected:
nsresult Init(PRUint32 aMaxCacheEntries);
nsresult AddCache(nsINetDataCache *aCache);
nsresult GetCachedNetData(const char* cacheKey, PRUint32 cacheKeyLength,
nsINetDataCache* aCache,
nsCachedNetData** aResult);
nsresult GetStorageInUse(PRUint32* aNumKBytes);
friend class nsCacheManager;
private:
nsresult RankRecords();
void MaybeRerankRecords();
void CompactRankedEntriesArray();
nsresult DeleteOneEntry(nsINetDataCache* aCache);
nsresult Evict(PRUint32 aTargetOccupancy);
nsCachedNetData* FindCacheEntryByRecordID(PRInt32 aRecordID, nsINetDataCache *aCache);
void AddCacheEntry(nsCachedNetData* aCacheEntry, PRInt32 aRecordID);
nsresult DeleteCacheEntry(nsCachedNetData* aCacheEntry);
PRUint32 HashRecordID(PRInt32 aRecordID);
nsresult AssociateCacheEntryWithRecord(nsINetDataCacheRecord *aRecord,
nsINetDataCache* aCache,
nsCachedNetData** aResult);
nsresult AddAllRecordsInCache(nsINetDataCache *aCache);
nsresult CheckForTooManyCacheEntries();
class CacheInfo;
private:
// Growable array of pointers to individual cache entries; It is sorted by
// profitability, such that low-numbered array indices refer to cache
// entries that are the least profitable to retain. New cache entries are
// added to the end of the array. Deleted cache entries are specially
// marked and percolate to the end of the array for recycling whenever
// mRankedEntries is sorted. Evicted cache entries (those with no
// associated content data) are retained for the purpose of improving the
// replacement policy efficacy, and are percolated towards the end of the
// array, just prior to the deleted cache entries.
//
// The array is not in sorted order 100% of the time; For efficiency
// reasons, sorting is only done when heuristically deemed necessary.
nsCachedNetData** mRankedEntries;
// Hash table buckets to map Record ID to cache entry. We use this instead
// of a PL_HashTable to reduce storage requirements
nsCachedNetData** mMapRecordIdToEntry;
// Length of mMapRecordIdToEntry array
PRUint32 mHashArrayLength;
// Linked list of caches that share this replacement policy
CacheInfo* mCaches;
// Allocation area for cache entry (nsCachedNetData) instances
nsCOMPtr<nsIArena> mArena;
// Bookkeeping
PRUint32 mRecordsRemovedSinceLastRanking;
// Maximum permitted length of mRankedEntries array
PRUint32 mMaxEntries;
// Number of occupied slots in mRankedEntries array
PRUint32 mNumEntries;
// Capacity of mRankedEntries array
PRUint32 mCapacityRankedEntriesArray;
// Time at which cache entries were last ranked by profitability
PRUint32 mLastRankTime;
};
#endif // _nsReplacementPolicy_h_

View File

@@ -1,43 +0,0 @@
#
# 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 mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
MODULE = nkcache
include $(DEPTH)/config/autoconf.mk
XPIDLSRCS = \
nsICachedNetData.idl \
nsINetDataCacheManager.idl \
nsINetDataCache.idl \
nsINetDataCacheRecord.idl \
nsINetDataDiskCache.idl \
nsIStreamAsFile.idl \
$(NULL)
EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))
include $(topsrcdir)/config/rules.mk

View File

@@ -1,41 +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 or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
MODULE = nkcache
DEPTH = ..\..\..
include <$(DEPTH)/config/config.mak>
EXPORTS = \
$(NULL)
XPIDLSRCS = \
.\nsICachedNetData.idl \
.\nsINetDataCacheManager.idl \
.\nsINetDataCache.idl \
.\nsINetDataCacheRecord.idl \
.\nsINetDataDiskCache.idl \
.\nsIStreamAsFile.idl \
$(NULL)
include <$(DEPTH)/config/rules.mak>

View File

@@ -1,229 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#include "nsrootidl.idl"
#include "nsISupports.idl"
interface nsIFileSpec;
interface nsIURI;
interface nsIObserver;
interface nsIChannel;
interface nsINetDataCache;
interface nsINetDataCacheRecord;
interface nsILoadGroup;
interface nsIStreamListener;
/**
* The nsICachedNetData interface represents a single entry in a database that
* caches data retrieved from the network. This interface is implemented by the
* cache manager on top of the low-level nsINetDataCacheRecord and
* nsINetDataCache interfaces that are implemented by the database.
*
* Each cache record may contain both content and metadata. The content may
* be, for example, GIF image data or HTML, and it is accessed through
* nsIChannel's streaming API. The opaque metadata, which may contain HTTP
* headers among other things, is stored as a byte array. Each entry in the
* cache is indexed by two different keys: a record id number and a key created
* by combining the URI with a "secondary key", e.g. HTTP post data.
*
* @See nsINetDataCacheRecord
* @See nsINetDataCache
* @See nsINetDataDiskCache
* @See nsINetDataCacheManager
*/
[scriptable, uuid(6aeb2a40-6d43-11d3-90c8-000064657374)]
interface nsICachedNetData : nsISupports
{
/**
* String form of the URI provided as an argument to the call to
* nsINetDataCacheManager::GetCachedNetData() that created this record.
*/
readonly attribute string uriSpec;
/**
* Getter for the opaque secondary database key provided as an argument to
* the call to nsINetDataCacheManager::GetCachedNetData() that created this
* record.
*/
void getSecondaryKey(out unsigned long length,
[retval, size_is(length)] out string secondaryKey);
/**
* This flag may be set by a protocol handler to indicate that it supports
* partial fetching of data. In that case, the cache manager is permitted
* to truncate the entry's content to accommodate incoming data for other
* cache entries rather than deleting it wholesale.
*/
attribute boolean allowPartial;
/**
* This flag indicates that the write stream supplying content data for the
* cache did not complete normally and, therefore, the content may be
* truncated.
*/
readonly attribute boolean partialFlag;
/**
* This flag can be set and cleared by a protocol handler as a form of
* self-notification, so as to avoid race conditions in which a protocol
* handler issues two identical network requests to fill the same cache
* entry. The cache manager itself largely ignores this flag.
*/
attribute boolean updateInProgress;
/**
* inUse is set if any existing channels are associated with this cache
* entry or if the updateInProgess flag is set. This can be used to
* prevent writing to a cache entry by a protocol handler if it's being
* read or written elsewhere.
*/
readonly attribute boolean inUse;
/**
* Date/time that the document was last stored on the origin server, as
* supplied by the protocol handler. This value is used as input to the
* cache replacement policy, i.e. it is not used for validation. If the
* protocol can't supply a last-modified time, this attribute should remain
* unset. When unset, the value of this attribute is zero.
*
* FIXME: Should use nsIDateTime interface, once it's created
* instead of PRTime, for improved scriptability ?
*/
attribute PRTime lastModifiedTime;
/**
* Supplied by the protocol handler, the expirationTime attribute specifies
* the time until which the document is guaranteed fresh, i.e. the document
* does not have to be validated with the server and, therefore, any data
* in cache is definitely usable. The value of this attribute serves as a
* hint to the cache replacement policy. Only one of either staleTime or
* expirationTime may be set for a single cache record. When unset, the
* value of this attribute is zero.
*/
attribute PRTime expirationTime;
/**
* Date/time supplied by the protocol handler, at which point the content
* is *likely* to be stale, i.e. the data in the cache may be out-of-date
* with respect to the data on the server. This heuristic date does not
* necessarily correspond to the HTTP Expires header, as it does not
* determine when cached network data must be validated with the origin
* server, but only serves as a hint to the cache replacement policy. Only
* one of either staleTime or expirationTime may be set for a single cache
* record. When unset, the value of this attribute is zero.
*/
attribute PRTime staleTime;
/**
* Date/time of last access of the data in this cache record, as determined
* by the cache manager.
*/
readonly attribute PRTime lastAccessTime;
/**
* Number of times this record has been accessed since it was first stored.
*/
readonly attribute PRUint16 numberAccesses;
/**
* Accessor methods for opaque meta-data which can be read and updated
* independently of the content data.
*
* The aTag argument can be used to accommodate multiple clients of the
* cache API, each of which wants to store its own private meta-data into
* the cache. For example, there could be a "headers" tag that the HTTP
* protocol handler uses to store http response headers and a "image size"
* tag used to store the image dimensions of a GIF file. The aData
* argument refers to an opaque blob of arbitrary bytes.
*
* IMPORTANT: If aData does not contain byte-oriented data, i.e. it's not a
* string, the contents of aData must be byte-swapped by the,
* caller, so as to make the cache files endian-independent.
*/
void getAnnotation(in string aTag,
out PRUint32 aLength, [size_is(aLength), retval] out string aData);
void setAnnotation(in string aTag,
in PRUint32 aLength, [size_is(aLength)] in string aData);
/**
* As a getter, return the number of content bytes stored in the cache,
* i.e. via the nsIChannel streaming APIs. This may be less than the
* complete content length if a partial cache fill occurred. The cached
* content can be truncated by setting the value of this attribute. The
* value of the attribute represents a logical, not a physical, length. If
* compression has been used, the content may consume less storage than
* indicated by this attribute.
*
* When this attribute is set to zero the associated cache disk file, if
* any, should be deleted.
*/
attribute PRUint32 storedContentLength;
/**
* Notify any observers associated with this cache entry of the deletion
* request. If all observers drop their reference to the cache entry,
* proceed to delete the underlying cache database record and associated
* content storage.
*/
void delete();
/**
* Flush any changes in this entry's data to the cache database. This
* method will automatically be called when the last reference to the cache
* is dropped, but it can also be called explicitly for a synchronous
* effect.
*/
void commit();
/**
* Parent container cache for this entry.
*/
readonly attribute nsINetDataCache cache;
/**
* Create a channel for reading or writing a stream of content into the
* entry. It is expected that many of the nsIChannel methods return
* NS_NOT_IMPLEMENTED, including:
*
* + GetURI()
* + GetContentType()
* + GetContentLength()
*
* Though nsIChannel provides for both async and synchronous I/O APIs, both
* may not be implemented. Only AsyncRead() and OpenOutputStream() is
* required. The aProxyChannel argument allows another channel to be
* specified as the proffered argument to nsIStreamListener methods rather
* than the cache's own channel.
*/
nsIChannel newChannel(in nsILoadGroup aLoadGroup,
in nsIChannel aProxyChannel);
/**
* This method can be used by a caching protocol handler to store data in
* the cache by forking an asynchronous read stream so that it is
* simultaneously sent to a requester and written into the cache. This
* method implicitly sets the updateInProgress flag, if it has not already
* been set.
*/
nsIStreamListener interceptAsyncRead(in nsIStreamListener aOriginalListener,
in PRUint32 aStartOffset);
};

View File

@@ -1,143 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#include "nsISupports.idl"
interface nsIURI;
interface nsINetDataCacheRecord;
interface nsISimpleEnumerator;
interface nsIFileSpec;
/**
* The nsINetDataCache defines the low-level API for a network-data
* cache, used to cache the responses to network retrieval commands.
* This interface, along with nsINetDataCacheRecord, is implemented by
* the memory cache, the file cache and, optionally, by some extension
* caches. This interface is essentially a pseudo-private API for the
* cache manager. Other clients should never use this interface.
*
* Each cache entry may contain both content, e.g. GIF image data, and
* associated metadata, e.g. HTTP headers. Each entry is indexed by two
* different keys: a record id number and a key created by combining the URI
* with a "secondary key", e.g. HTTP post data.
*
* The nsINetDataCache interface is agnostic as to where the data is
* stored and whether the storage is volatile or persistent. The
* memory cache, any disk caches and any extension caches must all
* implement this interface.
*
*/
[scriptable, uuid(ccfc58c0-6dde-11d3-90c8-000064657374)]
interface nsINetDataCache : nsISupports
{
/**
* Human-readable description of the cache module, e.g. "Disk Cache"
*/
readonly attribute wstring description;
/**
* Returns true if cached data is available for the given opaque key,
* even if only partial data is stored.
*/
boolean contains([size_is(length)] in string key, in PRUint32 length);
/**
* Fetch the cache entry record for the given opaque key. If one does not
* exist, create a new, empty record.
*/
nsINetDataCacheRecord getCachedNetData([size_is(length)] in string key,
in PRUint32 length);
/**
* Fetch the cache entry record for the given URI using the record ID as a key.
*/
nsINetDataCacheRecord getCachedNetDataByID(in PRInt32 RecordID);
/**
* False indicates that this cache is entirely bypassed.
*/
attribute boolean enabled;
/**
* Constants for flags attribute, below
*/
// Used for extension caches, e.g. a CD-ROM cache
const long READ_ONLY = 1 << 0;
// One of these bits must be set
const long MEMORY_CACHE = 1 << 1;
const long FLAT_FILE_CACHE = 1 << 2;
const long FILE_PER_URL_CACHE = 1 << 3;
/**
* See constants defined above.
*/
readonly attribute PRUint32 flags;
/**
* Total number of URI entries stored in the cache.
*/
readonly attribute PRUint32 numEntries;
/**
* Maximum number of URI entries that may be stored in the cache.
*/
readonly attribute PRUint32 maxEntries;
/**
* Enumerate the URI entries stored in the cache.
*/
nsISimpleEnumerator newCacheEntryIterator();
/**
* Contains a reference to the next cache in search order. For the memory
* cache, this attribute always references the disk cache. For the disk
* cache, it contains a reference to the first extension cache.
*/
attribute nsINetDataCache nextCache;
/**
* An estimate of the amount of storage occupied by the cache, in kB.
* Actual use may be slightly higher than reported due to cache overhead
* and heap fragmentation (in the memory cache) or block quantization (in
* the disk cache).
*/
readonly attribute PRUint32 storageInUse;
/**
* Remove all entries from a writable cache. This could be used, for
* example, after a guest ends a browser session. This is equivalent to
* setting the cache's Capacity to zero, except that all cache entries,
* even those in active use, will be deleted. Also, any global cache
* database files will be deleted.
*/
void removeAll();
};
%{ C++
// ProgID prefix for Components that implement this interface
#define NS_NETWORK_CACHE_PROGID "component://netscape/network/cache"
#define NS_NETWORK_MEMORY_CACHE_PROGID NS_NETWORK_CACHE_PROGID "?name=memory-cache"
#define NS_NETWORK_FLAT_CACHE_PROGID NS_NETWORK_CACHE_PROGID "?name=flat-cache"
#define NS_NETWORK_FILE_CACHE_PROGID NS_NETWORK_CACHE_PROGID "?name=file-cache"
%}

View File

@@ -1,163 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#include "nsISupports.idl"
interface nsISimpleEnumerator;
interface nsICachedNetData;
interface nsINetDataCache;
interface nsINetDataDiskCache;
interface nsIURI;
interface nsIFileSpec;
/**
* The network-response cache manager is partly responsible for the caching of
* content and associated metadata that has been retrieved via the network.
* (The remaining responsibility for caching lies with individual network
* protocol handlers.)
*
* The cache manager supervises the actions of individual cache components,
* such as the memory cache, the disk cache and any extension caches, e.g. a
* read-only CD-ROM cache.
*
* @See nsINetDataCache
* @See nsICachedNetData
*/
[scriptable, uuid(71c8ab00-6d5c-11d3-90c8-000064657374)]
interface nsINetDataCacheManager : nsISupports
{
/**
* Flag for the GetCachedNetData() method: If set, the memory cache is
* neither searched nor will any data be stored into it. This might be
* appropriate, for example, with images, because they have their own
* cache for storing *decoded* images.
*/
const unsigned long BYPASS_MEMORY_CACHE = 1 << 0;
/**
* Flag for the GetCachedNetData() method: If set, the disk cache
* is neither searched nor will any be data stored into it.
* However, read-only extension caches may be searched. This
* might be used to avoid leaving persistent records of secure
* data.
*/
const unsigned long BYPASS_PERSISTENT_CACHE = 1 << 1;
/**
* Flag for the GetCachedNetData() method: If set, any stream
* content is stored in the cache as a single disk file. Content
* will not be cached in the memory cache nor is it cached in a
* flat-file cache database. This is used to implement the jar
* protocol handler and to provide the stream-as-file semantics
* required by the classic bowser plugin API.
*/
const unsigned long CACHE_AS_FILE = 1 << 2;
/**
* Fetch the cache entry record for the given URI. If one does not exist,
* create a new, empty record. The normal search order for caches is:
* + Memory cache
* + Disk cache
* + File cache (stream-as-file cache)
* + All extension caches
*
* When writing, data is typically stored in both the memory cache and the
* disk cache. Both the search order and this write policy can be modified by
* setting one or more of the flag argument bits, as defined above.
*
* The optionally-NULL secondaryKey argument can be used, e.g. for form
* post data or for HTTP headers in the case of HTTP.
*/
nsICachedNetData getCachedNetData(in string uri,
[size_is(secondaryKeyLength)] in string secondaryKey,
in PRUint32 secondaryKeyLength,
in PRUint32 flags);
/**
* Returns true if cached content is available for the given URI, even if
* only partial data is stored. The flags argument behaves the same as for
* the GetCachedNetData() method, above.
*/
boolean contains(in string uri,
[size_is(secondaryKeyLength)] in string secondaryKey,
in PRUint32 secondaryKeyLength,
in PRUint32 flags);
/**
* Total number of unexpired URI entries stored in all caches. This number
* does not take into account duplicate URIs, e.g. because the memory cache
* and the disk cache might each contain an entry for the same URI.
*/
readonly attribute PRUint32 numEntries;
/**
* Enumerate the unexpired URI entries stored in all caches. Some URIs may
* be enumerated more than once, e.g. because the the memory cache and the
* disk cache might each contain an entry for the same URI.
*/
nsISimpleEnumerator newCacheEntryIterator();
/*
* Enumerate all the loaded nsINetDataCache-implementing cache modules.
* The first module enumerated will be the memory cache, the second will be
* the disk cache, then the file cache, followed by all the extension
* caches, in search order.
*/
nsISimpleEnumerator newCacheModuleIterator();
/**
* Remove all entries from all writable caches. This could be used, for
* example, after a guest ends a browser session. This is equivalent to
* setting the DiskCacheCapacity to zero, except that all cache entries,
* even those in active use, will be deleted. Also, any global cache
* database files will be deleted.
*/
void RemoveAll();
/**
* The disk cache is made up of the file cache (for stream-as-file
* requests) and a (possibly independent) persistent cache that handles all
* other cache requests. This attribute sets/gets the combined capacity of
* these caches, measured in KBytes. Setting the capacity lower than the
* current amount of space currently in use may cause cache entries to be
* evicted from the cache to accomodate the requested capacity.
*/
attribute PRUint32 diskCacheCapacity;
/**
* This attribute sets/gets the capacity of the memory cache, measured in
* KBytes. Setting the capacity lower than the current amount of space
* currently in use may cause cache entries to be evicted from the cache to
* accomodate the requested capacity.
*/
attribute PRUint32 memCacheCapacity;
/**
* This attribute must be set before attempting to store into the disk cache.
*/
attribute nsIFileSpec diskCacheFolder;
};
%{ C++
// ProgID prefix for Components that implement this interface
#define NS_NETWORK_CACHE_MANAGER_PROGID NS_NETWORK_CACHE_PROGID "?name=manager"
%}

View File

@@ -1,125 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#include "nsISupports.idl"
#include "nsrootidl.idl"
interface nsIFileSpec;
interface nsIChannel;
interface nsINetDataCache;
/**
* The nsINetDataCacheRecord represents a single entry in a database that
* caches data retrieved from the network. On top of this low-level interface
* to the raw record data, the cache manager implements a higher-level record
* interface, nsICachedNetData. Each instance of nsINetDataCacheRecord is
* (internally) associated with a parent database, an instance of the
* nsINetDataCache interface. This interface is essentially a pseudo-private
* API for the cache manager. Other clients should never use this interface.
*
* Each cache record may contain both content and metadata. The content may
* be, for example, GIF image data or HTML, and it is accessed through
* nsIChannel's streaming API. The opaque metadata, which may contain HTTP
* headers among other things, is accessed as a contiguous byte array. Each
* entry in the cache is indexed by two different keys: a unique record id
* number, generated by the cache, and an opaque string. The latter contains
* the URI and other secondary key information, e.g. HTTP form post key/value
* pairs.
*
* The nsINetDataCacheRecord interface is agnostic as to where the data is
* stored and whether the storage is volatile or persistent. The memory cache,
* the disk cache, a flat-file cache and any read-only extension caches must
* all implement this interface.
*
* @See nsICachedNetData
* @See nsINetDataCache
* @See nsINetDataDiskCache
* @See nsINetDataCacheManager
*/
interface nsILoadGroup;
[scriptable, uuid(fdcdd6a0-7461-11d3-90ca-0040056a906e)]
interface nsINetDataCacheRecord : nsISupports
{
/**
* As far as the nsINetDataCacheRecord implementation is concerned, the
* cache entry database key is an opaque blob, but it's intended to contain
* both the URI and any secondary keys, such as HTTP post data.
*/
void getKey(out unsigned long length, [size_is(length), retval] out string key);
/**
* A persistent record number assigned by the cache which must be unique
* among all entries stored within the same cache. The record ID serves as
* an alternate key to the cache record. Providing that they satisfy the
* afforementioned uniqueness requirement, record IDs can be assigned any
* value by the database except that they may never be zero.
*/
readonly attribute PRInt32 recordID;
/**
* Opaque data which can be updated for each cache entry independently of
* the content data. This data is a combination of protocol-independent
* data provided by the cache manager and protocol-specific meta-data,
* e.g. HTTP headers.
*/
void getMetaData(out PRUint32 length, [size_is(length), retval] out string metaData);
void setMetaData(in PRUint32 length, [size_is(length)] in string data);
/**
* Number of content bytes stored in the cache, i.e. via the nsIChannel
* streaming APIs. This may be less than the complete content length if a
* partial cache fill occurred. Additionally, the cached content can be
* truncated by reducing the value of this attribute. When this attribute
* is set to zero the associated cache disk file, if any, should be
* deleted.
*/
attribute PRUint32 storedContentLength;
/**
* Delete this cache entry and its associated content.
*/
void delete();
/**
* Create a channel for reading or writing a stream of content into the
* entry. However, many of the nsIChannel methods may return
* NS_NOT_IMPLEMENTED, including:
*
* + GetURI()
* + GetContentType()
* + GetContentLength()
*/
nsIChannel newChannel(in nsILoadGroup loadGroup);
/**
* If a cache is implemented such that it stores each URI's content in an
* individual disk file, this method will identify the file corresponding
* to this record. This may be used to implement the "stream-as-file"
* semantics required by some plugins and by the 'jar:' protocol handler.
* However, not all cache implementations are *required* to store the data
* from each URI in an individual file, so it is acceptable for an
* implementation of this method to signal NS_NOT_IMPLEMENTED.
*/
readonly attribute nsIFileSpec filename;
};

View File

@@ -1,42 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#include "nsINetDataCache.idl"
interface nsIFileSpec;
/**
/**
* A network-data disk cache is used to persistently cache the responses to
* network retrieval commands. Each cache entry may contain both content,
* e.g. GIF image data, and associated metadata, e.g. HTTP headers.
*/
[scriptable, uuid(6408e390-6f13-11d3-90c8-000064657374)]
interface nsINetDataDiskCache : nsINetDataCache
{
/**
* This attribute must be set before calling any other methods of this
* interface.
*/
attribute nsIFileSpec diskCacheFolder;
};

View File

@@ -1,106 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 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):
* Scott Furman, fur@netscape.com
*/
#include "nsrootidl.idl"
#include "nsISupports.idl"
interface nsIFileSpec;
interface nsIStreamAsFileObserver;
/**
* In addition to enhancing effective network response time via caching, the
* cache manager serves a second purpose by providing the stream-as-file
* service required by traditional browser plugins and the jar: protocol
* handler. The interface below provides a means for a client to determine the
* filename associated with a stream and to detect modification/deletion of
* that file.
*/
[scriptable, uuid(0eedbbf0-92d9-11d3-90d3-0040056a906e)]
interface nsIStreamAsFile : nsISupports
{
/**
* Filename containing stream-as-file
*/
readonly attribute nsIFileSpec fileSpec;
/**
* Add an observer for this cache record. When the cache wants to delete
* or truncate a record, so as to make space for another cache entry's
* content data, it will call <code>aObserver</code>'s Observe() method,
* passing the nsIStreamAsFile instance as the <code>aSubject</code>
* argument and an appropriate message. If the observer does not wish to
* inhibit deletion/truncation, it should Release() any references it has to the
* cache record.
*
* @See nsIStreamAsFileObserver
*/
void addObserver(in nsIStreamAsFileObserver aObserver);
/**
* Delete an observer that was added by the AddObserver() method.
*/
void removeObserver(in nsIStreamAsFileObserver aObserver);
};
/**
* This interface can be implemented by a client to receive notifications of
* either modification or deletion of a file created by the cache manager using
* the stream-as-file semantics.
*/
[scriptable, uuid(a26e27c0-92da-11d3-90d3-0040056a906e)]
interface nsIStreamAsFileObserver : nsISupports
{
/**
* Flag bits for argument to Observe() method.
*/
const long NOTIFY_AVAILABLE = 1 << 0; // Stream-as-file now available for reading
const long NOTIFY_ERROR = 1 << 1; // Error while loading stream / creating file
const long REQUEST_DELETION = 1 << 2; // Cache manager wishes to delete/truncate file
const long INVALIDATE = 1 << 3; // File is out-of-date
// Convenience value
const long MAKE_UNAVAILABLE = REQUEST_DELETION | INVALIDATE;
/**
* Receive either a notification or a request concerning a file that has
* been opened using stream-as-file. The aMessage and aError arguments
* have varying values depending on the nature of the notification.
* aMessage is set to NOTIFY_AVAILABLE when a complete stream has been read
* and stored on disk in a file. At that point, and no sooner, may the
* filename attribute of the associated nsIStreamAsFile be accessed via the
* associated nsIStreamAsFile interface. If the aMessage argument is
* NOTIFY_ERROR, the aError argument contains the relevant error code. If
* the aMessage argument is either REQUEST_DELETION or REQUEST_TRUNCATION,
* the callee should immediately Release() all references to the
* nsIStreamAsFile (and any references to its associated nsICachedNetData
* instances), unless it wishes to inhibit the requested file modification.
* If the aMessage argument is INVALIDATE, the cache manager is replacing
* the file with a more recent version. If a client wants to continue
* using the (now out-of-date) file, it must delete it when it has finished,
* as the cache manager will effectively relinquished ownership of the
* file.
*/
void ObserveStreamAsFile(in nsIStreamAsFile aStreamAsFile,
in PRUint32 aMessage,
in nsresult aError);
};

View File

@@ -1,39 +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 or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH = ..
MODULE = necko
DIRS= \
base \
dns \
build \
protocol \
socket \
util \
mime \
streamconv \
cache \
test \
$(NULL)
include <$(DEPTH)\config\rules.mak>

View File

@@ -1,32 +0,0 @@
/* -*- Mode: IDL; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#include "nsISupports.idl"
interface nsIAtom;
[scriptable, uuid(a3ec67f0-465a-11d3-9a89-0080c7cb1080)]
interface nsIHTTPHeader : nsISupports
{
nsIAtom GetField();
string GetValue();
};

View File

@@ -1,603 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsIStreamListener.h"
#include "nsIStreamObserver.h"
#include "nsIServiceManager.h"
#include "nsIInputStream.h"
#include "nsIOutputStream.h"
#include "nsIEventQueue.h"
#include "nsIEventQueueService.h"
#include "nsIChannel.h"
#include "nsCOMPtr.h"
#include "nsINetDataCache.h"
#include "nsINetDataCacheManager.h"
#include "nsICachedNetData.h"
// Number of test entries to be placed in the cache
// FIXME - temporary
#define NUM_CACHE_ENTRIES 25
// Cache content stream length will have random length between zero and
// MAX_CONTENT_LENGTH bytes
#define MAX_CONTENT_LENGTH 20000
// Limits, converted to KB
#define DISK_CACHE_CAPACITY ((MAX_CONTENT_LENGTH * 4) >> 10)
#define MEM_CACHE_CAPACITY ((MAX_CONTENT_LENGTH * 3) >> 10)
// Length of random-data cache entry URI key
#define CACHE_KEY_LENGTH 13
// Length of random-data cache entry secondary key
#define CACHE_SECONDARY_KEY_LENGTH 10
// Length of random-data cache entry meta-data
#define CACHE_PROTOCOL_PRIVATE_LENGTH 10
// Mapping from test case number to RecordID
static PRInt32 recordID[NUM_CACHE_ENTRIES];
static PRInt32
mapRecordIdToTestNum(PRInt32 aRecordID)
{
int i;
for (i = 0; i < NUM_CACHE_ENTRIES; i++) {
if (recordID[i] == aRecordID)
return i;
}
return -1;
}
// A supply of stream data to either store or compare with
class nsITestDataStream {
public:
virtual ~nsITestDataStream() {};
virtual PRUint32 Next() = 0;
virtual void Read(char* aBuf, PRUint32 aCount) = 0;
virtual void ReadString(char* aBuf, PRUint32 aCount) = 0;
virtual PRBool Match(char* aBuf, PRUint32 aCount) = 0;
virtual PRBool MatchString(char* aBuf, PRUint32 aCount) = 0;
virtual void Skip(PRUint32 aCount) = 0;
virtual void SkipString(PRUint32 aCount) = 0;
};
// A reproducible stream of random data.
class RandomStream : public nsITestDataStream {
public:
RandomStream(PRUint32 aSeed) {
mStartSeed = mState = aSeed;
}
PRUint32 GetStartSeed() {
return mStartSeed;
}
PRUint32 Next() {
mState = 1103515245 * mState + 12345 ^ (mState >> 16);
return mState;
}
PRUint8 NextChar() {
PRUint8 c;
do {
c = Next();
} while (!isalnum(c));
return c;
}
void Read(char* aBuf, PRUint32 aCount) {
PRUint32 i;
for (i = 0; i < aCount; i++) {
*aBuf++ = Next();
}
}
// Same as Read(), but using only printable chars and
// with a terminating NUL
void ReadString(char* aBuf, PRUint32 aCount) {
PRUint32 i;
for (i = 0; i < aCount; i++) {
*aBuf++ = NextChar();
}
*aBuf = 0;
}
PRBool
Match(char* aBuf, PRUint32 aCount) {
PRUint32 i;
for (i = 0; i < aCount; i++) {
if (*aBuf++ != (char)(Next() & 0xff))
return PR_FALSE;
}
return PR_TRUE;
}
PRBool
MatchString(char* aBuf, PRUint32 aCount) {
PRUint32 i;
for (i = 0; i < aCount; i++) {
if (*aBuf++ != (char)(NextChar() & 0xff))
return PR_FALSE;
}
// Check for terminating NUL character
if (*aBuf)
return PR_FALSE;
return PR_TRUE;
}
void
Skip(PRUint32 aCount) {
while (aCount--)
Next();
}
void
SkipString(PRUint32 aCount) {
while (aCount--)
NextChar();
}
protected:
PRUint32 mState;
PRUint32 mStartSeed;
};
static int gNumReaders = 0;
static PRUint32 gTotalBytesRead = 0;
static PRUint32 gTotalBytesWritten = 0;
static PRUint32 gTotalDuration = 0;
class nsReader : public nsIStreamListener {
public:
NS_DECL_ISUPPORTS
nsReader()
: mStartTime(0), mBytesRead(0)
{
NS_INIT_REFCNT();
gNumReaders++;
}
virtual ~nsReader() {
delete mTestDataStream;
gNumReaders--;
}
nsresult
Init(nsITestDataStream* aRandomStream, PRUint32 aExpectedStreamLength) {
mTestDataStream = aRandomStream;
mExpectedStreamLength = aExpectedStreamLength;
mRefCnt = 1;
return NS_OK;
}
NS_IMETHOD OnStartRequest(nsIChannel* channel,
nsISupports* context) {
mStartTime = PR_IntervalNow();
return NS_OK;
}
NS_IMETHOD OnDataAvailable(nsIChannel* channel,
nsISupports* context,
nsIInputStream *aIStream,
PRUint32 aSourceOffset,
PRUint32 aLength) {
char buf[1025];
while (aLength > 0) {
PRUint32 amt;
PRBool match;
aIStream->Read(buf, sizeof buf, &amt);
if (amt == 0) break;
aLength -= amt;
mBytesRead += amt;
match = mTestDataStream->Match(buf, amt);
NS_ASSERTION(match, "Stored data was corrupted on read");
}
return NS_OK;
}
NS_IMETHOD OnStopRequest(nsIChannel* channel,
nsISupports* context,
nsresult aStatus,
const PRUnichar* aMsg) {
PRIntervalTime endTime;
PRIntervalTime duration;
endTime = PR_IntervalNow();
duration = (endTime - mStartTime);
if (NS_FAILED(aStatus)) printf("channel failed.\n");
// printf("read %d bytes\n", mBytesRead);
//FIXME NS_ASSERTION(mBytesRead == mExpectedStreamLength,
// "Stream in cache is wrong length");
gTotalBytesRead += mBytesRead;
gTotalDuration += duration;
return NS_OK;
}
protected:
PRIntervalTime mStartTime;
PRUint32 mBytesRead;
nsITestDataStream* mTestDataStream;
PRUint32 mExpectedStreamLength;
};
NS_IMPL_ISUPPORTS2(nsReader, nsIStreamListener, nsIStreamObserver)
static nsIEventQueue* eventQueue;
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
nsresult
InitQueue() {
nsresult rv;
NS_WITH_SERVICE(nsIEventQueueService, eventQService, kEventQueueServiceCID, &rv);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get event queue service");
rv = eventQService->CreateThreadEventQueue();
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't create event queue");
rv = eventQService->GetThreadEventQueue(PR_CurrentThread(), &eventQueue);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get event queue for main thread");
return NS_OK;
}
// Process events until all streams are OnStopRequest'ed
nsresult
WaitForEvents() {
while (gNumReaders) {
eventQueue->ProcessPendingEvents();
}
return NS_OK;
}
// Read data for a single cache record and compare against testDataStream
nsresult
TestReadStream(nsICachedNetData *cacheEntry, nsITestDataStream *testDataStream,
PRUint32 expectedStreamLength)
{
nsCOMPtr<nsIChannel> channel;
nsresult rv;
PRUint32 actualContentLength;
rv = cacheEntry->NewChannel(0, 0, getter_AddRefs(channel));
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
rv = cacheEntry->GetStoredContentLength(&actualContentLength);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
// FIXME NS_ASSERTION(actualContentLength == expectedStreamLength,
// "nsICachedNetData::GetContentLength() busted ?");
nsReader *reader = new nsReader;
reader->AddRef();
rv = reader->Init(testDataStream, expectedStreamLength);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
rv = channel->AsyncRead(0, -1, 0, reader);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
reader->Release();
return NS_OK;
}
// Convert PRTime to unix-style time_t, i.e. seconds since the epoch
static PRUint32
convertPRTimeToSeconds(PRTime aTime64)
{
double fpTime;
LL_L2D(fpTime, aTime64);
return (PRUint32)(fpTime * 1e-6 + 0.5);
}
// Convert unix-style time_t, i.e. seconds since the epoch, to PRTime
static PRTime
convertSecondsToPRTime(PRUint32 aSeconds)
{
PRInt64 t64;
LL_L2I(t64, aSeconds);
LL_MUL(t64, t64, 1000000);
return t64;
}
// Read the test data that was written in FillCache(), checking for
// corruption, truncation.
nsresult
TestRead(nsINetDataCacheManager *aCache, PRUint32 aFlags)
{
nsresult rv;
PRBool inCache;
nsCOMPtr<nsICachedNetData> cacheEntry;
RandomStream *randomStream;
char uriCacheKey[CACHE_KEY_LENGTH];
char secondaryCacheKey[CACHE_SECONDARY_KEY_LENGTH];
char *storedUriKey;
PRUint32 testNum;
gTotalBytesRead = 0;
gTotalDuration = 0;
for (testNum = 0; testNum < NUM_CACHE_ENTRIES; testNum++) {
randomStream = new RandomStream(testNum);
randomStream->ReadString(uriCacheKey, sizeof uriCacheKey - 1);
randomStream->Read(secondaryCacheKey, sizeof secondaryCacheKey);
// Ensure that entry is in the cache
rv = aCache->Contains(uriCacheKey,
secondaryCacheKey, sizeof secondaryCacheKey,
aFlags, &inCache);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
NS_ASSERTION(inCache, "nsINetDataCacheManager::Contains error");
rv = aCache->GetCachedNetData(uriCacheKey,
secondaryCacheKey, sizeof secondaryCacheKey,
aFlags,
getter_AddRefs(cacheEntry));
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
// Test GetUriSpec() method
rv = cacheEntry->GetUriSpec(&storedUriKey);
NS_ASSERTION(NS_SUCCEEDED(rv) &&
!memcmp(storedUriKey, &uriCacheKey[0], sizeof uriCacheKey),
"nsICachedNetData::GetKey failed");
nsAllocator::Free(storedUriKey);
// Test GetSecondaryKey() method
PRUint32 storedSecondaryKeyLength;
char* storedSecondaryKey;
rv = cacheEntry->GetSecondaryKey(&storedSecondaryKeyLength, &storedSecondaryKey);
NS_ASSERTION(NS_SUCCEEDED(rv) &&
!memcmp(storedSecondaryKey, &secondaryCacheKey[0],
sizeof secondaryCacheKey),
"nsICachedNetData::GetSecondaryKey failed");
// Compare against stored protocol data
char *storedProtocolData;
PRUint32 storedProtocolDataLength;
rv = cacheEntry->GetAnnotation("test data", &storedProtocolDataLength, &storedProtocolData);
NS_ASSERTION(NS_SUCCEEDED(rv) &&
storedProtocolDataLength == CACHE_PROTOCOL_PRIVATE_LENGTH,
"nsICachedNetData::GetAnnotation() failed");
randomStream->Match(storedProtocolData, storedProtocolDataLength);
// Test GetAllowPartial()
PRBool allowPartial;
rv = cacheEntry->GetAllowPartial(&allowPartial);
NS_ASSERTION(NS_SUCCEEDED(rv) &&
(allowPartial == (PRBool)(randomStream->Next() & 1)),
"nsICachedNetData::GetAllowPartial() failed");
// Test GetExpirationTime()
PRTime expirationTime;
PRTime expectedExpirationTime = convertSecondsToPRTime(randomStream->Next() & 0xffffff);
rv = cacheEntry->GetExpirationTime(&expirationTime);
NS_ASSERTION(NS_SUCCEEDED(rv) && LL_EQ(expirationTime, expectedExpirationTime),
"nsICachedNetData::GetExpirationTime() failed");
PRUint32 expectedStreamLength = randomStream->Next() % MAX_CONTENT_LENGTH;
TestReadStream(cacheEntry, randomStream, expectedStreamLength);
}
WaitForEvents();
// Compute rate in MB/s
double rate = gTotalBytesRead / PR_IntervalToMilliseconds(gTotalDuration);
rate *= NUM_CACHE_ENTRIES;
rate *= 1000;
rate /= (1024 * 1024);
printf("Read %7d bytes at a rate of %5.1f MB per second \n",
gTotalBytesRead, rate);
return NS_OK;
}
// Create entries in the network data cache, using random data for the
// key, the meta-data and the stored content data.
nsresult
FillCache(nsINetDataCacheManager *aCache, PRUint32 aFlags, PRUint32 aCacheCapacity)
{
nsresult rv;
PRBool inCache;
nsCOMPtr<nsICachedNetData> cacheEntry;
nsCOMPtr<nsIChannel> channel;
nsCOMPtr<nsIOutputStream> outStream;
nsCOMPtr<nsINetDataCache> containingCache;
char buf[1000];
PRUint32 protocolDataLength;
char cacheKey[CACHE_KEY_LENGTH];
char secondaryCacheKey[CACHE_SECONDARY_KEY_LENGTH];
char protocolData[CACHE_PROTOCOL_PRIVATE_LENGTH];
PRUint32 testNum;
RandomStream *randomStream;
gTotalBytesWritten = 0;
PRIntervalTime startTime = PR_IntervalNow();
for (testNum = 0; testNum < NUM_CACHE_ENTRIES; testNum++) {
randomStream = new RandomStream(testNum);
randomStream->ReadString(cacheKey, sizeof cacheKey - 1);
randomStream->Read(secondaryCacheKey, sizeof secondaryCacheKey);
// No entry should be in cache until we add it
rv = aCache->Contains(cacheKey,
secondaryCacheKey, sizeof secondaryCacheKey,
aFlags, &inCache);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
NS_ASSERTION(!inCache, "nsINetDataCacheManager::Contains error");
rv = aCache->GetCachedNetData(cacheKey,
secondaryCacheKey, sizeof secondaryCacheKey,
aFlags,
getter_AddRefs(cacheEntry));
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't access cacheEntry via cache key");
// Test nsINetDataCacheManager::GetNumEntries()
PRUint32 numEntries = (PRUint32)-1;
rv = aCache->GetNumEntries(&numEntries);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get number of cache entries");
NS_ASSERTION(numEntries == testNum + 1, "GetNumEntries failure");
// Record meta-data should be initially empty
char *protocolDatap;
rv = cacheEntry->GetAnnotation("test data", &protocolDataLength, &protocolDatap);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
if ((protocolDataLength != 0) || (protocolDatap != 0))
return NS_ERROR_FAILURE;
// Store random data as meta-data
randomStream->Read(protocolData, sizeof protocolData);
cacheEntry->SetAnnotation("test data", sizeof protocolData, protocolData);
// Store random data as allow-partial flag
PRBool allowPartial = randomStream->Next() & 1;
rv = cacheEntry->SetAllowPartial(allowPartial);
NS_ASSERTION(NS_SUCCEEDED(rv),
"nsICachedNetData::SetAllowPartial() failed");
// Store random data as expiration time
PRTime expirationTime = convertSecondsToPRTime(randomStream->Next() & 0xffffff);
rv = cacheEntry->SetExpirationTime(expirationTime);
NS_ASSERTION(NS_SUCCEEDED(rv),
"nsICachedNetData::SetExpirationTime() failed");
// Cache manager complains if expiration set without setting last-modified time
rv = cacheEntry->SetLastModifiedTime(expirationTime);
rv = cacheEntry->NewChannel(0, 0, getter_AddRefs(channel));
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
rv = cacheEntry->GetCache(getter_AddRefs(containingCache));
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
rv = channel->OpenOutputStream(0, getter_AddRefs(outStream));
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
int streamLength = randomStream->Next() % MAX_CONTENT_LENGTH;
int remaining = streamLength;
while (remaining) {
PRUint32 numWritten;
int amount = PR_MIN(sizeof buf, remaining);
randomStream->Read(buf, amount);
rv = outStream->Write(buf, amount, &numWritten);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
NS_ASSERTION(numWritten == (PRUint32)amount, "Write() bug?");
remaining -= amount;
PRUint32 storageInUse;
rv = containingCache->GetStorageInUse(&storageInUse);
NS_ASSERTION(NS_SUCCEEDED(rv) && (storageInUse <= aCacheCapacity),
"Cache manager failed to limit cache growth");
}
outStream->Close();
gTotalBytesWritten += streamLength;
// *Now* there should be an entry in the cache
rv = aCache->Contains(cacheKey,
secondaryCacheKey, sizeof secondaryCacheKey,
aFlags, &inCache);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
NS_ASSERTION(inCache, "nsINetDataCacheManager::Contains error");
delete randomStream;
}
PRIntervalTime endTime = PR_IntervalNow();
// Compute rate in MB/s
double rate = gTotalBytesWritten / PR_IntervalToMilliseconds(endTime - startTime);
rate *= 1000;
rate /= (1024 * 1024);
printf("Wrote %7d bytes at a rate of %5.1f MB per second \n",
gTotalBytesWritten, rate);
return NS_OK;
}
nsresult NS_AutoregisterComponents()
{
nsresult rv = nsComponentManager::AutoRegister(nsIComponentManager::NS_Startup,
NULL /* default */);
return rv;
}
nsresult
Test(nsINetDataCacheManager *aCache, PRUint32 aFlags, PRUint32 aCacheCapacity)
{
nsresult rv;
rv = aCache->RemoveAll();
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't clear cache");
PRUint32 numEntries = (PRUint32)-1;
rv = aCache->GetNumEntries(&numEntries);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get number of cache entries");
NS_ASSERTION(numEntries == 0, "Couldn't clear cache");
rv = FillCache(aCache, aFlags, aCacheCapacity);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't fill cache with random test data");
rv = TestRead(aCache, aFlags);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't read random test data from cache");
rv = aCache->RemoveAll();
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't clear cache");
rv = aCache->GetNumEntries(&numEntries);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get number of cache entries");
NS_ASSERTION(numEntries == 0, "Couldn't clear cache");
return 0;
}
int
main(int argc, char* argv[])
{
nsresult rv;
nsCOMPtr<nsINetDataCacheManager> cache;
rv = NS_AutoregisterComponents();
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't register XPCOM components");
rv = nsComponentManager::CreateInstance(NS_NETWORK_CACHE_MANAGER_PROGID,
nsnull,
NS_GET_IID(nsINetDataCacheManager),
getter_AddRefs(cache));
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't create cache manager factory") ;
cache->SetDiskCacheCapacity(DISK_CACHE_CAPACITY);
cache->SetMemCacheCapacity(MEM_CACHE_CAPACITY);
InitQueue();
Test(cache, nsINetDataCacheManager::BYPASS_PERSISTENT_CACHE, MEM_CACHE_CAPACITY);
Test(cache, nsINetDataCacheManager::BYPASS_MEMORY_CACHE, DISK_CACHE_CAPACITY);
return 0;
}

View File

@@ -1,820 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsIStreamListener.h"
#include "nsIStreamObserver.h"
#include "nsIServiceManager.h"
#include "nsIInputStream.h"
#include "nsIOutputStream.h"
#include "nsIEventQueue.h"
#include "nsIEventQueueService.h"
#include "nsIChannel.h"
#include "nsCOMPtr.h"
#include "nsString.h"
#include <stdio.h>
#include "nsINetDataCache.h"
#include "nsINetDataDiskCache.h"
#include "nsINetDataCacheRecord.h"
#include "nsMemCacheCID.h"
// file cache include
#include "nsNetDiskCacheCID.h"
#include "nsIPref.h"
#include "prenv.h"
#include "nsIFileStream.h"
// Number of test entries to be placed in the cache
#define NUM_CACHE_ENTRIES 250
// Cache content stream length will have random length between zero and
// MAX_CONTENT_LENGTH bytes
#define MAX_CONTENT_LENGTH 20000
// Length of random-data cache entry key
#define CACHE_KEY_LENGTH 15
// Length of random-data cache entry meta-data
#define CACHE_METADATA_LENGTH 100
static NS_DEFINE_CID(kMemCacheCID, NS_MEM_CACHE_FACTORY_CID);
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
// file cache cid
static NS_DEFINE_CID(kDiskCacheCID, NS_NETDISKCACHE_CID) ;
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
static NS_DEFINE_IID(kIPrefIID, NS_IPREF_IID);
// Mapping from test case number to RecordID
static PRInt32 recordID[NUM_CACHE_ENTRIES];
static PRInt32
mapRecordIdToTestNum(PRInt32 aRecordID)
{
int i;
for (i = 0; i < NUM_CACHE_ENTRIES; i++) {
if (recordID[i] == aRecordID)
return i;
}
return -1;
}
// A supply of stream data to either store or compare with
class nsITestDataStream {
public:
virtual ~nsITestDataStream() {};
virtual PRUint32 Next() = 0;
virtual void Read(char* aBuf, PRUint32 aCount) = 0;
virtual PRBool Match(char* aBuf, PRUint32 aCount) = 0;
virtual void Skip(PRUint32 aCount) = 0;
};
// A reproducible stream of random data.
class RandomStream : public nsITestDataStream {
public:
RandomStream(PRUint32 aSeed) {
mStartSeed = mState = aSeed;
}
PRUint32 GetStartSeed() {
return mStartSeed;
}
PRUint32 Next() {
mState = 1103515245 * mState + 12345;
return mState;
}
void Read(char* aBuf, PRUint32 aCount) {
PRUint32 i;
for (i = 0; i < aCount; i++) {
*aBuf++ = Next();
}
}
PRBool
Match(char* aBuf, PRUint32 aCount) {
PRUint32 i;
for (i = 0; i < aCount; i++) {
if (*aBuf++ != (char)(Next() & 0xff))
return PR_FALSE;
}
return PR_TRUE;
}
void
Skip(PRUint32 aCount) {
while (aCount--)
Next();
}
protected:
PRUint32 mState;
PRUint32 mStartSeed;
};
// A stream of data that increments on each byte that is read, modulo 256
class CounterStream : public nsITestDataStream {
public:
CounterStream(PRUint32 aSeed) {
mStartSeed = mState = aSeed;
}
PRUint32 GetStartSeed() {
return mStartSeed;
}
PRUint32 Next() {
mState += 1;
mState &= 0xff;
return mState;
}
void Read(char* aBuf, PRUint32 aCount) {
PRUint32 i;
for (i = 0; i < aCount; i++) {
*aBuf++ = Next();
}
}
PRBool
Match(char* aBuf, PRUint32 aCount) {
PRUint32 i;
for (i = 0; i < aCount; i++) {
if (*aBuf++ != (char)Next())
return PR_FALSE;
}
return PR_TRUE;
}
void
Skip(PRUint32 aCount) {
mState += aCount;
mState &= 0xff;
}
protected:
PRUint32 mState;
PRUint32 mStartSeed;
};
static int gNumReaders = 0;
static PRUint32 gTotalBytesRead = 0;
static PRUint32 gTotalDuration = 0;
class nsReader : public nsIStreamListener {
public:
NS_DECL_ISUPPORTS
nsReader()
: mStartTime(0), mBytesRead(0)
{
NS_INIT_REFCNT();
gNumReaders++;
}
virtual ~nsReader() {
delete mTestDataStream;
gNumReaders--;
}
nsresult
Init(nsITestDataStream* aRandomStream, PRUint32 aExpectedStreamLength) {
mTestDataStream = aRandomStream;
mExpectedStreamLength = aExpectedStreamLength;
mRefCnt = 1;
return NS_OK;
}
NS_IMETHOD OnStartRequest(nsIChannel* channel,
nsISupports* context) {
mStartTime = PR_IntervalNow();
return NS_OK;
}
NS_IMETHOD OnDataAvailable(nsIChannel* channel,
nsISupports* context,
nsIInputStream *aIStream,
PRUint32 aSourceOffset,
PRUint32 aLength) {
char buf[1025];
while (aLength > 0) {
PRUint32 amt;
PRBool match;
aIStream->Read(buf, sizeof buf, &amt);
if (amt == 0) break;
aLength -= amt;
mBytesRead += amt;
match = mTestDataStream->Match(buf, amt);
NS_ASSERTION(match, "Stored data was corrupted on read");
}
return NS_OK;
}
NS_IMETHOD OnStopRequest(nsIChannel* channel,
nsISupports* context,
nsresult aStatus,
const PRUnichar* aMsg) {
PRIntervalTime endTime;
PRIntervalTime duration;
endTime = PR_IntervalNow();
duration = (endTime - mStartTime);
if (NS_FAILED(aStatus)) printf("channel failed.\n");
// printf("read %d bytes\n", mBytesRead);
NS_ASSERTION(mBytesRead == mExpectedStreamLength,
"Stream in cache is wrong length");
gTotalBytesRead += mBytesRead;
gTotalDuration += duration;
return NS_OK;
}
protected:
PRIntervalTime mStartTime;
PRUint32 mBytesRead;
nsITestDataStream* mTestDataStream;
PRUint32 mExpectedStreamLength;
};
NS_IMPL_ISUPPORTS2(nsReader, nsIStreamListener, nsIStreamObserver)
static nsIEventQueue* eventQueue;
nsresult
InitQueue() {
nsresult rv;
NS_WITH_SERVICE(nsIEventQueueService, eventQService, kEventQueueServiceCID, &rv);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get event queue service");
rv = eventQService->CreateThreadEventQueue();
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't create event queue");
rv = eventQService->GetThreadEventQueue(PR_CurrentThread(), &eventQueue);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get event queue for main thread");
return NS_OK;
}
// Process events until all streams are OnStopRequest'ed
nsresult
WaitForEvents() {
while (gNumReaders) {
eventQueue->ProcessPendingEvents();
}
return NS_OK;
}
// Read data for a single cache record and compare against testDataStream
nsresult
TestReadStream(nsINetDataCacheRecord *record, nsITestDataStream *testDataStream,
PRUint32 expectedStreamLength)
{
nsCOMPtr<nsIChannel> channel;
nsresult rv;
PRUint32 actualContentLength;
rv = record->NewChannel(0, getter_AddRefs(channel));
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
rv = record->GetStoredContentLength(&actualContentLength);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
NS_ASSERTION(actualContentLength == expectedStreamLength,
"nsINetDataCacheRecord::GetContentLength() busted ?");
nsReader *reader = new nsReader;
rv = reader->Init(testDataStream, expectedStreamLength);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
rv = channel->AsyncRead(0, -1, 0, reader);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
reader->Release();
return NS_OK;
}
// Check that records can be retrieved using their record-ID, in addition
// to using the opaque key.
nsresult
TestRecordID(nsINetDataCache *cache)
{
nsresult rv;
nsCOMPtr<nsINetDataCacheRecord> record;
RandomStream *randomStream;
PRUint32 metaDataLength;
char cacheKey[CACHE_KEY_LENGTH];
char *metaData;
PRUint32 testNum;
PRBool match;
for (testNum = 0; testNum < NUM_CACHE_ENTRIES; testNum++) {
randomStream = new RandomStream(testNum);
randomStream->Read(cacheKey, sizeof cacheKey);
rv = cache->GetCachedNetDataByID(recordID[testNum], getter_AddRefs(record));
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't obtain record using record ID");
// Match against previously stored meta-data
rv = record->GetMetaData(&metaDataLength, &metaData);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get record meta-data");
match = randomStream->Match(metaData, metaDataLength);
NS_ASSERTION(match, "Meta-data corrupted or incorrect");
nsAllocator::Free(metaData);
delete randomStream;
}
return NS_OK;
}
// Check that all cache entries in the database are enumerated and that
// no duplicates appear.
nsresult
TestEnumeration(nsINetDataCache *cache)
{
nsresult rv;
nsCOMPtr<nsINetDataCacheRecord> record;
nsCOMPtr<nsISupports> tempISupports;
nsCOMPtr<nsISimpleEnumerator> iterator;
RandomStream *randomStream;
PRUint32 metaDataLength;
char cacheKey[CACHE_KEY_LENGTH];
char *metaData;
PRUint32 testNum;
PRBool match;
PRInt32 recID;
int numRecords = 0;
// Iterate over all records in the cache
rv = cache->NewCacheEntryIterator(getter_AddRefs(iterator));
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't create new cache entry iterator");
PRBool notDone;
while (1) {
// Done iterating ?
rv = iterator->HasMoreElements(&notDone);
if (NS_FAILED(rv)) return rv;
if (!notDone)
break;
// Get next record in iteration
rv = iterator->GetNext(getter_AddRefs(tempISupports));
NS_ASSERTION(NS_SUCCEEDED(rv), "iterator bustage");
record = do_QueryInterface(tempISupports);
numRecords++;
// Get record ID
rv = record->GetRecordID(&recID);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get Record ID");
testNum = mapRecordIdToTestNum(recID);
NS_ASSERTION(testNum != -1, "Corrupted Record ID ?");
// Erase mapping from table, so that duplicate enumerations are detected
recordID[testNum] = -1;
// Make sure stream matches test data
randomStream = new RandomStream(testNum);
randomStream->Read(cacheKey, sizeof cacheKey);
// Match against previously stored meta-data
rv = record->GetMetaData(&metaDataLength, &metaData);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get record meta-data");
match = randomStream->Match(metaData, metaDataLength);
NS_ASSERTION(match, "Meta-data corrupted or incorrect");
nsAllocator::Free(metaData);
delete randomStream;
}
NS_ASSERTION(numRecords == NUM_CACHE_ENTRIES, "Iteration bug");
return NS_OK;
}
// Read the test data that was written in FillCache(), checking for
// corruption, truncation.
nsresult
TestRead(nsINetDataCache *cache)
{
nsresult rv;
PRBool inCache;
nsCOMPtr<nsINetDataCacheRecord> record;
RandomStream *randomStream;
PRUint32 metaDataLength;
char cacheKey[CACHE_KEY_LENGTH];
char *metaData, *storedCacheKey;
PRUint32 testNum, storedCacheKeyLength;
PRBool match;
for (testNum = 0; testNum < NUM_CACHE_ENTRIES; testNum++) {
randomStream = new RandomStream(testNum);
randomStream->Read(cacheKey, sizeof cacheKey);
// Ensure that entry is in the cache
rv = cache->Contains(cacheKey, sizeof cacheKey, &inCache);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
NS_ASSERTION(inCache, "nsINetDataCache::Contains error");
rv = cache->GetCachedNetData(cacheKey, sizeof cacheKey, getter_AddRefs(record));
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
// Match against previously stored meta-data
match = record->GetMetaData(&metaDataLength, &metaData);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
match = randomStream->Match(metaData, metaDataLength);
NS_ASSERTION(match, "Meta-data corrupted or incorrect");
nsAllocator::Free(metaData);
// Test GetKey() method
rv = record->GetKey(&storedCacheKeyLength, &storedCacheKey);
NS_ASSERTION(NS_SUCCEEDED(rv) &&
(storedCacheKeyLength == sizeof cacheKey) &&
!memcmp(storedCacheKey, &cacheKey[0], sizeof cacheKey),
"nsINetDataCacheRecord::GetKey failed");
nsAllocator::Free(storedCacheKey);
PRUint32 expectedStreamLength = randomStream->Next() % MAX_CONTENT_LENGTH;
TestReadStream(record, randomStream, expectedStreamLength);
}
WaitForEvents();
// Compute rate in MB/s
double rate = gTotalBytesRead / PR_IntervalToMilliseconds(gTotalDuration);
rate *= NUM_CACHE_ENTRIES;
rate *= 1000;
rate /= (1024 * 1024);
printf("Read %d bytes at a rate of %5.1f MB per second \n",
gTotalBytesRead, rate);
return NS_OK;
}
// Repeatedly call SetStoredContentLength() on a cache entry and make
// read the stream's data to ensure that it's not corrupted by the effect
nsresult
TestTruncation(nsINetDataCache *cache)
{
nsresult rv;
nsCOMPtr<nsINetDataCacheRecord> record;
RandomStream *randomStream;
char cacheKey[CACHE_KEY_LENGTH];
randomStream = new RandomStream(0);
randomStream->Read(cacheKey, sizeof cacheKey);
rv = cache->GetCachedNetData(cacheKey, sizeof cacheKey, getter_AddRefs(record));
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
randomStream->Skip(CACHE_METADATA_LENGTH);
PRUint32 initialStreamLength = randomStream->Next() % MAX_CONTENT_LENGTH;
delete randomStream;
PRUint32 i;
PRUint32 delta = initialStreamLength / 64;
for (i = initialStreamLength; i >= delta; i -= delta) {
PRUint32 expectedStreamLength = i;
// Do the truncation
record->SetStoredContentLength(expectedStreamLength);
randomStream = new RandomStream(0);
randomStream->Skip(CACHE_KEY_LENGTH + CACHE_METADATA_LENGTH + 1);
PRUint32 afterContentLength;
rv = record->GetStoredContentLength(&afterContentLength);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
NS_ASSERTION(afterContentLength == expectedStreamLength,
"nsINetDataCacheRecord::SetContentLength() failed to truncate record");
TestReadStream(record, randomStream, expectedStreamLength);
WaitForEvents();
}
return NS_OK;
}
// Write known data to random offsets in a single cache entry and test
// resulting stream for correctness.
nsresult
TestOffsetWrites(nsINetDataCache *cache)
{
nsresult rv;
nsCOMPtr<nsINetDataCacheRecord> record;
nsCOMPtr<nsIChannel> channel;
nsCOMPtr<nsIOutputStream> outStream;
char buf[512];
char cacheKey[CACHE_KEY_LENGTH];
RandomStream *randomStream;
randomStream = new RandomStream(0);
randomStream->Read(cacheKey, sizeof cacheKey);
rv = cache->GetCachedNetData(cacheKey, sizeof cacheKey, getter_AddRefs(record));
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't access record via opaque cache key");
// Write buffer-fulls of data at random offsets into the cache entry.
// Data written is (offset % 0xff)
PRUint32 startingOffset;
PRUint32 streamLength = 0;
CounterStream *counterStream;
int i;
for (i = 0; i < 100; i++) {
rv = record->NewChannel(0, getter_AddRefs(channel));
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
startingOffset = streamLength ? streamLength - (randomStream->Next() % sizeof buf): 0;
rv = channel->OpenOutputStream(startingOffset, getter_AddRefs(outStream));
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
counterStream = new CounterStream(startingOffset);
counterStream->Read(buf, sizeof buf);
PRUint32 numWritten;
rv = outStream->Write(buf, sizeof buf, &numWritten);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
NS_ASSERTION(numWritten == sizeof buf, "Write() bug?");
streamLength = startingOffset + sizeof buf;
rv = outStream->Close();
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't close channel");
delete counterStream;
}
delete randomStream;
counterStream = new CounterStream(0);
TestReadStream(record, counterStream, streamLength);
WaitForEvents();
return NS_OK;
}
// Create entries in the network data cache, using random data for the
// key, the meta-data and the stored content data.
nsresult
FillCache(nsINetDataCache *cache)
{
nsresult rv;
PRBool inCache;
nsCOMPtr<nsINetDataCacheRecord> record;
nsCOMPtr<nsIChannel> channel;
nsCOMPtr<nsIOutputStream> outStream;
char buf[1000];
PRUint32 metaDataLength;
char cacheKey[CACHE_KEY_LENGTH];
char metaData[CACHE_METADATA_LENGTH];
PRUint32 testNum;
char *data;
RandomStream *randomStream;
PRUint32 totalBytesWritten = 0;
PRIntervalTime startTime = PR_IntervalNow();
for (testNum = 0; testNum < NUM_CACHE_ENTRIES; testNum++) {
randomStream = new RandomStream(testNum);
randomStream->Read(cacheKey, sizeof cacheKey);
// No entry should be in cache until we add it
rv = cache->Contains(cacheKey, sizeof cacheKey, &inCache);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
NS_ASSERTION(!inCache, "nsINetDataCache::Contains error");
rv = cache->GetCachedNetData(cacheKey, sizeof cacheKey, getter_AddRefs(record));
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't access record via opaque cache key");
// Test nsINetDataCacheRecord::GetRecordID()
rv = record->GetRecordID(&recordID[testNum]);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get Record ID");
// Test nsINetDataCache::GetNumEntries()
PRUint32 numEntries = (PRUint32)-1;
rv = cache->GetNumEntries(&numEntries);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get number of cache entries");
NS_ASSERTION(numEntries == testNum + 1, "GetNumEntries failure");
// Record meta-data should be initially empty
rv = record->GetMetaData(&metaDataLength, &data);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
if ((metaDataLength != 0) || (data != 0))
return NS_ERROR_FAILURE;
// Store random data as meta-data
randomStream->Read(metaData, sizeof metaData);
record->SetMetaData(sizeof metaData, metaData);
rv = record->NewChannel(0, getter_AddRefs(channel));
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
rv = channel->OpenOutputStream(0, getter_AddRefs(outStream));
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
PRUint32 beforeOccupancy;
rv = cache->GetStorageInUse(&beforeOccupancy);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get cache occupancy");
int streamLength = randomStream->Next() % MAX_CONTENT_LENGTH;
int remaining = streamLength;
while (remaining) {
PRUint32 numWritten;
int amount = PR_MIN(sizeof buf, remaining);
randomStream->Read(buf, amount);
rv = outStream->Write(buf, amount, &numWritten);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
NS_ASSERTION(numWritten == (PRUint32)amount, "Write() bug?");
remaining -= amount;
}
outStream->Close();
totalBytesWritten += streamLength;
PRUint32 afterOccupancy;
rv = cache->GetStorageInUse(&afterOccupancy);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get cache occupancy");
PRUint32 streamLengthInKB = streamLength >> 10;
NS_ASSERTION((afterOccupancy - beforeOccupancy) >= streamLengthInKB,
"nsINetDataCache::GetStorageInUse() is busted");
// *Now* there should be an entry in the cache
rv = cache->Contains(cacheKey, sizeof cacheKey, &inCache);
NS_ASSERTION(NS_SUCCEEDED(rv), " ");
NS_ASSERTION(inCache, "nsINetDataCache::Contains error");
delete randomStream;
}
PRIntervalTime endTime = PR_IntervalNow();
// Compute rate in MB/s
double rate = totalBytesWritten / PR_IntervalToMilliseconds(endTime - startTime);
rate *= 1000;
rate /= (1024 * 1024);
printf("Wrote %7d bytes at a rate of %5.1f MB per second \n",
totalBytesWritten, rate);
return NS_OK;
}
nsresult NS_AutoregisterComponents()
{
nsresult rv = nsComponentManager::AutoRegister(nsIComponentManager::NS_Startup,
NULL /* default */);
return rv;
}
PRBool initPref ()
{
nsresult rv;
NS_WITH_SERVICE(nsIPref, prefPtr, kPrefCID, &rv);
if (NS_FAILED(rv))
return false;
nsCOMPtr<nsIFileSpec> fileSpec;
rv = NS_NewFileSpec (getter_AddRefs(fileSpec));
if (NS_FAILED(rv))
return false;
nsCString defaultPrefFile = PR_GetEnv ("MOZILLA_FIVE_HOME");
if (defaultPrefFile.Length())
defaultPrefFile += "/";
else
defaultPrefFile = "./";
defaultPrefFile += "default_prefs.js";
fileSpec->SetUnixStyleFilePath (defaultPrefFile.GetBuffer());
PRBool exists = false;
fileSpec->Exists(&exists);
if (exists)
prefPtr->ReadUserPrefsFrom(fileSpec);
else
return false;
return true;
}
int
main(int argc, char* argv[])
{
nsresult rv;
if(argc <2) {
printf(" %s -f to test filecache\n", argv[0]) ;
printf(" %s -m to test memcache\n", argv[0]) ;
return -1 ;
}
rv = NS_AutoregisterComponents();
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't register XPCOM components");
nsCOMPtr<nsINetDataCache> cache;
if (PL_strcasecmp(argv[1], "-m") == 0) {
rv = nsComponentManager::CreateInstance(kMemCacheCID, nsnull,
NS_GET_IID(nsINetDataCache),
getter_AddRefs(cache));
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't create memory cache factory");
} else if (PL_strcasecmp(argv[1], "-f") == 0) {
nsCOMPtr<nsINetDataDiskCache> diskcache ;
rv = nsComponentManager::CreateInstance(kDiskCacheCID, nsnull,
NS_GET_IID(nsINetDataDiskCache),
getter_AddRefs(diskcache));
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't create disk cache factory") ;
nsCOMPtr<nsIFileSpec> folder ;
NS_NewFileSpec(getter_AddRefs(folder)) ;
folder->SetUnixStyleFilePath("/tmp") ;
diskcache->SetDiskCacheFolder(folder) ;
cache = diskcache ;
} else {
printf(" %s -f to test filecache\n", argv[0]) ;
printf(" %s -m to test memcache\n", argv[0]) ;
return -1 ;
}
InitQueue();
PRUnichar* description;
rv = cache->GetDescription(&description);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get cache description");
nsCAutoString descStr(description);
printf("Testing: %s\n", descStr.GetBuffer());
rv = cache->RemoveAll();
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't clear cache");
PRUint32 startOccupancy;
rv = cache->GetStorageInUse(&startOccupancy);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get cache occupancy");
PRUint32 numEntries = (PRUint32)-1;
rv = cache->GetNumEntries(&numEntries);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get number of cache entries");
NS_ASSERTION(numEntries == 0, "Couldn't clear cache");
rv = FillCache(cache);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't fill cache with random test data");
rv = TestRead(cache);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't read random test data from cache");
rv = TestRecordID(cache);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't index records using record ID");
rv = TestEnumeration(cache);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't successfully enumerate records");
rv = TestTruncation(cache);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't successfully truncate records");
rv = TestOffsetWrites(cache);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't successfully write to records using non-zero offsets");
rv = cache->RemoveAll();
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't clear cache");
rv = cache->GetNumEntries(&numEntries);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get number of cache entries");
NS_ASSERTION(numEntries == 0, "Couldn't clear cache");
PRUint32 endOccupancy;
rv = cache->GetStorageInUse(&endOccupancy);
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't get cache occupancy");
NS_ASSERTION(startOccupancy == endOccupancy, "Cache occupancy not correctly computed ?");
return 0;
}

View File

@@ -1,82 +0,0 @@
#!nmake
#
# 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 mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..
MAKE_OBJ_TYPE = EXE
PROG1 = .\$(OBJDIR)\TestFileInput.exe
PROG2 = .\$(OBJDIR)\TestSocketInput.exe
PROG3 = .\$(OBJDIR)\TestSocketIO.exe
PROG4 = .\$(OBJDIR)\TestProtocols.exe
PROG5 = .\$(OBJDIR)\TestSocketTransport.exe
PROG6 = .\$(OBJDIR)\urltest.exe
PROG7 = .\$(OBJDIR)\TestFileInput2.exe
PROG8 = .\$(OBJDIR)\TestFileTransport.exe
PROG9 = .\$(OBJDIR)\TestRes.exe
PROGA = .\$(OBJDIR)\TestRawCache.exe
PROGB = .\$(OBJDIR)\TestCacheMgr.exe
PROGRAMS = \
#$(PROG1) $(PROG2) $(PROG3) $(PROG4) $(PROG5) $(PROG6) $(PROG7) $(PROG8) $(PROG9)\
$(PROGA) $(PROGB)
LCFLAGS=-DUSE_NSREG -GX
REQUIRES=libreg
INCS = $(INCS) \
-I$(DEPTH)\dist\include \
$(NULL)
LLIBS= \
$(DIST)\lib\xpcom.lib \
$(LIBNSPR) \
$(NULL)
include <$(DEPTH)\config\rules.mak>
install:: $(PROGRAMS)
-for %p in ($(PROGRAMS)) do $(MAKE_INSTALL) %p $(DIST)\bin
clobber::
-for %p in ($(PROGRAMS)) do $(RM) %p $(DIST)\bin\%p
$(PROG1): $(OBJDIR) TestFileInput.cpp
$(PROG2): $(OBJDIR) TestSocketInput.cpp
$(PROG3): $(OBJDIR) TestSocketIO.cpp
$(PROG4): $(OBJDIR) TestProtocols.cpp
$(PROG5): $(OBJDIR) TestSocketTransport.cpp
$(PROG6): $(OBJDIR) urltest.cpp
$(PROG7): $(OBJDIR) TestFileInput2.cpp
$(PROG8): $(OBJDIR) TestFileTransport.cpp
$(PROG9): $(OBJDIR) TestRes.cpp
$(PROGA): $(OBJDIR) TestRawCache.cpp
$(PROGB): $(OBJDIR) TestCacheMgr.cpp

File diff suppressed because it is too large Load Diff

View File

@@ -1,226 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#ifndef nsError_h
#define nsError_h
#ifndef prtypes_h___
#include "prtypes.h"
#endif
/**
* Generic result data type
*/
typedef PRUint32 nsresult;
/*
* To add error code to your module, you need to do the following:
*
* 1) Add a module offset code. Add yours to the bottom of the list
* right below this comment, adding 1.
*
* 2) In your module, define a header file which uses one of the
* NE_ERROR_GENERATExxxxxx macros. Some examples below:
*
* #define NS_ERROR_MYMODULE_MYERROR1 NS_ERROR_GENERATE(NS_ERROR_SEVERITY_ERROR,NS_ERROR_MODULE_MYMODULE,1)
* #define NS_ERROR_MYMODULE_MYERROR2 NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_MYMODULE,2)
* #define NS_ERROR_MYMODULE_MYERROR3 NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_MYMODULE,3)
*
*/
/**
* @name Standard Module Offset Code. Each Module should identify a unique number
* and then all errors associated with that module become offsets from the
* base associated with that module id. There are 16 bits of code bits for
* each module.
*/
#define NS_ERROR_MODULE_XPCOM 1
#define NS_ERROR_MODULE_BASE 2
#define NS_ERROR_MODULE_GFX 3
#define NS_ERROR_MODULE_WIDGET 4
#define NS_ERROR_MODULE_CALENDAR 5
#define NS_ERROR_MODULE_NETWORK 6
#define NS_ERROR_MODULE_PLUGINS 7
#define NS_ERROR_MODULE_LAYOUT 8
#define NS_ERROR_MODULE_HTMLPARSER 9
#define NS_ERROR_MODULE_RDF 10
#define NS_ERROR_MODULE_UCONV 11
#define NS_ERROR_MODULE_REG 12
#define NS_ERROR_MODULE_FILES 13
#define NS_ERROR_MODULE_DOM 14
#define NS_ERROR_MODULE_IMGLIB 15
#define NS_ERROR_MODULE_MAILNEWS 16
#define NS_ERROR_MODULE_EDITOR 17
#define NS_ERROR_MODULE_XPCONNECT 18
/**
* @name Standard Error Handling Macros
*/
#define NS_FAILED(_nsresult) ((_nsresult) & 0x80000000)
#define NS_SUCCEEDED(_nsresult) (!((_nsresult) & 0x80000000))
/**
* @name Severity Code. This flag identifies the level of warning
*/
#define NS_ERROR_SEVERITY_SUCCESS 0
#define NS_ERROR_SEVERITY_ERROR 1
/**
* @name Mozilla Code. This flag separates consumers of mozilla code
* from the native platform
*/
#define NS_ERROR_MODULE_BASE_OFFSET 0x45
/**
* @name Standard Error Generating Macros
*/
#define NS_ERROR_GENERATE(sev,module,code) \
((nsresult) (((PRUint32)(sev)<<31) | ((PRUint32)(module+NS_ERROR_MODULE_BASE_OFFSET)<<16) | ((PRUint32)(code))) )
#define NS_ERROR_GENERATE_SUCCESS(module,code) \
((nsresult) (((PRUint32)(NS_ERROR_SEVERITY_SUCCESS)<<31) | ((PRUint32)(module+NS_ERROR_MODULE_BASE_OFFSET)<<16) | ((PRUint32)(code))) )
#define NS_ERROR_GENERATE_FAILURE(module,code) \
((nsresult) (((PRUint32)(NS_ERROR_SEVERITY_ERROR)<<31) | ((PRUint32)(module+NS_ERROR_MODULE_BASE_OFFSET)<<16) | ((PRUint32)(code))) )
/**
* @name Standard Macros for retrieving error bits
*/
#define NS_ERROR_GET_CODE(err) ((err) & 0xffff)
#define NS_ERROR_GET_MODULE(err) (((((err) >> 16) - NS_ERROR_MODULE_BASE_OFFSET) & 0x1fff))
#define NS_ERROR_GET_SEVERITY(err) (((err) >> 31) & 0x1)
/**
* @name Standard return values
*/
/*@{*/
/* Standard "it worked" return value */
#define NS_OK 0
/* The backwards COM false */
#define NS_COMFALSE 1
#define NS_ERROR_BASE ((nsresult) 0xC1F30000)
/* Returned when an instance is not initialized */
#define NS_ERROR_NOT_INITIALIZED (NS_ERROR_BASE + 1)
/* Returned when an instance is already initialized */
#define NS_ERROR_ALREADY_INITIALIZED (NS_ERROR_BASE + 2)
/* Returned by a not implemented function */
#define NS_ERROR_NOT_IMPLEMENTED ((nsresult) 0x80004001L)
/* Returned when a given interface is not supported. */
#define NS_NOINTERFACE ((nsresult) 0x80004002L)
#define NS_ERROR_NO_INTERFACE NS_NOINTERFACE
#define NS_ERROR_INVALID_POINTER ((nsresult) 0x80004003L)
#define NS_ERROR_NULL_POINTER NS_ERROR_INVALID_POINTER
/* Returned when a function aborts */
#define NS_ERROR_ABORT ((nsresult) 0x80004004L)
/* Returned when a function fails */
#define NS_ERROR_FAILURE ((nsresult) 0x80004005L)
/* Returned when an unexpected error occurs */
#define NS_ERROR_UNEXPECTED ((nsresult) 0x8000ffffL)
/* Returned when a memory allocation failes */
#define NS_ERROR_OUT_OF_MEMORY ((nsresult) 0x8007000eL)
/* Returned when an illegal value is passed */
#define NS_ERROR_ILLEGAL_VALUE ((nsresult) 0x80070057L)
#define NS_ERROR_INVALID_ARG NS_ERROR_ILLEGAL_VALUE
/* Returned when a class doesn't allow aggregation */
#define NS_ERROR_NO_AGGREGATION ((nsresult) 0x80040110L)
/* Returned when an operation can't complete due to an unavailable resource */
#define NS_ERROR_NOT_AVAILABLE ((nsresult) 0x80040111L)
/* Returned when a class is not registered */
#define NS_ERROR_FACTORY_NOT_REGISTERED ((nsresult) 0x80040154L)
/* Returned when a class cannot be registered, but may be tried again later */
#define NS_ERROR_FACTORY_REGISTER_AGAIN ((nsresult) 0x80040155L)
/* Returned when a dynamically loaded factory couldn't be found */
#define NS_ERROR_FACTORY_NOT_LOADED ((nsresult) 0x800401f8L)
/* Returned when a factory doesn't support signatures */
#define NS_ERROR_FACTORY_NO_SIGNATURE_SUPPORT \
(NS_ERROR_BASE + 0x101)
/* Returned when a factory already is registered */
#define NS_ERROR_FACTORY_EXISTS (NS_ERROR_BASE + 0x100)
/* For COM compatibility reasons, we want to use exact error code numbers
for NS_ERROR_PROXY_INVALID_IN_PARAMETER and NS_ERROR_PROXY_INVALID_OUT_PARAMETER.
The first matches:
#define RPC_E_INVALID_PARAMETER _HRESULT_TYPEDEF_(0x80010010L)
Errors returning this mean that the xpcom proxy code could not create a proxy for
one of the in paramaters.
Because of this, we are ignoring the convention if using a base and offset for
error numbers.
*/
/* Returned when a proxy could not be create a proxy for one of the IN parameters
This is returned only when the "real" meathod has NOT been invoked.
*/
#define NS_ERROR_PROXY_INVALID_IN_PARAMETER ((nsresult) 0x80010010L)
/* Returned when a proxy could not be create a proxy for one of the OUT parameters
This is returned only when the "real" meathod has ALREADY been invoked.
*/
#define NS_ERROR_PROXY_INVALID_OUT_PARAMETER ((nsresult) 0x80010011L)
/*@}*/
////////////////////////////////////////////////////////////////////////////////
#ifdef XP_PC
#pragma warning(disable: 4251) // 'nsCOMPtr<class nsIInputStream>' needs to have dll-interface to be used by clients of class 'nsInputStream'
#pragma warning(disable: 4275) // non dll-interface class 'nsISupports' used as base for dll-interface class 'nsIRDFNode'
#endif
#endif

View File

@@ -1,126 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
// Force references to all of the symbols that we want exported from
// the dll that are located in the .lib files we link with
#include "nsVoidArray.h"
#include "nsIAtom.h"
#include "nsFileSpec.h"
//#include "nsIBuffer.h"
//#include "nsIByteBufferInputStream.h"
#include "nsFileStream.h"
#include "nsFileSpecStreaming.h"
#include "nsSpecialSystemDirectory.h"
#include "nsIThread.h"
#include "nsDeque.h"
#include "nsObserver.h"
#include "nsTraceRefcnt.h"
#include "nsXPIDLString.h"
#include "nsIEnumerator.h"
#include "nsEnumeratorUtils.h"
#include "nsQuickSort.h"
#include "nsString2.h"
#include "nsProxyEventPrivate.h"
#include "xpt_xdr.h"
#include "nsInterfaceInfo.h"
#include "xptcall.h"
#include "nsIFileSpec.h"
#include "nsIGenericFactory.h"
#include "nsAVLTree.h"
#include "nsHashtableEnumerator.h"
#include "nsPipe2.h"
#include "nsCWeakReference.h"
#include "nsWeakReference.h"
#include "nsISizeOfHandler.h"
#include "nsTextFormater.h"
#include "nsStorageStream.h"
#include "nsIBinaryInputStream.h"
#ifdef DEBUG
#include "pure.h"
#endif
class dummyComparitor: public nsAVLNodeComparitor {
public:
virtual PRInt32 operator()(void* anItem1,void* anItem2)
{
return 0;
}
};
#ifdef DEBUG
extern NS_COM void
TestSegmentedBuffer();
#endif
void XXXNeverCalled()
{
nsTextFormater::snprintf(nsnull,0,nsnull);
dummyComparitor dummy;
nsVoidArray();
nsAVLTree(dummy, nsnull);
NS_GetNumberOfAtoms();
nsFileURL(NULL);
// NS_NewPipe(NULL, NULL, 0, 0, 0, NULL);
NS_NewPipe(NULL, NULL, NULL, 0, 0);
nsFileSpec s;
NS_NewIOFileStream(NULL, s, 0, 0);
nsInputFileStream(s, 0, 0);
nsPersistentFileDescriptor d;
ReadDescriptor(NULL, d);
new nsSpecialSystemDirectory(nsSpecialSystemDirectory::OS_DriveDirectory);
nsIThread::GetCurrent(NULL);
nsDeque(NULL);
NS_NewObserver(NULL, NULL);
nsTraceRefcnt::DumpStatistics();
nsXPIDLCString::Copy(NULL);
NS_NewEmptyEnumerator(NULL);
nsArrayEnumerator(NULL);
NS_NewIntersectionEnumerator(NULL, NULL, NULL);
NS_QuickSort(NULL, 0, 0, NULL, NULL);
nsString2();
nsProxyObject(NULL, 0, NULL);
XPT_DoString(NULL, NULL);
XPT_DoHeader(NULL, NULL);
nsInterfaceInfo* info = NULL;
info->GetName(NULL);
#ifdef DEBUG
info->print(NULL);
PurePrintf(0);
#endif
XPTC_InvokeByIndex(NULL, 0, 0, NULL);
NS_NewFileSpec(NULL);
xptc_dummy();
xptc_dummy2();
XPTI_GetInterfaceInfoManager();
NS_NewGenericFactory(NULL, NULL, NULL);
NS_NewHashtableEnumerator(NULL, NULL, NULL, NULL);
nsCWeakProxy(0, 0);
nsCWeakReferent(0);
NS_GetWeakReference(NULL);
#ifdef DEBUG
TestSegmentedBuffer();
#endif
NS_NewSizeOfHandler(0);
nsStorageStream();
NS_NewBinaryInputStream(0, 0);
}

View File

@@ -1,170 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#ifndef nsIGenericFactory_h___
#define nsIGenericFactory_h___
#include "nsIFactory.h"
// {3bc97f01-ccdf-11d2-bab8-b548654461fc}
#define NS_GENERICFACTORY_CID \
{ 0x3bc97f01, 0xccdf, 0x11d2, { 0xba, 0xb8, 0xb5, 0x48, 0x65, 0x44, 0x61, 0xfc } }
// {3bc97f00-ccdf-11d2-bab8-b548654461fc}
#define NS_IGENERICFACTORY_IID \
{ 0x3bc97f00, 0xccdf, 0x11d2, { 0xba, 0xb8, 0xb5, 0x48, 0x65, 0x44, 0x61, 0xfc } }
#define NS_GENERICFACTORY_PROGID "component:/netscape/generic-factory"
#define NS_GENERICFACTORY_CLASSNAME "Generic Factory"
/**
* Provides a Generic nsIFactory implementation that can be used by
* DLLs with very simple factory needs.
*/
class nsIGenericFactory : public nsIFactory {
public:
static const nsIID& GetIID() { static nsIID iid = NS_IGENERICFACTORY_IID; return iid; }
typedef NS_CALLBACK(ConstructorProcPtr) (nsISupports *aOuter, REFNSIID aIID, void **aResult);
typedef NS_CALLBACK(DestructorProcPtr) (void);
/**
* Establishes the generic factory's constructor function, which will be called
* by CreateInstance.
*/
NS_IMETHOD SetConstructor(ConstructorProcPtr constructor) = 0;
/**
* Establishes the generic factory's destructor function, which will be called
* whe the generic factory is deleted. This is used to notify the DLL that
* an instance of one of its generic factories is going away.
*/
NS_IMETHOD SetDestructor(DestructorProcPtr destructor) = 0;
};
extern NS_COM nsresult
NS_NewGenericFactory(nsIGenericFactory* *result,
nsIGenericFactory::ConstructorProcPtr constructor,
nsIGenericFactory::DestructorProcPtr destructor = NULL);
////////////////////////////////////////////////////////////////////////////////
// Generic Modules
//
// (See xpcom/sample/nsSampleModule.cpp to see how to use this.)
#include "nsIModule.h"
/**
* Use this type to define a list of module component info to pass to
* NS_NewGenericModule. E.g.:
* static nsModuleComponentInfo components[] = { ... };
* See xpcom/sample/nsSampleModule.cpp for more info.
*/
struct nsModuleComponentInfo {
const char* mDescription;
nsCID mCID;
const char* mProgID;
nsIGenericFactory::ConstructorProcPtr mConstructor;
};
extern NS_COM nsresult
NS_NewGenericModule(const char* moduleName,
PRUint32 componentCount,
nsModuleComponentInfo* components,
nsIModule* *result);
#define NS_IMPL_NSGETMODULE(_name, _components) \
extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager *servMgr, \
nsIFileSpec* location, \
nsIModule** result) \
{ \
return NS_NewGenericModule((_name), \
sizeof(_components) / sizeof(_components[0]), \
(_components), result); \
}
////////////////////////////////////////////////////////////////////////////////
#define NS_GENERIC_FACTORY_CONSTRUCTOR(_InstanceClass) \
static NS_IMETHODIMP \
_InstanceClass##Constructor(nsISupports *aOuter, REFNSIID aIID, void **aResult) \
{ \
nsresult rv; \
\
_InstanceClass * inst; \
\
if (NULL == aResult) { \
rv = NS_ERROR_NULL_POINTER; \
return rv; \
} \
*aResult = NULL; \
if (NULL != aOuter) { \
rv = NS_ERROR_NO_AGGREGATION; \
return rv; \
} \
\
NS_NEWXPCOM(inst, _InstanceClass); \
if (NULL == inst) { \
rv = NS_ERROR_OUT_OF_MEMORY; \
return rv; \
} \
NS_ADDREF(inst); \
rv = inst->QueryInterface(aIID, aResult); \
NS_RELEASE(inst); \
\
return rv; \
} \
#define NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(_InstanceClass, _InitMethod) \
static NS_IMETHODIMP \
_InstanceClass##Constructor(nsISupports *aOuter, REFNSIID aIID, void **aResult) \
{ \
nsresult rv; \
\
_InstanceClass * inst; \
\
if (NULL == aResult) { \
rv = NS_ERROR_NULL_POINTER; \
return rv; \
} \
*aResult = NULL; \
if (NULL != aOuter) { \
rv = NS_ERROR_NO_AGGREGATION; \
return rv; \
} \
\
NS_NEWXPCOM(inst, _InstanceClass); \
if (NULL == inst) { \
rv = NS_ERROR_OUT_OF_MEMORY; \
return rv; \
} \
NS_ADDREF(inst); \
rv = inst->_InitMethod(); \
if(NS_SUCCEEDED(rv)) { \
rv = inst->QueryInterface(aIID, aResult); \
} \
NS_RELEASE(inst); \
\
return rv; \
} \
#endif /* nsIGenericFactory_h___ */

View File

@@ -1,521 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#include "prmem.h"
#include "prlog.h"
#include "nsHashtable.h"
//
// Key operations
//
static PR_CALLBACK PLHashNumber _hashValue(const void *key)
{
return ((const nsHashKey *) key)->HashValue();
}
static PR_CALLBACK PRIntn _hashKeyCompare(const void *key1, const void *key2) {
return ((const nsHashKey *) key1)->Equals((const nsHashKey *) key2);
}
static PR_CALLBACK PRIntn _hashValueCompare(const void *value1,
const void *value2) {
// We're not going to make any assumptions about value equality
return 0;
}
//
// Memory callbacks
//
static PR_CALLBACK void *_hashAllocTable(void *pool, PRSize size) {
return PR_MALLOC(size);
}
static PR_CALLBACK void _hashFreeTable(void *pool, void *item) {
PR_DELETE(item);
}
static PR_CALLBACK PLHashEntry *_hashAllocEntry(void *pool, const void *key) {
return PR_NEW(PLHashEntry);
}
static PR_CALLBACK void _hashFreeEntry(void *pool, PLHashEntry *entry,
PRUintn flag) {
if (flag == HT_FREE_ENTRY) {
delete (nsHashKey *) (entry->key);
PR_DELETE(entry);
}
}
static PLHashAllocOps _hashAllocOps = {
_hashAllocTable, _hashFreeTable,
_hashAllocEntry, _hashFreeEntry
};
//
// Enumerator callback
//
struct _HashEnumerateArgs {
nsHashtableEnumFunc fn;
void* arg;
};
static PR_CALLBACK PRIntn _hashEnumerate(PLHashEntry *he, PRIntn i, void *arg)
{
_HashEnumerateArgs* thunk = (_HashEnumerateArgs*)arg;
return thunk->fn((nsHashKey *) he->key, he->value, thunk->arg)
? HT_ENUMERATE_NEXT
: HT_ENUMERATE_STOP;
}
//
// HashKey
//
nsHashKey::nsHashKey(void)
{
}
nsHashKey::~nsHashKey(void)
{
}
nsHashtable::nsHashtable(PRUint32 aInitSize, PRBool threadSafe)
: mLock(NULL)
{
hashtable = PL_NewHashTable(aInitSize,
_hashValue,
_hashKeyCompare,
_hashValueCompare,
&_hashAllocOps,
NULL);
if (threadSafe == PR_TRUE)
{
mLock = PR_NewLock();
if (mLock == NULL)
{
// Cannot create a lock. If running on a multiprocessing system
// we are sure to die.
PR_ASSERT(mLock != NULL);
}
}
}
nsHashtable::~nsHashtable() {
PL_HashTableDestroy(hashtable);
if (mLock) PR_DestroyLock(mLock);
}
PRBool nsHashtable::Exists(nsHashKey *aKey)
{
PLHashNumber hash = aKey->HashValue();
if (mLock) PR_Lock(mLock);
PLHashEntry **hep = PL_HashTableRawLookup(hashtable, hash, (void *) aKey);
if (mLock) PR_Unlock(mLock);
return *hep != NULL;
}
void *nsHashtable::Put(nsHashKey *aKey, void *aData) {
void *res = NULL;
PLHashNumber hash = aKey->HashValue();
PLHashEntry *he;
if (mLock) PR_Lock(mLock);
PLHashEntry **hep = PL_HashTableRawLookup(hashtable, hash, (void *) aKey);
if ((he = *hep) != NULL) {
res = he->value;
he->value = aData;
} else {
PL_HashTableRawAdd(hashtable, hep, hash,
(void *) aKey->Clone(), aData);
}
if (mLock) PR_Unlock(mLock);
return res;
}
void *nsHashtable::Get(nsHashKey *aKey) {
if (mLock) PR_Lock(mLock);
void *ret = PL_HashTableLookup(hashtable, (void *) aKey);
if (mLock) PR_Unlock(mLock);
return ret;
}
void *nsHashtable::Remove(nsHashKey *aKey) {
PLHashNumber hash = aKey->HashValue();
PLHashEntry *he;
if (mLock) PR_Lock(mLock);
PLHashEntry **hep = PL_HashTableRawLookup(hashtable, hash, (void *) aKey);
void *res = NULL;
if ((he = *hep) != NULL) {
res = he->value;
PL_HashTableRawRemove(hashtable, hep, he);
}
if (mLock) PR_Unlock(mLock);
return res;
}
// XXX This method was called _hashEnumerateCopy, but it didn't copy the element!
// I don't know how this was supposed to work since the elements are neither copied
// nor refcounted.
static PR_CALLBACK PRIntn _hashEnumerateShare(PLHashEntry *he, PRIntn i, void *arg)
{
nsHashtable *newHashtable = (nsHashtable *)arg;
newHashtable->Put((nsHashKey *) he->key, he->value);
return HT_ENUMERATE_NEXT;
}
nsHashtable * nsHashtable::Clone() {
PRBool threadSafe = PR_FALSE;
if (mLock)
threadSafe = PR_TRUE;
nsHashtable *newHashTable = new nsHashtable(hashtable->nentries, threadSafe);
PL_HashTableEnumerateEntries(hashtable, _hashEnumerateShare, newHashTable);
return newHashTable;
}
void nsHashtable::Enumerate(nsHashtableEnumFunc aEnumFunc, void* closure) {
_HashEnumerateArgs thunk;
thunk.fn = aEnumFunc;
thunk.arg = closure;
PL_HashTableEnumerateEntries(hashtable, _hashEnumerate, &thunk);
}
static PR_CALLBACK PRIntn _hashEnumerateRemove(PLHashEntry *he, PRIntn i, void *arg)
{
_HashEnumerateArgs* thunk = (_HashEnumerateArgs*)arg;
if (thunk)
return thunk->fn((nsHashKey *) he->key, he->value, thunk->arg)
? HT_ENUMERATE_REMOVE
: HT_ENUMERATE_STOP;
else
return HT_ENUMERATE_REMOVE;
}
void nsHashtable::Reset() {
Reset(NULL);
}
void nsHashtable::Reset(nsHashtableEnumFunc destroyFunc, void* closure)
{
if (destroyFunc != NULL)
{
_HashEnumerateArgs thunk;
thunk.fn = destroyFunc;
thunk.arg = closure;
PL_HashTableEnumerateEntries(hashtable, _hashEnumerateRemove, &thunk);
}
else
PL_HashTableEnumerateEntries(hashtable, _hashEnumerateRemove, NULL);
}
////////////////////////////////////////////////////////////////////////////////
nsStringKey::nsStringKey(const char* str)
{
mStr.Assign(str);
}
nsStringKey::nsStringKey(const PRUnichar* str)
{
mStr.Assign(str);
}
nsStringKey::nsStringKey(const nsStr& str)
{
mStr.Assign(str);
}
nsStringKey::~nsStringKey(void)
{
}
PRUint32 nsStringKey::HashValue(void) const
{
if(mStr.IsUnicode())
{
PRUint32 h;
PRUint32 n;
PRUint32 m;
const PRUnichar* c;
h = 0;
n = mStr.Length();
c = mStr.GetUnicode();
if(n < 16)
{ /* Hash every char in a short string. */
for(; n; c++, n--)
h = (h >> 28) ^ (h << 4) ^ *c;
}
else
{ /* Sample a la jave.lang.String.hash(). */
for(m = n / 8; n >= m; c += m, n -= m)
h = (h >> 28) ^ (h << 4) ^ *c;
}
return h;
}
return (PRUint32)PL_HashString((const void*) mStr.GetBuffer());
}
PRBool nsStringKey::Equals(const nsHashKey* aKey) const
{
return ((nsStringKey*)aKey)->mStr == mStr;
}
nsHashKey* nsStringKey::Clone() const
{
return new nsStringKey(mStr);
}
const nsString& nsStringKey::GetString() const
{
return mStr;
}
////////////////////////////////////////////////////////////////////////////////
// nsObjectHashtable: an nsHashtable where the elements are C++ objects to be
// deleted
nsObjectHashtable::nsObjectHashtable(nsHashtableCloneElementFunc cloneElementFun,
void* cloneElementClosure,
nsHashtableEnumFunc destroyElementFun,
void* destroyElementClosure,
PRUint32 aSize, PRBool threadSafe)
: nsHashtable(aSize, threadSafe),
mCloneElementFun(cloneElementFun),
mCloneElementClosure(cloneElementClosure),
mDestroyElementFun(destroyElementFun),
mDestroyElementClosure(destroyElementClosure)
{
}
nsObjectHashtable::~nsObjectHashtable()
{
Reset();
}
PR_CALLBACK PRIntn
nsObjectHashtable::CopyElement(PLHashEntry *he, PRIntn i, void *arg)
{
nsObjectHashtable *newHashtable = (nsObjectHashtable *)arg;
void* newElement =
newHashtable->mCloneElementFun((nsHashKey*)he->key, he->value,
newHashtable->mCloneElementClosure);
if (newElement == nsnull)
return HT_ENUMERATE_STOP;
newHashtable->Put((nsHashKey*)he->key, newElement);
return HT_ENUMERATE_NEXT;
}
nsHashtable*
nsObjectHashtable::Clone()
{
PRBool threadSafe = PR_FALSE;
if (mLock)
threadSafe = PR_TRUE;
nsObjectHashtable* newHashTable =
new nsObjectHashtable(mCloneElementFun, mCloneElementClosure,
mDestroyElementFun, mDestroyElementClosure,
hashtable->nentries, threadSafe);
PL_HashTableEnumerateEntries(hashtable, CopyElement, newHashTable);
return newHashTable;
}
void
nsObjectHashtable::Reset()
{
nsHashtable::Reset(mDestroyElementFun, mDestroyElementClosure);
}
PRBool
nsObjectHashtable::RemoveAndDelete(nsHashKey *aKey)
{
void *value = Remove(aKey);
if (value && mDestroyElementFun)
{
return (*mDestroyElementFun)(aKey, value, mDestroyElementClosure);
}
else
return PR_FALSE;
}
////////////////////////////////////////////////////////////////////////////////
// nsSupportsHashtable: an nsHashtable where the elements are nsISupports*
static PR_CALLBACK PRBool
_ReleaseElement(nsHashKey *aKey, void *aData, void* closure)
{
nsISupports* element = NS_STATIC_CAST(nsISupports*, aData);
NS_IF_RELEASE(element);
return PR_TRUE;
}
nsSupportsHashtable::~nsSupportsHashtable()
{
Enumerate(_ReleaseElement, nsnull);
}
void*
nsSupportsHashtable::Put(nsHashKey *aKey, void *aData)
{
nsISupports* element = NS_STATIC_CAST(nsISupports*, aData);
NS_IF_ADDREF(element);
return nsHashtable::Put(aKey, aData);
}
void*
nsSupportsHashtable::Get(nsHashKey *aKey)
{
void* data = nsHashtable::Get(aKey);
if (!data)
return nsnull;
nsISupports* element = NS_STATIC_CAST(nsISupports*, data);
NS_IF_ADDREF(element);
return data;
}
void*
nsSupportsHashtable::Remove(nsHashKey *aKey)
{
void* data = nsHashtable::Remove(aKey);
if (!data)
return nsnull;
nsISupports* element = NS_STATIC_CAST(nsISupports*, data);
NS_IF_RELEASE(element);
return data;
}
static PR_CALLBACK PRIntn
_hashEnumerateCopy(PLHashEntry *he, PRIntn i, void *arg)
{
nsHashtable *newHashtable = (nsHashtable *)arg;
nsISupports* element = NS_STATIC_CAST(nsISupports*, he->value);
NS_IF_ADDREF(element);
newHashtable->Put((nsHashKey*)he->key, he->value);
return HT_ENUMERATE_NEXT;
}
nsHashtable*
nsSupportsHashtable::Clone()
{
PRBool threadSafe = PR_FALSE;
if (mLock)
threadSafe = PR_TRUE;
nsSupportsHashtable* newHashTable =
new nsSupportsHashtable(hashtable->nentries, threadSafe);
PL_HashTableEnumerateEntries(hashtable, _hashEnumerateCopy, newHashTable);
return newHashTable;
}
void
nsSupportsHashtable::Reset()
{
Enumerate(_ReleaseElement, nsnull);
nsHashtable::Reset();
}
////////////////////////////////////////////////////////////////////////////////
// nsOpaqueKey: Where keys are opaque byte array blobs
//
// Note opaque keys are not copied by this constructor. If you want a private
// copy in each hash key, you must create one and pass it in to this function.
nsOpaqueKey::nsOpaqueKey(const char *aOpaqueKey, PRUint32 aKeyLength)
{
mOpaqueKey = aOpaqueKey;
mKeyLength = aKeyLength;
}
nsOpaqueKey::~nsOpaqueKey(void)
{
}
PRUint32
nsOpaqueKey::HashValue(void) const
{
PRUint32 h, i, k;
h = 0;
// Same hashing technique as for java.lang.String.hashCode()
if (mKeyLength <= 15) {
// A short key; Use a dense sampling to compute the hash code
for (i = 0; i < mKeyLength; i++)
h += 37 * mOpaqueKey[i];
} else {
// A long key; Use a sparse sampling to compute the hash code
k = mKeyLength >> 3;
for (i = 0; i < mKeyLength; i += k)
h += 39 * mOpaqueKey[i];
}
return h;
}
PRBool
nsOpaqueKey::Equals(const nsHashKey* aKey) const
{
nsOpaqueKey *otherKey = (nsOpaqueKey*)aKey;
if (mKeyLength != otherKey->mKeyLength)
return PR_FALSE;
return !(PRBool)memcmp(otherKey->mOpaqueKey, mOpaqueKey, mKeyLength);
}
nsHashKey*
nsOpaqueKey::Clone() const
{
return new nsOpaqueKey(mOpaqueKey, mKeyLength);
}
PRUint32
nsOpaqueKey::GetKeyLength() const
{
return mKeyLength;
}
const char*
nsOpaqueKey::GetKey() const
{
return mOpaqueKey;
}
////////////////////////////////////////////////////////////////////////////////

View File

@@ -1,248 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#ifndef nsHashtable_h__
#define nsHashtable_h__
#include "plhash.h"
#include "prlock.h"
#include "nsCom.h"
class NS_COM nsHashKey {
protected:
nsHashKey(void);
public:
virtual ~nsHashKey(void);
virtual PRUint32 HashValue(void) const = 0;
virtual PRBool Equals(const nsHashKey *aKey) const = 0;
virtual nsHashKey *Clone(void) const = 0;
};
// Enumerator callback function. Use
typedef PRBool (*nsHashtableEnumFunc)(nsHashKey *aKey, void *aData, void* closure);
class NS_COM nsHashtable {
protected:
// members
PLHashTable *hashtable;
PRLock *mLock;
public:
nsHashtable(PRUint32 aSize = 256, PRBool threadSafe = PR_FALSE);
~nsHashtable();
PRInt32 Count(void) { return hashtable->nentries; }
PRBool Exists(nsHashKey *aKey);
void *Put(nsHashKey *aKey, void *aData);
void *Get(nsHashKey *aKey);
void *Remove(nsHashKey *aKey);
nsHashtable *Clone();
void Enumerate(nsHashtableEnumFunc aEnumFunc, void* closure = NULL);
void Reset();
void Reset(nsHashtableEnumFunc destroyFunc, void* closure = NULL);
};
////////////////////////////////////////////////////////////////////////////////
// nsObjectHashtable: an nsHashtable where the elements are C++ objects to be
// deleted
typedef void* (*nsHashtableCloneElementFunc)(nsHashKey *aKey, void *aData, void* closure);
class NS_COM nsObjectHashtable : public nsHashtable {
public:
nsObjectHashtable(nsHashtableCloneElementFunc cloneElementFun,
void* cloneElementClosure,
nsHashtableEnumFunc destroyElementFun,
void* destroyElementClosure,
PRUint32 aSize = 256, PRBool threadSafe = PR_FALSE);
~nsObjectHashtable();
nsHashtable *Clone();
void Reset();
PRBool RemoveAndDelete(nsHashKey *aKey);
protected:
static PR_CALLBACK PRIntn CopyElement(PLHashEntry *he, PRIntn i, void *arg);
nsHashtableCloneElementFunc mCloneElementFun;
void* mCloneElementClosure;
nsHashtableEnumFunc mDestroyElementFun;
void* mDestroyElementClosure;
};
////////////////////////////////////////////////////////////////////////////////
// nsSupportsHashtable: an nsHashtable where the elements are nsISupports*
class NS_COM nsSupportsHashtable : public nsHashtable {
public:
nsSupportsHashtable(PRUint32 aSize = 256, PRBool threadSafe = PR_FALSE)
: nsHashtable(aSize, threadSafe) {}
~nsSupportsHashtable();
void *Put(nsHashKey *aKey, void *aData);
void *Get(nsHashKey *aKey);
void *Remove(nsHashKey *aKey);
nsHashtable *Clone();
void Reset();
};
////////////////////////////////////////////////////////////////////////////////
// nsISupportsKey: Where keys are nsISupports objects that get refcounted.
#include "nsISupports.h"
class nsISupportsKey : public nsHashKey {
protected:
nsISupports* mKey;
public:
nsISupportsKey(nsISupports* key) {
mKey = key;
NS_IF_ADDREF(mKey);
}
~nsISupportsKey(void) {
NS_IF_RELEASE(mKey);
}
PRUint32 HashValue(void) const {
return (PRUint32)mKey;
}
PRBool Equals(const nsHashKey *aKey) const {
return (mKey == ((nsISupportsKey *) aKey)->mKey);
}
nsHashKey *Clone(void) const {
return new nsISupportsKey(mKey);
}
};
////////////////////////////////////////////////////////////////////////////////
// nsVoidKey: Where keys are void* objects that don't get refcounted.
class nsVoidKey : public nsHashKey {
protected:
const void* mKey;
public:
nsVoidKey(const void* key) {
mKey = key;
}
PRUint32 HashValue(void) const {
return (PRUint32)mKey;
}
PRBool Equals(const nsHashKey *aKey) const {
return (mKey == ((const nsVoidKey *) aKey)->mKey);
}
nsHashKey *Clone(void) const {
return new nsVoidKey(mKey);
}
};
////////////////////////////////////////////////////////////////////////////////
// nsIDKey: Where keys are nsIDs (e.g. nsIID, nsCID).
#include "nsID.h"
class nsIDKey : public nsHashKey {
protected:
nsID mID;
public:
nsIDKey(const nsID &aID) {
mID = aID;
}
PRUint32 HashValue(void) const {
return mID.m0;
}
PRBool Equals(const nsHashKey *aKey) const {
return (mID.Equals(((const nsIDKey *) aKey)->mID));
}
nsHashKey *Clone(void) const {
return new nsIDKey(mID);
}
};
////////////////////////////////////////////////////////////////////////////////
// nsStringKey: Where keys are PRUnichar* or char*
// Some uses: hashing ProgIDs, filenames, URIs
#include "nsString.h"
class NS_COM nsStringKey : public nsHashKey {
protected:
nsAutoString mStr;
public:
nsStringKey(const char* str);
nsStringKey(const PRUnichar* str);
nsStringKey(const nsStr& str);
~nsStringKey(void);
PRUint32 HashValue(void) const;
PRBool Equals(const nsHashKey* aKey) const;
nsHashKey* Clone() const;
// For when the owner of the hashtable wants to peek at the actual
// string in the key. No copy is made, so be careful.
const nsString& GetString() const;
};
////////////////////////////////////////////////////////////////////////////////
// nsOpaqueKey: Where keys are opaque byte-array blobs
#include "nsString.h"
class NS_COM nsOpaqueKey : public nsHashKey {
protected:
const char* mOpaqueKey; // Byte array of opaque data
PRUint32 mKeyLength; // Length, in bytes, of mOpaqueKey
public:
// Note opaque keys are not copied by this constructor. If you want a private
// copy in each hash key, you must create one and pass it in to this function.
nsOpaqueKey(const char* aOpaqueKey, PRUint32 aKeyLength);
~nsOpaqueKey(void);
PRUint32 HashValue(void) const;
PRBool Equals(const nsHashKey* aKey) const;
nsHashKey* Clone() const;
// For when the owner of the hashtable wants to peek at the actual
// opaque array in the key. No copy is made, so be careful.
const char* GetKey() const;
PRUint32 GetKeyLength() const;
};
#endif

View File

@@ -1,247 +0,0 @@
/* -*- Mode: C++; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* 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):
*/
/*
* Implementation of nsHashEnumerator.
* Use it to expose nsIEnumerator interfaces around nsHashtable objects.
* Contributed by Rob Ginda, rginda@ix.netcom.com
*/
#include "nscore.h"
#include "nsHashtableEnumerator.h"
class nsHashtableEnumerator : public nsIBidirectionalEnumerator
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIENUMERATOR
NS_DECL_NSIBIDIRECTIONALENUMERATOR
public:
virtual ~nsHashtableEnumerator ();
nsHashtableEnumerator (nsHashtable *aHash,
NS_HASH_ENUMERATOR_CONVERTER aConverter,
void *aData);
nsHashtableEnumerator (); /* no implementation */
private:
NS_IMETHOD Reset(nsHashtable *aHash,
NS_HASH_ENUMERATOR_CONVERTER aConverter,
void *aData);
NS_IMETHOD ReleaseElements();
nsISupports **mElements;
PRInt16 mCount, mCurrent;
PRBool mDoneFlag;
};
struct nsHashEnumClosure
{
NS_HASH_ENUMERATOR_CONVERTER Converter;
nsISupports **Elements;
PRInt16 Current;
void *Data;
};
extern "C" NS_COM nsresult
NS_NewHashtableEnumerator (nsHashtable *aHash,
NS_HASH_ENUMERATOR_CONVERTER aConverter,
void *aData, nsIEnumerator **retval)
{
NS_PRECONDITION (retval, "null ptr");
*retval = nsnull;
nsHashtableEnumerator *hte = new nsHashtableEnumerator (aHash, aConverter,
aData);
if (!hte)
return NS_ERROR_OUT_OF_MEMORY;
return hte->QueryInterface (nsCOMTypeInfo<nsIEnumerator>::GetIID(),
(void **)retval);
}
nsHashtableEnumerator::nsHashtableEnumerator (nsHashtable *aHash,
NS_HASH_ENUMERATOR_CONVERTER aConverter,
void *aData)
: mElements(nsnull), mCount(0), mDoneFlag(PR_TRUE)
{
NS_INIT_REFCNT();
Reset (aHash, aConverter, aData);
}
PRBool
hash_enumerator (nsHashKey *aKey, void *aObject, void *closure)
{
nsresult rv;
nsHashEnumClosure *c = (nsHashEnumClosure *)closure;
rv = c->Converter (aKey, (void *)aObject, (void *)c->Data,
&c->Elements[c->Current]);
if (!NS_FAILED(rv))
c->Current++;
return PR_TRUE;
}
NS_IMETHODIMP
nsHashtableEnumerator::Reset (nsHashtable *aHash,
NS_HASH_ENUMERATOR_CONVERTER aConverter,
void *aData)
{
nsHashEnumClosure c;
ReleaseElements();
mCurrent = c.Current = 0;
mCount = aHash->Count();
if (mCount == 0)
return NS_ERROR_FAILURE;
mElements = c.Elements = new nsISupports*[mCount];
c.Data = aData;
c.Converter = aConverter;
aHash->Enumerate (&hash_enumerator, &c);
mCount = c.Current; /* some items may not have converted correctly */
mDoneFlag = PR_FALSE;
return NS_OK;
}
NS_IMETHODIMP
nsHashtableEnumerator::ReleaseElements()
{
for (; mCount > 0; mCount--)
if (mElements[mCount - 1])
NS_RELEASE(mElements[mCount - 1]);
delete[] mElements;
mElements = nsnull;
return NS_OK;
}
NS_IMPL_ISUPPORTS2(nsHashtableEnumerator, nsIBidirectionalEnumerator, nsIEnumerator)
nsHashtableEnumerator::~nsHashtableEnumerator()
{
ReleaseElements();
}
NS_IMETHODIMP
nsHashtableEnumerator::First ()
{
if (!mElements || (mCount == 0))
return NS_ERROR_FAILURE;
mCurrent = 0;
mDoneFlag = PR_FALSE;
return NS_OK;
}
NS_IMETHODIMP
nsHashtableEnumerator::Last ()
{
if (!mElements || (mCount == 0))
return NS_ERROR_FAILURE;
mCurrent = mCount - 1;
mDoneFlag = PR_FALSE;
return NS_OK;
}
NS_IMETHODIMP
nsHashtableEnumerator::Prev ()
{
if (!mElements || (mCount == 0) || (mCurrent == 0)) {
mDoneFlag = PR_TRUE;
return NS_ERROR_FAILURE;
}
mCurrent--;
mDoneFlag = PR_FALSE;
return NS_OK;
}
NS_IMETHODIMP
nsHashtableEnumerator::Next ()
{
if (!mElements || (mCount == 0) || (mCurrent == mCount - 1)) {
mDoneFlag = PR_TRUE;
return NS_ERROR_FAILURE;
}
mCurrent++;
mDoneFlag = PR_FALSE;
return NS_OK;
}
NS_IMETHODIMP
nsHashtableEnumerator::CurrentItem (nsISupports **retval)
{
NS_PRECONDITION (retval, "null ptr");
NS_PRECONDITION (mElements, "invalid state");
NS_ASSERTION (mCurrent >= 0, "mCurrent less than zero");
if (mCount == 0)
{
*retval = nsnull;
return NS_ERROR_FAILURE;
}
NS_ASSERTION (mCurrent <= mCount - 1, "mCurrent too high");
*retval = mElements[mCurrent];
/* who says the item can't be null? */
if (*retval)
NS_ADDREF(*retval);
return NS_OK;
}
NS_IMETHODIMP
nsHashtableEnumerator::IsDone ()
{
if ((!mElements) || (mCount == 0) || (mDoneFlag))
return NS_OK;
return NS_COMFALSE;
}

View File

@@ -1,47 +0,0 @@
/* -*- Mode: C++; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* 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):
*/
/*
* This class can be used to expose nsI(BiDirectional)Enumerator interfaces
* around nsHashtable objects.
* Contributed by Rob Ginda, rginda@ix.netcom.com
*/
#ifndef nsHashtableEnumerator_h___
#define nsHashtableEnumerator_h___
#include "nscore.h"
#include "nsIEnumerator.h"
#include "nsHashtable.h"
typedef NS_CALLBACK(NS_HASH_ENUMERATOR_CONVERTER) (nsHashKey *key, void *data,
void *convert_data,
nsISupports **retval);
extern "C" NS_COM nsresult
NS_NewHashtableEnumerator (nsHashtable *aHash,
NS_HASH_ENUMERATOR_CONVERTER aConverter,
void *aData, nsIEnumerator **retval);
#endif /* nsHashtableEnumerator_h___ */

File diff suppressed because it is too large Load Diff

View File

@@ -1,170 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#ifndef nsIGenericFactory_h___
#define nsIGenericFactory_h___
#include "nsIFactory.h"
// {3bc97f01-ccdf-11d2-bab8-b548654461fc}
#define NS_GENERICFACTORY_CID \
{ 0x3bc97f01, 0xccdf, 0x11d2, { 0xba, 0xb8, 0xb5, 0x48, 0x65, 0x44, 0x61, 0xfc } }
// {3bc97f00-ccdf-11d2-bab8-b548654461fc}
#define NS_IGENERICFACTORY_IID \
{ 0x3bc97f00, 0xccdf, 0x11d2, { 0xba, 0xb8, 0xb5, 0x48, 0x65, 0x44, 0x61, 0xfc } }
#define NS_GENERICFACTORY_PROGID "component:/netscape/generic-factory"
#define NS_GENERICFACTORY_CLASSNAME "Generic Factory"
/**
* Provides a Generic nsIFactory implementation that can be used by
* DLLs with very simple factory needs.
*/
class nsIGenericFactory : public nsIFactory {
public:
static const nsIID& GetIID() { static nsIID iid = NS_IGENERICFACTORY_IID; return iid; }
typedef NS_CALLBACK(ConstructorProcPtr) (nsISupports *aOuter, REFNSIID aIID, void **aResult);
typedef NS_CALLBACK(DestructorProcPtr) (void);
/**
* Establishes the generic factory's constructor function, which will be called
* by CreateInstance.
*/
NS_IMETHOD SetConstructor(ConstructorProcPtr constructor) = 0;
/**
* Establishes the generic factory's destructor function, which will be called
* whe the generic factory is deleted. This is used to notify the DLL that
* an instance of one of its generic factories is going away.
*/
NS_IMETHOD SetDestructor(DestructorProcPtr destructor) = 0;
};
extern NS_COM nsresult
NS_NewGenericFactory(nsIGenericFactory* *result,
nsIGenericFactory::ConstructorProcPtr constructor,
nsIGenericFactory::DestructorProcPtr destructor = NULL);
////////////////////////////////////////////////////////////////////////////////
// Generic Modules
//
// (See xpcom/sample/nsSampleModule.cpp to see how to use this.)
#include "nsIModule.h"
/**
* Use this type to define a list of module component info to pass to
* NS_NewGenericModule. E.g.:
* static nsModuleComponentInfo components[] = { ... };
* See xpcom/sample/nsSampleModule.cpp for more info.
*/
struct nsModuleComponentInfo {
const char* mDescription;
nsCID mCID;
const char* mProgID;
nsIGenericFactory::ConstructorProcPtr mConstructor;
};
extern NS_COM nsresult
NS_NewGenericModule(const char* moduleName,
PRUint32 componentCount,
nsModuleComponentInfo* components,
nsIModule* *result);
#define NS_IMPL_NSGETMODULE(_name, _components) \
extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager *servMgr, \
nsIFileSpec* location, \
nsIModule** result) \
{ \
return NS_NewGenericModule((_name), \
sizeof(_components) / sizeof(_components[0]), \
(_components), result); \
}
////////////////////////////////////////////////////////////////////////////////
#define NS_GENERIC_FACTORY_CONSTRUCTOR(_InstanceClass) \
static NS_IMETHODIMP \
_InstanceClass##Constructor(nsISupports *aOuter, REFNSIID aIID, void **aResult) \
{ \
nsresult rv; \
\
_InstanceClass * inst; \
\
if (NULL == aResult) { \
rv = NS_ERROR_NULL_POINTER; \
return rv; \
} \
*aResult = NULL; \
if (NULL != aOuter) { \
rv = NS_ERROR_NO_AGGREGATION; \
return rv; \
} \
\
NS_NEWXPCOM(inst, _InstanceClass); \
if (NULL == inst) { \
rv = NS_ERROR_OUT_OF_MEMORY; \
return rv; \
} \
NS_ADDREF(inst); \
rv = inst->QueryInterface(aIID, aResult); \
NS_RELEASE(inst); \
\
return rv; \
} \
#define NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(_InstanceClass, _InitMethod) \
static NS_IMETHODIMP \
_InstanceClass##Constructor(nsISupports *aOuter, REFNSIID aIID, void **aResult) \
{ \
nsresult rv; \
\
_InstanceClass * inst; \
\
if (NULL == aResult) { \
rv = NS_ERROR_NULL_POINTER; \
return rv; \
} \
*aResult = NULL; \
if (NULL != aOuter) { \
rv = NS_ERROR_NO_AGGREGATION; \
return rv; \
} \
\
NS_NEWXPCOM(inst, _InstanceClass); \
if (NULL == inst) { \
rv = NS_ERROR_OUT_OF_MEMORY; \
return rv; \
} \
NS_ADDREF(inst); \
rv = inst->_InitMethod(); \
if(NS_SUCCEEDED(rv)) { \
rv = inst->QueryInterface(aIID, aResult); \
} \
NS_RELEASE(inst); \
\
return rv; \
} \
#endif /* nsIGenericFactory_h___ */

View File

@@ -1,84 +0,0 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = xpcom
XPIDL_MODULE = xpcom_io
LIBRARY_NAME = xpcomio_s
REQUIRES = xpcom uconv unicharutil
CPPSRCS = \
nsEscape.cpp \
nsFileSpec.cpp \
nsFileSpecStreaming.cpp \
nsFileStream.cpp \
nsFileSpecImpl.cpp \
nsIFileStream.cpp \
nsIStringStream.cpp \
nsSegmentedBuffer.cpp \
nsPipe2.cpp \
nsSpecialSystemDirectory.cpp \
nsUnicharInputStream.cpp \
nsBinaryStream.cpp \
nsStorageStream.cpp \
$(NULL)
EXPORTS = \
nsEscape.h \
nsFileSpec.h \
nsFileSpecStreaming.h \
nsFileStream.h \
nsIFileStream.h \
nsIStringStream.h \
nsIUnicharInputStream.h \
nsSpecialSystemDirectory.h \
$(NULL)
XPIDLSRCS = \
nsIPipe.idl \
nsIFileSpec.idl \
nsIBaseStream.idl \
nsIInputStream.idl \
nsIOutputStream.idl \
nsIBufferInputStream.idl \
nsIBufferOutputStream.idl \
nsIBinaryInputStream.idl \
nsIBinaryOutputStream.idl \
nsIStorageStream.idl \
$(NULL)
EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))
# we don't want the shared lib, but we want to force the creation of a static lib.
override NO_SHARED_LIB=1
override NO_STATIC_LIB=
include $(topsrcdir)/config/rules.mk
DEFINES += -D_IMPL_NS_COM -D_IMPL_NS_BASE
ifeq ($(OS_ARCH), Linux)
DEFINES += -D_BSD_SOURCE
endif

View File

@@ -1,91 +0,0 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=..\..
MODULE = xpcom
################################################################################
## exports
EXPORTS = \
nsEscape.h \
nsFileSpec.h \
nsFileSpecStreaming.h \
nsFileStream.h \
nsIFileStream.h \
nsIStringStream.h \
nsIUnicharInputStream.h \
nsSpecialSystemDirectory.h \
nsStorageStream.h \
$(NULL)
NO_XPT_GEN=1
XPIDL_MODULE = xpcom_io
XPIDLSRCS = \
.\nsIPipe.idl \
.\nsIFileSpec.idl \
.\nsIBaseStream.idl \
.\nsIBinaryInputStream.idl \
.\nsIBinaryOutputStream.idl \
.\nsIInputStream.idl \
.\nsIOutputStream.idl \
.\nsIBufferInputStream.idl \
.\nsIBufferOutputStream.idl \
.\nsIStorageStream.idl \
$(NULL)
################################################################################
## library
LIBRARY_NAME=xpcomio_s
LINCS = \
-I$(PUBLIC)\xpcom \
-I$(PUBLIC)\uconv \
-I$(PUBLIC)\unicharutil \
$(NULL)
LINCS = $(LINCS) -I$(PUBLIC)\raptor # until we sort out the filespec/widgets dependency
LCFLAGS = -D_IMPL_NS_COM -D_IMPL_NS_BASE -DWIN32_LEAN_AND_MEAN
CPP_OBJS = \
.\$(OBJDIR)\nsBinaryStream.obj \
.\$(OBJDIR)\nsEscape.obj \
.\$(OBJDIR)\nsFileSpec.obj \
.\$(OBJDIR)\nsFileSpecImpl.obj \
.\$(OBJDIR)\nsFileSpecStreaming.obj \
.\$(OBJDIR)\nsFileStream.obj \
.\$(OBJDIR)\nsIFileStream.obj \
.\$(OBJDIR)\nsIStringStream.obj \
.\$(OBJDIR)\nsSegmentedBuffer.obj \
.\$(OBJDIR)\nsPipe2.obj \
.\$(OBJDIR)\nsSpecialSystemDirectory.obj \
.\$(OBJDIR)\nsStorageStream.obj \
.\$(OBJDIR)\nsUnicharInputStream.obj \
$(NULL)
include <$(DEPTH)\config\rules.mak>
libs:: $(LIBRARY)
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
clobber::
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib

View File

@@ -1,361 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* 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.
*
*/
/**
* This file contains implementations of the nsIBinaryInputStream and
* nsIBinaryOutputStream interfaces. Together, these interfaces allows reading
* and writing of primitive data types (integers, floating-point values,
* booleans, etc.) to a stream in a binary, untagged, fixed-endianness format.
* This might be used, for example, to implement network protocols or to
* produce architecture-neutral binary disk files, i.e. ones that can be read
* and written by both big-endian and little-endian platforms. Output is
* written in big-endian order (high-order byte first), as this is traditional
* network order.
*
* @See nsIBinaryInputStream
* @See nsIBinaryOutputStream
*/
#include "nsBinaryStream.h"
#include "nsIAllocator.h"
// Swap macros, used to convert to/from canonical (big-endian) format
#ifdef IS_LITTLE_ENDIAN
# define SWAP16(x) ((((x) & 0xff) << 8) | (((x) >> 8) & 0xff))
# define SWAP32(x) ((SWAP16((x) & 0xffff) << 16) | (SWAP16((x) >> 16)))
#else
# ifndef IS_BIG_ENDIAN
# error "Unknown endianness"
# endif
# define SWAP16(x) (x)
# define SWAP32(x) (x)
#endif
nsBinaryOutputStream::nsBinaryOutputStream(nsIOutputStream* aStream): mOutputStream(aStream)
{
NS_INIT_REFCNT();
}
NS_IMPL_ISUPPORTS(nsBinaryOutputStream, NS_GET_IID(nsIBinaryOutputStream))
NS_IMETHODIMP
nsBinaryOutputStream::Flush() { return mOutputStream->Flush(); }
NS_IMETHODIMP
nsBinaryOutputStream::Close() { return mOutputStream->Close(); }
NS_IMETHODIMP
nsBinaryOutputStream::Write(const char *aBuf, PRUint32 aCount, PRUint32 *aActualBytes)
{
return mOutputStream->Write(aBuf, aCount, aActualBytes);
}
NS_IMETHODIMP
nsBinaryOutputStream::SetOutputStream(nsIOutputStream *aOutputStream)
{
NS_ENSURE_ARG_POINTER(aOutputStream);
mOutputStream = aOutputStream;
return NS_OK;
}
NS_IMETHODIMP
nsBinaryOutputStream::WriteBoolean(PRBool aBoolean)
{
return Write8(aBoolean);
}
NS_IMETHODIMP
nsBinaryOutputStream::Write8(PRUint8 aByte)
{
nsresult rv;
PRUint32 bytesWritten;
rv = Write((const char*)&aByte, sizeof aByte, &bytesWritten);
if (bytesWritten != sizeof aByte)
return NS_ERROR_FAILURE;
return rv;
}
NS_IMETHODIMP
nsBinaryOutputStream::Write16(PRUint16 a16)
{
nsresult rv;
PRUint32 bytesWritten;
a16 = SWAP16(a16);
rv = Write((const char*)&a16, sizeof a16, &bytesWritten);
if (bytesWritten != sizeof a16)
return NS_ERROR_FAILURE;
return rv;
}
NS_IMETHODIMP
nsBinaryOutputStream::Write32(PRUint32 a32)
{
nsresult rv;
PRUint32 bytesWritten;
a32 = SWAP32(a32);
rv = Write((const char*)&a32, sizeof a32, &bytesWritten);
if (bytesWritten != sizeof a32)
return NS_ERROR_FAILURE;
return rv;
}
NS_IMETHODIMP
nsBinaryOutputStream::Write64(PRUint64 a64)
{
nsresult rv;
PRUint32* raw32 = (PRUint32*)&a64;
#ifdef IS_BIG_ENDIAN
rv = Write32(raw32[0]);
if (NS_FAILED(rv)) return rv;
return Write32(raw32[1]);
#else
rv = Write32(raw32[1]);
if (NS_FAILED(rv)) return rv;
return Write32(raw32[0]);
#endif
}
NS_IMETHODIMP
nsBinaryOutputStream::WriteFloat(float aFloat)
{
NS_ASSERTION(sizeof(float) == sizeof (PRUint32),
"False assumption about sizeof(float)");
return Write32(*NS_REINTERPRET_CAST(PRUint32*, &aFloat));
}
NS_IMETHODIMP
nsBinaryOutputStream::WriteDouble(double aDouble)
{
NS_ASSERTION(sizeof(double) == sizeof(PRUint64),
"False assumption about sizeof(double)");
return Write64(*NS_REINTERPRET_CAST(PRUint64*,&aDouble));
}
NS_IMETHODIMP
nsBinaryOutputStream::WriteStringZ(const char *aString)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsBinaryOutputStream::WriteWStringZ(const PRUnichar* aString)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsBinaryOutputStream::WriteUtf8Z(const PRUnichar* aString)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsBinaryOutputStream::WriteBytes(const char *aString, PRUint32 aLength)
{
nsresult rv;
PRUint32 bytesWritten;
rv = Write(aString, aLength, &bytesWritten);
if (bytesWritten != aLength)
return NS_ERROR_FAILURE;
return rv;
}
NS_IMETHODIMP
nsBinaryOutputStream::WriteString(nsString* aString)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
nsBinaryInputStream::nsBinaryInputStream(nsIInputStream* aStream): mInputStream(aStream) { NS_INIT_REFCNT(); }
NS_IMPL_ISUPPORTS(nsBinaryInputStream, NS_GET_IID(nsIBinaryInputStream))
NS_IMETHODIMP
nsBinaryInputStream::Available(PRUint32* aResult) { return mInputStream->Available(aResult); }
NS_IMETHODIMP
nsBinaryInputStream::Read(char* aBuffer, PRUint32 aCount, PRUint32 *aNumRead)
{
return mInputStream->Read(aBuffer, aCount, aNumRead);
}
NS_IMETHODIMP
nsBinaryInputStream::Close() { return mInputStream->Close(); }
NS_IMETHODIMP
nsBinaryInputStream::SetInputStream(nsIInputStream *aInputStream)
{
NS_ENSURE_ARG_POINTER(aInputStream);
mInputStream = aInputStream;
return NS_OK;
}
NS_IMETHODIMP
nsBinaryInputStream::ReadBoolean(PRBool* aBoolean)
{
PRUint8 byteResult;
nsresult rv = Read8(&byteResult);
*aBoolean = byteResult;
return rv;
}
NS_IMETHODIMP
nsBinaryInputStream::Read8(PRUint8* aByte)
{
nsresult rv;
PRUint32 bytesRead;
rv = Read((char*)aByte, sizeof(*aByte), &bytesRead);
if (bytesRead != sizeof (*aByte))
return NS_ERROR_FAILURE;
return rv;
}
NS_IMETHODIMP
nsBinaryInputStream::Read16(PRUint16* a16)
{
nsresult rv;
PRUint32 bytesRead;
rv = Read((char*)a16, sizeof *a16, &bytesRead);
if (bytesRead != sizeof *a16)
return NS_ERROR_FAILURE;
*a16 = SWAP16(*a16);
return rv;
}
NS_IMETHODIMP
nsBinaryInputStream::Read32(PRUint32* a32)
{
nsresult rv;
PRUint32 bytesRead;
rv = Read((char*)a32, sizeof *a32, &bytesRead);
if (bytesRead != sizeof *a32)
return NS_ERROR_FAILURE;
*a32 = SWAP32(*a32);
return rv;
}
NS_IMETHODIMP
nsBinaryInputStream::Read64(PRUint64* a64)
{
nsresult rv;
PRUint32* raw32 = (PRUint32*)a64;
#ifdef IS_BIG_ENDIAN
rv = Read32(&raw32[0]);
if (NS_FAILED(rv)) return rv;
return Read32(&raw32[1]);
#else
rv = Read32(&raw32[1]);
if (NS_FAILED(rv)) return rv;
return Read32(&raw32[0]);
#endif
}
NS_IMETHODIMP
nsBinaryInputStream::ReadFloat(float* aFloat)
{
NS_ASSERTION(sizeof(float) == sizeof (PRUint32),
"False assumption about sizeof(float)");
return Read32(NS_REINTERPRET_CAST(PRUint32*, aFloat));
}
NS_IMETHODIMP
nsBinaryInputStream::ReadDouble(double* aDouble)
{
NS_ASSERTION(sizeof(double) == sizeof(PRUint64),
"False assumption about sizeof(double)");
return Read64(NS_REINTERPRET_CAST(PRUint64*, aDouble));
}
NS_IMETHODIMP
nsBinaryInputStream::ReadStringZ(char* *aString)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsBinaryInputStream::ReadWStringZ(PRUnichar* *aString)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsBinaryInputStream::ReadUtf8Z(PRUnichar* *aString)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsBinaryInputStream::ReadBytes(char* *aString, PRUint32 aLength)
{
nsresult rv;
PRUint32 bytesRead;
char* s;
s = (char*)nsAllocator::Alloc(aLength);
if (!s)
return NS_ERROR_OUT_OF_MEMORY;
rv = Read(s, aLength, &bytesRead);
if (NS_FAILED(rv)) return rv;
if (bytesRead != aLength)
return NS_ERROR_FAILURE;
*aString = s;
return NS_OK;
}
NS_IMETHODIMP
nsBinaryInputStream::ReadString(nsString* *aString)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_COM nsresult
NS_NewBinaryOutputStream(nsIBinaryOutputStream* *aResult, nsIOutputStream* aDestStream)
{
NS_ENSURE_ARG_POINTER(aResult);
nsIBinaryOutputStream *stream = new nsBinaryOutputStream(aDestStream);
if (!stream)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(stream);
*aResult = stream;
return NS_OK;
}
NS_COM nsresult
NS_NewBinaryInputStream(nsIBinaryInputStream* *aResult, nsIInputStream* aSrcStream)
{
NS_ENSURE_ARG_POINTER(aResult);
nsIBinaryInputStream *stream = new nsBinaryInputStream(aSrcStream);
if (!stream)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(stream);
*aResult = stream;
return NS_OK;
}

View File

@@ -1,72 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* 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.
*
*/
#include "nsIBinaryInputStream.h"
#include "nsIBinaryOutputStream.h"
#include "nsCOMPtr.h"
class nsBinaryOutputStream : public nsIBinaryOutputStream
{
public:
nsBinaryOutputStream(nsIOutputStream *aStream);
virtual ~nsBinaryOutputStream() {};
private:
// nsISupports methods
NS_DECL_ISUPPORTS
// nsIBaseStream methods
NS_DECL_NSIBASESTREAM
// nsIOutputStream methods
NS_DECL_NSIOUTPUTSTREAM
// nsIBinaryOutputStream methods
NS_DECL_NSIBINARYOUTPUTSTREAM
protected:
nsCOMPtr<nsIOutputStream> mOutputStream;
};
class nsBinaryInputStream : public nsIBinaryInputStream
{
public:
nsBinaryInputStream(nsIInputStream *aStream);
virtual ~nsBinaryInputStream() {};
private:
// nsISupports methods
NS_DECL_ISUPPORTS
// nsIBaseStream methods
NS_DECL_NSIBASESTREAM
// nsIInputStream methods
NS_DECL_NSIINPUTSTREAM
// nsIBinaryInputStream methods
NS_DECL_NSIBINARYINPUTSTREAM
protected:
nsCOMPtr<nsIInputStream> mInputStream;
};

View File

@@ -1,806 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// First checked in on 98/11/20 by John R. McMullen in the wrong directory.
// Checked in again 98/12/04.
// Polished version 98/12/08.
//========================================================================================
//
// Classes defined:
//
// nsFilePath, nsFileURL, nsFileSpec, nsPersistentFileDescriptor
// nsDirectoryIterator. Oh, and a convenience class nsAutoCString.
//
// Q. How should I represent files at run time?
// A. Use nsFileSpec. Using char* will lose information on some platforms.
//
// Q. Then what are nsFilePath and nsFileURL for?
// A. Only when you need a char* parameter for legacy code.
//
// Q. How should I represent files in a persistent way (eg, in a disk file)?
// A. Use nsPersistentFileDescriptor. Convert to and from nsFileSpec at run time.
//
// This suite provides the following services:
//
// 1. Encapsulates all platform-specific file details, so that files can be
// described correctly without any platform #ifdefs
//
// 2. Type safety. This will fix the problems that used to occur because people
// confused file paths. They used to use const char*, which could mean three
// or four different things. Bugs were introduced as people coded, right up
// to the moment Communicator 4.5 shipped.
//
// 3. Used in conjunction with nsFileStream.h (q.v.), this supports all the power
// and readability of the ansi stream syntax.
//
// Basic example:
//
// nsFilePath myPath("/Development/iotest.txt");
//
// nsOutputFileStream testStream(nsFileSpec(myPath));
// testStream << "Hello World" << nsEndl;
//
// 4. Handy methods for manipulating file specifiers safely, e.g. MakeUnique(),
// SetLeafName(), Exists().
//
// 5. Easy cross-conversion.
//
// Examples:
//
// Initialize a URL from a string
//
// nsFileURL fileURL("file:///Development/MPW/MPW%20Shell");
//
// Initialize a Unix-style path from a URL
//
// nsFilePath filePath(fileURL);
//
// Initialize a file spec from a URL
//
// nsFileSpec fileSpec(fileURL);
//
// Make the spec unique.
//
// fileSpec.MakeUnique();
//
// Assign the spec to a URL (causing conversion)
//
// fileURL = fileSpec;
//
// Assign a unix path using a string
//
// filePath = "/Development/MPW/SysErrs.err";
//
// Assign to a file spec using a unix path (causing conversion).
//
// fileSpec = filePath;
//
// Make this unique.
//
// fileSpec.MakeUnique();
//
// 6. Fixes a bug that have been there for a long time, and
// is inevitable if you use NSPR alone, where files are described as paths.
//
// The problem affects platforms (Macintosh) in which a path does not fully
// specify a file, because two volumes can have the same name. This
// is solved by holding a "private" native file spec inside the
// nsFilePath and nsFileURL classes, which is used when appropriate.
//
//========================================================================================
#ifndef _FILESPEC_H_
#define _FILESPEC_H_
#include "nscore.h"
#include "nsError.h"
#include "nsString.h"
#include "nsCRT.h"
#include "prtypes.h"
//========================================================================================
// Compiler-specific macros, as needed
//========================================================================================
#if !defined(NS_USING_NAMESPACE) && (defined(__MWERKS__) || defined(XP_PC))
#define NS_USING_NAMESPACE
#endif
#ifdef NS_USING_NAMESPACE
#define NS_NAMESPACE_PROTOTYPE
#define NS_NAMESPACE namespace
#define NS_NAMESPACE_END
#define NS_EXPLICIT explicit
#else
#define NS_NAMESPACE_PROTOTYPE static
#define NS_NAMESPACE struct
#define NS_NAMESPACE_END ;
#define NS_EXPLICIT
#endif
//=========================== End Compiler-specific macros ===============================
#ifdef XP_MAC
#include <Files.h>
#elif defined(XP_UNIX) || defined (XP_OS2) || defined(XP_BEOS)
#include <dirent.h>
#elif defined(XP_PC)
// This clashes with some of the Win32 system headers (specifically,
// winbase.h). Hopefully they'll have been included first; else we may
// have problems. We could include winbase.h before doing this;
// unfortunately, it's bring in too much crap and'd slow stuff down
// more than it's worth doing.
#ifdef CreateDirectory
#undef CreateDirectory
#endif
#include "prio.h"
#endif
//========================================================================================
// Here are the allowable ways to describe a file.
//========================================================================================
class nsFileSpec; // Preferred. For i/o use nsInputFileStream, nsOutputFileStream
class nsFilePath;
class nsFileURL;
class nsNSPRPath; // This can be passed to NSPR file I/O routines, if you must.
class nsPersistentFileDescriptor; // Used for storage across program launches.
#define kFileURLPrefix "file://"
#define kFileURLPrefixLength (7)
class nsOutputStream;
class nsInputStream;
class nsIOutputStream;
class nsIInputStream;
class nsOutputFileStream;
class nsInputFileStream;
class nsOutputConsoleStream;
class nsString;
//========================================================================================
// Conversion of native file errors to nsresult values. These are really only for use
// in the file module, clients of this interface shouldn't really need them.
// Error results returned from this interface have, in the low-order 16 bits,
// native errors that are masked to 16 bits. Assumption: a native error of 0 is success
// on all platforms. Note the way we define this using an inline function. This
// avoids multiple evaluation if people go NS_FILE_RESULT(function_call()).
#define NS_FILE_RESULT(x) ns_file_convert_result((PRInt32)x)
nsresult ns_file_convert_result(PRInt32 nativeErr);
#define NS_FILE_FAILURE NS_FILE_RESULT(-1)
//========================================================================================
class NS_COM nsAutoCString
//
// This should be in nsString.h, but the owner would not reply to my proposal. After four
// weeks, I decided to put it in here.
//
// This is a quiet little class that acts as a sort of autoptr for
// a const char*. If you used to call nsString::ToNewCString(), just
// to pass the result a parameter list, it was a nuisance having to
// call delete [] on the result after the call. Now you can say
// nsString myStr;
// ...
// f(nsAutoCString(myStr));
// where f is declared as void f(const char*); This call will
// make a temporary char* pointer on the stack and delete[] it
// when the function returns.
//========================================================================================
{
public:
NS_EXPLICIT nsAutoCString(const nsString& other) : mCString(other.ToNewCString()) {}
virtual ~nsAutoCString();
operator const char*() const { return mCString; }
// operator const char*() { return mCString; }
// don't need this, since |operator const char*() const| can
// serve for both |const| and non-|const| callers
protected:
const char* mCString;
}; // class nsAutoCString
//========================================================================================
class NS_COM nsSimpleCharString
// An envelope for char*: reference counted. Used internally by all the nsFileSpec
// classes below.
//========================================================================================
{
public:
nsSimpleCharString();
nsSimpleCharString(const char*);
nsSimpleCharString(const nsString&);
nsSimpleCharString(const nsSimpleCharString&);
nsSimpleCharString(const char* inData, PRUint32 inLength);
~nsSimpleCharString();
void operator = (const char*);
void operator = (const nsString&);
void operator = (const nsSimpleCharString&);
operator const char*() const { return mData ? mData->mString : 0; }
operator char* ()
{
ReallocData(Length()); // requires detaching if shared...
return mData ? mData->mString : 0;
}
PRBool operator == (const char*);
PRBool operator == (const nsString&);
PRBool operator == (const nsSimpleCharString&);
void operator += (const char* inString);
nsSimpleCharString operator + (const char* inString) const;
char operator [](int i) const { return mData ? mData->mString[i] : 0; }
char& operator [](int i)
{
if (i >= (int)Length())
ReallocData((PRUint32)i + 1);
return mData->mString[i]; // caveat appelator
}
char& operator [](unsigned int i) { return (*this)[(int)i]; }
void Catenate(const char* inString1, const char* inString2);
void SetToEmpty();
PRBool IsEmpty() const { return Length() == 0; }
PRUint32 Length() const { return mData ? mData->mLength : 0; }
void SetLength(PRUint32 inLength) { ReallocData(inLength); }
void CopyFrom(const char* inData, PRUint32 inLength);
void LeafReplace(char inSeparator, const char* inLeafName);
char* GetLeaf(char inSeparator) const; // use PR_Free()
void Unescape();
protected:
void AddRefData();
void ReleaseData();
void ReallocData(PRUint32 inLength);
//--------------------------------------------------
// Data
//--------------------------------------------------
protected:
struct Data {
int mRefCount;
PRUint32 mLength;
char mString[1];
};
Data* mData;
}; // class nsSimpleCharString
//========================================================================================
class NS_COM nsFileSpec
// This is whatever each platform really prefers to describe files as. Declared first
// because the other two types have an embedded nsFileSpec object.
//========================================================================================
{
public:
nsFileSpec();
// These two meathods take *native* file paths.
NS_EXPLICIT nsFileSpec(const char* inNativePath, PRBool inCreateDirs = PR_FALSE);
NS_EXPLICIT nsFileSpec(const nsString& inNativePath, PRBool inCreateDirs = PR_FALSE);
NS_EXPLICIT nsFileSpec(const nsFilePath& inPath);
NS_EXPLICIT nsFileSpec(const nsFileURL& inURL);
NS_EXPLICIT nsFileSpec(const nsPersistentFileDescriptor& inURL);
nsFileSpec(const nsFileSpec& inPath);
virtual ~nsFileSpec();
// These two operands take *native* file paths.
void operator = (const char* inNativePath);
void operator = (const nsString& inNativePath)
{
const nsAutoCString path(inNativePath);
*this = path;
}
void operator = (const nsFilePath& inPath);
void operator = (const nsFileURL& inURL);
void operator = (const nsFileSpec& inOther);
void operator = (const nsPersistentFileDescriptor& inOther);
PRBool operator ==(const nsFileSpec& inOther) const;
PRBool operator !=(const nsFileSpec& inOther) const;
// Returns a native path, and allows the
// path to be "passed" to legacy code. This practice
// is VERY EVIL and should only be used to support legacy
// code. Using it guarantees bugs on Macintosh.
// The path is cached and freed by the nsFileSpec destructor
// so do not delete (or free) it. See also nsNSPRPath below,
// if you really must pass a string to PR_OpenFile().
// Doing so will introduce two automatic bugs.
const char* GetCString() const;
// Same as GetCString (please read the comments).
// Do not try to free this!
operator const char* () const { return GetCString(); }
// Same as GetCString (please read the comments).
// Do not try to free this!
const char* GetNativePathCString() const { return GetCString(); }
PRBool IsChildOf(nsFileSpec &possibleParent);
#ifdef XP_MAC
// For Macintosh people, this is meant to be useful in its own right as a C++ version
// of the FSSpec struct.
nsFileSpec(
short vRefNum,
long parID,
ConstStr255Param name,
PRBool resolveAlias = PR_TRUE);
nsFileSpec(const FSSpec& inSpec, PRBool resolveAlias = PR_TRUE);
void operator = (const FSSpec& inSpec);
operator FSSpec* () { return &mSpec; }
operator const FSSpec* const () { return &mSpec; }
operator FSSpec& () { return mSpec; }
operator const FSSpec& () const { return mSpec; }
const FSSpec& GetFSSpec() const { return mSpec; }
FSSpec& GetFSSpec() { return mSpec; }
ConstFSSpecPtr GetFSSpecPtr() const { return &mSpec; }
FSSpecPtr GetFSSpecPtr() { return &mSpec; }
void MakeAliasSafe();
void MakeUnique(ConstStr255Param inSuggestedLeafName);
StringPtr GetLeafPName() { return mSpec.name; }
ConstStr255Param GetLeafPName() const { return mSpec.name; }
OSErr GetCatInfo(CInfoPBRec& outInfo) const;
OSErr SetFileTypeAndCreator(OSType type, OSType creator);
OSErr GetFileTypeAndCreator(OSType* type, OSType* creator);
#endif // end of Macintosh utility methods.
PRBool Valid() const { return NS_SUCCEEDED(Error()); }
nsresult Error() const
{
#ifndef XP_MAC
if (mPath.IsEmpty() && NS_SUCCEEDED(mError))
((nsFileSpec*)this)->mError = NS_ERROR_NOT_INITIALIZED;
#endif
return mError;
}
PRBool Failed() const { return (PRBool)NS_FAILED(Error()); }
//--------------------------------------------------
// Queries and path algebra. These do not modify the disk.
//--------------------------------------------------
char* GetLeafName() const; // Allocated. Use nsCRT::free().
#if 0
// needs implementing
// copy the leaf name into the supplied buffer, thus
// getting a copy without allocation. Buffer should be
// 64 chars big.
void GetLeafNameCopy(char* destBuffer, PRInt32 bufferSize) const;
#endif
// inLeafName can be a relative path, so this allows
// one kind of concatenation of "paths".
void SetLeafName(const char* inLeafName);
void SetLeafName(const nsString& inLeafName)
{
const nsAutoCString leafName(inLeafName);
SetLeafName(leafName);
}
// Return the filespec of the parent directory. Used
// in conjunction with GetLeafName(), this lets you
// parse a path into a list of node names. Beware,
// however, that the top node is still not a name,
// but a spec. Volumes on Macintosh can have identical
// names. Perhaps could be used for an operator --() ?
void GetParent(nsFileSpec& outSpec) const;
// ie nsFileSpec::TimeStamp. This is 32 bits now,
// but might change, eg, to a 64-bit class. So use the
// typedef, and use a streaming operator to convert
// to a string, so that your code won't break. It's
// none of your business what the number means. Don't
// rely on the implementation.
typedef PRUint32 TimeStamp;
// This will return different values on different
// platforms, even for the same file (eg, on a server).
// But if the platform is constant, it will increase after
// every file modification.
void GetModDate(TimeStamp& outStamp) const;
PRBool ModDateChanged(const TimeStamp& oldStamp) const
{
TimeStamp newStamp;
GetModDate(newStamp);
return newStamp != oldStamp;
}
PRUint32 GetFileSize() const;
PRInt64 GetDiskSpaceAvailable() const;
nsFileSpec operator + (const char* inRelativeUnixPath) const;
nsFileSpec operator + (const nsString& inRelativeUnixPath) const
{
const nsAutoCString
relativePath(inRelativeUnixPath);
return *this + relativePath;
}
// Concatenate the relative path to this directory.
// Used for constructing the filespec of a descendant.
// This must be a directory for this to work. This differs
// from SetLeafName(), since the latter will work
// starting with a sibling of the directory and throws
// away its leaf information, whereas this one assumes
// this is a directory, and the relative path starts
// "below" this.
void operator += (const char* inRelativeUnixPath);
void operator += (const nsString& inRelativeUnixPath)
{
const nsAutoCString relativePath(inRelativeUnixPath);
*this += relativePath;
}
void MakeUnique();
void MakeUnique(const char* inSuggestedLeafName);
void MakeUnique(const nsString& inSuggestedLeafName)
{
const nsAutoCString suggestedLeafName(inSuggestedLeafName);
MakeUnique(suggestedLeafName);
}
PRBool IsDirectory() const; // More stringent than Exists()
PRBool IsFile() const; // More stringent than Exists()
PRBool Exists() const;
PRBool IsHidden() const;
PRBool IsSymlink() const;
//--------------------------------------------------
// Creation and deletion of objects. These can modify the disk.
//--------------------------------------------------
// Called for the spec of an alias. Modifies the spec to
// point to the original. Sets mError.
nsresult ResolveSymlink(PRBool& wasSymlink);
void CreateDirectory(int mode = 0700 /* for unix */);
void CreateDir(int mode = 0700) { CreateDirectory(mode); }
// workaround for yet another VC++ bug with long identifiers.
void Delete(PRBool inRecursive) const;
void RecursiveCopy(nsFileSpec newDir) const;
nsresult Truncate(const PRInt32 offset) const;
nsresult Rename(const char* inNewName); // not const: gets updated
nsresult Rename(const nsString& inNewName)
{
const nsAutoCString newName(inNewName);
return Rename(newName);
}
nsresult CopyToDir(const nsFileSpec& inNewParentDirectory) const;
nsresult MoveToDir(const nsFileSpec& inNewParentDirectory);
nsresult Execute(const char* args) const;
nsresult Execute(const nsString& args) const
{
const nsAutoCString argsString(args);
return Execute(argsString);
}
//--------------------------------------------------
// Data
//--------------------------------------------------
protected:
// Clear the nsFileSpec contents, resetting it
// to the uninitialized state;
void Clear();
friend class nsFilePath;
friend class nsFileURL;
friend class nsDirectoryIterator;
#ifdef XP_MAC
FSSpec mSpec;
#endif
nsSimpleCharString mPath;
nsresult mError;
}; // class nsFileSpec
// FOR HISTORICAL REASONS:
typedef nsFileSpec nsNativeFileSpec;
//========================================================================================
class NS_COM nsFileURL
// This is an escaped string that looks like "file:///foo/bar/mumble%20fish". Since URLs
// are the standard way of doing things in mozilla, this allows a string constructor,
// which just stashes the string with no conversion.
//========================================================================================
{
public:
nsFileURL(const nsFileURL& inURL);
NS_EXPLICIT nsFileURL(const char* inURLString, PRBool inCreateDirs = PR_FALSE);
NS_EXPLICIT nsFileURL(const nsString& inURLString, PRBool inCreateDirs = PR_FALSE);
NS_EXPLICIT nsFileURL(const nsFilePath& inPath);
NS_EXPLICIT nsFileURL(const nsFileSpec& inPath);
virtual ~nsFileURL();
// nsString GetString() const { return mPath; }
// may be needed for implementation reasons,
// but should not provide a conversion constructor.
void operator = (const nsFileURL& inURL);
void operator = (const char* inURLString);
void operator = (const nsString& inURLString)
{
const nsAutoCString string(inURLString);
*this = string;
}
void operator = (const nsFilePath& inOther);
void operator = (const nsFileSpec& inOther);
void operator +=(const char* inRelativeUnixPath);
nsFileURL operator +(const char* inRelativeUnixPath) const;
operator const char* () const { return (const char*)mURL; } // deprecated.
const char* GetURLString() const { return (const char*)mURL; }
// Not allocated, so don't free it.
const char* GetAsString() const { return (const char*)mURL; }
// Not allocated, so don't free it.
#ifdef XP_MAC
// Accessor to allow quick assignment to a mFileSpec
const nsFileSpec& GetFileSpec() const { return mFileSpec; }
#endif
//--------------------------------------------------
// Data
//--------------------------------------------------
protected:
friend class nsFilePath; // to allow construction of nsFilePath
nsSimpleCharString mURL;
#ifdef XP_MAC
// Since the path on the macintosh does not uniquely specify a file (volumes
// can have the same name), stash the secret nsFileSpec, too.
nsFileSpec mFileSpec;
#endif
}; // class nsFileURL
//========================================================================================
class NS_COM nsFilePath
// This is a string that looks like "/foo/bar/mumble fish". Same as nsFileURL, but
// without the "file:// prefix", and NOT %20 ENCODED! Strings passed in must be
// valid unix-style paths in this format.
//========================================================================================
{
public:
nsFilePath(const nsFilePath& inPath);
NS_EXPLICIT nsFilePath(const char* inUnixPathString, PRBool inCreateDirs = PR_FALSE);
NS_EXPLICIT nsFilePath(const nsString& inUnixPathString, PRBool inCreateDirs = PR_FALSE);
NS_EXPLICIT nsFilePath(const nsFileURL& inURL);
NS_EXPLICIT nsFilePath(const nsFileSpec& inPath);
virtual ~nsFilePath();
operator const char* () const { return mPath; }
// This will return a UNIX string. If you
// need a string that can be passed into
// NSPR, take a look at the nsNSPRPath class.
void operator = (const nsFilePath& inPath);
void operator = (const char* inUnixPathString);
void operator = (const nsString& inUnixPathString)
{
const nsAutoCString string(inUnixPathString);
*this = string;
}
void operator = (const nsFileURL& inURL);
void operator = (const nsFileSpec& inOther);
void operator +=(const char* inRelativeUnixPath);
nsFilePath operator +(const char* inRelativeUnixPath) const;
#ifdef XP_MAC
public:
// Accessor to allow quick assignment to a mFileSpec
const nsFileSpec& GetFileSpec() const { return mFileSpec; }
#endif
//--------------------------------------------------
// Data
//--------------------------------------------------
private:
nsSimpleCharString mPath;
#ifdef XP_MAC
// Since the path on the macintosh does not uniquely specify a file (volumes
// can have the same name), stash the secret nsFileSpec, too.
nsFileSpec mFileSpec;
#endif
}; // class nsFilePath
//========================================================================================
class NS_COM nsPersistentFileDescriptor
// To save information about a file's location in another file, initialize
// one of these from your nsFileSpec, and then write this out to your output stream.
// To retrieve the info, create one of these, read its value from an input stream.
// and then make an nsFileSpec from it.
//========================================================================================
{
public:
nsPersistentFileDescriptor() {}
// For use prior to reading in from a stream
nsPersistentFileDescriptor(const nsPersistentFileDescriptor& inEncodedData);
virtual ~nsPersistentFileDescriptor();
void operator = (const nsPersistentFileDescriptor& inEncodedData);
// Conversions
NS_EXPLICIT nsPersistentFileDescriptor(const nsFileSpec& inSpec);
void operator = (const nsFileSpec& inSpec);
// The following four functions are declared here (as friends). Their implementations
// are in mozilla/base/src/nsFileSpecStreaming.cpp.
friend nsresult Read(nsIInputStream* aStream, nsPersistentFileDescriptor&);
friend nsresult Write(nsIOutputStream* aStream, const nsPersistentFileDescriptor&);
// writes the data to a file
friend NS_COM nsInputStream& operator >> (nsInputStream&, nsPersistentFileDescriptor&);
// reads the data from a file
friend NS_COM nsOutputStream& operator << (nsOutputStream&, const nsPersistentFileDescriptor&);
// writes the data to a file
friend class nsFileSpec;
void GetData(nsSimpleCharString& outData) const;
void SetData(const nsSimpleCharString& inData);
void GetData(nsSimpleCharString& outData, PRInt32& outSize) const;
void SetData(const nsSimpleCharString& inData, PRInt32 inSize);
void SetData(const char* inData, PRInt32 inSize);
//--------------------------------------------------
// Data
//--------------------------------------------------
protected:
nsSimpleCharString mDescriptorString;
}; // class nsPersistentFileDescriptor
//========================================================================================
class NS_COM nsDirectoryIterator
// Example:
//
// nsFileSpec parentDir(...); // directory over whose children we shall iterate
// for (nsDirectoryIterator i(parentDir, PR_FALSE); i.Exists(); i++)
// {
// // do something with i.Spec()
// }
//
// - or -
//
// for (nsDirectoryIterator i(parentDir, PR_TRUE); i.Exists(); i--)
// {
// // do something with i.Spec()
// }
// This one passed the PR_TRUE flag which will resolve any symlink encountered.
//========================================================================================
{
public:
nsDirectoryIterator( const nsFileSpec& parent,
PRBool resoveSymLinks);
#ifndef XP_MAC
// Macintosh currently doesn't allocate, so needn't clean up.
virtual ~nsDirectoryIterator();
#endif
PRBool Exists() const { return mExists; }
nsDirectoryIterator& operator ++(); // moves to the next item, if any.
nsDirectoryIterator& operator ++(int) { return ++(*this); } // post-increment.
nsDirectoryIterator& operator --(); // moves to the previous item, if any.
nsDirectoryIterator& operator --(int) { return --(*this); } // post-decrement.
operator nsFileSpec&() { return mCurrent; }
nsFileSpec& Spec() { return mCurrent; }
private:
#if defined(XP_MAC)
OSErr SetToIndex();
#endif
//--------------------------------------------------
// Data
//--------------------------------------------------
private:
nsFileSpec mCurrent;
PRBool mExists;
PRBool mResoveSymLinks;
#if defined(XP_UNIX) || defined(XP_BEOS) || defined (XP_PC)
nsFileSpec mStarting;
#endif
#if defined(XP_UNIX) || defined(XP_BEOS)
DIR* mDir;
#elif defined(XP_PC)
PRDir* mDir; // XXX why not use PRDir for Unix too?
#elif defined(XP_MAC)
short mVRefNum;
long mParID;
short mIndex;
short mMaxIndex;
#endif
}; // class nsDirectoryIterator
//========================================================================================
class NS_COM nsNSPRPath
// This class will allow you to pass any one of the nsFile* classes directly into NSPR
// without the need to worry about whether you have the right kind of filepath or not.
// It will also take care of cleaning up any allocated memory.
//========================================================================================
{
public:
NS_EXPLICIT nsNSPRPath(const nsFileSpec& inSpec)
: mFilePath(inSpec), modifiedNSPRPath(nsnull) {}
NS_EXPLICIT nsNSPRPath(const nsFileURL& inURL)
: mFilePath(inURL), modifiedNSPRPath(nsnull) {}
NS_EXPLICIT nsNSPRPath(const nsFilePath& inUnixPath)
: mFilePath(inUnixPath), modifiedNSPRPath(nsnull) {}
virtual ~nsNSPRPath();
operator const char*() const;
// Returns the path
// that NSPR file routines expect on each platform.
// Concerning constness, this can modify
// modifiedNSPRPath, but it's really just "mutable".
//--------------------------------------------------
// Data
//--------------------------------------------------
private:
nsFilePath mFilePath;
char* modifiedNSPRPath; // Currently used only on XP_PC
}; // class nsNSPRPath
#endif // _FILESPEC_H_

View File

@@ -1,781 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsFileSpecImpl.h"// Always first, to ensure that it compiles alone.
#include "nsIFileStream.h"
#include "nsFileStream.h"
#include "prmem.h"
NS_IMPL_ISUPPORTS1(nsFileSpecImpl, nsIFileSpec)
#ifdef NS_DEBUG
#define TEST_OUT_PTR(p) \
if (!(p)) \
return NS_ERROR_NULL_POINTER;
#else
#define TEST_OUT_PTR(p)
#endif
//----------------------------------------------------------------------------------------
nsFileSpecImpl::nsFileSpecImpl()
//----------------------------------------------------------------------------------------
: mInputStream(nsnull)
, mOutputStream(nsnull)
{
NS_INIT_ISUPPORTS();
}
//----------------------------------------------------------------------------------------
nsFileSpecImpl::nsFileSpecImpl(const nsFileSpec& inSpec)
//----------------------------------------------------------------------------------------
: mFileSpec(inSpec)
, mInputStream(nsnull)
, mOutputStream(nsnull)
{
NS_INIT_ISUPPORTS();
}
//----------------------------------------------------------------------------------------
nsFileSpecImpl::~nsFileSpecImpl()
//----------------------------------------------------------------------------------------
{
CloseStream();
}
//----------------------------------------------------------------------------------------
/* static */
nsresult nsFileSpecImpl::MakeInterface(const nsFileSpec& inSpec, nsIFileSpec** result)
//----------------------------------------------------------------------------------------
{
nsFileSpecImpl* it = new nsFileSpecImpl(inSpec);
if (!it)
return NS_ERROR_OUT_OF_MEMORY;
return it->QueryInterface(nsIFileSpec::GetIID(), (void **) result);
} // nsFileSpecImpl::MakeInterface
#define FILESPEC(ifilespec) ((nsFileSpecImpl*)ifilespec)->mFileSpec
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::FromFileSpec(const nsIFileSpec *original)
//----------------------------------------------------------------------------------------
{
mFileSpec = FILESPEC(original);
return mFileSpec.Error();
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::IsChildOf(nsIFileSpec *possibleParent,
PRBool *_retval)
{
*_retval = mFileSpec.IsChildOf(FILESPEC(possibleParent));
return mFileSpec.Error();
}
//----------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::GetURLString(char * *aURLString)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(aURLString)
if (mFileSpec.Failed())
return mFileSpec.Error();
nsFileURL url(mFileSpec);
*aURLString = nsCRT::strdup(url.GetURLString());
if (!*aURLString)
return NS_ERROR_OUT_OF_MEMORY;
return NS_OK;
} // nsFileSpecImpl::GetURLString
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::SetURLString(const char * aURLString)
//----------------------------------------------------------------------------------------
{
mFileSpec = nsFileURL(aURLString);
return NS_OK;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::GetUnixStyleFilePath(char * *aUnixStyleFilePath)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(aUnixStyleFilePath)
if (mFileSpec.Failed())
return mFileSpec.Error();
nsFilePath path(mFileSpec);
*aUnixStyleFilePath = nsCRT::strdup((const char*) path);
if (!*aUnixStyleFilePath)
return NS_ERROR_OUT_OF_MEMORY;
return NS_OK;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::SetUnixStyleFilePath(const char * aUnixStyleFilePath)
//----------------------------------------------------------------------------------------
{
mFileSpec = nsFilePath(aUnixStyleFilePath);
return NS_OK;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::GetPersistentDescriptorString(char * *aPersistentDescriptorString)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(aPersistentDescriptorString)
if (mFileSpec.Failed())
return mFileSpec.Error();
nsPersistentFileDescriptor desc(mFileSpec);
nsSimpleCharString data;
desc.GetData(data);
*aPersistentDescriptorString = nsCRT::strdup((const char*) data);
if (!*aPersistentDescriptorString)
return NS_ERROR_OUT_OF_MEMORY;
return NS_OK;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::SetPersistentDescriptorString(const char * aPersistentDescriptorString)
//----------------------------------------------------------------------------------------
{
nsPersistentFileDescriptor desc(mFileSpec);
desc.SetData(aPersistentDescriptorString);
mFileSpec = desc;
return NS_OK;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::GetNativePath(char * *aNativePath)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(aNativePath)
if (mFileSpec.Failed())
return mFileSpec.Error();
*aNativePath = nsCRT::strdup(mFileSpec.GetNativePathCString());
if (!*aNativePath)
return NS_ERROR_OUT_OF_MEMORY;
return NS_OK;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::SetNativePath(const char * aNativePath)
//----------------------------------------------------------------------------------------
{
mFileSpec = aNativePath;
return NS_OK;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::GetNSPRPath(char * *aNSPRPath)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(aNSPRPath)
if (mFileSpec.Failed())
return mFileSpec.Error();
nsNSPRPath path(mFileSpec);
*aNSPRPath = nsCRT::strdup((const char*) path);
if (!*aNSPRPath)
return NS_ERROR_OUT_OF_MEMORY;
return NS_OK;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::Error()
//----------------------------------------------------------------------------------------
{
return mFileSpec.Error();
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::IsValid(PRBool *_retval)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(_retval)
*_retval = mFileSpec.Valid();
return NS_OK;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::Failed(PRBool *_retval)
//----------------------------------------------------------------------------------------
{
*_retval = mFileSpec.Failed();
return NS_OK;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::GetLeafName(char * *aLeafName)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(aLeafName)
*aLeafName = mFileSpec.GetLeafName();
return mFileSpec.Error();
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::SetLeafName(const char * aLeafName)
//----------------------------------------------------------------------------------------
{
mFileSpec.SetLeafName(aLeafName);
return mFileSpec.Error();
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::GetParent(nsIFileSpec * *aParent)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(aParent)
nsFileSpec parent;
mFileSpec.GetParent(parent);
return MakeInterface(parent, aParent);
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::MakeUnique()
//----------------------------------------------------------------------------------------
{
mFileSpec.MakeUnique();
return mFileSpec.Error();
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::MakeUniqueWithSuggestedName(const char *suggestedName)
//----------------------------------------------------------------------------------------
{
mFileSpec.MakeUnique(suggestedName);
return mFileSpec.Error();
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::GetModDate(PRUint32 *aModDate)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(aModDate)
nsFileSpec::TimeStamp stamp;
mFileSpec.GetModDate(stamp);
*aModDate = stamp;
return mFileSpec.Error();
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::ModDateChanged(PRUint32 oldStamp, PRBool *_retval)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(_retval)
*_retval = mFileSpec.ModDateChanged(oldStamp);
return mFileSpec.Error();
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::IsDirectory(PRBool *_retval)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(_retval)
*_retval = mFileSpec.IsDirectory();
return mFileSpec.Error();
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::IsFile(PRBool *_retval)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(_retval)
*_retval = mFileSpec.IsFile();
return mFileSpec.Error();
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::Exists(PRBool *_retval)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(_retval)
*_retval = mFileSpec.Exists();
return mFileSpec.Error();
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::IsHidden(PRBool *_retval)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(_retval)
*_retval = mFileSpec.IsHidden();
return mFileSpec.Error();
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::IsSymlink(PRBool *_retval)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(_retval)
*_retval = mFileSpec.IsSymlink();
return mFileSpec.Error();
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::ResolveSymlink()
//----------------------------------------------------------------------------------------
{
PRBool ignore;
return mFileSpec.ResolveSymlink(ignore);
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::GetFileSize(PRUint32 *aFileSize)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(aFileSize)
*aFileSize = mFileSpec.GetFileSize();
return mFileSpec.Error();
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::GetDiskSpaceAvailable(PRInt64 *aDiskSpaceAvailable)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(aDiskSpaceAvailable)
*aDiskSpaceAvailable = mFileSpec.GetDiskSpaceAvailable();
return mFileSpec.Error();
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::AppendRelativeUnixPath(const char *relativePath)
//----------------------------------------------------------------------------------------
{
mFileSpec += relativePath;
return mFileSpec.Error();
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::Touch()
//----------------------------------------------------------------------------------------
{
// create an empty file, like the UNIX touch command.
nsresult rv;
rv = OpenStreamForReadingAndWriting();
if (NS_FAILED(rv)) return rv;
rv = CloseStream();
return rv;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::CreateDir()
//----------------------------------------------------------------------------------------
{
mFileSpec.CreateDir();
return mFileSpec.Error();
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::Truncate(const PRInt32 offset)
//----------------------------------------------------------------------------------------
{
return mFileSpec.Truncate(offset);
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::Rename(const char *newLeafName)
//----------------------------------------------------------------------------------------
{
return mFileSpec.Rename(newLeafName);
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::CopyToDir(const nsIFileSpec *newParentDir)
//----------------------------------------------------------------------------------------
{
return mFileSpec.CopyToDir(FILESPEC(newParentDir));
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::MoveToDir(const nsIFileSpec *newParentDir)
//----------------------------------------------------------------------------------------
{
return mFileSpec.MoveToDir(FILESPEC(newParentDir));
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::Execute(const char *args)
//----------------------------------------------------------------------------------------
{
return mFileSpec.Execute(args);
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::OpenStreamForReading()
//----------------------------------------------------------------------------------------
{
if (mInputStream || mOutputStream)
return NS_ERROR_FAILURE;
return NS_NewTypicalInputFileStream((nsISupports**)&mInputStream, mFileSpec);
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::OpenStreamForWriting()
//----------------------------------------------------------------------------------------
{
if (mInputStream || mOutputStream)
return NS_ERROR_FAILURE;
return NS_NewTypicalOutputFileStream((nsISupports**)&mOutputStream, mFileSpec);
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::OpenStreamForReadingAndWriting()
//----------------------------------------------------------------------------------------
{
if (mInputStream || mOutputStream)
return NS_ERROR_FAILURE;
nsresult result = NS_NewTypicalInputFileStream((nsISupports**)&mInputStream, mFileSpec);
if (NS_SUCCEEDED(result))
result = NS_NewTypicalOutputFileStream((nsISupports**)&mOutputStream, mFileSpec);
return result;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::CloseStream()
//----------------------------------------------------------------------------------------
{
NS_IF_RELEASE(mInputStream);
NS_IF_RELEASE(mOutputStream);
return NS_OK;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::IsStreamOpen(PRBool *_retval)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(_retval)
*_retval = (mInputStream || mOutputStream);
return NS_OK;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::GetInputStream(nsIInputStream** _retval)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(_retval)
if (!mInputStream) {
nsresult rv = OpenStreamForReading();
if (NS_FAILED(rv)) return rv;
}
*_retval = mInputStream;
NS_IF_ADDREF(mInputStream);
return NS_OK;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::GetOutputStream(nsIOutputStream** _retval)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(_retval)
if (!mOutputStream) {
nsresult rv = OpenStreamForWriting();
if (NS_FAILED(rv)) return rv;
}
*_retval = mOutputStream;
NS_IF_ADDREF(mOutputStream);
return NS_OK;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::SetFileContents(const char* inString)
//----------------------------------------------------------------------------------------
{
nsresult rv = OpenStreamForWriting();
if (NS_FAILED(rv)) return rv;
PRInt32 count;
rv = Write(inString, PL_strlen(inString), &count);
nsresult rv2 = CloseStream();
return NS_FAILED(rv) ? rv : rv2;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::GetFileContents(char** _retval)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(_retval)
*_retval = nsnull;
nsresult rv = OpenStreamForReading();
if (NS_FAILED(rv)) return rv;
PRInt32 theSize;
rv = GetFileSize((PRUint32*)&theSize);
if (NS_SUCCEEDED(rv))
rv = Read(_retval, theSize, &theSize);
if (NS_SUCCEEDED(rv))
(*_retval)[theSize] = 0;
nsresult rv2 = CloseStream();
return NS_FAILED(rv) ? rv : rv2;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::GetFileSpec(nsFileSpec *aFileSpec)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(aFileSpec)
*aFileSpec = mFileSpec;
return NS_OK;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::SetFromFileSpec(const nsFileSpec& aFileSpec)
//----------------------------------------------------------------------------------------
{
mFileSpec = aFileSpec;
return NS_OK;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::Eof(PRBool *_retval)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(_retval)
if (!mInputStream)
return NS_ERROR_NULL_POINTER;
nsInputFileStream s(mInputStream);
*_retval = s.eof();
return NS_OK;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::Read(char** buffer, PRInt32 requestedCount, PRInt32 *_retval)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(_retval)
TEST_OUT_PTR(buffer)
if (!mInputStream) {
nsresult rv = OpenStreamForReading();
if (NS_FAILED(rv)) return rv;
}
if (!*buffer)
*buffer = (char*)PR_Malloc(requestedCount + 1);
if (!mInputStream)
return NS_ERROR_NULL_POINTER;
nsInputFileStream s(mInputStream);
*_retval = s.read(*buffer, requestedCount);
return s.error();
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::ReadLine(char** line, PRInt32 bufferSize, PRBool *wasTruncated)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(wasTruncated)
TEST_OUT_PTR(line)
if (!mInputStream) {
nsresult rv = OpenStreamForReading();
if (NS_FAILED(rv)) return rv;
}
if (!*line)
*line = (char*)PR_Malloc(bufferSize + 1);
if (!mInputStream)
return NS_ERROR_NULL_POINTER;
nsInputFileStream s(mInputStream);
*wasTruncated = !s.readline(*line, bufferSize);
return s.error();
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::Write(const char * data, PRInt32 requestedCount, PRInt32 *_retval)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(_retval)
//if (!mOutputStream)
// return NS_ERROR_NULL_POINTER;
if (!mOutputStream) {
nsresult rv = OpenStreamForWriting();
if (NS_FAILED(rv))
return rv;
}
nsOutputFileStream s(mOutputStream);
*_retval = s.write(data, requestedCount);
return s.error();
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::Flush()
//----------------------------------------------------------------------------------------
{
if (!mOutputStream)
return NS_ERROR_NULL_POINTER;
nsOutputFileStream s(mOutputStream);
s.flush();
return s.error();
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::Seek(PRInt32 offset)
//----------------------------------------------------------------------------------------
{
nsresult result = NS_OK;
if (mOutputStream)
{
nsOutputFileStream os(mOutputStream);
os.seek(offset);
result = os.error();
}
if (NS_SUCCEEDED(result) && mInputStream)
{
nsInputFileStream is(mInputStream);
is.seek(offset);
result = is.error();
}
return result;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::Tell(PRInt32 *_retval)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(_retval)
if (!mInputStream)
return NS_ERROR_NULL_POINTER;
nsInputFileStream s(mInputStream);
*_retval = s.tell();
return s.error();
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsFileSpecImpl::EndLine()
//----------------------------------------------------------------------------------------
{
nsOutputFileStream s(mOutputStream);
s << nsEndl;
return s.error();
}
NS_IMPL_ISUPPORTS1(nsDirectoryIteratorImpl, nsIDirectoryIterator)
//----------------------------------------------------------------------------------------
nsDirectoryIteratorImpl::nsDirectoryIteratorImpl()
//----------------------------------------------------------------------------------------
: mDirectoryIterator(nsnull)
{
NS_INIT_ISUPPORTS();
}
//----------------------------------------------------------------------------------------
nsDirectoryIteratorImpl::~nsDirectoryIteratorImpl()
//----------------------------------------------------------------------------------------
{
delete mDirectoryIterator;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsDirectoryIteratorImpl::Init(nsIFileSpec *parent, PRBool resolveSymlink)
//----------------------------------------------------------------------------------------
{
delete mDirectoryIterator;
mDirectoryIterator = new nsDirectoryIterator(FILESPEC(parent), resolveSymlink);
if (!mDirectoryIterator)
return NS_ERROR_OUT_OF_MEMORY;
return NS_OK;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsDirectoryIteratorImpl::Exists(PRBool *_retval)
//----------------------------------------------------------------------------------------
{
TEST_OUT_PTR(_retval)
if (!mDirectoryIterator)
return NS_ERROR_NULL_POINTER;
*_retval = mDirectoryIterator->Exists();
return NS_OK;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsDirectoryIteratorImpl::Next()
//----------------------------------------------------------------------------------------
{
if (!mDirectoryIterator)
return NS_ERROR_NULL_POINTER;
(*mDirectoryIterator)++;
return NS_OK;
}
//----------------------------------------------------------------------------------------
NS_IMETHODIMP nsDirectoryIteratorImpl::GetCurrentSpec(nsIFileSpec * *aCurrentSpec)
//----------------------------------------------------------------------------------------
{
if (!mDirectoryIterator)
return NS_ERROR_NULL_POINTER;
return nsFileSpecImpl::MakeInterface(mDirectoryIterator->Spec(), aCurrentSpec);
}
//----------------------------------------------------------------------------------------
NS_METHOD nsDirectoryIteratorImpl::Create(nsISupports* outer, const nsIID& aIID, void* *aIFileSpec)
//----------------------------------------------------------------------------------------
{
if (aIFileSpec == NULL)
return NS_ERROR_NULL_POINTER;
nsDirectoryIteratorImpl* it = new nsDirectoryIteratorImpl;
if (!it)
return NS_ERROR_OUT_OF_MEMORY;
nsresult rv = it->QueryInterface(aIID, aIFileSpec);
if (NS_FAILED(rv))
{
delete it;
return rv;
}
return rv;
}
//----------------------------------------------------------------------------------------
NS_METHOD nsFileSpecImpl::Create(nsISupports* outer, const nsIID& aIID, void* *aIFileSpec)
//----------------------------------------------------------------------------------------
{
if (aIFileSpec == NULL)
return NS_ERROR_NULL_POINTER;
nsFileSpecImpl* it = new nsFileSpecImpl;
if (!it)
return NS_ERROR_OUT_OF_MEMORY;
nsresult rv = it->QueryInterface(aIID, aIFileSpec);
if (NS_FAILED(rv))
{
delete it;
return rv;
}
return rv;
}
//----------------------------------------------------------------------------------------
nsresult NS_NewFileSpecWithSpec(const nsFileSpec& aSrcFileSpec, nsIFileSpec **result)
//----------------------------------------------------------------------------------------
{
if (!result)
return NS_ERROR_NULL_POINTER;
return nsFileSpecImpl::MakeInterface(aSrcFileSpec, result);
}
//----------------------------------------------------------------------------------------
nsresult NS_NewFileSpec(nsIFileSpec** result)
//----------------------------------------------------------------------------------------
{
return nsFileSpecImpl::Create(nsnull, nsIFileSpec::GetIID(), (void**)result);
}
//----------------------------------------------------------------------------------------
nsresult NS_NewDirectoryIterator(nsIDirectoryIterator** result)
//----------------------------------------------------------------------------------------
{
return nsDirectoryIteratorImpl::Create(nsnull, nsIDirectoryIterator::GetIID(), (void**)result);
}

View File

@@ -1,603 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// This file is included by nsFileSpec.cpp, and includes the Unix-specific
// implementations.
#include <sys/stat.h>
#include <sys/param.h>
#include <errno.h>
#include <dirent.h>
#include <unistd.h>
#include <stdlib.h>
#include <limits.h>
#include "nsError.h"
#include "prio.h" /* for PR_Rename */
#if defined(_SCO_DS)
#define _SVID3 /* for statvfs.h */
#endif
#ifdef HAVE_SYS_STATVFS_H
#include <sys/statvfs.h>
#endif
#ifdef HAVE_SYS_VFS_H
#include <sys/vfs.h>
#endif
#ifdef HAVE_SYS_STATFS_H
#include <sys/statfs.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#ifdef __bsdi__
#undef Free
#endif
#endif
#ifdef HAVE_STATVFS
#define STATFS statvfs
#else
#define STATFS statfs
#endif
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024 /* Guessing this is okay. Works for SCO. */
#endif
#if defined(__QNX__)
#include <unix.h> /* for realpath */
#define f_bavail f_bfree
#endif
#if defined(SUNOS4)
extern "C" int statfs(char *, struct statfs *);
#endif
#if defined(OSF1)
extern "C" int statvfs(const char *, struct statvfs *);
#endif
//----------------------------------------------------------------------------------------
void nsFileSpecHelpers::Canonify(nsSimpleCharString& ioPath, PRBool inMakeDirs)
// Canonify, make absolute, and check whether directories exist
//----------------------------------------------------------------------------------------
{
if (ioPath.IsEmpty())
return;
if (inMakeDirs)
{
const mode_t mode = 0700;
nsFileSpecHelpers::MakeAllDirectories((const char*)ioPath, mode);
}
errno = 0; // needed?
if (ioPath[0] != '/')
{
// the ioPath that was passed in is relative. We must cat it to the cwd.
char buffer[MAXPATHLEN];
(void) getcwd(buffer, MAXPATHLEN);
strcat(buffer, "/");
strcat(buffer, ioPath);
ioPath = buffer;
}
} // nsFileSpecHelpers::Canonify
//----------------------------------------------------------------------------------------
void nsFileSpec::SetLeafName(const char* inLeafName)
//----------------------------------------------------------------------------------------
{
mPath.LeafReplace('/', inLeafName);
} // nsFileSpec::SetLeafName
//----------------------------------------------------------------------------------------
char* nsFileSpec::GetLeafName() const
//----------------------------------------------------------------------------------------
{
return mPath.GetLeaf('/');
} // nsFileSpec::GetLeafName
//----------------------------------------------------------------------------------------
PRBool nsFileSpec::Exists() const
//----------------------------------------------------------------------------------------
{
struct stat st;
return !mPath.IsEmpty() && 0 == stat(mPath, &st);
} // nsFileSpec::Exists
//----------------------------------------------------------------------------------------
void nsFileSpec::GetModDate(TimeStamp& outStamp) const
//----------------------------------------------------------------------------------------
{
struct stat st;
if (!mPath.IsEmpty() && stat(mPath, &st) == 0)
outStamp = st.st_mtime;
else
outStamp = 0;
} // nsFileSpec::GetModDate
//----------------------------------------------------------------------------------------
PRUint32 nsFileSpec::GetFileSize() const
//----------------------------------------------------------------------------------------
{
struct stat st;
if (!mPath.IsEmpty() && stat(mPath, &st) == 0)
return (PRUint32)st.st_size;
return 0;
} // nsFileSpec::GetFileSize
//----------------------------------------------------------------------------------------
PRBool nsFileSpec::IsFile() const
//----------------------------------------------------------------------------------------
{
struct stat st;
return !mPath.IsEmpty() && stat(mPath, &st) == 0 && S_ISREG(st.st_mode);
} // nsFileSpec::IsFile
//----------------------------------------------------------------------------------------
PRBool nsFileSpec::IsDirectory() const
//----------------------------------------------------------------------------------------
{
struct stat st;
return !mPath.IsEmpty() && 0 == stat(mPath, &st) && S_ISDIR(st.st_mode);
} // nsFileSpec::IsDirectory
//----------------------------------------------------------------------------------------
PRBool nsFileSpec::IsHidden() const
//----------------------------------------------------------------------------------------
{
PRBool hidden = PR_FALSE;
char *leafname = GetLeafName();
if (nsnull != leafname)
{
// rjc: don't return ".", "..", or any file/directory that begins with a "."
/* if ((!strcmp(leafname, ".")) || (!strcmp(leafname, ".."))) */
if (leafname[0] == '.')
{
hidden = PR_TRUE;
}
nsCRT::free(leafname);
}
return hidden;
} // nsFileSpec::IsHidden
//----------------------------------------------------------------------------------------
PRBool nsFileSpec::IsSymlink() const
//----------------------------------------------------------------------------------------
{
struct stat st;
if (!mPath.IsEmpty() && stat(mPath, &st) == 0 && S_ISLNK(st.st_mode))
return PR_TRUE;
return PR_FALSE;
} // nsFileSpec::IsSymlink
//----------------------------------------------------------------------------------------
nsresult nsFileSpec::ResolveSymlink(PRBool& wasAliased)
//----------------------------------------------------------------------------------------
{
wasAliased = PR_FALSE;
char resolvedPath[MAXPATHLEN];
int charCount = readlink(mPath, (char*)&resolvedPath, MAXPATHLEN);
if (0 < charCount)
{
if (MAXPATHLEN > charCount)
resolvedPath[charCount] = '\0';
wasAliased = PR_TRUE;
/* if it's not an absolute path,
replace the leaf with what got resolved */
if (resolvedPath[0] != '/') {
SetLeafName(resolvedPath);
}
else {
mPath = (char*)&resolvedPath;
}
char* canonicalPath = realpath((const char *)mPath, resolvedPath);
NS_ASSERTION(canonicalPath, "realpath failed");
if (canonicalPath) {
mPath = (char*)&resolvedPath;
}
else {
return NS_ERROR_FAILURE;
}
}
return NS_OK;
} // nsFileSpec::ResolveSymlink
//----------------------------------------------------------------------------------------
void nsFileSpec::GetParent(nsFileSpec& outSpec) const
//----------------------------------------------------------------------------------------
{
outSpec.mPath = mPath;
char* chars = (char*)outSpec.mPath;
chars[outSpec.mPath.Length() - 1] = '\0'; // avoid trailing separator, if any
char* cp = strrchr(chars, '/');
if (cp++)
outSpec.mPath.SetLength(cp - chars); // truncate.
} // nsFileSpec::GetParent
//----------------------------------------------------------------------------------------
void nsFileSpec::operator += (const char* inRelativePath)
//----------------------------------------------------------------------------------------
{
NS_ASSERTION(inRelativePath, "Attempt to do += with a null string");
if (!inRelativePath || mPath.IsEmpty())
return;
char endChar = mPath[(int)(strlen(mPath) - 1)];
if (endChar == '/')
mPath += "x";
else
mPath += "/x";
SetLeafName(inRelativePath);
} // nsFileSpec::operator +=
//----------------------------------------------------------------------------------------
void nsFileSpec::CreateDirectory(int mode)
//----------------------------------------------------------------------------------------
{
// Note that mPath is canonical!
if (mPath.IsEmpty())
return;
mkdir(mPath, mode);
} // nsFileSpec::CreateDirectory
//----------------------------------------------------------------------------------------
void nsFileSpec::Delete(PRBool inRecursive) const
// To check if this worked, call Exists() afterwards, see?
//----------------------------------------------------------------------------------------
{
if (IsDirectory())
{
if (inRecursive)
{
for (nsDirectoryIterator i(*this, PR_FALSE); i.Exists(); i++)
{
nsFileSpec& child = (nsFileSpec&)i;
child.Delete(inRecursive);
}
}
rmdir(mPath);
}
else if (!mPath.IsEmpty())
remove(mPath);
} // nsFileSpec::Delete
//----------------------------------------------------------------------------------------
void nsFileSpec::RecursiveCopy(nsFileSpec newDir) const
//----------------------------------------------------------------------------------------
{
if (IsDirectory())
{
if (!(newDir.Exists()))
{
newDir.CreateDirectory();
}
for (nsDirectoryIterator i(*this, PR_FALSE); i.Exists(); i++)
{
nsFileSpec& child = (nsFileSpec&)i;
if (child.IsDirectory())
{
nsFileSpec tmpDirSpec(newDir);
char *leafname = child.GetLeafName();
tmpDirSpec += leafname;
nsCRT::free(leafname);
child.RecursiveCopy(tmpDirSpec);
}
else
{
child.RecursiveCopy(newDir);
}
}
}
else if (!mPath.IsEmpty())
{
nsFileSpec& filePath = (nsFileSpec&) *this;
if (!(newDir.Exists()))
{
newDir.CreateDirectory();
}
filePath.CopyToDir(newDir);
}
} // nsFileSpec::RecursiveCopy
//----------------------------------------------------------------------------------------
nsresult nsFileSpec::Truncate(const PRInt32 offset) const
//----------------------------------------------------------------------------------------
{
char* Path = nsCRT::strdup(mPath);
PRInt32 rv = truncate(Path, offset) ;
nsCRT::free(Path) ;
if(!rv)
return NS_OK ;
else
return NS_ERROR_FAILURE ;
} // nsFileSpec::Truncate
//----------------------------------------------------------------------------------------
nsresult nsFileSpec::Rename(const char* inNewName)
//----------------------------------------------------------------------------------------
{
NS_ASSERTION(inNewName, "Attempt to Rename with a null string");
// This function should not be used to move a file on disk.
if (mPath.IsEmpty() || strchr(inNewName, '/'))
return NS_FILE_FAILURE;
char* oldPath = nsCRT::strdup(mPath);
SetLeafName(inNewName);
if (PR_Rename(oldPath, mPath) != NS_OK)
{
// Could not rename, set back to the original.
mPath = oldPath;
return NS_FILE_FAILURE;
}
nsCRT::free(oldPath);
return NS_OK;
} // nsFileSpec::Rename
//----------------------------------------------------------------------------------------
static int CrudeFileCopy(const char* in, const char* out)
//----------------------------------------------------------------------------------------
{
struct stat in_stat;
int stat_result = -1;
char buf [1024];
FILE *ifp, *ofp;
int rbytes, wbytes;
if (!in || !out)
return -1;
stat_result = stat (in, &in_stat);
ifp = fopen (in, "r");
if (!ifp)
{
return -1;
}
ofp = fopen (out, "w");
if (!ofp)
{
fclose (ifp);
return -1;
}
while ((rbytes = fread (buf, 1, sizeof(buf), ifp)) > 0)
{
while (rbytes > 0)
{
if ( (wbytes = fwrite (buf, 1, rbytes, ofp)) < 0 )
{
fclose (ofp);
fclose (ifp);
unlink(out);
return -1;
}
rbytes -= wbytes;
}
}
fclose (ofp);
fclose (ifp);
if (stat_result == 0)
chmod (out, in_stat.st_mode & 0777);
return 0;
} // nsFileSpec::Rename
//----------------------------------------------------------------------------------------
nsresult nsFileSpec::CopyToDir(const nsFileSpec& inParentDirectory) const
//----------------------------------------------------------------------------------------
{
// We can only copy into a directory, and (for now) can not copy entire directories
nsresult result = NS_FILE_FAILURE;
if (inParentDirectory.IsDirectory() && (! IsDirectory() ) )
{
char *leafname = GetLeafName();
nsSimpleCharString destPath(inParentDirectory.GetCString());
destPath += "/";
destPath += leafname;
nsCRT::free(leafname);
result = NS_FILE_RESULT(CrudeFileCopy(GetCString(), destPath));
}
return result;
} // nsFileSpec::CopyToDir
//----------------------------------------------------------------------------------------
nsresult nsFileSpec::MoveToDir(const nsFileSpec& inNewParentDirectory)
//----------------------------------------------------------------------------------------
{
// We can only copy into a directory, and (for now) can not copy entire directories
nsresult result = NS_FILE_FAILURE;
if (inNewParentDirectory.IsDirectory() && !IsDirectory())
{
char *leafname = GetLeafName();
nsSimpleCharString destPath(inNewParentDirectory.GetCString());
destPath += "/";
destPath += leafname;
nsCRT::free(leafname);
result = NS_FILE_RESULT(CrudeFileCopy(GetCString(), (const char*)destPath));
if (result == NS_OK)
{
// cast to fix const-ness
((nsFileSpec*)this)->Delete(PR_FALSE);
*this = inNewParentDirectory + GetLeafName();
}
}
return result;
}
//----------------------------------------------------------------------------------------
nsresult nsFileSpec::Execute(const char* inArgs ) const
//----------------------------------------------------------------------------------------
{
nsresult result = NS_FILE_FAILURE;
if (!mPath.IsEmpty() && !IsDirectory())
{
nsSimpleCharString fileNameWithArgs = mPath + " " + inArgs;
result = NS_FILE_RESULT(system(fileNameWithArgs));
}
return result;
} // nsFileSpec::Execute
//----------------------------------------------------------------------------------------
PRInt64 nsFileSpec::GetDiskSpaceAvailable() const
//----------------------------------------------------------------------------------------
{
PRInt64 bytes; /* XXX dougt needs to fix this */
LL_I2L(bytes , LONG_MAX); // initialize to all the space in the world?
#if defined(HAVE_SYS_STATFS_H) || defined(HAVE_SYS_STATVFS_H)
char curdir [MAXPATHLEN];
if (mPath.IsEmpty())
{
(void) getcwd(curdir, MAXPATHLEN);
if (!curdir)
return bytes; /* hope for the best as we did in cheddar */
}
else
sprintf(curdir, "%.200s", (const char*)mPath);
struct STATFS fs_buf;
#if defined(__QNX__) && !defined(HAVE_STATVFS) /* Maybe this should be handled differently? */
if (STATFS(curdir, &fs_buf, 0, 0) < 0)
#else
if (STATFS(curdir, &fs_buf) < 0)
#endif
return bytes; /* hope for the best as we did in cheddar */
#ifdef DEBUG_DISK_SPACE
printf("DiskSpaceAvailable: %d bytes\n",
fs_buf.f_bsize * (fs_buf.f_bavail - 1));
#endif
LL_I2L( bytes, (fs_buf.f_bsize * (fs_buf.f_bavail - 1) ) );
return bytes;
#else
/*
** This platform doesn't have statfs or statvfs, so we don't have much
** choice but to "hope for the best as we did in cheddar".
*/
return bytes;
#endif /* HAVE_SYS_STATFS_H or HAVE_SYS_STATVFS_H */
} // nsFileSpec::GetDiskSpace()
//========================================================================================
// nsDirectoryIterator
//========================================================================================
//----------------------------------------------------------------------------------------
nsDirectoryIterator::nsDirectoryIterator(const nsFileSpec& inDirectory, PRBool resolveSymLinks)
//----------------------------------------------------------------------------------------
: mCurrent(inDirectory)
, mExists(PR_FALSE)
, mResoveSymLinks(resolveSymLinks)
, mStarting(inDirectory)
, mDir(nsnull)
{
mStarting += "sysygy"; // save off the starting directory
mCurrent += "sysygy"; // prepare the path for SetLeafName
mDir = opendir((const char*)nsFilePath(inDirectory));
++(*this);
} // nsDirectoryIterator::nsDirectoryIterator
//----------------------------------------------------------------------------------------
nsDirectoryIterator::~nsDirectoryIterator()
//----------------------------------------------------------------------------------------
{
if (mDir)
closedir(mDir);
} // nsDirectoryIterator::nsDirectoryIterator
//----------------------------------------------------------------------------------------
nsDirectoryIterator& nsDirectoryIterator::operator ++ ()
//----------------------------------------------------------------------------------------
{
mExists = PR_FALSE;
if (!mDir)
return *this;
char* dot = ".";
char* dotdot = "..";
struct dirent* entry = readdir(mDir);
if (entry && strcmp(entry->d_name, dot) == 0)
entry = readdir(mDir);
if (entry && strcmp(entry->d_name, dotdot) == 0)
entry = readdir(mDir);
if (entry)
{
mExists = PR_TRUE;
mCurrent = mStarting; // restore mCurrent to be the starting directory. ResolveSymlink() may have taken us to another directory
mCurrent.SetLeafName(entry->d_name);
if (mResoveSymLinks)
{
PRBool ignore;
mCurrent.ResolveSymlink(ignore);
}
}
return *this;
} // nsDirectoryIterator::operator ++
//----------------------------------------------------------------------------------------
nsDirectoryIterator& nsDirectoryIterator::operator -- ()
//----------------------------------------------------------------------------------------
{
return ++(*this); // can't do it backwards.
} // nsDirectoryIterator::operator --

View File

@@ -1,726 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// This file is included by nsFileSpec.cp, and includes the Windows-specific
// implementations.
#include <sys/stat.h>
#include <direct.h>
#include <limits.h>
#include <stdlib.h>
#include "prio.h"
#include "nsError.h"
#include "windows.h"
#if (_MSC_VER == 1100)
#define INITGUID
#include "objbase.h"
DEFINE_OLEGUID(IID_IPersistFile, 0x0000010BL, 0, 0);
#endif
#include "shlobj.h"
#include "shellapi.h"
#include "shlguid.h"
#ifdef UNICODE
#define CreateDirectoryW CreateDirectory
#else
#define CreateDirectoryA CreateDirectory
#endif
//----------------------------------------------------------------------------------------
void nsFileSpecHelpers::Canonify(nsSimpleCharString& ioPath, PRBool inMakeDirs)
// Canonify, make absolute, and check whether directories exist. This
// takes a (possibly relative) native path and converts it into a
// fully qualified native path.
//----------------------------------------------------------------------------------------
{
if (ioPath.IsEmpty())
return;
NS_ASSERTION(strchr((const char*)ioPath, '/') == 0,
"This smells like a Unix path. Native path expected! "
"Please fix.");
if (inMakeDirs)
{
const int mode = 0700;
nsSimpleCharString unixStylePath = ioPath;
nsFileSpecHelpers::NativeToUnix(unixStylePath);
nsFileSpecHelpers::MakeAllDirectories((const char*)unixStylePath, mode);
}
char buffer[_MAX_PATH];
errno = 0;
*buffer = '\0';
char* canonicalPath = _fullpath(buffer, ioPath, _MAX_PATH);
NS_ASSERTION( canonicalPath[0] != '\0', "Uh oh...couldn't convert" );
if (canonicalPath[0] == '\0')
return;
ioPath = canonicalPath;
} // nsFileSpecHelpers::Canonify
//----------------------------------------------------------------------------------------
void nsFileSpecHelpers::UnixToNative(nsSimpleCharString& ioPath)
// This just does string manipulation. It doesn't check reality, or canonify, or
// anything
//----------------------------------------------------------------------------------------
{
// Allow for relative or absolute. We can do this in place, because the
// native path is never longer.
if (ioPath.IsEmpty())
return;
// Strip initial slash for an absolute path
char* src = (char*)ioPath;
if (*src == '/')
{
// Since it was an absolute path, check for the drive letter
char* colonPointer = src + 2;
if (strstr(src, "|/") == colonPointer)
*colonPointer = ':';
// allocate new string by copying from ioPath[1]
nsSimpleCharString temp = src + 1;
ioPath = temp;
}
src = (char*)ioPath;
// Convert '/' to '\'.
while (*++src)
{
if (*src == '/')
*src = '\\';
}
} // nsFileSpecHelpers::UnixToNative
//----------------------------------------------------------------------------------------
void nsFileSpecHelpers::NativeToUnix(nsSimpleCharString& ioPath)
// This just does string manipulation. It doesn't check reality, or canonify, or
// anything. The unix path is longer, so we can't do it in place.
//----------------------------------------------------------------------------------------
{
if (ioPath.IsEmpty())
return;
// Convert the drive-letter separator, if present
nsSimpleCharString temp("/");
char* cp = (char*)ioPath + 1;
if (strstr(cp, ":\\") == cp)
*cp = '|'; // absolute path
else
temp[0] = '\0'; // relative path
// Convert '\' to '/'
for (; *cp; cp++)
{
if (*cp == '\\')
*cp = '/';
}
// Add the slash in front.
temp += ioPath;
ioPath = temp;
}
//----------------------------------------------------------------------------------------
nsFileSpec::nsFileSpec(const nsFilePath& inPath)
//----------------------------------------------------------------------------------------
{
*this = inPath;
}
//----------------------------------------------------------------------------------------
void nsFileSpec::operator = (const nsFilePath& inPath)
//----------------------------------------------------------------------------------------
{
mPath = (const char*)inPath;
nsFileSpecHelpers::UnixToNative(mPath);
mError = NS_OK;
} // nsFileSpec::operator =
//----------------------------------------------------------------------------------------
nsFilePath::nsFilePath(const nsFileSpec& inSpec)
//----------------------------------------------------------------------------------------
{
*this = inSpec;
} // nsFilePath::nsFilePath
//----------------------------------------------------------------------------------------
void nsFilePath::operator = (const nsFileSpec& inSpec)
//----------------------------------------------------------------------------------------
{
mPath = inSpec.mPath;
nsFileSpecHelpers::NativeToUnix(mPath);
} // nsFilePath::operator =
//----------------------------------------------------------------------------------------
void nsFileSpec::SetLeafName(const char* inLeafName)
//----------------------------------------------------------------------------------------
{
NS_ASSERTION(inLeafName, "Attempt to SetLeafName with a null string");
mPath.LeafReplace('\\', inLeafName);
} // nsFileSpec::SetLeafName
//----------------------------------------------------------------------------------------
char* nsFileSpec::GetLeafName() const
//----------------------------------------------------------------------------------------
{
return mPath.GetLeaf('\\');
} // nsFileSpec::GetLeafName
//----------------------------------------------------------------------------------------
PRBool nsFileSpec::Exists() const
//----------------------------------------------------------------------------------------
{
struct stat st;
return !mPath.IsEmpty() && 0 == stat(nsNSPRPath(*this), &st);
} // nsFileSpec::Exists
//----------------------------------------------------------------------------------------
void nsFileSpec::GetModDate(TimeStamp& outStamp) const
//----------------------------------------------------------------------------------------
{
struct stat st;
if (!mPath.IsEmpty() && stat(nsNSPRPath(*this), &st) == 0)
outStamp = st.st_mtime;
else
outStamp = 0;
} // nsFileSpec::GetModDate
//----------------------------------------------------------------------------------------
PRUint32 nsFileSpec::GetFileSize() const
//----------------------------------------------------------------------------------------
{
struct stat st;
if (!mPath.IsEmpty() && stat(nsNSPRPath(*this), &st) == 0)
return (PRUint32)st.st_size;
return 0;
} // nsFileSpec::GetFileSize
//----------------------------------------------------------------------------------------
PRBool nsFileSpec::IsFile() const
//----------------------------------------------------------------------------------------
{
struct stat st;
return !mPath.IsEmpty() && 0 == stat(nsNSPRPath(*this), &st) && (_S_IFREG & st.st_mode);
} // nsFileSpec::IsFile
//----------------------------------------------------------------------------------------
PRBool nsFileSpec::IsDirectory() const
//----------------------------------------------------------------------------------------
{
struct stat st;
return !mPath.IsEmpty() && 0 == stat(nsNSPRPath(*this), &st) && (_S_IFDIR & st.st_mode);
} // nsFileSpec::IsDirectory
//----------------------------------------------------------------------------------------
PRBool nsFileSpec::IsHidden() const
//----------------------------------------------------------------------------------------
{
PRBool hidden = PR_FALSE;
if (!mPath.IsEmpty())
{
DWORD attr = GetFileAttributes(mPath);
if (FILE_ATTRIBUTE_HIDDEN & attr)
hidden = PR_TRUE;
}
return hidden;
}
// nsFileSpec::IsHidden
//----------------------------------------------------------------------------------------
PRBool nsFileSpec::IsSymlink() const
//----------------------------------------------------------------------------------------
{
HRESULT hres;
IShellLink* psl;
PRBool isSymlink = PR_FALSE;
CoInitialize(NULL);
// Get a pointer to the IShellLink interface.
hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (void**)&psl);
if (SUCCEEDED(hres))
{
IPersistFile* ppf;
// Get a pointer to the IPersistFile interface.
hres = psl->QueryInterface(IID_IPersistFile, (void**)&ppf);
if (SUCCEEDED(hres))
{
WORD wsz[MAX_PATH];
// Ensure that the string is Unicode.
MultiByteToWideChar(CP_ACP, 0, mPath, -1, wsz, MAX_PATH);
// Load the shortcut.
hres = ppf->Load(wsz, STGM_READ);
if (SUCCEEDED(hres))
{
isSymlink = PR_TRUE;
}
// Release the pointer to the IPersistFile interface.
ppf->Release();
}
// Release the pointer to the IShellLink interface.
psl->Release();
}
CoUninitialize();
return isSymlink;
}
//----------------------------------------------------------------------------------------
nsresult nsFileSpec::ResolveSymlink(PRBool& wasSymlink)
//----------------------------------------------------------------------------------------
{
wasSymlink = PR_FALSE; // assume failure
HRESULT hres;
IShellLink* psl;
CoInitialize(NULL);
// Get a pointer to the IShellLink interface.
hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (void**)&psl);
if (SUCCEEDED(hres))
{
IPersistFile* ppf;
// Get a pointer to the IPersistFile interface.
hres = psl->QueryInterface(IID_IPersistFile, (void**)&ppf);
if (SUCCEEDED(hres))
{
WORD wsz[MAX_PATH];
// Ensure that the string is Unicode.
MultiByteToWideChar(CP_ACP, 0, mPath, -1, wsz, MAX_PATH);
// Load the shortcut.
hres = ppf->Load(wsz, STGM_READ);
if (SUCCEEDED(hres))
{
wasSymlink = PR_TRUE;
// Resolve the link.
hres = psl->Resolve(nsnull, SLR_NO_UI );
if (SUCCEEDED(hres))
{
char szGotPath[MAX_PATH];
WIN32_FIND_DATA wfd;
// Get the path to the link target.
hres = psl->GetPath( szGotPath, MAX_PATH, &wfd, SLGP_UNCPRIORITY );
if (SUCCEEDED(hres))
{
// Here we modify the nsFileSpec;
mPath = szGotPath;
mError = NS_OK;
}
}
}
// Release the pointer to the IPersistFile interface.
ppf->Release();
}
// Release the pointer to the IShellLink interface.
psl->Release();
}
CoUninitialize();
if (SUCCEEDED(hres))
return NS_OK;
return NS_FILE_FAILURE;
}
//----------------------------------------------------------------------------------------
void nsFileSpec::GetParent(nsFileSpec& outSpec) const
//----------------------------------------------------------------------------------------
{
outSpec.mPath = mPath;
char* chars = (char*)outSpec.mPath;
chars[outSpec.mPath.Length() - 1] = '\0'; // avoid trailing separator, if any
char* cp = strrchr(chars, '\\');
if (cp++)
outSpec.mPath.SetLength(cp - chars); // truncate.
} // nsFileSpec::GetParent
//----------------------------------------------------------------------------------------
void nsFileSpec::operator += (const char* inRelativePath)
//----------------------------------------------------------------------------------------
{
NS_ASSERTION(inRelativePath, "Attempt to do += with a null string");
if (!inRelativePath || mPath.IsEmpty())
return;
if (mPath[mPath.Length() - 1] == '\\')
mPath += "x";
else
mPath += "\\x";
// If it's a (unix) relative path, make it native
nsSimpleCharString dosPath = inRelativePath;
nsFileSpecHelpers::UnixToNative(dosPath);
SetLeafName(dosPath);
} // nsFileSpec::operator +=
//----------------------------------------------------------------------------------------
void nsFileSpec::CreateDirectory(int /*mode*/)
//----------------------------------------------------------------------------------------
{
// Note that mPath is canonical!
if (!mPath.IsEmpty())
mkdir(nsNSPRPath(*this));
} // nsFileSpec::CreateDirectory
//----------------------------------------------------------------------------------------
void nsFileSpec::Delete(PRBool inRecursive) const
//----------------------------------------------------------------------------------------
{
if (IsDirectory())
{
if (inRecursive)
{
for (nsDirectoryIterator i(*this, PR_FALSE); i.Exists(); i++)
{
nsFileSpec& child = (nsFileSpec&)i;
child.Delete(inRecursive);
}
}
rmdir(nsNSPRPath(*this));
}
else if (!mPath.IsEmpty())
{
remove(nsNSPRPath(*this));
}
} // nsFileSpec::Delete
//----------------------------------------------------------------------------------------
void nsFileSpec::RecursiveCopy(nsFileSpec newDir) const
//----------------------------------------------------------------------------------------
{
if (IsDirectory())
{
if (!(newDir.Exists()))
{
newDir.CreateDirectory();
}
for (nsDirectoryIterator i(*this, PR_FALSE); i.Exists(); i++)
{
nsFileSpec& child = (nsFileSpec&)i;
if (child.IsDirectory())
{
nsFileSpec tmpDirSpec(newDir);
char *leafname = child.GetLeafName();
tmpDirSpec += leafname;
nsCRT::free(leafname);
child.RecursiveCopy(tmpDirSpec);
}
else
{
child.RecursiveCopy(newDir);
}
}
}
else if (!mPath.IsEmpty())
{
nsFileSpec& filePath = (nsFileSpec&) *this;
if (!(newDir.Exists()))
{
newDir.CreateDirectory();
}
filePath.CopyToDir(newDir);
}
} // nsFileSpec::RecursiveCopy
// We have to implement this since there's no truncate() in system.
//----------------------------------------------------------------------------------------
nsresutl nsFileSpec::Truncate(const PRInt32 offset) const
{
char* oldPath = nsCRT::strdup(mPath);
nsFileSpec newFile = *this ;
newFile.MakeUnique() ;
nsInputFileStream inStream(*this) ;
nsOutputFileStream outStream(newFile) ;
PRUint32 buffer_size = 1024, len ;
char buffer[buffer_size] ;
PRUint32 bytes_read=0, bytes_written=0, size_left = offset ;
do {
if(size_left > buffer_size)
len = buffer_size ;
else
len = size_left ;
bytes_read = inStream.read((void*)buffer, len) ;
bytes_written = outStream.write(buffer, bytes_read) ;
if(bytes_written != bytes_read)
return NS_ERROR_FAILURE ;
size_left -= bytes_read ;
} while(!set_left) ;
outStream.flush() ;
outStream.close() ;
inStream.close() ;
// remove the original file
Delete(PR_TRUE) ;
// rename the new file
rv = newFile.Rename(oldPath) ;
return rv ;
} // nsFileSpec::Truncate
//----------------------------------------------------------------------------------------
nsresult nsFileSpec::Rename(const char* inNewName)
//----------------------------------------------------------------------------------------
{
NS_ASSERTION(inNewName, "Attempt to Rename with a null string");
// This function should not be used to move a file on disk.
if (strchr(inNewName, '/'))
return NS_FILE_FAILURE;
char* oldPath = nsCRT::strdup(mPath);
SetLeafName(inNewName);
if (PR_Rename(oldPath, mPath) != NS_OK)
{
// Could not rename, set back to the original.
mPath = oldPath;
return NS_FILE_FAILURE;
}
nsCRT::free(oldPath);
return NS_OK;
} // nsFileSpec::Rename
//----------------------------------------------------------------------------------------
nsresult nsFileSpec::CopyToDir(const nsFileSpec& inParentDirectory) const
//----------------------------------------------------------------------------------------
{
// We can only copy into a directory, and (for now) can not copy entire directories
if (inParentDirectory.IsDirectory() && (! IsDirectory() ) )
{
char *leafname = GetLeafName();
nsSimpleCharString destPath(inParentDirectory.GetCString());
destPath += "\\";
destPath += leafname;
nsCRT::free(leafname);
// CopyFile returns non-zero if succeeds
int copyOK = CopyFile(GetCString(), destPath, PR_TRUE);
if (copyOK)
return NS_OK;
}
return NS_FILE_FAILURE;
} // nsFileSpec::CopyToDir
//----------------------------------------------------------------------------------------
nsresult nsFileSpec::MoveToDir(const nsFileSpec& inNewParentDirectory)
//----------------------------------------------------------------------------------------
{
// We can only copy into a directory, and (for now) can not copy entire directories
if (inNewParentDirectory.IsDirectory() && (! IsDirectory() ) )
{
char *leafname = GetLeafName();
nsSimpleCharString destPath(inNewParentDirectory.GetCString());
destPath += "\\";
destPath += leafname;
nsCRT::free(leafname);
// MoveFile returns non-zero if succeeds
int copyOK = MoveFile(GetCString(), destPath);
if (copyOK)
{
*this = inNewParentDirectory + GetLeafName();
return NS_OK;
}
}
return NS_FILE_FAILURE;
} // nsFileSpec::MoveToDir
//----------------------------------------------------------------------------------------
nsresult nsFileSpec::Execute(const char* inArgs ) const
//----------------------------------------------------------------------------------------
{
if (!IsDirectory())
{
nsSimpleCharString fileNameWithArgs = mPath + " " + inArgs;
int execResult = WinExec( fileNameWithArgs, SW_NORMAL );
if (execResult > 31)
return NS_OK;
}
return NS_FILE_FAILURE;
} // nsFileSpec::Execute
//----------------------------------------------------------------------------------------
PRInt64 nsFileSpec::GetDiskSpaceAvailable() const
//----------------------------------------------------------------------------------------
{
PRInt64 int64;
LL_I2L(int64 , LONG_MAX);
char aDrive[_MAX_DRIVE + 2];
_splitpath( (const char*)mPath, aDrive, NULL, NULL, NULL);
if (aDrive[0] == '\0')
{
// The back end is always trying to pass us paths that look
// like /c|/netscape/mail. See if we've got one of them
if (mPath.Length() > 2 && mPath[0] == '/' && mPath[2] == '|')
{
aDrive[0] = mPath[1];
aDrive[1] = ':';
aDrive[2] = '\0';
}
else
{
// Return bogus large number and hope for the best
return int64;
}
}
strcat(aDrive, "\\");
// Check disk space
DWORD dwSecPerClus, dwBytesPerSec, dwFreeClus, dwTotalClus;
ULARGE_INTEGER liFreeBytesAvailableToCaller, liTotalNumberOfBytes, liTotalNumberOfFreeBytes;
double nBytes = 0;
BOOL (WINAPI* getDiskFreeSpaceExA)(LPCTSTR lpDirectoryName,
PULARGE_INTEGER lpFreeBytesAvailableToCaller,
PULARGE_INTEGER lpTotalNumberOfBytes,
PULARGE_INTEGER lpTotalNumberOfFreeBytes) = NULL;
HINSTANCE hInst = LoadLibrary("KERNEL32.DLL");
NS_ASSERTION(hInst != NULL, "COULD NOT LOAD KERNEL32.DLL");
if (hInst != NULL)
{
getDiskFreeSpaceExA = (BOOL (WINAPI*)(LPCTSTR lpDirectoryName,
PULARGE_INTEGER lpFreeBytesAvailableToCaller,
PULARGE_INTEGER lpTotalNumberOfBytes,
PULARGE_INTEGER lpTotalNumberOfFreeBytes))
GetProcAddress(hInst, "GetDiskFreeSpaceExA");
FreeLibrary(hInst);
}
if (getDiskFreeSpaceExA && (*getDiskFreeSpaceExA)(aDrive,
&liFreeBytesAvailableToCaller,
&liTotalNumberOfBytes,
&liTotalNumberOfFreeBytes))
{
nBytes = (double)(signed __int64)liFreeBytesAvailableToCaller.QuadPart;
}
else if ( GetDiskFreeSpace(aDrive, &dwSecPerClus, &dwBytesPerSec, &dwFreeClus, &dwTotalClus))
{
nBytes = (double)dwFreeClus*(double)dwSecPerClus*(double) dwBytesPerSec;
}
return (PRInt64)nBytes;
}
//========================================================================================
// nsDirectoryIterator
//========================================================================================
//----------------------------------------------------------------------------------------
nsDirectoryIterator::nsDirectoryIterator(const nsFileSpec& inDirectory, PRBool resolveSymlink)
//----------------------------------------------------------------------------------------
: mCurrent(inDirectory)
, mDir(nsnull)
, mStarting(inDirectory)
, mExists(PR_FALSE)
, mResoveSymLinks(resolveSymlink)
{
mDir = PR_OpenDir(inDirectory);
mCurrent += "dummy";
mStarting += "dummy";
++(*this);
} // nsDirectoryIterator::nsDirectoryIterator
//----------------------------------------------------------------------------------------
nsDirectoryIterator::~nsDirectoryIterator()
//----------------------------------------------------------------------------------------
{
if (mDir)
PR_CloseDir(mDir);
} // nsDirectoryIterator::nsDirectoryIterator
//----------------------------------------------------------------------------------------
nsDirectoryIterator& nsDirectoryIterator::operator ++ ()
//----------------------------------------------------------------------------------------
{
mExists = PR_FALSE;
if (!mDir)
return *this;
PRDirEntry* entry = PR_ReadDir(mDir, PR_SKIP_BOTH); // Ignore '.' && '..'
if (entry)
{
mExists = PR_TRUE;
mCurrent = mStarting;
mCurrent.SetLeafName(entry->name);
if (mResoveSymLinks)
{
PRBool ignore;
mCurrent.ResolveSymlink(ignore);
}
}
return *this;
} // nsDirectoryIterator::operator ++
//----------------------------------------------------------------------------------------
nsDirectoryIterator& nsDirectoryIterator::operator -- ()
//----------------------------------------------------------------------------------------
{
return ++(*this); // can't do it backwards.
} // nsDirectoryIterator::operator --

View File

@@ -1,85 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* 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.
*
*/
[ptr] native nsString(nsString);
%{ C++
#include "nsString.h"
%}
#include "nsIOutputStream.idl"
#include "nsrootidl.idl"
/**
* This interface allows consumption of primitive data types from a "binary
* stream" containing untagged, big-endian binary data, i.e. as produced by an
* implementation of nsIBinaryOutputStream. This might be used, for example,
* to implement network protocols or to read from architecture-neutral disk
* files, i.e. ones that can be read and written by both big-endian and
* little-endian platforms.
*
* @See nsIBinaryOutputStream
*/
[scriptable, uuid(7b456cb0-8772-11d3-90cf-0040056a906e)]
interface nsIBinaryInputStream : nsIInputStream {
void setInputStream(in nsIInputStream aInputStream);
PRBool readBoolean();
PRUint8 read8();
PRUint16 read16();
PRUint32 read32();
PRUint64 read64();
float readFloat();
double readDouble();
/**
* Read a NUL-terminated 8-bit char* string from a binary stream.
*/
string readStringZ();
/**
* Read a NUL-terminated 16-bit PRUnichar* string from a binary stream.
*/
wstring readWStringZ();
/**
* Read a NUL-terminated UTF8-encoded string from a binary stream, producing
* a NUL-terminated 16-bit PRUnichar* string argument as a result.
*/
wstring readUtf8Z();
/**
* Read an opaque byte array from a binary stream.
*/
void readBytes([size_is(aLength)] out string aString, in PRUint32 aLength);
/**
* Read a string (possibly containing embedded NULs) from a binary stream.
*/
[noscript] nsString readString();
};
%{C++
NS_COM nsresult
NS_NewBinaryInputStream(nsIBinaryInputStream* *aResult, nsIInputStream* aSrcStream);
%}

View File

@@ -1,86 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* 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.
*
*/
[ptr] native nsString(nsString);
%{ C++
#include "nsString.h"
%}
#include "nsIOutputStream.idl"
#include "nsrootidl.idl"
/**
* This interface allows writing of primitive data types (integers,
* floating-point values, booleans, etc.) to a stream in a binary, untagged,
* fixed-endianness format. This might be used, for example, to implement
* network protocols or to produce architecture-neutral binary disk files,
* i.e. ones that can be read and written by both big-endian and little-endian
* platforms. Output is written in big-endian order (high-order byte first),
* as this is traditional network order.
*
* @See nsIBinaryInputStream
*/
[scriptable, uuid(204ee610-8765-11d3-90cf-0040056a906e)]
interface nsIBinaryOutputStream : nsIOutputStream {
void setOutputStream(in nsIOutputStream aOutputStream);
void writeBoolean(in PRBool aBoolean);
void write8(in PRUint8 aByte);
void write16(in PRUint16 a16);
void write32(in PRUint32 a32);
void write64(in PRUint64 a64);
void writeFloat(in float aFloat);
void writeDouble(in double aDouble);
/**
* Write a NUL-terminated 8-bit char* string to a binary stream.
*/
void writeStringZ(in string aString);
/**
* Write a NUL-terminated 16-bit PRUnichar* string to a binary stream.
*/
void writeWStringZ(in wstring aString);
/**
* Write a NUL-terminated UTF8-encoded string to a binary stream, produced
* from a NUL-terminated 16-bit PRUnichar* string argument.
*/
void writeUtf8Z(in wstring aString);
/**
* Write an opaque byte array to a binary stream.
*/
void writeBytes([size_is(aLength)] in string aString, in PRUint32 aLength);
/**
* Write a string (possibly containing embedded NULs) to a binary stream.
*/
[noscript] void writeString(in nsString aString);
};
%{C++
NS_COM nsresult
NS_NewBinaryOutputStream(nsIBinaryOutputStream* *aResult, nsIOutputStream* aDestStream);
%}

View File

@@ -1,158 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// This is the only correct cross-platform way to specify a file.
// Strings are not such a way. If you grew up on windows or unix, you
// may think they are. Welcome to reality.
#include "nsISupports.idl"
%{C++
#include "nsFileSpec.h" // for factory method
%}
interface nsIFileURL;
interface nsIFilePath;
interface nsIOutputStream;
interface nsIInputStream;
// Define Progid and CID
%{C++
// {A5740FA2-146E-11d3-B00D-00C04FC2E79B}
#define NS_FILESPEC_CID \
{ 0xa5740fa2, 0x146e, 0x11d3, { 0xb0, 0xd, 0x0, 0xc0, 0x4f, 0xc2, 0xe7, 0x9b } }
#define NS_FILESPEC_PROGID "component://netscape/filespec"
#define NS_FILESPEC_CLASSNAME "File Spec"
%}
native nsFileSpec(nsFileSpec);
[ref] native nsFileSpecRef(nsFileSpec);
[ptr] native nsFileSpecPtr(nsFileSpec);
[scriptable, uuid(d8c0a080-0868-11d3-915f-d9d889d48e3c)]
interface nsIFileSpec : nsISupports
{
void fromFileSpec([const] in nsIFileSpec original);
attribute string URLString;
attribute string unixStyleFilePath;
attribute string persistentDescriptorString;
attribute string nativePath;
readonly attribute string NSPRPath;
void error();
boolean isValid();
boolean failed();
attribute string leafName;
readonly attribute nsIFileSpec parent;
readonly attribute nsIInputStream inputStream;
readonly attribute nsIOutputStream outputStream;
boolean isChildOf(in nsIFileSpec possibleParent);
[noscript] readonly attribute nsFileSpec fileSpec;
[noscript] void setFromFileSpec([const] in nsFileSpecRef spec);
attribute string fileContents;
void makeUnique();
void makeUniqueWithSuggestedName(in string suggestedName);
readonly attribute unsigned long modDate;
boolean modDateChanged(in unsigned long oldStamp);
boolean isDirectory();
boolean isFile();
boolean exists();
boolean isHidden();
readonly attribute unsigned long fileSize;
readonly attribute long long diskSpaceAvailable;
void appendRelativeUnixPath(in string relativePath);
void createDir();
void touch();
boolean isSymlink();
void resolveSymlink();
void truncate([const] in long offset) ;
void rename([const] in string newLeafName);
void copyToDir([const] in nsIFileSpec newParentDir);
void moveToDir([const] in nsIFileSpec newParentDir);
void execute([const] in string args);
void openStreamForReading();
void openStreamForWriting();
void openStreamForReadingAndWriting();
void closeStream();
boolean isStreamOpen();
boolean eof();
long read(inout string buffer, in long requestedCount);
void readLine(inout string line, in long bufferSize, out boolean wasTruncated);
%{C++
// Check eof() before each call.
// CAUTION: false result only indicates line was truncated
// to fit buffer, or an error occurred (OTHER THAN eof).
%}
long write(in string data, in long requestedCount);
void flush();
void seek(in long offset);
long tell();
void endLine();
};
// Define Progid and CID
%{C++
// {a3020981-2018-11d3-915f-a957795b7ebc}
#define NS_DIRECTORYITERATOR_CID \
{ 0xa3020981, 0x2018, 0x11d3, { 0x91, 0x5f, 0xa9, 0x57, 0x79, 0x5b, 0x7e, 0xbc } }
#define NS_DIRECTORYITERATOR_PROGID "component://netscape/directoryiterator"
#define NS_DIRECTORYITERATOR_CLASSNAME "nsIDirectoryIterator"
%}
[scriptable, uuid(d8c0a083-0868-11d3-915f-d9d889d48e3c)]
interface nsIDirectoryIterator : nsISupports
{
void init(in nsIFileSpec parent, in boolean resolveSymlink);
boolean exists();
void next();
readonly attribute nsIFileSpec currentSpec;
};
%{C++
// Factory methods if you link with xpcom
NS_COM nsresult NS_NewFileSpecWithSpec(const nsFileSpec& aSrcFileSpec, nsIFileSpec **result);
NS_COM nsresult NS_NewFileSpec(nsIFileSpec** result);
NS_COM nsresult NS_NewDirectoryIterator(nsIDirectoryIterator** result);
#define NS_BOOL_ACCESSOR(_method) { PRBool yes; return NS_SUCCEEDED(f->_method(&yes)) && yes; }
inline PRBool Exists(nsIFileSpec* f) NS_BOOL_ACCESSOR(Exists)
inline PRBool Exists(nsIDirectoryIterator* f) NS_BOOL_ACCESSOR(Exists)
inline PRBool IsDirectory(nsIFileSpec* f) NS_BOOL_ACCESSOR(IsDirectory)
%}

View File

@@ -1,74 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* 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.
*
*/
#include "nsISupports.idl"
#include "nsrootidl.idl"
interface nsIAllocator;
interface nsIInputStream;
interface nsIOutputStream;
/**
* The nsIStorageStream interface maintains an internal data buffer that can be
* filled using a single output stream. One or more independent input streams
* can be created to read the data from the buffer non-destructively.
*/
[scriptable, uuid(604ad9d0-753e-11d3-90ca-0040056a906e)]
interface nsIStorageStream : nsISupports
{
/**
* Get a reference to the one and only output stream for this instance.
* The zero-based startPosition argument is used is used to set the initial
* write cursor position. The startPosition cannot be set larger than the
* current buffer length. Calling this method has the side-effect of
* truncating the internal buffer to startPosition bytes.
*/
nsIOutputStream getOutputStream(in PRInt32 startPosition);
/**
* Create a new input stream to read data (written by the singleton output
* stream) from the internal buffer. Multiple, independent input streams
* can be created.
*/
nsIInputStream newInputStream(in PRInt32 startPosition);
/**
* The length attribute indicates the total number of bytes stored in the
* nsIStorageStream internal buffer, regardless of any consumption by input
* streams. Assigning to the length field can be used to truncate the
* buffer data, but can not be used when either the instance's output
* stream is in use.
*
* @See #writeInProgress */
attribute PRUint32 length;
/**
* True, when output stream has not yet been Close'ed
*/
readonly attribute boolean writeInProgress;
};
%{C++
// Factory method
NS_COM nsresult
NS_NewStorageStream(PRUint32 segmentSize, PRUint32 maxSize, nsIStorageStream **result);
%}

View File

@@ -1,467 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#include "nsIStringStream.h"
#include "nsIFileStream.h"
#include "prerror.h"
#include "nsFileSpec.h"
#include "plstr.h"
//========================================================================================
class BasicStringImpl
: public nsIOutputStream
, public nsIInputStream
, public nsIRandomAccessStore
//========================================================================================
{
public:
BasicStringImpl()
: mOffset(0)
, mLastResult(NS_OK)
, mEOF(PR_FALSE)
{
NS_INIT_REFCNT();
}
virtual ~BasicStringImpl()
{
}
NS_IMETHOD Seek(PRSeekWhence whence, PRInt32 offset);
NS_IMETHOD Tell(PRIntn* outWhere)
{
*outWhere = mOffset;
return NS_OK;
}
NS_IMETHOD GetAtEOF(PRBool* outAtEOF)
{
*outAtEOF = mEOF;
return NS_OK;
}
NS_IMETHOD SetAtEOF(PRBool inAtEOF)
{
mEOF = inAtEOF;
return NS_OK;
}
NS_IMETHOD Available(PRUint32 *aLength)
{
NS_PRECONDITION(aLength != nsnull, "null ptr");
if (!aLength)
return NS_ERROR_NULL_POINTER;
*aLength = length();
return NS_OK;
}
NS_IMETHOD Read(char* aBuf,
PRUint32 aCount,
PRUint32 *aReadCount)
{
NS_PRECONDITION(aBuf != nsnull, "null ptr");
if (!aBuf)
return NS_ERROR_NULL_POINTER;
NS_PRECONDITION(aReadCount != nsnull, "null ptr");
if (!aReadCount)
return NS_ERROR_NULL_POINTER;
if (NS_FAILED(mLastResult))
return mLastResult;
PRInt32 bytesRead = read(aBuf, aCount);
if (NS_FAILED(mLastResult))
{
*aReadCount = 0;
return mLastResult;
}
*aReadCount = bytesRead;
if (bytesRead < (PRInt32)aCount)
SetAtEOF(PR_TRUE);
return NS_OK;
}
// nsIOutputStream interface
NS_IMETHOD Write(const char* aBuf,
PRUint32 aCount,
PRUint32 *aWriteCount)
{
NS_PRECONDITION(aBuf != nsnull, "null ptr");
NS_PRECONDITION(aWriteCount != nsnull, "null ptr");
if (NS_FAILED(mLastResult))
return mLastResult;
PRInt32 bytesWrit = write(aBuf, aCount);
if (NS_FAILED(mLastResult))
{
*aWriteCount = 0;
return mLastResult;
}
*aWriteCount = bytesWrit;
return NS_OK;
}
public:
// nsISupports interface
NS_DECL_ISUPPORTS
NS_IMETHOD Close() { return NS_OK; }
// nsIInputStream interface
NS_IMETHOD Flush() { return NS_OK; }
public:
nsresult get_result() const { return mLastResult; }
protected:
virtual PRInt32 length() const = 0;
virtual PRInt32 read(char* buf, PRUint32 count) = 0;
virtual PRInt32 write(const char*, PRUint32)
{
NS_ASSERTION(PR_FALSE, "Write to a const string");
mLastResult = NS_FILE_RESULT(PR_ILLEGAL_ACCESS_ERROR);
return -1;
}
protected:
PRUint32 mOffset;
nsresult mLastResult;
PRBool mEOF;
}; // class BasicStringImpl
//========================================================================================
class ConstCharImpl
: public BasicStringImpl
//========================================================================================
{
public:
ConstCharImpl(const char* inString, PRInt32 inLength = -1)
: mConstString(inString),
mLength(inLength == -1 ?
(inString ? strlen(inString) : 0) : inLength) {}
protected:
virtual PRInt32 length() const
{
return mLength - mOffset;
}
virtual PRInt32 read(char* buf, PRUint32 aCount)
{
PRInt32 maxCount = mLength - mOffset;
if ((PRInt32)aCount > maxCount)
aCount = maxCount;
memcpy(buf, mConstString + mOffset, aCount);
mOffset += aCount;
return aCount;
}
protected:
const char* mConstString;
size_t mLength;
}; // class ConstCharImpl
//========================================================================================
class CharImpl
: public ConstCharImpl
//========================================================================================
{
enum { kAllocQuantum = 256 };
public:
CharImpl(char** inString, PRInt32 inLength = -1)
: ConstCharImpl(*inString, inLength)
, mString(*inString)
, mAllocLength(mLength + 1)
, mOriginalLength(mLength)
{
if (!mString)
{
mAllocLength = kAllocQuantum;
mString = new char[mAllocLength];
if (!mString)
{
mLastResult = NS_ERROR_OUT_OF_MEMORY;
return;
}
mConstString = mString;
*mString = '\0';
}
}
~CharImpl()
{
if (mString)
{
delete [] mString;
}
}
virtual PRInt32 write(const char* buf, PRUint32 aCount)
{
if (!buf)
return 0;
PRInt32 maxCount = mAllocLength - 1 - mOffset;
if ((PRInt32)aCount > maxCount)
{
mAllocLength = aCount + 1 + mOffset + kAllocQuantum;
char* newString = new char[mAllocLength];
if (!newString)
{
mLastResult = NS_ERROR_OUT_OF_MEMORY;
return 0;
}
memcpy(newString, mString, mLength);
delete [] mString;
mString = newString;
mConstString = newString;
}
memcpy(mString + mOffset, buf, aCount);
mOffset += aCount;
if (mOffset > mOriginalLength)
mString[mOffset] = 0;
return aCount;
}
protected:
char*& mString;
size_t mAllocLength;
size_t mOriginalLength;
}; // class CharImpl
//========================================================================================
class ConstStringImpl
: public ConstCharImpl
//========================================================================================
{
public:
ConstStringImpl(const nsString& inString)
: ConstCharImpl(inString.ToNewCString(),
inString.Length())
{
}
~ConstStringImpl()
{
delete [] (char*)mConstString;
}
protected:
protected:
}; // class ConstStringImpl
//========================================================================================
class StringImpl
: public ConstStringImpl
// This is wrong, since it really converts to 1-char strings.
//========================================================================================
{
public:
StringImpl(nsString& inString)
: ConstStringImpl(inString)
, mString(inString)
{
}
protected:
virtual PRInt32 write(const char* buf, PRUint32 count)
{
if (!buf)
return 0;
// Clone our string as chars
char* cstring = mString.ToNewCString();
// Make a CharImpl and do the write
CharImpl chars(&cstring, mString.Length());
chars.Seek(PR_SEEK_SET, mOffset);
// Get the bytecount and result from the CharImpl
PRInt32 result = chars.write(buf,count);
mLastResult = chars.get_result();
// Set our string to match the new chars
chars.Seek(PR_SEEK_SET, 0);
size_t newLength;
chars.Available(&newLength);
mString.Assign(cstring, newLength);
// Set our const string also...
delete [] (char*)mConstString;
mConstString = cstring;
return result;
}
protected:
nsString& mString;
}; // class StringImpl
NS_IMPL_RELEASE(BasicStringImpl)
NS_IMPL_ADDREF(BasicStringImpl)
NS_IMPL_QUERY_HEAD(BasicStringImpl)
NS_IMPL_QUERY_BODY(nsIRandomAccessStore)
NS_IMPL_QUERY_BODY(nsIOutputStream)
NS_IMPL_QUERY_BODY(nsIInputStream)
if ( aIID.Equals(NS_GET_IID(nsIBaseStream)) )
foundInterface = NS_STATIC_CAST(nsIBaseStream*, NS_STATIC_CAST(nsIOutputStream*, this));
else
NS_IMPL_QUERY_TAIL(nsIOutputStream)
//----------------------------------------------------------------------------------------
NS_IMETHODIMP BasicStringImpl::Seek(PRSeekWhence whence, PRInt32 offset)
//----------------------------------------------------------------------------------------
{
mLastResult = NS_OK; // reset on a seek.
mEOF = PR_FALSE; // reset on a seek.
PRInt32 fileSize = length();
PRInt32 newPosition=-1;
switch (whence)
{
case PR_SEEK_CUR: newPosition = mOffset + offset; break;
case PR_SEEK_SET: newPosition = offset; break;
case PR_SEEK_END: newPosition = fileSize + offset; break;
}
if (newPosition < 0)
{
newPosition = 0;
mLastResult = NS_FILE_RESULT(PR_FILE_SEEK_ERROR);
}
if (newPosition >= fileSize)
{
newPosition = fileSize;
mEOF = PR_TRUE;
}
mOffset = newPosition;
return NS_OK;
} // StringImpl::Seek
//----------------------------------------------------------------------------------------
extern "C" NS_COM nsresult NS_NewStringInputStream(
nsISupports** aStreamResult,
const nsString& aStringToRead)
// Factory method to get an nsInputStream from a string. Result will implement all the
// file stream interfaces in nsIFileStream.h
//----------------------------------------------------------------------------------------
{
NS_PRECONDITION(aStreamResult != nsnull, "null ptr");
if (! aStreamResult)
return NS_ERROR_NULL_POINTER;
ConstStringImpl* stream = new ConstStringImpl(aStringToRead);
if (! stream)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(stream);
*aStreamResult = (nsISupports*)(void*)stream;
return NS_OK;
}
//----------------------------------------------------------------------------------------
extern "C" NS_COM nsresult NS_NewStringOutputStream(
nsISupports** aStreamResult,
nsString& aStringToChange)
// Factory method to get an nsOutputStream from a string. Result will implement all the
// file stream interfaces in nsIFileStream.h
//----------------------------------------------------------------------------------------
{
NS_PRECONDITION(aStreamResult != nsnull, "null ptr");
if (! aStreamResult)
return NS_ERROR_NULL_POINTER;
StringImpl* stream = new StringImpl(aStringToChange);
if (! stream)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(stream);
*aStreamResult = (nsISupports*)(void*)stream;
return NS_OK;
}
//----------------------------------------------------------------------------------------
extern "C" NS_COM nsresult NS_NewCharInputStream(
nsISupports** aStreamResult,
const char* aStringToRead)
// Factory method to get an nsInputStream from a string. Result will implement all the
// file stream interfaces in nsIFileStream.h
//----------------------------------------------------------------------------------------
{
NS_PRECONDITION(aStreamResult != nsnull, "null ptr");
if (! aStreamResult)
return NS_ERROR_NULL_POINTER;
ConstCharImpl* stream = new ConstCharImpl(aStringToRead);
if (! stream)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(stream);
*aStreamResult = (nsISupports*)(void*)stream;
return NS_OK;
}
//----------------------------------------------------------------------------------------
extern "C" NS_COM nsresult NS_NewCharOutputStream(
nsISupports** aStreamResult,
char** aStringToChange)
// Factory method to get an nsOutputStream to a string. Result will implement all the
// file stream interfaces in nsIFileStream.h
//----------------------------------------------------------------------------------------
{
NS_PRECONDITION(aStreamResult != nsnull, "null ptr");
NS_PRECONDITION(aStringToChange != nsnull, "null ptr");
if (!aStreamResult || !aStringToChange)
return NS_ERROR_NULL_POINTER;
CharImpl* stream = new CharImpl(aStringToChange);
if (! stream)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(stream);
*aStreamResult = (nsISupports*)(void*)stream;
return NS_OK;
}
//----------------------------------------------------------------------------------------
extern "C" NS_COM nsresult NS_NewStringIOStream(
nsISupports** aStreamResult,
nsString& aStringToChange)
// Factory method to get an nsOutputStream to a string. Result will implement all the
// file stream interfaces in nsIFileStream.h
//----------------------------------------------------------------------------------------
{
return NS_NewStringOutputStream(aStreamResult, aStringToChange);
}
//----------------------------------------------------------------------------------------
extern "C" NS_COM nsresult NS_NewCharIOStream(
nsISupports** aStreamResult,
char** aStringToChange)
// Factory method to get an nsOutputStream to a string. Result will implement all the
// file stream interfaces in nsIFileStream.h
//----------------------------------------------------------------------------------------
{
return NS_NewCharOutputStream(aStreamResult, aStringToChange);
}

View File

@@ -1,206 +0,0 @@
/* -*- Mode: C++; tab-width: 2; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#include "nsSegmentedBuffer.h"
#include "nsCRT.h"
nsSegmentedBuffer::nsSegmentedBuffer()
: mSegmentSize(0), mMaxSize(0),
mSegAllocator(nsnull), mSegmentArray(nsnull),
mSegmentArrayCount(0),
mFirstSegmentIndex(0), mLastSegmentIndex(0)
{
}
nsSegmentedBuffer::~nsSegmentedBuffer()
{
Empty();
NS_IF_RELEASE(mSegAllocator);
}
nsresult
nsSegmentedBuffer::Init(PRUint32 segmentSize, PRUint32 maxSize,
nsIAllocator* allocator)
{
if (mSegmentArrayCount != 0)
return NS_ERROR_FAILURE; // initialized more than once
mSegmentSize = segmentSize;
mMaxSize = maxSize;
mSegAllocator = allocator;
if (mSegAllocator == nsnull) {
mSegAllocator = nsAllocator::GetGlobalAllocator();
}
else {
NS_ADDREF(mSegAllocator);
}
#if 0 // testing...
mSegmentArrayCount = 2;
#else
mSegmentArrayCount = NS_SEGMENTARRAY_INITIAL_COUNT;
#endif
return NS_OK;
}
char*
nsSegmentedBuffer::AppendNewSegment()
{
if (GetSize() >= mMaxSize)
return nsnull;
if (mSegmentArray == nsnull) {
PRUint32 bytes = mSegmentArrayCount * sizeof(char*);
mSegmentArray = (char**)nsAllocator::Alloc(bytes);
if (mSegmentArray == nsnull)
return nsnull;
nsCRT::memset(mSegmentArray, 0, bytes);
}
if (IsFull()) {
PRUint32 newArraySize = mSegmentArrayCount * 2;
PRUint32 bytes = newArraySize * sizeof(char*);
char** newSegArray = (char**)nsAllocator::Realloc(mSegmentArray, bytes);
if (newSegArray == nsnull)
return nsnull;
mSegmentArray = newSegArray;
// copy wrapped content to new extension
if (mFirstSegmentIndex > mLastSegmentIndex) {
// deal with wrap around case
nsCRT::memcpy(&mSegmentArray[mSegmentArrayCount],
mSegmentArray,
mLastSegmentIndex * sizeof(char*));
nsCRT::memset(mSegmentArray, 0, mLastSegmentIndex * sizeof(char*));
mLastSegmentIndex += mSegmentArrayCount;
nsCRT::memset(&mSegmentArray[mLastSegmentIndex], 0,
(newArraySize - mLastSegmentIndex) * sizeof(char*));
}
else {
nsCRT::memset(&mSegmentArray[mLastSegmentIndex], 0,
(newArraySize - mLastSegmentIndex) * sizeof(char*));
}
mSegmentArrayCount = newArraySize;
}
char* seg = (char*)mSegAllocator->Alloc(mSegmentSize);
if (seg == nsnull) {
return nsnull;
}
mSegmentArray[mLastSegmentIndex] = seg;
mLastSegmentIndex = ModSegArraySize(mLastSegmentIndex + 1);
return seg;
}
PRBool
nsSegmentedBuffer::DeleteFirstSegment()
{
NS_ASSERTION(mSegmentArray[mFirstSegmentIndex] != nsnull, "deleting bad segment");
(void)mSegAllocator->Free(mSegmentArray[mFirstSegmentIndex]);
mSegmentArray[mFirstSegmentIndex] = nsnull;
PRInt32 last = ModSegArraySize(mLastSegmentIndex - 1);
if (mFirstSegmentIndex == last) {
mLastSegmentIndex = last;
return PR_TRUE;
}
else {
mFirstSegmentIndex = ModSegArraySize(mFirstSegmentIndex + 1);
return PR_FALSE;
}
}
PRBool
nsSegmentedBuffer::DeleteLastSegment()
{
PRInt32 last = ModSegArraySize(mLastSegmentIndex - 1);
NS_ASSERTION(mSegmentArray[last] != nsnull, "deleting bad segment");
(void)mSegAllocator->Free(mSegmentArray[last]);
mSegmentArray[last] = nsnull;
mLastSegmentIndex = last;
return (PRBool)(mLastSegmentIndex == mFirstSegmentIndex);
}
PRBool
nsSegmentedBuffer::ReallocLastSegment(size_t newSize)
{
PRInt32 last = ModSegArraySize(mLastSegmentIndex - 1);
NS_ASSERTION(mSegmentArray[last] != nsnull, "realloc'ing bad segment");
char *newSegment =
(char*)mSegAllocator->Realloc(mSegmentArray[last], newSize);
if (newSegment) {
mSegmentArray[last] = newSegment;
return PR_TRUE;
} else {
return PR_FALSE;
}
}
void
nsSegmentedBuffer::Empty()
{
if (mSegmentArray) {
for (PRUint32 i = 0; i < mSegmentArrayCount; i++) {
if (mSegmentArray[i])
mSegAllocator->Free(mSegmentArray[i]);
}
nsAllocator::Free(mSegmentArray);
mSegmentArray = nsnull;
}
mSegmentArrayCount = NS_SEGMENTARRAY_INITIAL_COUNT;
mFirstSegmentIndex = mLastSegmentIndex = 0;
}
#ifdef DEBUG
NS_COM void
TestSegmentedBuffer()
{
nsSegmentedBuffer* buf = new nsSegmentedBuffer();
NS_ASSERTION(buf, "out of memory");
buf->Init(4, 16);
char* seg;
PRBool empty;
seg = buf->AppendNewSegment();
NS_ASSERTION(seg, "AppendNewSegment failed");
seg = buf->AppendNewSegment();
NS_ASSERTION(seg, "AppendNewSegment failed");
seg = buf->AppendNewSegment();
NS_ASSERTION(seg, "AppendNewSegment failed");
empty = buf->DeleteFirstSegment();
NS_ASSERTION(!empty, "DeleteFirstSegment failed");
empty = buf->DeleteFirstSegment();
NS_ASSERTION(!empty, "DeleteFirstSegment failed");
seg = buf->AppendNewSegment();
NS_ASSERTION(seg, "AppendNewSegment failed");
seg = buf->AppendNewSegment();
NS_ASSERTION(seg, "AppendNewSegment failed");
seg = buf->AppendNewSegment();
NS_ASSERTION(seg, "AppendNewSegment failed");
empty = buf->DeleteFirstSegment();
NS_ASSERTION(!empty, "DeleteFirstSegment failed");
empty = buf->DeleteFirstSegment();
NS_ASSERTION(!empty, "DeleteFirstSegment failed");
empty = buf->DeleteFirstSegment();
NS_ASSERTION(!empty, "DeleteFirstSegment failed");
empty = buf->DeleteFirstSegment();
NS_ASSERTION(empty, "DeleteFirstSegment failed");
delete buf;
}
#endif
////////////////////////////////////////////////////////////////////////////////

View File

@@ -1,102 +0,0 @@
/* -*- Mode: C++; tab-width: 2; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#ifndef nsSegmentedBuffer_h__
#define nsSegmentedBuffer_h__
#include "nsIAllocator.h"
#include "prclist.h"
class nsSegmentedBuffer
{
public:
nsSegmentedBuffer();
~nsSegmentedBuffer();
nsresult Init(PRUint32 segmentSize, PRUint32 maxSize,
nsIAllocator* allocator = nsnull);
char* AppendNewSegment(); // pushes at end
// returns true if no more segments remain:
PRBool DeleteFirstSegment(); // pops from beginning
// returns true if no more segments remain:
PRBool DeleteLastSegment(); // pops from beginning
// Call Realloc() on last segment. This is used to reduce memory
// consumption when data is not an exact multiple of segment size.
PRBool ReallocLastSegment(size_t newSize);
void Empty(); // frees all segments
PRUint32 GetSegmentCount() {
if (mFirstSegmentIndex <= mLastSegmentIndex)
return mLastSegmentIndex - mFirstSegmentIndex;
else
return mSegmentArrayCount + mLastSegmentIndex - mFirstSegmentIndex;
}
PRUint32 GetSegmentSize() { return mSegmentSize; }
PRUint32 GetSize() { return GetSegmentCount() * mSegmentSize; }
char* GetSegment(PRUint32 indx) {
NS_ASSERTION(0 <= indx && indx < GetSegmentCount(),
"index out of bounds");
PRInt32 i = ModSegArraySize(mFirstSegmentIndex + (PRInt32)indx);
return mSegmentArray[i];
}
protected:
PRInt32 ModSegArraySize(PRInt32 n) {
PRUint32 result = n & (mSegmentArrayCount - 1);
NS_ASSERTION(result == n % mSegmentArrayCount,
"non-power-of-2 mSegmentArrayCount");
return result;
}
PRBool IsFull() {
return ModSegArraySize(mLastSegmentIndex + 1) == mFirstSegmentIndex;
}
protected:
PRUint32 mSegmentSize;
PRUint32 mMaxSize;
nsIAllocator* mSegAllocator;
char** mSegmentArray;
PRUint32 mSegmentArrayCount;
PRInt32 mFirstSegmentIndex;
PRInt32 mLastSegmentIndex;
};
// NS_SEGMENTARRAY_INITIAL_SIZE: This number needs to start out as a
// power of 2 given how it gets used. We double the segment array
// when we overflow it, and use that fact that it's a power of 2
// to compute a fast modulus operation in IsFull.
//
// 32 segment array entries can accommodate 128k of data if segments
// are 4k in size. That seems like a reasonable amount that will avoid
// needing to grow the segment array.
#define NS_SEGMENTARRAY_INITIAL_COUNT 32
#endif // nsSegmentedBuffer_h__

View File

@@ -1,386 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* 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.
*
*/
/*
* The storage stream provides an internal buffer that can be filled by a
* client using a single output stream. One or more independent input streams
* can be created to read the data out non-destructively. The implementation
* uses a segmented buffer internally to avoid realloc'ing of large buffers,
* with the attendant performance loss and heap fragmentation.
*/
#include "nsStorageStream.h"
#include "nsSegmentedBuffer.h"
#include "nsCOMPtr.h"
#include "prbit.h"
nsStorageStream::nsStorageStream()
: mSegmentedBuffer(0), mSegmentSize(0), mWriteInProgress(false),
mWriteCursor(0), mSegmentEnd(0), mLogicalLength(0), mLastSegmentNum(-1)
{
NS_INIT_REFCNT();
}
nsStorageStream::~nsStorageStream()
{
if (mSegmentedBuffer)
delete mSegmentedBuffer;
}
NS_IMPL_ADDREF(nsStorageStream)
NS_IMPL_RELEASE(nsStorageStream)
// Multiple inheritance requires customized QI
NS_IMETHODIMP
nsStorageStream::QueryInterface(const nsIID& aIID, void** aInstancePtr)
{
if (aInstancePtr == nsnull)
return NS_ERROR_NULL_POINTER;
if (aIID.Equals(NS_GET_IID(nsIStorageStream)) ||
aIID.Equals(NS_GET_IID(nsISupports))) {
NS_ADDREF(this);
*aInstancePtr = NS_STATIC_CAST(nsIStorageStream*, this);
return NS_OK;
} else if (aIID.Equals(NS_GET_IID(nsIOutputStream))) {
NS_ADDREF(this);
*aInstancePtr = NS_STATIC_CAST(nsIOutputStream*, this);
return NS_OK;
}
return NS_NOINTERFACE;
}
NS_IMETHODIMP
nsStorageStream::Init(PRUint32 segmentSize, PRUint32 maxSize,
nsIAllocator *segmentAllocator)
{
mSegmentedBuffer = new nsSegmentedBuffer();
if (!mSegmentedBuffer)
return NS_ERROR_OUT_OF_MEMORY;
mSegmentSize = segmentSize;
mSegmentSizeLog2 = PR_FloorLog2(segmentSize);
// Segment size must be a power of two
if (mSegmentSize != ((PRUint32)1 << mSegmentSizeLog2))
return NS_ERROR_INVALID_ARG;
return mSegmentedBuffer->Init(segmentSize, maxSize, segmentAllocator);
}
NS_IMETHODIMP
nsStorageStream::GetOutputStream(PRInt32 aStartingOffset,
nsIOutputStream * *aOutputStream)
{
NS_ENSURE_ARG(aOutputStream);
if (mWriteInProgress)
return NS_ERROR_NOT_AVAILABLE;
nsresult rv = Seek(aStartingOffset);
if (NS_FAILED(rv)) return rv;
// Enlarge the last segment in the buffer so that it is the same size as
// all the other segments in the buffer. (It may have been realloc'ed
// smaller in the Close() method.)
if (mLastSegmentNum >= 0)
mSegmentedBuffer->ReallocLastSegment(mSegmentSize);
NS_ADDREF(this);
*aOutputStream = NS_STATIC_CAST(nsIOutputStream*, this);
mWriteInProgress = true;
return NS_OK;
}
NS_IMETHODIMP
nsStorageStream::Close()
{
mWriteInProgress = false;
PRInt32 segmentOffset = SegOffset(mLogicalLength);
// Shrink the final segment in the segmented buffer to the minimum size
// needed to contain the data, so as to conserve memory.
if (segmentOffset)
mSegmentedBuffer->ReallocLastSegment(segmentOffset);
mWriteCursor = 0;
mSegmentEnd = 0;
return NS_OK;
}
NS_IMETHODIMP
nsStorageStream::Flush()
{
return NS_OK;
}
NS_IMETHODIMP
nsStorageStream::Write(const char *aBuffer, PRUint32 aCount, PRUint32 *aNumWritten)
{
const char* readCursor;
PRUint32 count, availableInSegment, remaining;
nsresult rv = NS_OK;
NS_ENSURE_ARG_POINTER(aNumWritten);
NS_ENSURE_ARG(aBuffer);
remaining = aCount;
readCursor = aBuffer;
while (remaining) {
availableInSegment = mSegmentEnd - mWriteCursor;
if (!availableInSegment) {
mWriteCursor = mSegmentedBuffer->AppendNewSegment();
mLastSegmentNum++;
if (!mWriteCursor) {
rv = NS_ERROR_OUT_OF_MEMORY;
goto out;
}
mSegmentEnd = mWriteCursor + mSegmentSize;
availableInSegment = mSegmentEnd - mWriteCursor;
}
count = PR_MIN(availableInSegment, remaining);
memcpy(mWriteCursor, readCursor, count);
remaining -= count;
readCursor += count;
mWriteCursor += count;
};
out:
*aNumWritten = aCount - remaining;
mLogicalLength += *aNumWritten;
return rv;
}
NS_IMETHODIMP
nsStorageStream::GetLength(PRUint32 *aLength)
{
NS_ENSURE_ARG(aLength);
*aLength = mLogicalLength;
return NS_OK;
}
// Truncate the buffer by deleting the end segments
NS_IMETHODIMP
nsStorageStream::SetLength(PRUint32 aLength)
{
if (mWriteInProgress)
return NS_ERROR_NOT_AVAILABLE;
if (aLength > mLogicalLength)
return NS_ERROR_INVALID_ARG;
PRInt32 newLastSegmentNum = SegNum(aLength);
PRInt32 segmentOffset = SegOffset(aLength);
if (segmentOffset == 0)
newLastSegmentNum--;
while (newLastSegmentNum < mLastSegmentNum) {
mSegmentedBuffer->DeleteLastSegment();
mLastSegmentNum--;
}
mLogicalLength = aLength;
return NS_OK;
}
NS_IMETHODIMP
nsStorageStream::GetWriteInProgress(PRBool *aWriteInProgress)
{
NS_ENSURE_ARG(aWriteInProgress);
*aWriteInProgress = mWriteInProgress;
return NS_OK;
}
NS_METHOD
nsStorageStream::Seek(PRInt32 aPosition)
{
// An argument of -1 means "seek to end of stream"
if (aPosition == -1)
aPosition = mLogicalLength;
// Seeking beyond the buffer end is illegal
if ((PRUint32)aPosition > mLogicalLength)
return NS_ERROR_INVALID_ARG;
// Seeking backwards in the write stream results in truncation
SetLength(aPosition);
// Special handling for seek to start-of-buffer
if (aPosition == 0) {
mWriteCursor = 0;
mSegmentEnd = 0;
return NS_OK;
}
mWriteCursor = mSegmentedBuffer->GetSegment(mLastSegmentNum);
mSegmentEnd = mWriteCursor + mSegmentSize;
PRInt32 segmentOffset = SegOffset(aPosition);
mWriteCursor += segmentOffset;
return NS_OK;
}
// There can be many nsStorageInputStreams for a single nsStorageStream
class nsStorageInputStream : public nsIInputStream
{
public:
nsStorageInputStream(nsStorageStream *aStorageStream, PRUint32 aSegmentSize)
: mStorageStream(aStorageStream), mReadCursor(0),
mSegmentEnd(0), mLogicalCursor(0), mSegmentNum(0),
mSegmentSize(aSegmentSize)
{
NS_ADDREF(mStorageStream);
NS_INIT_REFCNT();
}
virtual ~nsStorageInputStream()
{
NS_IF_RELEASE(mStorageStream);
}
NS_DECL_ISUPPORTS
NS_DECL_NSIBASESTREAM
NS_DECL_NSIINPUTSTREAM
protected:
NS_METHOD Seek(PRUint32 aPosition);
friend class nsStorageStream;
private:
const char* mReadCursor; // Next memory location to read byte, or NULL
const char* mSegmentEnd; // One byte past end of current buffer segment
PRUint32 mSegmentNum; // Segment number containing read cursor
PRUint32 mSegmentSize; // All segments, except the last, are of this size
PRUint32 mLogicalCursor; // Logical offset into stream
nsStorageStream* mStorageStream;
PRUint32 SegNum(PRUint32 aPosition) {return aPosition >> mStorageStream->mSegmentSizeLog2;}
PRUint32 SegOffset(PRUint32 aPosition) {return aPosition & (mSegmentSize - 1);}
};
static NS_DEFINE_IID(kIInputStream, NS_IINPUTSTREAM_IID);
NS_IMPL_ISUPPORTS(nsStorageInputStream, kIInputStream)
NS_IMETHODIMP
nsStorageStream::NewInputStream(PRInt32 aStartingOffset, nsIInputStream* *aInputStream)
{
nsStorageInputStream *inputStream = new nsStorageInputStream(this, mSegmentSize);
if (!inputStream)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(inputStream);
if (aStartingOffset) {
nsresult rv = inputStream->Seek(aStartingOffset);
if (NS_FAILED(rv)) {
NS_RELEASE(inputStream);
return rv;
}
}
*aInputStream = inputStream;
return NS_OK;
}
NS_IMETHODIMP
nsStorageInputStream::Close()
{
return NS_OK;
}
NS_IMETHODIMP
nsStorageInputStream::Available(PRUint32 *aAvailable)
{
*aAvailable = mStorageStream->mLogicalLength - mLogicalCursor;
return NS_OK;
}
NS_IMETHODIMP
nsStorageInputStream::Read(char* aBuffer, PRUint32 aCount, PRUint32 *aNumRead)
{
char* writeCursor;
PRUint32 count, availableInSegment, remainingCapacity;
remainingCapacity = aCount;
writeCursor = aBuffer;
while (remainingCapacity) {
availableInSegment = mSegmentEnd - mReadCursor;
if (!availableInSegment) {
PRUint32 available = mStorageStream->mLogicalLength - mLogicalCursor;
if (!available)
goto out;
mReadCursor = mStorageStream->mSegmentedBuffer->GetSegment(mSegmentNum++);
mSegmentEnd = mReadCursor + PR_MIN(mSegmentSize, available);
}
count = PR_MIN(availableInSegment, remainingCapacity);
memcpy(writeCursor, mReadCursor, count);
remainingCapacity -= count;
mReadCursor += count;
writeCursor += count;
mLogicalCursor += count;
};
out:
*aNumRead = aCount - remainingCapacity;
if (*aNumRead == 0)
return NS_BASE_STREAM_WOULD_BLOCK;
else
return NS_OK;
}
NS_METHOD
nsStorageInputStream::Seek(PRUint32 aPosition)
{
PRUint32 length = mStorageStream->mLogicalLength;
if (aPosition >= length)
return NS_ERROR_INVALID_ARG;
mSegmentNum = SegNum(aPosition);
PRUint32 segmentOffset = SegOffset(aPosition);
mReadCursor = mStorageStream->mSegmentedBuffer->GetSegment(mSegmentNum) +
segmentOffset;
PRUint32 available = length - aPosition;
mSegmentEnd = mReadCursor + PR_MIN(mSegmentSize - segmentOffset, available);
mLogicalCursor = aPosition;
return NS_OK;
}
NS_COM nsresult
NS_NewStorageStream(PRUint32 segmentSize, PRUint32 maxSize, nsIStorageStream **result)
{
NS_ENSURE_ARG(result);
nsStorageStream* storageStream = new nsStorageStream();
if (!storageStream) return NS_ERROR_OUT_OF_MEMORY;
storageStream->Init(segmentSize, maxSize);
NS_ADDREF(storageStream);
*result = storageStream;
return NS_OK;
}

View File

@@ -1,71 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* 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.
*
*/
/*
* The storage stream provides an internal buffer that can be filled by a
* client using a single output stream. One or more independent input streams
* can be created to read the data out non-destructively. The implementation
* uses a segmented buffer internally to avoid realloc'ing of large buffers,
* with the attendant performance loss and heap fragmentation.
*/
#ifndef _nsStorageStream_h_
#define _nsStorageStream_h_
#include "nsIStorageStream.h"
#include "nsIOutputStream.h"
class nsSegmentedBuffer;
class NS_COM nsStorageStream : public nsIStorageStream,
public nsIOutputStream
{
public:
nsStorageStream();
~nsStorageStream();
NS_METHOD Init(PRUint32 segmentSize, PRUint32 maxSize, nsIAllocator *segmentAllocator = 0);
NS_DECL_ISUPPORTS
NS_DECL_NSISTORAGESTREAM
NS_DECL_NSIBASESTREAM
NS_DECL_NSIOUTPUTSTREAM
friend class nsStorageInputStream;
private:
nsSegmentedBuffer* mSegmentedBuffer;
PRUint32 mSegmentSize; // All segments, except possibly the last, are of this size
// Must be power-of-2
PRUint32 mSegmentSizeLog2; // log2(mSegmentSize)
bool mWriteInProgress; // true, if an un-Close'ed output stream exists
PRInt32 mLastSegmentNum; // Last segment # in use, -1 initially
char* mWriteCursor; // Pointer to next byte to be written
char* mSegmentEnd; // Pointer to one byte after end of segment
// containing the write cursor
PRUint32 mLogicalLength; // Number of bytes written to stream
NS_METHOD Seek(PRInt32 aPosition);
PRUint32 SegNum(PRUint32 aPosition) {return aPosition >> mSegmentSizeLog2;}
PRUint32 SegOffset(PRUint32 aPosition) {return aPosition & (mSegmentSize - 1);}
};
#endif // _nsStorageStream_h_

File diff suppressed because it is too large Load Diff