Compare commits

..

1212 Commits

Author SHA1 Message Date
darin%netscape.com
62260249d7 no longer needed on branch
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94676 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-11 19:00:35 +00:00
darin%netscape.com
ef04ff435d fixed MANIFEST_IDL
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94675 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-11 18:59:16 +00:00
darin%netscape.com
3ee96f57b8 merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94674 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-11 18:55:27 +00:00
darin%netscape.com
f26f30b4c5 replaced nsMemory::Clone with PL_strdup
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94672 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-11 18:44:36 +00:00
darin%netscape.com
ce3e6ddbf9 merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94668 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-11 17:41:56 +00:00
darin%netscape.com
54d006d031 merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94666 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-11 17:28:09 +00:00
darin%netscape.com
6d979a3f4b fixed memory leak
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94665 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-11 17:18:46 +00:00
darin%netscape.com
6795a88baf merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94664 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-11 17:17:32 +00:00
darin%netscape.com
8be0416d54 modified buffer sizes
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94606 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-11 07:47:32 +00:00
darin%netscape.com
93d7718522 backed buffer size down to 16k
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94605 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-11 07:44:04 +00:00
darin%netscape.com
e7457f6c5e fixing stuff
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94601 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-11 07:19:50 +00:00
darin%netscape.com
3355b20538 minor touch ups
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94591 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-11 05:46:07 +00:00
darin%netscape.com
e38c0729b3 fixed minor stuff
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94590 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-11 05:43:22 +00:00
darin%netscape.com
54e8ca8f3b fixed SSL proxy
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94589 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-11 05:43:00 +00:00
dougt%netscape.com
bf655521c6 Making branch build on the mac.
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94569 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-11 03:01:58 +00:00
darin%netscape.com
4db19a052e fixes stuff
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94568 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-11 02:39:09 +00:00
darin%netscape.com
80364fb1a4 ssl proxy
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94567 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-11 02:38:55 +00:00
darin%netscape.com
8f7941b6f1 fixed cache key bug
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94530 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-10 23:50:57 +00:00
darin%netscape.com
55e1ff9673 merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94526 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-10 23:18:20 +00:00
darin%netscape.com
ab3135f787 make it compile
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94521 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-10 22:43:59 +00:00
darin%netscape.com
52c9c730d8 merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94516 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-10 21:40:18 +00:00
darin%netscape.com
b3956fe708 removed printf's
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94515 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-10 21:16:41 +00:00
darin%netscape.com
63d68c34fd added additional logging
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94514 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-10 21:16:06 +00:00
darin%netscape.com
96a41c2c14 fixes bug
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94513 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-10 21:15:45 +00:00
darin%netscape.com
08fd9995e0 merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94512 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-10 21:11:48 +00:00
dougt%netscape.com
2ca3743459 Updating nsWebshell to tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94496 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-10 16:59:51 +00:00
darin%netscape.com
8a48845120 trim off #ref portion if any from requestURI
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94435 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-10 01:52:21 +00:00
darin%netscape.com
bc09fdf610 whatever
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94434 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-10 01:48:30 +00:00
darin%netscape.com
802b66d97d minor touch ups
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94433 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-10 01:21:12 +00:00
darin%netscape.com
96083a1e49 whatever
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94432 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-10 01:18:26 +00:00
darin%netscape.com
31989208be added support for 100-continue
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94431 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-10 01:17:20 +00:00
darin%netscape.com
29d9b38fe8 make code more robust
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94430 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-10 00:32:42 +00:00
darin%netscape.com
a8f751a9d9 fixed stuff
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94427 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-10 00:04:27 +00:00
darin%netscape.com
81066b3e6e added max-connections-per-server
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94426 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-09 23:51:59 +00:00
darin%netscape.com
e462d551cb fixed SetReferrer
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94425 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-09 23:40:13 +00:00
darin%netscape.com
09b30c7d5a merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94424 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-09 23:39:27 +00:00
darin%netscape.com
96b0c82bcf updated SetReferrer
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94423 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-09 23:38:43 +00:00
dougt%netscape.com
15ffdf8caa Making branch build on the mac.
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94412 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-09 22:44:04 +00:00
darin%netscape.com
0262c5af7e added sync cache open
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94395 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-09 18:46:51 +00:00
darin%netscape.com
01ca73096c fixed for ssl proxy
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94394 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-09 18:39:22 +00:00
darin%netscape.com
dadf65501b fixed ssl proxy
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94393 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-09 18:39:00 +00:00
dougt%netscape.com
348ee07541 Removing unneeded proxy code from project
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94386 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-09 15:46:52 +00:00
dougt%netscape.com
dbe972baa8 Making compile on mac os.
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94384 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-09 15:44:54 +00:00
darin%netscape.com
f5d02b707a new files
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94352 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-09 06:35:37 +00:00
darin%netscape.com
258f97e0cd merged in stuff
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94314 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-09 02:13:34 +00:00
darin%netscape.com
95cdab9527 updated per gordon's OpenCacheEntry change
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94313 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-09 02:11:55 +00:00
darin%netscape.com
7a5dbad111 merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94312 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-09 01:47:29 +00:00
darin%netscape.com
3e08b330b5 merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94308 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-09 01:16:54 +00:00
darin%netscape.com
f058c57c79 fixed connection leakage
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94302 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-09 00:12:23 +00:00
darin%netscape.com
b8032d0c21 fixed Host header stuff
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94288 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-08 22:31:53 +00:00
darin%netscape.com
4a6fc79ce2 random
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94287 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-08 22:30:07 +00:00
darin%netscape.com
0b5526cd2c merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94281 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-08 21:52:34 +00:00
dougt%netscape.com
03d7306f8b Making branch build on the mac.
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94277 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-08 21:43:00 +00:00
darin%netscape.com
7ff9289c01 merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94274 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-08 21:34:02 +00:00
darin%netscape.com
7fe1a07870 merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94270 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-08 21:21:36 +00:00
darin%netscape.com
010c993ecc fixed a bug
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94266 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-08 20:41:28 +00:00
darin%netscape.com
17fbfd000c i18n touchups
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94256 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-08 19:48:14 +00:00
darin%netscape.com
cca34ca60b fixed bugs
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94253 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-08 19:31:34 +00:00
darin%netscape.com
45374a5c34 updated for new http idl
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94251 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-08 19:25:13 +00:00
(no author)
17778cbb4a This commit was manufactured by cvs2svn to create branch
'HttpConnectionMagic_20010415_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94247 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-08 18:02:51 +00:00
darin%netscape.com
b757903490 allow http buffers to grow
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94244 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-08 17:44:40 +00:00
darin%netscape.com
341c5930e6 found the magic reference
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94192 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-08 01:35:41 +00:00
darin%netscape.com
c8b278e410 updates
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94181 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-08 00:44:25 +00:00
darin%netscape.com
e3e7aaa151 minor changes
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94172 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-08 00:20:19 +00:00
darin%netscape.com
d1e31737be updated to new http idl
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94149 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-07 23:06:07 +00:00
darin%netscape.com
24ba71145e whatever
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94136 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-07 21:05:35 +00:00
darin%netscape.com
b3d65cb774 merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94131 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-07 19:32:29 +00:00
darin%netscape.com
129ffc6314 added proxied transaction release
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94128 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-07 16:41:58 +00:00
darin%netscape.com
b52ef0d361 updating and fixing bugs
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94113 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-07 09:10:30 +00:00
darin%netscape.com
a409e246b6 merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94103 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-07 06:55:46 +00:00
darin%netscape.com
343e849a97 merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94102 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-07 06:48:25 +00:00
darin%netscape.com
76e256eaa3 minor touch up
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94092 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-06 20:45:28 +00:00
darin%netscape.com
a7fdcf52fa fixed bugs
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94091 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-06 20:43:14 +00:00
darin%netscape.com
cd099d2cbc 304 support
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94090 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-06 19:42:55 +00:00
darin%netscape.com
f7deb0fa0b fixed bugs
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94068 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-05 19:40:39 +00:00
darin%netscape.com
cd47bfdae2 merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94064 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-05 18:24:34 +00:00
darin%netscape.com
f91fdf403e merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94063 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-05 18:02:16 +00:00
darin%netscape.com
09f6fd004d enabled caching
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94013 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-05 01:23:14 +00:00
darin%netscape.com
ea9dbc1fa2 merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94012 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-05 01:16:51 +00:00
darin%netscape.com
cde877f50f initial cache support
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@94006 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-05 00:43:54 +00:00
darin%netscape.com
13aefaef6b merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93999 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-04 23:42:02 +00:00
(no author)
498945875e This commit was manufactured by cvs2svn to create branch
'HttpConnectionMagic_20010415_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93949 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-04 20:45:21 +00:00
darin%netscape.com
2e0e94ae65 merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93940 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-04 19:40:43 +00:00
darin%netscape.com
7b7422e29a added content decoding
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93848 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 21:49:59 +00:00
darin%netscape.com
d84a726e54 minor
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93841 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 21:16:47 +00:00
dougt%netscape.com
73880344b4 fixing cid
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93837 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 21:14:02 +00:00
dougt%netscape.com
1b45fe664e Updating to new interface change in nsIProxy
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93834 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 21:10:39 +00:00
dougt%netscape.com
2f6c90b945 Fixing up how proxy servers work.
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93830 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 21:00:54 +00:00
darin%netscape.com
644337e67b removed stupid printf
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93828 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 20:50:49 +00:00
darin%netscape.com
22654d4d46 fixed a serious buffer overrun bug
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93827 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 20:50:06 +00:00
darin%netscape.com
34fba3d4c0 fixing stuff
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93819 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 19:41:33 +00:00
darin%netscape.com
e693567a2e merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93817 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 19:12:38 +00:00
darin%netscape.com
1c256a65b9 merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93816 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 18:39:14 +00:00
dougt%netscape.com
bfd50df9de Making compile
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93815 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 18:09:23 +00:00
darin%netscape.com
edd4b252cd merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93813 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 17:07:41 +00:00
darin%netscape.com
73ee7fdc9a merged with tip.
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93812 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 16:50:59 +00:00
darin%netscape.com
96eeeb78af enabled socks
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93811 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 16:48:26 +00:00
darin%netscape.com
ea54c51a9d enabled ssl
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93810 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 16:39:02 +00:00
darin%netscape.com
7dcb9cc71e moved script security manager onRedirect checks to here
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93809 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 16:35:41 +00:00
darin%netscape.com
aa97b1196f revised nsIHttpNotify
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93807 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 16:25:50 +00:00
darin%netscape.com
c85775f835 merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93806 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 16:23:42 +00:00
darin%netscape.com
0c98acd0ca merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93804 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 16:06:00 +00:00
darin%netscape.com
e928f09133 files for basic auth
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93803 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 15:44:48 +00:00
darin%netscape.com
a392db3c90 auth is working
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93765 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 02:50:43 +00:00
darin%netscape.com
4bae98b66c fix opt compilation error
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93749 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 01:21:15 +00:00
darin%netscape.com
785b49036d merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93737 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 00:40:12 +00:00
darin%netscape.com
2596789db7 merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93729 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 00:29:44 +00:00
darin%netscape.com
407bbe2241 merge with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93727 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-03 00:24:46 +00:00
(no author)
f35727b8ea This commit was manufactured by cvs2svn to create branch
'HttpConnectionMagic_20010415_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93711 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-02 23:38:42 +00:00
darin%netscape.com
dccd3fea0e more auth work
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93655 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-02 18:34:51 +00:00
darin%netscape.com
75ece73a17 auth work
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93627 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-02 07:59:04 +00:00
darin%netscape.com
2ca018925a initial code for authentication in the new world
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93613 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-02 03:35:17 +00:00
darin%netscape.com
c913fbc495 fixed bugs
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93557 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-01 20:53:02 +00:00
darin%netscape.com
f3fef266f1 merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93555 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-01 19:17:15 +00:00
darin%netscape.com
22764d875c working connection management!!
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93552 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-01 18:08:48 +00:00
darin%netscape.com
774f30876b whatever
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93549 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-01 17:21:08 +00:00
darin%netscape.com
700f64697f some progress on stability
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93546 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-01 16:31:09 +00:00
darin%netscape.com
48e663acf8 fixed some reference counting problems
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93505 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-01 02:11:09 +00:00
darin%netscape.com
52efc959be whatever
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93504 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-01 01:30:30 +00:00
darin%netscape.com
5920a24815 various fixes
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93486 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-30 23:31:05 +00:00
darin%netscape.com
f67fb40d23 fix to remove authentication notifications from nsIHttpEventSink
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93470 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-30 18:06:13 +00:00
darin%netscape.com
bd8bea34a9 fix for new http idl
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93469 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-30 17:54:24 +00:00
darin%netscape.com
d3a97bdb9e fix for new http idl
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93468 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-30 17:49:19 +00:00
darin%netscape.com
7b767f7ab5 basic support for http redirection
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93462 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-30 10:29:59 +00:00
darin%netscape.com
59a0933f9d added copyright headers, fixed a major memory/socket leak, made header
parsing more forgiving.


git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93460 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-30 09:13:09 +00:00
darin%netscape.com
8e96dfd851 updated for new http idl
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93459 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-30 08:15:03 +00:00
darin%netscape.com
3d39ad60e2 fix for new http idl... make getAllResponseHeaders work.
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93398 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-28 20:03:15 +00:00
darin%netscape.com
7381c52b0f fix for new http idl
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93396 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-28 19:44:13 +00:00
darin%netscape.com
0cd86a0e53 made cookies work!
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93368 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-28 03:12:03 +00:00
darin%netscape.com
66cd209313 updates
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93365 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-28 02:53:18 +00:00
darin%netscape.com
9e5e3dc4f8 completed nsIHttpEventSink impl
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93338 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-28 00:33:13 +00:00
darin%netscape.com
05af1518f0 merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93336 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-28 00:27:56 +00:00
darin%netscape.com
faaeef8dd0 merge with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93335 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-28 00:21:01 +00:00
darin%netscape.com
91a290a394 merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93332 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-28 00:11:30 +00:00
darin%netscape.com
6c53a6fa81 merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93330 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-28 00:03:39 +00:00
darin%netscape.com
c30d3dc75c merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93327 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-27 23:51:02 +00:00
darin%netscape.com
0f93d336e4 merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93324 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-27 23:31:14 +00:00
darin%netscape.com
e3451cffcc merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93320 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-27 23:15:54 +00:00
(no author)
c0a2d2872c This commit was manufactured by cvs2svn to create branch
'HttpConnectionMagic_20010415_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93315 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-27 22:17:31 +00:00
darin%netscape.com
188591212e fixed chunked decoding!
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93283 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-27 19:35:27 +00:00
darin%netscape.com
12228ebdea make it compile on win32
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93281 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-27 19:01:39 +00:00
darin%netscape.com
5cccdcfb92 added null checks
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93279 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-27 18:48:56 +00:00
darin%netscape.com
1e12ea24d8 new chunked decoder magic
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93278 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-27 18:43:54 +00:00
darin%netscape.com
86bc259321 more changes for the branch
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93218 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-27 02:32:26 +00:00
darin%netscape.com
5f592da9ec fix for new http idl
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93183 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-26 21:50:22 +00:00
darin%netscape.com
88e1476dcc fix for new http idl
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93182 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-26 21:43:26 +00:00
darin%netscape.com
7401de36e0 fix for new http idl
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93166 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-26 19:01:32 +00:00
darin%netscape.com
fd3d77122b fix for new http idl
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93160 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-26 18:44:02 +00:00
darin%netscape.com
b5e422c515 no need to set method to POST if setting upload stream.
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93155 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-26 18:34:59 +00:00
darin%netscape.com
f8b07e1d79 no need to SetRequestMethod("POST") if calling SetUploadStream(...)
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93154 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-26 18:34:11 +00:00
darin%netscape.com
25b34db661 fix for new http idl
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93153 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-26 18:33:21 +00:00
darin%netscape.com
4ef5a05f6e fix for new http idl
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93150 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-26 18:19:50 +00:00
darin%netscape.com
72467e9543 new progress api
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93149 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-26 18:09:41 +00:00
darin%netscape.com
5ad305a325 fix for new http idl
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93148 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-26 18:08:41 +00:00
darin%netscape.com
4ad5e810d4 today's changes ;-)
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93105 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-26 02:05:33 +00:00
darin%netscape.com
e9295b308b fix for new http idl
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93104 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-26 02:04:41 +00:00
darin%netscape.com
e561e68462 fix for new http idl
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93101 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-26 00:39:32 +00:00
darin%netscape.com
ec68a17487 fix for new http idl
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93098 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-25 22:40:08 +00:00
darin%netscape.com
87d17ebb9b fix for new http idl
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93097 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-25 22:33:36 +00:00
darin%netscape.com
c871441282 fix for new http idl
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93095 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-25 22:24:59 +00:00
darin%netscape.com
8e676fcec9 fix for new http idl
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93093 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-25 22:09:26 +00:00
darin%netscape.com
01902287ba fix for new http idl
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93091 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-25 21:55:22 +00:00
darin%netscape.com
284de57c74 fix for new http idl
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93082 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-25 19:36:19 +00:00
darin%netscape.com
7defd5c982 fix for new http idl
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93081 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-25 19:10:31 +00:00
darin%netscape.com
196d5f01e3 fix for new http idl
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93080 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-25 18:53:29 +00:00
darin%netscape.com
e20d8aa5c0 updates
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93062 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-25 08:39:07 +00:00
darin%netscape.com
50504e342c adding httpstatus processing
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93061 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-25 08:00:27 +00:00
darin%netscape.com
b841b1c329 back to raw strings.. YES!
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93056 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-25 06:10:37 +00:00
darin%netscape.com
3c3b40c6a4 fixing stuff
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93051 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-25 02:20:49 +00:00
(no author)
420c4bdd1e This commit was manufactured by cvs2svn to create branch
'HttpConnectionMagic_20010415_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93049 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-25 02:04:57 +00:00
darin%netscape.com
32278d385e updates
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93047 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-25 01:24:44 +00:00
darin%netscape.com
c3af281416 fixing more stuff.
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@93001 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-24 18:38:45 +00:00
darin%netscape.com
aeff9e633b fixing stuff
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@92991 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-24 07:53:01 +00:00
darin%netscape.com
29112c02e3 adding files
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@92988 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-24 04:56:18 +00:00
darin%netscape.com
a80623ea05 updated
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@92984 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-24 03:30:52 +00:00
darin%netscape.com
252b1505d4 merged with tip
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@92960 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-23 23:03:43 +00:00
darin%netscape.com
9604b2c9e7 getting closer...
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@92925 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-23 16:36:46 +00:00
darin%netscape.com
dee90d33b6 merging nsIPrompt changes
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@92906 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-22 18:48:58 +00:00
darin%netscape.com
e45e176315 getting there...
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@92903 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-22 18:21:59 +00:00
darin%netscape.com
8c6b501871 adding "Transfer-Encoding: chunked" support to new http
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@92844 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-20 20:01:38 +00:00
darin%netscape.com
6ce46da402 make netwerk build
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@92842 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-20 17:45:11 +00:00
darin%netscape.com
6a81aac1ee added test file for new http
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@92840 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-20 16:46:42 +00:00
darin%netscape.com
efc73f0976 adding new http handler (in place of old one) to necko module
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@92839 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-20 16:43:12 +00:00
darin%netscape.com
5438ed3f24 adding new source files
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@92838 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-20 16:07:14 +00:00
darin%netscape.com
bc635e6b90 removing old source files
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@92837 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-20 16:06:03 +00:00
darin%netscape.com
5b0ac3f43e adding new idl files
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@92836 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-20 16:04:55 +00:00
darin%netscape.com
48541d57ac removing old idl files
git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@92835 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-20 16:00:45 +00:00
(no author)
a7d10a1cd7 This commit was manufactured by cvs2svn to create branch
'HttpConnectionMagic_20010415_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/HttpConnectionMagic_20010415_BRANCH@92819 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-20 06:45:57 +00:00
bnesse%netscape.com
e8c7f4a0a7 Landing PrefAPI refactoring bug 46863. r=valeski, sr=alecf, a=blizzard.
git-svn-id: svn://10.0.0.236/trunk@92761 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 22:21:39 +00:00
mkaply%us.ibm.com
a1a8a55847 No bug
r=mkaply, a=blizzard
Code from Javier - get images working again, cleanup nsRenderingContext


git-svn-id: svn://10.0.0.236/trunk@92760 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 22:00:56 +00:00
brendan%mozilla.org
f54563bd60 Restore ECMA-required Function.prototype.toString while keeping toSource/uneval fix for bug 73760 (76634, r=beard, sr=shaver, a=asa).
git-svn-id: svn://10.0.0.236/trunk@92759 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 21:57:25 +00:00
attinasi%netscape.com
4ba548978e Fixed handling of empty line after a bullet in QuirksMode. b=75963 r=karnaze@netscape.com sr=waterson@netscape.com a=brendan
git-svn-id: svn://10.0.0.236/trunk@92758 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 21:54:35 +00:00
dr%netscape.com
2b51d63056 fix for 76733 (DocumentViewer::GetInLink, ::GetInImage should be quieter -- needed for immediate silencing of unnecessary mailnews assertions). r=pink, sr=scc, a=asa
git-svn-id: svn://10.0.0.236/trunk@92757 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 21:47:17 +00:00
brendan%mozilla.org
c4f96602a8 Fix regexp object (scope) vs GC deadlock (76233, r=beard, sr=shaver, a=asa).
git-svn-id: svn://10.0.0.236/trunk@92756 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 21:15:40 +00:00
brendan%mozilla.org
3dbc040f94 Fix __kernel_standard prototype to match recent addition of int *err final out-param (8112, r=shaver, sr=me, prototype not used by Mozilla or embedding builds).
git-svn-id: svn://10.0.0.236/trunk@92755 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 21:05:52 +00:00
justdave%syndicomm.com
130396a6d3 Changing all chmod 1777 to chmod 01777. Without the leading 0 it's interpreted as decimal instead of octal (oops)
git-svn-id: svn://10.0.0.236/trunk@92754 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 20:46:53 +00:00
waterson%netscape.com
5e4363687a Bug 76286. Bullet-proof code that uses mDocumentRequest; add assert-botch to catch cases where first request is not LOAD_DOCUMENT_URI. r=darin, sr=mscott, a=chofmann.
git-svn-id: svn://10.0.0.236/trunk@92750 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 19:51:29 +00:00
timeless%mac.com
f7d6fde771 fix Bugzilla Bug 76426 All your control paths should belong to us.
r=valeski, sr=darin, a=asa


git-svn-id: svn://10.0.0.236/trunk@92749 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 19:43:43 +00:00
chak%netscape.com
4bb22b0e45 Fix for Bug#76657 - ViewSource protocol handler must use nsIRequest::LOAD_FROM_CACHE
r=valeski, sr=brendan@mozilla.org, a=asa@mozilla.org


git-svn-id: svn://10.0.0.236/trunk@92748 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 19:41:14 +00:00
attinasi%netscape.com
cd296596bb Backing out Peter's changes since it cause the SunOS compiler to go off the deep end. Not apparent why the change should matter, actually, so this is just paranoias.
git-svn-id: svn://10.0.0.236/trunk@92747 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 19:38:27 +00:00
bernd.mielke%snafu.de
16c67e7c6b checkin of the remaining lines from my previous patch for bug 47432.
thanks to dbaron r=karnaze sr=attinasi a=asa


git-svn-id: svn://10.0.0.236/trunk@92746 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 19:11:17 +00:00
pschwartau%netscape.com
a6110df839 Getter/setter tests are non-ECMA. Moving them from ecma_3 directory to js1_5 directory.
git-svn-id: svn://10.0.0.236/trunk@92745 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 19:09:32 +00:00
jgmyers%netscape.com
7cef60f4db use brand.dtd: bug 75735 p=anedah-9@sm.luth.se r=doron sr=alecf a=chofmann
git-svn-id: svn://10.0.0.236/trunk@92744 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 19:00:56 +00:00
law%netscape.com
e6a12cbc4a Fix for bug 50424; correct contractID; r=danm, sr=alecf, a=asa
git-svn-id: svn://10.0.0.236/trunk@92743 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 18:34:53 +00:00
tara%tequilarista.org
c05fe93661 Bullshit checkin to add the fact that the previous changes also include the final fix for bug 72721. I am a buckethead
git-svn-id: svn://10.0.0.236/trunk@92737 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 17:35:23 +00:00
beard%netscape.com
c907b7f850 loadClassName: use current class loader to find classes, before calling Class.forName().
git-svn-id: svn://10.0.0.236/trunk@92736 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 17:31:34 +00:00
peterlubczynski%netscape.com
6201fd8ad7 Fix for clearing previous page title r=valeski sr=waterson a=choffman
git-svn-id: svn://10.0.0.236/trunk@92734 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 17:20:51 +00:00
tara%tequilarista.org
71888475f0 landing final patch for bug 76261
git-svn-id: svn://10.0.0.236/trunk@92733 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 17:19:07 +00:00
jgmyers%netscape.com
58ce853e0c fix typo: bug 31896 r=dmose sr=darin a=blizzard
git-svn-id: svn://10.0.0.236/trunk@92731 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 17:10:50 +00:00
endico%mozilla.org
79aa8cf419 fixing path for accessible in MozillaTinderboxAll and add gfx2
git-svn-id: svn://10.0.0.236/trunk@92727 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 15:49:44 +00:00
locka%iol.ie
9d0c043d95 Sets profile during initialisation to ensure directory locations, cache, cookies etc. all work correctly for control. b=76654, a=blizzard@mozilla.org, sr=blizzard@mozilla.org, r=ccarlen@netscape.com
git-svn-id: svn://10.0.0.236/trunk@92726 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 15:21:16 +00:00
chak%netscape.com
8a625f60dd Fix for bug#76272 - Assertion when using viewsource
r=valeski, sr=alecf, a=blizzard


git-svn-id: svn://10.0.0.236/trunk@92725 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 14:42:52 +00:00
nboyd%atg.com
9cc7ae6dbf Latest patches from Igor.
git-svn-id: svn://10.0.0.236/trunk@92724 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 12:52:39 +00:00
colin%theblakes.com
d74e9d61e7 Move ldap40 and lber40 after MOZ_COMPONENT_LIBS so that they have
a -L in effect. b=76482. r=cld. a=roc+moz.


git-svn-id: svn://10.0.0.236/trunk@92722 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 09:57:17 +00:00
bnesse%netscape.com
b37f8b4028 Removed #pragma mark - stuff that was causing build problems on Windows in preparation for landing bug 46863 tomorrow.
[Not part of the build --- yet :)]


git-svn-id: svn://10.0.0.236/trunk@92710 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 03:49:00 +00:00
cls%seawood.org
f24522eceb Reversing previous checkin. This was not meant for the trunk just yet. Broken client.mk on the branch. :-/
git-svn-id: svn://10.0.0.236/trunk@92706 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 03:00:55 +00:00
sspitzer%netscape.com
c1833e248c fix for #76578. crash on exit when viewing "account central" page.
r=mscott,sr=bienvenu,a=blizzard


git-svn-id: svn://10.0.0.236/trunk@92705 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 02:38:15 +00:00
nicolson%netscape.com
6b315db828 get rid of workarounds for bug 323494.
git-svn-id: svn://10.0.0.236/trunk@92704 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 02:03:55 +00:00
cls%seawood.org
6ebcae0ae4 Build fixes based upon Ron's original mega-patch.
git-svn-id: svn://10.0.0.236/trunk@92703 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 01:53:36 +00:00
sspitzer%netscape.com
275951823d fix for #76200. crash when viewing a message with an <img> tag but no src.
r/sr=valeski,mscott.  a=blizzard


git-svn-id: svn://10.0.0.236/trunk@92702 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-19 00:59:56 +00:00
jdunn%netscape.com
f5527ac6a1 fixing HP tinderbox bustage, just reformatting the lines of code
a=roc@moz
sr=roc+moz
# 76489


git-svn-id: svn://10.0.0.236/trunk@92699 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 22:42:30 +00:00
pschwartau%netscape.com
64cd0c2fe2 "for (i in myArray)" produces unintentional side effects if a test modifies Array.prototype or Object.prototype. Use for (i=0; __; i++) instead.
git-svn-id: svn://10.0.0.236/trunk@92698 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 22:33:31 +00:00
bbaetz%cs.mcgill.ca
8f333fd8a8 bug 76059, fixes A4 printing regression. Patch by atontti@cc.hut.fi.
r=kmcclusk@netscape.com sr=attinasi a=asa


git-svn-id: svn://10.0.0.236/trunk@92695 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 22:11:55 +00:00
rginda%netscape.com
8666c54109 initial add of license templates
git-svn-id: svn://10.0.0.236/trunk@92694 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 22:06:17 +00:00
rginda%netscape.com
bfd100bfed initial add of xul-app template
git-svn-id: svn://10.0.0.236/trunk@92692 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 22:04:30 +00:00
dougt%netscape.com
8420a0e8e6 This fixes the double channel load caused by the directory viewer.
b  = 45066
r  = bbaetz@cs.mcgill.ca
sr = waterson@netscape.com
a   = chofmann@netscape.com


git-svn-id: svn://10.0.0.236/trunk@92691 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 22:01:12 +00:00
rginda%netscape.com
312d1191d6 initial add of template processor
git-svn-id: svn://10.0.0.236/trunk@92690 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 21:45:10 +00:00
despotdaemon%netscape.com
870517bac6 Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@92687 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 21:17:32 +00:00
beard%netscape.com
cca45f427e Removed hard tabs, removed unnecessary cast, (Scriptable)null.
git-svn-id: svn://10.0.0.236/trunk@92686 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 20:50:58 +00:00
ben%netscape.com
981d57173e Fix for crash on mac startup, 76526 & other personal toolbar weirdness.
sr=sfraser, a=asa.


git-svn-id: svn://10.0.0.236/trunk@92685 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 20:42:46 +00:00
despotdaemon%netscape.com
304e2c97c8 Pseudo-automatic update of changes made by Chris.Yeh@nokia.com.
git-svn-id: svn://10.0.0.236/trunk@92683 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 19:52:33 +00:00
despotdaemon%netscape.com
d9a9528907 Pseudo-automatic update of changes made by cyeh@bluemartini.com.
git-svn-id: svn://10.0.0.236/trunk@92682 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 19:51:50 +00:00
endico%mozilla.org
7ff7c245a6 initial checkin
git-svn-id: svn://10.0.0.236/trunk@92679 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 18:01:28 +00:00
bryner%uiuc.edu
3cc39f818c bug 70810 [XUL Syntax] Change tab syntax - another of the XUL 1.0 changes. patch from maolson@earthlink.net, r=ben, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@92676 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 07:01:29 +00:00
maolson%earthlink.net
d682f6cc6b bug 70810 [XUL Syntax] Change tab syntax - another of the XUL 1.0 changes
r=ben, sr=hyatt


git-svn-id: svn://10.0.0.236/trunk@92673 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 06:59:04 +00:00
mjudge%netscape.com
8eb3c77193 forgot 1 change sr=scc r=anthonyd 76442
git-svn-id: svn://10.0.0.236/trunk@92670 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 06:26:19 +00:00
bryner%uiuc.edu
a6e92ef342 Bug 31809:
- When a docshell first takes focus, give focus to its first focusable content
- Make the docshell come after all of its content in the tabbing order

r=saari, sr=hyatt.


git-svn-id: svn://10.0.0.236/trunk@92669 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 06:18:10 +00:00
mjudge%netscape.com
f92ab20e82 76442 sr= scc r= anthonyd. last minute fixes to editor to not do stupid copies and instead to use new case insensitive string compares.
git-svn-id: svn://10.0.0.236/trunk@92668 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 06:17:05 +00:00
dr%netscape.com
58190bba57 64313 (Implement cmd_copyLink, cmd_copyImageLocation, cmd_copyImageContents). Implement the commands, hook them up in the navigator and mailnews frontends, provide hooks for embedding. r=hyatt, sr=waterson
git-svn-id: svn://10.0.0.236/trunk@92667 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 06:06:31 +00:00
timeless%mac.com
75929d9555 fix Bugzilla Bug 75853 CR and LF are naked ifdefs
r=dveditz, sr=scc


git-svn-id: svn://10.0.0.236/trunk@92666 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 05:59:43 +00:00
ben%netscape.com
d8da150fe1 forgot to include this file in previous checkin
git-svn-id: svn://10.0.0.236/trunk@92665 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 05:49:48 +00:00
scc%mozilla.org
c599e4011d bug #70740: r=mjudge, sr=sfraser. Provide case-insensitive comparison for all string classes
git-svn-id: svn://10.0.0.236/trunk@92664 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 05:20:06 +00:00
bnesse%netscape.com
2f7b49c5b8 Added support for caching accesses to the root branch as per alecf.
[Not part of the build].


git-svn-id: svn://10.0.0.236/trunk@92663 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 05:18:47 +00:00
bnesse%netscape.com
49903ac920 Cleaned up bad formatting.
[Not part of the build.]


git-svn-id: svn://10.0.0.236/trunk@92662 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 05:17:54 +00:00
dveditz%netscape.com
862b98e6df fixing bustage
git-svn-id: svn://10.0.0.236/trunk@92661 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 05:17:36 +00:00
bnesse%netscape.com
456e141fb3 Added comments as per alecf.
[Not part of the build.]


git-svn-id: svn://10.0.0.236/trunk@92660 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 05:16:47 +00:00
radha%netscape.com
c0f55bbc71 Fix for bug 61557. location.replace() loads wrong page in the frame r=valeski sr=rpotts
git-svn-id: svn://10.0.0.236/trunk@92659 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 04:55:16 +00:00
ben%netscape.com
57c21e29f7 17920, r=hyatt, sr=sfraser, scc
git-svn-id: svn://10.0.0.236/trunk@92658 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 04:52:46 +00:00
ben%netscape.com
c639c3ccdd fix for 17920, r=hyatt, sr=sfraser, scc.
git-svn-id: svn://10.0.0.236/trunk@92657 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 04:38:30 +00:00
ssu%netscape.com
18a8ece1c0 fixing bug 74021 - Stand alone window Close File->Close menu is gray out
r=blake ross
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@92656 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 04:37:01 +00:00
pierre%netscape.com
e1fa3a64af #12386 "Matching of case sensitive attribute values should be case sensitive" sr=waterson
git-svn-id: svn://10.0.0.236/trunk@92655 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 04:36:52 +00:00
dveditz%netscape.com
7c7c380c70 bug 71393, miscalculates free space on large drives. Contributed by thorgal@amiga.com.pl and bzbarsky@mit.edu, r=ksosez@softhome.net/dveditz@netscape.com
git-svn-id: svn://10.0.0.236/trunk@92654 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 04:30:26 +00:00
cls%seawood.org
89cc9bc982 Do not building embedding/tests if DISABLE_TESTS is set.
Thanks to Sean Chitwood <darkmane@w-link.net> & Dean Tessman <dean_tessman@hotmail.com> for the patch.
Bug #66697 r=cls


git-svn-id: svn://10.0.0.236/trunk@92653 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 04:19:09 +00:00
beard%netscape.com
18cfb38847 Fix for bug #60018, ra=edburns, sr=brendan
git-svn-id: svn://10.0.0.236/trunk@92652 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 04:19:00 +00:00
mscott%netscape.com
fef75fad9e Bug #68237 --> fix array bounds read in ::ScanTXT
r=benb
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@92651 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 04:08:25 +00:00
blakeross%telocity.com
7cad893111 Pressing Esc while urlbar has focus should revert url to that of page and select contents of urlbar (47863, patch by doronr@naboonline.com). r=bz sr=alecf
git-svn-id: svn://10.0.0.236/trunk@92650 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 03:50:15 +00:00
mscott%netscape.com
2306c12670 Bug #74547 --> be sure to initialize m_channelListener to consume the output from libmime when fetching a part. This was causing
us to not show inlined images for local messages.
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@92649 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 03:39:37 +00:00
beard%netscape.com
4b7d52f7a7 fix for bug #8112, sr=brendan, r=beard
git-svn-id: svn://10.0.0.236/trunk@92648 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 03:38:58 +00:00
cls%seawood.org
a261f8d036 Remove mozilla/security from psm2 build list.
Make BUILD_MODULES=psm == BUILD_MODULES=psm2
Bug #75958 r=dbaron


git-svn-id: svn://10.0.0.236/trunk@92647 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 03:35:06 +00:00
ccarlen%netscape.com
66e7274286 Bug 71641 - profile mgr is creating sub dirs in profile dir it shouldn't be. r=valeski,r=sspitzer,sr=alecf
git-svn-id: svn://10.0.0.236/trunk@92646 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 03:30:36 +00:00
beard%netscape.com
7ea5ae0dc5 fix for bug #60018 (prevent dangling JSContext), sr=brendan, r=edburns
git-svn-id: svn://10.0.0.236/trunk@92645 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 03:17:30 +00:00
alecf%netscape.com
9adb18f5d2 add nsTimingService to the factory for bug 72002 sr=ben
git-svn-id: svn://10.0.0.236/trunk@92644 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 03:16:30 +00:00
beard%netscape.com
0e4835a553 partial fix (fixes refcount leak) for bug #60018, sr=brendan, ra=edburns
git-svn-id: svn://10.0.0.236/trunk@92643 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 03:16:19 +00:00
alecf%netscape.com
556caf5f2e oops, fix capitalization
git-svn-id: svn://10.0.0.236/trunk@92642 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 03:12:29 +00:00
gagan%netscape.com
ab557ef568 Fix for bug 68086. Replaced several about: files which were only redirecting to a new location with a single smarter one. r=rpotts, sr=darin
git-svn-id: svn://10.0.0.236/trunk@92641 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 03:09:32 +00:00
beard%netscape.com
a627d40758 bug #68086, removed trivial redirecting protocol handlers, added nsAboutRedirector.cpp. r=gagan
git-svn-id: svn://10.0.0.236/trunk@92640 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 03:05:56 +00:00
sdagley%netscape.com
aa037dac34 Changes for #72002. Checking in for alecf. sr=ben,r=alecf
git-svn-id: svn://10.0.0.236/trunk@92639 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 03:05:10 +00:00
alecf%netscape.com
bb114108ae add nsTimingService.cpp to the windows/unix builds, sr=ben
bug 72002


git-svn-id: svn://10.0.0.236/trunk@92638 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 03:04:55 +00:00
beard%netscape.com
40c61b9fb1 Fix for Mac bustage. r=gagan
git-svn-id: svn://10.0.0.236/trunk@92637 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 03:04:44 +00:00
alecf%netscape.com
b3a2f2003b add nsITimingService.idl to windows/mac builds
sr=ben
bug 72002


git-svn-id: svn://10.0.0.236/trunk@92636 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 03:03:57 +00:00
timeless%mac.com
20927967f9 fix Bugzilla Bug 75632 [FIX]Bad HTML <button> CSS causes jiggling when clicked
patch by bzbarsky@mit.edu r=rods, sr=attinasi


git-svn-id: svn://10.0.0.236/trunk@92635 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 02:56:12 +00:00
timeless%mac.com
8600da50ff fix Bugzilla Bug 62678 View source uses background from prefs and hardcoded text color
fix by bzbarsky@mit.edu r=timeless, sr=attinasi


git-svn-id: svn://10.0.0.236/trunk@92634 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 02:54:41 +00:00
ccarlen%netscape.com
bb890dd0d1 Bug 44071 - Change name of profile root dir from "Users50" to "Profiles". Checking in patch by gemal@gemal.dk. r=ccarlen@netscape.com, sr=brendan@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@92633 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 02:51:24 +00:00
mscott%netscape.com
3cf666c91c (NOT PART OF THE BUILD)
Changes to get the icon loader working on win2k with 16bit icons.


git-svn-id: svn://10.0.0.236/trunk@92632 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 02:48:04 +00:00
beard%netscape.com
b262e03ccf Added UTCUtil library. [not part of build]
git-svn-id: svn://10.0.0.236/trunk@92631 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 02:44:01 +00:00
beard%netscape.com
a91c8a9a52 Fix for bug #26516, load Java lazily. sr=brendan, r=edburns
git-svn-id: svn://10.0.0.236/trunk@92630 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 02:22:13 +00:00
edburns%acm.org
f719f527f4 I've checked the diffs, they are as expected.
r=dbaron
a=edburns
sr=waterson
bug=71644

Files in this fix:
lcglue.cpp
nsCSecurityContext.cpp

-                nsCOMPtr<nsIScriptGlobalObject> global = scriptContext->GetGlobalObject();
+                nsCOMPtr<nsIScriptGlobalObject> global(dont_AddRef(scriptContext->GetGlobalObject()));

All the changes are like this.


git-svn-id: svn://10.0.0.236/trunk@92629 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 02:20:32 +00:00
anatoliya%netscape.com
e8746325c9 bug-75464 r=andreww sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@92628 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 02:12:48 +00:00
hyatt%netscape.com
da9233dd37 See previous checkin comments. Focus issues, same bugs, etc. r=saari, sr=brendan
git-svn-id: svn://10.0.0.236/trunk@92627 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 01:42:27 +00:00
hyatt%netscape.com
08d078d3c5 Fix for my 0.9 focus issues. r=saari, sr=brendan
git-svn-id: svn://10.0.0.236/trunk@92626 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 01:41:20 +00:00
sspitzer%netscape.com
13f7f47252 fix for #76088 views not persisting. fix started by putterman. sr=bienvenu@netscape.com
fix for #76307 special views default to sort order and type instead of the current sort order and type.
thanks to putterman for the bug and the fix.  r=sspitzer, sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@92625 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 01:20:29 +00:00
ben%netscape.com
fbe2328abc fix mac bustage by backing out change.
git-svn-id: svn://10.0.0.236/trunk@92624 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 01:15:23 +00:00
evaughan%netscape.com
87fe99d8fc Added a return to the end of this file to prevent HPUX bustage.
git-svn-id: svn://10.0.0.236/trunk@92623 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 00:48:24 +00:00
ddrinan%netscape.com
f612135854 Fix for bug #75277, enable tls. r=javi@netscape.com, sr=darin@netscape.com
git-svn-id: svn://10.0.0.236/trunk@92622 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 00:46:04 +00:00
mjudge%netscape.com
0c91e5ea8d needed PR_MIN and MAX bustage
git-svn-id: svn://10.0.0.236/trunk@92621 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 00:33:23 +00:00
shanjian%netscape.com
1440650582 #63965 crashed under Simplified Chinese Win2000 OS when scroll bar is dragged
r = nhotta,  sr=blizzard

"LoadGlobalFont" function is added to both "nsFontMetricsWin"
and "nsFontMetricsWinA" class to replace existing "LoadFont" call.
This function will use the "LOGFONT" stored in global font list to
create new font, that include charset parameter. CMAP is created
again for "mLoadedFont", but copied from global font item.

When enumerating the font, true type font is put in priority order
so that it will be searched first. This is done inside "enumProc"
function.


git-svn-id: svn://10.0.0.236/trunk@92620 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 00:30:46 +00:00
dbaron%fas.harvard.edu
ac8536309b Fix build bustage by removing unneeded #include of file that was just removed.
git-svn-id: svn://10.0.0.236/trunk@92619 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 00:30:43 +00:00
sonmi%netscape.com
b27dd64a06 tinderbox platformlist - which platforems are required to run which tests
git-svn-id: svn://10.0.0.236/trunk@92618 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 00:28:22 +00:00
scc%mozilla.org
d772050476 [documentation], _never_ part of a build. fixing bad ``it's''s, and referencing the tracking bug
git-svn-id: svn://10.0.0.236/trunk@92617 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 00:22:01 +00:00
dbaron%fas.harvard.edu
a6365729bb Fix MOZ_TRACK_MODULE_DEPS bustage by adding htmlparser to REQUIRES.
git-svn-id: svn://10.0.0.236/trunk@92616 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 00:17:21 +00:00
heikki%netscape.com
f76611d359 Bug 51339, XHTML map elements did not work, r=harishd, sr=vidur.
git-svn-id: svn://10.0.0.236/trunk@92615 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 00:14:34 +00:00
av%netscape.com
51fb14306f Fixing bug 76384 -- crash in the default plugin, r=serge, sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@92614 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 00:05:20 +00:00
dcone%netscape.com
c893147011 b=57928 r=mcclusky sr=attinas.
git-svn-id: svn://10.0.0.236/trunk@92613 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-18 00:03:10 +00:00
law%netscape.com
b1113cd461 Bug 52454
git-svn-id: svn://10.0.0.236/trunk@92612 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:59:58 +00:00
law%netscape.com
6dad00cb02 Bug 52454; new Makefile.in for Linux build; not built yet
git-svn-id: svn://10.0.0.236/trunk@92611 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:59:02 +00:00
serge%netscape.com
ee588f04cc #67879 fix the crash, getting rid of xpm.h to show up a puzzle pixmap; sr=blizzard, r=av
git-svn-id: svn://10.0.0.236/trunk@92610 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:57:26 +00:00
pschwartau%netscape.com
60aff7a1ad Getter/setter tests are non-ECMA. Moving them from ecma_3 directory to js1_5 directory.
git-svn-id: svn://10.0.0.236/trunk@92609 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:56:57 +00:00
pschwartau%netscape.com
1a163d7749 Getter/setter tests are non-ECMA. Moving them to js1_5 directory
git-svn-id: svn://10.0.0.236/trunk@92608 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:54:17 +00:00
pierre%netscape.com
b160c572c1 Removed nsHTMLContentStream.cpp. Checked in for harishd.
git-svn-id: svn://10.0.0.236/trunk@92607 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:49:10 +00:00
av%netscape.com
d9428df46f Fixing 76356 -- plugin streams don't ask for byte range support, r=gagan, sr=darin
git-svn-id: svn://10.0.0.236/trunk@92606 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:47:01 +00:00
blizzard%redhat.com
b2d61d9a9e Fix bug #66347. Bogus return values for screenX and screenY. Don't cache values after a ::Move. r=dbaron, sr=alecf.
git-svn-id: svn://10.0.0.236/trunk@92605 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:41:32 +00:00
ducarroz%netscape.com
60dae999c2 Fix for bug 75650. Fix some memories leak which result on not remowing temp files. R=varada, SR=sspitzer
git-svn-id: svn://10.0.0.236/trunk@92604 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:41:29 +00:00
ducarroz%netscape.com
2c31df783d Fix for bug 76215. Need to start progressmeters even when we don't show the progress dialog. R=varada, SR=sspitzer
git-svn-id: svn://10.0.0.236/trunk@92603 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:38:44 +00:00
ben%netscape.com
cf3329bfb1 68547, dragging bookmarks to top of folder sometimes deletes folder.
patch from matthew wilson, r=fabian, sr=ben


git-svn-id: svn://10.0.0.236/trunk@92602 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:36:44 +00:00
bienvenu%netscape.com
1b9a1a7bff fix problem reading unread imap msg from mem cache not marking msg read r=naving,sr=sspitzer 24787
git-svn-id: svn://10.0.0.236/trunk@92600 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:32:09 +00:00
mjudge%netscape.com
fbe313babb removing optimization unneeded for table selection to fix 60846sr= kin r= manske after making changes they requested
git-svn-id: svn://10.0.0.236/trunk@92599 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:31:34 +00:00
av%netscape.com
4f229b20dd Fixing 75826 -- PostURL not working from files, r=peterl, sr=waterson
git-svn-id: svn://10.0.0.236/trunk@92598 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:30:25 +00:00
javi%netscape.com
c934f0f6b5 Backing out prior patch for 76141 which caused all
platforms to display incorrectly.


git-svn-id: svn://10.0.0.236/trunk@92597 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:29:58 +00:00
joki%netscape.com
1c2178cff5 Fix for 63742, fire DOM resize events from a resetting timer to make them more useful and avoid infinite recursion. r:pollmann,sr:jst
git-svn-id: svn://10.0.0.236/trunk@92596 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:25:21 +00:00
ben%netscape.com
f67f00eb0e er, part of previous checkin (71685) r=pchen, sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@92595 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:25:18 +00:00
harishd%netscape.com
ebecf5a4cb 68790 - Remove nsHTMLContentSinkStream dependency. Not in use anymore
r=heikki
sr=jst


git-svn-id: svn://10.0.0.236/trunk@92594 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:23:33 +00:00
pierre%netscape.com
f9f1e674f2 #59933. When a |smaller| font size results in something smaller than the |xx-small| of the base font, we use the parent's font size. Same thing for |larger| and |xx-large|. r=attinasi
git-svn-id: svn://10.0.0.236/trunk@92593 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:23:09 +00:00
ben%netscape.com
363315a84e 71685 - bookmarks sidebar panel doesn't load. Rename file back to the original name.
r=pchen, sr=sfraser


git-svn-id: svn://10.0.0.236/trunk@92592 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:21:51 +00:00
gordon%netscape.com
713d908b72 Fix bug 75448 "Clear disk cache from prefs not working properly". Patch by
beard, r=gordon, sr=darin.


git-svn-id: svn://10.0.0.236/trunk@92591 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:20:06 +00:00
ddrinan%netscape.com
67317e5330 Fix for cert selection.
git-svn-id: svn://10.0.0.236/trunk@92590 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:16:14 +00:00
ben%netscape.com
18ad3d959e 75470, add bookmark dialog should be resizable. patch from sfraser, r=pchen, sr=ben. Also, changed some boxes to hbox/vbox.
git-svn-id: svn://10.0.0.236/trunk@92589 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:15:13 +00:00
cmanske%netscape.com
0b345adb68 Fixed selection of named anchor icon, b=68714, r=mjudge, sr=kin
git-svn-id: svn://10.0.0.236/trunk@92588 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:13:45 +00:00
roc+%cs.cmu.edu
5c45d6acce New blender code. Cleans up/speeds up the code a lot and fixes bug 42011, and probably others. r=tor,sr=blizzard
git-svn-id: svn://10.0.0.236/trunk@92587 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:13:12 +00:00
roc+%cs.cmu.edu
133c509891 Make sure a reflow command is posted for all dirty children in nsContainerFrame::ReflowDirtyChild, even if there's already a dirty child. Fix for bug 57251. r=attinasi,sr=waterson
git-svn-id: svn://10.0.0.236/trunk@92586 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:12:36 +00:00
ben%netscape.com
05a62734ff Fix for 57763, disable field in advanced panel with checkbox. r=jag, sr=alecf.
git-svn-id: svn://10.0.0.236/trunk@92585 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:12:16 +00:00
varada%netscape.com
202e62afd1 fix for bug#74601;getting rid of last option in reply-on-top for compose prefs;r=ducarroz;sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@92583 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:09:06 +00:00
evaughan%netscape.com
b28fc76be2 Accessibility work. bug #12952
-r aaronl -sr brendan


git-svn-id: svn://10.0.0.236/trunk@92582 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:06:38 +00:00
morse%netscape.com
5322ffef33 bug 76386, cookies no longer being sorted, r=blakeross, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@92581 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:04:19 +00:00
locka%iol.ie
7c673db440 Fix for context menus not working in new windows opened from links with a _new target. b=76327, r=valeski@netscape.com, sr=rpotts@netscape.com
git-svn-id: svn://10.0.0.236/trunk@92580 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:04:13 +00:00
erik%netscape.com
4cc5898b01 bug 76311; author=simon@softel.co.il; r=mjudge; sr=erik; This fixes the bug
where we were running bidi selection code even on a non-bidi document. It
also fixes a problem in the bidi code where we were ignoring the return
values of a few calls.


git-svn-id: svn://10.0.0.236/trunk@92579 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:03:38 +00:00
alecf%netscape.com
9b77648006 remove files not part of build in an effort to eradicate nsIAppShellComponent
git-svn-id: svn://10.0.0.236/trunk@92578 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 23:02:35 +00:00
despotdaemon%netscape.com
85e589b749 Pseudo-automatic update of changes made by heikki@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@92576 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 22:52:49 +00:00
valeski%netscape.com
ace9c0e466 fixing windows bustage
git-svn-id: svn://10.0.0.236/trunk@92571 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 21:27:51 +00:00
dougt%netscape.com
3dfa6e52f7 Fixes bug 76291. r=valeski@netscape.com, sr=me
git-svn-id: svn://10.0.0.236/trunk@92570 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 21:00:37 +00:00
karnaze%netscape.com
6d64d2e559 bug 8113 - render a cell's background and border unless its content is empty and it has "empty-cells:hide"
git-svn-id: svn://10.0.0.236/trunk@92564 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 14:58:34 +00:00
mkaply%us.ibm.com
1b3d508646 #70334
r=alecf, sr=waterson
Personal toolbar doesn't migrate on DBCS systems - use NS_ConvertUTF8toUCS2


git-svn-id: svn://10.0.0.236/trunk@92563 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 14:46:12 +00:00
karnaze%netscape.com
2326effc92 bug 66804 - return correct desired height when splitting row group. sr=waterson, r=bernd.mielke@snafu.de.
git-svn-id: svn://10.0.0.236/trunk@92562 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 14:39:54 +00:00
bienvenu%netscape.com
54b37fbd15 fix problem with new messages icon not showing up on inbox r=sspitzer, sr=mscott 76130
git-svn-id: svn://10.0.0.236/trunk@92561 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 14:36:23 +00:00
dbaron%fas.harvard.edu
7f0e5d6088 Adding nsProxyAutoConfig.js to makefiles and installer manifests. b=53080 r=blizzard@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@92560 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 14:33:19 +00:00
dveditz%netscape.com
d49359afb0 fix for 15115, registry reading speedup
git-svn-id: svn://10.0.0.236/trunk@92559 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 14:25:19 +00:00
nboyd%atg.com
58b7235e7f Hi, Norris!
I attach optimization patch for NativeDate that makes all js... methods
private, removes passing of unnecessary parameters and replaces
checkInstance by realThis call with false as the third parameter.


Regards, Igor

Hi, Norris!

Here is another small optimization for NativeDate in DayFromMonth method
where it replaces arrays by few ifs.

Regards, Igor


git-svn-id: svn://10.0.0.236/trunk@92558 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 13:54:45 +00:00
dveditz%netscape.com
dd05d83b86 more ^M bustage
git-svn-id: svn://10.0.0.236/trunk@92557 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 13:26:03 +00:00
dveditz%netscape.com
f4e8a362b7 Re-fixing bug 7022 (Install.buildID). "2001040506" needs to be a double,
doesn't fit in a javascript int.


git-svn-id: svn://10.0.0.236/trunk@92556 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 13:13:24 +00:00
dveditz%netscape.com
152683d8fc Fixing build bustage (evil trailing ^M's).
git-svn-id: svn://10.0.0.236/trunk@92555 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 12:46:17 +00:00
gordon%netscape.com
27f08b9248 desperate attempt to fix build bustage on win32. Don't know why it didn't like the !endif, so I'm just nuking the lines I was trying to comment out.
git-svn-id: svn://10.0.0.236/trunk@92554 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 12:01:58 +00:00
locka%iol.ie
1a22004738 Fix for http referrer not being sent when session history urls are loaded from the network. b=61426 sr=rpotts@netscape.com
git-svn-id: svn://10.0.0.236/trunk@92553 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 11:53:11 +00:00
peterv%netscape.com
def2c5f2f6 Fix access paths and remove expat lib, we're not using that. Not part of the default build. r/sr=me.
git-svn-id: svn://10.0.0.236/trunk@92552 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 11:14:39 +00:00
peterv%netscape.com
e15cf8bac0 Fix for bug 56087 (XSLTProcessor::TransformDocument can't work on existing document). Not part of the default build. r=dr, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@92551 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 11:13:13 +00:00
gordon%netscape.com
5661879251 bug 72528, remove old cache from build. sr=darin.
git-svn-id: svn://10.0.0.236/trunk@92549 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 10:47:22 +00:00
gordon%netscape.com
91ac06c23a bug 72528, removing old cache from build. sr=darin.
git-svn-id: svn://10.0.0.236/trunk@92548 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 10:40:13 +00:00
jfrancis%netscape.com
9a35a75ae3 fixes for bugs:
75618   CR line breaks not recognized when inserting data in a plain 
76258 	IsEditable() needs to be smarter 
72968 	browser crashes when doing REDO after doing some cut/paste i 
55224 	switching from HTML Source mode to Normal causes dataloss 
71355 	style buttons do not work from 2nd cell onwards inside table 
71362 	empty tables inside (otherwise) empty list item disappears w 
74655 	40% of reply time in mailcompose spent converting linefeeds

r=fm; sr=kin


git-svn-id: svn://10.0.0.236/trunk@92547 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 10:15:05 +00:00
pollmann%netscape.com
6d4f34711c Bug 76208: Store control that submitted form in event so we can submit it to the server (fixes regression), r=harishd@netscape.com, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@92546 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 10:02:11 +00:00
joki%netscape.com
27f4c139a7 Fix for smoketest block 76304. r:jst
git-svn-id: svn://10.0.0.236/trunk@92545 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 09:53:37 +00:00
peterv%netscape.com
846cfab67c Fix for bug 45377 (document base is not set right in nsXMLDocument::Load). Code by heikki, r=me, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@92544 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 09:46:29 +00:00
pavlov%netscape.com
61cbe9aa64 fixing bug 75432 r=ben sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@92543 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 09:04:12 +00:00
pavlov%netscape.com
c71f927843 fixing printing of images printing them too small. r=timeless sr=ben. bug 73254 and 75425.
git-svn-id: svn://10.0.0.236/trunk@92542 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 09:03:20 +00:00
rginda%netscape.com
7437ee7b9f moving the xpcom wrapper into js/jsd
git-svn-id: svn://10.0.0.236/trunk@92541 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 08:57:15 +00:00
ssu%netscape.com
a808e432ba fixing bug 64249 - remove the '(D)' from "Edit | Unsubscribe(D)" and "Edit | Cancel Message(D)"
and bug 75658 - 'Edit|Unsubscribe' and 'Edit|Cancel Message' not showing up..instead label 'Delete' is displayed

r=bhuvan
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@92540 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 08:55:19 +00:00
rginda%netscape.com
bc4cd3c716 moving xpcom wrapper from extensions/venkman/src/ and idl/ to here.
git-svn-id: svn://10.0.0.236/trunk@92539 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 08:50:41 +00:00
ssu%netscape.com
e572347b2f fixing bug 64249 - remove the '(D)' from "Edit | Unsubscribe(D)" and "Edit | Cancel Message(D)"
r=bhuvan
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@92538 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 08:47:21 +00:00
jst%netscape.com
6722d3c544 Fixing regression bug 75645, anonymous form controls were ending up in form.elements. r=pollmann@netscape.com, sr=rpotts@netscape.com
git-svn-id: svn://10.0.0.236/trunk@92537 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 08:35:49 +00:00
brendan%mozilla.org
03a1420a71 Avoid recursive death *and* don't crash on null proto pointer (75239, r/sr=jband, r=itaj sherman <MobDotCom@hotmail.com>).
git-svn-id: svn://10.0.0.236/trunk@92536 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 07:34:39 +00:00
sgehani%netscape.com
7bddbb83b4 Make bookmarks checkbox reflect that the bookmarks folder is
in the personal toolbar by default.

b  = 68395
r  = jag
sr = alecf


git-svn-id: svn://10.0.0.236/trunk@92535 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 07:33:26 +00:00
alecf%netscape.com
a7adfa8482 fix for bug 71660 sr=ben, r=blake - use deep merging to set default hidden state on history columns in the history sidebar panel
git-svn-id: svn://10.0.0.236/trunk@92534 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 07:24:01 +00:00
rbs%maths.uq.edu.au
45b99efaab Improve the speed of viewsource - Patch of Boris Zbarsky <bzbarsky@mit.edu> b=74486 r=rbs r=attinasi
git-svn-id: svn://10.0.0.236/trunk@92532 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 07:23:04 +00:00
jband%netscape.com
656bc99a3e fix bug 76102. Only vend weak references from the root of a wrappedJS wrapper chain. r=dbaron sr=brendan
git-svn-id: svn://10.0.0.236/trunk@92531 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 07:22:52 +00:00
alecf%netscape.com
04d62928b5 fix for bug 53904 and bug 75023, sr=ben@netscape.com
fix up content area drag handler so that selection that is anchored on a text node works fine, by using nsIDOMSelection APIs to find what we're dragging


git-svn-id: svn://10.0.0.236/trunk@92530 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 07:21:59 +00:00
bryner%uiuc.edu
2500eceedc Fixing js strict warnings. r=jag, sr=ben.
git-svn-id: svn://10.0.0.236/trunk@92529 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 07:19:52 +00:00
brendan%mozilla.org
abe01808f5 Over-engineer byte-order macro generation to catch most PDP-endian situations (65230, r=rogerl, not part of Mozilla-the-browser-suite build).
git-svn-id: svn://10.0.0.236/trunk@92528 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 07:12:38 +00:00
hyatt%netscape.com
d9defebf03 Fix for outliner crashing all the time. bug#74902.
git-svn-id: svn://10.0.0.236/trunk@92527 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 07:02:36 +00:00
disttsc%bart.nl
6f2f3c11b4 Only try to create an instance of the secure browser UI if PSM is installed. Bug=76292, r=timeless, sr=ben
git-svn-id: svn://10.0.0.236/trunk@92526 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 07:01:15 +00:00
waterson%netscape.com
b56dab6734 Bug 74184. Make sure that NS_FRAME_HAS_CHILD_WITH_VIEW is carried forward to continuing frames. r=kmcclusk, sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@92525 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 06:43:01 +00:00
joki%netscape.com
8443fdd96e Fixes for Create/Init/Dispatch of new DOM events. Bugs 25889, 71544, 52129, 61022, 71823. sr:jst, hyatt
git-svn-id: svn://10.0.0.236/trunk@92524 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 05:52:11 +00:00
bernd.mielke%snafu.de
431aac1d4d fix my bustage
git-svn-id: svn://10.0.0.236/trunk@92523 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 05:34:10 +00:00
mstoltz%netscape.com
d60c6f2177 Temporary fix for 66938 (wiretap exploit), previously reviewed for checkin on NS6.01 branch.
Limiting DOM access for scripts in mail messages to prevent stealing forwarded mail content.


git-svn-id: svn://10.0.0.236/trunk@92522 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 05:22:55 +00:00
sgehani%netscape.com
50e2cdab2c Fix spotlight warnings thanks to Simon.
b = 76255
r = ssu, sgehani (checking in for sfraser)
sr = sfraser


git-svn-id: svn://10.0.0.236/trunk@92521 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 05:03:05 +00:00
pinkerton%netscape.com
154922dba3 put the timer code in the include path for osx.
git-svn-id: svn://10.0.0.236/trunk@92520 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 04:43:06 +00:00
pavlov%netscape.com
c0024742b2 fixing bug 75830 r=harishd sr=jst
git-svn-id: svn://10.0.0.236/trunk@92519 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 04:39:56 +00:00
pinkerton%netscape.com
f28018677b nsIContent needed in the header for nsCOMPtr and gcc.
git-svn-id: svn://10.0.0.236/trunk@92518 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 04:36:36 +00:00
pinkerton%netscape.com
aa96cc342e get rid of warning about non-virtual dtor with virtual methods.
git-svn-id: svn://10.0.0.236/trunk@92517 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 04:35:56 +00:00
pinkerton%netscape.com
36e65d8849 osx needs nsWidgetAtoms built. r=saari/sr=hyatt. bug#75653
git-svn-id: svn://10.0.0.236/trunk@92516 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 04:35:22 +00:00
pinkerton%netscape.com
691f9596d1 cast needed on codewarrior, not on gcc. fix fizzilla bustage.
git-svn-id: svn://10.0.0.236/trunk@92515 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 04:32:43 +00:00
bernd.mielke%snafu.de
f053ce605d look first for the inner colspans if more than one colspan start in a column
bug 47432 r=karnazesr =attinasi


git-svn-id: svn://10.0.0.236/trunk@92514 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 04:32:32 +00:00
pinkerton%netscape.com
9db666252b needs MacTypes.h for Handle.
git-svn-id: svn://10.0.0.236/trunk@92512 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 04:10:47 +00:00
pinkerton%netscape.com
677bed34ba build all the right files and generate the idl. bug 75653.
git-svn-id: svn://10.0.0.236/trunk@92511 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 04:02:00 +00:00
pinkerton%netscape.com
bba64ec8cf use reset() with auto_ptr for gcc. r=saari/sr=hyatt. bug# 75653
git-svn-id: svn://10.0.0.236/trunk@92510 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 04:01:24 +00:00
pinkerton%netscape.com
323898afb8 get rid of an unsiged warning and pull in drag.h for a flavor const on osx.
git-svn-id: svn://10.0.0.236/trunk@92509 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 04:00:39 +00:00
pinkerton%netscape.com
6a712d0424 cast for gcc
git-svn-id: svn://10.0.0.236/trunk@92508 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 04:00:07 +00:00
pinkerton%netscape.com
f627c10c81 needs menus.h
git-svn-id: svn://10.0.0.236/trunk@92507 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 03:59:50 +00:00
gordon%netscape.com
6fe467e1c5 First implementation of "flat files" for cache.
git-svn-id: svn://10.0.0.236/trunk@92506 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 03:54:48 +00:00
timeless%mac.com
c4f9e46e47 for Bugzilla Bug 76042 [FIX] remove duplicate cmd_rename line in bookmark.properties
patch by atontti@cc.hut.fi r=timeless, sr=alecf


git-svn-id: svn://10.0.0.236/trunk@92505 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 03:40:40 +00:00
chuang%netscape.com
a9497b25b8 Bug4640 Login fails to AB Sync without asking me for a password, r=racham, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@92504 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 03:28:49 +00:00
pinkerton%netscape.com
641528df7f use CoreFoundation for setting control text from a unicode string under carbon.
r=saari/sr=hyatt bug# 75653


git-svn-id: svn://10.0.0.236/trunk@92503 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 03:21:16 +00:00
pinkerton%netscape.com
406d53d7a9 don't use SIOUX debug calls under osx (there is no sioux console).
git-svn-id: svn://10.0.0.236/trunk@92502 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 03:20:30 +00:00
pinkerton%netscape.com
71f84b05bc switch to using reset() to set auto_ptr's. not sure why we did it the
other way. r=saari/sr=hyatt. bug# 75653


git-svn-id: svn://10.0.0.236/trunk@92501 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 03:19:32 +00:00
pinkerton%netscape.com
6085587437 needs MacTypes.h for osx
git-svn-id: svn://10.0.0.236/trunk@92500 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 02:59:24 +00:00
pinkerton%netscape.com
7e0d81aaf3 Export widget atoms for osx. r=saari/sr=hyatt bug#75653
git-svn-id: svn://10.0.0.236/trunk@92499 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 02:58:51 +00:00
dbaron%fas.harvard.edu
5b34044fae Fix form controls and Windows/Unix classic skin to use new system colors -moz-FieldText, -moz-Dialog, and -moz-DialogText where appropriate to allow accurate representation of system colors on GTK.
Fix various CSS errors in themes.
b=67448  r=hewitt@netscape.com  sr=blizzard@mozilla.org


git-svn-id: svn://10.0.0.236/trunk@92498 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 02:54:21 +00:00
pinkerton%netscape.com
6aa5df3e83 nothing should be including standardFile.h anymore
git-svn-id: svn://10.0.0.236/trunk@92497 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 02:50:07 +00:00
pinkerton%netscape.com
3f85ad41c7 use rint instead of round to avoid warnings
git-svn-id: svn://10.0.0.236/trunk@92496 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 02:49:20 +00:00
drapeau%eng.sun.com
4564105d70 Bug fix for Bugzilla bug 53080. Includes a JavaScript XPCOM component that
does the automatic proxy config.  Much thanks to Denis Antrushin
(adu@sparc.spb.su), among others, for writing this fix.


git-svn-id: svn://10.0.0.236/trunk@92495 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 02:34:47 +00:00
pinkerton%netscape.com
9b05a06b50 windows.h -> MacWindows.h
git-svn-id: svn://10.0.0.236/trunk@92494 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 02:33:40 +00:00
justdave%syndicomm.com
f539fe27ee Correcting my email address in the comments
git-svn-id: svn://10.0.0.236/trunk@92493 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 02:26:16 +00:00
pinkerton%netscape.com
fa0f8f2b74 include full class because of gcc r=saari/sr=hyatt, bug#75653
git-svn-id: svn://10.0.0.236/trunk@92491 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 02:19:32 +00:00
loadrunner%betak.net
f78f0efd9f bug 54285, r=nhotta, jag, pink, sr=brendan
git-svn-id: svn://10.0.0.236/trunk@92489 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 02:16:51 +00:00
disttsc%bart.nl
df97775619 Bug 68374, "xp filepicker should return an error if file doesn't exist". It will now popup a warning dialog. r=bryner, r=Pavlov, sr=blizzard.
git-svn-id: svn://10.0.0.236/trunk@92486 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 01:58:01 +00:00
loadrunner%betak.net
87918c26d4 bug 54285, r=nhotta, jag, pink, sr=brendan
git-svn-id: svn://10.0.0.236/trunk@92485 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 01:58:00 +00:00
dbaron%fas.harvard.edu
a17c958312 Fix MOZ_TRACK_MODULE_DEPS (senna tinderbox) bustage by adding windowwatcher to REQUIRES.
git-svn-id: svn://10.0.0.236/trunk@92484 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 01:54:05 +00:00
pinkerton%netscape.com
d1e19460f7 adjust a define for osx. r=saari/sr=hyatt, bug 75653.
git-svn-id: svn://10.0.0.236/trunk@92483 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 01:50:50 +00:00
roc+%cs.cmu.edu
9a09592520 Fix calculation of scrollbar widths for laying out fixed-position frames. Also make sure that the fixed frames are reflowed if scrollbar widths change. Fix for bug 5195. r=evaughan,sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@92482 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 01:45:38 +00:00
mstoltz%netscape.com
452a43cfc9 More fixes for 55237, cleaned up CheckLoadURI and added a check on "Edit This Link." Also added error reporting (bug 40538).
r=beard, sr=hyatt


git-svn-id: svn://10.0.0.236/trunk@92480 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 01:21:44 +00:00
cls%seawood.org
ed898d3357 Remove exit(0) from qt version check.
Thanks to johng@corel.com (John Griggs) for the patch.
Bug #75730 r=leaf sr=cls


git-svn-id: svn://10.0.0.236/trunk@92479 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 01:10:54 +00:00
pinkerton%netscape.com
d53d8f4fc7 Removing incorrect escaping and fixing switch default typo. r=saari/sr=hyatt, bug 75653
git-svn-id: svn://10.0.0.236/trunk@92478 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 00:56:00 +00:00
pinkerton%netscape.com
95beb6ec98 get rid of non-virtual dtor with virtual methods warnings. r=saari/sr=hyatt bug 75653
git-svn-id: svn://10.0.0.236/trunk@92477 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 00:50:11 +00:00
pinkerton%netscape.com
71908bf08f Build osx printing files. r=saari/sr=hyatt bug 75653
git-svn-id: svn://10.0.0.236/trunk@92476 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 00:49:34 +00:00
dbaron%fas.harvard.edu
90e814955b Add 3 proposed CSS3 system colors as -moz-FieldText, -moz-Dialog, and -moz-DialogText, which are needed to accurately represent system colors on GTK.
Restore GTK system color for WindowText to the correct value (fg rather than text).
Add debugging code that can be enabled to debug use of system colors in themes.
r=pierre@netscape.com  sr=blizzard@mozilla.org  b=67448


git-svn-id: svn://10.0.0.236/trunk@92475 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 00:46:07 +00:00
yokoyama%netscape.com
7236f71f61 partial bug fix : 66030, /r=valeski, /sr=brendan
git-svn-id: svn://10.0.0.236/trunk@92474 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 00:43:16 +00:00
pinkerton%netscape.com
a0d3cfb0a5 Fix warnings and compile errors in gcc. r=saari/sr=hyatt, bug#7653
git-svn-id: svn://10.0.0.236/trunk@92473 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 00:38:34 +00:00
dbaron%fas.harvard.edu
1fa5023227 Remove carriage returns (^M) to fix cement (IRIX) bustage.
git-svn-id: svn://10.0.0.236/trunk@92472 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 00:32:17 +00:00
dbaron%fas.harvard.edu
d7a51c2dfb Fix leaks of global objects. b=76091 r=mstoltz@netscape.com sr=hyatt@netscape.com
git-svn-id: svn://10.0.0.236/trunk@92471 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 00:12:28 +00:00
cls%seawood.org
b5ab50d450 Allow cvs command to be set via CVS env variable.
Thanks to stephen@tgivan.com (Stephen Rasku) for the patch.
Bug #74565 r=cls


git-svn-id: svn://10.0.0.236/trunk@92470 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 00:11:22 +00:00
sonmi%netscape.com
773f50b55e started tinderbox addition, intermediate checkin
git-svn-id: svn://10.0.0.236/trunk@92469 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-17 00:00:58 +00:00
pinkerton%netscape.com
bae8040585 Fix warning about non-virtual dtor with virtual methods
git-svn-id: svn://10.0.0.236/trunk@92468 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 23:55:10 +00:00
oeschger%netscape.com
28b30c8196 bug=74132, patch from cls for building help, r=oeschger
git-svn-id: svn://10.0.0.236/trunk@92467 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 23:54:25 +00:00
pinkerton%netscape.com
f975160722 get rid of warning about virtual methods w/ non-virtual dtor.
git-svn-id: svn://10.0.0.236/trunk@92466 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 23:52:07 +00:00
pinkerton%netscape.com
6cf58bf5de be more explicit about includes for gcc. r=saari/sr=hyatt bug# 75653
git-svn-id: svn://10.0.0.236/trunk@92465 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 23:50:10 +00:00
pinkerton%netscape.com
c50318d5cf fix for fizzilla bustage. don't create stuff that isn't available on x.
git-svn-id: svn://10.0.0.236/trunk@92464 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 23:48:04 +00:00
pinkerton%netscape.com
c9a1aad537 fix for fizzilla bustage. don't create stuff that isn't available on x.
git-svn-id: svn://10.0.0.236/trunk@92463 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 23:44:41 +00:00
rginda%netscape.com
21b60ac3f1 - not built -
fixed NS_IF_ADDREF(aHook)s
added more hook attributes


git-svn-id: svn://10.0.0.236/trunk@92462 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 23:43:09 +00:00
naving%netscape.com
79fb563e5b 75992. sr=bienvenu. When it is cross-server update the counts correctly.
git-svn-id: svn://10.0.0.236/trunk@92461 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 23:42:07 +00:00
cls%seawood.org
106597cdc1 Compaq changed uname to use osf as a basename instead of osf1
git-svn-id: svn://10.0.0.236/trunk@92459 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 23:21:31 +00:00
pavlov%netscape.com
cb563f77a6 fixing from generating huge imageframes with broken images. bug 76230. r=akkana, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@92458 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 23:13:01 +00:00
maolson%earthlink.net
056e8ad486 bug 11623 - change CSS file comments from // to /* */
r=dbaron, sr=hewitt


git-svn-id: svn://10.0.0.236/trunk@92457 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 23:11:27 +00:00
valeski%netscape.com
7037da5301 r=rpotts, r=heikki, sr=vidur. content types are no longer hardcoded for docshell load acceptance. we now ask layout what it can handle (indirectly via the category manager). 40772.
git-svn-id: svn://10.0.0.236/trunk@92456 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 23:05:08 +00:00
pinkerton%netscape.com
29ad9f24ed don't include needless header, fix type error under gcc. r=saari/sr=hyatt. bug#75653
git-svn-id: svn://10.0.0.236/trunk@92455 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 23:02:42 +00:00
pinkerton%netscape.com
2cc2be2904 Include the OSX version of nsDeviceContextSpec for carbon. r=saari/sr=hyatt. bug# 75653
git-svn-id: svn://10.0.0.236/trunk@92454 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 23:01:07 +00:00
dbaron%fas.harvard.edu
3b36b2ebcb Fix MOZ_TRACK_MODULE_DEPS (senna tinderbox) bustage by changing mime to mimetype in REQUIRES.
git-svn-id: svn://10.0.0.236/trunk@92453 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 22:55:25 +00:00
pinkerton%netscape.com
24b37408f4 Export nsIPrintingContext.h for osx r=saari/sr=hyatt, bug# 75653
git-svn-id: svn://10.0.0.236/trunk@92452 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 22:47:33 +00:00
bnesse%netscape.com
98706209c2 Fixed bad JS_Request stuff in openPrefFile.
[Not part of the build].


git-svn-id: svn://10.0.0.236/trunk@92449 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 22:34:30 +00:00
law%netscape.com
6efb961cef More refinements for bug 52454, et al
git-svn-id: svn://10.0.0.236/trunk@92447 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 22:04:24 +00:00
akkana%netscape.com
f04dc5d2b2 74169: Enable controls on image animation in libpr0n. r=pavlov,saari sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@92446 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 22:02:39 +00:00
erik%netscape.com
c160d23648 fixing build bustage in IBMBIDI ifdef on Mac
git-svn-id: svn://10.0.0.236/trunk@92445 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 21:53:21 +00:00
scc%mozilla.org
2c0b33af2b [documentation], _never_ part of a build. fixing the title to be a little less misleading
git-svn-id: svn://10.0.0.236/trunk@92444 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 21:47:49 +00:00
erik%netscape.com
3cb907b335 fixing build bustage in IBMBIDI ifdef on Mac
git-svn-id: svn://10.0.0.236/trunk@92443 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 21:32:19 +00:00
av%netscape.com
85fcba7f70 Fixing 76116 -- crash on File->Exit with plugin on page, ra=av, sr=waterson
git-svn-id: svn://10.0.0.236/trunk@92442 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 21:26:28 +00:00
av%netscape.com
84090fa2c8 Fixing 75682 -- file leaf name comparison xp'ed in nsPluginHostImpl.cpp, r=peterl, a=av, sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@92441 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 21:21:11 +00:00
peterv%netscape.com
7ef84810e1 Fix View->Use Stylesheet. r=jag, sr=alecf.
git-svn-id: svn://10.0.0.236/trunk@92440 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 21:15:51 +00:00
curt%scruznet.com
02ba1153f2 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@92439 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 21:13:41 +00:00
valeski%netscape.com
60b932c5fe sr=vidur, r=dbaron. fixing leak and updating hashtables to newer, better, versions. 75337
git-svn-id: svn://10.0.0.236/trunk@92438 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 21:11:20 +00:00
ashuk%eng.sun.com
0fb49fc8d2 Bug=74742
author=ashuk
ra=idk

This patch allows BlackConnect to build with Forte Compilers. It
fixes some syntactical errors in the xpidl_idl.c and xpidl_java.c
files where C++ style syntax was being used in a C file and some
implicit illegal typecasts were being made.

_Ashu


git-svn-id: svn://10.0.0.236/trunk@92437 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 21:11:08 +00:00
dcone%netscape.com
187e4743e7 new print preview navigation idl for embedding. Does not effect the build.
git-svn-id: svn://10.0.0.236/trunk@92436 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 21:06:55 +00:00
jgmyers%netscape.com
758c3e42be rename tls sockets to starttls: bug 74387 r=javi r=darin sr=mscott
git-svn-id: svn://10.0.0.236/trunk@92435 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 21:01:29 +00:00
sdagley%netscape.com
f82296edb5 Increasing memory partition (20MB minimum, 28MB preferred) so we can load something more complex than mozilla.org before hitting tempmem. Ostensibly for #65884 but I'm thinking that Shockwave might need a significantly larger partition (at least SW 8.0, SW8.5 reportedly behaves itself better). r=bnesse,sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@92434 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:50:37 +00:00
bbaetz%cs.mcgill.ca
f8d72f899a Bug 76069 - fix rdf:httpindex (such as ftp bookmarks)
r=dougt, sr=waterson


git-svn-id: svn://10.0.0.236/trunk@92433 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:45:26 +00:00
dcone%netscape.com
09ed3147b7 b=36796 r=peterl sr=attinasi.
git-svn-id: svn://10.0.0.236/trunk@92432 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:41:24 +00:00
javi%netscape.com
33ca9bb816 Cause this to build the PSM 2.0 directory now instead.
git-svn-id: svn://10.0.0.236/trunk@92431 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:41:00 +00:00
javi%netscape.com
13319a5672 Backing out my change since leaf will provide a "better" fix.
git-svn-id: svn://10.0.0.236/trunk@92430 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:40:16 +00:00
morse%netscape.com
8d0292bd09 bug 75661, crash when image-manager alert box appears, r=kmcclusk, sr=roc+moz
git-svn-id: svn://10.0.0.236/trunk@92429 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:40:08 +00:00
hwaara%chello.se
331d5f10a8 Implement date&time support in reply-headers, like:
"On <date & time>, <author> wrote:"
For now, this is optional (set mailnews.reply_header_type to '2' in prefs.js), we will default to only show "<author> wrote:", as usual.  This is due to some l10n issues which are part of bug 75377. The date&time format is hard-coded to be en-US if set, again, bug 75377.
bug 23615. r=disttsc@bart.nl, sr=sspitzer@netscape.com

Fix a bunch of leaks (15 of them) in addressbook, addressbook-sync and import-mail code. None of the callers to GetUserProfileDirectory() deallocated their nsFileSpec.
bug 75332. r=chuang@netscape.com, sr=bienvenu@netscape.com


git-svn-id: svn://10.0.0.236/trunk@92428 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:40:07 +00:00
darin%netscape.com
e12ac7f710 Fixes bug 75354 "https content is being cached on disk!!" r=bbaetz, sr=dougt
git-svn-id: svn://10.0.0.236/trunk@92427 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:39:10 +00:00
javi%netscape.com
f709cb6740 Fix for Bug 76179 patch provided by leaf, r=javi, sr=cls
Don't build the Makefile in security as part of PSM 2 builds.  That
  build drives the PSM1 build process.


git-svn-id: svn://10.0.0.236/trunk@92426 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:37:57 +00:00
danm%netscape.com
de9fcdd499 hooking up windowwatcher active window. bug 44809,76011 r=hyatt,saari
git-svn-id: svn://10.0.0.236/trunk@92425 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:35:46 +00:00
danm%netscape.com
f2abbd8476 hooking up windowwatcher active window. bug 44809,76011 r=chak,hyatt,saari
git-svn-id: svn://10.0.0.236/trunk@92424 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:34:33 +00:00
morse%netscape.com
9329d75d6f bug 27417, select new cookie/password when previous one is deleted, r=dbragg, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@92423 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:32:17 +00:00
rginda%netscape.com
b30a815b09 - not built -
Mac warning fixes by peterv
comment fixed


git-svn-id: svn://10.0.0.236/trunk@92422 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:22:42 +00:00
pinkerton%netscape.com
7007e8b335 Fix up to actually build the correct files. r=pchen/sr=hyatt. bug# 75653
git-svn-id: svn://10.0.0.236/trunk@92421 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:21:37 +00:00
chak%netscape.com
5ea415031f Fix for bug#66334 - Viewsource needs to be a protocol handler
Changes to make the mozilla to use viewsource: URL
r=valeski,sr=rpotts


git-svn-id: svn://10.0.0.236/trunk@92420 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:19:44 +00:00
chak%netscape.com
c1cf8d2413 Fix for bug#66334 - Viewsource needs to be a protocol handler
Changes to make the mfcembed to use viewsource: URL
r=valeski,sr=rpotts


git-svn-id: svn://10.0.0.236/trunk@92419 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:19:00 +00:00
chak%netscape.com
142bd3f47d Fix for bug#66334 - Viewsource needs to be a protocol handler
Changes to make the viewer to use viewsource: URL
r=valeski,sr=rpotts


git-svn-id: svn://10.0.0.236/trunk@92418 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:18:30 +00:00
chak%netscape.com
92aee5da44 Fix for bug#66334 - Viewsource needs to be a protocol handler
r=valeski,sr=rpotts


git-svn-id: svn://10.0.0.236/trunk@92417 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:17:36 +00:00
pchen%netscape.com
e2577ff7c2 bug 49758, r=alecf, sr=sfraser, added string for external protocol not handled on mac error dialog
git-svn-id: svn://10.0.0.236/trunk@92416 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:17:02 +00:00
pchen%netscape.com
9fb4e5dbd6 bug 49758, r=alecf, sr=sfraser, implement hasProtocolHandler method which calls Internet Config to look for protocol handler. Returns NS_ERROR_NOT_AVAILABLE if the app signature of the protocol handler is the same as the running application utilizing this code
git-svn-id: svn://10.0.0.236/trunk@92415 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:16:51 +00:00
pchen%netscape.com
e5a59b79c4 bug 49758, r=alecf, sr=sfraser, fix protocal misspelling
git-svn-id: svn://10.0.0.236/trunk@92414 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:16:49 +00:00
pchen%netscape.com
db1b1d6f54 bug 49758, r=alecf, sr=sfraser, implement nsOSHelperAppService::ExternalProtocolHandlerExists() and implement nsOSHelperAppService::LoadURL() for mac
git-svn-id: svn://10.0.0.236/trunk@92413 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:16:41 +00:00
ccarlen%netscape.com
4268567e3c Bug 66334 - Checking in Mac projects for chak@netscape.com. r=valeski@netscape.com, sr=rpotts@netscape.com
git-svn-id: svn://10.0.0.236/trunk@92412 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:15:08 +00:00
varada%netscape.com
c8f8e28b29 fix for bug#73672;Msgpane collapse not reloading messages;r=putterman;sr=mscott;
git-svn-id: svn://10.0.0.236/trunk@92411 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:08:13 +00:00
javi%netscape.com
1025c055d6 Fix for Bug 76141.
Don't hardcode the width and height attributes.  Causes the
  text at bottom of window to not show up on some displays.


git-svn-id: svn://10.0.0.236/trunk@92410 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:02:36 +00:00
chak%netscape.com
d638069dbf Fix for bug#66334 - Viewsource needs to be a protocol handler
r=valeski,sr=rpotts
Not part of the build yet(pending some mac changes by ccarlen)


git-svn-id: svn://10.0.0.236/trunk@92409 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 20:00:20 +00:00
dougt%netscape.com
97f755b7d2 Fixes bug 64686. Simple impl of ReadSegments. r=gagan@netscape.com, sr=darin@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@92408 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 19:59:36 +00:00
darin%netscape.com
6f413ae8eb Fixes bug 76064 "nsSocketBOS::Write does not initialize return value"
patch=rginda, sr=darin


git-svn-id: svn://10.0.0.236/trunk@92407 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 19:57:38 +00:00
nboyd%atg.com
40445c4fd0 Subject:
Rhino: patch for IdScriptable.java and question about useDynamicScope
        Date:
             Mon, 16 Apr 2001 17:55:19 +0200
       From:
             Igor Bukanov <igor.bukanov@windriver.com>
 Organization:
             Wind River
         To:
             Norris Boyd <nboyd@atg.com>




Hi, Norris!

Here is a patch to IdScriptable.java that fixes sealed semantic and
makes Something.prototype.constructor to behave just as having DONTENUM
attribute, not DONTENUM|READONLY|PERMANENT. It also renames
seal_function to sealFunctions.

I also have a following question. I added nextInstanceCheck to
IdScriptable.java and its usage in realThis in NativeDate to emulate
code from FunctionObject where it looks up prototype in search for
NativeSomething instance if useDynamicScope is true. But could you
describe why it is necessary? I can understand why doing something like

var proto = new Date();
function Test() { }
Test.prototype = proto;
var test = new Test();
print(test.getDay()); // same as proto.getDay()

would be useful in ceratain situations, but what it has to do with
shared scopes?

Regards, Igor


git-svn-id: svn://10.0.0.236/trunk@92406 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 19:29:48 +00:00
karnaze%netscape.com
9b37579f45 fix build bustage.
git-svn-id: svn://10.0.0.236/trunk@92402 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 15:53:23 +00:00
neeti%netscape.com
9f9c5ca288 checking in patch for bug 58034 - Accept-Language header needs q values. r=neeti, sr=darin
git-svn-id: svn://10.0.0.236/trunk@92401 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 14:56:21 +00:00
karnaze%netscape.com
5c53575529 bug 59280 - better splitting of row groups/rows with rowspans. r=dcone.
git-svn-id: svn://10.0.0.236/trunk@92400 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 14:51:52 +00:00
scc%mozilla.org
5d8035fe84 [documentation], _never_ part of a build. Checking in as I add more FAQs. I've added all my email replies to string questions from the last year, with significant formatting so they are readable. They will be edited to become FAQs.
git-svn-id: svn://10.0.0.236/trunk@92399 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 14:33:27 +00:00
dcone%netscape.com
5fa90631a3 r=kmmclusk sr=attinasi b=62245. clamp the border size.
git-svn-id: svn://10.0.0.236/trunk@92397 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 13:14:40 +00:00
cls%seawood.org
fb745e13e9 Add security/nss/Makefile to STATIC_MAKEFILES
git-svn-id: svn://10.0.0.236/trunk@92395 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 10:48:48 +00:00
leaf%mozilla.org
177d00d7ad Automated update
git-svn-id: svn://10.0.0.236/trunk@92391 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 10:30:03 +00:00
cls%seawood.org
79087b3f45 Use C++ compiler when doing gnu_get_libc_version() check
git-svn-id: svn://10.0.0.236/trunk@92390 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 10:25:22 +00:00
gagan%netscape.com
c64ae6cefc Not part of the build yet. New files for bug 68086. Implemented a generic fat-free version for cases of about: that redirect to another URL. This will obsolete nsAboutCredits.*, mzAboutMozilla.*, and nsAboutPlugins.*
git-svn-id: svn://10.0.0.236/trunk@92389 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 10:07:56 +00:00
pavlov%netscape.com
ed845d252d removing the request attribute from imgIDecoder since it was unused and pointless. r=saari sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@92388 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 09:41:01 +00:00
pavlov%netscape.com
a392c38142 adding some additional error checking r=saari sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@92387 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 09:17:59 +00:00
brendan%mozilla.org
9af11e29f7 Dean Tessman's patch to fix a copy/paste Ctrl-instead-of-Meta error (55932, r=pink, sr=me).
git-svn-id: svn://10.0.0.236/trunk@92386 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 08:42:12 +00:00
gordon%netscape.com
60861ec3f8 Test for nsDiskCacheBlockFile.cpp [not part of build].
git-svn-id: svn://10.0.0.236/trunk@92385 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 08:37:47 +00:00
pollmann%netscape.com
2e99d49588 Bug 64702: Fix crash on focus by adding null checks, and make form.submit call onsubmit handlers before submitting. r=rods@netscape.com, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@92382 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 06:36:45 +00:00
cls%seawood.org
f4455d5079 Start using the NSS_CLIENT_BRANCH instead of the NSS_AUTOCONF_BRANCH for psm2 builds.
git-svn-id: svn://10.0.0.236/trunk@92380 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 03:58:57 +00:00
tajima%eng.sun.com
d546701ff2 bug 53990 - XIM: preedit problems at over-the-spot style. r=erik, sr=blizzard
git-svn-id: svn://10.0.0.236/trunk@92376 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 03:13:44 +00:00
cls%seawood.org
6584e0275d Move AC_DEFINE outside of AC_CACHE check to fix problem of config-defs.h always being regenerated.
git-svn-id: svn://10.0.0.236/trunk@92374 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 02:29:39 +00:00
bryner%uiuc.edu
20f1799649 Move MOZ_NSS_AUTOCONF test *after* including autoconf.mk. r=cls.
git-svn-id: svn://10.0.0.236/trunk@92370 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-16 00:50:16 +00:00
karnaze%netscape.com
371c47e0e3 bug 60807 - revised patch to handle 2 regression test cases.
git-svn-id: svn://10.0.0.236/trunk@92358 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-15 20:49:09 +00:00
dveditz%netscape.com
cd8477c0b6 bug 75847 (form submit fails when psm2 installed)
git-svn-id: svn://10.0.0.236/trunk@92357 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-15 18:32:55 +00:00
karnaze%netscape.com
2aba039789 bug 60807 - reduce avail width by fixed widths when calculating colspan widths. sr=attinasi, r=bernd.mielke@snafu.de
git-svn-id: svn://10.0.0.236/trunk@92356 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-15 17:08:04 +00:00
bienvenu%netscape.com
3d0baef5fb remove ifdeffed out code for cacheless view no bug needed sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@92355 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-15 16:52:42 +00:00
pinkerton%netscape.com
d1e8739fc3 Removing some redundant libraries. They're already covered by configure.in and xpcom/build/Makefile.in r=cls, sr=hyatt. bug# 75653.
git-svn-id: svn://10.0.0.236/trunk@92349 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-15 07:15:15 +00:00
pinkerton%netscape.com
b8edd21e25 differences in the linker between MW and gcc cause us to use ifdefs to prune instead of dead-stripping. r=saari/sr=hyatt. bug# 75653.
git-svn-id: svn://10.0.0.236/trunk@92347 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-15 06:44:58 +00:00
pavlov%netscape.com
e0faddc87b fixing scaling problem r=saari, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@92340 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-15 05:15:48 +00:00
pinkerton%netscape.com
af1fcfd83e tweaks to build under macosx. r=saari/sr=hyatt. bug#75653.
git-svn-id: svn://10.0.0.236/trunk@92339 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-15 04:58:22 +00:00
pinkerton%netscape.com
6bd7c9b3e0 use nsLocalFileMac.h for osx. r=saari, sr=hyatt bug#75653
git-svn-id: svn://10.0.0.236/trunk@92335 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-15 04:10:12 +00:00
bryner%uiuc.edu
edad18be57 Removing unnecessary #include.
git-svn-id: svn://10.0.0.236/trunk@92334 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-15 03:56:10 +00:00
pavlov%netscape.com
77851f9099 fixing bug 75185 r=brendan sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@92333 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-15 02:13:49 +00:00
pinkerton%netscape.com
e46a41a801 Pull in IC if we're using the mac toolkit. r=saari/sr=hyatt. bug# 75653
git-svn-id: svn://10.0.0.236/trunk@92332 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-15 01:49:46 +00:00
pinkerton%netscape.com
c8fadae9fa another routine that isn't supported under Carbon. r=saari/sr=hyatt. bug# 75653
git-svn-id: svn://10.0.0.236/trunk@92331 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-15 01:19:51 +00:00
pinkerton%netscape.com
83dffb81ec Errors.h->MacErrors.h, Types.h->MacTypes.h, r=saari/sr=hyatt. bug# 75653
git-svn-id: svn://10.0.0.236/trunk@92330 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-15 00:50:48 +00:00
pinkerton%netscape.com
f51d407b00 Windows.h --> MacWindows.h r=saari/sr=hyatt. bug# 75653.
git-svn-id: svn://10.0.0.236/trunk@92329 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-15 00:45:26 +00:00
dbaron%fas.harvard.edu
c209bf29f7 Removing carriage returns (^M) to fix build bustage on cement tinderbox (IRIX).
git-svn-id: svn://10.0.0.236/trunk@92328 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-15 00:20:44 +00:00
dbaron%fas.harvard.edu
d358eeb93c Backing out changes made by serge@netscape.com for bug 67879 because they include X11/xpm.h, which is not a standard part of X11 and therefore breaks builds on machines that don't have it, including the following tinderboxes: speedracer (on Seamonkey), messina, monkeypox, nebiros, palermo, and torino (on SeaMonkey-Ports). Fixes build bustage.
git-svn-id: svn://10.0.0.236/trunk@92327 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-15 00:15:35 +00:00
rginda%netscape.com
d1a42f8b35 checking in irc library updates described in 74164
chatzilla only, r=ssieb


git-svn-id: svn://10.0.0.236/trunk@92326 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-15 00:04:32 +00:00
blakeross%telocity.com
b3dc668078 Classic scrollbars need to extend xpfe binding to inherit proper implementation (removes context menus on scrollbars in Classic, 27289). r=kerz sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@92325 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 23:42:01 +00:00
sspitzer%netscape.com
d9224bdc4d clean up my fix for #75942 to not give a JS error in the filter dialog.
(I forgot the search terms are shared.)  also make it so if you hit enter in
a search term and the search has started, it will stop it and and start a new one.
rename gButton to gSearchStopButton, since that is what it is.
sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@92324 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 23:08:00 +00:00
dbaron%fas.harvard.edu
032fa957f2 Fix MOZ_TRACK_MODULE_DEPS (senna tinderbox) bustage by adding windowwatcher to REQUIRES.
git-svn-id: svn://10.0.0.236/trunk@92323 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 23:04:15 +00:00
bryner%uiuc.edu
df4573b17d Oops, need locale in here too (MOZ_TRACK_MODULE_DEPS bustage)
git-svn-id: svn://10.0.0.236/trunk@92322 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 22:53:33 +00:00
bryner%uiuc.edu
1816110e8b Fixing MOZ_TRACK_MODULE_DEPS bustage (and bringing to light more of our sad dependency story).
git-svn-id: svn://10.0.0.236/trunk@92320 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 22:48:10 +00:00
dougt%netscape.com
6b2e8297cf NotPartOfBuild - This is only a test of CVS
git-svn-id: svn://10.0.0.236/trunk@92319 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 22:39:57 +00:00
dougt%netscape.com
aed5fa21dd NotPartOfBuild.
git-svn-id: svn://10.0.0.236/trunk@92318 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 22:38:46 +00:00
dougt%netscape.com
a6b827b79f removing ^M
git-svn-id: svn://10.0.0.236/trunk@92317 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 22:37:39 +00:00
bbaetz%cs.mcgill.ca
283a6e680a Bug 70267 - implement gopher searches
r=dougt, sr=darin


git-svn-id: svn://10.0.0.236/trunk@92316 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 22:09:59 +00:00
bbaetz%cs.mcgill.ca
bd3614b670 bug 70529 - tidy up protocol-specific code in the dirviewer
r=jag, sr=waterson


git-svn-id: svn://10.0.0.236/trunk@92315 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 22:08:35 +00:00
dbaron%fas.harvard.edu
26652102a8 Fix page cycler (and tinderbox orange). r=disttsc@bart.nl
git-svn-id: svn://10.0.0.236/trunk@92313 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 21:41:15 +00:00
dougt%netscape.com
d1c5238b22 Fixing Mac Bustage. ftpcore.h was being included by the IDL file. It doesn't need to be.
git-svn-id: svn://10.0.0.236/trunk@92312 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 21:31:25 +00:00
dougt%netscape.com
063cdbbbd4 fixing bustage
git-svn-id: svn://10.0.0.236/trunk@92311 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 21:15:25 +00:00
serge%netscape.com
b82f7d646c #67879 eliminate crash unix defalt plugin; add puzzle pixmap to unix nullplugin; sr=blizzard, r=av
git-svn-id: svn://10.0.0.236/trunk@92310 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 21:14:23 +00:00
dougt%netscape.com
c1d7ac4835 Removing ^M.
git-svn-id: svn://10.0.0.236/trunk@92309 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 21:10:14 +00:00
serge%netscape.com
4afe35a3ef #67879 eliminate unix default plugin crash; add puzzle pixmap to unix nullplugin; sr=blizzard r=av
git-svn-id: svn://10.0.0.236/trunk@92308 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 21:07:43 +00:00
dougt%netscape.com
a3769f695d Fixing bustage...
Removing ^M. God I hate the msvc editor...


git-svn-id: svn://10.0.0.236/trunk@92307 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 20:57:44 +00:00
dougt%netscape.com
1005aceb22 Fixes 72774. Simple fix which checks the response code of the SYST command. If it is a 500 series we default to guessing the server is UNIX. r=bbaetz@cs.mcgill.ca
git-svn-id: svn://10.0.0.236/trunk@92306 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 20:36:24 +00:00
dougt%netscape.com
3a90a21610 Adds styles to the ftp logging.
r=bbaetz@cs.mcgill.ca
sr=waterson@netscape.com


git-svn-id: svn://10.0.0.236/trunk@92305 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 20:32:24 +00:00
dougt%netscape.com
ab5182da96 Fix for bug 75836.
Adds an optional log window to the ftp directory viewer.
Adds a nsIPrompt and nsIAuthPrompt to the directory viewer's interface requestor.
Attempts to serialize network requests.

(thanks to chris waterson who helped me figure out the refcounting)

r=mailto:bbaetz@cs.mcgill.ca
sr=waterson@netscape.com


git-svn-id: svn://10.0.0.236/trunk@92304 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 20:30:47 +00:00
disttsc%bart.nl
5b3736f0b7 Move browser's nsIWebProgressListener implementation into js. More work for bug 46200, r=ben, r=adamlock, sr=alecf.
git-svn-id: svn://10.0.0.236/trunk@92303 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 20:08:32 +00:00
rginda%netscape.com
60a697e6c7 - not built yet -
initial checkin of jsdebugger extension


git-svn-id: svn://10.0.0.236/trunk@92302 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 19:15:10 +00:00
rginda%netscape.com
162b9b2498 -- not built --
unix make fixes
unix "missing initializer" warnings


git-svn-id: svn://10.0.0.236/trunk@92301 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 18:57:00 +00:00
dbaron%fas.harvard.edu
2c62d3da30 Attempt to fix OS/2 bustage by adding the programs listed in SIMPLE_PROGRAMS to CPPSRCS as well, as they are in other makefiles that use SIMPLE_PROGRAMS. r=disttsc@bart.nl b=75163
git-svn-id: svn://10.0.0.236/trunk@92299 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 18:36:47 +00:00
axel%pike.org
e05bd1f660 not part of default build; PathExpr did wrong for //; code by sicking, r=me, sr=shaver, bug 75307
git-svn-id: svn://10.0.0.236/trunk@92298 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 17:24:59 +00:00
beard%netscape.com
70d4e5e6cf Fix for bug #49130, a=phil
git-svn-id: svn://10.0.0.236/trunk@92297 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 17:18:14 +00:00
dbaron%fas.harvard.edu
fdf2976375 Reduce the size of nsXPIDL[C]String by making destructor non-virtual and thus removing vtable pointer. b=75163 r=waterson@netscape.com sr=scc@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@92296 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 17:08:16 +00:00
bienvenu%netscape.com
058a80430a fix 75912 downloading news msgs for offline use stops if article not found, also 71581 hang going offline if you have no newsgroups configured for offline use sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@92295 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 15:30:19 +00:00
bienvenu%netscape.com
dd77c40099 add error status for news msg not found 15870 sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@92294 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 15:28:50 +00:00
bienvenu%netscape.com
e5395735fb fix status msg for offline news sr=sspitzer 15870
git-svn-id: svn://10.0.0.236/trunk@92293 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 15:27:31 +00:00
attinasi%netscape.com
7487c96bf8 Fix for problem where a StyleContext changes its CRC and does not update the styel context cache. b=73553 r=karnaze sr=waterson
git-svn-id: svn://10.0.0.236/trunk@92292 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 14:06:27 +00:00
markh%activestate.com
aea59ec1ab A number of changes moving towards dynamic linking support on Linux.
Not part of the build.


git-svn-id: svn://10.0.0.236/trunk@92291 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 13:41:35 +00:00
markh%activestate.com
7069e0eef2 Add DOMString tests.
Not part of the build.


git-svn-id: svn://10.0.0.236/trunk@92290 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 08:15:29 +00:00
markh%activestate.com
de520fc622 Almost complete support for DOMStrings. Also fix a crash with some Unicode objects.
Not part of the build.


git-svn-id: svn://10.0.0.236/trunk@92289 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 08:14:33 +00:00
markh%activestate.com
81b6907127 Remove a misleading comment.
Not part of the build.


git-svn-id: svn://10.0.0.236/trunk@92288 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 08:04:37 +00:00
bryner%uiuc.edu
0b08351033 Bug 61707 - Removing mac smart-scrolling warning. r=hewitt, sr=hyatt.
git-svn-id: svn://10.0.0.236/trunk@92287 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 08:03:01 +00:00
brendan%mozilla.org
c0d45daa7f Use parent, if non-null, as scope chain with which to find default proto from Class.prototype, in js_{New,Construct}Object (75975, sr=jband&jst).
git-svn-id: svn://10.0.0.236/trunk@92286 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 07:34:58 +00:00
attinasi%netscape.com
f3e7b8ac13 Fix for regression: only restrict HTML content from event pseudo application. b=75823 sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@92284 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 06:34:50 +00:00
blakeross%telocity.com
98b4e0ab02 The last two patches were by John Morrison <jrgm@netscape.com>. Sorry for forgetting to attribute them.
git-svn-id: svn://10.0.0.236/trunk@92283 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 05:30:53 +00:00
blakeross%telocity.com
f196aabfa6 Empty or otherwise messed up buttons in profile dialogs (73781, 73666). r=timeless sr=alecf
git-svn-id: svn://10.0.0.236/trunk@92282 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 05:28:49 +00:00
leaf%mozilla.org
514aab3433 Automated update
git-svn-id: svn://10.0.0.236/trunk@92278 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 03:30:07 +00:00
bryner%uiuc.edu
6cfe2ec86c Add support for building PSM from the nss autoconf branch using --enable-crypto. Remove references to obsolete MOZ_SECURITY define. r=cls.
git-svn-id: svn://10.0.0.236/trunk@92276 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 03:20:48 +00:00
cls%seawood.org
7690537f01 CConverting line-endings to fix cement bustage. Extra ^Ms are A Bad Thing(tm).
git-svn-id: svn://10.0.0.236/trunk@92275 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 02:45:59 +00:00
sspitzer%netscape.com
7df316a339 #5335 show location in search dialog
#75942 enter in a search term kicks off search
#72253 no sort by thread in the search dialog
#44341 showing the wrong columns in search dialog
#75939 bad row count problems with search
remove unused search-widgets.css

r=mscott,sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@92274 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 02:16:56 +00:00
sspitzer%netscape.com
998fdba548 #75603 rebuild picker every time
#74672 use "ignoreincolumnpicker" allow columns to not show up in picker.

needed for mailnews, since since the thread pane is used by the search dialog.

sr=hyatt


git-svn-id: svn://10.0.0.236/trunk@92272 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 02:09:36 +00:00
darin%netscape.com
afd4500f54 Patch to finalize necko loadFlags and fix HTTP validation correctness w.r.t.
cache validation preferences and browsing via history.  r=gagan,gordon.
Fixes several bugs that I would mention here if bugzilla weren't down ;-)


git-svn-id: svn://10.0.0.236/trunk@92271 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 02:02:19 +00:00
dougt%netscape.com
b592f10033 More Assertions and checks for null similar to the last checkin. r=me
git-svn-id: svn://10.0.0.236/trunk@92270 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 02:01:37 +00:00
myk%mozilla.org
d098cec94a bug 75991: removed bugzilla-specific stuff and added bugzilla-specific script since bugzilla is moving to mothra; genstats.cgi will do the bonsai stats and genstats-bz.cgi will do the bugzilla stats
git-svn-id: svn://10.0.0.236/trunk@92268 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 01:47:40 +00:00
disttsc%bart.nl
8dbf12e222 Fix senna bustage (MOZ_TRACK_MODULE_DEPS)
git-svn-id: svn://10.0.0.236/trunk@92267 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 01:42:54 +00:00
sfraser%netscape.com
d58c881de0 These changes fix PR_Poll on Mac thusly:
1. Factor out checking the fds into a new function CheckPollDescs()
2. Factor out setting/clearing the polling thread on those fds into 
SetDescPollThread()
3. Be more careful about where we set the polling thread on the fds, ensuring 
   that we turn off interrupts and hold a lock around the code that sets up the
   polling thread and checks for data on the fds. This fixes the race condition
   that causes this bug.
4. We now clear the polling thread on the fds when coming out of PR_Poll, so that
   the notifier doesn't attempt to wake the wrong thread when called when
   we're not polling.
5. Implement a 0-timeout version that behaves like select().

Bugzilla bugs 72965 and 60509. r=gordon, larryh.


git-svn-id: svn://10.0.0.236/trunk@92265 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 01:11:14 +00:00
blakeross%telocity.com
3a1db66ef3 Accelerator and command problems in mailnews (75447, 75038, 75453). r=ssu sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@92264 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 01:08:15 +00:00
despotdaemon%netscape.com
345371b92f Pseudo-automatic update of changes made by leaf@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@92263 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 00:58:52 +00:00
law%netscape.com
ba24c14426 Bug 57576; add SetIcon method to widgets and add code to nsXULWindow to set icons per window; no icons available yet, unless you roll your own; see bug for details; r=mcafee, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@92262 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 00:57:30 +00:00
sgehani%netscape.com
c42e5fd243 Don't UTF-8 encode bookmark URLs twice.
b = 54866
r = sgehani (checking in for waterson)
sr = alecf


git-svn-id: svn://10.0.0.236/trunk@92261 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 00:45:15 +00:00
jgmyers%netscape.com
a56fc05175 STARTTLS sockets shouldn't send v2 hello: bug 75617 r=javi sr=brendan
git-svn-id: svn://10.0.0.236/trunk@92260 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 00:41:50 +00:00
hyatt%netscape.com
3dc11d4de5 Fix to ensure 100ms minimum when timeout is less than 100ms for animated images. Checking in for pav. r=saari, sr=me
git-svn-id: svn://10.0.0.236/trunk@92259 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 00:40:47 +00:00
dougt%netscape.com
6e8d19ed26 Attempting to fix 74057, although not likely. See bug for details.
If you are asserting after this patch is applied, please contact dougt@netscape.com.

r=gagan@netscape.com
sr=waterson@netscape.com


git-svn-id: svn://10.0.0.236/trunk@92258 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 00:34:06 +00:00
yokoyama%netscape.com
c9e29953a6 Partial fix for 66020: /r=valeski; /sr=alecf
git-svn-id: svn://10.0.0.236/trunk@92257 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 00:31:09 +00:00
mscott%netscape.com
7881e1ad6c NOT PART OF THE BUILD
Make the mac moz-icon url code work when the file doesn't exist by leveraging the new get file extension method.


git-svn-id: svn://10.0.0.236/trunk@92256 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 00:27:09 +00:00
beard%netscape.com
f9575b97bf Remove bogus access paths. r/sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@92255 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 00:16:29 +00:00
despotdaemon%netscape.com
af34c00b91 Pseudo-automatic update of changes made by myk@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@92254 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 00:13:01 +00:00
beard%netscape.com
8b9c98753d Fix for bug #74476: pass the actual date to PRMJ_DSTOffset() rather than 0.
git-svn-id: svn://10.0.0.236/trunk@92253 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-14 00:07:53 +00:00
mscott%netscape.com
72003318ac NOT PART OF THE BUILD
Make moz-icon urls support both a nested file url and a non existent dummy file.
i.e.
moz-icon:file:///c/test.html?size=32
and
moz-icon:dummyFile.html?size=16
in the later case we use the file extension to determine the icon to fetch.


git-svn-id: svn://10.0.0.236/trunk@92252 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 23:58:24 +00:00
cls%seawood.org
182d07395e Add security to psm2 DIRS list so that BUILD_MODULES=psm2 works (how did this ever work before?)
git-svn-id: svn://10.0.0.236/trunk@92251 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 23:54:47 +00:00
dveditz%netscape.com
4615ef72e8 bug 75487 PSM2 installer issues, r=/sr=leaf
git-svn-id: svn://10.0.0.236/trunk@92250 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 23:50:22 +00:00
andreww%netscape.com
f7d2bbd939 bugzilla 53825 on behalf of MPT r = lordpixel, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@92249 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 23:39:12 +00:00
sfraser%netscape.com
e3492c2a28 Fix the build. This was EXACTLY what my nsFileStream.h changes were meant to detect. Ha!
git-svn-id: svn://10.0.0.236/trunk@92247 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 23:29:16 +00:00
waterson%netscape.com
3baf9dbae4 Convert some of nisheeth's debugging code into PR_LOG()'s so everyone can share. Implement the GetName() method for the dummy layout channel. r=nisheeth, sr=jst
git-svn-id: svn://10.0.0.236/trunk@92246 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 23:24:25 +00:00
colin%theblakes.com
6446079dd1 Use MOZ_COMPONENT_LIBS and pass via EXTRA_DSO_LDOPTS instead
of EXTRA_LIBS. r=cls b=75876.


git-svn-id: svn://10.0.0.236/trunk@92245 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 23:21:54 +00:00
dveditz%netscape.com
655c8e7d5a fix for 73520, update user agent to 0.8.1+
git-svn-id: svn://10.0.0.236/trunk@92243 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 23:11:45 +00:00
sfraser%netscape.com
9d97a8b47f Fix bug 71064; give the file stream classes private, and unimplemented copy constructors and assignment operators, prevent clients from passing them by value. r=waterson, sr=scc
git-svn-id: svn://10.0.0.236/trunk@92242 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 22:50:23 +00:00
law%netscape.com
76af2809b3 Updates to work in progress for bug 52454
git-svn-id: svn://10.0.0.236/trunk@92241 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 22:36:42 +00:00
sfraser%netscape.com
698b66c06c Fix bugs 75649 and 9131. Make moveToAlertPosition work properly, by ensuring that the dialog has some size before trying to position it. Also, only use the default position for the find dialog if you haven't persisted its position once before. r=jag, sr=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@92240 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 22:30:04 +00:00
shanjian%netscape.com
6604a1b9f4 #59405 IME candidate window position is not correct in text field on New card and To field
r = kin, sr = sfraser
change the type of coordinate return for windows and unix


git-svn-id: svn://10.0.0.236/trunk@92239 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 22:27:18 +00:00
radha%netscape.com
1a1c39cd3b Fix for bug # 41065. null ptr checks added r=valeski sr=rpotts
git-svn-id: svn://10.0.0.236/trunk@92238 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 22:26:28 +00:00
radha%netscape.com
ce87186dc2 Fix for bug # 55055 r=adamlock sr=rpotts Save CacheKey in SH
git-svn-id: svn://10.0.0.236/trunk@92237 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 22:20:33 +00:00
radha%netscape.com
1a8cd6167b Fix for bug # 55055. Save CacheKey in SH for postdata results r=adamlock sr=rpotts
git-svn-id: svn://10.0.0.236/trunk@92236 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 22:19:21 +00:00
dmose%netscape.com
e253dbb57e helper function to make code that gets nsISupports proxies more readable: NS_GetProxyForObject (bug 74792). r=brendan@mozilla.org, sr=waterson@netscape.com
git-svn-id: svn://10.0.0.236/trunk@92235 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 22:13:04 +00:00
erik%netscape.com
08d052a062 bug 75066; author=simon@softel.co.il; r=jst; sr=erik; this change addresses
a comment made during the review of 75066 (nsBidiOptions -> PRUint32)


git-svn-id: svn://10.0.0.236/trunk@92234 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 22:09:44 +00:00
sspitzer%netscape.com
ce327f26e3 fix for crasher #75831. make sure we close the dbview when we close
the stand alone message window.  sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@92233 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 22:05:10 +00:00
erik%netscape.com
8b6f590d05 bug 75066; author=simon@softel.co.il; r=jst; sr=erik; this change addresses
a comment made during review of 75066 (nsBidiOptions -> PRUint32)


git-svn-id: svn://10.0.0.236/trunk@92232 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 21:54:17 +00:00
ducarroz%netscape.com
cd0be835fe Part of bug 22486. Fix performance regression introduce yesterday with my big cleanup of message compose. R=shaver, SR=sspitzer
git-svn-id: svn://10.0.0.236/trunk@92231 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 21:53:20 +00:00
cmanske%netscape.com
322d7a4c8e Fixed selection of suggested list item, b=75747, r=kin, sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@92230 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 21:52:17 +00:00
erik%netscape.com
77bef28167 bug 75066; author=simon@softel.co.il; r=jst; sr=erik; this change addresses
a comment made during the review of 75066 (nsBidiOptions -> PRUint32)


git-svn-id: svn://10.0.0.236/trunk@92228 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 21:50:54 +00:00
cmanske%netscape.com
e7fbf6af2a Remove accelerator key from toolbar menu, b=75639, r=rcassin@supernova.org,kin; sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@92227 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 21:50:08 +00:00
erik%netscape.com
66a3aa0e18 bug 75066; author=simon@softel.co.il; r=jst; sr=erik; this change addresses
a comment made during the review for 75066 (nsBidiOptions ->PRUint32)


git-svn-id: svn://10.0.0.236/trunk@92226 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 21:46:28 +00:00
cmanske%netscape.com
688301f444 Fixed double menu checks, b=75740, r=rcassin@supernova.org, sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@92225 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 21:46:05 +00:00
morse%netscape.com
89af28ed99 bug 75748, crash when viewing a particular message, r=sspitzer, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@92224 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 21:45:34 +00:00
varada%netscape.com
5fc38cad21 fix for bug#72916;changing xul broadcasters to commands and observes to commands;r=ducarroz;sr=mscott
git-svn-id: svn://10.0.0.236/trunk@92223 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 21:44:22 +00:00
sonmi%netscape.com
7520ae4315 added parameters for linux grep
git-svn-id: svn://10.0.0.236/trunk@92222 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 21:42:18 +00:00
sonmi%netscape.com
31d94e797d added more information to the QA report
ported to linux
added special "before contesxt" and "after context" parameters to grep when
running on linux


git-svn-id: svn://10.0.0.236/trunk@92221 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 21:41:16 +00:00
sspitzer%netscape.com
0ac1240c5f rest of fix for for #75317.
temp files created when forwarding a message with attachments are not being deleted. fix by cavin@netscape.com. r=ducarroz, sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@92220 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 21:38:47 +00:00
naving%netscape.com
584c757309 68737. sr=bienvenu. rv wasn't being set correctly to default value for
linux release builds.


git-svn-id: svn://10.0.0.236/trunk@92219 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 21:37:10 +00:00
peterlubczynski%netscape.com
4f676e260a Adding pref to enabled double buffering for pages that have plugins on Mac bug=62891 a=av sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@92218 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 21:30:14 +00:00
blizzard%redhat.com
852798a51d Add XSync() before querying pointer to get any destroys done. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@92217 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 21:27:34 +00:00
sspitzer%netscape.com
6f6e1e5e2e #75948, bullet proof crasher when reading mail. sr=mscott, a=leaf
git-svn-id: svn://10.0.0.236/trunk@92216 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 20:30:10 +00:00
scc%mozilla.org
c60383becb [documentation], _never_ part of a build. Checking in as I add more FAQs
git-svn-id: svn://10.0.0.236/trunk@92215 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 18:03:33 +00:00
scc%mozilla.org
9302738ddc [documentation] a=leaf, _never_ part of a build. Checking in as I add more FAQs
git-svn-id: svn://10.0.0.236/trunk@92212 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 16:41:51 +00:00
ftang%netscape.com
e5315957fa fix IBMBIDI build bustage
git-svn-id: svn://10.0.0.236/trunk@92211 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 13:52:08 +00:00
scc%mozilla.org
5b191ef2e9 documentation only, never to be part of the build; fixing stylesheet problem
git-svn-id: svn://10.0.0.236/trunk@92210 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 13:48:50 +00:00
ftang%netscape.com
0d29952a29 fix unix bustage
git-svn-id: svn://10.0.0.236/trunk@92209 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 13:44:16 +00:00
ftang%netscape.com
ca5001df56 not part of the build.
fix the name


git-svn-id: svn://10.0.0.236/trunk@92208 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 13:34:55 +00:00
ftang%netscape.com
5980901691 not part of the build yet. add tools to generate #define so we can
remove some unnecessary class in nsUCvXXXSupport.h,cpp


git-svn-id: svn://10.0.0.236/trunk@92207 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 13:11:31 +00:00
disttsc%bart.nl
98bec09486 Fix senna bustage (MOZ_TRACK_MODULE_DEPS)
git-svn-id: svn://10.0.0.236/trunk@92206 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 13:08:44 +00:00
locka%iol.ie
9d886eedd9 NO CODE CHANGES. Reformatted to remove evil 3 space indentation
git-svn-id: svn://10.0.0.236/trunk@92205 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 13:05:16 +00:00
rods%netscape.com
74c73cc860 Fixing clipping problem with IFrames and the page timer not being stopped
and started correctly.
Bug 75740 r=dcone


git-svn-id: svn://10.0.0.236/trunk@92204 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 12:32:18 +00:00
leaf%mozilla.org
26e171fa6d Automated update
git-svn-id: svn://10.0.0.236/trunk@92203 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 12:15:06 +00:00
jdunn%netscape.com
3513e058ee don't set HAVE_CPP_2BYTE_WCHAR_T for AIX
r= cls@seawood.org
# 75544


git-svn-id: svn://10.0.0.236/trunk@92202 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 12:09:34 +00:00
ftang%netscape.com
60c410bf24 add /layout/base/src/nsBidiPresUtils.cpp into base and
/layout/html/base/src/nsBidiFrames.cpp  into html/base 
fix bug 75463. r/sr=sfraser@netscape.com


git-svn-id: svn://10.0.0.236/trunk@92201 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 11:35:37 +00:00
rods%netscape.com
2dc500a3e3 This is a temporary fix until 75739 is fixed, this keeps the brorders from being
drawn over by the InnerFrame.
Bug 75737 r=pollmann sr=attinasi


git-svn-id: svn://10.0.0.236/trunk@92200 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 11:34:31 +00:00
valeski%netscape.com
701f3dd004 r=tao, sr=alecf. cleanup of string bundle service. see bug 74512 for details.
git-svn-id: svn://10.0.0.236/trunk@92199 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 11:31:03 +00:00
ftang%netscape.com
f19af5208a add nsITextFrame.h to the export list. fix bug 75463. r/sr=sfraser@netscape.com
git-svn-id: svn://10.0.0.236/trunk@92198 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 11:24:53 +00:00
valeski%netscape.com
7ec123afdd sr=darin. no bug. just dead wood static cid cleanup
git-svn-id: svn://10.0.0.236/trunk@92197 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 11:23:11 +00:00
ftang%netscape.com
46de2a7d0a add bidi into the build flag and define IBMBID if bidi is set. fix bug 75463. r/sr=sfraser@netscape.com
git-svn-id: svn://10.0.0.236/trunk@92196 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 11:22:11 +00:00
ftang%netscape.com
25a9fd2462 add bidi into the build flag. fix bug 75463. r/sr=sfraser@netscape.com
git-svn-id: svn://10.0.0.236/trunk@92195 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 11:21:34 +00:00
peterv%netscape.com
0798dc357b Fix for 75724 (duplicate data in inline stylesheets). r=glazman, sr=attinasi.
git-svn-id: svn://10.0.0.236/trunk@92193 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 10:35:40 +00:00
pavlov%netscape.com
124ff7412b fix images not changing during skin switching bug 75181 r=brendan sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@92192 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 09:07:12 +00:00
bryner%uiuc.edu
e16c8f5dab Adding support for pulling the NSS Autoconf branch. r=cls.
git-svn-id: svn://10.0.0.236/trunk@92191 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 09:01:36 +00:00
cls%seawood.org
ce5fb04ef1 Add check for <nl_types.h> as OpenBSD 2.5 requires that you include <nl_types.h> when including <langinfo.h> but does not do it automatically
git-svn-id: svn://10.0.0.236/trunk@92190 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 08:54:52 +00:00
cls%seawood.org
8409874bcf Remove -rpath from LDFLAGS when using --with-default-mozilla-five-home as it causes problems when building mozilla on a machine with mozilla installed.
Bug #68196 r=blizzard


git-svn-id: svn://10.0.0.236/trunk@92189 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 08:47:44 +00:00
sspitzer%netscape.com
4e121862da fix for #73156. enter should work like open in the thread / search pane.
patch by the bossman (putterman@netscape.com), sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@92187 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 08:17:56 +00:00
sspitzer%netscape.com
fcd068e552 fix for #75317. temp files created when forwarding a message with attachments are not being
deleted.  fix by cavin@netscape.com.  r=ducarroz, sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@92186 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 08:13:48 +00:00
brendan%mozilla.org
cd44bd5351 Don't zap atom state on last destroy-context in a runtime if interned strings are held by atoms, and/or rooted objects reach atoms -- there may be a new-first-context in the future (72043, r=jband, sr=shaver).
git-svn-id: svn://10.0.0.236/trunk@92185 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 08:06:15 +00:00
jst%netscape.com
c65e0ac7ce Adding missing trailing '/' in the xmlns namespace uri, fixes bug 37649. Fix by sicking@bigfoot.com, r=disttsc@bart.nl, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@92184 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 07:54:21 +00:00
darin%netscape.com
7a7e91ee9e Fixes bug 43191 "frameset targets not selecting from cached frame" r=gagan, sr=waterson.
git-svn-id: svn://10.0.0.236/trunk@92183 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 07:30:27 +00:00
cls%seawood.org
abd962daa7 Add an explicit check for CODESET to fix OpenBSD bustage. r=bstell@netscape.com
git-svn-id: svn://10.0.0.236/trunk@92181 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 06:41:17 +00:00
danm%netscape.com
3226cc992f i think this'll fix speedracer, burning these past two hours
git-svn-id: svn://10.0.0.236/trunk@92180 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 06:38:33 +00:00
ducarroz%netscape.com
adcd15f789 should fix senna Linux bustage
git-svn-id: svn://10.0.0.236/trunk@92179 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 06:26:15 +00:00
darin%netscape.com
3df39b6d18 Fixes bug 74512 "file transport should support non-blocking streams" r=dougt, sr=rpotts.
git-svn-id: svn://10.0.0.236/trunk@92178 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 06:14:11 +00:00
waterson%netscape.com
698145d40d Set files as binary.
git-svn-id: svn://10.0.0.236/trunk@92177 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 05:57:40 +00:00
waterson%netscape.com
c78717106f Aj.gif
git-svn-id: svn://10.0.0.236/trunk@92176 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 05:51:25 +00:00
waterson%netscape.com
4cb348e5bc Check in as binary.
git-svn-id: svn://10.0.0.236/trunk@92175 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 05:48:52 +00:00
pavlov%netscape.com
b05eb9b92a fixing build bustage
git-svn-id: svn://10.0.0.236/trunk@92174 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 05:37:29 +00:00
pavlov%netscape.com
fe942ef423 fixing stupid bustage from my last checkin r=saari sr=waterson
git-svn-id: svn://10.0.0.236/trunk@92173 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 04:59:21 +00:00
ducarroz%netscape.com
34122e3b5a Part of bug 28348. Add pref to show progress dialog during send message. This pref will be turn to true when the progress dialog will be statble enough. R=varada, SR=sspitzer
git-svn-id: svn://10.0.0.236/trunk@92171 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 04:50:14 +00:00
ducarroz%netscape.com
d48e5949c9 Fix for bug 28348 and bug 52329. Add a progress dialog while sending or saving a message. Also stop hidding the msg compose window during send. I have also did a big cleanup of message compose backend which remove couple of leaks. R=varada, SR=sspitzer
git-svn-id: svn://10.0.0.236/trunk@92170 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 04:38:01 +00:00
anatoliya%netscape.com
2b17a7e785 bug-4596 r=jelwell, suresh sr=kin
git-svn-id: svn://10.0.0.236/trunk@92169 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 04:13:10 +00:00
mscott%netscape.com
6e595f4baa Bug #74011 --> fix xul syntax breakage. Change .value to .label so the cancel button becomes a close button.
git-svn-id: svn://10.0.0.236/trunk@92168 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 03:59:11 +00:00
disttsc%bart.nl
37a01ce7d3 Bug 47740: "Wrong wording when right-clicking on a From address", author=Keyser Sosez <ksosez@softhome.net>, r=timeless, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@92167 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 03:57:57 +00:00
pinkerton%netscape.com
b85c14bc74 make combo-box dropdown stand out more from the page. especially needed since the mac WDEF no longer draws an outline for popups. r=rods/sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@92166 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 03:53:40 +00:00
blizzard%redhat.com
ef034abbcd Fix bug #72230. Make sure to redraw the background of the window before any document is loaded in embedding. r=valeski,sr=waterson
git-svn-id: svn://10.0.0.236/trunk@92165 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 03:52:45 +00:00
disttsc%bart.nl
1ddb85ed76 Fix senna bustage (MOZ_TRACK_MODULE_DEPS)
git-svn-id: svn://10.0.0.236/trunk@92164 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 03:51:47 +00:00
mscott%netscape.com
0cbf822b14 Bug #73819 --> hook imap and news up to the new memory cache.
r/sr=sspitzer,bienvenu


git-svn-id: svn://10.0.0.236/trunk@92163 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 03:48:37 +00:00
waterson%netscape.com
510f337da2 Fix some code that is #ifdef DEBUG_waterson
git-svn-id: svn://10.0.0.236/trunk@92162 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 03:46:23 +00:00
disttsc%bart.nl
53e929c4bc Fix senna bustage (MOZ_TRACK_MODULE_DEPS)
git-svn-id: svn://10.0.0.236/trunk@92161 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 03:45:47 +00:00
anatoliya%netscape.com
9d9868147e bug-4013 r=andreww sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@92160 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 03:45:37 +00:00
disttsc%bart.nl
994be1be1e Fix senna bustage (MOZ_TRACK_MODULE_DEPS)
git-svn-id: svn://10.0.0.236/trunk@92159 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 03:30:51 +00:00
disttsc%bart.nl
8b4240cb71 Fix senna bustage (MOZ_TRACK_MODULE_DEPS)
git-svn-id: svn://10.0.0.236/trunk@92158 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 03:25:15 +00:00
waterson%netscape.com
fce779f76c Fix bustage better.
git-svn-id: svn://10.0.0.236/trunk@92157 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 03:19:29 +00:00
waterson%netscape.com
0a32ffd8fc Fix bustage.
git-svn-id: svn://10.0.0.236/trunk@92156 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 03:18:01 +00:00
sfraser%netscape.com
def0c9a2c3 Fixing imgCache files for pavlov.
git-svn-id: svn://10.0.0.236/trunk@92155 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 03:07:22 +00:00
mscott%netscape.com
9b89cbba41 Fix some assertions by making sure nsStreamListenerTee's isupports definition includes nsIRequestObserver.
sr=darin


git-svn-id: svn://10.0.0.236/trunk@92154 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 02:50:31 +00:00
pavlov%netscape.com
069a82eb4f forgot a file
git-svn-id: svn://10.0.0.236/trunk@92153 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 02:44:30 +00:00
pavlov%netscape.com
2fa16f5738 fix for at least bugs 6074,72087,74506,75190,75180,74165,69857,75576,75326,75417,75474 r=waterson, sr=brendan
git-svn-id: svn://10.0.0.236/trunk@92152 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 02:42:56 +00:00
waterson%netscape.com
eb0669ba97 Bug 75623, and part of bug 75576. Make sure we only fire OnStartRequest() once. Also, the doc loader should handle nsIRequests that aren't nsIChannel objects; this fix cleans that up. r=pavlov, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@92151 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 02:32:02 +00:00
morse%netscape.com
fef03bdf1b bug 75654, bogus cookie description when multiple cookies selected, r=evaughan, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@92150 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 02:26:19 +00:00
morse%netscape.com
5bbabf5c9a bug 75754, password manager not showing all saved passwords, r=sconest, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@92149 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 02:22:46 +00:00
cmanske%netscape.com
ff42ae0276 Added missing key accelerator for Print. Part of fix for bug 75639, r=sfraser, sr=kin
git-svn-id: svn://10.0.0.236/trunk@92148 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 02:11:07 +00:00
danm%netscape.com
37e6ff6374 fix -remote...new-window functionality broken in last revision. no bug #. r=hyatt,pinkerton
git-svn-id: svn://10.0.0.236/trunk@92147 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 02:00:48 +00:00
disttsc%bart.nl
5c86f8ec97 Fix senna bustage (MOZ_TRACK_MODULE_DEPS)
git-svn-id: svn://10.0.0.236/trunk@92146 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 02:00:19 +00:00
danm%netscape.com
9c80571fdb removing files no longer used. bug 72112 continues
git-svn-id: svn://10.0.0.236/trunk@92145 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 01:53:19 +00:00
hwaara%chello.se
c64b73648b A rather large optimization to GetNumSelected(). bug 75833, r=jag, sr=bienvenu.
git-svn-id: svn://10.0.0.236/trunk@92144 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 01:30:06 +00:00
sfraser%netscape.com
b7a2ec21c6 Fix the build by doing the correct style struct casting foo.
git-svn-id: svn://10.0.0.236/trunk@92143 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 01:09:06 +00:00
mscott%netscape.com
032cc5948d Bug #74783 --> don't read the mac file creator and type values from our hard coded table of content types. Always use the values from internet config.
r=sspitzer
sr=sfraser


git-svn-id: svn://10.0.0.236/trunk@92142 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 00:44:55 +00:00
mscott%netscape.com
61ccf241e1 Bug #74783 --> never get the mac creator and file type from our hard coded list of content types. Always get them from internet config. Mac only change.
r=sspitzer
sr=sfraser


git-svn-id: svn://10.0.0.236/trunk@92141 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 00:43:52 +00:00
dougt%netscape.com
b7dbc380ab This file is not part of build.
git-svn-id: svn://10.0.0.236/trunk@92140 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 00:43:32 +00:00
sfraser%netscape.com
f04292abdf Fix for bug 75492 -- make <button>s selectable in composer. r=rods, sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@92139 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 00:39:52 +00:00
sfraser%netscape.com
66ff3b3ff5 Fix bug 48716 -- make nsFileControlFrame's draw with a blue box when selected in composer. r=rods, sr=kin
git-svn-id: svn://10.0.0.236/trunk@92138 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 00:30:37 +00:00
sfraser%netscape.com
2df2049806 Fix for bug 75676. Make textfield.textLength work properly. r=mjudge sr=kin
git-svn-id: svn://10.0.0.236/trunk@92137 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 00:25:36 +00:00
sfraser%netscape.com
8dbd85b3b8 Fix for bug 48400; ensure that textfield.select() on an empty text field shows the caret by selecting the correct nodes. r=cmanske, sr=kin
git-svn-id: svn://10.0.0.236/trunk@92136 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 00:22:42 +00:00
sfraser%netscape.com
46ee64bdcc Fix for bug 53610. When the caret is in a <br> frame at the end of a line, use font metrics to get the height, rather than faking it. r=dbaron, sr=kin
git-svn-id: svn://10.0.0.236/trunk@92135 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 00:17:21 +00:00
mscott%netscape.com
01345b4b2d NOT PART OF THE BUILD
extract the content Type and the size from the icon url


git-svn-id: svn://10.0.0.236/trunk@92134 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-13 00:08:25 +00:00
nhotta%netscape.com
0bef4f6581 Changed to ignore encoding="UTF-16" in detectByteOrderMark(), bug 66807, r=ftang, sr=erik.
git-svn-id: svn://10.0.0.236/trunk@92133 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 23:57:18 +00:00
dougt%netscape.com
2971a81712 Fixes 73797. Moves some initialization code up higher so that it does not have
to be called so much.

r=darin@Netscape.com
sr=waterson@netscape.com


git-svn-id: svn://10.0.0.236/trunk@92132 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 23:56:28 +00:00
heikki%netscape.com
bf104f6aff Not part of build. Mac project files for P3P. p3p.mcp does not yet work.
git-svn-id: svn://10.0.0.236/trunk@92131 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 23:47:16 +00:00
erik%netscape.com
fd2c2f7c83 bug 74946; author=simon@softel.co.il; r=attinasi; sr=erik; Makefile change
for new file from IBM bidi project (e.g. Arabic, Hebrew)


git-svn-id: svn://10.0.0.236/trunk@92130 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 23:44:00 +00:00
pavlov%netscape.com
d3c26a9c3c don't reset the decoded rect back to 0 when redrawing in a frame r=saari sr=waterson
git-svn-id: svn://10.0.0.236/trunk@92129 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 23:43:24 +00:00
erik%netscape.com
ca57080def bugs 71370 and 74946; author=simon@softel.co.il; r=attinasi; sr=erik;
Makefile changes for new file from IBM bidi project (e.g. Arabic and Hebrew)


git-svn-id: svn://10.0.0.236/trunk@92128 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 23:41:43 +00:00
naving%netscape.com
bb0004fdcc 75775. sr=bienvenu. check for null pointer and assert if null. This happens when we
have download_on_biff true.


git-svn-id: svn://10.0.0.236/trunk@92127 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 23:41:01 +00:00
erik%netscape.com
d0c67078bb bugs 71370 and 74946; author=simon@softel.co.il; r=attinasi; sr=erik;
Makefile changes for the files that were added by IBM bidi project (e.g.
Arabic and Hebrew)


git-svn-id: svn://10.0.0.236/trunk@92126 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 23:39:48 +00:00
mjudge%netscape.com
cbadf98906 68396 removing unused ifdefs and includes from project for nsGfxTExtControlFrame2 sr=kin r= kin
git-svn-id: svn://10.0.0.236/trunk@92125 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 23:39:19 +00:00
bienvenu%netscape.com
6660d94a91 fix handling of new flag for filtered pop messages r=gaytrib, sr=sspitzer 55900
git-svn-id: svn://10.0.0.236/trunk@92124 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 23:39:18 +00:00
mjudge%netscape.com
92ddeb3cb6 53151 68396 sr=kin r= kin. removing some ifdefs of dead ender-lite code and fixing a mail news lockup in text traversal
git-svn-id: svn://10.0.0.236/trunk@92123 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 23:38:32 +00:00
ducarroz%netscape.com
b13d357c25 Part of fix for bug 28348. Add Progress Dialog. R=varada, SR=sspitzer
git-svn-id: svn://10.0.0.236/trunk@92122 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 23:37:28 +00:00
dougt%netscape.com
a9ea43e527 Fixes refcount cycle pointed out by Mr. David Baron.
b=75110
r=dbaron@fas.harvard.edu
sr=darin@netscape.com


git-svn-id: svn://10.0.0.236/trunk@92121 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 23:37:15 +00:00
mjudge%netscape.com
e8eca338ca kin=sr r=kin bug 75743 removing some [noscript]s from idl file to expose more idl to js
git-svn-id: svn://10.0.0.236/trunk@92120 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 23:37:08 +00:00
ducarroz%netscape.com
ab1af30daa Part of fix for bug 28348. Add Progress dialog. R=varada, SR=sspitzer
git-svn-id: svn://10.0.0.236/trunk@92119 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 23:36:23 +00:00
erik%netscape.com
a3a70da91b bug 75066; author=simon@softel.co.il; r=jst; sr=erik; diffs from IBM bidi
project (e.g. Arabic, Hebrew)


git-svn-id: svn://10.0.0.236/trunk@92118 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 23:35:24 +00:00
ducarroz%netscape.com
cd8b494be4 New files for fix for bug 52329 and bug 28348. NOT PART OF THE BUILD YET. R=varada, SR=sspitzer
git-svn-id: svn://10.0.0.236/trunk@92117 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 23:33:30 +00:00
dougt%netscape.com
6de3e3c199 Fixes 75289. If you want to listen to the ftp control traffic, here is your chance.
sr=darin


git-svn-id: svn://10.0.0.236/trunk@92116 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 23:32:47 +00:00
naving%netscape.com
cf4d8e4e3d 61171. r/sr=mscott, bienvenu. If password fails start all over again
because some servers close the connection


git-svn-id: svn://10.0.0.236/trunk@92115 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 23:31:45 +00:00
bnesse%netscape.com
0a69ca5de7 Fixes for handling default localized unichar prefs.
[Not part of the build]


git-svn-id: svn://10.0.0.236/trunk@92114 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 23:28:43 +00:00
bnesse%netscape.com
2fc81147fa Added additional comments about functionality of reset & clear.
[Not part of the build]


git-svn-id: svn://10.0.0.236/trunk@92113 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 23:27:45 +00:00
nicolson%netscape.com
482d265222 Fix bug 75490: memory bug in decodeAndImportKey causes SEGV.
git-svn-id: svn://10.0.0.236/trunk@92112 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 22:13:25 +00:00
nicolson%netscape.com
b706a3912a Fix bug 75770: RSA_NewKey returns an incomplete key. Reviewed by mcgreer
and nelsonb.


git-svn-id: svn://10.0.0.236/trunk@92111 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 20:23:42 +00:00
idk%eng.sun.com
65831f917f *not part of the buid*
fix for 67457


git-svn-id: svn://10.0.0.236/trunk@92110 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 19:56:55 +00:00
johng%corel.com
a43565bc9f Support for Double-Byte fonts
Missing mID member in nsRenderingContextQt (for debugging)


git-svn-id: svn://10.0.0.236/trunk@92109 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 19:13:24 +00:00
johng%corel.com
26be1d277c Fix for nsTimerQt::SetDelay. Bug caused animated images to speed up after page reload.
git-svn-id: svn://10.0.0.236/trunk@92108 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 19:11:10 +00:00
johng%corel.com
0a0a794fdf Fix for re-entrancy problem with menus
git-svn-id: svn://10.0.0.236/trunk@92107 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 19:10:23 +00:00
javi%netscape.com
9140c35746 This file isn't used as part of PSM 2.0 builds, so let's not
break PSM 1.0 builds just yet.


git-svn-id: svn://10.0.0.236/trunk@92105 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 18:54:02 +00:00
javi%netscape.com
8a143006f0 Switch over to building PSM 2.0 by default now.
git-svn-id: svn://10.0.0.236/trunk@92104 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 18:38:35 +00:00
javi%netscape.com
4d2c0f0ca2 Fix for Bug 74897 r=leaf
New win32 package entries for PSM 2.0


git-svn-id: svn://10.0.0.236/trunk@92103 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 17:48:33 +00:00
javi%netscape.com
f144dcb5a3 Fix for Bug 74909 r=leaf
New package entries for PSM 2.0


git-svn-id: svn://10.0.0.236/trunk@92102 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 17:46:43 +00:00
javi%netscape.com
72b32428c5 Fix for Bug 74910 r=leaf
git-svn-id: svn://10.0.0.236/trunk@92101 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 17:45:02 +00:00
chuang%netscape.com
5fde1d3e4e Bug 69480 Address Book re-factoring landing
git-svn-id: svn://10.0.0.236/trunk@92100 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 17:35:30 +00:00
chuang%netscape.com
18b66b8ffe Bug 69480 Abbress Book re-factoring landing
git-svn-id: svn://10.0.0.236/trunk@92099 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 17:31:51 +00:00
dcone%netscape.com
3f89955939 Some title fixes. sr=Attinasi. r=mcclusk bug=66943
git-svn-id: svn://10.0.0.236/trunk@92097 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 14:48:21 +00:00
oeschger%netscape.com
8699cc11b0 fix for 75708 blocker, sr=shaver, r=jag
git-svn-id: svn://10.0.0.236/trunk@92096 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 14:48:15 +00:00
cmanske%netscape.com
a2818a9526 Fixed trivial misspelling in image dialog js. b=75408, r=brade
git-svn-id: svn://10.0.0.236/trunk@92095 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 14:45:52 +00:00
bienvenu%netscape.com
daa0ce54bd add prefs for compacting folders threshhold 15865 sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@92094 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 14:35:05 +00:00
peterv%netscape.com
576a0dc3d4 Fix for 70979 (DOMHelper::getParentNode doesn't work in mozmodule). Not part of default build. Code by sicking, r=Pike, sr=shaver.
git-svn-id: svn://10.0.0.236/trunk@92093 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 14:12:11 +00:00
peterv%netscape.com
21fb022a8b Fix for bug 71367 (use Node::getBaseURI to resolve relative urls for import and include). Not part of default build. Patch by sicking, r=me, sr=shaver.
git-svn-id: svn://10.0.0.236/trunk@92092 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 14:04:52 +00:00
rods%netscape.com
a74e78a562 Implements Print FrameAsIs and other frame printing options
Bug 7201 r=dcone sr=attinasi


git-svn-id: svn://10.0.0.236/trunk@92091 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 13:04:29 +00:00
peterv%netscape.com
1968dc715c Fix for bug 75534 (transformiix doesn't compile). Code by Pike, r=me, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@92087 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 10:13:59 +00:00
jst%netscape.com
7f1013281e Checking in a workaround for scrollbar code bug 55334, this bug causes scrollbars to not show up in pages that are completely generated with document.write(). r=brendan@mozilla.org/nisheeth@netscape.com, sr=vidur@netscape.com
git-svn-id: svn://10.0.0.236/trunk@92086 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 09:50:55 +00:00
hyatt%netscape.com
3aa70f1520 Fix image loading in outliner.
git-svn-id: svn://10.0.0.236/trunk@92085 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 09:48:56 +00:00
pollmann%netscape.com
595c550fae Bug 70450: Make frame.noResize scriptable, r=nisheeth@netscape.com, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@92084 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 08:16:54 +00:00
alecf%netscape.com
b34a2e687d fix for bug 73313 - put Gecko back in the user agent
problem was that there was no entry in the content DLL's CreateInstance for the HTTP Startup listener that actually set the date. duh.
sr=ben@netscape.com


git-svn-id: svn://10.0.0.236/trunk@92083 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 07:54:26 +00:00
axel%pike.org
8c56812326 not part of default build, fix for 75309, code by sicking, r=me, sr=shaver; fixes local-name and name for some node types
git-svn-id: svn://10.0.0.236/trunk@92081 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 07:13:08 +00:00
pollmann%netscape.com
270847c7bc Bug 66399: Fix anchor target fetch to default to base target, r=nisheeth@netscape.com, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@92078 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 06:57:02 +00:00
markh%activestate.com
60551e60e7 Fix the last checkin which broke this sample. Not part of the build (hence
this error went undetected)


git-svn-id: svn://10.0.0.236/trunk@92077 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 06:38:28 +00:00
sfraser%netscape.com
73d318c611 Shiny, better Find dialog which is wider, and uses grid for better alignment. (bug 75487). r=blake, sr=ben
git-svn-id: svn://10.0.0.236/trunk@92076 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 05:47:58 +00:00
waterson%netscape.com
a5c0b138a3 Fix bad image URLs.
git-svn-id: svn://10.0.0.236/trunk@92075 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 05:46:09 +00:00
waterson%netscape.com
97f09b3352 Fix missing image.
git-svn-id: svn://10.0.0.236/trunk@92074 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 05:45:33 +00:00
waterson%netscape.com
73f21d1dad Check in as binary.
git-svn-id: svn://10.0.0.236/trunk@92073 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 05:42:06 +00:00
hewitt%netscape.com
8d1631080a 72530 - oversized dialog problems, r=jag, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@92072 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 05:42:05 +00:00
bienvenu%netscape.com
5628e28bbb make sure m_mdb gets assigned so we don't have UMR read sr=sspitzer, no bug
git-svn-id: svn://10.0.0.236/trunk@92071 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 04:47:04 +00:00
bienvenu%netscape.com
a7cb4a3db2 fix crash in nsMsgCopyMsgHdr sr=sspitzer 41933
git-svn-id: svn://10.0.0.236/trunk@92070 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 04:46:13 +00:00
bienvenu%netscape.com
8c0e66a8d8 add support for imap get new mail downloading message bodies r/sr =sspitzer,mscott 15865
git-svn-id: svn://10.0.0.236/trunk@92069 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 04:42:28 +00:00
hyatt%netscape.com
f6a510cf18 Fix bug in AdjustSelection. r=danm, sr=waterson
git-svn-id: svn://10.0.0.236/trunk@92068 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 04:40:16 +00:00
blakeross%telocity.com
91a01c8f0d Use a cached ref to the url bar instead of retrieving it for each page load and accel+L (75331). r=kerz sr=alecf
git-svn-id: svn://10.0.0.236/trunk@92067 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 04:34:43 +00:00
waldemar%netscape.com
f86d45d969 Big switchover to Algol-style semantics
git-svn-id: svn://10.0.0.236/trunk@92066 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 04:33:39 +00:00
waldemar%netscape.com
5440d6ccb7 Removed '
git-svn-id: svn://10.0.0.236/trunk@92065 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 04:32:52 +00:00
waldemar%netscape.com
106fc6223c Brought up to date
git-svn-id: svn://10.0.0.236/trunk@92064 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 04:32:17 +00:00
waldemar%netscape.com
f16520821b Switchover to Algol-style semantics
git-svn-id: svn://10.0.0.236/trunk@92063 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 04:31:46 +00:00
hyatt%netscape.com
c95ef917e9 Fix a counting error in ReplaceMatch. r=danm, sr=waterson
git-svn-id: svn://10.0.0.236/trunk@92062 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 04:31:16 +00:00
cmanske%netscape.com
f71093f7b1 Fixed conflicting accesskey, b=74984, r=akkana, sr=kin
git-svn-id: svn://10.0.0.236/trunk@92061 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 03:44:21 +00:00
cmanske%netscape.com
faba49aa9b Fixed reset selection when inserting under <head>. Also removed compile warning in nsTableEditor.cpp, b=71883, r=jfrancis,kin sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@92060 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 03:41:06 +00:00
cmanske%netscape.com
40623e7a9a Replace 'data' with 'value' according to XUL 1.0 spec. b=75400, r=akkana, sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@92059 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 03:14:37 +00:00
cmanske%netscape.com
d24c451d47 Fixed pref include bug 74900, r=akkana, sr=kin
git-svn-id: svn://10.0.0.236/trunk@92058 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 03:04:21 +00:00
eddyk%netscape.com
7b4842fbca Bug 70625: complex locked pref FE disabling
r=blake, sr=ben


git-svn-id: svn://10.0.0.236/trunk@92055 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 02:42:08 +00:00
danm%netscape.com
db751ce8fe moving implementation details mistakenly placed in public promptservice interface to the private one. r=hyatt,jack
git-svn-id: svn://10.0.0.236/trunk@92054 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 02:18:06 +00:00
yokoyama%netscape.com
c033a896fa Fix for 67576; /r=valeski; /sr=brendan@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@92053 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 02:06:02 +00:00
eddyk%netscape.com
baface0942 fix for disabled property in radio xul element to disable radiobutton children.
Bug 70033:  r=timeless, sr=ben


git-svn-id: svn://10.0.0.236/trunk@92052 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 02:01:40 +00:00
hyatt%netscape.com
7173aeb766 Fix error in empty testing in templates. r=brendan, sr=waterson
git-svn-id: svn://10.0.0.236/trunk@92051 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 01:57:50 +00:00
brendan%mozilla.org
11106ed005 Better GC-deadlock avoidance (75141, r=shaver, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@92050 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 01:52:30 +00:00
ducarroz%netscape.com
7ec335ddb0 Fix for bug 74829. Cannot pass null for an out argument. R=varada, SR=mscott
git-svn-id: svn://10.0.0.236/trunk@92049 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 01:47:08 +00:00
oeschger%netscape.com
cc404cd7f0 forgot this one from patch, r=samir, sr=alecf, b=74132
git-svn-id: svn://10.0.0.236/trunk@92048 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 01:45:55 +00:00
pollmann%netscape.com
9a421852ed Bug 73309: Fix leak of <ConstStringImpl> in non-multipart form post case, r=rpotts@netscape.com, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@92047 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 01:41:47 +00:00
dmose%netscape.com
f096b30781 Replace duplicated CID with unique one (bug 75048). Patch from Leif Hedstrom <leif@netscape.com>. r=dmose@netscape.com, sr=shaver@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@92046 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 01:40:19 +00:00
sfraser%netscape.com
a9ca071a88 Blue boxes be gone! Fixing 58121, r=jfrancis, sr=attinasi.
git-svn-id: svn://10.0.0.236/trunk@92045 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 01:26:57 +00:00
dmose%netscape.com
b02af4908d Fix getters and setters of various LDAP URL spec pieces to actually allow a spec to be built up from the individual pieces (bug 70420). Patch from Leif Hedstrom <leif@netscape.com>. r=dmose@netscape.com, sr=shaver@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@92044 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 01:25:07 +00:00
peterlubczynski%netscape.com
a5fc876b99 Fix for full-page plugin keeps playing after leaving page bug 75293 sr=attinasi a=av
git-svn-id: svn://10.0.0.236/trunk@92043 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 01:08:51 +00:00
oeschger%netscape.com
70965a8fc1 adding help build piece, bug=74132, r=samir, r=ssu (for win32), sr=alecf
git-svn-id: svn://10.0.0.236/trunk@92042 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 01:06:01 +00:00
pete%alphanumerica.com
fa0827f177 fix for bug #74381
http://bugzilla.mozilla.org/show_bug.cgi?id=74381

 r=pollmann@netscape.com, sr=jst@netscape.com

--pete


git-svn-id: svn://10.0.0.236/trunk@92041 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 01:05:42 +00:00
pollmann%netscape.com
97fc96cbf1 Bug 59408: Send full path name of file in file control to server: r=rods@netscape.com, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@92040 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 01:01:23 +00:00
dr%netscape.com
3a419e9bec fix for outliner behaving weird when all columns are hidden (bug 66719), r=pchen, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@92039 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 00:47:31 +00:00
scc%mozilla.org
cc8d69912e this file is documentation only; it will never be part of the build.
more initial content


git-svn-id: svn://10.0.0.236/trunk@92038 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 00:33:13 +00:00
mscott%netscape.com
97a31baea4 (NOT PART OF THE BUILD)
fix some build breakage for moz-icon urls caused by the necko api changes from the other day.


git-svn-id: svn://10.0.0.236/trunk@92036 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 00:19:52 +00:00
peterlubczynski%netscape.com
23354027d1 Fix for POSTing in embedded plugins bug 63050 r=peterl sr=attinasi Patch by Pollman
git-svn-id: svn://10.0.0.236/trunk@92035 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-12 00:09:08 +00:00
ftang%netscape.com
9fa0ebf8f1 fix 74941. clean up massy code in the header and cpp files
git-svn-id: svn://10.0.0.236/trunk@92034 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 23:52:46 +00:00
attinasi%netscape.com
28ecdbb41f 'Fixes' major performance problem with universal dynamic pseudo selectors by restricting their application in Standard mode to the same elements we restrict them to in QuirksMode. b=68821 r=waterson sr=shaver
git-svn-id: svn://10.0.0.236/trunk@92033 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 23:47:34 +00:00
nicolson%netscape.com
8c80816232 snprintf is called _snprintf on windows.
git-svn-id: svn://10.0.0.236/trunk@92031 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 23:46:36 +00:00
ftang%netscape.com
edf0af3066 fix 65773. r=yokoyama sr=sfraser add cid for mac converters
git-svn-id: svn://10.0.0.236/trunk@92030 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 23:43:26 +00:00
ftang%netscape.com
b37d69267c fix bug 65773. add mac convertes to the project
git-svn-id: svn://10.0.0.236/trunk@92029 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 23:41:41 +00:00
ftang%netscape.com
b1b3a736fd fix bug 65773 r=yokoyama sr=sfraser
add mac table and unix/window makefile


git-svn-id: svn://10.0.0.236/trunk@92028 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 23:39:43 +00:00
erik%netscape.com
cc2bea75ae bug 74946; author=simon@softel.co.il; r=erik; sr=attinasi; diffs from IBM
bidi project (e.g. Arabic, Hebrew)


git-svn-id: svn://10.0.0.236/trunk@92027 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 23:32:21 +00:00
nboyd%atg.com
0e9b6693e6 Updates from Igor.
git-svn-id: svn://10.0.0.236/trunk@92026 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 23:29:23 +00:00
ssu%netscape.com
8af4f0f2eb fixing bug 73895 - Bookmark this link doesn't work in message pane. r=racham sr=mscott.
git-svn-id: svn://10.0.0.236/trunk@92025 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 23:29:10 +00:00
nboyd%atg.com
3f9a974934 Need to pop activation stack.
git-svn-id: svn://10.0.0.236/trunk@92024 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 23:28:47 +00:00
sgehani%netscape.com
78c1d47fed Make the dummy talkback.xpi work fine by removing the call to addDirectory().
nsSample.js no longer gets exported to dist by default.

b = 72636
r = ssu
sr = leaf


git-svn-id: svn://10.0.0.236/trunk@92022 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 23:25:14 +00:00
stephend%netscape.com
4c29c2b985 Fix for bug 75581 - 'When attaching a webpage in mail, we prefill the field bar with 0, instead of null' r=sspitzer@netscape.com r=varada@netscape.com sr=sspitzer@netscape.com
git-svn-id: svn://10.0.0.236/trunk@92021 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 23:20:28 +00:00
blizzard%redhat.com
122d2cd390 Fix bug #73947. Clients weren't getting notifications when the first loaded content was about:blank or was streamed in data. Attach the listeners when you get a state change, not a progress change since we don't get progress changes on streamed content. r=tor,bryner sr=shaver
git-svn-id: svn://10.0.0.236/trunk@92020 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 23:18:10 +00:00
hwaara%chello.se
c0c331a13e Implementing .count in the Outliner. Now you can do |outliner.outlinerBoxObject.selection.count| to get the number of currently selected rows. This is much more convenient (and faster) than messing around with .getRangeAt() and then calculate the amount of selected rows by hand...
bug 75552

r=varga@utcru.sk, sr=hyatt@netscape.com


git-svn-id: svn://10.0.0.236/trunk@92019 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 23:15:49 +00:00
sfraser%netscape.com
d73c7a2650 Fix bug 75271; ensure that we update commands properly for batched transactions. r=akkana, sr=kin
git-svn-id: svn://10.0.0.236/trunk@92018 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 23:11:29 +00:00
av%netscape.com
862fddfec7 Fixing 74485, making shutdown procedures for plugins cleaner, r=sean@beatnik.com, sr=wateson
git-svn-id: svn://10.0.0.236/trunk@92017 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 23:08:36 +00:00
brendan%mozilla.org
24043e3212 - Don't initialize the arguments class, and do rename it to "Object" so that
arguments objects are prototyped by Object.prototype, per ECMA.  We still
  want a custom class, in order to lazily resolve active-JSStackFrame-based
  properties.
- Use a reserved slot to hold a bitmap of deleted arguments elements, so we
  don't re-resolve them after they've been deleted (which would make them seem
  to be permanent, contrary to ECMA).  This work involved sprucing up several
  fundamental types (jsbitmap) and macros (jsbitmap helper macros in jsbit.h,
  JS_HOWMANY in jstypes.h, JSVAL_INT_BITS in jsapi.h).


git-svn-id: svn://10.0.0.236/trunk@92016 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 23:07:26 +00:00
bnesse%netscape.com
c3f78dc5d0 Re-integrated the nsISecurityPref interface because it still appears to be the best solution.
[Not part of the build.]


git-svn-id: svn://10.0.0.236/trunk@92015 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 23:07:03 +00:00
alecf%netscape.com
7624870372 fix for bug 75053 - sr=smfr, r=jag - oops, forgot to implement NSGetModule
git-svn-id: svn://10.0.0.236/trunk@92014 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 23:06:04 +00:00
pinkerton%netscape.com
684c7dab18 remove special-case activation code for hidden window, let the OS do it. punts hidden window offscreen on mac so it can be visible yet of non-zero width/height for osx. bugs 70355/70388. r=danm/sr=hyatt.
git-svn-id: svn://10.0.0.236/trunk@92013 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 23:04:28 +00:00
erik%netscape.com
4b577b6b22 bug 75040; author=simon@softel.co.il; r=evaughan; sr=erik; diffs from IBM
bidi project (e.g. Arabic, Hebrew)


git-svn-id: svn://10.0.0.236/trunk@92012 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 23:04:11 +00:00
sspitzer%netscape.com
4fe1abad8c fix for #75481. get "sort by recipient" to work. fix the ui issues
that I forget about when you change the "Sender" to "Recipient".
r/sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@92011 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 23:03:04 +00:00
pinkerton%netscape.com
b7c313058d flush all our reflows before someone else can trigger them. r=saari/sr=hyatt. bug# 71219
git-svn-id: svn://10.0.0.236/trunk@92010 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 23:02:49 +00:00
erik%netscape.com
4905b0845a bug 75068; author=simon@softel.co.il; r=kmcclusk, ftang; sr=erik; patches
from IBM bidi project (e.g. Arabic, Hebrew)


git-svn-id: svn://10.0.0.236/trunk@92009 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 23:02:32 +00:00
nelsonb%netscape.com
fb67735977 Merge in NSS 3.2.1 changes. (VersionCheck function)
git-svn-id: svn://10.0.0.236/trunk@92008 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 22:52:09 +00:00
nelsonb%netscape.com
cc14b39c93 Merge in NSS 3.2.1 changes.
git-svn-id: svn://10.0.0.236/trunk@92007 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 22:49:07 +00:00
nelsonb%netscape.com
f1930d9ddd Merge in changes from NSS 3.2.1.
git-svn-id: svn://10.0.0.236/trunk@92006 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 22:47:14 +00:00
nelsonb%netscape.com
c21c67009f Merge NSS 3.2.1 changes.
git-svn-id: svn://10.0.0.236/trunk@92005 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 22:45:40 +00:00
nelsonb%netscape.com
2de15533a1 Merge in NSS 3.2.1 changes into nss.def. Update version to 3.3 Beta.
git-svn-id: svn://10.0.0.236/trunk@92004 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 22:42:28 +00:00
nelsonb%netscape.com
e4570a946c Merged in changes from NSS_3_2_BRANCH.
git-svn-id: svn://10.0.0.236/trunk@92003 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 22:28:11 +00:00
nelsonb%netscape.com
53545e9ca2 Merge change from NSS_3_2_BRANCH. Use DBM 1_55_RTM instead of 1_54.
git-svn-id: svn://10.0.0.236/trunk@92002 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 22:16:29 +00:00
ccarlen%netscape.com
2fddb543d1 Bug 75556 - auth prompt does not work when wallet lib is not available. r=danm, sr=sfraser.
git-svn-id: svn://10.0.0.236/trunk@92001 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 21:42:18 +00:00
ducarroz%netscape.com
4c01d1e65a Fix for bug 75498. Still need to translate line breaks :-( R=sfraser, SR=mscott
git-svn-id: svn://10.0.0.236/trunk@92000 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 21:17:56 +00:00
sonmi%netscape.com
5d087813cd fixed problem, now links are seperated where they should be
git-svn-id: svn://10.0.0.236/trunk@91998 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 20:48:04 +00:00
jgmyers%netscape.com
aace6da805 SSL_ForceHandshake() too heavyweight: bug 75583 r=javi
git-svn-id: svn://10.0.0.236/trunk@91997 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 20:40:35 +00:00
javi%netscape.com
4d8ad9ed82 Tell coreconf where the nspr header files are in the mozilla client
build.


git-svn-id: svn://10.0.0.236/trunk@91996 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 20:40:30 +00:00
sonmi%netscape.com
ff2e2d934c fixed win2K bugs
git-svn-id: svn://10.0.0.236/trunk@91994 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 20:19:58 +00:00
sonmi%netscape.com
ef52518a95 ported to linux, fixed Win2K missing problem - this version is broken and
needs to be replaced again


git-svn-id: svn://10.0.0.236/trunk@91993 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 20:09:53 +00:00
sonmi%netscape.com
82f14436e0 added variable RMAIL so qa_stat can use sendmail on linux
git-svn-id: svn://10.0.0.236/trunk@91991 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 20:07:04 +00:00
sonmi%netscape.com
6f324612a1 fixed rmail problem, several problems with running qa_stat on linux
took out the never working -l local option


git-svn-id: svn://10.0.0.236/trunk@91990 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 20:05:48 +00:00
nelsonb%netscape.com
70a450485b Remove unnecessary global tables of cipherSuite numbers. This solves
a problem with gcc on Linux, which overrides local/automatic definitions
with global ones.


git-svn-id: svn://10.0.0.236/trunk@91989 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 20:03:22 +00:00
sonmi%netscape.com
953ea517f8 added Win2K
git-svn-id: svn://10.0.0.236/trunk@91988 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 20:02:43 +00:00
javi%netscape.com
6439122928 Remove references to mozilla/security/psm, that directory is not
built as part of the manager build, so we shouldn't be deleting it.


git-svn-id: svn://10.0.0.236/trunk@91987 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 20:00:33 +00:00
jgmyers%netscape.com
b5b384c566 localizability fixes: bug 66706 r=javi
git-svn-id: svn://10.0.0.236/trunk@91984 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 18:28:38 +00:00
axel%pike.org
d28b852834 not part of build, code by sicking, r=peterv,me,sr=shaver, fixing 75304, and 70865, whitespace and locationstep
git-svn-id: svn://10.0.0.236/trunk@91980 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 15:01:05 +00:00
shaver%mozilla.org
c82d54c0b9 fix my braindead build bustage by _properly_ resolving that conflict (I'm a loser)
git-svn-id: svn://10.0.0.236/trunk@91979 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 15:00:25 +00:00
blizzard%redhat.com
aee13ac6e9 Part of bug #5569. Make sure that areas that get an NS_PAINT event we always paint the default color when the view manager has refreshes disabled. This should fix the problem where before pages start loading in mail/news and the browser some areas aren't repainted. r=bryner sr=roc+moz.
git-svn-id: svn://10.0.0.236/trunk@91978 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 14:52:06 +00:00
shaver%mozilla.org
8a65cf3329 75152: Remove GetVersionNumber stub in favour of upcoming, less-invasive
preloader strategy. r=jag, sr=attinasi.


git-svn-id: svn://10.0.0.236/trunk@91976 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 14:23:13 +00:00
dcone%netscape.com
b995b07979 Fixed some timer issues that crashed the Mac. r=mmclusk sr=attinasi b=74083
git-svn-id: svn://10.0.0.236/trunk@91975 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 14:06:39 +00:00
nboyd%atg.com
aba8a41815 Fixes from Igor.
git-svn-id: svn://10.0.0.236/trunk@91974 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 13:44:09 +00:00
nboyd%atg.com
c5c2679205 Fix race condition in method.
git-svn-id: svn://10.0.0.236/trunk@91973 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 13:43:07 +00:00
nboyd%atg.com
b7b145f542 Make default for generatingDebug flag be true for compilation and false for interpretation.
git-svn-id: svn://10.0.0.236/trunk@91972 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 13:42:26 +00:00
mkaply%us.ibm.com
c2c97a3aa4 #69613
r=dougt, sr=darin
OS/2 needs to follow part of a Windows codepath


git-svn-id: svn://10.0.0.236/trunk@91971 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 11:06:25 +00:00
axel%pike.org
8809bcc6b5 not part of build, fixing testcase. XPath lexes as much as possible, div4 is not matching div operator. r=peterv
git-svn-id: svn://10.0.0.236/trunk@91970 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 10:32:45 +00:00
disttsc%bart.nl
8883ecfaaf Attempt at fixing Nebiros bustage, r=peterv, tested on linux, Mac and Windows.
git-svn-id: svn://10.0.0.236/trunk@91969 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 09:32:03 +00:00
bryner%uiuc.edu
e4734d7a20 Don't use the NSS coreconf hackery if we are building with MOZ_NSS_AUTOCONF. r=cls. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@91965 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 09:12:20 +00:00
mkaply%us.ibm.com
f1663aec64 Get OS/2 building - should IS_COMPONENT be removed
git-svn-id: svn://10.0.0.236/trunk@91964 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 09:11:01 +00:00
pavlov%netscape.com
3a72f21bce removing ifdef'd DEBUG_pavlov NS_ASSERTION.
git-svn-id: svn://10.0.0.236/trunk@91963 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 09:01:29 +00:00
pavlov%netscape.com
25c0997059 fixing icons in trees not drawing. bug 74037. r=syd sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@91962 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 08:59:01 +00:00
pollmann%netscape.com
9aeae4bd3a Bug 66399: Make click on targetted server-side image map load resulting page into correct frame, r=nisheeth@netscape.com, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@91961 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 08:12:10 +00:00
pollmann%netscape.com
be1aa8ed13 Bug 59675: Initialize variables before use (fix compiler warnings), r=nisheeth@netscape.com, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@91960 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 07:56:13 +00:00
pollmann%netscape.com
16bc0059c3 Bug 59675: Initialize variables before use, r=nisheeth@netscape.com, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@91959 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 07:39:48 +00:00
pollmann%netscape.com
001d626e79 Bug 73547: Don't create child frames for an nsHTMLFrameOuterFrame, even via document.write. r=pavlov@netscape.com, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@91958 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 07:33:22 +00:00
brendan%mozilla.org
48a33f7396 Avoid deadlocking the GC on a scope claimed by another thread, but slated to be shared, i.e. ownercx is null but u.link is not (75141, r=shaver, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@91956 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 05:45:43 +00:00
maolson%earthlink.net
4a5f527816 fix bug 69433 - %foo% begone, summon %s (aka use stringbundle's getFormattedString instead of js .replace())
r=jag, racham; sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@91955 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 05:36:01 +00:00
brendan%mozilla.org
13767b85cc Fix uninitialized var botch (75239, r=rogerl, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@91954 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 05:31:22 +00:00
peterlubczynski%netscape.com
182f18bfcc Fix for crash with full-page plugins on Mac bug 74934 r=kmcclusk sr=roc+moz
git-svn-id: svn://10.0.0.236/trunk@91953 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 05:29:36 +00:00
roc+%cs.cmu.edu
e75e68ae3c Adding support for root views with externally defined widgets. Bug 73383. r=kmcclusk,sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@91952 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 05:10:15 +00:00
cmanske%netscape.com
231180e436 Fixed property dialog launch bug 75441, r=akkana, sr=kin
git-svn-id: svn://10.0.0.236/trunk@91951 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 04:42:55 +00:00
morse%netscape.com
bf72ec500c bug 75410, removed cookies not being cleared from cookieviewer, r=blake, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@91950 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 04:40:32 +00:00
stephend%netscape.com
8b202d1a4c Checking in the fix for bug 40191, 'Bad connection refused message under an IMAP server.' r=hwaara@chello.se sr=alecf@netscape.com
git-svn-id: svn://10.0.0.236/trunk@91949 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 04:39:39 +00:00
dmose%netscape.com
22713bb18c Fixing --enable-ldap-experimental build bustage introduced by Necko API changes.
git-svn-id: svn://10.0.0.236/trunk@91948 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 04:34:58 +00:00
hyatt%netscape.com
c3bb062eec Half-size scrollbar fix. Enable relative urls in addition to absolute urls. r=danm, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@91947 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 03:56:12 +00:00
hyatt%netscape.com
b942377c6a Fix for 75189. r=jag. sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@91946 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 03:55:39 +00:00
hyatt%netscape.com
3be83165db Fix for 75189. r=jag, sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@91945 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 03:55:19 +00:00
hewitt%netscape.com
214157a61c 72717 - die Blue, die!, r=dveditz, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@91944 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 03:44:03 +00:00
danm%netscape.com
028e2b2927 dveditz points out a flaw in my last checkin
git-svn-id: svn://10.0.0.236/trunk@91943 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 03:33:59 +00:00
hewitt%netscape.com
7cdb6f49a6 72717 - die Blue, die!, r=dveditz, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@91942 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 03:32:24 +00:00
hewitt%netscape.com
344f48c3e9 55368 - scrollbar disappearance, r=andreww, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@91941 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 03:26:15 +00:00
bryner%uiuc.edu
d1f3b2c693 FreeBSD now uses $(OS_TARGET).mk. Patch from markush@acc.umu.se, r=bryner.
git-svn-id: svn://10.0.0.236/trunk@91940 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 03:26:10 +00:00
timeless%mac.com
836fea05f0 fix Bugzilla Bug 73184 can't inline rename bookmarks/folders or add bookmark folders
patch by bzbarsky@mit.edu r=timeless, sr=alecf


git-svn-id: svn://10.0.0.236/trunk@91939 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 03:20:00 +00:00
bryner%uiuc.edu
9518bdab16 No longer needed.
git-svn-id: svn://10.0.0.236/trunk@91938 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 03:17:45 +00:00
bryner%uiuc.edu
8f5ca3ceb1 Use FreeBSD.mk for all FreeBSD versions. Patch from markush@acc.umu.se, r=nelsonb.
git-svn-id: svn://10.0.0.236/trunk@91937 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 03:12:42 +00:00
hyatt%netscape.com
1883278c65 Adding support for advancing and rewinding the focus using the command dispatcher. r=saari, sr=jst
git-svn-id: svn://10.0.0.236/trunk@91936 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 03:11:34 +00:00
waterson%netscape.com
03eb3d47f8 Bug 53956. Unconditionally remove dummy layout request when no reflows pending. Also, add NSPR logging code. r=nisheeth, sr=jst
git-svn-id: svn://10.0.0.236/trunk@91935 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 03:07:50 +00:00
hyatt%netscape.com
cb6f2a2121 Adding support for advancing and rewinding the focus using the command dispatcher. r=saari, sr=jst
git-svn-id: svn://10.0.0.236/trunk@91934 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 03:05:42 +00:00
waterson%netscape.com
b3ab5ab02e Bug 74728, take three. Properly handle stack-based tokens; specifically, require that only arena-allocated tokens may have attribute tokens. r=harishd, sr=jst
git-svn-id: svn://10.0.0.236/trunk@91933 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 03:05:22 +00:00
blakeross%telocity.com
f6fd365262 Implement css3 :empty selector (75186). Patch by the evil QA-turned-engineer Ian Hickson <ian@hixie.ch> who insists on using me shamelessly for my cvs account. r=pierre sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@91932 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 02:55:41 +00:00
dbaron%fas.harvard.edu
f57b84fb51 Fix leak of nsDFAState objects from nsOutlinerStyleCache (and fix a few warnings too). r=disttsc@bart.nl sr=hyatt@netscape.com b=75328
git-svn-id: svn://10.0.0.236/trunk@91928 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 02:44:26 +00:00
dbaron%fas.harvard.edu
1ad11b35be Switch variants of |nsScanner::ReadUntil| to accept new string classes for |aTermSet| and to use |FindCharInReadable| instead of |nsString::FindChar|. Remove (function-scope) |static nsString|s from nsHTMLTokens.cpp. r=harishd@netscape.com sr=vidur@netscape.com b=65431
git-svn-id: svn://10.0.0.236/trunk@91927 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 02:28:17 +00:00
alecf%netscape.com
e6e918143c fix for bug 74908 r=jag, sr=shaver
the find component shouldn't be an appshell component, so it doesn't need to be loaded at startup.


git-svn-id: svn://10.0.0.236/trunk@91926 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 02:02:06 +00:00
alecf%netscape.com
d3d814dd2d fix for bug 75053 - xfer and ucth do not need to be appshell components
convert them to regular modules, so they don't get loaded at startup
r=jag, sr=ben


git-svn-id: svn://10.0.0.236/trunk@91925 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 01:59:40 +00:00
morse%netscape.com
cd42416fb1 bug 64361, don't prompt on every form submission if no new values to save, r=sgehani, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@91924 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 01:55:59 +00:00
hewitt%netscape.com
4839aeecb7 74076 - Wrong URL for Modern preview image (from neil@parkwaycc.co.uk), r=andreww, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@91923 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 01:52:45 +00:00
danm%netscape.com
b62f123945 oh yeah. last version compiled on linux, only
git-svn-id: svn://10.0.0.236/trunk@91922 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 01:45:19 +00:00
danm%netscape.com
06f0dca043 replacing use of evil hidden window with embedding-copacetic window watcher. bug 71895 r=blizzard,hyatt,javi,various
git-svn-id: svn://10.0.0.236/trunk@91921 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 01:20:28 +00:00
hewitt%netscape.com
fdce7cd76c 72882 - msgcompose cleanup , r=blake, sr=ben
git-svn-id: svn://10.0.0.236/trunk@91920 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 00:51:15 +00:00
sdagley%netscape.com
d212a7ef52 Fix #75928. Add prvrsion.c to Mac build so libVersionPoint() available (needed for for NSS 3.2.1 landing). r=javi@netscape.com,r/a=larryh@netscape.com
Also sync'd Carbon targets in .mcp with version from NSPRPUB_CLIENT_BRANCH


git-svn-id: svn://10.0.0.236/trunk@91919 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 00:39:16 +00:00
nelsonb%netscape.com
b2661ccb4d Implementation of 5 DHE ciphersuites, client side only.
Contributed by Dr Stephen Henson <stephen.henson@gemplus.com>


git-svn-id: svn://10.0.0.236/trunk@91917 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 00:29:18 +00:00
andreww%netscape.com
234df03f68 bugzilla - 68247 r=doronr sr=sspitzer cleaning up mail search dialog some.
git-svn-id: svn://10.0.0.236/trunk@91916 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 00:21:51 +00:00
nhotta%netscape.com
841f0c90f8 Fix the backend problem of override inheritance, also changed to use nsIObserver for pref callback,
bug 74772, r=yokoyama, sr=bienvenu.


git-svn-id: svn://10.0.0.236/trunk@91914 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 00:14:08 +00:00
javi%netscape.com
c9a8285f69 Makefile clean-up.
Build against trunk of coreconf using new mechanism for adding includes.


git-svn-id: svn://10.0.0.236/trunk@91913 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 00:11:47 +00:00
danm%netscape.com
db135a7ce4 oops. forgot InterfacePointer constructor. see ds/nsSupportsPrimitives.cpp rev 3.16. bug 70534
git-svn-id: svn://10.0.0.236/trunk@91912 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-11 00:10:39 +00:00
sonmi%netscape.com
bd6b9f9efd fixed an sed command toi get process ID of tail -f on NT
git-svn-id: svn://10.0.0.236/trunk@91906 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 22:34:19 +00:00
javi%netscape.com
d04b3b024c Fix for Bug 75300
git-svn-id: svn://10.0.0.236/trunk@91905 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 22:28:52 +00:00
varga%utcru.sk
e14b93d128 backout accidental checkin
git-svn-id: svn://10.0.0.236/trunk@91903 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 21:26:00 +00:00
hwaara%chello.se
ec0771e0ca Checking in stuff I have for widgetglue.js (to know that I'm checkin into the right branch :) )
git-svn-id: svn://10.0.0.236/trunk@91900 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 21:11:43 +00:00
javi%netscape.com
98b09ba42b Fix build bustage.
git-svn-id: svn://10.0.0.236/trunk@91899 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 20:57:57 +00:00
sfraser%netscape.com
a69ae58205 Final fix for bug 75388 -- don't crash with null image in nsImageBoxFrame. sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@91897 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 20:25:12 +00:00
sonmi%netscape.com
a4a2b0eb35 fixed a stresstest failures were not recognized by this script
git-svn-id: svn://10.0.0.236/trunk@91894 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 18:39:14 +00:00
ccarlen%netscape.com
d0cf8c7fff Bugs 70379, 70380 - Hide nsISingleSignon from embedding apps, split auth prompting methods out of nsIPrompt into a new interface. r=valeski, sr=rpotts.
git-svn-id: svn://10.0.0.236/trunk@91893 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 18:30:25 +00:00
sspitzer%netscape.com
64e2e50b2b another bulletproofer, until pavlov wakes up. #75416 r=waterson.
git-svn-id: svn://10.0.0.236/trunk@91892 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 18:16:58 +00:00
sspitzer%netscape.com
215d6b12ed fix for blocker #75390. email addresses not showing up in message pane.
sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@91891 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 17:50:42 +00:00
sspitzer%netscape.com
91eceb09cb bulletproof for crasher #75407. r/sr=mcafee,waterson,shaver
git-svn-id: svn://10.0.0.236/trunk@91890 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 17:44:53 +00:00
nicolson%netscape.com
c4222feb3a Don't link with libhpi, apparently it's not necessary in jdk 1.2.
git-svn-id: svn://10.0.0.236/trunk@91889 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 17:43:00 +00:00
nicolson%netscape.com
29b424625a Be able to link against JDK 1.1 libraries.
git-svn-id: svn://10.0.0.236/trunk@91888 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 17:41:52 +00:00
nicolson%netscape.com
b26177b61f Tweaks for JSS 3.1, and get it to build.
git-svn-id: svn://10.0.0.236/trunk@91886 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 17:32:30 +00:00
nboyd%atg.com
5eac350078 Fix incorrect for..in order dependency
git-svn-id: svn://10.0.0.236/trunk@91885 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 17:16:04 +00:00
ccarlen%netscape.com
b8a305d5bb New files for bug 70380 - not yet part of build. r=valeski, sr=rpotts
git-svn-id: svn://10.0.0.236/trunk@91884 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 14:40:07 +00:00
nboyd%atg.com
09ab69d6c1 New file from Igor.
git-svn-id: svn://10.0.0.236/trunk@91883 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 14:21:24 +00:00
glazman%netscape.com
c70d8d0d40 fix for :not() due to 72302; b=71647, r=pierre, sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@91882 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 13:43:20 +00:00
nboyd%atg.com
10714a8364 Add Igor's changes to make generation of id strings by tool.
git-svn-id: svn://10.0.0.236/trunk@91881 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 13:20:02 +00:00
jfrancis%netscape.com
144d6ed231 fix for 74991: nsDocumentEncoder::SerializeRangeToString() reverses order of ancestors. r=anthonyd; sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@91880 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 12:37:23 +00:00
disttsc%bart.nl
6796b6761b Fix MOZ_TRACK_MODULE_DEPS bustage (senna)
git-svn-id: svn://10.0.0.236/trunk@91879 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 12:14:46 +00:00
pavlov%netscape.com
19a0042886 fix for crash when using xprint bug 73178 r=darin sr=shaver
git-svn-id: svn://10.0.0.236/trunk@91878 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 11:51:43 +00:00
disttsc%bart.nl
18234d85ff Fix back/forward navigation keys, bug=75232, author=Sairuh <siaruh@netscape.com>, r=jag, sr=ben
git-svn-id: svn://10.0.0.236/trunk@91877 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 11:34:47 +00:00
glazman%netscape.com
0f9b6f6318 CSS2+ identifiers should support underscores ; b=74845, r=pierre, sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@91876 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 11:09:07 +00:00
pollmann%netscape.com
64c10cf2d9 Bug 58189: Send Content-Transfer-Encoding header on file upload, patch thanks to havill@redhat.com, r=pollmann@netscape.com, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@91875 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 10:16:11 +00:00
mcafee%netscape.com
d097ddbf2f Adding Ts to legend
git-svn-id: svn://10.0.0.236/trunk@91874 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 09:49:33 +00:00
darin%netscape.com
fec1ac1830 fixes win32 startup crash. sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@91872 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 09:07:11 +00:00
darin%netscape.com
b25e09a122 fixes mac bustage
git-svn-id: svn://10.0.0.236/trunk@91868 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 08:45:44 +00:00
pavlov%netscape.com
d171543b59 more build bustage
git-svn-id: svn://10.0.0.236/trunk@91867 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 08:19:17 +00:00
pavlov%netscape.com
0e6b77651e fixing build bustage
git-svn-id: svn://10.0.0.236/trunk@91866 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 08:10:51 +00:00
bryner%uiuc.edu
1a3ae53788 Updating for necko api change.
git-svn-id: svn://10.0.0.236/trunk@91865 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 08:01:26 +00:00
pavlov%netscape.com
7291038dd0 fixing stuff
git-svn-id: svn://10.0.0.236/trunk@91864 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 07:41:23 +00:00
sspitzer%netscape.com
ce26223606 fix for #74674. bad rows when switching folders. sr=hyatt.
git-svn-id: svn://10.0.0.236/trunk@91862 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 07:26:14 +00:00
darin%netscape.com
26bb2c7e3c Fixes irc bustage.
git-svn-id: svn://10.0.0.236/trunk@91861 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 07:25:55 +00:00
sspitzer%netscape.com
fe9e1053e6 fix for #75290. clean up our temp files when doing save as draft.
fix by cavin@netscape.com.  r=ducarroz, sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@91860 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 07:23:18 +00:00
darin%netscape.com
35f9593885 Fixes xmlterm bustage
git-svn-id: svn://10.0.0.236/trunk@91859 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 07:21:22 +00:00
darin%netscape.com
a0a935092f Fixes mac bustage.
git-svn-id: svn://10.0.0.236/trunk@91858 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 07:19:24 +00:00
sspitzer%netscape.com
fd7fb9c6fa fix for #75052. get "flagged" to stick for imap. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@91857 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 07:11:32 +00:00
pavlov%netscape.com
185c0f4ec5 fixing build bustage
git-svn-id: svn://10.0.0.236/trunk@91856 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 07:10:30 +00:00
beard%netscape.com
5a1dc4be2d Synchronized with latest sources.
git-svn-id: svn://10.0.0.236/trunk@91855 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 07:09:43 +00:00
darin%netscape.com
e62c159d66 Removing erroneous NS_BREAK from nsHTTPChannel
git-svn-id: svn://10.0.0.236/trunk@91854 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 06:58:50 +00:00
darin%netscape.com
9b78254258 Removed erroneous NS_BREAK from nsSocketRequest::Cancel
git-svn-id: svn://10.0.0.236/trunk@91853 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 06:57:01 +00:00
hewitt%netscape.com
77a6d4918c 72257 - Subfolder is bolded when a msg is filtered to parent folder., r=bienvenu, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@91852 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 06:49:12 +00:00
hewitt%netscape.com
179a5d1a8c 73133 - image properties dialog problems, r=cmanske, sr=ben
git-svn-id: svn://10.0.0.236/trunk@91851 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 06:46:09 +00:00
hewitt%netscape.com
3b0add8d15 72542 - xpi dialog too wide, r=dveditz, sr=ben
git-svn-id: svn://10.0.0.236/trunk@91850 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 06:41:26 +00:00
pavlov%netscape.com
bb0e9d0f54 removing the statusArg param to OnStopRequest to fix build bustage
git-svn-id: svn://10.0.0.236/trunk@91849 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 06:40:51 +00:00
darin%netscape.com
cd4d7b3d7e Needed to fix mac bustage from necko api changes.
git-svn-id: svn://10.0.0.236/trunk@91848 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 06:21:54 +00:00
darin%netscape.com
39e4de4954 Fixes mac bustage
git-svn-id: svn://10.0.0.236/trunk@91847 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 06:19:33 +00:00
mcafee%netscape.com
7aceda4c67 Adding startup.dat
git-svn-id: svn://10.0.0.236/trunk@91846 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 06:13:08 +00:00
sspitzer%netscape.com
c6aff1ea66 #75346. fix some assertions and leaks when migrating. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@91845 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 06:08:27 +00:00
darin%netscape.com
9d03c579d0 Necko API changes, bug 74221. r=valeski, sr=rpotts.
git-svn-id: svn://10.0.0.236/trunk@91842 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 06:01:08 +00:00
darin%netscape.com
8705be106d Necko API changes, bug 74221. r=valeski, sr=rpotts
git-svn-id: svn://10.0.0.236/trunk@91841 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 05:57:29 +00:00
mcafee%netscape.com
f38af2ed47 Adding support for startup test.
git-svn-id: svn://10.0.0.236/trunk@91840 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 05:55:12 +00:00
mcafee%netscape.com
b58787ef68 process build log to create startup.dat file
git-svn-id: svn://10.0.0.236/trunk@91839 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 05:54:29 +00:00
sspitzer%netscape.com
06fc400d41 I crashed here, now I can reproduce it. add some bulletproofing and an assertion so I can catch it
next time.  no bug.  sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@91838 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 05:54:28 +00:00
darin%netscape.com
2071e29acb Necko API changes, bug 74221. r=valeski, sr=rpotts.
git-svn-id: svn://10.0.0.236/trunk@91837 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 05:43:26 +00:00
varga%utcru.sk
cbcee194ee Bug 73865.
Changes to RDF outliner, needed for folder outliner.
r=waterson sr=ben


git-svn-id: svn://10.0.0.236/trunk@91836 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 05:30:51 +00:00
sspitzer%netscape.com
82b7db5819 fix for crasher on exit. close the dbview when the mailnews xul is unloaded.
when the db goes away (on shutdown) we won't get notified, so we won't poke the
outliner, which is already gone.  sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@91835 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 05:29:39 +00:00
mcafee%netscape.com
85283d0841 minor change to test output format.
git-svn-id: svn://10.0.0.236/trunk@91834 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 05:24:28 +00:00
hyatt%netscape.com
aff62c695b Fix linux orange. r=pav, sr=ben
git-svn-id: svn://10.0.0.236/trunk@91832 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 05:06:57 +00:00
pavlov%netscape.com
203883f072 fix for bug 74503 r=jag sr=blizzard
git-svn-id: svn://10.0.0.236/trunk@91831 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 04:54:58 +00:00
mcafee%netscape.com
41e4c622fc Adding startup-test.html for tinderbox startup test. r=jag, sr=waterson
git-svn-id: svn://10.0.0.236/trunk@91830 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 04:27:40 +00:00
danm%netscape.com
4559f9129e removing unused reference to commondialogs stuff. it bothered me. bug 72112 continues
git-svn-id: svn://10.0.0.236/trunk@91829 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 04:03:16 +00:00
mcafee%netscape.com
66b2b5a80a rename startup.html to startup-test.html
git-svn-id: svn://10.0.0.236/trunk@91828 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 04:02:21 +00:00
danm%netscape.com
693cc8b25a adding nsISupportsInterfacePointer from jst's XPCDOM_20010329 branch. preliminary for bug 70534. r=hyatt,jband,jst,me
git-svn-id: svn://10.0.0.236/trunk@91827 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 03:56:48 +00:00
justdave%syndicomm.com
38b7b40049 Fix for bug 18349: query.cgi target_milestone value does not reload SELECTed item.
Patch by <jake@acutex.net>
r= justdave


git-svn-id: svn://10.0.0.236/trunk@91826 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 03:49:01 +00:00
justdave%syndicomm.com
c3a81203c0 Fix for bug 72379: query.cgi component value does not reload SELECTed item.
Patch by Myl Melez <myk@mozilla.org>
r= jake, justdave


git-svn-id: svn://10.0.0.236/trunk@91825 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 03:41:44 +00:00
mscott%netscape.com
3079423038 (NOT PART OF THE BUILD YET)
turn icon urls into moz-icon to avoid name space problems.
the format is now:
moz-icon://file://some file?size=16&contentType=text/html
The content type parameter is optional. The file need not exist.


git-svn-id: svn://10.0.0.236/trunk@91824 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 03:40:02 +00:00
mcafee%netscape.com
3590a44a7f Adding startup test.
git-svn-id: svn://10.0.0.236/trunk@91823 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 03:33:35 +00:00
hyatt%netscape.com
95932a967d Fix win32 bustage.
git-svn-id: svn://10.0.0.236/trunk@91822 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 03:29:23 +00:00
cmanske%netscape.com
8dabedc82e Fixed Composer bugs 75291 and 74039. r=mjudge, sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@91821 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 03:02:10 +00:00
disttsc%bart.nl
917c3678ea Bug 72440: ``"menulist menu > menupopup" does not use the same style as "menulist > menupopup"'', author=Boris Zbarsky <bzbarsky@mit.edu>, r=timeless, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@91819 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 02:34:45 +00:00
disttsc%bart.nl
4a90a75bdb Bug 36550: "Window unresponsive if in negative coord-space [such as in Dual Monitor setup]", author=Craig Boston <craig@aeiea.gank.org>, patch updated to tip by ajbanck@casema.net, r=bryner, sr=blizzard
git-svn-id: svn://10.0.0.236/trunk@91818 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 02:27:41 +00:00
law%netscape.com
bca7ef42a9 Bug 52454; new helper app dialog; this is under development and not built/used yet
git-svn-id: svn://10.0.0.236/trunk@91815 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 02:15:22 +00:00
hyatt%netscape.com
c28b9f19c0 Fix for 73137. r=danm, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@91814 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 02:10:02 +00:00
hyatt%netscape.com
2b396d44a0 Fix for 73137. r=danm, sr=hewitt.
git-svn-id: svn://10.0.0.236/trunk@91813 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 02:09:29 +00:00
saari%netscape.com
bce5412cec changes for creating the image container from the decoder. Needed for supporting different image container types (needed for ART support in the short term).
git-svn-id: svn://10.0.0.236/trunk@91812 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 01:51:36 +00:00
nboyd%atg.com
e2859294b4 Remove SecuritySupport code that doesn't apply to the Invoker case.
git-svn-id: svn://10.0.0.236/trunk@91811 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 01:47:50 +00:00
saari%netscape.com
6555a0a14c changes to image container creation to facilitate different container types. Needed for ART support, and cleaner GIF and JPEG support. r=pavlov, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@91810 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 01:44:20 +00:00
javi%netscape.com
e317d9addf Fix some build bustage.
git-svn-id: svn://10.0.0.236/trunk@91809 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 01:39:03 +00:00
mcafee%netscape.com
03465d4ac5 remove bogus l
git-svn-id: svn://10.0.0.236/trunk@91808 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 01:26:52 +00:00
mozilla.BenB%bucksch.org
5e0c87ad03 58377: Spaces at end of line, empty lines with spaces. Fixed both. Adjusting test to follow. All changes intended and an improvement.
git-svn-id: svn://10.0.0.236/trunk@91807 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 01:13:07 +00:00
mozilla.BenB%bucksch.org
6fe07c2988 58377: We output space(s) at the end of the line way too often. That causes messy output in format=flowed-aware readers.
Examples (fixed): end of lists, after headers, empty lines in quotes.
Reason was broken indention and broken space-stuffing.
Also made empty lines around list items more similar to NGLayout (looks better now).
Part of fix contributed by Daniel Bratell
r=akk, sr=jst


git-svn-id: svn://10.0.0.236/trunk@91806 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 01:11:39 +00:00
brendan%mozilla.org
afe0723131 Fix Function.prototype.to{Source,String} to parenthesize function objects that were expressed rather than declared (73760, r=rogerl, sr=shaver).
git-svn-id: svn://10.0.0.236/trunk@91805 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 01:10:28 +00:00
mcafee%netscape.com
ba42324717 Adding white background, so linux sees white
git-svn-id: svn://10.0.0.236/trunk@91804 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 01:10:07 +00:00
mcafee%netscape.com
b0eafbc100 shrinking who iframe a bit
git-svn-id: svn://10.0.0.236/trunk@91803 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 01:09:35 +00:00
waterson%netscape.com
957ccfdaba Bug 5569. Make sure that Terminate() can propogate DidBuildModel() to the sink, and that the sink will ensure an initial reflow has occurred. r=harishd, sr=jst
git-svn-id: svn://10.0.0.236/trunk@91801 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 00:49:49 +00:00
idk%eng.sun.com
30ef619211 * not part of the build *
adding tests for urp module
author lsv@sparc.spb.su


git-svn-id: svn://10.0.0.236/trunk@91800 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-10 00:39:05 +00:00
nboyd%atg.com
78bc7f720f Revert default of generatingDebug back to false to fix regressions.
git-svn-id: svn://10.0.0.236/trunk@91799 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 23:52:04 +00:00
endico%mozilla.org
a370aaf2e1 change to using google links instead of the defunct deja.com links
git-svn-id: svn://10.0.0.236/trunk@91798 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 23:49:51 +00:00
nboyd%atg.com
f0846ebca4 Fix NPE.
git-svn-id: svn://10.0.0.236/trunk@91797 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 23:43:19 +00:00
jband%netscape.com
81c60fc961 fix bug 70360 - adding an additional gchook event. r=shaver sr=brendan. fix bug 73761 - property cache does *bad* things if accessed during finalization. sr=brendan. checkin patch from vidur regarding off-by-on in result code iteration. sr=jband on vidur's patch
git-svn-id: svn://10.0.0.236/trunk@91795 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 23:22:07 +00:00
dbaron%fas.harvard.edu
ebf2296c18 Fix build and runtime bustage in xlib port. b=75125 r=blizzard@mozilla.org sr=shaver@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@91794 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 23:16:19 +00:00
tao%netscape.com
137438393d Clean up debug printf; no code changes.
git-svn-id: svn://10.0.0.236/trunk@91793 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 23:15:21 +00:00
attinasi%netscape.com
9c95f04cf8 Fixed some bad code that was updating list position incorrectly when going from outside to inside. b=59086, r=karnaze@netscape.com sr=waterson@netscape.com
git-svn-id: svn://10.0.0.236/trunk@91792 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 23:13:31 +00:00
tao%netscape.com
ec1b12fb8b 71910: Location field for home page in Navigator prefs panel empty
(r=mcafee,sr=alecf). Relocate urls.


git-svn-id: svn://10.0.0.236/trunk@91791 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 23:13:30 +00:00
dbaron%fas.harvard.edu
b6a5197edf Make "Runtime mismatch, so leaking context!" error message from fix for 71237 |#ifdef DEBUG|. r=disttsc@bart.nl sr=shaver@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@91790 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 23:08:37 +00:00
mcafee%netscape.com
133b833765 Adding startup timeout
git-svn-id: svn://10.0.0.236/trunk@91789 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 23:08:28 +00:00
dbaron%fas.harvard.edu
45a00c28bd Fix typo (missing commas) that caused some nested lists to have vertical margins when they shouldn't have had vertical margins. b=75132 r=disttsc@bart.nl, ian@hixie.ch sr=attinasi@netscape.com
git-svn-id: svn://10.0.0.236/trunk@91788 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 23:05:43 +00:00
javi%netscape.com
f0b29e119c initialize with the correct file name.
git-svn-id: svn://10.0.0.236/trunk@91784 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 22:52:47 +00:00
bstell%netscape.com
39ebfed7df bug 55021, r=ftang@netscape.com, sr=erik@netscape.com
add pref for print.psnative.font for langGroups


git-svn-id: svn://10.0.0.236/trunk@91783 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 22:47:45 +00:00
mcafee%netscape.com
07fd082389 Support for run_system_cmd, to introduce sync;sleep settling for performance test. Stub for startup test.
git-svn-id: svn://10.0.0.236/trunk@91782 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 22:44:49 +00:00
aaronl%chorus.net
f66b544ef0 Implemented focus appearance prefs. bug 74225, r=rods, sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@91781 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 22:17:11 +00:00
ftang%netscape.com
832448f674 not part of the build yet.
4 bytes GB18030 mapping table in special index form


git-svn-id: svn://10.0.0.236/trunk@91780 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 22:07:00 +00:00
ftang%netscape.com
c2363829be not part of the build
modify the perl script so
1. it will generate npl
2. it will generate instruction in the file
3. map correctly for the EUDC according to MS document


git-svn-id: svn://10.0.0.236/trunk@91779 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 22:04:55 +00:00
ftang%netscape.com
34773b329a not part of the build
make the table generation tool depend on the global flag


git-svn-id: svn://10.0.0.236/trunk@91778 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 22:01:11 +00:00
jgmyers%netscape.com
bcd480e286 finish replacing DecodeMimePartIIStr with DecodeMimeHeader: bug 65277 r=nhotta r=ducarroz sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@91776 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 21:21:22 +00:00
erik%netscape.com
2b1a70ea09 trivial change (just adding a comma at the end of the list for the next
person who comes along)


git-svn-id: svn://10.0.0.236/trunk@91775 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 21:11:19 +00:00
anatoliya%netscape.com
8d6f13fcea Restore the file
git-svn-id: svn://10.0.0.236/trunk@91774 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 20:52:07 +00:00
anatoliya%netscape.com
95e67b1f69 Restore the file
git-svn-id: svn://10.0.0.236/trunk@91773 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 20:41:07 +00:00
danm%netscape.com
ee20847587 fix goofed recent change from use of commondialogs to promptservice. bug 75244 r=hyatt,ianh
git-svn-id: svn://10.0.0.236/trunk@91770 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 20:38:20 +00:00
harishd%netscape.com
648dbbe680 Changes contributed by Tom Lendacky ( toml@us.ibm.com ).
*** NOT PART OF THE BUILD ***


git-svn-id: svn://10.0.0.236/trunk@91769 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 20:27:35 +00:00
ccarlen%netscape.com
d2513c7c92 Bug 75227 - Unable to confirm profile migration - therefore can't migrate. r=danm, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@91767 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 20:24:32 +00:00
nhotta%netscape.com
14b1dbb9be Changed MimeObject_output_init() to set an original mail's charset only if no override is set, bug 39736, r=ducarroz, sr=bienvenu.
git-svn-id: svn://10.0.0.236/trunk@91766 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 20:03:41 +00:00
justdave%syndicomm.com
53b0457f39 Fix for bug 71659: New bugs weren't creating email if the reported didn't give a long description, and the first person who added a comment had their comment become the long description of the bug.
Patch by <jake@acutex.net>
r= justdave


git-svn-id: svn://10.0.0.236/trunk@91764 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 19:10:43 +00:00
bryner%uiuc.edu
13a60dc90a Fixing more fallout from danm's checkin.
git-svn-id: svn://10.0.0.236/trunk@91763 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 18:30:18 +00:00
disttsc%bart.nl
32a16a831b Fix MOZ_TRACK_MODULE_DEPS bustage (senna)
git-svn-id: svn://10.0.0.236/trunk@91762 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 18:22:21 +00:00
cotter%netscape.com
3acbc38c33 Latest TOC corrections re PSM docs.
git-svn-id: svn://10.0.0.236/trunk@91761 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 18:17:51 +00:00
cotter%netscape.com
2ea3d76a42 Latest text updates.
git-svn-id: svn://10.0.0.236/trunk@91759 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 18:16:53 +00:00
cotter%netscape.com
4703746f05 Added first batch of help targets for PSM 2.0
git-svn-id: svn://10.0.0.236/trunk@91758 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 18:09:19 +00:00
javi%netscape.com
ff5f8a9f4a Get rid of a signed/unsigned comparison warning.
git-svn-id: svn://10.0.0.236/trunk@91757 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 17:44:08 +00:00
danm%netscape.com
b519f1a633 use prompt service correctly. smoketest blocker bug 75218. a=kysmith
git-svn-id: svn://10.0.0.236/trunk@91756 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 17:06:03 +00:00
disttsc%bart.nl
78c6817fd8 "Disable theme "Apply" button if no item is selected in the tree", bug=46681, author=Gervase Markham <gervase.markham@univ.ox.ac.uk>, r=jag/timeless, sr=ben
git-svn-id: svn://10.0.0.236/trunk@91755 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 14:49:25 +00:00
dcone%netscape.com
c8ee69d8be Fixed postscript title. b=66943 r=mcclusk sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@91752 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 14:27:53 +00:00
cls%seawood.org
c47bab30a3 Use nspr-config from nsprpub/config instead of $(DIST)/bin
git-svn-id: svn://10.0.0.236/trunk@91751 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 14:22:05 +00:00
karnaze%netscape.com
ebc3209fe0 bug 61663 - repeat headers and footers on more than 2 pages. sr=attinasi, r=bernd.mielke@snafu.de.
git-svn-id: svn://10.0.0.236/trunk@91750 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 14:21:24 +00:00
ccarlen%netscape.com
cecc5b9e55 Bug 64733 - Profile Mgr "Delete/Dont Delete Files" dialog not centered. r=timeless, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@91749 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 13:49:06 +00:00
peterv%netscape.com
a01e2b3c87 Mac bustage fix. Removing nsGfxListControlFrame.cpp, which isn't needed (anymore?). r=jag.
git-svn-id: svn://10.0.0.236/trunk@91748 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 13:44:43 +00:00
valeski%netscape.com
383351c7a4 sr=shaver. r=valeski. checking this in for blizz to get it out of the way. 74801. need to be GI'instead of QI
git-svn-id: svn://10.0.0.236/trunk@91747 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 13:31:50 +00:00
cls%seawood.org
f6b2b3c998 Updating copyright
git-svn-id: svn://10.0.0.236/trunk@91746 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 13:25:32 +00:00
rods%netscape.com
2328a96abb Fixed the Onchange event, so it fires at the correct time.
Bug 62753 r=pollmann sr=attinasi


git-svn-id: svn://10.0.0.236/trunk@91745 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 12:08:40 +00:00
gordon%netscape.com
6c231a906a Fix bug 73441 "New cache needs "Clear" functionality. Changed pref advanced cache panel clear buttons to clear new cache devices, and fixed bug in nsMemoryCacheDevice to avoid calling nsCRT::strlen(nsnull). sr=darin.
git-svn-id: svn://10.0.0.236/trunk@91741 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 09:52:15 +00:00
cls%seawood.org
b112ffed9c Add include path for nss. r=bryner
git-svn-id: svn://10.0.0.236/trunk@91740 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 09:52:12 +00:00
cls%seawood.org
35179a15ec Initial changes for building mozilla with nss autoconf. r=bryner
git-svn-id: svn://10.0.0.236/trunk@91739 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 09:40:16 +00:00
cls%seawood.org
7ab4b29cd7 Adding initial support for building mozilla with autoconf version of NSS. r=bryner
git-svn-id: svn://10.0.0.236/trunk@91738 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 09:38:55 +00:00
cls%seawood.org
0ea32ecec4 Followup fixes to danm's prompt changes.
r= (Tinderbox bustage | NOT PART OF THE BUILD | doing the right thing)


git-svn-id: svn://10.0.0.236/trunk@91736 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 08:51:34 +00:00
bryner%uiuc.edu
e3051d0209 Syncing with danm's nsIDialogParamBlock changes. r=cls. Not part of build.
git-svn-id: svn://10.0.0.236/trunk@91735 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 08:44:46 +00:00
gordon%netscape.com
7f9f297b86 Fix bug 75171 "implement nsCacheSession::EvictEntries", sr = darin.
git-svn-id: svn://10.0.0.236/trunk@91734 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 08:14:08 +00:00
dveditz%netscape.com
7807bb447b makefile changes to keep .h files out of bogus export directory -- r=leaf
removing obsolete files (not part of build)


git-svn-id: svn://10.0.0.236/trunk@91733 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 07:19:02 +00:00
danm%netscape.com
0518fc668b unbuilding deprecated prompt files (cleaning up my mess)
git-svn-id: svn://10.0.0.236/trunk@91732 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 04:52:46 +00:00
disttsc%bart.nl
030fc9c43e Fix back/forward button going back/forward twice and their history menus going back/forward instead of jumping to the selected item. bug=74960, r=blake, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@91731 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 04:31:00 +00:00
endico%mozilla.org
82cbdf6b8e only attempt to wrap the newsbot file if template and wrap script exist. Sometimes they don't if this script is run while the web site is being rebuilt.
git-svn-id: svn://10.0.0.236/trunk@91730 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 04:21:18 +00:00
morse%netscape.com
1aaa375599 bug 73964, unable to log in to compuserve, r=valeski, sr=darin
git-svn-id: svn://10.0.0.236/trunk@91729 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 04:16:54 +00:00
scc%mozilla.org
25223a8e62 moved the css file to someplace where lxr can't hurt it: www.mozilla.org/projects/string/string-guide.css
git-svn-id: svn://10.0.0.236/trunk@91728 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 03:21:48 +00:00
scc%mozilla.org
43768c0ead well, the css file can't live here, because lxr mangles it
git-svn-id: svn://10.0.0.236/trunk@91727 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 03:09:03 +00:00
danm%netscape.com
7bd5bccde5 removing duplicate nsIDialogParamBlock definition until the original can be removed.
git-svn-id: svn://10.0.0.236/trunk@91726 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 02:51:32 +00:00
danm%netscape.com
e023132805 oops
git-svn-id: svn://10.0.0.236/trunk@91725 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 02:25:52 +00:00
danm%netscape.com
0251b1e95c commondialog service is being replaced by promptservice. bug 72112 continues
git-svn-id: svn://10.0.0.236/trunk@91724 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 02:08:05 +00:00
hyatt%netscape.com
faee68a652 Fix for 75189. r=jag.
git-svn-id: svn://10.0.0.236/trunk@91722 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 01:40:19 +00:00
scc%mozilla.org
61c5f1a883 the start of some string documentation ... no real content yet, just an outline
git-svn-id: svn://10.0.0.236/trunk@91721 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 01:39:43 +00:00
danm%netscape.com
b49205d089 commondialog service is being replaced by promptservice. bug 72112 continues
git-svn-id: svn://10.0.0.236/trunk@91720 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 01:35:41 +00:00
danm%netscape.com
833a9075f2 more prompt stuff moved to embedding components. bug 72112 continues.
git-svn-id: svn://10.0.0.236/trunk@91719 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 00:48:21 +00:00
pavlov%netscape.com
7e0bbd83cd fixing bug 73685 r=jag sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@91718 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 00:45:06 +00:00
danm%netscape.com
6584cefd59 more prompt stuff moved to embedding components. bug 72112 continues
git-svn-id: svn://10.0.0.236/trunk@91717 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 00:43:14 +00:00
danm%netscape.com
0cd03c8ac6 make DoDialog available from idl. bug 72112 continues
git-svn-id: svn://10.0.0.236/trunk@91716 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 00:42:12 +00:00
cls%seawood.org
eaeff9ebd7 Add directories to make psm/psm-glue build standalone again
git-svn-id: svn://10.0.0.236/trunk@91715 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-09 00:37:44 +00:00
naving%netscape.com
4f3ab17fd2 74903. sr=mscott. POP:3 Display the error msg sent by the server.
git-svn-id: svn://10.0.0.236/trunk@91712 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 23:41:00 +00:00
brendan%mozilla.org
0ced3d9999 Add __lookupGetter__ and __lookupSetter__ (71992, r=rogerl, sr=shaver).
git-svn-id: svn://10.0.0.236/trunk@91710 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 23:23:34 +00:00
rbs%maths.uq.edu.au
dcba7fad19 Removed early mis-prefixing of 'a' on local variables. Switched to NS_LITERAL_STRING. Combined two 'if's and added an explanatory comment while I was there.
git-svn-id: svn://10.0.0.236/trunk@91707 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 22:32:29 +00:00
hyatt%netscape.com
65a76bc8a4 Fix regression to :-moz-bound-element caused by the :not checkin.
git-svn-id: svn://10.0.0.236/trunk@91706 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 22:22:47 +00:00
hyatt%netscape.com
bb18d9fd4c Fix for 73137. r=lumpy, sr=mozbot
git-svn-id: svn://10.0.0.236/trunk@91705 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 22:12:55 +00:00
cls%seawood.org
1052e3f592 Removing extranous use of NSPR_INCLUDE_DIR
git-svn-id: svn://10.0.0.236/trunk@91702 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 21:26:19 +00:00
dbragg%netscape.com
1bf7055a01 Turning of building of OS2 version of InstallCleanup until I can work with the OS2 experts.
git-svn-id: svn://10.0.0.236/trunk@91701 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 20:51:12 +00:00
dbragg%netscape.com
fd8099df3a Fix for OS2 bustage.
git-svn-id: svn://10.0.0.236/trunk@91700 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 20:26:53 +00:00
dbragg%netscape.com
4c4bc67fb4 Special version of cleanup routine for OS2. Most of the work done by Javier pedemont@us.ibm.com
git-svn-id: svn://10.0.0.236/trunk@91699 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 20:17:09 +00:00
dbragg%netscape.com
21eb1b95fb Turning on xpicleanup in the build again for bug 65682. It was broken on several PORTS when first checked in. Original r=dveditz and sr=mscott
git-svn-id: svn://10.0.0.236/trunk@91696 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 17:54:54 +00:00
peterv%netscape.com
a5e3743352 Fix for 74873 (Make transformiix |#include|s better). Patch by Axel Hecht. Not part of default build. r=peterv, sr=scc.
git-svn-id: svn://10.0.0.236/trunk@91695 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 14:45:17 +00:00
peterv%netscape.com
2b9039ce10 Fix for 74873 (Make transformiix |#include|s better). Patch by Axel Hecht. Not part of default build. r=peterv, sr=scc.
git-svn-id: svn://10.0.0.236/trunk@91694 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 14:40:12 +00:00
talisman%anamorphic.com
1203747bbe Now have all bundle resources being properly copied, including icons and needed libraries. jrg...
git-svn-id: svn://10.0.0.236/trunk@91693 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 09:58:35 +00:00
talisman%anamorphic.com
c8f86b223b Fixed some potentially serious thread cancellation issues. jrg
git-svn-id: svn://10.0.0.236/trunk@91692 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 09:56:53 +00:00
talisman%anamorphic.com
6b4b21ac71 Fixed use of deprecated show() and hide() methods. Replaced with correct calls to setVisible( boolean ). jrg
git-svn-id: svn://10.0.0.236/trunk@91691 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 09:55:18 +00:00
talisman%anamorphic.com
a3e566e367 Fixed some potentially serious thread cancellation issues. Also, it's not clear to me that we really need to override the addNotify() method in this case. jrg
git-svn-id: svn://10.0.0.236/trunk@91690 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 09:53:30 +00:00
talisman%anamorphic.com
87f636ebc1 Missed this on last reorg checkin. jrg
git-svn-id: svn://10.0.0.236/trunk@91689 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 09:50:54 +00:00
talisman%anamorphic.com
b7e883dc4c Turned off the DEBUG flag and other unnecessary console output. jrg
git-svn-id: svn://10.0.0.236/trunk@91688 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 09:49:46 +00:00
talisman%anamorphic.com
62b87af5f9 Call to JPasswordField.getText() is deprecated. Changed to getPassword(). jrg
git-svn-id: svn://10.0.0.236/trunk@91687 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 09:46:24 +00:00
talisman%anamorphic.com
2a790ce78c Changed call to Properties.save() to Properties.store() since save() is deprecated. jrg
git-svn-id: svn://10.0.0.236/trunk@91686 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 09:44:43 +00:00
disttsc%bart.nl
f592618075 When opening a new window, place the uri to load in the location bar. If the load is somehow interrupted, you'll now have the uri you wanted there instead of nothing. bug=70682, r=mao, sr=ben
git-svn-id: svn://10.0.0.236/trunk@91685 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 08:39:33 +00:00
disttsc%bart.nl
0c89f24d60 Clean up MODULE/REQUIRES, bug=73353, r=cls
git-svn-id: svn://10.0.0.236/trunk@91684 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 08:33:11 +00:00
justdave%syndicomm.com
362a8f742b Fix for bug 66014: Correct sanitycheck for the new initialowner and
initialqacontact fields in the components table.
Patch by Matthew Tuck <matty@chariot.net.au>
r= afranke, justdave


git-svn-id: svn://10.0.0.236/trunk@91676 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 02:33:02 +00:00
jst%netscape.com
3d0ff6c93e Adding nsIDOMNSHistory.idl, not part of the build.
git-svn-id: svn://10.0.0.236/trunk@91669 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 01:40:04 +00:00
danm%netscape.com
7c0b874fa3 removing use of nsNetSupportDialog. bug 72112 continued. r=hyatt,morse,mstoltz,various
git-svn-id: svn://10.0.0.236/trunk@91668 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 01:32:13 +00:00
mscott%netscape.com
8d370ae599 Bug #32222 --> Implement a subclass of nsMsgprotocol which performs asynch writes. Re-write how we send
post data to use this subclass. We'll now read in the post file asynchronously and write out the post
data asynchronously to the server. When necessary, we'll pause and resume the file request for the incoming
post data since that comes in faster than data goes out.

this part is to the smtp code to use async writes.
sr=bienvenu
r=ducarroz/varada


git-svn-id: svn://10.0.0.236/trunk@91667 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 00:41:37 +00:00
mscott%netscape.com
bcaa044f65 Bug #32222 --> Implement a subclass of nsMsgprotocol which performs asynch writes. Re-write how we send
post data to use this subclass. We'll now read in the post file asynchronously and write out the post
data asynchronously to the server. When necessary, we'll pause and resume the file request for the incoming
post data since that comes in faster than data goes out.
sr=bienvenu
r=ducarroz/varada


git-svn-id: svn://10.0.0.236/trunk@91666 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-08 00:40:30 +00:00
cls%seawood.org
4304fa2b2b La la la. Still redefine NSPR_CFLAGS for OS/2. nsinstall should not be using NSPR_CFLAGS in any case. Hopefully fixing tb bustage
git-svn-id: svn://10.0.0.236/trunk@91665 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 22:15:54 +00:00
mscott%netscape.com
15165102a9 Bug #32222 --> re-expose the search method on the input stream of a pipe.
r/sr=darin,bienvenu


git-svn-id: svn://10.0.0.236/trunk@91664 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 21:29:11 +00:00
dbragg%netscape.com
4c63cb8b23 Fixes for Ports bustage when original fix for 65678 was checked in. Original r=dveditz and sr=mscott
git-svn-id: svn://10.0.0.236/trunk@91663 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 19:42:15 +00:00
oeschger%netscape.com
8727aa2eed minor updates to help, NOT PART OF BUILD
git-svn-id: svn://10.0.0.236/trunk@91662 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 19:32:34 +00:00
leaf%mozilla.org
1d072d5f7a Automated update
git-svn-id: svn://10.0.0.236/trunk@91661 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 17:30:09 +00:00
dbaron%fas.harvard.edu
bc72343c5f Fix bustage on VC++ and gcc 2.7.2.x caused by incorrect overload resolution.
git-svn-id: svn://10.0.0.236/trunk@91660 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 17:25:16 +00:00
justdave%syndicomm.com
995e39a8bf Fix for bug 71808: Can't set email preferences for voters (which caused voters to get OldEmailTech notifications.
Patch by jake@acutex.net
r= justdave


git-svn-id: svn://10.0.0.236/trunk@91659 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 17:09:28 +00:00
justdave%syndicomm.com
f73644bd7c Fix for bug 71912: changes email pref for "If I'm removed from that capacity" to "If I'm added to or removed from that capacity", so you can still get mail when someone adds you to a CC. Patch by <jake@acutex.net> r= justdave
git-svn-id: svn://10.0.0.236/trunk@91658 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 16:36:45 +00:00
leaf%mozilla.org
bc0e502c83 Automated update
git-svn-id: svn://10.0.0.236/trunk@91657 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 15:30:09 +00:00
dbaron%fas.harvard.edu
583839e9ea Replace my previous incorrect fix for |operator==| ambiguities with a correct one: provide additional |operator==| and |operator!=| for comparing nsCOMPtrs to raw pointers that take a non-const raw pointer argument so that builtin operators will not have a better conversion for one argument. b=65664 r=waterson@netscape.com sr=scc@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@91656 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 15:29:39 +00:00
ben%netscape.com
11f3d62d8a another small update to test file. not part of build.
git-svn-id: svn://10.0.0.236/trunk@91652 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 12:06:42 +00:00
ben%netscape.com
5e171bcf70 update test case for outliner bookmarks. not part of build.
git-svn-id: svn://10.0.0.236/trunk@91651 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 12:04:23 +00:00
cls%seawood.org
551793b4a2 Do not redefine NSPR_LIBS & NSPR_CFLAGS for OS/2 VA builds. Should fix tb bustage
git-svn-id: svn://10.0.0.236/trunk@91650 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 11:33:52 +00:00
cls%seawood.org
a4a1699277 Lose the directory comparison and just use MOZ_NATIVE_NSPR ifdef.
git-svn-id: svn://10.0.0.236/trunk@91649 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 11:10:58 +00:00
cls%seawood.org
8846d76753 Fix check for system NSPR
git-svn-id: svn://10.0.0.236/trunk@91648 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 10:59:36 +00:00
locka%iol.ie
4451c78621 Fixed some refcounting problems. URLs for linked files are now made relative to the main document path. BASE tag is removed if present. Anchors are made absolute. Added support for BACKGROUND attribute on BODY tag. b=73690, r=rpotts@netscape.com, sr=blizzard@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@91647 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 10:23:25 +00:00
bryner%uiuc.edu
78a8a627a0 Fixing NSS to know about the new include path for NSPR. Patch from cls, r=bryner.
git-svn-id: svn://10.0.0.236/trunk@91641 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 07:22:18 +00:00
mcafee%netscape.com
46941e143e comment for jrgm test.
git-svn-id: svn://10.0.0.236/trunk@91640 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 06:49:40 +00:00
bryner%uiuc.edu
9123f760fd Adding correct include path for NSPR, since it has changed. Patch from cls, r=bryner.
git-svn-id: svn://10.0.0.236/trunk@91639 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 06:37:07 +00:00
anatoliya%netscape.com
9d2c3dc377 New smileys bug-4013 r=andreww sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@91638 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 05:49:24 +00:00
sspitzer%netscape.com
8575d9d4b0 fix for #75055. get "choose this folder" working in search again.
sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@91637 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 05:49:13 +00:00
sspitzer%netscape.com
77b0cac56f fix for #74930. Go | Next | Message crashes on an empty view.
sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@91636 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 05:44:11 +00:00
danm%netscape.com
a93bca4e42 nope. nix last checkin
git-svn-id: svn://10.0.0.236/trunk@91635 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 05:37:20 +00:00
danm%netscape.com
8dcbdb80b6 fix more expected senna bustage
git-svn-id: svn://10.0.0.236/trunk@91634 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 05:27:56 +00:00
dbaron%fas.harvard.edu
4aec05afbf Fix MOZ_TRACK_MODULE_DEPS (senna tinderbox) bustage by adding new header file dependencies to REQUIRES.
git-svn-id: svn://10.0.0.236/trunk@91633 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 05:27:06 +00:00
anatoliya%netscape.com
89e1a442d3 New smileys bug-4013 r=andreww sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@91632 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 05:27:00 +00:00
dbaron%fas.harvard.edu
cfcf537db7 Fix MOZ_TRACK_MODULE_DEPS (senna tinderbox) bustage by adding new header file dependencies to REQUIRES.
git-svn-id: svn://10.0.0.236/trunk@91631 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 05:11:47 +00:00
dbaron%fas.harvard.edu
a1e3999bcc Fix MOZ_TRACK_MODULE_DEPS (senna tinderbox) bustage by adding new header file dependencies to REQUIRES.
git-svn-id: svn://10.0.0.236/trunk@91630 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 04:56:29 +00:00
anatoliya%netscape.com
927d6216e1 New smileys bug-4013 r=andreww sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@91629 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 04:53:29 +00:00
cls%seawood.org
4a78827b54 Mozilla copy of nspr's .m4 file bug 73919
git-svn-id: svn://10.0.0.236/trunk@91628 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 04:41:30 +00:00
anatoliya%netscape.com
bd93125257 New smileys bug-4013 r=andreww sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@91627 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 04:39:35 +00:00
cls%seawood.org
5ba4a9675a Update build to use nspr.m4.
Start using nspr-config to set NSPR_CFLAGS & NSPR_LIBS.
Start placing nspr headers under $(DIST)/include/nspr to match a system installed NSPR.
Bug #73919 r=blizzard@mozilla.org


git-svn-id: svn://10.0.0.236/trunk@91626 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 04:34:55 +00:00
dbaron%fas.harvard.edu
92339aceb9 Fix MOZ_TRACK_MODULE_DEPS (senna tinderbox) bustage by adding new header file dependencies to REQUIRES.
git-svn-id: svn://10.0.0.236/trunk@91625 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 04:29:01 +00:00
sdagley%netscape.com
a17a4bf9f3 Fix Carbon tinderbox build by turning off build of xpt_link which currently can't build with Pro 6 MSL. r=beard
git-svn-id: svn://10.0.0.236/trunk@91624 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 04:11:00 +00:00
stephend%netscape.com
6275fee7d1 Adding myself to the contributer list. Comments only, no code.
git-svn-id: svn://10.0.0.236/trunk@91623 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 04:09:14 +00:00
danm%netscape.com
2982675e55 moved to windowwatcher directory
git-svn-id: svn://10.0.0.236/trunk@91622 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 03:55:47 +00:00
danm%netscape.com
4d7d5bacd9 removing use of nsNetSupportDialog. bug 72112 continued. r=hyatt,morse,mstoltz,various
git-svn-id: svn://10.0.0.236/trunk@91621 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 03:33:56 +00:00
justdave%syndicomm.com
c93f8c293e Fix for bug 71607: remove "month-day only" date format from bug list views.
Patch by Stephan Niemz <st.n@gmx.net>
r= justdave


git-svn-id: svn://10.0.0.236/trunk@91620 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 03:30:59 +00:00
danm%netscape.com
759f435fb9 moving nsIPromptService to WindowWatcher lib. adding nsIPrompt creator. bug 72112 continued. r=ccarlen,hyatt,pinkerton
git-svn-id: svn://10.0.0.236/trunk@91619 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 03:29:53 +00:00
danm%netscape.com
7fe0ef199e moving new nsIPromptService to WindowWatcher lib. adding nsIPrompt creator. bug 72112 continued. r=ccarlen,hyatt,pinkerton
git-svn-id: svn://10.0.0.236/trunk@91618 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 03:27:28 +00:00
idk%eng.sun.com
8072792caa *not part of the build*
urp. initial checkin


git-svn-id: svn://10.0.0.236/trunk@91617 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 02:42:23 +00:00
hyatt%netscape.com
8a334cec2e Fix for 75039. sr=waterson
git-svn-id: svn://10.0.0.236/trunk@91616 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 01:57:21 +00:00
despotdaemon%netscape.com
7b6db54c29 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@91613 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 00:51:55 +00:00
mjudge%netscape.com
bcca57a30b 66318 bug for api change of editor unicode not needed. nsAReadableString is what we need now.
git-svn-id: svn://10.0.0.236/trunk@91612 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 00:48:44 +00:00
mjudge%netscape.com
7d2e61b7ee as per jst review of dom part of 66318 added what was in this file a native descriptor. it is not necessary any more
git-svn-id: svn://10.0.0.236/trunk@91611 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 00:46:16 +00:00
mjudge%netscape.com
77323a8468 66318 r= kin, sr=kin tested by ducarozz ,phil chofmann approved..changing APIS to be idl so we can use in embedding land... lots of string changes too to nsAStrings
git-svn-id: svn://10.0.0.236/trunk@91610 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 00:45:26 +00:00
mjudge%netscape.com
9be4ac258a api change for editor changing null strings to empty nsStrings 66318
git-svn-id: svn://10.0.0.236/trunk@91609 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 00:44:59 +00:00
mjudge%netscape.com
c4f5dd721c sr = jst r = kin. 66318 extra dom stubs needed for editor
git-svn-id: svn://10.0.0.236/trunk@91608 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 00:44:06 +00:00
pinkerton%netscape.com
a71bc3256a landing idl changes for mjudge. bug# 66318.
git-svn-id: svn://10.0.0.236/trunk@91607 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 00:42:23 +00:00
pinkerton%netscape.com
1580ab6874 landing manifest changes for mjudge. bug# 66318.
git-svn-id: svn://10.0.0.236/trunk@91606 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-07 00:42:10 +00:00
jst%netscape.com
cf046a90b9 Adding interface file, not part of the build.
git-svn-id: svn://10.0.0.236/trunk@91603 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 23:20:01 +00:00
jst%netscape.com
b03677c8bf Removing file whose name is too long for the mac filesystem. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@91601 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 23:17:48 +00:00
hyatt%netscape.com
04ec0a4d03 Fix for smoketest blocker 74997, r=danm, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@91600 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 23:01:55 +00:00
mcafee%netscape.com
75f34f9c91 Adding support for user comments, mozconfig.
git-svn-id: svn://10.0.0.236/trunk@91599 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 22:38:16 +00:00
mcafee%netscape.com
9fc059df81 Adding support for mozconfig
git-svn-id: svn://10.0.0.236/trunk@91594 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 21:57:21 +00:00
johng%corel.com
a26d9a7dfa Fix for Qt port from Bugzilla #74743
git-svn-id: svn://10.0.0.236/trunk@91590 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 20:06:33 +00:00
idk%eng.sun.com
807b85ba15 *not part of the build*
follow up on 71948. fixed build problems on windows


git-svn-id: svn://10.0.0.236/trunk@91587 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 19:18:46 +00:00
johng%corel.com
15c2125a0f Latest source for Qt-Mozilla from Bugzilla #70511
git-svn-id: svn://10.0.0.236/trunk@91586 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 18:38:16 +00:00
justdave%syndicomm.com
b25a71e200 Fix for bug 72721 (duplicates.cgi performs poorly with lots of bugs) and bug 69054 (DB_File not portable): dependence on DB_File removed, now uses AnyDBM_File which comes standard with Perl. Duplicates.cgi now runs its queries against the shadow database if it's available, among many other improvements.
Patch by gervase.markham@univ.ox.ac.uk (Gervase Markham)
r= justdave


git-svn-id: svn://10.0.0.236/trunk@91585 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 18:19:47 +00:00
nelsonb%netscape.com
c3e808b431 Merge changes from NSS_3_2_BRANCH. Fix backward compatibility issues.
git-svn-id: svn://10.0.0.236/trunk@91584 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 17:47:15 +00:00
justdave%syndicomm.com
e123160fb0 Re-fix for bug 29820: remove "Changed" from email subject line. Based on patch submitted by Stephan Niemz [faniz] <st.n@gmx.net>, r= jake, cyeh
UPGRADE NOTES: when you install this update, you will need to change the subject line in your 'changedmail' and 'newchangedmail' params from the web by running editparams.cgi.  The subject line needs to be changed from:
Subject: [Bug %bugid%] %neworchanged% - %summary%
to
Subject: [Bug %bugid%] %neworchanged%%summary%

Or whatever is appropriate for the subject you are using on your system.  Note the removal of the " - " in the middle.


git-svn-id: svn://10.0.0.236/trunk@91583 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 17:40:49 +00:00
justdave%syndicomm.com
d7eedf0b29 Fix for bug 74394: editmilestones.cgi can't edit the name and sortkey at the same time
Patch by slee@uk.bnsmc.com (Stephen Lee)


git-svn-id: svn://10.0.0.236/trunk@91581 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 16:47:49 +00:00
despotdaemon%netscape.com
790cda1af9 Pseudo-automatic update of changes made by anatoliya@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@91580 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 16:23:59 +00:00
despotdaemon%netscape.com
28fe7d5579 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@91579 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 16:01:12 +00:00
kin%netscape.com
55e8b6a87b Fix for bug #74983: Can't start Composer or MessageCompose
Add missing NS_INIT_REFCNT macro.
r=shaver@mozilla.org,mjudge@netscape.com sr=scc@mozilla.org


git-svn-id: svn://10.0.0.236/trunk@91577 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 14:38:15 +00:00
ducarroz%netscape.com
df2d0580e9 Fix mail part of bug 74901. Don't need anymore to convert line feeds before inserting data into editor. R=jfrancis, SR=mscott
git-svn-id: svn://10.0.0.236/trunk@91575 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 14:34:34 +00:00
scc%mozilla.org
c0e631b1ea bug #74866, r=dbaron, sr=shaver. |nsPromiseFlat[C]String| needs to forward more functions when the promised string doesn't implement the buffer handle magic, i.e., in |ns[C]String| derived classes. Also change |char_type| back to the real type because jag suggests it's more readable that way.
git-svn-id: svn://10.0.0.236/trunk@91574 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 14:04:29 +00:00
tajima%eng.sun.com
a7c3c4416a bug 60714 - need to define class name for Mozilla IM status window
sr=erik/blizzard


git-svn-id: svn://10.0.0.236/trunk@91572 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 10:10:18 +00:00
cls%seawood.org
b0c2aec1c0 Removing obsolete USE_NSPR_AUTOCONF usage
git-svn-id: svn://10.0.0.236/trunk@91568 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 08:44:49 +00:00
mcafee%netscape.com
382aa9b556 Configurable timeout for layout test.
git-svn-id: svn://10.0.0.236/trunk@91564 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 08:09:33 +00:00
mcafee%netscape.com
67ecca87bb renaming layout test
git-svn-id: svn://10.0.0.236/trunk@91563 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 07:31:04 +00:00
justdave%syndicomm.com
da131af4cc Backing out Blake's misfire
git-svn-id: svn://10.0.0.236/trunk@91560 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 04:44:41 +00:00
bbaetz%cs.mcgill.ca
cb98365b9b bug 74666 - Wrong context used in nsFTPChannel::OnStopRequest
r=jag, sr=darin


git-svn-id: svn://10.0.0.236/trunk@91559 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 04:35:12 +00:00
mcafee%netscape.com
539f24adc7 15min timeout for page loader test, removing test printfs.
git-svn-id: svn://10.0.0.236/trunk@91558 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 04:32:53 +00:00
dbragg%netscape.com
12cfe2bca9 Fix for 67503. Setting File object explicitly and using JS_BeginRequest-JS_EndRequest correctly. r=sgehani, sr=brendan
git-svn-id: svn://10.0.0.236/trunk@91557 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 04:18:11 +00:00
markh%activestate.com
80e43f1501 Fix .xpt building problem. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@91556 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 04:10:19 +00:00
mcafee%netscape.com
eeb9c91502 Adding support for pageloader test.
git-svn-id: svn://10.0.0.236/trunk@91554 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 04:02:25 +00:00
morse%netscape.com
c7abd509d0 bug 74569, cookie viewer is blank on installer bits, r=dveditz, sr=shaver
git-svn-id: svn://10.0.0.236/trunk@91553 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 03:58:03 +00:00
mcafee%netscape.com
fa851f727e Adding support for pageloader test.
git-svn-id: svn://10.0.0.236/trunk@91552 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 03:56:50 +00:00
danm%netscape.com
d4874d52da adding new promptservice.xpt bug 72112 r=pinkerton,hyatt
git-svn-id: svn://10.0.0.236/trunk@91551 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 03:54:04 +00:00
sspitzer%netscape.com
ef936f8ab2 fix for #74072. since "forward as quoted" is obsolete, treat it as
"forward inline."  fix by cavin@netscape.com, sr=sspitzer@netscape.com


git-svn-id: svn://10.0.0.236/trunk@91550 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 03:53:42 +00:00
sspitzer%netscape.com
0ec582ab56 fix for #46619. show the attachment icon in the thread pane if the message
has an attachment.  until we get a "news message with attachment"
icon, use the "mail message with attachment" icon.
r/sr=mscott,bienvenu


git-svn-id: svn://10.0.0.236/trunk@91548 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 03:43:00 +00:00
mcafee%netscape.com
46dc2d6907 Adding pageloader.dat to copyfile list
git-svn-id: svn://10.0.0.236/trunk@91547 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 03:42:36 +00:00
idk%eng.sun.com
024e162a59 * not part of the build *
fix for 71948


git-svn-id: svn://10.0.0.236/trunk@91546 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 03:40:13 +00:00
mcafee%netscape.com
b90f126f1c First add
git-svn-id: svn://10.0.0.236/trunk@91545 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 03:40:08 +00:00
blizzard%redhat.com
1e3cdfd071 Fix bug #74216. Add accel keys for expand all threads and collapse all threads. sr=sspitzer, r=ben
git-svn-id: svn://10.0.0.236/trunk@91544 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 03:27:22 +00:00
sspitzer%netscape.com
92b5782c0d bullet proof to prevent crashes. #74471. r=pavlov,sr=shaver
the underlying problem still exists, and that will be covered in
another bug.  but until then, we'll assert instead of crashing


git-svn-id: svn://10.0.0.236/trunk@91543 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 03:20:44 +00:00
akkana%netscape.com
4341793ee2 Reverting block-ness testing code to the old evil hardwired list,
to see whether the static handle to the parser service was the
source of the leaks.  Discussed with sfraser and anthonyd.
If this causes problems, uncomment the USE_PARSER_FOR_BLOCKNESS
on line 433.


git-svn-id: svn://10.0.0.236/trunk@91542 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 03:18:41 +00:00
aaronl%chorus.net
0304feacbb State is now a bitfield. Makefile for viewer fixed
git-svn-id: svn://10.0.0.236/trunk@91541 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 01:42:48 +00:00
sfraser%netscape.com
d96a4cb74a Work in progress for command handling APIs. Not part of the build
git-svn-id: svn://10.0.0.236/trunk@91540 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 01:27:53 +00:00
sfraser%netscape.com
99a0ca6231 Work in progress for command updating APIs. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@91539 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 01:26:49 +00:00
akkana%netscape.com
672c4d4509 Forestall more win bustage -- missed a file
git-svn-id: svn://10.0.0.236/trunk@91537 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 01:19:23 +00:00
akkana%netscape.com
30b2fe17c8 Fix my bonehead windows bustage
git-svn-id: svn://10.0.0.236/trunk@91536 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 01:18:34 +00:00
sfraser%netscape.com
27d8b39d1b Fix for XUL assertions when loading browser windows. sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@91535 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 01:02:17 +00:00
gordon%netscape.com
91d992734a Fix bug 74832, sr=darin.
git-svn-id: svn://10.0.0.236/trunk@91534 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 00:57:36 +00:00
blakeross%telocity.com
cfb383e739 This should fix at least some of the assertions (harpoon orange)...just commenting two things out.
git-svn-id: svn://10.0.0.236/trunk@91533 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 00:51:19 +00:00
rbs%maths.uq.edu.au
c7f9a816d4 nice-to-have optimizations - low hanging fruits
git-svn-id: svn://10.0.0.236/trunk@91532 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 00:49:50 +00:00
dbaron%fas.harvard.edu
a8482342e5 Fix OS/2 tinderbox bustage (PR_CALLBACK). r=disttsc@bart.nl
git-svn-id: svn://10.0.0.236/trunk@91528 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 00:33:19 +00:00
dbaron%fas.harvard.edu
b513f5d715 Correct REQUIRES line to fix MOZ_TRACK_MODULE_DEPS (senna tinderbox) bustage.
git-svn-id: svn://10.0.0.236/trunk@91526 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 00:23:22 +00:00
relyea%netscape.com
a12fdb3141 Add Makefiles for SunOS 5.9 for sparc and intel.
git-svn-id: svn://10.0.0.236/trunk@91525 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 00:22:11 +00:00
morse%netscape.com
a57b9cb1da bug 74858, cookie permissions getting lost, r=valeski, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@91521 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 00:11:54 +00:00
rbs%maths.uq.edu.au
c5a5ee63e2 Fix incomplete definitions
git-svn-id: svn://10.0.0.236/trunk@91519 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 00:04:35 +00:00
leaf%mozilla.org
756eb4105c Automated update
git-svn-id: svn://10.0.0.236/trunk@91518 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-06 00:00:07 +00:00
heikki%netscape.com
9b72eefa4c Bug 48217, clean up context menus by using DOM Level 3 baseURI node property, also fixes Show Link in New Window when XML Base has been used. r=blakeross@telocity.com, sr=alecf.
git-svn-id: svn://10.0.0.236/trunk@91517 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 23:59:35 +00:00
sfraser%netscape.com
36b8029293 Not part of build. In-progress work on editor session
git-svn-id: svn://10.0.0.236/trunk@91516 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 23:57:22 +00:00
akkana%netscape.com
a49e17641e 66345: Factoring necessary for editor reorganization. sr=kin, r=jfrancis
git-svn-id: svn://10.0.0.236/trunk@91515 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 23:57:18 +00:00
akkana%netscape.com
5a6c5d7f55 66345: New unix/win makefiles for new editor directories,
anticipating the move of files from editor/base.
  Not built yet, needs Mac project.  r=jfrancis, sr=kin/sfraser


git-svn-id: svn://10.0.0.236/trunk@91514 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 23:51:30 +00:00
erik%netscape.com
4a52b9dc76 a name change outside the IBMBIDI ifdef caused the ifdeffed code to break;
this change fixes that; no bug number, r, sr


git-svn-id: svn://10.0.0.236/trunk@91513 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 23:50:10 +00:00
akkana%netscape.com
a9c46eb554 66345: factoring for editor reorganization. sr=kin/sfraser, r=jfrancis.
git-svn-id: svn://10.0.0.236/trunk@91512 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 23:48:38 +00:00
akkana%netscape.com
02dbe54c0d 66345: Factoring necessary for editor reorganization. sr=kin/sfraser, r=jfrancis
git-svn-id: svn://10.0.0.236/trunk@91511 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 23:48:01 +00:00
sgehani%netscape.com
021d1cf3d4 Make installer not hang at Install.execute() in jre.xpi by forcing
libpthread to link before libc.  This fix alleviates the problem
caused by the explicit linking of libc created by revision 1.697 to
mozilla/configure.

b = 73802
r = dbragg@netscape.com
sr = cls@seawood.org


git-svn-id: svn://10.0.0.236/trunk@91510 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 23:43:58 +00:00
akkana%netscape.com
a8f704e11a New files necessary for phase 1 of editor reorganization checkin.
r=jfrancis, sr=kin,sfraser


git-svn-id: svn://10.0.0.236/trunk@91509 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 23:34:08 +00:00
valeski%netscape.com
79cd6bff52 removing dead files. 74801.
git-svn-id: svn://10.0.0.236/trunk@91508 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 23:26:17 +00:00
valeski%netscape.com
c0b9a84730 removing nsWBContentListener.cpp from the mac build. 74801.
git-svn-id: svn://10.0.0.236/trunk@91507 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 23:25:11 +00:00
tor%cs.brown.edu
7dc4b561d5 Give better origins for gdk_pixbuf_render_to_drawable to eliminate the
gdkpixbuf critical errors. r=pavlov, sr=blizzard


git-svn-id: svn://10.0.0.236/trunk@91506 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 23:21:43 +00:00
valeski%netscape.com
985661c739 r=ccarlen, sr=blizzard. 74801. removing dead nsIURIContentListener layer in the webBrowser. we now pass directly down into the docshell
git-svn-id: svn://10.0.0.236/trunk@91505 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 23:20:49 +00:00
attinasi%netscape.com
60ddc452d3 Fixed performance problem caused by unused nsAutoString in SelectorMatches.
Patch by bratell@lysator.liu.se, r=glazman@netscape.com sr=attinasi@netscape.com b=74830


git-svn-id: svn://10.0.0.236/trunk@91504 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 23:14:00 +00:00
danm%netscape.com
478efe7481 new embedding promptservice component. bug 72112 r=hyatt,pinkerton
git-svn-id: svn://10.0.0.236/trunk@91503 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 23:09:35 +00:00
bnesse%netscape.com
837b67f9ec Trimmed comments to < 80 characters as per request.
[Not part of the build]


git-svn-id: svn://10.0.0.236/trunk@91502 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 23:08:05 +00:00
jgmyers%netscape.com
b12b1b0fd8 fix more mime header decoder callers, cleanup string fu: bug 65277 r=ducarroz r=nhotta sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@91501 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 23:00:38 +00:00
jgmyers%netscape.com
73dfc6a97b fix too-short buffer allocation: bug 74453 r=nhotta r=ducarroz sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@91500 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 22:59:06 +00:00
ddrinan%netscape.com
6024545487 Fixed some xul elements that should have been label instead of value
git-svn-id: svn://10.0.0.236/trunk@91498 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 22:48:52 +00:00
gordon%netscape.com
8c8a8786b5 Fix smoketest blocker bug 74766. DISKCACHE2_BRANCH touchdown. r=beard, sr=darin.
git-svn-id: svn://10.0.0.236/trunk@91495 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 22:28:17 +00:00
despotdaemon%netscape.com
d74aece5af Pseudo-automatic update of changes made by justdave@syndicomm.com.
git-svn-id: svn://10.0.0.236/trunk@91494 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 22:24:31 +00:00
oeschger%netscape.com
f342b8f06c more minor adjustments to help chrome, NOT PART OF BUILD
git-svn-id: svn://10.0.0.236/trunk@91493 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 22:23:28 +00:00
shaver%mozilla.org
3e409e4871 74848: make LiveConnect objects NATIVE, to avoid startup crash, r=smfr/sr=brendan
git-svn-id: svn://10.0.0.236/trunk@91492 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 22:20:47 +00:00
despotdaemon%netscape.com
afaa654899 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@91490 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 22:16:17 +00:00
blakeross%telocity.com
25b490efd6 when the heck did I add these stupid alerts?
git-svn-id: svn://10.0.0.236/trunk@91489 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 22:15:32 +00:00
despotdaemon%netscape.com
f9d5aa3dcb Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@91486 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 22:02:12 +00:00
blakeross%telocity.com
a0b95ae8fe another stupid alert.
git-svn-id: svn://10.0.0.236/trunk@91481 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 20:57:09 +00:00
leaf%mozilla.org
ab29a050eb backing out inadvertent checkin
git-svn-id: svn://10.0.0.236/trunk@91477 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 20:30:01 +00:00
leaf%mozilla.org
c33d3f21d1 backing out blake's inadvertent commit.
git-svn-id: svn://10.0.0.236/trunk@91476 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 20:25:37 +00:00
blakeross%telocity.com
28d5d47f2f removing alert that snuck in.
git-svn-id: svn://10.0.0.236/trunk@91474 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 19:54:08 +00:00
blakeross%telocity.com
694fbc6383 Use more efficient command structure, refactor commands, broadcasters and keys, remove unused attributes, do some other optimization (72923). Landing navigator part only; this should help new window opening and some other areas. r=ben sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@91473 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 19:53:13 +00:00
despotdaemon%netscape.com
5f9f930135 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@91472 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 18:09:18 +00:00
valeski%netscape.com
ff8619beb3 backing out changes to fix 74728 as they are causing assertion death spirals in todays builds.
git-svn-id: svn://10.0.0.236/trunk@91471 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 17:53:18 +00:00
kestes%tradinglinx.com
498ed06aa1 auto generate the version number based on the output of the date command
git-svn-id: svn://10.0.0.236/trunk@91470 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 17:48:23 +00:00
despotdaemon%netscape.com
611d8e3904 Pseudo-automatic update of changes made by bbaetz@cs.mcgill.ca.
git-svn-id: svn://10.0.0.236/trunk@91469 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 17:39:00 +00:00
markh%activestate.com
f51ae01d80 Slightly updated docs for the windows build process.
Not part of the build.


git-svn-id: svn://10.0.0.236/trunk@91452 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 12:36:38 +00:00
markh%activestate.com
9c99057f83 Move PyXPCOM to the Mozilla build system on Windows.
Linux still uses ".stupid" makefile.

Not part of the build.


git-svn-id: svn://10.0.0.236/trunk@91451 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 12:35:33 +00:00
disttsc%bart.nl
f8efc417a1 Add AString to nsrootidl.idl for bug 70681, r=markh, sr=jst
git-svn-id: svn://10.0.0.236/trunk@91450 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 12:25:09 +00:00
jdunn%netscape.com
fa68327632 adding changes to make xmlterm build on hpux11
r= svn@xmlterm.org
# 54160


git-svn-id: svn://10.0.0.236/trunk@91446 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 11:03:15 +00:00
mkaply%us.ibm.com
daf5e8dec2 No bug
r=mkaply, a=blizzard
Timing trap related to destroying windows and nice fix for height of fonts


git-svn-id: svn://10.0.0.236/trunk@91444 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 10:11:41 +00:00
cls%seawood.org
12ae2dca53 Add dep tracking for local compile rule
git-svn-id: svn://10.0.0.236/trunk@91443 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 10:06:37 +00:00
jband%netscape.com
08b9517502 fix for bug 74661. On platforms without longlong support we were reporting a possible non-error as an error. r=pinkerton sr=shaver
git-svn-id: svn://10.0.0.236/trunk@91440 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 08:38:14 +00:00
sspitzer%netscape.com
2ac2990e96 rest of fix for #74808. the icon in the subject column should
only have the green arrow if the message is new, not if the message is
unread.  sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@91439 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 08:13:37 +00:00
sspitzer%netscape.com
e7d0f2afa0 #72456. re-implement "mark all read". sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@91438 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 07:20:30 +00:00
morse%netscape.com
d6580270ad fix linux bustage
git-svn-id: svn://10.0.0.236/trunk@91437 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 07:18:10 +00:00
sspitzer%netscape.com
6e3cec28fc fix for #74808. when setting a "new" message as "read", it should
properly update in the message pane.  sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@91436 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 07:13:16 +00:00
morse%netscape.com
c1b4abfdf5 bug 70382, redo password manager idl for embedding requirements, r=ccarlen, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@91434 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 06:29:48 +00:00
gordon%netscape.com
39b8c65694 Fix bug 74809 "Rearrange cache enable prefs in debug pref panel". r=mcafee.
git-svn-id: svn://10.0.0.236/trunk@91433 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 06:23:19 +00:00
pchen%netscape.com
55a545fc52 mac buddy for bug 70382, add nsIPassword.idl and nsIPasswordManager.idl to mac IDL project
git-svn-id: svn://10.0.0.236/trunk@91432 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 06:23:15 +00:00
pchen%netscape.com
b8eba56147 mac buddy for bug 70382, add nsPassword.cpp and nsPasswordManager.cpp to mac project
git-svn-id: svn://10.0.0.236/trunk@91431 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 06:23:06 +00:00
mcafee%netscape.com
10d5e8e5f6 Run command instead of just binary command. add jrgm url
git-svn-id: svn://10.0.0.236/trunk@91430 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-05 06:12:12 +00:00
703 changed files with 170036 additions and 9765 deletions

27
mozilla/content/build/gbdate.pl Executable file
View File

@@ -0,0 +1,27 @@
#
# 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):
#
# XP way of doing the build date.
# 1998091509 = 1998, September, 15th, 9am local time zone
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
# localtime returns year minus 1900
$year = $year + 1900;
printf("#define PRODUCT_VERSION \"%04d%02d%02d\"\n", $year, 1+$mon, $mday);

View File

@@ -0,0 +1,90 @@
/* -*- 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.
*
* 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):
* Alec Flett <alecf@netscape.com>
*/
#include "nsIServiceManager.h"
#include "nsICategoryManager.h"
#include "nsCOMPtr.h"
#include "nsString.h"
#include "nsXPIDLString.h"
#include "nsContentHTTPStartup.h"
#include "nsIHttpProtocolHandler.h"
#include "gbdate.h"
#define PRODUCT_NAME "Gecko"
NS_IMPL_ISUPPORTS1(nsContentHTTPStartup,nsIObserver)
nsresult
nsContentHTTPStartup::Observe( nsISupports *aSubject,
const PRUnichar *aTopic,
const PRUnichar *aData)
{
if (nsCRT::strcmp(aTopic, NS_HTTP_STARTUP_TOPIC) != 0)
return NS_OK;
nsresult rv = nsnull;
nsCOMPtr<nsIHttpProtocolHandler> http(do_QueryInterface(aSubject));
if (NS_FAILED(rv)) return rv;
rv = http->SetProduct(PRODUCT_NAME);
if (NS_FAILED(rv)) return rv;
rv = http->SetProductSub((char*) PRODUCT_VERSION);
if (NS_FAILED(rv)) return rv;
return NS_OK;
}
nsresult
nsContentHTTPStartup::RegisterHTTPStartup()
{
nsresult rv;
nsCOMPtr<nsICategoryManager>
catMan(do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv));
if (NS_FAILED(rv)) return rv;
nsXPIDLCString previousEntry;
rv = catMan->AddCategoryEntry(NS_HTTP_STARTUP_CATEGORY,
"Content UserAgent Setter",
NS_CONTENTHTTPSTARTUP_CONTRACTID,
PR_TRUE, PR_TRUE,
getter_Copies(previousEntry));
return rv;
}
nsresult
nsContentHTTPStartup::UnregisterHTTPStartup()
{
nsresult rv;
nsCOMPtr<nsICategoryManager>
catMan(do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv));
if (NS_FAILED(rv)) return rv;
return NS_OK;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,121 @@
/* -*- 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 Communicator client 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 nsXMLDocument_h___
#define nsXMLDocument_h___
#include "nsMarkupDocument.h"
#include "nsIXMLDocument.h"
#include "nsIHTMLContentContainer.h"
#include "nsIInterfaceRequestor.h"
#include "nsIHttpEventSink.h"
class nsIParser;
class nsIDOMNode;
class nsICSSLoader;
class nsIURI;
class nsXMLDocument : public nsMarkupDocument,
public nsIXMLDocument,
public nsIHTMLContentContainer,
public nsIInterfaceRequestor,
public nsIHttpEventSink
{
public:
nsXMLDocument();
virtual ~nsXMLDocument();
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
NS_IMETHOD_(nsrefcnt) AddRef(void);
NS_IMETHOD_(nsrefcnt) Release(void);
NS_IMETHOD Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup);
NS_IMETHOD GetContentType(nsAWritableString& aContentType) const;
NS_IMETHOD StartDocumentLoad(const char* aCommand,
nsIChannel* channel,
nsILoadGroup* aLoadGroup,
nsISupports* aContainer,
nsIStreamListener **aDocListener,
PRBool aReset = PR_TRUE);
NS_IMETHOD EndLoad();
NS_IMETHOD GetBaseTarget(nsAWritableString &aBaseTarget);
NS_IMETHOD SetBaseTarget(const nsAReadableString &aBaseTarget);
// nsIDOMNode interface
NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn);
// nsIDOMDocument interface
NS_IMETHOD GetDoctype(nsIDOMDocumentType** aDocumentType);
NS_IMETHOD CreateCDATASection(const nsAReadableString& aData, nsIDOMCDATASection** aReturn);
NS_IMETHOD CreateEntityReference(const nsAReadableString& aName, nsIDOMEntityReference** aReturn);
NS_IMETHOD CreateProcessingInstruction(const nsAReadableString& aTarget, const nsAReadableString& aData, nsIDOMProcessingInstruction** aReturn);
NS_IMETHOD CreateElement(const nsAReadableString& aTagName,
nsIDOMElement** aReturn);
NS_IMETHOD ImportNode(nsIDOMNode* aImportedNode,
PRBool aDeep,
nsIDOMNode** aReturn);
NS_IMETHOD CreateElementNS(const nsAReadableString& aNamespaceURI,
const nsAReadableString& aQualifiedName,
nsIDOMElement** aReturn);
NS_IMETHOD CreateAttributeNS(const nsAReadableString& aNamespaceURI,
const nsAReadableString& aQualifiedName,
nsIDOMAttr** aReturn);
NS_IMETHOD GetElementById(const nsAReadableString& aElementId,
nsIDOMElement** aReturn);
NS_IMETHOD Load(const nsAReadableString& aUrl);
// nsIXMLDocument interface
NS_IMETHOD SetDefaultStylesheets(nsIURI* aUrl);
NS_IMETHOD SetTitle(const PRUnichar *aTitle);
// nsIHTMLContentContainer
NS_IMETHOD GetAttributeStyleSheet(nsIHTMLStyleSheet** aResult);
NS_IMETHOD GetInlineStyleSheet(nsIHTMLCSSStyleSheet** aResult);
NS_IMETHOD GetCSSLoader(nsICSSLoader*& aLoader);
// nsIInterfaceRequestor
NS_IMETHOD GetInterface(const nsIID& aIID, void** aSink);
// nsIHTTPEventSink
NS_DECL_NSIHTTPEVENTSINK
protected:
virtual void InternalAddStyleSheet(nsIStyleSheet* aSheet); // subclass hook for sheet ordering
virtual void InternalInsertStyleSheetAt(nsIStyleSheet* aSheet, PRInt32 aIndex);
// For HTML elements in our content model
// XXX This is not clean, but is there a better way?
nsIHTMLStyleSheet* mAttrStyleSheet;
nsIHTMLCSSStyleSheet* mInlineStyleSheet;
nsString mBaseTarget;
nsIParser *mParser;
nsICSSLoader* mCSSLoader;
};
#endif // nsXMLDocument_h___

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,250 @@
/* -*- 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):
*/
#ifdef DEBUG_dp
#include <stdio.h>
#endif
#include "nsCookieService.h" /* don't remove -- needed for mac build */
#include "nsCookieHTTPNotify.h"
#include "nsIGenericFactory.h"
#include "nsIHttpChannel.h"
#include "nsCookie.h"
#include "nsIURL.h"
#include "nsCRT.h"
#include "nsXPIDLString.h"
#include "nsIServiceManager.h"
#include "nsINetModuleMgr.h"
#include "nsILoadGroup.h"
#include "nsICategoryManager.h"
#include "nsIHttpProtocolHandler.h" // for NS_HTTP_STARTUP_CATEGORY
#include "nsIInterfaceRequestor.h"
#include "nsIPrompt.h"
static NS_DEFINE_CID(kINetModuleMgrCID, NS_NETMODULEMGR_CID);
///////////////////////////////////
// nsISupports
NS_IMPL_ISUPPORTS2(nsCookieHTTPNotify, nsIHttpNotify, nsINetNotify);
///////////////////////////////////
// nsCookieHTTPNotify Implementation
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsCookieHTTPNotify, Init)
nsresult nsCookieHTTPNotify::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult)
{
return nsCookieHTTPNotifyConstructor(aOuter, aIID, aResult);
}
NS_METHOD nsCookieHTTPNotify::RegisterProc(nsIComponentManager *aCompMgr,
nsIFile *aPath,
const char *registryLocation,
const char *componentType,
const nsModuleComponentInfo *info)
{
// Register ourselves into the NS_CATEGORY_HTTP_STARTUP
nsresult rv;
nsCOMPtr<nsICategoryManager> catman = do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
nsXPIDLCString prevEntry;
rv = catman->AddCategoryEntry(NS_HTTP_STARTUP_CATEGORY, "Http Cookie Notify", NS_COOKIEHTTPNOTIFY_CONTRACTID,
PR_TRUE, PR_TRUE, getter_Copies(prevEntry));
return NS_OK;
}
NS_METHOD nsCookieHTTPNotify::UnregisterProc(nsIComponentManager *aCompMgr,
nsIFile *aPath,
const char *registryLocation,
const nsModuleComponentInfo *info)
{
nsresult rv;
nsCOMPtr<nsICategoryManager> catman = do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
nsXPIDLCString prevEntry;
rv = catman->DeleteCategoryEntry(NS_HTTP_STARTUP_CATEGORY, NS_COOKIEHTTPNOTIFY_CONTRACTID, PR_TRUE,
getter_Copies(prevEntry));
// Return value is not used from this function.
return NS_OK;
}
NS_IMETHODIMP
nsCookieHTTPNotify::Init()
{
// Register to handing http requests and responses
nsresult rv = NS_OK;
nsCOMPtr<nsINetModuleMgr> pNetModuleMgr = do_GetService(kINetModuleMgrCID, &rv);
if (NS_FAILED(rv)) return rv;
rv = pNetModuleMgr->RegisterModule(NS_NETWORK_MODULE_MANAGER_HTTP_REQUEST_CONTRACTID,
(nsIHttpNotify *)this);
if (NS_FAILED(rv)) return rv;
rv = pNetModuleMgr->RegisterModule(NS_NETWORK_MODULE_MANAGER_HTTP_RESPONSE_CONTRACTID,
(nsIHttpNotify *)this);
return rv;
}
nsCookieHTTPNotify::nsCookieHTTPNotify()
{
NS_INIT_REFCNT();
mCookieService = nsnull;
#ifdef DEBUG_dp
printf("CookieHTTPNotify Created.\n");
#endif /* DEBUG_dp */
}
nsCookieHTTPNotify::~nsCookieHTTPNotify()
{
}
NS_IMETHODIMP
nsCookieHTTPNotify::SetupCookieService()
{
nsresult rv = NS_OK;
if (!mCookieService)
{
mCookieService = do_GetService(NS_COOKIESERVICE_CONTRACTID, &rv);
}
return rv;
}
///////////////////////////////////
// nsIHttpNotify
NS_IMETHODIMP
nsCookieHTTPNotify::OnModifyRequest(nsIHttpChannel *aHttpChannel)
{
nsresult rv;
// Preconditions
NS_ENSURE_ARG_POINTER(aHttpChannel);
// Get the url
nsCOMPtr<nsIURI> pURL;
rv = aHttpChannel->GetURI(getter_AddRefs(pURL));
if (NS_FAILED(rv)) return rv;
// Get the original url that the user either typed in or clicked on
nsCOMPtr<nsILoadGroup> pLoadGroup;
rv = aHttpChannel->GetLoadGroup(getter_AddRefs(pLoadGroup));
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsIChannel> pChannel;
if (pLoadGroup) {
nsCOMPtr<nsIRequest> pRequest;
rv = pLoadGroup->GetDefaultLoadRequest(getter_AddRefs(pRequest));
if (pRequest)
pChannel = do_QueryInterface(pRequest);
}
nsCOMPtr<nsIURI> pFirstURL;
if (pChannel) {
rv = pChannel->GetURI(getter_AddRefs(pFirstURL));
} else {
rv = aHttpChannel->GetURI(getter_AddRefs(pFirstURL));
}
if (NS_FAILED(rv)) return rv;
// Ensure that the cookie service exists
rv = SetupCookieService();
if (NS_FAILED(rv)) return rv;
char * cookie;
rv = mCookieService->GetCookieStringFromHttp(pURL, pFirstURL, &cookie);
if (NS_FAILED(rv)) return rv;
// Set the cookie into the request headers
if (cookie && *cookie)
rv = aHttpChannel->SetRequestHeader("Cookie", cookie);
nsMemory::Free((void *)cookie);
return rv;
}
NS_IMETHODIMP
nsCookieHTTPNotify::OnExamineResponse(nsIHttpChannel *aHttpChannel)
{
nsresult rv;
// Preconditions
NS_ENSURE_ARG_POINTER(aHttpChannel);
// Get the Cookie header
nsXPIDLCString cookieHeader;
rv = aHttpChannel->GetResponseHeader("Set-Cookie", getter_Copies(cookieHeader));
if (NS_FAILED(rv)) return rv;
if (!cookieHeader) return NS_OK; // not an error, there's just no header.
// Get the url
nsCOMPtr<nsIURI> pURL;
rv = aHttpChannel->GetURI(getter_AddRefs(pURL));
if (NS_FAILED(rv)) return rv;
// Get the original url that the user either typed in or clicked on
nsCOMPtr<nsILoadGroup> pLoadGroup;
rv = aHttpChannel->GetLoadGroup(getter_AddRefs(pLoadGroup));
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsIChannel> pChannel;
if (pLoadGroup) {
nsCOMPtr<nsIRequest> pRequest;
rv = pLoadGroup->GetDefaultLoadRequest(getter_AddRefs(pRequest));
if (NS_FAILED(rv)) return rv;
pChannel = do_QueryInterface(pRequest);
}
nsCOMPtr<nsIURI> pFirstURL;
if (pChannel) {
rv = pChannel->GetURI(getter_AddRefs(pFirstURL));
} else {
rv = aHttpChannel->GetURI(getter_AddRefs(pFirstURL));
}
if (NS_FAILED(rv)) return rv;
// Get the prompter
nsCOMPtr<nsIInterfaceRequestor> pInterfaces;
nsCOMPtr<nsIPrompt> pPrompter;
if (pChannel) {
pChannel->GetNotificationCallbacks(getter_AddRefs(pInterfaces));
} else {
aHttpChannel->GetNotificationCallbacks(getter_AddRefs(pInterfaces));
}
if (pInterfaces)
pInterfaces->GetInterface(NS_GET_IID(nsIPrompt), getter_AddRefs(pPrompter));
// Get the expires
nsXPIDLCString dateHeader;
rv = aHttpChannel->GetResponseHeader("Date", getter_Copies(dateHeader));
if (NS_FAILED(rv)) return rv;
// Ensure that we have the cookie service
rv = SetupCookieService();
if (NS_FAILED(rv)) return rv;
// Save the cookie
rv = mCookieService->SetCookieStringFromHttp(pURL, pFirstURL, pPrompter, cookieHeader, dateHeader);
return rv;
}

View File

@@ -0,0 +1,71 @@
/* -*- 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 nsCookieHTTPNotify_h___
#define nsCookieHTTPNotify_h___
#include "nsIHttpNotify.h"
#include "nsICookieService.h"
#include "nsIComponentManager.h"
// {6BC1F522-1F45-11d3-8AD4-00105A1B8860}
#define NS_COOKIEHTTPNOTIFY_CID \
{ 0x6bc1f522, 0x1f45, 0x11d3, { 0x8a, 0xd4, 0x0, 0x10, 0x5a, 0x1b, 0x88, 0x60 } }
#define NS_COOKIEHTTPNOTIFY_CONTRACTID "@mozilla.org/cookie-notifier;1"
#define NS_COOKIEHTTPNOTIFY_CLASSNAME "Cookie Notifier"
struct nsModuleComponentInfo; // forward declaration
class nsCookieHTTPNotify : public nsIHttpNotify {
public:
// nsISupports
NS_DECL_ISUPPORTS
// Init method
NS_IMETHOD Init();
// nsIHttpNotify methods:
NS_DECL_NSIHTTPNOTIFY
// nsCookieHTTPNotify methods:
nsCookieHTTPNotify();
virtual ~nsCookieHTTPNotify();
static nsresult Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
static NS_METHOD RegisterProc(nsIComponentManager *aCompMgr,
nsIFile *aPath,
const char *registryLocation,
const char *componentType,
const nsModuleComponentInfo *info);
static NS_METHOD UnregisterProc(nsIComponentManager *aCompMgr,
nsIFile *aPath,
const char *registryLocation,
const nsModuleComponentInfo *info);
private:
nsCOMPtr<nsICookieService> mCookieService;
NS_IMETHOD SetupCookieService();
};
#endif /* nsCookieHTTPNotify_h___ */

View File

@@ -0,0 +1,43 @@
#
# 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 = necko
LIBRARY_NAME = nkdatetm_s
REQUIRES = xpcom string
CPPSRCS = \
nsDateTimeHandler.cpp \
nsDateTimeChannel.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

@@ -0,0 +1,327 @@
/* -*- 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):
*/
// datetime implementation
#include "nsDateTimeChannel.h"
#include "nsIServiceManager.h"
#include "nsILoadGroup.h"
#include "nsIInterfaceRequestor.h"
#include "nsXPIDLString.h"
#include "nsISocketTransportService.h"
#include "nsITransport.h"
#include "nsIProgressEventSink.h"
static NS_DEFINE_CID(kSocketTransportServiceCID, NS_SOCKETTRANSPORTSERVICE_CID);
// nsDateTimeChannel methods
nsDateTimeChannel::nsDateTimeChannel() {
NS_INIT_REFCNT();
mContentLength = -1;
mPort = -1;
}
nsDateTimeChannel::~nsDateTimeChannel() {
}
NS_IMPL_ISUPPORTS4(nsDateTimeChannel,
nsIChannel,
nsIRequest,
nsIStreamListener,
nsIRequestObserver)
nsresult
nsDateTimeChannel::Init(nsIURI* uri)
{
nsresult rv;
NS_ASSERTION(uri, "no uri");
mUrl = uri;
rv = mUrl->GetPort(&mPort);
if (NS_FAILED(rv) || mPort < 1)
mPort = DATETIME_PORT;
rv = mUrl->GetPath(getter_Copies(mHost));
if (NS_FAILED(rv)) return rv;
if (!*(const char *)mHost) return NS_ERROR_NOT_INITIALIZED;
return NS_OK;
}
NS_METHOD
nsDateTimeChannel::Create(nsISupports* aOuter, const nsIID& aIID, void* *aResult)
{
nsDateTimeChannel* dc = new nsDateTimeChannel();
if (dc == nsnull)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(dc);
nsresult rv = dc->QueryInterface(aIID, aResult);
NS_RELEASE(dc);
return rv;
}
////////////////////////////////////////////////////////////////////////////////
// nsIRequest methods:
NS_IMETHODIMP
nsDateTimeChannel::GetName(PRUnichar* *result)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDateTimeChannel::IsPending(PRBool *result)
{
NS_NOTREACHED("nsDateTimeChannel::IsPending");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDateTimeChannel::GetStatus(nsresult *status)
{
*status = NS_OK;
return NS_OK;
}
NS_IMETHODIMP
nsDateTimeChannel::Cancel(nsresult status)
{
NS_ASSERTION(NS_FAILED(status), "shouldn't cancel with a success code");
NS_NOTREACHED("nsDateTimeChannel::Cancel");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDateTimeChannel::Suspend(void)
{
NS_NOTREACHED("nsDateTimeChannel::Suspend");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDateTimeChannel::Resume(void)
{
NS_NOTREACHED("nsDateTimeChannel::Resume");
return NS_ERROR_NOT_IMPLEMENTED;
}
////////////////////////////////////////////////////////////////////////////////
// nsIChannel methods:
NS_IMETHODIMP
nsDateTimeChannel::GetOriginalURI(nsIURI* *aURI)
{
*aURI = mOriginalURI ? mOriginalURI : mUrl;
NS_ADDREF(*aURI);
return NS_OK;
}
NS_IMETHODIMP
nsDateTimeChannel::SetOriginalURI(nsIURI* aURI)
{
mOriginalURI = aURI;
return NS_OK;
}
NS_IMETHODIMP
nsDateTimeChannel::GetURI(nsIURI* *aURI)
{
*aURI = mUrl;
NS_IF_ADDREF(*aURI);
return NS_OK;
}
NS_IMETHODIMP
nsDateTimeChannel::Open(nsIInputStream **_retval)
{
nsresult rv = NS_OK;
NS_WITH_SERVICE(nsISocketTransportService, socketService, kSocketTransportServiceCID, &rv);
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsITransport> transport;
rv = socketService->CreateTransport(mHost, mPort, nsnull, -1, 32, 32, getter_AddRefs(transport));
if (NS_FAILED(rv)) return rv;
transport->SetNotificationCallbacks(mCallbacks,
(mLoadFlags & LOAD_BACKGROUND));
return transport->OpenInputStream(0, -1, 0, _retval);
}
NS_IMETHODIMP
nsDateTimeChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports *ctxt)
{
nsresult rv = NS_OK;
NS_WITH_SERVICE(nsISocketTransportService, socketService, kSocketTransportServiceCID, &rv);
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsITransport> transport;
rv = socketService->CreateTransport(mHost, mPort, nsnull, -1, 32, 32, getter_AddRefs(transport));
if (NS_FAILED(rv)) return rv;
transport->SetNotificationCallbacks(mCallbacks,
(mLoadFlags & LOAD_BACKGROUND));
mListener = aListener;
nsCOMPtr<nsIRequest> request;
return transport->AsyncRead(this, ctxt, 0, -1, 0, getter_AddRefs(request));
}
NS_IMETHODIMP
nsDateTimeChannel::GetLoadFlags(PRUint32 *aLoadFlags)
{
*aLoadFlags = mLoadFlags;
return NS_OK;
}
NS_IMETHODIMP
nsDateTimeChannel::SetLoadFlags(PRUint32 aLoadFlags)
{
mLoadFlags = aLoadFlags;
return NS_OK;
}
#define DATETIME_TYPE "text/plain"
NS_IMETHODIMP
nsDateTimeChannel::GetContentType(char* *aContentType) {
if (!aContentType) return NS_ERROR_NULL_POINTER;
*aContentType = nsCRT::strdup(DATETIME_TYPE);
if (!*aContentType) return NS_ERROR_OUT_OF_MEMORY;
return NS_OK;
}
NS_IMETHODIMP
nsDateTimeChannel::SetContentType(const char *aContentType)
{
//It doesn't make sense to set the content-type on this type
// of channel...
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsDateTimeChannel::GetContentLength(PRInt32 *aContentLength)
{
*aContentLength = mContentLength;
return NS_OK;
}
NS_IMETHODIMP
nsDateTimeChannel::SetContentLength(PRInt32 aContentLength)
{
NS_NOTREACHED("nsDateTimeChannel::SetContentLength");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDateTimeChannel::GetLoadGroup(nsILoadGroup* *aLoadGroup)
{
*aLoadGroup = mLoadGroup;
NS_IF_ADDREF(*aLoadGroup);
return NS_OK;
}
NS_IMETHODIMP
nsDateTimeChannel::SetLoadGroup(nsILoadGroup* aLoadGroup)
{
if (mLoadGroup) // if we already had a load group remove ourselves...
(void)mLoadGroup->RemoveRequest(this, nsnull, NS_OK);
mLoadGroup = aLoadGroup;
if (mLoadGroup) {
return mLoadGroup->AddRequest(this, nsnull);
}
return NS_OK;
}
NS_IMETHODIMP
nsDateTimeChannel::GetOwner(nsISupports* *aOwner)
{
*aOwner = mOwner.get();
NS_IF_ADDREF(*aOwner);
return NS_OK;
}
NS_IMETHODIMP
nsDateTimeChannel::SetOwner(nsISupports* aOwner)
{
mOwner = aOwner;
return NS_OK;
}
NS_IMETHODIMP
nsDateTimeChannel::GetNotificationCallbacks(nsIInterfaceRequestor* *aNotificationCallbacks)
{
*aNotificationCallbacks = mCallbacks.get();
NS_IF_ADDREF(*aNotificationCallbacks);
return NS_OK;
}
NS_IMETHODIMP
nsDateTimeChannel::SetNotificationCallbacks(nsIInterfaceRequestor* aNotificationCallbacks)
{
mCallbacks = aNotificationCallbacks;
return NS_OK;
}
NS_IMETHODIMP
nsDateTimeChannel::GetSecurityInfo(nsISupports **sec)
{
NS_ENSURE_ARG_POINTER(sec);
*sec = nsnull;
return NS_OK;
}
// nsIRequestObserver methods
NS_IMETHODIMP
nsDateTimeChannel::OnStartRequest(nsIRequest *request, nsISupports *aContext) {
return mListener->OnStartRequest(this, aContext);
}
NS_IMETHODIMP
nsDateTimeChannel::OnStopRequest(nsIRequest *request, nsISupports* aContext,
nsresult aStatus) {
if (mLoadGroup) {
nsresult rv = mLoadGroup->RemoveRequest(this, nsnull, aStatus);
if (NS_FAILED(rv)) return rv;
}
return mListener->OnStopRequest(this, aContext, aStatus);
}
// nsIStreamListener method
NS_IMETHODIMP
nsDateTimeChannel::OnDataAvailable(nsIRequest *request, nsISupports* aContext,
nsIInputStream *aInputStream, PRUint32 aSourceOffset,
PRUint32 aLength) {
mContentLength = aLength;
return mListener->OnDataAvailable(this, aContext, aInputStream, aSourceOffset, aLength);
}

View File

@@ -0,0 +1,78 @@
/* -*- 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):
*/
// A datetime channel retrieves date time information from
// RFC 867 compliant datetime servers. The date/time returned
// to the caller is of MIME type "text/plain".
#ifndef nsDateTimeChannel_h___
#define nsDateTimeChannel_h___
#include "nsString.h"
#include "nsILoadGroup.h"
#include "nsIInputStream.h"
#include "nsIInterfaceRequestor.h"
#include "nsCOMPtr.h"
#include "nsXPIDLString.h"
#include "nsIChannel.h"
#include "nsIURI.h"
#include "nsDateTimeHandler.h"
#include "nsIStreamListener.h"
class nsDateTimeChannel
: public nsIChannel,
public nsIStreamListener {
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIREQUEST
NS_DECL_NSICHANNEL
NS_DECL_NSISTREAMLISTENER
NS_DECL_NSIREQUESTOBSERVER
// nsDateTimeChannel methods:
nsDateTimeChannel();
virtual ~nsDateTimeChannel();
// Define a Create method to be used with a factory:
static NS_METHOD
Create(nsISupports* aOuter, const nsIID& aIID, void* *aResult);
nsresult Init(nsIURI* uri);
protected:
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
nsCOMPtr<nsIURI> mOriginalURI;
nsCOMPtr<nsIURI> mUrl;
nsCOMPtr<nsIStreamListener> mListener;
PRUint32 mLoadFlags;
nsCOMPtr<nsILoadGroup> mLoadGroup;
nsCString mContentType;
PRInt32 mContentLength;
nsCOMPtr<nsISupports> mOwner;
PRInt32 mPort;
nsXPIDLCString mHost;
};
#endif /* nsDateTimeChannel_h___ */

View File

@@ -0,0 +1,117 @@
/* -*- 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 "nspr.h"
#include "nsDateTimeChannel.h"
#include "nsDateTimeHandler.h"
#include "nsIURL.h"
#include "nsCRT.h"
#include "nsIComponentManager.h"
#include "nsIServiceManager.h"
#include "nsIInterfaceRequestor.h"
#include "nsIProgressEventSink.h"
#include "nsNetCID.h"
static NS_DEFINE_CID(kSimpleURICID, NS_SIMPLEURI_CID);
////////////////////////////////////////////////////////////////////////////////
nsDateTimeHandler::nsDateTimeHandler() {
NS_INIT_REFCNT();
}
nsDateTimeHandler::~nsDateTimeHandler() {
}
NS_IMPL_ISUPPORTS1(nsDateTimeHandler, nsIProtocolHandler)
NS_METHOD
nsDateTimeHandler::Create(nsISupports* aOuter, const nsIID& aIID, void* *aResult) {
nsDateTimeHandler* ph = new nsDateTimeHandler();
if (ph == nsnull)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(ph);
nsresult rv = ph->QueryInterface(aIID, aResult);
NS_RELEASE(ph);
return rv;
}
////////////////////////////////////////////////////////////////////////////////
// nsIProtocolHandler methods:
NS_IMETHODIMP
nsDateTimeHandler::GetScheme(char* *result) {
*result = nsCRT::strdup("datetime");
if (!*result) return NS_ERROR_OUT_OF_MEMORY;
return NS_OK;
}
NS_IMETHODIMP
nsDateTimeHandler::GetDefaultPort(PRInt32 *result) {
*result = DATETIME_PORT;
return NS_OK;
}
NS_IMETHODIMP
nsDateTimeHandler::NewURI(const char *aSpec, nsIURI *aBaseURI,
nsIURI **result) {
nsresult rv;
// no concept of a relative datetime url
NS_ASSERTION(!aBaseURI, "base url passed into datetime protocol handler");
nsIURI* url;
rv = nsComponentManager::CreateInstance(kSimpleURICID, nsnull,
NS_GET_IID(nsIURI),
(void**)&url);
if (NS_FAILED(rv)) return rv;
rv = url->SetSpec((char*)aSpec);
if (NS_FAILED(rv)) {
NS_RELEASE(url);
return rv;
}
*result = url;
return rv;
}
NS_IMETHODIMP
nsDateTimeHandler::NewChannel(nsIURI* url, nsIChannel* *result)
{
nsresult rv;
nsDateTimeChannel* channel;
rv = nsDateTimeChannel::Create(nsnull, NS_GET_IID(nsIChannel), (void**)&channel);
if (NS_FAILED(rv)) return rv;
rv = channel->Init(url);
if (NS_FAILED(rv)) {
NS_RELEASE(channel);
return rv;
}
*result = channel;
return NS_OK;
}
////////////////////////////////////////////////////////////////////////////////

View File

@@ -0,0 +1,51 @@
/* -*- 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):
*/
// The datetime protocol handler creates "datetime" URIs of the form
// "datetime:RFC867Server".
#ifndef nsDateTimeHandler_h___
#define nsDateTimeHandler_h___
#include "nsIProtocolHandler.h"
#define DATETIME_PORT 13
// {AA27D2A0-B71B-11d3-A1A0-0050041CAF44}
#define NS_DATETIMEHANDLER_CID \
{ 0xaa27d2a0, 0xb71b, 0x11d3, { 0xa1, 0xa0, 0x0, 0x50, 0x4, 0x1c, 0xaf, 0x44 } }
class nsDateTimeHandler : public nsIProtocolHandler
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIPROTOCOLHANDLER
// nsDateTimeHandler methods:
nsDateTimeHandler();
virtual ~nsDateTimeHandler();
// Define a Create method to be used with a factory:
static NS_METHOD Create(nsISupports* aOuter, const nsIID& aIID, void* *aResult);
};
#endif /* nsDateTimeHandler_h___ */

View File

@@ -0,0 +1,34 @@
/* -*- 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 "nsIGenericFactory.h"
#include "nsDateTimeHandler.h"
static nsModuleComponentInfo gResComponents[] = {
{ "The DateTime Protocol Handler",
NS_DATETIMEHANDLER_CID,
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "datetime",
nsDateTimeHandler::Create
}
};
NS_IMPL_NSGETMODULE(datetime, gResComponents)

View File

@@ -3,21 +3,20 @@
# 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 Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 2001 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Brian Ryner.
# Portions created by Brian Ryner are Copyright (C) 2000 Brian Ryner.
# All Rights Reserved.
#
# Contributor(s):
# Brian Ryner <bryner@uiuc.edu>
DEPTH = ../../../..
topsrcdir = @top_srcdir@
@@ -26,17 +25,18 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = imgppm
LIBRARY_NAME = imgppm
IS_COMPONENT = 1
MODULE = necko
LIBRARY_NAME = nkfinger_s
REQUIRES = xpcom string mimetype
REQUIRES = xpcom layout necko gfx2 imglib2
CPPSRCS = nsPPMDecoder.cpp nsPPMFactory.cpp
EXTRA_DSO_LDOPTS = \
$(MOZ_COMPONENT_LIBS) \
CPPSRCS = \
nsFingerHandler.cpp \
nsFingerChannel.cpp \
$(NULL)
include $(topsrcdir)/config/rules.mk
# 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

@@ -0,0 +1,427 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* 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 Brian Ryner.
* Portions created by Brian Ryner are Copyright (C) 2000 Brian Ryner.
* All Rights Reserved.
*
* Contributor(s):
* Brian Ryner <bryner@uiuc.edu>
*/
// finger implementation
#include "nsFingerChannel.h"
#include "nsIServiceManager.h"
#include "nsILoadGroup.h"
#include "nsIInterfaceRequestor.h"
#include "nsXPIDLString.h"
#include "nsISocketTransportService.h"
#include "nsIStringStream.h"
#include "nsMimeTypes.h"
#include "nsIStreamConverterService.h"
#include "nsITXTToHTMLConv.h"
#include "nsIProgressEventSink.h"
#include "nsNetUtil.h"
static NS_DEFINE_CID(kSocketTransportServiceCID, NS_SOCKETTRANSPORTSERVICE_CID);
static NS_DEFINE_CID(kStreamConverterServiceCID, NS_STREAMCONVERTERSERVICE_CID);
#define BUFFER_SEG_SIZE (4*1024)
#define BUFFER_MAX_SIZE (64*1024)
// nsFingerChannel methods
nsFingerChannel::nsFingerChannel()
: mContentLength(-1),
mActAsObserver(PR_TRUE),
mPort(-1),
mStatus(NS_OK)
{
NS_INIT_REFCNT();
}
nsFingerChannel::~nsFingerChannel() {
}
NS_IMPL_THREADSAFE_ISUPPORTS4(nsFingerChannel,
nsIChannel,
nsIRequest,
nsIStreamListener,
nsIRequestObserver)
nsresult
nsFingerChannel::Init(nsIURI* uri)
{
nsresult rv;
nsXPIDLCString autoBuffer;
NS_ASSERTION(uri, "no uri");
mUrl = uri;
// For security reasons, we do not allow the user to specify a
// non-default port for finger: URL's.
mPort = FINGER_PORT;
rv = mUrl->GetPath(getter_Copies(autoBuffer)); // autoBuffer = user@host
if (NS_FAILED(rv)) return rv;
// Now parse out the user and host
const char* buf = autoBuffer.get();
const char* pos = PL_strchr(buf, '@');
// Catch the case of just the host being given
if (!pos) {
mHost.Assign(buf);
} else {
mUser.Assign(buf,pos-buf);
mHost.Assign(pos+1); // ignore '@'
}
if (mHost.IsEmpty()) return NS_ERROR_NOT_INITIALIZED;
return NS_OK;
}
NS_METHOD
nsFingerChannel::Create(nsISupports* aOuter, const nsIID& aIID, void* *aResult)
{
nsFingerChannel* fc = new nsFingerChannel();
if (fc == nsnull)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(fc);
nsresult rv = fc->QueryInterface(aIID, aResult);
NS_RELEASE(fc);
return rv;
}
////////////////////////////////////////////////////////////////////////////////
// nsIRequest methods:
NS_IMETHODIMP
nsFingerChannel::GetName(PRUnichar* *result)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsFingerChannel::IsPending(PRBool *result)
{
NS_NOTREACHED("nsFingerChannel::IsPending");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsFingerChannel::GetStatus(nsresult *status)
{
*status = mStatus;
return NS_OK;
}
NS_IMETHODIMP
nsFingerChannel::Cancel(nsresult status)
{
NS_ASSERTION(NS_FAILED(status), "shouldn't cancel with a success code");
nsresult rv = NS_ERROR_FAILURE;
mStatus = status;
if (mTransportRequest) {
rv = mTransportRequest->Cancel(status);
}
return rv;
}
NS_IMETHODIMP
nsFingerChannel::Suspend(void)
{
NS_NOTREACHED("nsFingerChannel::Suspend");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsFingerChannel::Resume(void)
{
NS_NOTREACHED("nsFingerChannel::Resume");
return NS_ERROR_NOT_IMPLEMENTED;
}
////////////////////////////////////////////////////////////////////////////////
// nsIChannel methods:
NS_IMETHODIMP
nsFingerChannel::GetOriginalURI(nsIURI* *aURI)
{
*aURI = mOriginalURI ? mOriginalURI : mUrl;
NS_ADDREF(*aURI);
return NS_OK;
}
NS_IMETHODIMP
nsFingerChannel::SetOriginalURI(nsIURI* aURI)
{
mOriginalURI = aURI;
return NS_OK;
}
NS_IMETHODIMP
nsFingerChannel::GetURI(nsIURI* *aURI)
{
*aURI = mUrl;
NS_IF_ADDREF(*aURI);
return NS_OK;
}
NS_IMETHODIMP
nsFingerChannel::Open(nsIInputStream **_retval)
{
nsresult rv = NS_OK;
NS_WITH_SERVICE(nsISocketTransportService, socketService, kSocketTransportServiceCID, &rv);
if (NS_FAILED(rv)) return rv;
rv = socketService->CreateTransport(mHost, mPort, nsnull, -1, BUFFER_SEG_SIZE,
BUFFER_MAX_SIZE, getter_AddRefs(mTransport));
if (NS_FAILED(rv)) return rv;
mTransport->SetNotificationCallbacks(mCallbacks,
(mLoadFlags & LOAD_BACKGROUND));
return mTransport->OpenInputStream(0, PRUint32(-1), 0, _retval);
}
NS_IMETHODIMP
nsFingerChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports *ctxt)
{
nsresult rv = NS_OK;
NS_WITH_SERVICE(nsISocketTransportService, socketService, kSocketTransportServiceCID, &rv);
if (NS_FAILED(rv)) return rv;
rv = socketService->CreateTransport(mHost, mPort, nsnull, -1, BUFFER_SEG_SIZE,
BUFFER_MAX_SIZE, getter_AddRefs(mTransport));
if (NS_FAILED(rv)) return rv;
mTransport->SetNotificationCallbacks(mCallbacks,
(mLoadFlags & LOAD_BACKGROUND));
mListener = aListener;
mResponseContext = ctxt;
return SendRequest(mTransport);
}
NS_IMETHODIMP
nsFingerChannel::GetLoadFlags(PRUint32 *aLoadFlags)
{
*aLoadFlags = mLoadFlags;
return NS_OK;
}
NS_IMETHODIMP
nsFingerChannel::SetLoadFlags(PRUint32 aLoadFlags)
{
mLoadFlags = aLoadFlags;
return NS_OK;
}
#define FINGER_TYPE TEXT_HTML
NS_IMETHODIMP
nsFingerChannel::GetContentType(char* *aContentType) {
if (!aContentType) return NS_ERROR_NULL_POINTER;
*aContentType = nsCRT::strdup(FINGER_TYPE);
if (!*aContentType) return NS_ERROR_OUT_OF_MEMORY;
return NS_OK;
}
NS_IMETHODIMP
nsFingerChannel::SetContentType(const char *aContentType)
{
//It doesn't make sense to set the content-type on this type
// of channel...
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsFingerChannel::GetContentLength(PRInt32 *aContentLength)
{
*aContentLength = mContentLength;
return NS_OK;
}
NS_IMETHODIMP
nsFingerChannel::SetContentLength(PRInt32 aContentLength)
{
NS_NOTREACHED("nsFingerChannel::SetContentLength");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsFingerChannel::GetLoadGroup(nsILoadGroup* *aLoadGroup)
{
*aLoadGroup = mLoadGroup;
NS_IF_ADDREF(*aLoadGroup);
return NS_OK;
}
NS_IMETHODIMP
nsFingerChannel::SetLoadGroup(nsILoadGroup* aLoadGroup)
{
mLoadGroup = aLoadGroup;
return NS_OK;
}
NS_IMETHODIMP
nsFingerChannel::GetOwner(nsISupports* *aOwner)
{
*aOwner = mOwner.get();
NS_IF_ADDREF(*aOwner);
return NS_OK;
}
NS_IMETHODIMP
nsFingerChannel::SetOwner(nsISupports* aOwner)
{
mOwner = aOwner;
return NS_OK;
}
NS_IMETHODIMP
nsFingerChannel::GetNotificationCallbacks(nsIInterfaceRequestor* *aNotificationCallbacks)
{
*aNotificationCallbacks = mCallbacks.get();
NS_IF_ADDREF(*aNotificationCallbacks);
return NS_OK;
}
NS_IMETHODIMP
nsFingerChannel::SetNotificationCallbacks(nsIInterfaceRequestor* aNotificationCallbacks)
{
mCallbacks = aNotificationCallbacks;
return NS_OK;
}
NS_IMETHODIMP
nsFingerChannel::GetSecurityInfo(nsISupports * *aSecurityInfo)
{
*aSecurityInfo = nsnull;
return NS_OK;
}
// nsIRequestObserver methods
NS_IMETHODIMP
nsFingerChannel::OnStartRequest(nsIRequest *aRequest, nsISupports *aContext) {
if (!mActAsObserver) {
// acting as a listener
return mListener->OnStartRequest(this, mResponseContext);
} else {
// we don't want to pass our AsyncWrite's OnStart through
// we just ignore this
return NS_OK;
}
}
NS_IMETHODIMP
nsFingerChannel::OnStopRequest(nsIRequest *aRequest, nsISupports* aContext,
nsresult aStatus)
{
nsresult rv = NS_OK;
if (NS_FAILED(aStatus) || !mActAsObserver) {
if (mLoadGroup) {
rv = mLoadGroup->RemoveRequest(this, nsnull, aStatus);
if (NS_FAILED(rv)) return rv;
}
rv = mListener->OnStopRequest(this, mResponseContext, aStatus);
mTransport = 0;
return rv;
} else {
// at this point we know the request has been sent.
// we're no longer acting as an observer.
mActAsObserver = PR_FALSE;
nsCOMPtr<nsIStreamListener> converterListener;
NS_WITH_SERVICE(nsIStreamConverterService, StreamConvService,
kStreamConverterServiceCID, &rv);
if (NS_FAILED(rv)) return rv;
nsAutoString fromStr; fromStr.AssignWithConversion("text/plain");
nsAutoString toStr; toStr.AssignWithConversion("text/html");
rv = StreamConvService->AsyncConvertData(fromStr.GetUnicode(),
toStr.GetUnicode(), this, mResponseContext,
getter_AddRefs(converterListener));
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsITXTToHTMLConv> converter(do_QueryInterface(converterListener));
if (converter) {
nsAutoString title; title.AssignWithConversion("Finger information for ");
nsXPIDLCString userHost;
rv = mUrl->GetPath(getter_Copies(userHost));
title.AppendWithConversion(userHost);
converter->SetTitle(title.GetUnicode());
converter->PreFormatHTML(PR_TRUE);
}
return mTransport->AsyncRead(converterListener, mResponseContext, 0, PRUint32(-1), 0,
getter_AddRefs(mTransportRequest));
}
}
// nsIStreamListener method
NS_IMETHODIMP
nsFingerChannel::OnDataAvailable(nsIRequest *aRequest, nsISupports* aContext,
nsIInputStream *aInputStream, PRUint32 aSourceOffset,
PRUint32 aLength) {
mContentLength = aLength;
return mListener->OnDataAvailable(this, mResponseContext, aInputStream, aSourceOffset, aLength);
}
nsresult
nsFingerChannel::SendRequest(nsITransport* aTransport) {
// The text to send should already be in mUser
nsresult rv = NS_OK;
nsCOMPtr<nsISupports> result;
nsCOMPtr<nsIInputStream> charstream;
nsCString requestBuffer(mUser);
if (mLoadGroup) {
mLoadGroup->AddRequest(this, nsnull);
}
requestBuffer.Append(CRLF);
mRequest = requestBuffer.ToNewCString();
rv = NS_NewCharInputStream(getter_AddRefs(result), mRequest);
if (NS_FAILED(rv)) return rv;
charstream = do_QueryInterface(result, &rv);
if (NS_FAILED(rv)) return rv;
rv = NS_AsyncWriteFromStream(getter_AddRefs(mTransportRequest),
aTransport, charstream,
0, requestBuffer.Length(), 0,
this, nsnull);
return rv;
}

View File

@@ -0,0 +1,88 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* 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 Brian Ryner.
* Portions created by Brian Ryner are Copyright (C) 2000 Brian Ryner.
* All Rights Reserved.
*
* Contributor(s):
* Brian Ryner <bryner@uiuc.edu>
*/
#ifndef nsFingerChannel_h___
#define nsFingerChannel_h___
#include "nsString.h"
#include "nsILoadGroup.h"
#include "nsIInputStream.h"
#include "nsIInterfaceRequestor.h"
#include "nsCOMPtr.h"
#include "nsXPIDLString.h"
#include "nsIChannel.h"
#include "nsIURI.h"
#include "nsFingerHandler.h"
#include "nsIStreamListener.h"
#include "nsITransport.h"
class nsFingerChannel
: public nsIChannel,
public nsIStreamListener {
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIREQUEST
NS_DECL_NSICHANNEL
NS_DECL_NSISTREAMLISTENER
NS_DECL_NSIREQUESTOBSERVER
// nsFingerChannel methods:
nsFingerChannel();
virtual ~nsFingerChannel();
// Define a Create method to be used with a factory:
static NS_METHOD
Create(nsISupports* aOuter, const nsIID& aIID, void* *aResult);
nsresult Init(nsIURI* uri);
protected:
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
nsCOMPtr<nsIURI> mOriginalURI;
nsCOMPtr<nsIURI> mUrl;
nsCOMPtr<nsIStreamListener> mListener;
PRUint32 mLoadFlags;
nsCOMPtr<nsILoadGroup> mLoadGroup;
nsCString mContentType;
PRInt32 mContentLength;
nsCOMPtr<nsISupports> mOwner;
PRUint32 mBufferSegmentSize;
PRUint32 mBufferMaxSize;
PRBool mActAsObserver;
PRInt32 mPort;
nsCString mHost;
nsCString mUser;
nsXPIDLCString mRequest;
nsCOMPtr<nsISupports> mResponseContext;
nsCOMPtr<nsITransport> mTransport;
nsCOMPtr<nsIRequest> mTransportRequest;
nsresult mStatus;
protected:
nsresult SendRequest(nsITransport* aTransport);
};
#endif /* nsFingerChannel_h___ */

View File

@@ -0,0 +1,117 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* 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 Brian Ryner.
* Portions created by Brian Ryner are Copyright (C) 2000 Brian Ryner.
* All Rights Reserved.
*
* Contributor(s):
* Brian Ryner <bryner@uiuc.edu>
*/
#include "nspr.h"
#include "nsFingerChannel.h"
#include "nsFingerHandler.h"
#include "nsIURL.h"
#include "nsCRT.h"
#include "nsIComponentManager.h"
#include "nsIServiceManager.h"
#include "nsIInterfaceRequestor.h"
#include "nsIProgressEventSink.h"
#include "nsNetCID.h"
static NS_DEFINE_CID(kSimpleURICID, NS_SIMPLEURI_CID);
////////////////////////////////////////////////////////////////////////////////
nsFingerHandler::nsFingerHandler() {
NS_INIT_REFCNT();
}
nsFingerHandler::~nsFingerHandler() {
}
NS_IMPL_ISUPPORTS1(nsFingerHandler, nsIProtocolHandler)
NS_METHOD
nsFingerHandler::Create(nsISupports* aOuter, const nsIID& aIID, void* *aResult) {
nsFingerHandler* ph = new nsFingerHandler();
if (ph == nsnull)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(ph);
nsresult rv = ph->QueryInterface(aIID, aResult);
NS_RELEASE(ph);
return rv;
}
////////////////////////////////////////////////////////////////////////////////
// nsIProtocolHandler methods:
NS_IMETHODIMP
nsFingerHandler::GetScheme(char* *result) {
*result = nsCRT::strdup("finger");
if (!*result) return NS_ERROR_OUT_OF_MEMORY;
return NS_OK;
}
NS_IMETHODIMP
nsFingerHandler::GetDefaultPort(PRInt32 *result) {
*result = FINGER_PORT;
return NS_OK;
}
NS_IMETHODIMP
nsFingerHandler::NewURI(const char *aSpec, nsIURI *aBaseURI,
nsIURI **result) {
nsresult rv;
// no concept of a relative finger url
NS_ASSERTION(!aBaseURI, "base url passed into finger protocol handler");
nsIURI* url;
rv = nsComponentManager::CreateInstance(kSimpleURICID, nsnull,
NS_GET_IID(nsIURI),
(void**)&url);
if (NS_FAILED(rv)) return rv;
rv = url->SetSpec((char*)aSpec);
if (NS_FAILED(rv)) {
NS_RELEASE(url);
return rv;
}
*result = url;
return rv;
}
NS_IMETHODIMP
nsFingerHandler::NewChannel(nsIURI* url, nsIChannel* *result)
{
nsresult rv;
nsFingerChannel* channel;
rv = nsFingerChannel::Create(nsnull, NS_GET_IID(nsIChannel), (void**)&channel);
if (NS_FAILED(rv)) return rv;
rv = channel->Init(url);
if (NS_FAILED(rv)) {
NS_RELEASE(channel);
return rv;
}
*result = channel;
return NS_OK;
}
////////////////////////////////////////////////////////////////////////////////

View File

@@ -0,0 +1,52 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* 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 Brian Ryner.
* Portions created by Brian Ryner are Copyright (C) 2000 Brian Ryner.
* All Rights Reserved.
*
* Contributor(s):
* Brian Ryner <bryner@uiuc.edu>
*/
// The finger protocol handler creates "finger" URIs of the form
// "finger:user@host" or "finger:host".
#ifndef nsFingerHandler_h___
#define nsFingerHandler_h___
#include "nsIProtocolHandler.h"
#define FINGER_PORT 79
// {0x76d6d5d8-1dd2-11b2-b361-850ddf15ef07}
#define NS_FINGERHANDLER_CID \
{ 0x76d6d5d8, 0x1dd2, 0x11b2, \
{0xb3, 0x61, 0x85, 0x0d, 0xdf, 0x15, 0xef, 0x07} }
class nsFingerHandler : public nsIProtocolHandler
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIPROTOCOLHANDLER
// nsFingerHandler methods:
nsFingerHandler();
virtual ~nsFingerHandler();
// Define a Create method to be used with a factory:
static NS_METHOD Create(nsISupports* aOuter, const nsIID& aIID, void* *aResult);
};
#endif /* nsFingerHandler_h___ */

View File

@@ -0,0 +1,34 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* 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 Brian Ryner.
* Portions created by Brian Ryner are Copyright (C) 2000 Brian Ryner.
* All Rights Reserved.
*
* Contributor(s):
* Brian Ryner <bryner@uiuc.edu>
*/
#include "nsIGenericFactory.h"
#include "nsFingerHandler.h"
static nsModuleComponentInfo gResComponents[] = {
{ "The Finger Protocol Handler",
NS_FINGERHANDLER_CID,
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "finger",
nsFingerHandler::Create
}
};
NS_IMPL_NSGETMODULE(finger, gResComponents)

View File

@@ -0,0 +1,180 @@
/* -*- 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):
*/
#include "nsISupports.idl"
interface nsIDOMDocument;
interface nsIDOMEventListener;
interface nsIHttpChannel;
[scriptable, uuid(b7215e70-4157-11d4-9a42-000064657374)]
interface nsIXMLHttpRequest : nsISupports {
/**
* Meant to be a script-only mechanism for setting a load event listener.
* The attribute is expected to be JavaScript function object. When
* the load event occurs, the function is invoked.
* This attribute should not be used from native code!!
*/
attribute nsISupports onload;
/**
* Meant to be a script-only mechanism for setting an error event listener.
* The attribute is expected to be JavaScript function object. When
* the error event occurs, the function is invoked.
* This attribute should not be used from native code!!
*/
attribute nsISupports onerror;
/**
* The HTTP request uses an HTTP channel in order to perform the
* request. This attribute represents the HTTP channel used
* for the request. NULL if the HTTP channel has not yet been
* created.
*/
readonly attribute nsIHttpChannel channel;
/**
* The response to the HTTP request is parsed as if it were a
* text/xml stream. This attributes represents the response as
* a DOM Document object. NULL if the request is unsuccessful or
* has not yet been sent.
*/
readonly attribute nsIDOMDocument responseXML;
/**
* The response to the HTTP request as text.
* NULL if the request is unsuccessful or
* has not yet been sent.
*/
readonly attribute wstring responseText;
/**
* The status of the response to the HTTP request.
*/
readonly attribute unsigned long status;
/**
* The string representing the status of the response to the
* HTTP request.
*/
readonly attribute string statusText;
/**
* If the HTTP request has been sent already, this method will
* abort the request.
*/
void abort();
/**
* Returns all of the HTTP response headers as a string string.
*
* @returns A string containing all of the response headers.
* NULL if the response has not yet been received.
*/
string getAllResponseHeaders();
/**
* Returns the text of the header with the specified name.
*
* @param header The name of the header to retrieve
* @returns A string containing the text of the header specified.
* NULL if the response has not yet been received or the
* header does not exist in the response.
*/
string getResponseHeader(in string header);
/**
* Native (non-script) method to initialize a request. Note that
* the HTTP request is not sent until the <code>send</code> method
* is invoked.
*
* @param method The HTTP method - either "POST" or "GET".
* @param url The URL to which to send the request.
* @param async Whether the request is synchronous or asynchronous
* i.e. whether send returns only after the response
* is received or if it returns immediately after
* sending the request. In the latter case, notification
* of completion is sent through the event listeners.
* @param user A username for authentication if necessary.
* @param password A password for authentication if necessary.
*/
[noscript] void openRequest(in string method,
in string url,
in boolean async,
in string user,
in string password);
/**
* Meant to be a script-only method for initializing a request.
* The parameters are similar to the ones detailed in the
* description of <code>openRequest</code>, but the last
* 3 are optional.
*
* @param method The HTTP method - either "POST" or "GET".
* @param url The URL to which to send the request.
* @param async (optional) Whether the request is synchronous or
* asynchronous i.e. whether send returns only after
* the response is received or if it returns immediately after
* sending the request. In the latter case, notification
* of completion is sent through the event listeners.
* The default value is true.
* @param user (optional) A username for authentication if necessary.
* The default value is the empty string
* @param password (optional) A password for authentication if necessary.
* The default value is the empty string
*/
void open(in string method, in string url);
/**
* Sends the HTTP request. If the request is asynchronous, returns
* immediately after sending the request. If it is synchronous
* returns only after the response has been received.
*
* @param body Either an instance of nsIDOMDocument, nsIInputStream
* or a string (nsISupportsWString in the native calling
* case). This is used to populate the body of the
* HTTP request if the HTTP request method is "POST".
* If the parameter is a nsIDOMDocument, it is serialized.
* If the parameter is a nsIInputStream, it is expected
* to contain the ContentType: and ContentLength: headers
* and trailing carriage-return/line-feed pairs.
*/
void send(in nsISupports body);
/**
* Sets a HTTP request header.
*
* @param header The name of the header to set in the request.
* @param value The body of the header.
*/
void setRequestHeader(in string header, in string value);
};
%{ C++
#define NS_XMLHTTPREQUEST_CID \
{ /* d164e770-4157-11d4-9a42-000064657374 */ \
0xd164e770, 0x4157, 0x11d4, \
{0x9a, 0x42, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74} }
#define NS_XMLHTTPREQUEST_CONTRACTID \
"@mozilla.org/xmlextras/xmlhttprequest;1"
%}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,244 @@
/* -*- 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):
*/
#ifndef nsXMLHttpRequest_h__
#define nsXMLHttpRequest_h__
#define IMPLEMENT_SYNC_LOAD
#include "nsIXMLHttpRequest.h"
#include "nsISupportsUtils.h"
#include "nsCOMPtr.h"
#include "nsString.h"
#include "nsIDOMLoadListener.h"
#include "nsIDOMEventTarget.h"
#include "nsIDOMDocument.h"
#include "nsISecurityCheckedComponent.h"
#include "nsIURI.h"
#include "nsIHttpChannel.h"
#include "nsIDocument.h"
#include "nsIStreamListener.h"
#ifdef IMPLEMENT_SYNC_LOAD
#include "nsIWebBrowserChrome.h"
#endif
#include "nsWeakReference.h"
#include "nsISupportsArray.h"
#include "jsapi.h"
enum {
XML_HTTP_REQUEST_INITIALIZED,
XML_HTTP_REQUEST_OPENED,
XML_HTTP_REQUEST_SENT,
XML_HTTP_REQUEST_COMPLETED,
XML_HTTP_REQUEST_ABORTED
};
class nsXMLHttpRequest : public nsIXMLHttpRequest,
public nsIDOMLoadListener,
public nsIDOMEventTarget,
public nsISecurityCheckedComponent,
public nsIStreamListener,
public nsSupportsWeakReference
{
public:
nsXMLHttpRequest();
virtual ~nsXMLHttpRequest();
NS_DECL_ISUPPORTS
// nsIXMLHttpRequest
NS_DECL_NSIXMLHTTPREQUEST
// nsIDOMEventTarget
NS_DECL_NSIDOMEVENTTARGET
// nsIDOMEventListener
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent);
// nsIDOMLoadListener
NS_IMETHOD Load(nsIDOMEvent* aEvent);
NS_IMETHOD Unload(nsIDOMEvent* aEvent);
NS_IMETHOD Abort(nsIDOMEvent* aEvent);
NS_IMETHOD Error(nsIDOMEvent* aEvent);
// nsISecurityCheckedComponent
NS_DECL_NSISECURITYCHECKEDCOMPONENT
// nsIStreamListener
NS_DECL_NSISTREAMLISTENER
// nsIRequestObserver
NS_DECL_NSIREQUESTOBSERVER
protected:
nsresult MakeScriptEventListener(nsISupports* aObject,
nsIDOMEventListener** aListener);
void GetScriptEventListener(nsISupportsArray* aList,
nsIDOMEventListener** aListener);
PRBool StuffReturnValue(nsIDOMEventListener* aListener);
nsresult GetStreamForWString(const PRUnichar* aStr,
PRInt32 aLength,
nsIInputStream** aStream);
nsCOMPtr<nsISupports> mContext;
nsCOMPtr<nsIHttpChannel> mChannel;
nsCOMPtr<nsIRequest> mReadRequest;
nsCOMPtr<nsIDOMDocument> mDocument;
nsCOMPtr<nsIURI> mBaseURI;
nsCOMPtr<nsIDocument> mBaseDocument;
#ifdef IMPLEMENT_SYNC_LOAD
nsCOMPtr<nsIWebBrowserChrome> mChromeWindow;
#endif
nsCOMPtr<nsISupportsArray> mLoadEventListeners;
nsCOMPtr<nsISupportsArray> mErrorEventListeners;
nsresult DetectCharset(nsAWritableString& aCharset);
nsresult ConvertBodyToText(PRUnichar **aOutBuffer);
static NS_METHOD StreamReaderFunc(nsIInputStream* in,
void* closure,
const char* fromRawSegment,
PRUint32 toOffset,
PRUint32 count,
PRUint32 *writeCount);
// used to implement getAllResponseHeaders()
class nsHeaderVisitor : public nsIHttpHeaderVisitor {
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIHTTPHEADERVISITOR
nsHeaderVisitor() { NS_INIT_ISUPPORTS(); }
virtual ~nsHeaderVisitor() {}
const nsACString &Headers() { return mHeaders; }
private:
nsCString mHeaders;
};
#if 1 // When nsCString::Append()/Length() works for strings that contain nulls, remove this buffer impl
class ResponseBodyBuffer {
public:
ResponseBodyBuffer()
: mBuffer(0),
mBufferSize(0),
mBufferFreeIndex(0),
mCanBeString(PR_FALSE),
mBufferChecked(PR_FALSE) {}
~ResponseBodyBuffer() { nsMemory::Free(mBuffer); }
void Truncate(void) {
nsMemory::Free(mBuffer);
mBuffer=nsnull;
mBufferSize=mBufferFreeIndex=0;
mCanBeString = PR_FALSE;
mBufferChecked = PR_FALSE;
}
nsresult Append(const char* aBuffer, PRUint32 aBufferLen) {
if (aBufferLen > (mBufferSize-mBufferFreeIndex)) {
PRUint32 newBufferSize = (mBufferSize > aBufferLen ? mBufferSize : aBufferLen)<<1;
char * newBuffer = NS_STATIC_CAST(char*,nsMemory::Realloc(mBuffer,newBufferSize));
if (!newBuffer) {
nsMemory::Free(mBuffer);
mBuffer = nsnull;
mBufferChecked = PR_FALSE;
mCanBeString = PR_FALSE;
return NS_ERROR_OUT_OF_MEMORY;
}
mBuffer = newBuffer;
mBufferSize = newBufferSize;
}
memcpy(&mBuffer[mBufferFreeIndex],aBuffer,aBufferLen);
mBufferFreeIndex += aBufferLen;
mBufferChecked = PR_FALSE;
mCanBeString = PR_FALSE;
return NS_OK;
}
const char * GetBuffer(void) { return mBuffer; }
PRUint32 GetBufferLength(void) { return mBufferFreeIndex; }
PRBool CanBeString(void) {
if (!mBufferFreeIndex)
return PR_TRUE; // Perhaps this is a bit questionable...
if (!mBufferChecked) {
mBufferChecked = PR_TRUE;
mCanBeString = PR_TRUE;
PRUint32 i;
for (i = 0; i < mBufferFreeIndex; i++) {
if (!mBuffer[i]) {
mCanBeString = PR_FALSE;
break;
}
}
}
return mCanBeString;
}
private:
char *mBuffer;
PRUint32 mBufferSize;
PRUint32 mBufferFreeIndex;
PRPackedBool mCanBeString;
PRPackedBool mBufferChecked;
};
ResponseBodyBuffer mResponseBody;
#else
nsCString mResponseBody;
#endif
nsCOMPtr<nsIStreamListener> mXMLParserStreamListener;
PRInt32 mStatus;
PRBool mAsync;
};
#define NS_IPRIVATEJSEVENTLISTENER_IID \
{ /* d47a6550-4327-11d4-9a45-000064657374 */ \
0xd47a6550, 0x4327, 0x11d4, \
{0x9a, 0x45, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74} }
class nsIPrivateJSEventListener : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPRIVATEJSEVENTLISTENER_IID)
NS_IMETHOD GetFunctionObj(JSObject** aObj) = 0;
};
class nsXMLHttpRequestScriptListener : public nsIDOMEventListener,
public nsIPrivateJSEventListener
{
public:
nsXMLHttpRequestScriptListener(JSObject* aScopeObj, JSObject* aFunctionObj);
virtual ~nsXMLHttpRequestScriptListener();
NS_DECL_ISUPPORTS
// nsIDOMEventListener
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent);
// nsIPrivateJSEventListener
NS_IMETHOD GetFunctionObj(JSObject** aObj);
protected:
JSObject* mScopeObj;
JSObject* mFunctionObj;
};
#endif

View File

@@ -0,0 +1,907 @@
/* -*- 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):
*/
#include "libimg.h"
#include "nsImageNet.h"
#include "ilINetContext.h"
#include "ilIURL.h"
#include "ilINetReader.h"
#include "ilErrors.h"
#include "nsIStreamListener.h"
#include "nsIInputStream.h"
#include "nsIURL.h"
#include "nsILoadGroup.h"
#include "nsIChannel.h"
#include "nsCOMPtr.h"
#include "nsWeakPtr.h"
#include "prprf.h"
#include "nsITimer.h"
#include "nsVoidArray.h"
#include "nsString.h"
#include "prmem.h"
#include "plstr.h"
#include "nsNetUtil.h"
#include "nsCURILoader.h"
#include "nsIURIContentListener.h"
#include "nsIHttpChannel.h"
#include "nsIStreamConverterService.h"
#include "nsIPref.h"
static NS_DEFINE_CID(kStreamConvServiceCID, NS_STREAMCONVERTERSERVICE_CID);
static NS_DEFINE_IID(kIURLIID, NS_IURL_IID);
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
PRLogModuleInfo *image_net_context_async_log_module = NULL;
#define IMAGE_BUF_SIZE 4096
class ImageConsumer;
class ImageNetContextImpl : public ilINetContext {
public:
ImageNetContextImpl(ImgCachePolicy aReloadPolicy,
nsISupports * aLoadContext,
nsReconnectCB aReconnectCallback,
void* aReconnectArg);
virtual ~ImageNetContextImpl();
NS_DECL_ISUPPORTS
virtual ilINetContext* Clone();
virtual ImgCachePolicy GetReloadPolicy();
virtual ImgCachePolicy SetReloadPolicy(ImgCachePolicy ReloadPolicy);
virtual void AddReferer(ilIURL *aUrl);
virtual void Interrupt();
virtual ilIURL* CreateURL(const char *aUrl,
ImgCachePolicy aReloadMethod);
virtual PRBool IsLocalFileURL(char *aAddress);
#ifdef NU_CACHE
virtual PRBool IsURLInCache(ilIURL *aUrl);
#else /* NU_CACHE */
virtual PRBool IsURLInMemCache(ilIURL *aUrl);
virtual PRBool IsURLInDiskCache(ilIURL *aUrl);
#endif
virtual int GetURL (ilIURL * aUrl, ImgCachePolicy aLoadMethod,
ilINetReader *aReader, PRBool IsAnimationLoop);
virtual int GetContentLength(ilIURL * aURL);
nsresult RemoveRequest(ImageConsumer *aConsumer);
nsresult RequestDone(ImageConsumer *aConsumer, nsIRequest* request,
nsISupports* ctxt, nsresult status, const PRUnichar* aMsg);
nsVoidArray *mRequests; // WEAK references to |ImageConsumer|s
ImgCachePolicy mReloadPolicy;
nsWeakPtr mLoadContext;
nsReconnectCB mReconnectCallback;
void* mReconnectArg;
};
class ImageConsumer : public nsIStreamListener, public nsIURIContentListener, public nsIInterfaceRequestor
{
public:
NS_DECL_ISUPPORTS
ImageConsumer(ilIURL *aURL, ImageNetContextImpl *aContext);
// nsIRequestObserver methods:
NS_DECL_NSIREQUESTOBSERVER
NS_DECL_NSISTREAMLISTENER
NS_DECL_NSIURICONTENTLISTENER
NS_DECL_NSIINTERFACEREQUESTOR
void SetKeepPumpingData(nsIRequest* request, nsISupports* context) {
NS_ADDREF(request);
NS_IF_RELEASE(mRequest);
mRequest = request;
NS_IF_ADDREF(context);
NS_IF_RELEASE(mUserContext);
mUserContext = context;
}
void Interrupt();
static void KeepPumpingStream(nsITimer *aTimer, void *aClosure);
protected:
virtual ~ImageConsumer();
ilIURL *mURL;
PRBool mInterrupted;
ImageNetContextImpl *mContext;
nsIInputStream *mStream;
nsCOMPtr<nsITimer> mTimer;
PRBool mFirstRead;
char *mBuffer;
PRInt32 mStatus;
nsIRequest* mRequest;
nsISupports* mUserContext;
PRBool mIsMulti;
};
ImageConsumer::ImageConsumer(ilIURL *aURL, ImageNetContextImpl *aContext)
{
NS_INIT_REFCNT();
mURL = aURL;
NS_ADDREF(mURL);
mContext = aContext;
NS_ADDREF(mContext);
mInterrupted = PR_FALSE;
mFirstRead = PR_TRUE;
mStream = nsnull;
mBuffer = nsnull;
mStatus = 0;
mRequest = nsnull;
mUserContext = nsnull;
mIsMulti = PR_FALSE;
}
NS_IMPL_THREADSAFE_ADDREF(ImageConsumer)
NS_IMPL_THREADSAFE_RELEASE(ImageConsumer)
NS_INTERFACE_MAP_BEGIN(ImageConsumer)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIURIContentListener)
NS_INTERFACE_MAP_ENTRY(nsIStreamListener)
NS_INTERFACE_MAP_ENTRY(nsIRequestObserver)
NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor)
NS_INTERFACE_MAP_ENTRY(nsIURIContentListener)
NS_INTERFACE_MAP_END
NS_IMETHODIMP ImageConsumer::GetInterface(const nsIID & aIID, void * *aInstancePtr)
{
NS_ENSURE_ARG_POINTER(aInstancePtr);
return QueryInterface(aIID, aInstancePtr);
}
// nsIURIContentListener support
NS_IMETHODIMP
ImageConsumer::OnStartURIOpen(nsIURI* aURI,
const char* aWindowTarget, PRBool* aAbortOpen)
{
return NS_OK;
}
NS_IMETHODIMP
ImageConsumer::GetProtocolHandler(nsIURI *aURI, nsIProtocolHandler **aProtocolHandler)
{
*aProtocolHandler = nsnull;
return NS_OK;
}
NS_IMETHODIMP
ImageConsumer::GetParentContentListener(nsIURIContentListener** aParent)
{
*aParent = nsnull;
return NS_OK;
}
NS_IMETHODIMP
ImageConsumer::SetParentContentListener(nsIURIContentListener* aParent)
{
return NS_OK;
}
NS_IMETHODIMP
ImageConsumer::GetLoadCookie(nsISupports ** aLoadCookie)
{
nsCOMPtr<nsISupports> loadContext = do_QueryReferent(mContext->mLoadContext);
*aLoadCookie = loadContext;
NS_IF_ADDREF(*aLoadCookie);
return NS_OK;
}
NS_IMETHODIMP
ImageConsumer::SetLoadCookie(nsISupports * aLoadCookie)
{
return NS_OK;
}
NS_IMETHODIMP
ImageConsumer::IsPreferred(const char * aContentType,
nsURILoadCommand aCommand,
const char * aWindowTarget,
char ** aDesiredContentType,
PRBool * aCanHandleContent)
{
return CanHandleContent(aContentType, aCommand, aWindowTarget,
aDesiredContentType, aCanHandleContent);
}
NS_IMETHODIMP
ImageConsumer::CanHandleContent(const char * aContentType,
nsURILoadCommand aCommand,
const char * aWindowTarget,
char ** aDesiredContentType,
PRBool * aCanHandleContent)
{
// if we had a webshell or doc shell around, we'd pass this call
// through to it...but we don't =(
if (!nsCRT::strcasecmp(aContentType, "message/rfc822"))
*aDesiredContentType = nsCRT::strdup("application/vnd.mozilla.xul+xml");
// since we explicilty loaded the url, we always want to handle it!
*aCanHandleContent = PR_TRUE;
return NS_OK;
}
NS_IMETHODIMP
ImageConsumer::DoContent(const char * aContentType,
nsURILoadCommand aCommand,
const char * aWindowTarget,
nsIRequest * aOpenedChannel,
nsIStreamListener ** aContentHandler,
PRBool * aAbortProcess)
{
nsresult rv = NS_OK;
if (aAbortProcess)
*aAbortProcess = PR_FALSE;
nsAutoString contentType; contentType.AssignWithConversion(aContentType);
if (contentType.EqualsWithConversion("multipart/x-mixed-replace")
|| contentType.EqualsWithConversion("multipart/mixed")) {
// if we're getting multipart data, we have to convert it.
// so wedge the converter inbetween us and the consumer.
mIsMulti= PR_TRUE;
nsCOMPtr<nsIStreamConverterService> convServ = do_GetService(kStreamConvServiceCID, &rv);
if (NS_FAILED(rv)) return rv;
nsAutoString astrix; astrix.AssignWithConversion("*/*");
return convServ->AsyncConvertData(contentType.GetUnicode(),
astrix.GetUnicode(),
NS_STATIC_CAST(nsIStreamListener*, this),
nsnull /*a context?*/, aContentHandler);
}
QueryInterface(NS_GET_IID(nsIStreamListener), (void **) aContentHandler);
return rv;
}
NS_IMETHODIMP
ImageConsumer::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext)
{
nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
PRUint32 httpStatus;
if (mInterrupted) {
mStatus = MK_INTERRUPTED;
return NS_ERROR_ABORT;
}
mBuffer = (char *)PR_MALLOC(IMAGE_BUF_SIZE);
if (mBuffer == nsnull) {
mStatus = MK_IMAGE_LOSSAGE;
return NS_ERROR_ABORT;
}
nsCOMPtr<nsIHttpChannel> pHTTPCon(do_QueryInterface(channel));
if (pHTTPCon) {
pHTTPCon->GetResponseStatus(&httpStatus);
if (httpStatus == 404) {
mStatus = MK_IMAGE_LOSSAGE;
return NS_ERROR_ABORT;
}
}
ilINetReader *reader = mURL->GetReader(); //ptn test: nsCOMPtr??
/*nsresult err=*/ reader->FlushImgBuffer(); //flush current data in buffer before starting
nsresult rv = NS_OK;
char* aContentType = NULL;
rv = channel->GetContentType(&aContentType); //nsCRT alloc's str
if (NS_FAILED(rv)) {
if(aContentType){
nsCRT::free(aContentType);
}
aContentType = nsCRT::strdup("unknown");
}
if(nsCRT::strlen(aContentType) > 50){
//somethings wrong. mimetype string shouldn't be this big.
//protect us from the user.
nsCRT::free(aContentType);
aContentType = nsCRT::strdup("unknown");
}
if (reader->StreamCreated(mURL, aContentType) != PR_TRUE) {
mStatus = MK_IMAGE_LOSSAGE;
reader->StreamAbort(mStatus);
NS_RELEASE(reader);
nsCRT::free(aContentType);
return NS_ERROR_ABORT;
}
nsCRT::free(aContentType);
NS_RELEASE(reader);
return NS_OK;
}
#define IMAGE_BUF_SIZE 4096
NS_IMETHODIMP
ImageConsumer::OnDataAvailable(nsIRequest* request, nsISupports* aContext,
nsIInputStream *pIStream, PRUint32 offset, PRUint32 length)
{
PRUint32 max_read=0;
PRUint32 bytes_read = 0;
ilINetReader *reader = mURL->GetReader();
nsCOMPtr<nsIChannel> channel = do_QueryInterface(request);
if (mInterrupted || mStatus != 0) {
mStatus = MK_INTERRUPTED;
reader->StreamAbort(mStatus);
NS_RELEASE(reader);
return NS_ERROR_ABORT;
}
nsresult err = 0;
PRUint32 nb = 0;
char* uriStr = NULL;
nsCOMPtr<nsIURI> uri;
err = channel->GetURI(getter_AddRefs(uri));
if (NS_SUCCEEDED(err) && uri) {
err = uri->GetSpec(&uriStr);
if (NS_FAILED(err)){
/* if we can't get a file spec, it is bad, very bad.*/
mStatus = MK_INTERRUPTED;
reader->StreamAbort(mStatus);
NS_RELEASE(reader);
return NS_ERROR_ABORT;
}
}
do {
err = reader->WriteReady(&max_read); //max read is most decoder can handle
if(NS_FAILED(err)) //note length tells how much we already have.
break;
if(max_read < 0){
max_read = 128;
}
if (max_read > (length - bytes_read)) {
max_read = length - bytes_read;
}
if (max_read > IMAGE_BUF_SIZE) {
max_read = IMAGE_BUF_SIZE;
}
// make sure there's enough data available to decode the image.
// put test into WriteReady
if (mFirstRead && length < 4)
break;
err = pIStream->Read(mBuffer,
max_read, &nb);
if (err == NS_BASE_STREAM_WOULD_BLOCK) {
NS_ASSERTION(nb == 0, "Data will be lost.");
err = NS_OK;
break;
}
if (NS_FAILED(err) || nb == 0) {
NS_ASSERTION(nb == 0, "Data will be lost.");
break;
}
bytes_read += nb;
if (mFirstRead == PR_TRUE) {
err = reader->FirstWrite((const unsigned char *)mBuffer, nb, uriStr);
mFirstRead = PR_FALSE; //? move after err chk?
/*
* If FirstWrite(...) fails then the image type
* cannot be determined and the il_container
* stream functions have not been initialized!
*/
if (NS_FAILED(err)) {
mStatus = MK_IMAGE_LOSSAGE;
mInterrupted = PR_TRUE;
if(uriStr)
nsCRT::free(uriStr);
NS_RELEASE(reader);
return NS_ERROR_ABORT;
}
}
err = reader->Write((const unsigned char *)mBuffer, (int32)nb);
if(NS_FAILED(err)){
mStatus = MK_IMAGE_LOSSAGE;
mInterrupted = PR_TRUE;
if(uriStr)
nsCRT::free(uriStr);
NS_RELEASE(reader);
return NS_ERROR_ABORT;
}
} while(bytes_read < length);
if (uriStr) {
nsCRT::free(uriStr);
}
if (NS_FAILED(err)) {
mStatus = MK_IMAGE_LOSSAGE;
mInterrupted = PR_TRUE;
}
if (bytes_read < length) {
// If we haven't emptied the stream, hold onto it, because
// we will need to read from it subsequently and we don't
// know if we'll get a OnDataAvailable call again.
//
// Addref the new stream before releasing the old one,
// in case it is the same stream!
NS_ADDREF(pIStream);
NS_IF_RELEASE(mStream);
mStream = pIStream;
} else {
NS_IF_RELEASE(mStream);
}
NS_RELEASE(reader);
return NS_OK;
}
void
ImageConsumer::KeepPumpingStream(nsITimer *aTimer, void *aClosure)
{
ImageConsumer *consumer = (ImageConsumer *)aClosure;
consumer->OnStopRequest(consumer->mRequest, consumer->mUserContext,
NS_BINDING_SUCCEEDED);
}
NS_IMETHODIMP
ImageConsumer::OnStopRequest(nsIRequest* request, nsISupports* aContext, nsresult status)
{
if (mTimer) {
mTimer->Cancel();
mTimer = nsnull;
}
if (NS_BINDING_SUCCEEDED != status) {
mStatus = MK_INTERRUPTED;
}
// Since we're still holding on to the stream, there's still data
// that needs to be read. So, pump the stream ourselves.
if((mStream != nsnull) && (status == NS_BINDING_SUCCEEDED)) {
PRUint32 str_length;
nsresult err = mStream->Available(&str_length);
if (NS_SUCCEEDED(err)) {
NS_ASSERTION((str_length > 0), "No data left in the stream!");
err = OnDataAvailable(request, aContext, mStream, 0, str_length); // XXX fix offset
if (NS_SUCCEEDED(err)) {
// If we still have the stream, there's still data to be
// pumped, so we set a timer to call us back again.
if (mStream) {
SetKeepPumpingData(request, aContext);
nsresult rv;
mTimer = do_CreateInstance("@mozilla.org/timer;1", &rv);
if (NS_FAILED(rv) ||
(NS_OK != mTimer->Init(ImageConsumer::KeepPumpingStream, this, 0))) {
mStatus = MK_IMAGE_LOSSAGE;
NS_RELEASE(mStream);
}
else {
return NS_OK;
}
}
}
else {
mStatus = MK_IMAGE_LOSSAGE;
NS_IF_RELEASE(mStream);
}
}
else {
mStatus = MK_IMAGE_LOSSAGE;
NS_IF_RELEASE(mStream);
}
}
ilINetReader *reader = mURL->GetReader();
if (0 != mStatus) {
reader->StreamAbort(mStatus);
}
else {
reader->StreamComplete(mIsMulti);
}
if(mIsMulti)
mFirstRead = PR_TRUE; //reset to read new frame
reader->NetRequestDone(mURL, mStatus);
NS_RELEASE(reader);
return mContext->RequestDone(this, request, aContext, status, nsnull);
}
void
ImageConsumer::Interrupt()
{
mInterrupted = PR_TRUE;
}
ImageConsumer::~ImageConsumer()
{
if (mTimer) {
mTimer->Cancel();
mTimer = nsnull;
}
if (mContext) {
nsresult res = mContext->RemoveRequest(this);
if (NS_SUCCEEDED(res)) {
// The load was canceled.
mStatus = MK_INTERRUPTED;
if (mURL) {
nsCOMPtr<ilINetReader> reader( dont_AddRef( mURL->GetReader() ) );
reader->StreamAbort(mStatus);
reader->NetRequestDone(mURL, mStatus);
}
}
NS_RELEASE(mContext);
}
NS_IF_RELEASE(mURL);
NS_IF_RELEASE(mStream);
if (mBuffer != nsnull) {
PR_DELETE(mBuffer);
}
NS_IF_RELEASE(mRequest);
NS_IF_RELEASE(mUserContext);
}
ImageNetContextImpl::ImageNetContextImpl(ImgCachePolicy aReloadPolicy,
nsISupports * aLoadContext,
nsReconnectCB aReconnectCallback,
void* aReconnectArg)
{
NS_INIT_REFCNT();
mRequests = nsnull;
mLoadContext = getter_AddRefs(NS_GetWeakReference(aLoadContext));
mReloadPolicy = aReloadPolicy;
mReconnectCallback = aReconnectCallback;
mReconnectArg = aReconnectArg;
}
ImageNetContextImpl::~ImageNetContextImpl()
{
delete mRequests;
}
NS_IMPL_THREADSAFE_ISUPPORTS1(ImageNetContextImpl, ilINetContext)
ilINetContext*
ImageNetContextImpl::Clone()
{
ilINetContext *cx;
nsCOMPtr<nsISupports> loadContext = do_QueryReferent(mLoadContext);
//mReconnectArg is ImageGroup. If GetURL is triggered
//by timer for animation, ImageGroup may have been unloaded
//before timer kicks off.
//mReconnectCallback=nsnull; mReconnectArg=nsnull;
if (NS_NewImageNetContext(&cx, loadContext, mReconnectCallback, mReconnectArg) == NS_OK)
{
return cx;
}
else {
return nsnull;
}
}
ImgCachePolicy
ImageNetContextImpl::GetReloadPolicy()
{
return mReloadPolicy;
}
ImgCachePolicy
ImageNetContextImpl::SetReloadPolicy(ImgCachePolicy reloadpolicy)
{
mReloadPolicy=reloadpolicy;
return mReloadPolicy;
}
void
ImageNetContextImpl::AddReferer(ilIURL *aUrl)
{
}
void
ImageNetContextImpl::Interrupt()
{
if (mRequests != nsnull) {
int i, count = mRequests->Count();
for (i=0; i < count; i++) {
ImageConsumer *ic = (ImageConsumer *)mRequests->ElementAt(i);
ic->Interrupt();
}
}
}
ilIURL*
ImageNetContextImpl::CreateURL(const char *aURL,
ImgCachePolicy aReloadMethod)
{
ilIURL *url;
nsCOMPtr<nsISupports> loadContext (do_QueryReferent(mLoadContext));
nsCOMPtr<nsILoadGroup> group (do_GetInterface(loadContext));
if (NS_NewImageURL(&url, aURL, group) == NS_OK)
{
return url;
}
else {
return nsnull;
}
}
PRBool
ImageNetContextImpl::IsLocalFileURL(char *aAddress)
{
if (PL_strncasecmp(aAddress, "file:", 5) == 0) {
return PR_TRUE;
}
else {
return PR_FALSE;
}
}
#ifdef NU_CACHE
PRBool
ImageNetContextImpl::IsURLInCache(ilIURL *aUrl)
{
return PR_TRUE;
}
#else /* NU_CACHE */
PRBool
ImageNetContextImpl::IsURLInMemCache(ilIURL *aUrl)
{
return PR_FALSE;
}
PRBool
ImageNetContextImpl::IsURLInDiskCache(ilIURL *aUrl)
{
return PR_TRUE;
}
#endif /* NU_CACHE */
int
ImageNetContextImpl::GetContentLength (ilIURL * aURL)
{
return -1;
}
int
ImageNetContextImpl::GetURL (ilIURL * aURL,
ImgCachePolicy aLoadMethod,
ilINetReader *aReader,
PRBool IsAnimationLoop)
{
NS_PRECONDITION(nsnull != aURL, "null URL");
NS_PRECONDITION(nsnull != aReader, "null reader");
if (aURL == nsnull || aReader == nsnull) {
return -1;
}
if (mRequests == nsnull) {
mRequests = new nsVoidArray();
if (mRequests == nsnull) {
// XXX Should still call exit function
return -1;
}
}
int ret;
nsresult rv;
nsCOMPtr<nsIURI> nsurl = do_QueryInterface(aURL, &rv);
if (NS_FAILED(rv)) return 0;
aURL->SetReader(aReader);
SetReloadPolicy(aLoadMethod);
// Find previously created ImageConsumer if possible
ImageConsumer *ic = new ImageConsumer(aURL, this);
if (ic == nsnull)
return -1;
NS_ADDREF(ic);
// See if a reconnect is being done...(XXX: hack!)
if (mReconnectCallback == nsnull
|| !(*mReconnectCallback)(mReconnectArg, ic)) {
// first, create a channel for the protocol....
nsCOMPtr<nsIChannel> channel;
nsCOMPtr<nsISupports> loadContext (do_QueryReferent(mLoadContext));
nsCOMPtr<nsILoadGroup> group (do_GetInterface(loadContext));
nsCOMPtr<nsIInterfaceRequestor> sink(do_QueryInterface(loadContext));
nsLoadFlags flags=0;
if(IsAnimationLoop)
flags |= nsIRequest::LOAD_FROM_CACHE;
rv = NS_OpenURI(getter_AddRefs(channel), nsurl, nsnull, group, sink, flags);
if (NS_FAILED(rv)) goto error;
nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(channel);
if (httpChannel)
{
// Get the defloadRequest from the loadgroup-
nsCOMPtr<nsIRequest> defLoadRequest;
if (NS_SUCCEEDED(group->GetDefaultLoadRequest(
getter_AddRefs(defLoadRequest))) && defLoadRequest)
{
nsCOMPtr<nsIChannel> reqchannel = do_QueryInterface(defLoadRequest);
// Get the referrer from the loadchannel-
nsCOMPtr<nsIURI> referrer;
if (NS_SUCCEEDED(reqchannel->GetURI(getter_AddRefs(referrer))))
{
// Set the referrer-
httpChannel->SetReferrer(referrer, nsIHttpChannel::REFERRER_INLINES);
}
}
}
rv = channel->GetLoadFlags(&flags);
if (NS_FAILED(rv)) goto error;
if (aURL->GetBackgroundLoad())
flags |= nsIRequest::LOAD_BACKGROUND;
(void)channel->SetLoadFlags(flags);
nsCOMPtr<nsISupports> window (do_QueryInterface(NS_STATIC_CAST(nsIStreamListener *, ic)));
// let's try uri dispatching...
nsCOMPtr<nsIURILoader> pURILoader (do_GetService(NS_URI_LOADER_CONTRACTID, &rv));
if (NS_SUCCEEDED(rv))
{
nsURILoadCommand loadCmd = nsIURILoader::viewNormal;
PRBool bIsBackground = aURL->GetBackgroundLoad();
if (bIsBackground) {
loadCmd = nsIURILoader::viewNormalBackground;
}
rv = pURILoader->OpenURI(channel, loadCmd, nsnull /* window target */,
window);
}
// rv = channel->AsyncOpen(ic, nsnull);
if (NS_FAILED(rv)) goto error;
}
ret = mRequests->AppendElement((void *)ic) ? 0 : -1;
NS_RELEASE(ic); // if nothing else is holding onto it, it will remove
// itself from mRequests
return ret;
error:
NS_RELEASE(ic);
return -1;
}
nsresult
ImageNetContextImpl::RemoveRequest(ImageConsumer *aConsumer)
{
nsresult rv = NS_OK;
if (mRequests) {
rv = mRequests->RemoveElement((void *)aConsumer)?NS_OK:NS_ERROR_FAILURE;
}
return rv;
}
nsresult
ImageNetContextImpl::RequestDone(ImageConsumer *aConsumer, nsIRequest* request,
nsISupports* ctxt, nsresult status, const PRUnichar* aMsg)
{
RemoveRequest(aConsumer);
/// if (mLoadGroup)
/// return mLoadGroup->RemoveChannel(channel, ctxt, status, aMsg);
/// else
return NS_OK;
}
extern "C" NS_GFX_(nsresult)
NS_NewImageNetContext(ilINetContext **aInstancePtrResult,
nsISupports * aLoadContext,
nsReconnectCB aReconnectCallback,
void* aReconnectArg)
{
PRUint32 necko_attribs;
ImgCachePolicy imglib_attribs = USE_IMG_CACHE;
nsLoadFlags defchan_attribs = nsIRequest::LOAD_NORMAL;
NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr");
if (nsnull == aInstancePtrResult) {
return NS_ERROR_NULL_POINTER;
}
if(aLoadContext){
nsCOMPtr<nsILoadGroup> group (do_GetInterface(aLoadContext));
/*nsresult rv = */group->GetLoadFlags(&necko_attribs);
/*
Need code to check freshness of necko cache.
*/
nsCOMPtr<nsIRequest> defLoadRequest;
nsCOMPtr<nsIChannel> channel;
if (NS_SUCCEEDED(group->GetDefaultLoadRequest(
getter_AddRefs(defLoadRequest))) && defLoadRequest)
{
channel = do_QueryInterface(defLoadRequest);
if (channel) channel->GetLoadFlags(&defchan_attribs);
}
#if defined( DEBUG )
if (image_net_context_async_log_module == NULL) {
image_net_context_async_log_module = PR_NewLogModule("IMAGENETCTXASYNC");
}
#endif
if((nsIRequest::VALIDATE_ALWAYS & defchan_attribs)||
(nsIRequest::INHIBIT_PERSISTENT_CACHING & defchan_attribs)||
(nsIRequest::LOAD_BYPASS_CACHE & defchan_attribs)) {
imglib_attribs = DONT_USE_IMG_CACHE;
#if defined( DEBUG )
PR_LOG(image_net_context_async_log_module, 1, ("ImageNetContextAsync: NS_NewImageNetContext: DONT_USE_IMAGE_CACHE\n"));
#endif
}
}
ilINetContext *cx = new ImageNetContextImpl( imglib_attribs,
aLoadContext,
aReconnectCallback,
aReconnectArg);
if (cx == nsnull) {
return NS_ERROR_OUT_OF_MEMORY;
}
return cx->QueryInterface(NS_GET_IID(ilINetContext), (void **) aInstancePtrResult);
}

View File

@@ -0,0 +1,106 @@
/* -*- 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) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
//#define DONT_INFORM_WEBSHELL
#include "nsIServiceManager.h"
#include "nsIDocumentLoader.h"
#include "nsIWebShellServices.h"
#include "nsIContentViewerContainer.h"
#include "nsCURILoader.h"
#include "nsObserverBase.h"
#include "nsIParser.h"
#include "nsString.h"
#include "nsIDocShell.h"
#include "nsIHttpChannel.h"
#include "nsXPIDLString.h"
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
static NS_DEFINE_IID(kDocLoaderServiceCID, NS_DOCUMENTLOADER_SERVICE_CID);
static NS_DEFINE_IID(kIDocumentLoaderIID, NS_IDOCUMENTLOADER_IID);
static NS_DEFINE_IID(kIWebShellServicesIID, NS_IWEB_SHELL_SERVICES_IID);
//-------------------------------------------------------------------------
NS_IMETHODIMP nsObserverBase::NotifyWebShell(
nsISupports* aParserBundle, const char* charset, nsCharsetSource source)
{
nsresult rv = NS_OK;
nsCOMPtr<nsISupportsParserBundle> bundle=do_QueryInterface(aParserBundle);
if (bundle) {
nsresult res = NS_OK;
// XXX - Make sure not to reload POST data to prevent bugs such as 27006
nsAutoString theChannelKey;
theChannelKey.AssignWithConversion("channel");
nsCOMPtr<nsIChannel> channel=nsnull;
res=bundle->GetDataFromBundle(theChannelKey,getter_AddRefs(channel));
if(NS_SUCCEEDED(res)) {
nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(channel,&res));
if(NS_SUCCEEDED(res)) {
nsXPIDLCString method;
httpChannel->GetRequestMethod(getter_Copies(method));
if(method) {
if(!PL_strcasecmp(method, "POST"))
return NS_OK;
}
}
}
nsAutoString theDocShellKey;
theDocShellKey.AssignWithConversion("docshell"); // Key to find docshell from the bundle.
nsCOMPtr<nsIDocShell> docshell=nsnull;
res=bundle->GetDataFromBundle(theDocShellKey,getter_AddRefs(docshell));
if(NS_SUCCEEDED(res)) {
nsCOMPtr<nsIWebShellServices> wss=nsnull;
wss=do_QueryInterface(docshell,&res); // Query webshell service through docshell.
if(NS_SUCCEEDED(res)) {
#ifndef DONT_INFORM_WEBSHELL
// ask the webshellservice to load the URL
if(NS_FAILED( res = wss->SetRendering(PR_FALSE) ))
rv=res;
// XXX nisheeth, uncomment the following two line to see the reent problem
else if(NS_FAILED(res = wss->StopDocumentLoad())){
rv = wss->SetRendering(PR_TRUE); // turn on the rendering so at least we will see something.
}
else if(NS_FAILED(res = wss->ReloadDocument(charset, source))) {
rv = wss->SetRendering(PR_TRUE); // turn on the rendering so at least we will see something.
}
else
rv = NS_ERROR_HTMLPARSER_STOPPARSING; // We're reloading a new document...stop loading the current.
#endif
}
}
}
return rv;
}

27
mozilla/layout/build/gbdate.pl Executable file
View File

@@ -0,0 +1,27 @@
#
# 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):
#
# XP way of doing the build date.
# 1998091509 = 1998, September, 15th, 9am local time zone
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
# localtime returns year minus 1900
$year = $year + 1900;
printf("#define PRODUCT_VERSION \"%04d%02d%02d\"\n", $year, 1+$mon, $mday);

View File

@@ -0,0 +1,90 @@
/* -*- 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.
*
* 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):
* Alec Flett <alecf@netscape.com>
*/
#include "nsIServiceManager.h"
#include "nsICategoryManager.h"
#include "nsCOMPtr.h"
#include "nsString.h"
#include "nsXPIDLString.h"
#include "nsContentHTTPStartup.h"
#include "nsIHttpProtocolHandler.h"
#include "gbdate.h"
#define PRODUCT_NAME "Gecko"
NS_IMPL_ISUPPORTS1(nsContentHTTPStartup,nsIObserver)
nsresult
nsContentHTTPStartup::Observe( nsISupports *aSubject,
const PRUnichar *aTopic,
const PRUnichar *aData)
{
if (nsCRT::strcmp(aTopic, NS_HTTP_STARTUP_TOPIC) != 0)
return NS_OK;
nsresult rv = nsnull;
nsCOMPtr<nsIHttpProtocolHandler> http(do_QueryInterface(aSubject));
if (NS_FAILED(rv)) return rv;
rv = http->SetProduct(PRODUCT_NAME);
if (NS_FAILED(rv)) return rv;
rv = http->SetProductSub((char*) PRODUCT_VERSION);
if (NS_FAILED(rv)) return rv;
return NS_OK;
}
nsresult
nsContentHTTPStartup::RegisterHTTPStartup()
{
nsresult rv;
nsCOMPtr<nsICategoryManager>
catMan(do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv));
if (NS_FAILED(rv)) return rv;
nsXPIDLCString previousEntry;
rv = catMan->AddCategoryEntry(NS_HTTP_STARTUP_CATEGORY,
"Content UserAgent Setter",
NS_CONTENTHTTPSTARTUP_CONTRACTID,
PR_TRUE, PR_TRUE,
getter_Copies(previousEntry));
return rv;
}
nsresult
nsContentHTTPStartup::UnregisterHTTPStartup()
{
nsresult rv;
nsCOMPtr<nsICategoryManager>
catMan(do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv));
if (NS_FAILED(rv)) return rv;
return NS_OK;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,864 @@
/* -*- 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):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "msgCore.h" // for pre-compiled headers
#include "nsCOMPtr.h"
#include <stdio.h>
#include "nscore.h"
#include "nsIFactory.h"
#include "nsISupports.h"
#include "comi18n.h"
#include "prmem.h"
#include "plstr.h"
#include "nsIPref.h"
#include "nsRepository.h"
#include "nsIURI.h"
#include "nsString.h"
#include "nsAbSyncPostEngine.h"
#include "nsIIOService.h"
#include "nsIChannel.h"
#include "nsNetUtil.h"
#include "nsMimeTypes.h"
#include "nsIHttpChannel.h"
#include "nsTextFormatter.h"
#include "nsICookieService.h"
#include "nsIAbSync.h"
#include "nsAbSyncCID.h"
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
static NS_DEFINE_CID(kCookieServiceCID, NS_COOKIESERVICE_CID);
static NS_DEFINE_CID(kCAbSyncMojoCID, NS_AB_SYNC_MOJO_CID);
static NS_DEFINE_CID(kAbSync, NS_ABSYNC_SERVICE_CID);
/*
* This function will be used by the factory to generate an
* object class object....
*/
NS_METHOD
nsAbSyncPostEngine::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult)
{
if (aOuter)
return NS_ERROR_NO_AGGREGATION;
nsAbSyncPostEngine *ph = new nsAbSyncPostEngine();
if (ph == nsnull)
return NS_ERROR_OUT_OF_MEMORY;
return ph->QueryInterface(aIID, aResult);
}
NS_IMPL_ADDREF(nsAbSyncPostEngine)
NS_IMPL_RELEASE(nsAbSyncPostEngine)
NS_INTERFACE_MAP_BEGIN(nsAbSyncPostEngine)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIURIContentListener)
NS_INTERFACE_MAP_ENTRY(nsIStreamListener)
NS_INTERFACE_MAP_ENTRY(nsIRequestObserver)
NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor)
NS_INTERFACE_MAP_ENTRY(nsIURIContentListener)
NS_INTERFACE_MAP_ENTRY(nsIAbSyncPostEngine)
NS_INTERFACE_MAP_END
/*
* Inherited methods for nsMimeConverter
*/
nsAbSyncPostEngine::nsAbSyncPostEngine()
{
/* the following macro is used to initialize the ref counting data */
NS_INIT_REFCNT();
// Init member variables...
mTotalWritten = 0;
mStillRunning = PR_TRUE;
mContentType = nsnull;
mCharset = nsnull;
mListenerArray = nsnull;
mListenerArrayCount = 0;
mPostEngineState = nsIAbSyncPostEngineState::nsIAbSyncPostIdle;
mTransactionID = 0;
mMessageSize = 0;
mAuthenticationRunning = PR_TRUE;
mCookie = nsnull;
mUser = nsnull;
mSyncProtocolRequest = nsnull;
mSyncProtocolRequestPrefix = nsnull;
mChannel = nsnull;
mMojoSyncSpec = nsnull;
}
nsAbSyncPostEngine::~nsAbSyncPostEngine()
{
mStillRunning = PR_FALSE;
PR_FREEIF(mContentType);
PR_FREEIF(mCharset);
PR_FREEIF(mSyncProtocolRequest);
PR_FREEIF(mSyncProtocolRequestPrefix);
PR_FREEIF(mCookie);
PR_FREEIF(mUser);
PR_FREEIF(mMojoSyncSpec);
DeleteListeners();
}
PRInt32 Base64Decode_int(const char *in_str, unsigned char *out_str,
PRUint32& decoded_len);
/* ==================================================================
* Base64Encode
*
* Returns number of bytes that were encoded.
*
* >0 -> OK
* -1 -> BAD (output buffer not big enough).
*
* ==================================================================
*/
PRInt32 Base64Encode(const unsigned char *in_str, PRInt32 in_len, char *out_str,
PRInt32 out_len)
{
static unsigned char base64[] =
{
/* 0 1 2 3 4 5 6 7 */
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', /* 0 */
'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', /* 1 */
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', /* 2 */
'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', /* 3 */
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', /* 4 */
'o', 'p', 'q', 'r', 's', 't', 'u', 'v', /* 5 */
'w', 'x', 'y', 'z', '0', '1', '2', '3', /* 6 */
'4', '5', '6', '7', '8', '9', '+', '/' /* 7 */
};
PRInt32 curr_out_len = 0;
PRInt32 i = 0;
unsigned char a, b, c;
out_str[0] = '\0';
if (in_len > 0)
{
while (i < in_len)
{
a = in_str[i];
b = (i + 1 >= in_len) ? 0 : in_str[i + 1];
c = (i + 2 >= in_len) ? 0 : in_str[i + 2];
if (i + 2 < in_len)
{
out_str[curr_out_len++] = (base64[(a >> 2) & 0x3F]);
out_str[curr_out_len++] = (base64[((a << 4) & 0x30)
+ ((b >> 4) & 0xf)]);
out_str[curr_out_len++] = (base64[((b << 2) & 0x3c)
+ ((c >> 6) & 0x3)]);
out_str[curr_out_len++] = (base64[c & 0x3F]);
}
else if (i + 1 < in_len)
{
out_str[curr_out_len++] = (base64[(a >> 2) & 0x3F]);
out_str[curr_out_len++] = (base64[((a << 4) & 0x30)
+ ((b >> 4) & 0xf)]);
out_str[curr_out_len++] = (base64[((b << 2) & 0x3c)
+ ((c >> 6) & 0x3)]);
out_str[curr_out_len++] = '=';
}
else
{
out_str[curr_out_len++] = (base64[(a >> 2) & 0x3F]);
out_str[curr_out_len++] = (base64[((a << 4) & 0x30)
+ ((b >> 4) & 0xf)]);
out_str[curr_out_len++] = '=';
out_str[curr_out_len++] = '=';
}
i += 3;
if((curr_out_len + 4) > out_len)
{
return(-1);
}
}
out_str[curr_out_len] = '\0';
}
return curr_out_len;
}
/*
* This routine decodes base64 string to a buffer.
* Populates 'out_str' with b64 decoded data.
*
* Returns number of bytes that were decoded.
* >0 -> OK
* -1 -> BAD (output buffer not big enough).
*/
PRInt32 Base64Decode(const char *in_str, unsigned char *out_str,
PRUint32* decoded_len)
{
return Base64Decode_int(in_str, out_str, *decoded_len);
}
PRInt32 Base64Decode_int(const char *in_str, unsigned char *out_str,
PRUint32& decoded_len)
{
PRInt32 in_len = strlen (/*(char *)*/ in_str);
PRInt32 ii = 0;
PRInt32 a = 0;
char ch;
PRInt32 b1 = 0;
long b4 = 0;
PRInt32 nn = 0;
/* Decode remainder of base 64 string */
while (ii < in_len)
{
ch = in_str[ii++];
if (ch >= 'A' && ch <= 'Z') b1 = (ch - 'A');
else if (ch >= 'a' && ch <= 'z') b1 = 26 + (ch - 'a');
else if (ch >= '0' && ch <= '9') b1 = 52 + (ch - '0');
else if (ch == '+') b1 = 62;
else if (ch == '/') b1 = 63;
else if (ch == '\r' || ch == '\n') continue;
else
{
if (ch == '=')
{
if (nn == 3)
{
if ((a + 2) > (PRInt32) decoded_len)
return (-1); /* Bail. Buffer overflow */
b4 = (b4 << 6);
out_str[a++] = (char) (0xff & (b4 >> 16));
out_str[a++] = (char) (0xff & (b4 >> 8));
}
else if (nn == 2)
{
if ((a + 1) > (PRInt32) decoded_len)
{
return (-1); /* Bail. Buffer overflow */
}
b4 = (b4 << 12);
out_str[a++] = (char) (0xff & (b4 >> 16));
}
}
break;
}
b4 = (b4 << 6) | (long) b1;
nn++;
if (nn == 4)
{
if ((a + 3) > (PRInt32) decoded_len)
{
return (-1); /* Bail. Buffer overflow */
}
out_str[a++] = (char) (0xff & (b4 >> 16));
out_str[a++] = (char) (0xff & (b4 >> 8));
out_str[a++] = (char) (0xff & (b4));
nn = 0;
}
}
out_str[a] = '\0';
decoded_len = a;
return (a);
}
NS_IMETHODIMP nsAbSyncPostEngine::GetInterface(const nsIID & aIID, void * *aInstancePtr)
{
NS_ENSURE_ARG_POINTER(aInstancePtr);
return QueryInterface(aIID, aInstancePtr);
}
// nsIURIContentListener support
NS_IMETHODIMP
nsAbSyncPostEngine::OnStartURIOpen(nsIURI* aURI,
const char* aWindowTarget, PRBool* aAbortOpen)
{
return NS_OK;
}
NS_IMETHODIMP
nsAbSyncPostEngine::GetProtocolHandler(nsIURI *aURI, nsIProtocolHandler **aProtocolHandler)
{
*aProtocolHandler = nsnull;
return NS_OK;
}
NS_IMETHODIMP
nsAbSyncPostEngine::IsPreferred(const char * aContentType,
nsURILoadCommand aCommand,
const char * aWindowTarget,
char ** aDesiredContentType,
PRBool * aCanHandleContent)
{
return CanHandleContent(aContentType, aCommand, aWindowTarget, aDesiredContentType,
aCanHandleContent);
}
NS_IMETHODIMP
nsAbSyncPostEngine::CanHandleContent(const char * aContentType,
nsURILoadCommand aCommand,
const char * aWindowTarget,
char ** aDesiredContentType,
PRBool * aCanHandleContent)
{
if (nsCRT::strcasecmp(aContentType, MESSAGE_RFC822) == 0)
*aDesiredContentType = nsCRT::strdup("text/html");
// since we explicilty loaded the url, we always want to handle it!
*aCanHandleContent = PR_TRUE;
return NS_OK;
}
NS_IMETHODIMP
nsAbSyncPostEngine::DoContent(const char * aContentType,
nsURILoadCommand aCommand,
const char * aWindowTarget,
nsIRequest *request,
nsIStreamListener ** aContentHandler,
PRBool * aAbortProcess)
{
nsresult rv = NS_OK;
if (aAbortProcess)
*aAbortProcess = PR_FALSE;
QueryInterface(NS_GET_IID(nsIStreamListener), (void **) aContentHandler);
return rv;
}
NS_IMETHODIMP
nsAbSyncPostEngine::GetParentContentListener(nsIURIContentListener** aParent)
{
*aParent = nsnull;
return NS_OK;
}
NS_IMETHODIMP
nsAbSyncPostEngine::SetParentContentListener(nsIURIContentListener* aParent)
{
return NS_OK;
}
NS_IMETHODIMP
nsAbSyncPostEngine::GetLoadCookie(nsISupports ** aLoadCookie)
{
*aLoadCookie = mLoadCookie;
NS_IF_ADDREF(*aLoadCookie);
return NS_OK;
}
NS_IMETHODIMP
nsAbSyncPostEngine::SetLoadCookie(nsISupports * aLoadCookie)
{
mLoadCookie = aLoadCookie;
return NS_OK;
}
nsresult
nsAbSyncPostEngine::StillRunning(PRBool *running)
{
*running = mStillRunning;
return NS_OK;
}
// Methods for nsIStreamListener...
nsresult
nsAbSyncPostEngine::OnDataAvailable(nsIRequest *request, nsISupports * ctxt, nsIInputStream *aIStream,
PRUint32 sourceOffset, PRUint32 aLength)
{
PRUint32 readLen = aLength;
char *buf = (char *)PR_Malloc(aLength);
if (!buf)
return NS_ERROR_OUT_OF_MEMORY; /* we couldn't allocate the object */
// read the data from the input stram...
nsresult rv = aIStream->Read(buf, aLength, &readLen);
if (NS_FAILED(rv)) return rv;
// write to the protocol response buffer...
mProtocolResponse.Append(NS_ConvertASCIItoUCS2(buf, readLen));
PR_FREEIF(buf);
mTotalWritten += readLen;
if (!mAuthenticationRunning)
NotifyListenersOnProgress(mTransactionID, mTotalWritten, 0);
return NS_OK;
}
// Methods for nsIRequestObserver
nsresult
nsAbSyncPostEngine::OnStartRequest(nsIRequest *request, nsISupports *ctxt)
{
if (mAuthenticationRunning)
NotifyListenersOnStartAuthOperation();
else
NotifyListenersOnStartSending(mTransactionID, mMessageSize);
return NS_OK;
}
nsresult
nsAbSyncPostEngine::OnStopRequest(nsIRequest *request, nsISupports * /* ctxt */, nsresult aStatus)
{
#ifdef NS_DEBUG_rhp
printf("nsAbSyncPostEngine::OnStopRequest()\n");
#endif
char *tProtResponse = nsnull;
//
// Now complete the stream!
//
mStillRunning = PR_FALSE;
// Check the content type!
nsCOMPtr<nsIChannel> channel = do_QueryInterface(request);
if (channel)
{
char *contentType = nsnull;
char *charset = nsnull;
if (NS_SUCCEEDED(channel->GetContentType(&contentType)) && contentType)
{
if (PL_strcasecmp(contentType, UNKNOWN_CONTENT_TYPE))
{
mContentType = contentType;
}
}
nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(channel);
if (httpChannel)
{
if (NS_SUCCEEDED(httpChannel->GetCharset(&charset)) && charset)
{
mCharset = charset;
}
}
}
// set the state...
mPostEngineState = nsIAbSyncPostEngineState::nsIAbSyncPostIdle;
if (mAuthenticationRunning)
{
nsresult rv;
if (mSyncMojo)
rv = mSyncMojo->GetAbSyncMojoResults(&mUser, &mCookie, &mMojoSyncSpec, &mMojoSyncPort);
if (NS_SUCCEEDED(rv))
{
// Before we really get started...lets let sync know who is doing this...
NS_WITH_SERVICE(nsIAbSync, sync, kAbSync, &rv);
if (NS_SUCCEEDED(rv) || sync)
sync->SetAbSyncUser(mUser);
// Base64 encode then url encode it...
//
char tUser[256] = "";
if (Base64Encode((unsigned char *)mUser, nsCRT::strlen(mUser), tUser, sizeof(tUser)) < 0)
{
rv = NS_ERROR_FAILURE;
NotifyListenersOnStopAuthOperation(rv, tProtResponse);
NotifyListenersOnStopSending(mTransactionID, rv, nsnull);
}
else
{
char *tUser2 = nsEscape(tUser, url_Path);
if (!tUser2)
{
rv = NS_ERROR_FAILURE;
NotifyListenersOnStopAuthOperation(rv, tProtResponse);
NotifyListenersOnStopSending(mTransactionID, rv, nsnull);
}
else
{
mSyncProtocolRequestPrefix = PR_smprintf("cn=%s&cc=%s&", tUser2, mCookie);
PR_FREEIF(tUser2);
NotifyListenersOnStopAuthOperation(aStatus, tProtResponse);
KickTheSyncOperation();
}
}
// RICHIE - Special here to show the server we are hitting!
// RICHIE - REMOVE THIS BEFORE SHIPPING!!!!
#ifdef DEBUG
PRUnichar *msgValue = nsnull;
msgValue = nsTextFormatter::smprintf(nsString(NS_ConvertASCIItoUCS2("Server: %s - port %d")).GetUnicode(),
mMojoSyncSpec, mMojoSyncPort);
NotifyListenersOnStatus(mTransactionID, msgValue);
PR_FREEIF(msgValue);
// RICHIE
#endif
}
else
{
NotifyListenersOnStopAuthOperation(rv, tProtResponse);
NotifyListenersOnStopSending(mTransactionID, rv, nsnull);
}
mSyncMojo = nsnull;
}
else
{
tProtResponse = mProtocolResponse.ToNewCString();
NotifyListenersOnStopSending(mTransactionID, aStatus, tProtResponse);
}
PR_FREEIF(tProtResponse);
// Time to return...
return NS_OK;
}
/* void AddSyncListener (in nsIAbSyncPostListener aListener); */
NS_IMETHODIMP nsAbSyncPostEngine::AddPostListener(nsIAbSyncPostListener *aListener)
{
if ( (mListenerArrayCount > 0) || mListenerArray )
{
++mListenerArrayCount;
mListenerArray = (nsIAbSyncPostListener **)
PR_Realloc(*mListenerArray, sizeof(nsIAbSyncPostListener *) * mListenerArrayCount);
if (!mListenerArray)
return NS_ERROR_OUT_OF_MEMORY;
else
{
mListenerArray[mListenerArrayCount - 1] = aListener;
return NS_OK;
}
}
else
{
mListenerArrayCount = 1;
mListenerArray = (nsIAbSyncPostListener **) PR_Malloc(sizeof(nsIAbSyncPostListener *) * mListenerArrayCount);
if (!mListenerArray)
return NS_ERROR_OUT_OF_MEMORY;
nsCRT::memset(mListenerArray, 0, (sizeof(nsIAbSyncPostListener *) * mListenerArrayCount));
mListenerArray[0] = aListener;
NS_ADDREF(mListenerArray[0]);
return NS_OK;
}
}
/* void RemoveSyncListener (in nsIAbSyncPostListener aListener); */
NS_IMETHODIMP nsAbSyncPostEngine::RemovePostListener(nsIAbSyncPostListener *aListener)
{
PRInt32 i;
for (i=0; i<mListenerArrayCount; i++)
if (mListenerArray[i] == aListener)
{
NS_RELEASE(mListenerArray[i]);
mListenerArray[i] = nsnull;
return NS_OK;
}
return NS_ERROR_INVALID_ARG;
}
nsresult
nsAbSyncPostEngine::DeleteListeners()
{
if ( (mListenerArray) && (*mListenerArray) )
{
PRInt32 i;
for (i=0; i<mListenerArrayCount; i++)
{
NS_RELEASE(mListenerArray[i]);
}
PR_FREEIF(mListenerArray);
}
mListenerArrayCount = 0;
return NS_OK;
}
nsresult
nsAbSyncPostEngine::NotifyListenersOnStartAuthOperation(void)
{
PRInt32 i;
for (i=0; i<mListenerArrayCount; i++)
if (mListenerArray[i] != nsnull)
mListenerArray[i]->OnStartAuthOperation();
return NS_OK;
}
nsresult
nsAbSyncPostEngine::NotifyListenersOnStopAuthOperation(nsresult aStatus, const char *aCookie)
{
PRInt32 i;
for (i=0; i<mListenerArrayCount; i++)
if (mListenerArray[i] != nsnull)
mListenerArray[i]->OnStopAuthOperation(aStatus, nsnull, aCookie);
return NS_OK;
}
nsresult
nsAbSyncPostEngine::NotifyListenersOnStartSending(PRInt32 aTransactionID, PRUint32 aMsgSize)
{
PRInt32 i;
for (i=0; i<mListenerArrayCount; i++)
if (mListenerArray[i] != nsnull)
mListenerArray[i]->OnStartOperation(aTransactionID, aMsgSize);
return NS_OK;
}
nsresult
nsAbSyncPostEngine::NotifyListenersOnProgress(PRInt32 aTransactionID, PRUint32 aProgress, PRUint32 aProgressMax)
{
PRInt32 i;
for (i=0; i<mListenerArrayCount; i++)
if (mListenerArray[i] != nsnull)
mListenerArray[i]->OnProgress(aTransactionID, aProgress, aProgressMax);
return NS_OK;
}
nsresult
nsAbSyncPostEngine::NotifyListenersOnStatus(PRInt32 aTransactionID, PRUnichar *aMsg)
{
PRInt32 i;
for (i=0; i<mListenerArrayCount; i++)
if (mListenerArray[i] != nsnull)
mListenerArray[i]->OnStatus(aTransactionID, aMsg);
return NS_OK;
}
nsresult
nsAbSyncPostEngine::NotifyListenersOnStopSending(PRInt32 aTransactionID, nsresult aStatus,
char *aProtocolResponse)
{
PRInt32 i;
for (i=0; i<mListenerArrayCount; i++)
if (mListenerArray[i] != nsnull)
mListenerArray[i]->OnStopOperation(aTransactionID, aStatus, nsnull, aProtocolResponse);
return NS_OK;
}
// Utility to create a nsIURI object...
extern "C" nsresult
nsEngineNewURI(nsIURI** aInstancePtrResult, const char *aSpec, nsIURI *aBase)
{
nsresult res;
if (nsnull == aInstancePtrResult)
return NS_ERROR_NULL_POINTER;
NS_WITH_SERVICE(nsIIOService, pService, kIOServiceCID, &res);
if (NS_FAILED(res))
return NS_ERROR_FACTORY_NOT_REGISTERED;
return pService->NewURI(aSpec, aBase, aInstancePtrResult);
}
nsresult
nsAbSyncPostEngine::FireURLRequest(nsIURI *aURL, const char *postData)
{
nsresult rv;
nsCOMPtr<nsIInputStream> postStream;
if (!postData)
return NS_ERROR_INVALID_ARG;
NS_ENSURE_SUCCESS(NS_OpenURI(getter_AddRefs(mChannel), aURL, nsnull), NS_ERROR_FAILURE);
// Tag the post stream onto the channel...but never seemed to work...so putting it
// directly on the URL spec
//
nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(mChannel);
if (!httpChannel)
return NS_ERROR_FAILURE;
if (NS_SUCCEEDED(rv = NS_NewPostDataStream(getter_AddRefs(postStream), PR_FALSE, postData, 0)))
httpChannel->SetUploadStream(postStream);
httpChannel->AsyncOpen(this, nsnull);
return NS_OK;
}
/* PRInt32 GetCurrentState (); */
NS_IMETHODIMP nsAbSyncPostEngine::GetCurrentState(PRInt32 *_retval)
{
*_retval = mPostEngineState;
return NS_OK;
}
////////////////////////////////////////////////////////////////////////////////////////
//
// This is the implementation of the actual post driver.
//
////////////////////////////////////////////////////////////////////////////////////////
NS_IMETHODIMP nsAbSyncPostEngine::BuildMojoString(nsIDocShell *aRootDocShell, char **aID)
{
nsresult rv;
if (!aID)
return NS_ERROR_FAILURE;
// Now, get the COMPtr to the Mojo!
if (!mSyncMojo)
{
rv = nsComponentManager::CreateInstance(kCAbSyncMojoCID, NULL, NS_GET_IID(nsIAbSyncMojo), getter_AddRefs(mSyncMojo));
if ( NS_FAILED(rv) || (!mSyncMojo) )
return NS_ERROR_FAILURE;
}
rv = mSyncMojo->BuildMojoString(aRootDocShell, aID);
return rv;
}
NS_IMETHODIMP nsAbSyncPostEngine::SendAbRequest(const char *aSpec, PRInt32 aPort, const char *aProtocolRequest, PRInt32 aTransactionID,
nsIDocShell *aDocShell, const char *aUser)
{
nsresult rv;
char *mojoUser = nsnull;
char *mojoSnack = nsnull;
// Only try if we are not currently busy!
if (mPostEngineState != nsIAbSyncPostEngineState::nsIAbSyncPostIdle)
return NS_ERROR_FAILURE;
// Now, get the COMPtr to the Mojo!
if (!mSyncMojo)
{
rv = nsComponentManager::CreateInstance(kCAbSyncMojoCID, NULL, NS_GET_IID(nsIAbSyncMojo), getter_AddRefs(mSyncMojo));
if ( NS_FAILED(rv) || (!mSyncMojo) )
return NS_ERROR_FAILURE;
}
if (aUser)
mUser = nsCRT::strdup(aUser);
if (NS_FAILED(mSyncMojo->StartAbSyncMojo(this, aDocShell, mUser)))
return NS_ERROR_FAILURE;
// Set transaction ID and save/init Sync info...
mTransactionID = aTransactionID;
// Init stuff we need....
mSyncProtocolRequest = nsCRT::strdup(aProtocolRequest);
mProtocolResponse = NS_ConvertASCIItoUCS2("");
mTotalWritten = 0;
// The first thing we need to do is authentication so do it!
mAuthenticationRunning = PR_TRUE;
mPostEngineState = nsIAbSyncPostEngineState::nsIAbSyncAuthenticationRunning;
return NS_OK;
}
NS_IMETHODIMP
nsAbSyncPostEngine::KickTheSyncOperation(void)
{
nsresult rv;
nsIURI *workURI = nsnull;
char *protString = nsnull;
// The first thing we need to do is authentication so do it!
mAuthenticationRunning = PR_FALSE;
mProtocolResponse = NS_ConvertASCIItoUCS2("");
mPostEngineState = nsIAbSyncPostEngineState::nsIAbSyncPostRunning;
char *postHeader = "Content-Type: application/x-www-form-urlencoded\r\nContent-Length: %d\r\nCookie: %s\r\n\r\n%s";
protString = PR_smprintf("%s%s", mSyncProtocolRequestPrefix, mSyncProtocolRequest);
if (protString)
mMessageSize = nsCRT::strlen(protString);
else
mMessageSize = 0;
char *tCommand = PR_smprintf(postHeader, mMessageSize, mCookie, protString);
PR_FREEIF(protString);
#ifdef DEBUG_rhp
printf("COMMAND = %s\n", tCommand);
#endif
if (!tCommand)
{
rv = NS_ERROR_OUT_OF_MEMORY; // we couldn't allocate the string
goto GetOuttaHere;
}
rv = nsEngineNewURI(&workURI, mMojoSyncSpec, nsnull);
if (NS_FAILED(rv) || (!workURI))
{
rv = NS_ERROR_FAILURE; // we couldn't allocate the string
goto GetOuttaHere;
}
if (mMojoSyncPort > 0)
workURI->SetPort(mMojoSyncPort);
rv = FireURLRequest(workURI, tCommand);
if (NS_SUCCEEDED(rv))
NotifyListenersOnStartSending(mTransactionID, mMessageSize);
GetOuttaHere:
NS_IF_RELEASE(workURI);
PR_FREEIF(tCommand);
mPostEngineState = nsIAbSyncPostEngineState::nsIAbSyncPostRunning;
return rv;
}
NS_IMETHODIMP
nsAbSyncPostEngine::CancelAbSync()
{
nsresult rv = NS_ERROR_FAILURE;
if (mSyncMojo)
{
rv = mSyncMojo->CancelTheMojo();
}
else if (mChannel)
{
rv = mChannel->Cancel(NS_BINDING_ABORTED);
}
return rv;
}
NS_IMETHODIMP
nsAbSyncPostEngine::GetMojoUserAndSnack(char **aMojoUser, char **aMojoSnack)
{
if ( (!mUser) || (!mCookie) )
return NS_ERROR_FAILURE;
*aMojoUser = nsCRT::strdup(mUser);
*aMojoSnack = nsCRT::strdup(mCookie);
if ( (!*aMojoUser) || (!*aMojoSnack) )
return NS_ERROR_FAILURE;
else
return NS_OK;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,453 @@
/* -*- 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):
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsURLFetcher.h"
#include "msgCore.h" // for pre-compiled headers
#include "nsCOMPtr.h"
#include <stdio.h>
#include "nscore.h"
#include "nsIFactory.h"
#include "nsISupports.h"
#include "comi18n.h"
#include "prmem.h"
#include "plstr.h"
#include "nsRepository.h"
#include "nsString.h"
#include "nsIIOService.h"
#include "nsIChannel.h"
#include "nsNetUtil.h"
#include "nsMimeTypes.h"
#include "nsIHttpChannel.h"
#include "nsIWebProgress.h"
#include "nsMsgAttachmentHandler.h"
#include "nsMsgSend.h"
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
NS_IMPL_ISUPPORTS7(nsURLFetcher, nsIURLFetcher, nsIStreamListener, nsIURIContentListener, nsIInterfaceRequestor, nsIWebProgressListener, nsIHttpEventSink, nsISupportsWeakReference)
/*
* Inherited methods for nsMimeConverter
*/
nsURLFetcher::nsURLFetcher()
{
#if defined(DEBUG_ducarroz)
printf("CREATE nsURLFetcher: %x\n", this);
#endif
/* the following macro is used to initialize the ref counting data */
NS_INIT_REFCNT();
// Init member variables...
mOutStream = nsnull;
mTotalWritten = 0;
mStillRunning = PR_TRUE;
mCallback = nsnull;
mContentType = nsnull;
mCharset = nsnull;
mOnStopRequestProcessed = PR_FALSE;
mRedirection = PR_FALSE;
}
nsURLFetcher::~nsURLFetcher()
{
#if defined(DEBUG_ducarroz)
printf("DISPOSE nsURLFetcher: %x\n", this);
#endif
mStillRunning = PR_FALSE;
PR_FREEIF(mContentType);
PR_FREEIF(mCharset);
// Remove the DocShell as a listener of the old WebProgress...
if (mLoadCookie)
{
nsCOMPtr<nsIWebProgress> webProgress(do_QueryInterface(mLoadCookie));
if (webProgress)
webProgress->RemoveProgressListener(this);
}
}
NS_IMETHODIMP nsURLFetcher::GetInterface(const nsIID & aIID, void * *aInstancePtr)
{
NS_ENSURE_ARG_POINTER(aInstancePtr);
return QueryInterface(aIID, aInstancePtr);
}
// nsIURIContentListener support
NS_IMETHODIMP
nsURLFetcher::OnStartURIOpen(nsIURI* aURI,
const char* aWindowTarget, PRBool* aAbortOpen)
{
return NS_OK;
}
NS_IMETHODIMP
nsURLFetcher::GetProtocolHandler(nsIURI *aURI, nsIProtocolHandler **aProtocolHandler)
{
*aProtocolHandler = nsnull;
return NS_OK;
}
NS_IMETHODIMP
nsURLFetcher::IsPreferred(const char * aContentType,
nsURILoadCommand aCommand,
const char * aWindowTarget,
char ** aDesiredContentType,
PRBool * aCanHandleContent)
{
return CanHandleContent(aContentType, aCommand, aWindowTarget, aDesiredContentType,
aCanHandleContent);
}
NS_IMETHODIMP
nsURLFetcher::CanHandleContent(const char * aContentType,
nsURILoadCommand aCommand,
const char * aWindowTarget,
char ** aDesiredContentType,
PRBool * aCanHandleContent)
{
if (nsCRT::strcasecmp(aContentType, MESSAGE_RFC822) == 0)
*aDesiredContentType = nsCRT::strdup("text/html");
// since we explicilty loaded the url, we always want to handle it!
*aCanHandleContent = PR_TRUE;
return NS_OK;
}
NS_IMETHODIMP
nsURLFetcher::DoContent(const char * aContentType,
nsURILoadCommand aCommand,
const char * aWindowTarget,
nsIRequest *request,
nsIStreamListener ** aContentHandler,
PRBool * aAbortProcess)
{
nsresult rv = NS_OK;
if (aAbortProcess)
*aAbortProcess = PR_FALSE;
QueryInterface(NS_GET_IID(nsIStreamListener), (void **) aContentHandler);
return rv;
}
NS_IMETHODIMP
nsURLFetcher::GetParentContentListener(nsIURIContentListener** aParent)
{
*aParent = nsnull;
return NS_OK;
}
NS_IMETHODIMP
nsURLFetcher::SetParentContentListener(nsIURIContentListener* aParent)
{
return NS_OK;
}
NS_IMETHODIMP
nsURLFetcher::GetLoadCookie(nsISupports ** aLoadCookie)
{
*aLoadCookie = mLoadCookie;
NS_IF_ADDREF(*aLoadCookie);
return NS_OK;
}
NS_IMETHODIMP
nsURLFetcher::SetLoadCookie(nsISupports * aLoadCookie)
{
// Remove the DocShell as a listener of the old WebProgress...
if (mLoadCookie)
{
nsCOMPtr<nsIWebProgress> webProgress(do_QueryInterface(mLoadCookie));
if (webProgress)
webProgress->RemoveProgressListener(this);
}
mLoadCookie = aLoadCookie;
// Add the DocShell as a listener to the new WebProgress...
if (mLoadCookie)
{
nsCOMPtr<nsIWebProgress> webProgress(do_QueryInterface(mLoadCookie));
if (webProgress)
webProgress->AddProgressListener(this);
}
return NS_OK;
}
nsresult
nsURLFetcher::StillRunning(PRBool *running)
{
*running = mStillRunning;
return NS_OK;
}
// Methods for nsIStreamListener...
nsresult
nsURLFetcher::OnDataAvailable(nsIRequest *request, nsISupports * ctxt, nsIInputStream *aIStream,
PRUint32 sourceOffset, PRUint32 aLength)
{
PRUint32 readLen = aLength;
PRUint32 wroteIt;
if (!mOutStream)
return NS_ERROR_INVALID_ARG;
char *buf = (char *)PR_Malloc(aLength);
if (!buf)
return NS_ERROR_OUT_OF_MEMORY; /* we couldn't allocate the object */
// read the data from the input stram...
nsresult rv = aIStream->Read(buf, aLength, &readLen);
if (NS_FAILED(rv)) return rv;
// write to the output file...
wroteIt = mOutStream->write(buf, readLen);
PR_FREEIF(buf);
if (wroteIt != readLen)
return NS_ERROR_FAILURE;
else
{
mTotalWritten += wroteIt;
return NS_OK;
}
}
// Methods for nsIStreamObserver
nsresult
nsURLFetcher::OnStartRequest(nsIRequest *request, nsISupports *ctxt)
{
mRedirection = PR_FALSE; // start a new request, reset mRedirection
nsMsgAttachmentHandler *attachmentHdl = (nsMsgAttachmentHandler *)mTagData;
if (attachmentHdl)
{
nsCOMPtr<nsIMsgSend> sendPtr;
attachmentHdl->GetMimeDeliveryState(getter_AddRefs(sendPtr));
if (sendPtr)
{
nsCOMPtr<nsIMsgProgress> progress;
sendPtr->GetProgress(getter_AddRefs(progress));
if (progress)
{
PRBool cancel = PR_FALSE;
progress->GetProcessCanceledByUser(&cancel);
if (cancel)
return request->Cancel(NS_ERROR_ABORT);
}
}
attachmentHdl->mRequest = request;
}
return NS_OK;
}
nsresult
nsURLFetcher::OnStopRequest(nsIRequest *request, nsISupports * /* ctxt */, nsresult aStatus)
{
#if defined(DEBUG_ducarroz)
printf("nsURLFetcher::OnStopRequest()\n");
#endif
// it's possible we could get in here from the channel calling us with an OnStopRequest and from our
// onStatusChange method (in the case of an error). So we should protect against this to make sure we
// don't process the on stop request twice...
if (mOnStopRequestProcessed) return NS_OK;
mOnStopRequestProcessed = PR_TRUE;
nsMsgAttachmentHandler *attachmentHdl = (nsMsgAttachmentHandler *)mTagData;
if (attachmentHdl)
attachmentHdl->mRequest = nsnull;
//
// Now complete the stream!
//
mStillRunning = PR_FALSE;
// First close the output stream...
if (mOutStream)
{
mOutStream->close();
mOutStream = nsnull;
}
// Check the content type!
char *contentType = nsnull;
char *charset = nsnull;
nsCOMPtr<nsIChannel> aChannel = do_QueryInterface(request);
if(!aChannel) return NS_ERROR_FAILURE;
if (NS_SUCCEEDED(aChannel->GetContentType(&contentType)) && contentType)
{
if (PL_strcasecmp(contentType, UNKNOWN_CONTENT_TYPE))
{
mContentType = contentType;
}
}
nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(aChannel);
if (httpChannel)
{
if (NS_SUCCEEDED(httpChannel->GetCharset(&charset)) && charset)
{
mCharset = charset;
}
}
// Now if there is a callback, we need to call it...
if (mCallback)
mCallback (aStatus, mContentType, mCharset, mTotalWritten, nsnull, mTagData);
// Time to return...
return NS_OK;
}
nsresult
nsURLFetcher::Initialize(nsOutputFileStream *fOut,
nsAttachSaveCompletionCallback cb,
void *tagData)
{
if (!fOut)
return NS_ERROR_INVALID_ARG;
if (!fOut->is_open())
return NS_ERROR_FAILURE;
mOutStream = fOut;
mCallback = cb; //JFD: Please, no more callback, use a listener...
mTagData = tagData; //JFD: TODO, WE SHOULD USE A NSCOMPTR to hold this stuff!!!
return NS_OK;
}
nsresult
nsURLFetcher::FireURLRequest(nsIURI *aURL, nsOutputFileStream *fOut,
nsAttachSaveCompletionCallback cb, void *tagData)
{
nsresult rv;
if ( (!aURL) || (!fOut) )
{
return NS_ERROR_INVALID_ARG;
}
if (!fOut->is_open())
{
return NS_ERROR_FAILURE;
}
// we're about to fire a new url request so make sure the on stop request flag is cleared...
mOnStopRequestProcessed = PR_FALSE;
// let's try uri dispatching...
nsCOMPtr<nsIURILoader> pURILoader (do_GetService(NS_URI_LOADER_CONTRACTID));
NS_ENSURE_TRUE(pURILoader, NS_ERROR_FAILURE);
nsCOMPtr<nsISupports> cntListener (do_QueryInterface(NS_STATIC_CAST(nsIStreamListener *, this)));
nsCOMPtr<nsIChannel> channel;
nsCOMPtr<nsILoadGroup> loadGroup;
pURILoader->GetLoadGroupForContext(cntListener, getter_AddRefs(loadGroup));
NS_ENSURE_SUCCESS(NS_OpenURI(getter_AddRefs(channel), aURL, nsnull, loadGroup, this), NS_ERROR_FAILURE);
rv = pURILoader->OpenURI(channel, nsIURILoader::viewNormal, nsnull /* window target */,
cntListener);
mOutStream = fOut;
mCallback = cb;
mTagData = tagData;
return NS_OK;
}
// web progress listener implementation
NS_IMETHODIMP
nsURLFetcher::OnProgressChange(nsIWebProgress *aProgress, nsIRequest *aRequest,
PRInt32 aCurSelfProgress, PRInt32 aMaxSelfProgress,
PRInt32 aCurTotalProgress, PRInt32 aMaxTotalProgress)
{
return NS_OK;
}
NS_IMETHODIMP
nsURLFetcher::OnStateChange(nsIWebProgress *aProgress, nsIRequest *aRequest,
PRInt32 aStateFlags, nsresult aStatus)
{
// all we care about is the case where an error occurred (as in we were unable to locate the
// the url....
if (NS_FAILED(aStatus))
{
//... but we must ignore abort message caused by a redirection!
if (aStatus == NS_BINDING_ABORTED && mRedirection)
return NS_OK;
OnStopRequest(aRequest, nsnull, aStatus);
}
return NS_OK;
}
NS_IMETHODIMP
nsURLFetcher::OnLocationChange(nsIWebProgress* aWebProgress,
nsIRequest* aRequest,
nsIURI *aURI)
{
return NS_OK;
}
NS_IMETHODIMP
nsURLFetcher::OnStatusChange(nsIWebProgress* aWebProgress,
nsIRequest* aRequest,
nsresult aStatus,
const PRUnichar* aMessage)
{
return NS_OK;
}
NS_IMETHODIMP
nsURLFetcher::OnSecurityChange(nsIWebProgress *aWebProgress,
nsIRequest *aRequest,
PRInt32 state)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsURLFetcher::OnRedirect(nsIHttpChannel *aOldChannel, nsIChannel *aNewChannel)
{
mRedirection = PR_TRUE;
return NS_OK;
}

View File

@@ -0,0 +1,88 @@
/* -*- 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 nsURLFetcher_h_
#define nsURLFetcher_h_
#include "nsIURLFetcher.h"
#include "nsCOMPtr.h"
#include "nsIInputStream.h"
#include "nsIStreamListener.h"
#include "nsIInterfaceRequestor.h"
#include "nsCURILoader.h"
#include "nsIURIContentListener.h"
#include "nsIWebProgressListener.h"
#include "nsIHttpEventSink.h"
#include "nsWeakReference.h"
class nsURLFetcher : public nsIURLFetcher,
public nsIStreamListener,
public nsIURIContentListener,
public nsIInterfaceRequestor,
public nsIWebProgressListener,
public nsIHttpEventSink,
public nsSupportsWeakReference
{
public:
nsURLFetcher();
virtual ~nsURLFetcher();
/* this macro defines QueryInterface, AddRef and Release for this class */
NS_DECL_ISUPPORTS
// Methods for nsIURLFetcher
NS_DECL_NSIURLFETCHER
// Methods for nsIStreamListener
NS_DECL_NSISTREAMLISTENER
// Methods for nsIRequestObserver
NS_DECL_NSIREQUESTOBSERVER
// Methods for nsIURICOntentListener
NS_DECL_NSIURICONTENTLISTENER
// Methods for nsIInterfaceRequestor
NS_DECL_NSIINTERFACEREQUESTOR
// Methods for nsIWebProgressListener
NS_DECL_NSIWEBPROGRESSLISTENER
// Methods for nsIHttpEventSink
NS_DECL_NSIHTTPEVENTSINK
private:
nsOutputFileStream *mOutStream; // the output file stream
PRBool mStillRunning; // Are we still running?
PRInt32 mTotalWritten; // Size counter variable
char *mContentType; // The content type retrieved from the server
char *mCharset; // The charset retrieved from the server
void *mTagData; // Tag data for callback...
nsAttachSaveCompletionCallback mCallback; // Callback to call once the file is saved...
nsCOMPtr<nsISupports> mLoadCookie; // load cookie used by the uri loader when we fetch the url
PRBool mOnStopRequestProcessed; // used to prevent calling OnStopRequest multiple times
PRBool mRedirection; // Set when we get a redirection, should ignore stop message.
};
#endif /* nsURLFetcher_h_ */

View File

@@ -0,0 +1,39 @@
/* -*- 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 "nsIChannel.idl"
interface nsISimpleEnumerator;
[scriptable, uuid(c7e410d1-85f2-11d3-9f63-006008a6efe9)]
interface nsIJARChannel : nsIChannel
{
/**
* Enumerates all the entries in the JAR (the root URI).
* ARGUMENTS:
* aRoot - a string representing the root dir to enumerate from
* or null to enumerate the whole thing.
*/
nsISimpleEnumerator EnumerateEntries(in string aRoot);
};

View File

@@ -0,0 +1,34 @@
/* -*- 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 "nsIProtocolHandler.idl"
interface nsIZipReaderCache;
[scriptable, uuid(92c3b42c-98c4-11d3-8cd9-0060b0fc14a3)]
interface nsIJARProtocolHandler : nsIProtocolHandler {
/**
* JARCache contains the collection of open jar files.
*/
readonly attribute nsIZipReaderCache JARCache;
};

View File

@@ -0,0 +1,42 @@
/* -*- 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.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 "nsIURI.idl"
/**
* JAR URLs have the following syntax
*
* jar:<jar-file-uri>!/<jar-entry>
*
* EXAMPLE: jar:http://www.big.com/blue.jar!/ocean.html
*/
[scriptable, uuid(c7e410d3-85f2-11d3-9f63-006008a6efe9)]
interface nsIJARURI : nsIURI {
/**
* Returns the root URI (the one for the actual JAR file) for this JAR.
* eg http://www.big.com/blue.jar
*/
attribute nsIURI JARFile;
/**
* Returns the entry specified for this JAR URI.
* eg ocean.html
*/
attribute string JAREntry;
};

View File

@@ -0,0 +1,696 @@
/* -*- 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,2000 Netscape Communications Corporation. All Rights
* Reserved.
*
*/
#include "nsNetUtil.h"
#include "nsIComponentManager.h"
#include "nsIServiceManager.h"
#include "nsJARChannel.h"
#include "nsCRT.h"
#include "nsIFileTransportService.h"
#include "nsIURI.h"
#include "nsCExternalHandlerService.h"
#include "nsIMIMEService.h"
#include "nsAutoLock.h"
#include "nsIFileStreams.h"
#include "nsMimeTypes.h"
#include "nsScriptSecurityManager.h"
#include "nsIAggregatePrincipal.h"
#include "nsIProgressEventSink.h"
#include "nsXPIDLString.h"
#include "nsIJAR.h"
static NS_DEFINE_CID(kFileTransportServiceCID, NS_FILETRANSPORTSERVICE_CID);
static NS_DEFINE_CID(kZipReaderCID, NS_ZIPREADER_CID);
static NS_DEFINE_CID(kScriptSecurityManagerCID, NS_SCRIPTSECURITYMANAGER_CID);
#if defined(PR_LOGGING)
//
// Log module for SocketTransport logging...
//
// To enable logging (see prlog.h for full details):
//
// set NSPR_LOG_MODULES=nsJarProtocol:5
// set NSPR_LOG_FILE=nspr.log
//
// this enables PR_LOG_DEBUG level information and places all output in
// the file nspr.log
//
PRLogModuleInfo* gJarProtocolLog = nsnull;
#endif /* PR_LOGGING */
////////////////////////////////////////////////////////////////////////////////
#define NS_DEFAULT_JAR_BUFFER_SEGMENT_SIZE (16*1024)
#define NS_DEFAULT_JAR_BUFFER_MAX_SIZE (256*1024)
nsJARChannel::nsJARChannel()
: mLoadFlags(LOAD_NORMAL),
mContentType(nsnull),
mContentLength(-1),
mJAREntry(nsnull),
mStatus(NS_OK),
mMonitor(nsnull)
{
NS_INIT_REFCNT();
#if defined(PR_LOGGING)
//
// Initialize the global PRLogModule for socket transport logging
// if necessary...
//
if (nsnull == gJarProtocolLog) {
gJarProtocolLog = PR_NewLogModule("nsJarProtocol");
}
#endif /* PR_LOGGING */
}
nsJARChannel::~nsJARChannel()
{
if (mContentType)
nsCRT::free(mContentType);
if (mJAREntry)
nsCRT::free(mJAREntry);
if (mMonitor)
PR_DestroyMonitor(mMonitor);
}
NS_IMPL_THREADSAFE_ISUPPORTS7(nsJARChannel,
nsIJARChannel,
nsIChannel,
nsIRequest,
nsIRequestObserver,
nsIStreamListener,
nsIStreamIO,
nsIDownloadObserver)
NS_METHOD
nsJARChannel::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult)
{
nsresult rv;
if (aOuter)
return NS_ERROR_NO_AGGREGATION;
nsJARChannel* jarChannel = new nsJARChannel();
if (jarChannel == nsnull)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(jarChannel);
rv = jarChannel->QueryInterface(aIID, aResult);
NS_RELEASE(jarChannel);
return rv;
}
nsresult
nsJARChannel::Init(nsIJARProtocolHandler* aHandler, nsIURI* uri)
{
nsresult rv;
mURI = do_QueryInterface(uri, &rv);
if (NS_FAILED(rv)) return rv;
mMonitor = PR_NewMonitor();
if (mMonitor == nsnull)
return NS_ERROR_OUT_OF_MEMORY;
mJARProtocolHandler = aHandler;
return NS_OK;
}
////////////////////////////////////////////////////////////////////////////////
// nsIRequest methods
NS_IMETHODIMP
nsJARChannel::GetName(PRUnichar* *result)
{
nsresult rv;
nsXPIDLCString urlStr;
rv = mURI->GetSpec(getter_Copies(urlStr));
if (NS_FAILED(rv)) return rv;
nsString name;
name.AppendWithConversion(urlStr);
*result = name.ToNewUnicode();
return *result ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
NS_IMETHODIMP
nsJARChannel::IsPending(PRBool* result)
{
NS_NOTREACHED("nsJARChannel::IsPending");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsJARChannel::GetStatus(nsresult *status)
{
*status = mStatus;
return NS_OK;
}
NS_IMETHODIMP
nsJARChannel::Cancel(nsresult status)
{
NS_ASSERTION(NS_FAILED(status), "shouldn't cancel with a success code");
nsresult rv = NS_OK;
nsAutoMonitor monitor(mMonitor);
if (mJarExtractionTransport) {
rv = mJarExtractionTransport->Cancel(status);
mJarExtractionTransport = nsnull;
}
mStatus = status;
return rv;
}
NS_IMETHODIMP
nsJARChannel::Suspend()
{
nsresult rv = NS_OK;
nsAutoMonitor monitor(mMonitor);
if (mJarExtractionTransport) {
rv = mJarExtractionTransport->Suspend();
}
return rv;
}
NS_IMETHODIMP
nsJARChannel::Resume()
{
nsresult rv = NS_OK;
nsAutoMonitor monitor(mMonitor);
if (mJarExtractionTransport) {
rv = mJarExtractionTransport->Resume();
}
return rv;
}
////////////////////////////////////////////////////////////////////////////////
// nsIChannel methods
NS_IMETHODIMP
nsJARChannel::GetOriginalURI(nsIURI* *aOriginalURI)
{
if (mOriginalURI)
*aOriginalURI = mOriginalURI;
else
*aOriginalURI = NS_STATIC_CAST(nsIURI*, mURI);
NS_IF_ADDREF(*aOriginalURI);
return NS_OK;
}
NS_IMETHODIMP
nsJARChannel::SetOriginalURI(nsIURI* aOriginalURI)
{
mOriginalURI = aOriginalURI;
return NS_OK;
}
NS_IMETHODIMP
nsJARChannel::GetURI(nsIURI* *aURI)
{
*aURI = mURI;
NS_ADDREF(*aURI);
return NS_OK;
}
nsresult
nsJARChannel::OpenJARElement()
{
nsresult rv;
nsAutoCMonitor mon(this);
rv = Open(nsnull, nsnull);
if (NS_SUCCEEDED(rv))
rv = GetInputStream(getter_AddRefs(mSynchronousInputStream));
mon.Notify(); // wake up nsIChannel::Open
return rv;
}
NS_IMETHODIMP
nsJARChannel::Open(nsIInputStream* *result)
{
nsAutoCMonitor mon(this);
nsresult rv;
mSynchronousRead = PR_TRUE;
rv = EnsureJARFileAvailable();
if (NS_FAILED(rv)) return rv;
if (mSynchronousInputStream == nsnull)
mon.Wait();
if (mSynchronousInputStream)
{
*result = mSynchronousInputStream; // Result of GetInputStream called on transport thread
NS_ADDREF(*result);
mSynchronousInputStream = 0;
return NS_OK;
}
else
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsJARChannel::AsyncOpen(nsIStreamListener* listener, nsISupports* ctxt)
{
nsresult rv;
mUserContext = ctxt;
mUserListener = listener;
if (mLoadGroup) {
rv = mLoadGroup->AddRequest(this, nsnull);
if (NS_FAILED(rv)) return rv;
}
mSynchronousRead = PR_FALSE;
return EnsureJARFileAvailable();
}
nsresult
nsJARChannel::EnsureJARFileAvailable()
{
nsresult rv;
nsCOMPtr<nsIChannel> jarBaseChannel;
nsCOMPtr<nsIFile> jarCacheFile;
nsCOMPtr<nsIChannel> jarCacheTransport;
nsCOMPtr<nsIInputStream> jarBaseIn;
#ifdef PR_LOGGING
nsXPIDLCString jarURLStr;
mURI->GetSpec(getter_Copies(jarURLStr));
PR_LOG(gJarProtocolLog, PR_LOG_DEBUG,
("nsJarProtocol: EnsureJARFileAvailable %s", (const char*)jarURLStr));
#endif
rv = mURI->GetJARFile(getter_AddRefs(mJARBaseURI));
if (NS_FAILED(rv)) goto error;
rv = mURI->GetJAREntry(&mJAREntry);
if (NS_FAILED(rv)) goto error;
rv = NS_NewDownloader(getter_AddRefs(mDownloader),
mJARBaseURI, this, nsnull, mSynchronousRead, mLoadGroup, mCallbacks,
mLoadFlags);
// if DownloadComplete() was called early, need to release the reference.
if (mSynchronousRead && mSynchronousInputStream)
mDownloader = null_nsCOMPtr();
error:
if (NS_FAILED(rv) && mLoadGroup) {
nsresult rv2 = mLoadGroup->RemoveRequest(this, nsnull, NS_OK);
NS_ASSERTION(NS_SUCCEEDED(rv2), "RemoveChannel failed");
}
return rv;
}
nsresult
nsJARChannel::AsyncReadJARElement()
{
nsresult rv;
nsAutoMonitor monitor(mMonitor);
NS_WITH_SERVICE(nsIFileTransportService, fts, kFileTransportServiceCID, &rv);
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsITransport> jarTransport;
rv = fts->CreateTransportFromStreamIO(this, getter_AddRefs(jarTransport));
if (NS_FAILED(rv)) return rv;
if (mCallbacks) {
nsCOMPtr<nsIProgressEventSink> sink = do_GetInterface(mCallbacks);
if (sink) {
// don't think that this is not needed anymore
// jarTransport->SetProgressEventSink(sink);
}
}
#ifdef PR_LOGGING
nsXPIDLCString jarURLStr;
mURI->GetSpec(getter_Copies(jarURLStr));
PR_LOG(gJarProtocolLog, PR_LOG_DEBUG,
("nsJarProtocol: AsyncRead jar entry %s", (const char*)jarURLStr));
#endif
rv = jarTransport->AsyncRead(this, nsnull, 0, PRUint32(-1), 0,
getter_AddRefs(mJarExtractionTransport));
mJarExtractionTransport = 0;
jarTransport = 0;
return rv;
}
NS_IMETHODIMP
nsJARChannel::GetLoadFlags(PRUint32* aLoadFlags)
{
*aLoadFlags = mLoadFlags;
return NS_OK;
}
NS_IMETHODIMP
nsJARChannel::SetLoadFlags(PRUint32 aLoadFlags)
{
mLoadFlags = aLoadFlags;
return NS_OK;
}
NS_IMETHODIMP
nsJARChannel::GetContentType(char* *aContentType)
{
nsresult rv = NS_OK;
if (mContentType == nsnull) {
if (!mJAREntry)
return NS_ERROR_FAILURE;
char* fileName = nsCRT::strdup(mJAREntry);
if (fileName != nsnull) {
PRInt32 len = nsCRT::strlen(fileName);
const char* ext = nsnull;
for (PRInt32 i = len-1; i >= 0; i--) {
if (fileName[i] == '.') {
ext = &fileName[i + 1];
break;
}
}
if (ext) {
nsCOMPtr<nsIMIMEService> mimeServ (do_GetService(NS_MIMESERVICE_CONTRACTID, &rv));
if (NS_SUCCEEDED(rv)) {
rv = mimeServ->GetTypeFromExtension(ext, &mContentType);
}
}
else
rv = NS_ERROR_OUT_OF_MEMORY;
nsCRT::free(fileName);
}
else {
rv = NS_ERROR_OUT_OF_MEMORY;
}
if (NS_FAILED(rv)) {
mContentType = nsCRT::strdup(UNKNOWN_CONTENT_TYPE);
if (mContentType == nsnull)
rv = NS_ERROR_OUT_OF_MEMORY;
else
rv = NS_OK;
}
}
if (NS_SUCCEEDED(rv)) {
*aContentType = nsCRT::strdup(mContentType);
if (*aContentType == nsnull)
rv = NS_ERROR_OUT_OF_MEMORY;
}
return rv;
}
NS_IMETHODIMP
nsJARChannel::SetContentType(const char *aContentType)
{
if (mContentType) {
nsCRT::free(mContentType);
}
mContentType = nsCRT::strdup(aContentType);
if (!mContentType) return NS_ERROR_OUT_OF_MEMORY;
return NS_OK;
}
NS_IMETHODIMP
nsJARChannel::GetContentLength(PRInt32* aContentLength)
{
if (mContentLength == -1)
return NS_ERROR_FAILURE;
*aContentLength = mContentLength;
return NS_OK;
}
NS_IMETHODIMP
nsJARChannel::SetContentLength(PRInt32 aContentLength)
{
NS_NOTREACHED("nsJARChannel::SetContentLength");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsJARChannel::GetLoadGroup(nsILoadGroup* *aLoadGroup)
{
*aLoadGroup = mLoadGroup;
NS_IF_ADDREF(*aLoadGroup);
return NS_OK;
}
NS_IMETHODIMP
nsJARChannel::SetLoadGroup(nsILoadGroup* aLoadGroup)
{
mLoadGroup = aLoadGroup;
return NS_OK;
}
NS_IMETHODIMP
nsJARChannel::GetOwner(nsISupports* *aOwner)
{
nsresult rv;
if (mOwner == nsnull) {
//-- Verify signature, if one is present, and set owner accordingly
rv = EnsureZipReader();
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsIJAR> jar = do_QueryInterface(mJAR, &rv);
NS_ASSERTION(NS_SUCCEEDED(rv), "Zip reader is not an nsIJAR");
nsCOMPtr<nsIPrincipal> certificate;
rv = jar->GetCertificatePrincipal(mJAREntry,
getter_AddRefs(certificate));
if (NS_FAILED(rv)) return rv;
if (certificate)
{ // Get the codebase principal
NS_WITH_SERVICE(nsIScriptSecurityManager, secMan,
kScriptSecurityManagerCID, &rv);
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
nsCOMPtr<nsIPrincipal> codebase;
rv = secMan->GetCodebasePrincipal(mJARBaseURI,
getter_AddRefs(codebase));
if (NS_FAILED(rv)) return rv;
// Join the certificate and the codebase
nsCOMPtr<nsIAggregatePrincipal> agg;
agg = do_QueryInterface(certificate, &rv);
rv = agg->SetCodebase(codebase);
if (NS_FAILED(rv)) return rv;
mOwner = do_QueryInterface(agg, &rv);
if (NS_FAILED(rv)) return rv;
}
}
*aOwner = mOwner;
NS_IF_ADDREF(*aOwner);
return NS_OK;
}
NS_IMETHODIMP
nsJARChannel::SetOwner(nsISupports* aOwner)
{
mOwner = aOwner;
return NS_OK;
}
NS_IMETHODIMP
nsJARChannel::GetNotificationCallbacks(nsIInterfaceRequestor* *aNotificationCallbacks)
{
*aNotificationCallbacks = mCallbacks.get();
NS_IF_ADDREF(*aNotificationCallbacks);
return NS_OK;
}
NS_IMETHODIMP
nsJARChannel::SetNotificationCallbacks(nsIInterfaceRequestor* aNotificationCallbacks)
{
mCallbacks = aNotificationCallbacks;
return NS_OK;
}
NS_IMETHODIMP
nsJARChannel::GetSecurityInfo(nsISupports * *aSecurityInfo)
{
*aSecurityInfo = nsnull;
return NS_OK;
}
////////////////////////////////////////////////////////////////////////////////
// nsIDownloadObserver methods:
NS_IMETHODIMP
nsJARChannel::OnDownloadComplete(nsIDownloader* aDownloader, nsISupports* aClosure,
nsresult aStatus, nsIFile* aFile)
{
nsresult rv=aStatus;
if(NS_SUCCEEDED(aStatus)) {
NS_ASSERTION(!mDownloader ||(aDownloader == mDownloader.get()), "wrong downloader");
mDownloadedJARFile = aFile;
// after successfully downloading the jar file to the cache,
// start the extraction process:
if (mSynchronousRead)
rv = OpenJARElement();
else
rv = AsyncReadJARElement();
}
mDownloader = 0;
return rv;
}
////////////////////////////////////////////////////////////////////////////////
// nsIRequestObserver methods:
NS_IMETHODIMP
nsJARChannel::OnStartRequest(nsIRequest* jarExtractionTransport,
nsISupports* context)
{
return mUserListener->OnStartRequest(this, mUserContext);
}
NS_IMETHODIMP
nsJARChannel::OnStopRequest(nsIRequest* jarExtractionTransport, nsISupports* context,
nsresult aStatus)
{
nsresult rv;
#ifdef PR_LOGGING
nsCOMPtr<nsIURI> jarURI;
nsXPIDLCString jarURLStr;
rv = mURI->GetSpec(getter_Copies(jarURLStr));
if (NS_SUCCEEDED(rv)) {
PR_LOG(gJarProtocolLog, PR_LOG_DEBUG,
("nsJarProtocol: jar extraction complete %s status=%x",
(const char*)jarURLStr, aStatus));
}
#endif
rv = mUserListener->OnStopRequest(this, mUserContext, aStatus);
NS_ASSERTION(NS_SUCCEEDED(rv), "OnStopRequest failed");
if (mLoadGroup)
mLoadGroup->RemoveRequest(this, context, aStatus);
mUserListener = nsnull;
mUserContext = nsnull;
mJarExtractionTransport = nsnull;
return rv;
}
////////////////////////////////////////////////////////////////////////////////
// nsIStreamListener methods:
NS_IMETHODIMP
nsJARChannel::OnDataAvailable(nsIRequest* jarCacheTransport,
nsISupports* context,
nsIInputStream *inStr,
PRUint32 sourceOffset,
PRUint32 count)
{
return mUserListener->OnDataAvailable(this, mUserContext,
inStr, sourceOffset, count);
}
////////////////////////////////////////////////////////////////////////////////
// nsIStreamIO methods:
nsresult
nsJARChannel::EnsureZipReader()
{
if (mJAR == nsnull) {
nsresult rv;
if (mDownloadedJARFile == nsnull)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIZipReaderCache> jarCache;
rv = mJARProtocolHandler->GetJARCache(getter_AddRefs(jarCache));
if (NS_FAILED(rv)) return rv;
rv = jarCache->GetZip(mDownloadedJARFile, getter_AddRefs(mJAR));
if (NS_FAILED(rv)) return rv;
}
return NS_OK;
}
NS_IMETHODIMP
nsJARChannel::Open(char* *contentType, PRInt32 *contentLength)
{
nsresult rv;
rv = EnsureZipReader();
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsIZipEntry> entry;
rv = mJAR->GetEntry(mJAREntry, getter_AddRefs(entry));
if (NS_FAILED(rv)) return rv;
if (contentLength) {
rv = entry->GetRealSize((PRUint32*)contentLength);
if (NS_FAILED(rv)) return rv;
}
if (contentType) {
rv = GetContentType(contentType);
if (NS_FAILED(rv)) return rv;
}
return rv;
}
NS_IMETHODIMP
nsJARChannel::Close(nsresult status)
{
return NS_OK;
}
NS_IMETHODIMP
nsJARChannel::GetInputStream(nsIInputStream* *aInputStream)
{
#ifdef PR_LOGGING
nsXPIDLCString jarURLStr;
mURI->GetSpec(getter_Copies(jarURLStr));
PR_LOG(gJarProtocolLog, PR_LOG_DEBUG,
("nsJarProtocol: GetInputStream jar entry %s", (const char*)jarURLStr));
#endif
NS_ENSURE_TRUE(mJAR, NS_ERROR_NULL_POINTER);
return mJAR->GetInputStream(mJAREntry, aInputStream);
}
NS_IMETHODIMP
nsJARChannel::GetOutputStream(nsIOutputStream* *aOutputStream)
{
NS_NOTREACHED("nsJARChannel::GetOutputStream");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsJARChannel::GetName(char* *aName)
{
return mURI->GetSpec(aName);
}
////////////////////////////////////////////////////////////////////////////////
// nsIJARChannel methods:
NS_IMETHODIMP
nsJARChannel::EnumerateEntries(const char *aRoot, nsISimpleEnumerator **_retval)
{
NS_NOTREACHED("nsJARChannel::EnumerateEntries");
return NS_ERROR_NOT_IMPLEMENTED;
}
////////////////////////////////////////////////////////////////////////////////

View File

@@ -0,0 +1,111 @@
/* -*- 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,2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#ifndef nsJARChannel_h__
#define nsJARChannel_h__
#include "nsIJARChannel.h"
#include "nsIStreamListener.h"
#include "nsIJARProtocolHandler.h"
#include "nsIJARURI.h"
#include "nsIStreamIO.h"
#include "nsIChannel.h"
#include "nsIZipReader.h"
#include "nsIChannel.h"
#include "nsILoadGroup.h"
#include "nsIInterfaceRequestor.h"
#include "nsCOMPtr.h"
#include "nsIFile.h"
#include "prmon.h"
#include "nsIDownloader.h"
#include "nsIInputStream.h"
class nsIFileChannel;
class nsJARChannel;
#define NS_JARCHANNEL_CID \
{ /* 0xc7e410d5-0x85f2-11d3-9f63-006008a6efe9 */ \
0xc7e410d5, \
0x85f2, \
0x11d3, \
{0x9f, 0x63, 0x00, 0x60, 0x08, 0xa6, 0xef, 0xe9} \
}
class nsJARChannel : public nsIJARChannel,
public nsIStreamListener,
public nsIStreamIO,
public nsIDownloadObserver
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIREQUEST
NS_DECL_NSICHANNEL
NS_DECL_NSIJARCHANNEL
NS_DECL_NSIREQUESTOBSERVER
NS_DECL_NSISTREAMLISTENER
NS_DECL_NSISTREAMIO
NS_DECL_NSIDOWNLOADOBSERVER
nsJARChannel();
virtual ~nsJARChannel();
// Define a Create method to be used with a factory:
static NS_METHOD
Create(nsISupports* aOuter, REFNSIID aIID, void **aResult);
nsresult Init(nsIJARProtocolHandler* aHandler, nsIURI* uri);
nsresult EnsureJARFileAvailable();
nsresult OpenJARElement();
nsresult AsyncReadJARElement();
nsresult EnsureZipReader();
friend class nsJARDownloadObserver;
protected:
nsCOMPtr<nsIJARProtocolHandler> mJARProtocolHandler;
nsCOMPtr<nsIJARURI> mURI;
nsCOMPtr<nsILoadGroup> mLoadGroup;
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
nsCOMPtr<nsIURI> mOriginalURI;
nsLoadFlags mLoadFlags;
nsCOMPtr<nsISupports> mOwner;
nsCOMPtr<nsISupports> mUserContext;
nsCOMPtr<nsIStreamListener> mUserListener;
char* mContentType;
PRInt32 mContentLength;
nsCOMPtr<nsIURI> mJARBaseURI;
char* mJAREntry;
nsCOMPtr<nsIZipReader> mJAR;
nsCOMPtr<nsIFile> mDownloadedJARFile;
nsresult mStatus;
PRBool mSynchronousRead;
nsCOMPtr<nsIInputStream> mSynchronousInputStream;
PRMonitor* mMonitor;
nsCOMPtr<nsIDownloader> mDownloader;
nsCOMPtr<nsIRequest> mJarExtractionTransport;
};
#endif // nsJARChannel_h__

View File

@@ -0,0 +1,162 @@
/* -*- 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 "nsJARProtocolHandler.h"
#include "nsIIOService.h"
#include "nsCRT.h"
#include "nsIComponentManager.h"
#include "nsIServiceManager.h"
#include "nsJARURI.h"
#include "nsIURL.h"
#include "nsJARChannel.h"
#include "nsXPIDLString.h"
#include "nsNetCID.h"
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
static NS_DEFINE_CID(kJARUriCID, NS_JARURI_CID);
static NS_DEFINE_CID(kZipReaderCacheCID, NS_ZIPREADERCACHE_CID);
#define NS_JAR_CACHE_SIZE 32
////////////////////////////////////////////////////////////////////////////////
nsJARProtocolHandler::nsJARProtocolHandler()
{
NS_INIT_REFCNT();
}
nsresult
nsJARProtocolHandler::Init()
{
nsresult rv;
rv = nsComponentManager::CreateInstance(kZipReaderCacheCID,
nsnull,
NS_GET_IID(nsIZipReaderCache),
getter_AddRefs(mJARCache));
if (NS_FAILED(rv)) return rv;
rv = mJARCache->Init(NS_JAR_CACHE_SIZE);
return rv;
}
nsJARProtocolHandler::~nsJARProtocolHandler()
{
}
NS_IMPL_THREADSAFE_ISUPPORTS2(nsJARProtocolHandler,
nsIJARProtocolHandler,
nsIProtocolHandler)
NS_METHOD
nsJARProtocolHandler::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult)
{
if (aOuter)
return NS_ERROR_NO_AGGREGATION;
nsJARProtocolHandler* ph = new nsJARProtocolHandler();
if (ph == nsnull)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(ph);
nsresult rv = ph->Init();
if (NS_SUCCEEDED(rv)) {
rv = ph->QueryInterface(aIID, aResult);
}
NS_RELEASE(ph);
return rv;
}
NS_IMETHODIMP
nsJARProtocolHandler::GetJARCache(nsIZipReaderCache* *result)
{
*result = mJARCache;
NS_ADDREF(*result);
return NS_OK;
}
////////////////////////////////////////////////////////////////////////////////
// nsIProtocolHandler methods:
NS_IMETHODIMP
nsJARProtocolHandler::GetScheme(char* *result)
{
*result = nsCRT::strdup("jar");
if (*result == nsnull)
return NS_ERROR_OUT_OF_MEMORY;
return NS_OK;
}
NS_IMETHODIMP
nsJARProtocolHandler::GetDefaultPort(PRInt32 *result)
{
*result = -1; // no port for JAR: URLs
return NS_OK;
}
NS_IMETHODIMP
nsJARProtocolHandler::NewURI(const char *aSpec, nsIURI *aBaseURI,
nsIURI **result)
{
nsresult rv = NS_OK;
nsIURI* url;
rv = nsJARURI::Create(nsnull, NS_GET_IID(nsIJARURI), (void**)&url);
if (NS_FAILED(rv)) return rv;
if (aBaseURI)
{
nsXPIDLCString aResolvedURI;
rv = aBaseURI->Resolve(aSpec, getter_Copies(aResolvedURI));
if (NS_FAILED(rv)) return rv;
rv = url->SetSpec(aResolvedURI);
} else {
rv = url->SetSpec((char*)aSpec);
}
if (NS_FAILED(rv)) {
NS_RELEASE(url);
return rv;
}
*result = url;
return rv;
}
NS_IMETHODIMP
nsJARProtocolHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
{
nsresult rv;
nsJARChannel* channel;
rv = nsJARChannel::Create(nsnull, NS_GET_IID(nsIJARChannel), (void**)&channel);
if (NS_FAILED(rv)) return rv;
rv = channel->Init(this, uri);
if (NS_FAILED(rv)) {
NS_RELEASE(channel);
return rv;
}
*result = channel;
return NS_OK;
}
////////////////////////////////////////////////////////////////////////////////

View File

@@ -0,0 +1,61 @@
/* -*- 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 nsJARProtocolHandler_h___
#define nsJARProtocolHandler_h___
#include "nsIJARProtocolHandler.h"
#include "nsIProtocolHandler.h"
#include "nsIJARURI.h"
#include "nsIZipReader.h"
#include "nsCOMPtr.h"
#define NS_JARPROTOCOLHANDLER_CID \
{ /* 0xc7e410d4-0x85f2-11d3-9f63-006008a6efe9 */ \
0xc7e410d4, \
0x85f2, \
0x11d3, \
{0x9f, 0x63, 0x00, 0x60, 0x08, 0xa6, 0xef, 0xe9} \
}
class nsJARProtocolHandler : public nsIJARProtocolHandler
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIPROTOCOLHANDLER
NS_DECL_NSIJARPROTOCOLHANDLER
// nsJARProtocolHandler methods:
nsJARProtocolHandler();
virtual ~nsJARProtocolHandler();
static NS_METHOD
Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
nsresult Init();
protected:
nsCOMPtr<nsIZipReaderCache> mJARCache;
};
#endif /* nsJARProtocolHandler_h___ */

View File

@@ -1,4 +1,4 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- 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
@@ -18,24 +18,21 @@
* Rights Reserved.
*
* Contributor(s):
* Chris Saari <saari@netscape.com>
*/
#include "nsGIFDecoder2.h"
#include "nsIComponentManager.h"
#include "nsIModule.h"
#include "nsIGenericFactory.h"
#include "nsISupports.h"
#include "nsCOMPtr.h"
#include "nsJARProtocolHandler.h"
NS_GENERIC_FACTORY_CONSTRUCTOR(nsGIFDecoder2)
static nsModuleComponentInfo components[] =
static nsModuleComponentInfo components[] =
{
{ "GIF Decoder",
NS_GIFDECODER2_CID,
"@mozilla.org/image/decoder;2?type=image/gif",
nsGIFDecoder2Constructor, },
{ "JAR Protocol Handler",
NS_JARPROTOCOLHANDLER_CID,
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "jar",
nsJARProtocolHandler::Create
},
};
NS_IMPL_NSGETMODULE("nsGIFModule2", components)
NS_IMPL_NSGETMODULE(nsJarProtocolModule, components);

View File

@@ -0,0 +1,396 @@
/* -*- 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.
*/
#include "nsJARURI.h"
#include "nsNetUtil.h"
#include "nsIIOService.h"
#include "nsFileSpec.h"
#include "nsCRT.h"
#include "nsIComponentManager.h"
#include "nsIServiceManager.h"
#include "nsIZipReader.h"
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
////////////////////////////////////////////////////////////////////////////////
nsJARURI::nsJARURI()
: mJAREntry(nsnull)
{
NS_INIT_REFCNT();
}
nsJARURI::~nsJARURI()
{
if (mJAREntry)
nsMemory::Free(mJAREntry);
}
NS_IMPL_THREADSAFE_ISUPPORTS2(nsJARURI, nsIJARURI, nsIURI)
NS_METHOD
nsJARURI::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult)
{
if (aOuter)
return NS_ERROR_NO_AGGREGATION;
nsJARURI* uri = new nsJARURI();
if (uri == nsnull)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(uri);
nsresult rv = uri->Init();
if (NS_SUCCEEDED(rv)) {
rv = uri->QueryInterface(aIID, aResult);
}
NS_RELEASE(uri);
return rv;
}
nsresult
nsJARURI::Init()
{
return NS_OK;
}
#define NS_JAR_SCHEME "jar:"
#define NS_JAR_DELIMITER "!/"
nsresult
nsJARURI::FormatSpec(const char* entryPath, char* *result)
{
nsresult rv;
char* jarFileSpec;
rv = mJARFile->GetSpec(&jarFileSpec);
if (NS_FAILED(rv)) return rv;
nsCString spec(NS_JAR_SCHEME);
spec += jarFileSpec;
nsCRT::free(jarFileSpec);
spec += NS_JAR_DELIMITER;
spec += entryPath;
*result = nsCRT::strdup(spec);
return *result ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
////////////////////////////////////////////////////////////////////////////////
// nsURI methods:
NS_IMETHODIMP
nsJARURI::GetSpec(char* *aSpec)
{
return FormatSpec(mJAREntry, aSpec);
}
NS_IMETHODIMP
nsJARURI::SetSpec(const char * aSpec)
{
nsresult rv;
NS_WITH_SERVICE(nsIIOService, serv, kIOServiceCID, &rv);
if (NS_FAILED(rv)) return rv;
PRUint32 startPos, endPos;
rv = serv->ExtractScheme(aSpec, &startPos, &endPos, nsnull);
if (NS_FAILED(rv)) return rv;
if (nsCRT::strncmp("jar", &aSpec[startPos], endPos - startPos - 1) != 0)
return NS_ERROR_MALFORMED_URI;
// Search backward from the end for the "!/" delimiter. Remember, jar URLs
// can nest, e.g.:
// jar:jar:http://www.foo.com/bar.jar!/a.jar!/b.html
// This gets the b.html document from out of the a.jar file, that's
// contained within the bar.jar file.
nsCAutoString jarPath(aSpec);
PRInt32 pos = jarPath.RFind(NS_JAR_DELIMITER);
if (pos == -1 || endPos + 1 > (PRUint32)pos)
return NS_ERROR_MALFORMED_URI;
jarPath.Cut(pos, jarPath.Length());
jarPath.Cut(0, endPos);
rv = serv->NewURI(jarPath, nsnull, getter_AddRefs(mJARFile));
if (NS_FAILED(rv)) return rv;
nsCAutoString entry(aSpec);
entry.Cut(0, pos + 2); // 2 == strlen(NS_JAR_DELIMITER)
while (entry.CharAt(0) == '/')
entry.Cut(0,1); // Strip any additional leading slashes from entry path
rv = serv->ResolveRelativePath(entry, nsnull, &mJAREntry);
return rv;
}
NS_IMETHODIMP
nsJARURI::GetPrePath(char* *prePath)
{
*prePath = nsCRT::strdup("jar:");
return *prePath ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
NS_IMETHODIMP
nsJARURI::SetPrePath(const char* prePath)
{
NS_NOTREACHED("nsJARURI::SetPrePath");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsJARURI::GetScheme(char * *aScheme)
{
*aScheme = nsCRT::strdup("jar");
return *aScheme ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
NS_IMETHODIMP
nsJARURI::SetScheme(const char * aScheme)
{
// doesn't make sense to set the scheme of a jar: URL
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsJARURI::GetUsername(char * *aUsername)
{
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsJARURI::SetUsername(const char * aUsername)
{
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsJARURI::GetPassword(char * *aPassword)
{
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsJARURI::SetPassword(const char * aPassword)
{
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsJARURI::GetPreHost(char * *aPreHost)
{
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsJARURI::SetPreHost(const char * aPreHost)
{
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsJARURI::GetHost(char * *aHost)
{
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsJARURI::SetHost(const char * aHost)
{
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsJARURI::GetPort(PRInt32 *aPort)
{
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsJARURI::SetPort(PRInt32 aPort)
{
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsJARURI::GetPath(char * *aPath)
{
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsJARURI::SetPath(const char * aPath)
{
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsJARURI::Equals(nsIURI *other, PRBool *result)
{
nsresult rv;
*result = PR_FALSE;
if (other == nsnull)
return NS_OK; // not equal
nsJARURI* otherJAR;
rv = other->QueryInterface(NS_GET_IID(nsIJARURI), (void**)&otherJAR);
if (NS_FAILED(rv))
return NS_OK; // not equal
nsCOMPtr<nsIURI> otherJARFile;
rv = otherJAR->GetJARFile(getter_AddRefs(otherJARFile));
if (NS_FAILED(rv)) return rv;
PRBool equal;
rv = mJARFile->Equals(otherJARFile, &equal);
if (NS_FAILED(rv)) return rv;
if (!equal)
return NS_OK; // not equal
char* otherJAREntry;
rv = otherJAR->GetJAREntry(&otherJAREntry);
if (NS_FAILED(rv)) return rv;
*result = nsCRT::strcmp(mJAREntry, otherJAREntry) == 0;
nsCRT::free(otherJAREntry);
return NS_OK;
}
NS_IMETHODIMP
nsJARURI::SchemeIs(const char *i_Scheme, PRBool *o_Equals)
{
NS_ENSURE_ARG_POINTER(o_Equals);
if (!i_Scheme) return NS_ERROR_INVALID_ARG;
if (*i_Scheme == 'j' || *i_Scheme == 'J') {
*o_Equals = PL_strcasecmp("jar", i_Scheme) ? PR_FALSE : PR_TRUE;
} else {
*o_Equals = PR_FALSE;
}
return NS_OK;
}
NS_IMETHODIMP
nsJARURI::Clone(nsIURI **result)
{
nsresult rv;
nsCOMPtr<nsIURI> newJARFile;
rv = mJARFile->Clone(getter_AddRefs(newJARFile));
if (NS_FAILED(rv)) return rv;
char* newJAREntry = nsCRT::strdup(mJAREntry);
if (newJAREntry == nsnull)
return NS_ERROR_OUT_OF_MEMORY;
nsJARURI* uri = new nsJARURI();
if (uri == nsnull)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(uri);
uri->mJARFile = newJARFile;
uri->mJAREntry = newJAREntry;
*result = uri;
return NS_OK;
}
NS_IMETHODIMP
nsJARURI::Resolve(const char *relativePath, char **result)
{
nsresult rv;
if (!relativePath) return NS_ERROR_NULL_POINTER;
NS_WITH_SERVICE(nsIIOService, serv, kIOServiceCID, &rv);
if (NS_FAILED(rv)) return rv;
nsXPIDLCString scheme;
rv = serv->ExtractScheme(relativePath, nsnull, nsnull, getter_Copies(scheme));
if (NS_SUCCEEDED(rv)) {
// then aSpec is absolute
*result = nsCRT::strdup(relativePath);
if (*result == nsnull)
return NS_ERROR_OUT_OF_MEMORY;
return NS_OK;
}
nsCAutoString path(mJAREntry);
PRInt32 pos = path.RFind("/");
if (pos >= 0)
path.Truncate(pos + 1);
else
path = "";
char* resolvedEntry;
rv = serv->ResolveRelativePath(relativePath, path.get(),
&resolvedEntry);
if (NS_FAILED(rv)) return rv;
rv = FormatSpec(resolvedEntry, result);
nsCRT::free(resolvedEntry);
return rv;
}
////////////////////////////////////////////////////////////////////////////////
// nsIJARUri methods:
NS_IMETHODIMP
nsJARURI::GetJARFile(nsIURI* *jarFile)
{
*jarFile = mJARFile;
NS_ADDREF(*jarFile);
return NS_OK;
}
NS_IMETHODIMP
nsJARURI::SetJARFile(nsIURI* jarFile)
{
mJARFile = jarFile;
return NS_OK;
}
NS_IMETHODIMP
nsJARURI::GetJAREntry(char* *entryPath)
{
nsCAutoString entry(mJAREntry);
PRInt32 pos = entry.RFindCharInSet("#?;");
if (pos >= 0)
entry.Truncate(pos);
*entryPath = entry.ToNewCString();
return *entryPath ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
NS_IMETHODIMP
nsJARURI::SetJAREntry(const char* entryPath)
{
nsresult rv;
NS_WITH_SERVICE(nsIIOService, serv, kIOServiceCID, &rv);
if (NS_FAILED(rv)) return rv;
if (mJAREntry)
nsCRT::free(mJAREntry);
rv = serv->ResolveRelativePath(entryPath, nsnull, &mJAREntry);
return rv;
}
////////////////////////////////////////////////////////////////////////////////

View File

@@ -0,0 +1,55 @@
/* -*- 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.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.
*/
#ifndef nsJARURI_h__
#define nsJARURI_h__
#include "nsIJARURI.h"
#include "nsCOMPtr.h"
#define NS_JARURI_CID \
{ /* 0xc7e410d7-0x85f2-11d3-9f63-006008a6efe9 */ \
0xc7e410d7, \
0x85f2, \
0x11d3, \
{0x9f, 0x63, 0x00, 0x60, 0x08, 0xa6, 0xef, 0xe9} \
}
class nsJARURI : public nsIJARURI
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIURI
NS_DECL_NSIJARURI
// nsJARURI
nsJARURI();
virtual ~nsJARURI();
static NS_METHOD
Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
nsresult Init();
nsresult FormatSpec(const char* entryPath, char* *result);
protected:
nsCOMPtr<nsIURI> mJARFile;
char *mJAREntry;
};
#endif // nsJARURI_h__

File diff suppressed because it is too large Load Diff

View File

@@ -1,323 +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 Communicator client 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 _GIF_H_
#define _GIF_H_
/* gif2.h
The interface for the GIF87/89a decoder.
*/
// List of possible parsing states
typedef enum {
gif_gather,
gif_init, //1
gif_type,
gif_version,
gif_global_header,
gif_global_colormap,
gif_image_start, //6
gif_image_header,
gif_image_colormap,
gif_image_body,
gif_lzw_start,
gif_lzw, //11
gif_sub_block,
gif_extension,
gif_control_extension,
gif_consume_block,
gif_skip_block,
gif_done, //17
gif_oom,
gif_error,
gif_comment_extension,
gif_application_extension,
gif_netscape_extension_block,
gif_consume_netscape_extension,
gif_consume_comment,
gif_delay,
gif_wait_for_buffer_full,
gif_stop_animating //added for animation stop
} gstate;
/* "Disposal" method indicates how the image should be handled in the
framebuffer before the subsequent image is displayed. */
typedef enum
{
DISPOSE_NOT_SPECIFIED = 0,
DISPOSE_KEEP = 1, /* Leave it in the framebuffer */
DISPOSE_OVERWRITE_BGCOLOR = 2, /* Overwrite with background color */
DISPOSE_OVERWRITE_PREVIOUS = 4 /* Save-under */
} gdispose;
/* A RGB triplet representing a single pixel in the image's colormap
(if present.) */
typedef struct _GIF_RGB
{
PRUint8 red, green, blue, pad; /* Windows requires the fourth byte &
many compilers pad it anyway. */
/* XXX: hist_count appears to be unused */
//PRUint16 hist_count; /* Histogram frequency count. */
} GIF_RGB;
/* Colormap information. */
typedef struct _GIF_ColorMap {
int32 num_colors; /* Number of colors in the colormap.
A negative value can be used to denote a
possibly non-unique set. */
GIF_RGB *map; /* Colormap colors. */
PRUint8 *index; /* NULL, if map is in index order. Otherwise
specifies the indices of the map entries. */
void *table; /* Lookup table for this colormap. Private to
the Image Library. */
} GIF_ColorMap;
/* An indexed RGB triplet. */
typedef struct _GIF_IRGB {
PRUint8 index;
PRUint8 red, green, blue;
} GIF_IRGB;
/* A GIF decoder's state */
typedef struct gif_struct {
void* clientptr;
/* Callbacks for this decoder instance*/
int (PR_CALLBACK *GIFCallback_NewPixmap)();
int (PR_CALLBACK *GIFCallback_BeginGIF)(
void* aClientData,
PRUint32 aLogicalScreenWidth,
PRUint32 aLogicalScreenHeight,
PRUint8 aLogicalScreenBackgroundRGBIndex);
int (PR_CALLBACK* GIFCallback_EndGIF)(
void* aClientData,
int aAnimationLoopCount);
int (PR_CALLBACK* GIFCallback_BeginImageFrame)(
void* aClientData,
PRUint32 aFrameNumber, /* Frame number, 1-n */
PRUint32 aFrameXOffset, /* X offset in logical screen */
PRUint32 aFrameYOffset, /* Y offset in logical screen */
PRUint32 aFrameWidth,
PRUint32 aFrameHeight,
GIF_RGB* aTransparencyChromaKey);
int (PR_CALLBACK* GIFCallback_EndImageFrame)(
void* aClientData,
PRUint32 aFrameNumber,
PRUint32 aDelayTimeout);
int (PR_CALLBACK* GIFCallback_SetupColorspaceConverter)();
int (PR_CALLBACK* GIFCallback_ResetPalette)();
int (PR_CALLBACK* GIFCallback_InitTransparentPixel)();
int (PR_CALLBACK* GIFCallback_DestroyTransparentPixel)();
int (PR_CALLBACK* GIFCallback_HaveDecodedRow)(
void* aClientData,
PRUint8* aRowBufPtr, /* Pointer to single scanline temporary buffer */
PRUint8* aRGBrowBufPtr,/* Pointer to temporary storage for dithering/mapping */
int aXOffset, /* With respect to GIF logical screen origin */
int aLength, /* Length of the row? */
int aRow, /* Row number? */
int aDuplicateCount, /* Number of times to duplicate the row? */
PRUint8 aDrawMode, /* il_draw_mode */
int aInterlacePass);
int (PR_CALLBACK *GIFCallback_HaveImageAll)(
void* aClientData);
/* Parsing state machine */
gstate state; /* Curent decoder master state */
PRUint8 *hold; /* Accumulation buffer */
int32 hold_size; /* Capacity, in bytes, of accumulation buffer */
PRUint8 *gather_head; /* Next byte to read in accumulation buffer */
int32 gather_request_size; /* Number of bytes to accumulate */
int32 gathered; /* bytes accumulated so far*/
gstate post_gather_state; /* State after requested bytes accumulated */
int32 requested_buffer_fullness; /* For netscape application extension */
/* LZW decoder state machine */
PRUint8 *stack; /* Base of decoder stack */
PRUint8 *stackp; /* Current stack pointer */
PRUint16 *prefix;
PRUint8 *suffix;
int datasize;
int codesize;
int codemask;
int clear_code; /* Codeword used to trigger dictionary reset */
int avail; /* Index of next available slot in dictionary */
int oldcode;
PRUint8 firstchar;
int count; /* Remaining # bytes in sub-block */
int bits; /* Number of unread bits in "datum" */
int32 datum; /* 32-bit input buffer */
/* Output state machine */
int ipass; /* Interlace pass; Ranges 1-4 if interlaced. */
PRUintn rows_remaining; /* Rows remaining to be output */
PRUintn irow; /* Current output row, starting at zero */
PRUint8 *rgbrow; /* Temporary storage for dithering/mapping */
PRUint8 *rowbuf; /* Single scanline temporary buffer */
PRUint8 *rowend; /* Pointer to end of rowbuf */
PRUint8 *rowp; /* Current output pointer */
/* Parameters for image frame currently being decoded*/
PRUintn x_offset, y_offset; /* With respect to "screen" origin */
PRUintn height, width;
PRUintn last_x_offset, last_y_offset; /* With respect to "screen" origin */
PRUintn last_height, last_width;
int interlaced; /* TRUE, if scanlines arrive interlaced order */
int tpixel; /* Index of transparent pixel */
GIF_IRGB* transparent_pixel;
int is_transparent; /* TRUE, if tpixel is valid */
int control_extension; /* TRUE, if image control extension present */
int is_local_colormap_defined;
gdispose disposal_method; /* Restore to background, leave in place, etc.*/
gdispose last_disposal_method;
GIF_RGB *local_colormap; /* Per-image colormap */
int local_colormap_size; /* Size of local colormap array. */
PRUint32 delay_time; /* Display time, in milliseconds,
for this image in a multi-image GIF */
/* Global (multi-image) state */
int screen_bgcolor; /* Logical screen background color */
int version; /* Either 89 for GIF89 or 87 for GIF87 */
PRUintn screen_width; /* Logical screen width & height */
PRUintn screen_height;
GIF_RGB *global_colormap; /* Default colormap if local not supplied */
int global_colormap_size; /* Size of global colormap array. */
int images_decoded; /* Counts images for multi-part GIFs */
int destroy_pending; /* Stream has ended */
int progressive_display; /* If TRUE, do Haeberli interlace hack */
int loop_count; /* Netscape specific extension block to control
the number of animation loops a GIF renders. */
} gif_struct;
/* Create a new gif_struct */
extern PRBool gif_create(gif_struct **gs);
/* These are the APIs that the client calls to intialize,
push data to, and shut down the GIF decoder. */
PRBool GIFInit(
gif_struct* gs,
void* aClientData,
int (*PR_CALLBACK GIFCallback_NewPixmap)(),
int (*PR_CALLBACK GIFCallback_BeginGIF)(
void* aClientData,
PRUint32 aLogicalScreenWidth,
PRUint32 aLogicalScreenHeight,
PRUint8 aBackgroundRGBIndex),
int (*PR_CALLBACK GIFCallback_EndGIF)(
void* aClientData,
int aAnimationLoopCount),
int (*PR_CALLBACK GIFCallback_BeginImageFrame)(
void* aClientData,
PRUint32 aFrameNumber, /* Frame number, 1-n */
PRUint32 aFrameXOffset, /* X offset in logical screen */
PRUint32 aFrameYOffset, /* Y offset in logical screen */
PRUint32 aFrameWidth,
PRUint32 aFrameHeight,
GIF_RGB* aTransparencyChromaKey),
int (*PR_CALLBACK GIFCallback_EndImageFrame)(
void* aClientData,
PRUint32 aFrameNumber,
PRUint32 aDelayTimeout),
int (*PR_CALLBACK GIFCallback_SetupColorspaceConverter)(),
int (*PR_CALLBACK GIFCallback_ResetPalette)(),
int (*PR_CALLBACK GIFCallback_InitTransparentPixel)(),
int (*PR_CALLBACK GIFCallback_DestroyTransparentPixel)(),
int (*PR_CALLBACK GIFCallback_HaveDecodedRow)(
void* aClientData,
PRUint8* aRowBufPtr, /* Pointer to single scanline temporary buffer */
PRUint8* aRGBrowBufPtr,/* Pointer to temporary storage for dithering/mapping */
int aXOffset, /* With respect to GIF logical screen origin */
int aLength, /* Length of the row? */
int aRow, /* Row number? */
int aDuplicateCount, /* Number of times to duplicate the row? */
PRUint8 aDrawMode, /* il_draw_mode */
int aInterlacePass),
int (*PR_CALLBACK GIFCallback_HaveImageAll)(
void* aClientData)
);
extern void gif_destroy(gif_struct* aGIFStruct);
int gif_write(gif_struct* aGIFStruct, const PRUint8 * buf, PRUint32 numbytes);
PRUint8 gif_write_ready(gif_struct* aGIFStruct);
extern void gif_complete(gif_struct** aGIFStruct);
extern void gif_delay_time_callback(/* void *closure */);
/* Callback functions that the client must implement and pass in
pointers for during the GIFInit call. These will be called back
when the decoder has a decoded rows, frame size information, etc.*/
/* GIFCallback_LogicalScreenSize is called only once to notify the client
of the logical screen size, which will be the size of the total image. */
typedef int (*PR_CALLBACK BEGINGIF_CALLBACK)(
void* aClientData,
PRUint32 aLogicalScreenWidth,
PRUint32 aLogicalScreenHeight,
PRUint8 aLogicalScreenBackgroundRGBIndex);
typedef int (PR_CALLBACK *GIFCallback_EndGIF)(
void* aClientData,
int aAnimationLoopCount);
/* GIFCallback_BeginImageFrame is called at the beginning of each frame of
a GIF.*/
typedef int (PR_CALLBACK *GIFCallback_BeginImageFrame)(
void* aClientData,
PRUint32 aFrameNumber, /* Frame number, 1-n */
PRUint32 aFrameXOffset, /* X offset in logical screen */
PRUint32 aFraqeYOffset, /* Y offset in logical screen */
PRUint32 aFrameWidth,
PRUint32 aFrameHeight);
extern int GIFCallback_EndImageFrame(
void* aClientData,
PRUint32 aFrameNumber,
PRUint32 aDelayTimeout); /* Time in milliseconds this frame should be displayed before the next frame.
This information appears in a sub control block, so we don't
transmit it back to the client until we're done with the frame. */
/*
extern int GIFCallback_SetupColorspaceConverter();
extern int GIFCallback_ResetPalette();
extern int GIFCallback_InitTransparentPixel();
extern int GIFCallback_DestroyTransparentPixel();
*/
extern int GIFCallback_HaveDecodedRow();
extern int GIFCallback_HaveImageAll();
#endif

View File

@@ -1,52 +0,0 @@
#!nmake
#
# 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 Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 2001 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Stuart Parmenter <pavlov@netscape.com>
#
DEPTH=..\..\..\..
include <$(DEPTH)/config/config.mak>
MODULE = imggif
LIBRARY_NAME = imggif
DLL = $(OBJDIR)\$(LIBRARY_NAME).dll
MAKE_OBJ_TYPE = DLL
OBJS = \
.\$(OBJDIR)\nsGIFDecoder2.obj \
.\$(OBJDIR)\GIF2.obj \
.\$(OBJDIR)\nsGIFModule.obj \
$(NULL)
LLIBS=\
$(LIBNSPR) \
$(DIST)\lib\xpcom.lib \
$(DIST)\lib\gkgfxwin.lib \
$(NULL)
include <$(DEPTH)\config\rules.mak>
install:: $(DLL)
$(MAKE_INSTALL) .\$(OBJDIR)\$(LIBRARY_NAME).dll $(DIST)\bin\components
$(MAKE_INSTALL) .\$(OBJDIR)\$(LIBRARY_NAME).lib $(DIST)\lib
clobber::
rm -f $(DIST)\bin\components\$(LIBRARY_NAME).dll
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib

View File

@@ -1,506 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation.
* All Rights Reserved.
*
* Contributor(s):
* Chris Saari <saari@netscape.com>
*/
#include "nsGIFDecoder2.h"
#include "nsIInputStream.h"
#include "nsIComponentManager.h"
#include "nsIImage.h"
#include "nsMemory.h"
#include "imgIContainerObserver.h"
#include "nsRect.h"
//////////////////////////////////////////////////////////////////////
// GIF Decoder Implementation
// This is an adaptor between GIF2 and imgIDecoder
NS_IMPL_ISUPPORTS2(nsGIFDecoder2, imgIDecoder, nsIOutputStream);
nsGIFDecoder2::nsGIFDecoder2()
{
NS_INIT_ISUPPORTS();
mImageFrame = nsnull;
mGIFStruct = nsnull;
mAlphaLine = nsnull;
}
nsGIFDecoder2::~nsGIFDecoder2(void)
{
if (mAlphaLine)
nsMemory::Free(mAlphaLine);
if (mGIFStruct) {
gif_destroy(mGIFStruct);
mGIFStruct = nsnull;
}
}
//******************************************************************************
/** imgIDecoder methods **/
//******************************************************************************
//******************************************************************************
/* void init (in imgIRequest aRequest); */
NS_IMETHODIMP nsGIFDecoder2::Init(imgIRequest *aRequest)
{
mImageRequest = aRequest;
mObserver = do_QueryInterface(aRequest); // we're holding 2 strong refs to the request.
aRequest->GetImage(getter_AddRefs(mImageContainer));
/* do gif init stuff */
/* Always decode to 24 bit pixdepth */
PRBool created = gif_create(&mGIFStruct);
NS_ASSERTION(created, "gif_create failed");
// Call GIF decoder init routine
GIFInit(
mGIFStruct,
this,
NewPixmap,
BeginGIF,
EndGIF,
BeginImageFrame,
EndImageFrame,
SetupColorspaceConverter,
ResetPalette,
InitTransparentPixel,
DestroyTransparentPixel,
HaveDecodedRow,
HaveImageAll);
return NS_OK;
}
//******************************************************************************
/* readonly attribute imgIRequest request; */
NS_IMETHODIMP nsGIFDecoder2::GetRequest(imgIRequest * *aRequest)
{
*aRequest = mImageRequest;
NS_IF_ADDREF(*aRequest);
return NS_OK;
}
//******************************************************************************
/** nsIOutputStream methods **/
//******************************************************************************
//******************************************************************************
/* void close (); */
NS_IMETHODIMP nsGIFDecoder2::Close()
{
if (mGIFStruct) {
gif_destroy(mGIFStruct);
mGIFStruct = nsnull;
}
return NS_OK;
}
//******************************************************************************
/* void flush (); */
NS_IMETHODIMP nsGIFDecoder2::Flush()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
//******************************************************************************
/* unsigned long write (in string buf, in unsigned long count); */
NS_IMETHODIMP nsGIFDecoder2::Write(const char *buf, PRUint32 count, PRUint32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
//******************************************************************************
/* static callback from nsIInputStream::ReadSegments */
static NS_METHOD ReadDataOut(nsIInputStream* in,
void* closure,
const char* fromRawSegment,
PRUint32 toOffset,
PRUint32 count,
PRUint32 *writeCount)
{
nsGIFDecoder2 *decoder = NS_STATIC_CAST(nsGIFDecoder2*, closure);
*writeCount = decoder->ProcessData((unsigned char*)fromRawSegment, count);
return NS_OK;
}
//******************************************************************************
PRUint32 nsGIFDecoder2::ProcessData(unsigned char *data, PRUint32 count)
{
// Push the data to the GIF decoder
// First we ask if the gif decoder is ready for more data, and if so, push it.
// In the new decoder, we should always be able to process more data since
// we don't wait to decode each frame in an animation now.
if(gif_write_ready(mGIFStruct)) {
gif_write(mGIFStruct, data, count);
}
return count; // we always consume all the data
}
//******************************************************************************
/* unsigned long writeFrom (in nsIInputStream inStr, in unsigned long count); */
NS_IMETHODIMP nsGIFDecoder2::WriteFrom(nsIInputStream *inStr, PRUint32 count, PRUint32 *_retval)
{
inStr->ReadSegments(
ReadDataOut, // Callback
this,
count,
_retval);
// if error
//mRequest->Cancel(NS_BINDING_ABORTED); // XXX is this the correct error ?
return NS_OK;
}
//******************************************************************************
/* [noscript] unsigned long writeSegments (in nsReadSegmentFun reader, in voidPtr closure, in unsigned long count); */
NS_IMETHODIMP nsGIFDecoder2::WriteSegments(nsReadSegmentFun reader, void * closure, PRUint32 count, PRUint32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
//******************************************************************************
/* attribute boolean nonBlocking; */
NS_IMETHODIMP nsGIFDecoder2::GetNonBlocking(PRBool *aNonBlocking)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
//******************************************************************************
NS_IMETHODIMP nsGIFDecoder2::SetNonBlocking(PRBool aNonBlocking)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
//******************************************************************************
/* attribute nsIOutputStreamObserver observer; */
NS_IMETHODIMP nsGIFDecoder2::GetObserver(nsIOutputStreamObserver * *aObserver)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
//******************************************************************************
NS_IMETHODIMP nsGIFDecoder2::SetObserver(nsIOutputStreamObserver * aObserver)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
//******************************************************************************
// GIF decoder callback methods. Part of pulic API for GIF2
//******************************************************************************
//******************************************************************************
int BeginGIF(
void* aClientData,
PRUint32 aLogicalScreenWidth,
PRUint32 aLogicalScreenHeight,
PRUint8 aBackgroundRGBIndex)
{
// copy GIF info into imagelib structs
nsGIFDecoder2 *decoder = NS_STATIC_CAST(nsGIFDecoder2*, aClientData);
if (decoder->mObserver)
decoder->mObserver->OnStartDecode(nsnull, nsnull);
decoder->mImageContainer->Init(aLogicalScreenWidth, aLogicalScreenHeight, decoder->mObserver);
if (decoder->mObserver)
decoder->mObserver->OnStartContainer(nsnull, nsnull, decoder->mImageContainer);
return 0;
}
//******************************************************************************
int EndGIF(
void* aClientData,
int aAnimationLoopCount)
{
nsGIFDecoder2 *decoder = NS_STATIC_CAST(nsGIFDecoder2*, aClientData);
if (decoder->mObserver) {
decoder->mObserver->OnStopContainer(nsnull, nsnull, decoder->mImageContainer);
decoder->mObserver->OnStopDecode(nsnull, nsnull, NS_OK, nsnull);
}
decoder->mImageContainer->SetLoopCount(aAnimationLoopCount);
decoder->mImageContainer->DecodingComplete();
return 0;
}
//******************************************************************************
int BeginImageFrame(
void* aClientData,
PRUint32 aFrameNumber, /* Frame number, 1-n */
PRUint32 aFrameXOffset, /* X offset in logical screen */
PRUint32 aFrameYOffset, /* Y offset in logical screen */
PRUint32 aFrameWidth,
PRUint32 aFrameHeight,
GIF_RGB* aTransparencyChromaKey) /* don't have this info yet */
{
nsGIFDecoder2* decoder = NS_STATIC_CAST(nsGIFDecoder2*, aClientData);
decoder->mImageFrame = nsnull; // clear out our current frame reference
decoder->mGIFStruct->x_offset = aFrameXOffset;
decoder->mGIFStruct->y_offset = aFrameYOffset;
decoder->mGIFStruct->width = aFrameWidth;
decoder->mGIFStruct->height = aFrameHeight;
return 0;
}
//******************************************************************************
int EndImageFrame(
void* aClientData,
PRUint32 aFrameNumber,
PRUint32 aDelayTimeout) /* Time this frame should be displayed before the next frame
we can't have this in the image frame init because it doesn't
show up in the GIF frame header, it shows up in a sub control
block.*/
{
nsGIFDecoder2* decoder = NS_STATIC_CAST(nsGIFDecoder2*, aClientData);
// We actually have the timeout information before we get the lzw encoded image
// data, at least according to the spec, but we delay in setting the timeout for
// the image until here to help ensure that we have the whole image frame decoded before
// we go off and try to display another frame.
// XXXXXXXX
// decoder->mImageFrame->SetTimeout(aDelayTimeout);
decoder->mImageContainer->EndFrameDecode(aFrameNumber, aDelayTimeout);
if (decoder->mObserver)
decoder->mObserver->OnStopFrame(nsnull, nsnull, decoder->mImageFrame);
decoder->mImageFrame = nsnull;
return 0;
}
//******************************************************************************
// GIF decoder callback
int HaveImageAll(
void* aClientData)
{
return 0;
}
//******************************************************************************
// GIF decoder callback notification that it has decoded a row
int HaveDecodedRow(
void* aClientData,
PRUint8* aRowBufPtr, // Pointer to single scanline temporary buffer
PRUint8* aRGBrowBufPtr,// Pointer to temporary storage for dithering/mapping
int aXOffset, // With respect to GIF logical screen origin
int aLength, // Length of the row?
int aRowNumber, // Row number?
int aDuplicateCount, // Number of times to duplicate the row?
PRUint8 aDrawMode, // il_draw_mode
int aInterlacePass) // interlace pass (1-4)
{
nsGIFDecoder2* decoder = NS_STATIC_CAST(nsGIFDecoder2*, aClientData);
PRUint32 bpr, abpr;
// We have to delay allocation of the image frame until now because
// we won't have control block info (transparency) until now. The conrol
// block of a GIF stream shows up after the image header since transparency
// is added in GIF89a and control blocks are how the extensions are done.
// How annoying.
if(! decoder->mImageFrame) {
gfx_format format = gfxIFormats::RGB;
if (decoder->mGIFStruct->is_transparent)
format = gfxIFormats::RGB_A1;
#ifdef XP_PC
// XXX this works...
format += 1; // RGB to BGR
#endif
// initalize the frame and append it to the container
decoder->mImageFrame = do_CreateInstance("@mozilla.org/gfx/image/frame;2");
decoder->mImageFrame->Init(
decoder->mGIFStruct->x_offset, decoder->mGIFStruct->y_offset,
decoder->mGIFStruct->width, decoder->mGIFStruct->height, format);
decoder->mImageContainer->AppendFrame(decoder->mImageFrame);
if (decoder->mObserver)
decoder->mObserver->OnStartFrame(nsnull, nsnull, decoder->mImageFrame);
decoder->mImageFrame->GetImageBytesPerRow(&bpr);
decoder->mImageFrame->GetAlphaBytesPerRow(&abpr);
if (format == gfxIFormats::RGB_A1 || format == gfxIFormats::BGR_A1) {
if (decoder->mAlphaLine)
nsMemory::Free(decoder->mAlphaLine);
decoder->mAlphaLine = (PRUint8 *)nsMemory::Alloc(abpr);
}
} else {
decoder->mImageFrame->GetImageBytesPerRow(&bpr);
decoder->mImageFrame->GetAlphaBytesPerRow(&abpr);
}
if (aRowBufPtr) {
nscoord width;
decoder->mImageFrame->GetWidth(&width);
PRUint32 iwidth = width;
gfx_format format;
decoder->mImageFrame->GetFormat(&format);
// XXX map the data into colors
int cmapsize;
GIF_RGB* cmap;
if(decoder->mGIFStruct->local_colormap) {
cmapsize = decoder->mGIFStruct->local_colormap_size;
cmap = decoder->mGIFStruct->local_colormap;
} else {
cmapsize = decoder->mGIFStruct->global_colormap_size;
cmap = decoder->mGIFStruct->global_colormap;
}
PRUint8* rgbRowIndex = aRGBrowBufPtr;
PRUint8* rowBufIndex = aRowBufPtr;
switch (format) {
case gfxIFormats::RGB:
{
while(rowBufIndex != decoder->mGIFStruct->rowend) {
#ifdef XP_MAC
*rgbRowIndex++ = 0; // Mac is always 32bits per pixel, this is pad
#endif
*rgbRowIndex++ = cmap[PRUint8(*rowBufIndex)].red;
*rgbRowIndex++ = cmap[PRUint8(*rowBufIndex)].green;
*rgbRowIndex++ = cmap[PRUint8(*rowBufIndex)].blue;
++rowBufIndex;
}
decoder->mImageFrame->SetImageData((PRUint8*)aRGBrowBufPtr, bpr, aRowNumber*bpr);
}
break;
case gfxIFormats::BGR:
{
while(rowBufIndex != decoder->mGIFStruct->rowend) {
*rgbRowIndex++ = cmap[PRUint8(*rowBufIndex)].blue;
*rgbRowIndex++ = cmap[PRUint8(*rowBufIndex)].green;
*rgbRowIndex++ = cmap[PRUint8(*rowBufIndex)].red;
++rowBufIndex;
}
decoder->mImageFrame->SetImageData((PRUint8*)aRGBrowBufPtr, bpr, aRowNumber*bpr);
}
break;
case gfxIFormats::RGB_A1:
case gfxIFormats::BGR_A1:
{
memset(aRGBrowBufPtr, 0, bpr);
memset(decoder->mAlphaLine, 0, abpr);
PRUint32 iwidth = (PRUint32)width;
for (PRUint32 x=0; x<iwidth; x++) {
if (*rowBufIndex != decoder->mGIFStruct->tpixel) {
#ifdef XP_PC
*rgbRowIndex++ = cmap[PRUint8(*rowBufIndex)].blue;
*rgbRowIndex++ = cmap[PRUint8(*rowBufIndex)].green;
*rgbRowIndex++ = cmap[PRUint8(*rowBufIndex)].red;
#else
#ifdef XP_MAC
*rgbRowIndex++ = 0; // Mac is always 32bits per pixel, this is pad
#endif
*rgbRowIndex++ = cmap[PRUint8(*rowBufIndex)].red;
*rgbRowIndex++ = cmap[PRUint8(*rowBufIndex)].green;
*rgbRowIndex++ = cmap[PRUint8(*rowBufIndex)].blue;
#endif
decoder->mAlphaLine[x>>3] |= 1<<(7-x&0x7);
} else {
#ifdef XP_MAC
rgbRowIndex+=4;
#else
rgbRowIndex+=3;
#endif
}
++rowBufIndex;
}
decoder->mImageFrame->SetImageData((PRUint8*)aRGBrowBufPtr, bpr, aRowNumber*bpr);
decoder->mImageFrame->SetAlphaData(decoder->mAlphaLine, abpr, aRowNumber*abpr);
}
break;
default:
break;
}
nsRect r(0, aRowNumber, width, 1);
decoder->mObserver->OnDataAvailable(nsnull, nsnull, decoder->mImageFrame, &r);
}
return 0;
}
//******************************************************************************
int ResetPalette()
{
return 0;
}
//******************************************************************************
int SetupColorspaceConverter()
{
return 0;
}
//******************************************************************************
int EndImageFrame()
{
return 0;
}
//******************************************************************************
int NewPixmap()
{
return 0;
}
//******************************************************************************
int InitTransparentPixel()
{
return 0;
}
//******************************************************************************
int DestroyTransparentPixel()
{
return 0;
}

View File

@@ -1,114 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation.
* All Rights Reserved.
*
* Contributor(s):
* Chris Saari <saari@netscape.com>
*/
#ifndef _nsGIFDecoder2_h
#define _nsGIFDecoder2_h
#include "nsCOMPtr.h"
#include "imgIDecoder.h"
#include "imgIContainer.h"
#include "imgIDecoderObserver.h"
#include "gfxIImageFrame.h"
#include "imgIRequest.h"
#include "GIF2.h"
#define NS_GIFDECODER2_CID \
{ /* 797bec5a-1dd2-11b2-a7f8-ca397e0179c4 */ \
0x797bec5a, \
0x1dd2, \
0x11b2, \
{0xa7, 0xf8, 0xca, 0x39, 0x7e, 0x01, 0x79, 0xc4} \
}
//////////////////////////////////////////////////////////////////////
// nsGIFDecoder2 Definition
class nsGIFDecoder2 : public imgIDecoder
{
public:
NS_DECL_ISUPPORTS
NS_DECL_IMGIDECODER
NS_DECL_NSIOUTPUTSTREAM
nsGIFDecoder2();
virtual ~nsGIFDecoder2();
static NS_METHOD Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
NS_METHOD ProcessData(unsigned char *data, PRUint32 count);
nsCOMPtr<imgIContainer> mImageContainer;
nsCOMPtr<gfxIImageFrame> mImageFrame;
nsCOMPtr<imgIRequest> mImageRequest;
nsCOMPtr<imgIDecoderObserver> mObserver; // this is just qi'd from mRequest for speed
gif_struct *mGIFStruct;
PRUint8 *mAlphaLine;
};
// static callbacks for the GIF decoder
static int PR_CALLBACK BeginGIF(
void* aClientData,
PRUint32 aLogicalScreenWidth,
PRUint32 aLogicalScreenHeight,
PRUint8 aBackgroundRGBIndex);
static int PR_CALLBACK HaveDecodedRow(
void* aClientData,
PRUint8* aRowBufPtr, // Pointer to single scanline temporary buffer
PRUint8* aRGBrowBufPtr,// Pointer to temporary storage for dithering/mapping
int aXOffset, // With respect to GIF logical screen origin
int aLength, // Length of the row?
int aRow, // Row number?
int aDuplicateCount, // Number of times to duplicate the row?
PRUint8 aDrawMode, // il_draw_mode
int aInterlacePass);
static int PR_CALLBACK NewPixmap();
static int PR_CALLBACK EndGIF(
void* aClientData,
int aAnimationLoopCount);
static int PR_CALLBACK BeginImageFrame(
void* aClientData,
PRUint32 aFrameNumber, /* Frame number, 1-n */
PRUint32 aFrameXOffset, /* X offset in logical screen */
PRUint32 aFrameYOffset, /* Y offset in logical screen */
PRUint32 aFrameWidth,
PRUint32 aFrameHeight,
GIF_RGB* aTransparencyChromaKey);
static int PR_CALLBACK EndImageFrame(
void* aClientData,
PRUint32 aFrameNumber,
PRUint32 aDelayTimeout);
static int PR_CALLBACK SetupColorspaceConverter();
static int PR_CALLBACK ResetPalette();
static int PR_CALLBACK InitTransparentPixel();
static int PR_CALLBACK DestroyTransparentPixel();
static int PR_CALLBACK HaveImageAll(
void* aClientData);
#endif

View File

@@ -1,18 +0,0 @@
?AddRef@nsGIFDecoder2@@UAGKXZ ; 2550
?Release@nsGIFDecoder2@@UAGKXZ ; 2550
?gif_write_ready@@YAEPAUgif_struct@@@Z ; 1624
?ProcessData@nsGIFDecoder2@@QAGIPAEI@Z ; 1624
?gif_write@@YAHPAUgif_struct@@PBEI@Z ; 1624
?WriteFrom@nsGIFDecoder2@@UAGIPAVnsIInputStream@@IPAI@Z ; 1309
?Close@nsGIFDecoder2@@UAGIXZ ; 1275
??_GnsGIFDecoder2@@UAEPAXI@Z ; 1275
??0nsGIFDecoder2@@QAE@XZ ; 1275
??1nsGIFDecoder2@@UAE@XZ ; 1275
?QueryInterface@nsGIFDecoder2@@UAGIABUnsID@@PAPAX@Z ; 1275
?GIFInit@@YAHPAUgif_struct@@PAXP6AHXZP6AH1IIE@ZP6AH1H@ZP6AH1IIIIIPAU_GIF_RGB@@@ZP6AH1II@Z2222P6AH1PAE8HHHHEH@ZP6AH1@Z@Z ; 1275
?Init@nsGIFDecoder2@@UAGIPAVimgIRequest@@@Z ; 1275
?Flush@nsGIFDecoder2@@UAGIXZ ; 1275
?gif_destroy@@YAXPAUgif_struct@@@Z ; 1275
?gif_create@@YAHPAPAUgif_struct@@@Z ; 1275
?il_BACat@@YAPADPAPADIPBDI@Z ; 698
_NSGetModule ; 1

View File

@@ -1,378 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* 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 Brian Ryner.
* Portions created by Brian Ryner are Copyright (C) 2000 Brian Ryner.
* All Rights Reserved.
*
* Contributor(s):
* Scott MacGregor <mscott@netscape.com>
*/
#include "nsIconChannel.h"
#include "nsIServiceManager.h"
#include "nsIInterfaceRequestor.h"
#include "nsXPIDLString.h"
#include "nsMimeTypes.h"
#include "nsMemory.h"
#include "nsIStringStream.h"
#include "nsIURL.h"
#include "nsNetUtil.h"
#include "nsIMimeService.h"
#include "nsCExternalHandlerService.h"
#include "plstr.h"
#include <Files.h>
#include <QuickDraw.h>
// nsIconChannel methods
nsIconChannel::nsIconChannel()
{
NS_INIT_REFCNT();
mStatus = NS_OK;
}
nsIconChannel::~nsIconChannel()
{}
NS_IMPL_THREADSAFE_ISUPPORTS2(nsIconChannel,
nsIChannel,
nsIRequest)
nsresult nsIconChannel::Init(nsIURI* uri)
{
nsresult rv;
NS_ASSERTION(uri, "no uri");
mUrl = uri;
return NS_OK;
}
////////////////////////////////////////////////////////////////////////////////
// nsIRequest methods:
NS_IMETHODIMP nsIconChannel::GetName(PRUnichar* *result)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsIconChannel::IsPending(PRBool *result)
{
NS_NOTREACHED("nsIconChannel::IsPending");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsIconChannel::GetStatus(nsresult *status)
{
*status = mStatus;
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::Cancel(nsresult status)
{
NS_ASSERTION(NS_FAILED(status), "shouldn't cancel with a success code");
nsresult rv = NS_ERROR_FAILURE;
mStatus = status;
return rv;
}
NS_IMETHODIMP nsIconChannel::Suspend(void)
{
NS_NOTREACHED("nsIconChannel::Suspend");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsIconChannel::Resume(void)
{
NS_NOTREACHED("nsIconChannel::Resume");
return NS_ERROR_NOT_IMPLEMENTED;
}
////////////////////////////////////////////////////////////////////////////////
// nsIChannel methods:
NS_IMETHODIMP nsIconChannel::GetOriginalURI(nsIURI* *aURI)
{
*aURI = mOriginalURI ? mOriginalURI : mUrl;
NS_ADDREF(*aURI);
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::SetOriginalURI(nsIURI* aURI)
{
mOriginalURI = aURI;
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::GetURI(nsIURI* *aURI)
{
*aURI = mUrl;
NS_IF_ADDREF(*aURI);
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::SetURI(nsIURI* aURI)
{
mUrl = aURI;
return NS_OK;
}
NS_IMETHODIMP
nsIconChannel::Open(nsIInputStream **_retval)
{
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsIconChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports *ctxt)
{
// get the file name from the url
nsXPIDLCString fileName; // will contain a dummy file we'll use to figure out the type of icon desired.
nsXPIDLCString filePath; // will contain an optional parameter for small vs. large icon. default is small
mUrl->GetHost(getter_Copies(fileName));
nsCOMPtr<nsIURL> url (do_QueryInterface(mUrl));
if (url)
url->GetFileBaseName(getter_Copies(filePath));
nsresult rv = NS_OK;
nsCOMPtr<nsIMIMEService> mimeService (do_GetService(NS_MIMESERVICE_CONTRACTID, &rv));
NS_ENSURE_SUCCESS(rv, rv);
// extract the extension out of the dummy file so we can look it up in the mime service.
char * chFileName = fileName.get(); // get the underlying buffer
char * fileExtension = PL_strrchr(chFileName, '.');
if (!fileExtension) return NS_ERROR_FAILURE; // no file extension to work from.
// look the file extension up in the registry.
nsCOMPtr<nsIMIMEInfo> mimeInfo;
mimeService->GetFromExtension(fileExtension, getter_AddRefs(mimeInfo));
NS_ENSURE_TRUE(mimeInfo, NS_ERROR_FAILURE);
// get the mac creator and file type for this mime object
PRUint32 macType;
PRUint32 macCreator;
mimeInfo->GetMacType(&macType);
mimeInfo->GetMacCreator(&macCreator);
// get a refernce to the desktop database
DTPBRec pb;
OSErr err = noErr;
memset(&pb, 0, sizeof(DTPBRec));
pb.ioCompletion = nil;
pb.ioVRefNum = 0; // default desktop volume
pb.ioNamePtr = nil;
err = PBDTGetPath(&pb);
if (err != noErr) return NS_ERROR_FAILURE;
pb.ioFileCreator = macCreator;
pb.ioFileType = macType;
pb.ioCompletion = nil;
pb.ioTagInfo = 0;
PRUint32 numPixelsInRow = 0;
if (filePath && !nsCRT::strcmp(filePath, "large"))
{
pb.ioDTReqCount = kLarge8BitIconSize;
pb.ioIconType = kLarge8BitIcon;
numPixelsInRow = 32;
}
else
{
pb.ioDTReqCount = kSmall8BitIconSize;
pb.ioIconType = kSmall8BitIcon;
numPixelsInRow = 16;
}
// allocate a buffer large enough to handle the icon
PRUint8 * bitmapData = (PRUint8 *) nsMemory::Alloc (pb.ioDTReqCount);
pb.ioDTBuffer = (Ptr) bitmapData;
err = PBDTGetIcon(&pb, false);
if (err != noErr) return NS_ERROR_FAILURE; // unable to fetch the icon....
nsCString iconBuffer;
iconBuffer.Assign((char) numPixelsInRow);
iconBuffer.Append((char) numPixelsInRow);
CTabHandle cTabHandle = GetCTable(72);
if (!cTabHandle) return NS_ERROR_FAILURE;
HLock((Handle) cTabHandle);
CTabPtr colTable = *cTabHandle;
RGBColor rgbCol;
PRUint8 redValue, greenValue, blueValue;
for (PRUint32 index = 0; index < pb.ioDTReqCount; index ++)
{
// each byte in bitmapData needs to be converted from an 8 bit system color into
// 24 bit RGB data which our special icon image decoder can understand.
ColorSpec colSpec = colTable->ctTable[ bitmapData[index]];
rgbCol = colSpec.rgb;
redValue = rgbCol.red & 0xff;
greenValue = rgbCol.green & 0xff;
blueValue = rgbCol.blue & 0xff;
// for some reason the image code on the mac expects each RGB pixel value to be padded with a preceding byte.
// so add the padding here....
iconBuffer.Append((char) 0);
iconBuffer.Append((char) redValue);
iconBuffer.Append((char) greenValue);
iconBuffer.Append((char) blueValue);
}
HUnlock((Handle) cTabHandle);
DisposeCTable(cTabHandle);
nsMemory::Free(bitmapData);
// now that the color bitmask is taken care of, we need to do the same thing again for the transparency
// bit mask....
if (filePath && !nsCRT::strcmp(filePath, "large"))
{
pb.ioDTReqCount = kLargeIconSize;
pb.ioIconType = kLargeIcon;
}
else
{
pb.ioDTReqCount = kSmallIconSize;
pb.ioIconType = kSmallIcon;
}
// allocate a buffer large enough to handle the icon
bitmapData = (PRUint8 *) nsMemory::Alloc (pb.ioDTReqCount);
pb.ioDTBuffer = (Ptr) bitmapData;
err = PBDTGetIcon(&pb, false);
PRUint32 index = pb.ioDTReqCount/2;
while (index < pb.ioDTReqCount)
{
iconBuffer.Append((char) bitmapData[index]);
iconBuffer.Append((char) bitmapData[index + 1]);
if (numPixelsInRow == 32)
{
iconBuffer.Append((char) bitmapData[index + 2]);
iconBuffer.Append((char) bitmapData[index + 3]);
index += 4;
}
else
{
iconBuffer.Append((char) 255); // 2 bytes of padding
iconBuffer.Append((char) 255);
index += 2;
}
}
nsMemory::Free(bitmapData);
// turn our nsString into a stream looking object...
aListener->OnStartRequest(this, ctxt);
// turn our string into a stream...
nsCOMPtr<nsISupports> streamSupports;
NS_NewByteInputStream(getter_AddRefs(streamSupports), iconBuffer.get(), iconBuffer.Length());
nsCOMPtr<nsIInputStream> inputStr (do_QueryInterface(streamSupports));
aListener->OnDataAvailable(this, ctxt, inputStr, 0, iconBuffer.Length());
aListener->OnStopRequest(this, ctxt, NS_OK, nsnull);
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::GetLoadAttributes(PRUint32 *aLoadAttributes)
{
*aLoadAttributes = mLoadAttributes;
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::SetLoadAttributes(PRUint32 aLoadAttributes)
{
mLoadAttributes = aLoadAttributes;
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::GetContentType(char* *aContentType)
{
if (!aContentType) return NS_ERROR_NULL_POINTER;
*aContentType = nsCRT::strdup("image/icon");
if (!*aContentType) return NS_ERROR_OUT_OF_MEMORY;
return NS_OK;
}
NS_IMETHODIMP
nsIconChannel::SetContentType(const char *aContentType)
{
//It doesn't make sense to set the content-type on this type
// of channel...
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsIconChannel::GetContentLength(PRInt32 *aContentLength)
{
*aContentLength = mContentLength;
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::SetContentLength(PRInt32 aContentLength)
{
NS_NOTREACHED("nsIconChannel::SetContentLength");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsIconChannel::GetLoadGroup(nsILoadGroup* *aLoadGroup)
{
*aLoadGroup = mLoadGroup;
NS_IF_ADDREF(*aLoadGroup);
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::SetLoadGroup(nsILoadGroup* aLoadGroup)
{
mLoadGroup = aLoadGroup;
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::GetOwner(nsISupports* *aOwner)
{
*aOwner = mOwner.get();
NS_IF_ADDREF(*aOwner);
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::SetOwner(nsISupports* aOwner)
{
mOwner = aOwner;
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::GetNotificationCallbacks(nsIInterfaceRequestor* *aNotificationCallbacks)
{
*aNotificationCallbacks = mCallbacks.get();
NS_IF_ADDREF(*aNotificationCallbacks);
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::SetNotificationCallbacks(nsIInterfaceRequestor* aNotificationCallbacks)
{
mCallbacks = aNotificationCallbacks;
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::GetSecurityInfo(nsISupports * *aSecurityInfo)
{
*aSecurityInfo = nsnull;
return NS_OK;
}

View File

@@ -1,56 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* 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 Brian Ryner.
* Portions created by Brian Ryner are Copyright (C) 2000 Brian Ryner.
* All Rights Reserved.
*
* Contributor(s):
* Scott MacGregor <mscott@netscape.com>
*/
#ifndef nsIconChannel_h___
#define nsIconChannel_h___
#include "nsCOMPtr.h"
#include "nsXPIDLString.h"
#include "nsIChannel.h"
#include "nsILoadGroup.h"
#include "nsIInterfaceRequestor.h"
#include "nsIURI.h"
class nsIconChannel : public nsIChannel
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIREQUEST
NS_DECL_NSICHANNEL
nsIconChannel();
virtual ~nsIconChannel();
nsresult Init(nsIURI* uri);
protected:
nsCOMPtr<nsIURI> mUrl;
nsCOMPtr<nsIURI> mOriginalURI;
PRUint32 mLoadAttributes;
PRInt32 mContentLength;
nsCOMPtr<nsILoadGroup> mLoadGroup;
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
nsCOMPtr<nsISupports> mOwner;
nsresult mStatus;
};
#endif /* nsIconChannel_h___ */

View File

@@ -1,62 +0,0 @@
#!nmake
#
# 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 Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 2001 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Scott MacGregor <mscott@netscape.com>
#
DEPTH=..\..\..\..
include <$(DEPTH)/config/config.mak>
DIR=win
MODULE = imgicon
LIBRARY_NAME = imgicon
DLL = $(OBJDIR)\$(LIBRARY_NAME).dll
MAKE_OBJ_TYPE = DLL
OBJS = \
.\$(OBJDIR)\nsIconDecoder.obj \
.\$(OBJDIR)\nsIconModule.obj \
.\$(OBJDIR)\nsIconProtocolHandler.obj \
$(NULL)
LLIBS=\
$(LIBNSPR) \
$(DIST)\lib\xpcom.lib \
$(DIST)\lib\gkgfxwin.lib \
$(DIST)\lib\imgiconwin_s.lib \
$(NULL)
WIN_LIBS= shell32.lib
INCS = $(INCS) \
-I$(DEPTH)\dist\include \
-I$(DEPTH)\modules\libpr0n\decoders\icon\win \
$(NULL)
include <$(DEPTH)\config\rules.mak>
install:: $(DLL)
$(MAKE_INSTALL) .\$(OBJDIR)\$(LIBRARY_NAME).dll $(DIST)\bin\components
$(MAKE_INSTALL) .\$(OBJDIR)\$(LIBRARY_NAME).lib $(DIST)\lib
clobber::
rm -f $(DIST)\bin\components\$(LIBRARY_NAME).dll
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib

View File

@@ -1,195 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation.
* All Rights Reserved.
*
* Contributor(s):
* Scott MacGregor <mscott@netscape.com>
*
*/
#include "nsIconDecoder.h"
#include "nsIInputStream.h"
#include "imgIContainer.h"
#include "imgIContainerObserver.h"
#include "nspr.h"
#include "nsIComponentManager.h"
#include "nsRect.h"
NS_IMPL_THREADSAFE_ADDREF(nsIconDecoder);
NS_IMPL_THREADSAFE_RELEASE(nsIconDecoder);
NS_INTERFACE_MAP_BEGIN(nsIconDecoder)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIOutputStream)
NS_INTERFACE_MAP_ENTRY(nsIOutputStream)
NS_INTERFACE_MAP_ENTRY(imgIDecoder)
NS_INTERFACE_MAP_END_THREADSAFE
nsIconDecoder::nsIconDecoder()
{
NS_INIT_ISUPPORTS();
}
nsIconDecoder::~nsIconDecoder()
{ }
/** imgIDecoder methods **/
NS_IMETHODIMP nsIconDecoder::Init(imgIRequest *aRequest)
{
mRequest = aRequest;
mObserver = do_QueryInterface(aRequest); // we're holding 2 strong refs to the request.
aRequest->GetImage(getter_AddRefs(mImage));
mFrame = do_CreateInstance("@mozilla.org/gfx/image/frame;2");
if (!mFrame) return NS_ERROR_FAILURE;
return NS_OK;
}
NS_IMETHODIMP nsIconDecoder::GetRequest(imgIRequest * *aRequest)
{
*aRequest = mRequest;
NS_ADDREF(*aRequest);
return NS_OK;
}
/** nsIOutputStream methods **/
NS_IMETHODIMP nsIconDecoder::Close()
{
if (mObserver)
{
mObserver->OnStopFrame(nsnull, nsnull, mFrame);
mObserver->OnStopContainer(nsnull, nsnull, mImage);
mObserver->OnStopDecode(nsnull, nsnull, NS_OK, nsnull);
}
return NS_OK;
}
NS_IMETHODIMP nsIconDecoder::Flush()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsIconDecoder::Write(const char *buf, PRUint32 count, PRUint32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsIconDecoder::WriteFrom(nsIInputStream *inStr, PRUint32 count, PRUint32 *_retval)
{
nsresult rv;
char *buf = (char *)PR_Malloc(count);
if (!buf) return NS_ERROR_OUT_OF_MEMORY; /* we couldn't allocate the object */
// read the data from the input stram...
PRUint32 readLen;
rv = inStr->Read(buf, count, &readLen);
char *data = buf;
if (NS_FAILED(rv)) return rv;
// since WriteFrom is only called once, go ahead and fire the on start notifications..
mObserver->OnStartDecode(nsnull, nsnull);
PRUint32 i = 0;
// Read size
PRInt32 w, h;
w = data[0];
h = data[1];
data += 2;
readLen -= i + 2;
mImage->Init(w, h, mObserver);
if (mObserver)
mObserver->OnStartContainer(nsnull, nsnull, mImage);
mFrame->Init(0, 0, w, h, gfxIFormats::RGB_A1);
mImage->AppendFrame(mFrame);
if (mObserver)
mObserver->OnStartFrame(nsnull, nsnull, mFrame);
PRUint32 bpr, abpr;
nscoord width, height;
mFrame->GetImageBytesPerRow(&bpr);
mFrame->GetAlphaBytesPerRow(&abpr);
mFrame->GetWidth(&width);
mFrame->GetHeight(&height);
i = 0;
PRInt32 rownum = 0; // XXX this better not have a decimal
PRInt32 wroteLen = 0;
do
{
PRUint8 *line = (PRUint8*)data + i*bpr;
mFrame->SetImageData(line, bpr, (rownum++)*bpr);
nsRect r(0, rownum, width, 1);
mObserver->OnDataAvailable(nsnull, nsnull, mFrame, &r);
wroteLen += bpr ;
i++;
} while(rownum < height);
// now we want to send in the alpha data...
for (rownum = 0; rownum < height; rownum ++)
{
PRUint8 * line = (PRUint8*) data + abpr * rownum + height*bpr;
mFrame->SetAlphaData(line, abpr, (rownum)*abpr);
}
PR_FREEIF(buf);
return NS_OK;
}
NS_IMETHODIMP nsIconDecoder::WriteSegments(nsReadSegmentFun reader, void * closure, PRUint32 count, PRUint32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsIconDecoder::GetNonBlocking(PRBool *aNonBlocking)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsIconDecoder::SetNonBlocking(PRBool aNonBlocking)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsIconDecoder::GetObserver(nsIOutputStreamObserver * *aObserver)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsIconDecoder::SetObserver(nsIOutputStreamObserver * aObserver)
{
return NS_ERROR_NOT_IMPLEMENTED;
}

View File

@@ -1,79 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation.
* All Rights Reserved.
*
* Contributor(s):
* Scott MacGregor <mscott@netscape.com>
*/
#ifndef nsIconDecoder_h__
#define nsIconDecoder_h__
#include "imgIDecoder.h"
#include "nsCOMPtr.h"
#include "imgIContainer.h"
#include "imgIDecoderObserver.h"
#include "gfxIImageFrame.h"
#include "imgIRequest.h"
#define NS_ICONDECODER_CID \
{ /* FFC08380-256C-11d5-9905-001083010E9B */ \
0xffc08380, \
0x256c, \
0x11d5, \
{ 0x99, 0x5, 0x0, 0x10, 0x83, 0x1, 0xe, 0x9b } \
}
//////////////////////////////////////////////////////////////////////////////////////////////
// The icon decoder is a decoder specifically tailored for loading icons
// from the OS. We've defined our own little format to represent these icons
// and this decoder takes that format and converts it into 24-bit RGB with alpha channel
// support. It was modeled a bit off the PPM decoder.
//
// Assumptions about the decoder:
// (1) We receive ALL of the data from the icon channel in one OnDataAvailable call. We don't
// support multiple ODA calls yet.
// (2) the format of the incoming data is as follows:
// The first two bytes contain the width and the height of the icon.
// Followed by 3 bytes per pixel for the color bitmap row after row. (for heigh * width * 3 bytes)
// Followed by bit mask data (used for transparency on the alpha channel).
//
//
//////////////////////////////////////////////////////////////////////////////////////////////
class nsIconDecoder : public imgIDecoder
{
public:
NS_DECL_ISUPPORTS
NS_DECL_IMGIDECODER
NS_DECL_NSIOUTPUTSTREAM
nsIconDecoder();
virtual ~nsIconDecoder();
private:
nsCOMPtr<imgIContainer> mImage;
nsCOMPtr<gfxIImageFrame> mFrame;
nsCOMPtr<imgIRequest> mRequest;
nsCOMPtr<imgIDecoderObserver> mObserver; // this is just qi'd from mRequest for speed
};
#endif // nsIconDecoder_h__

View File

@@ -1,54 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Scott MacGregor <mscott@netscape.com>
*/
#include "nsIGenericFactory.h"
#include "nsIModule.h"
#include "nsIconDecoder.h"
#include "nsIconProtocolHandler.h"
// objects that just require generic constructors
/******************************************************************************
* Protocol CIDs
*/
#define NS_ICONPROTOCOL_CID { 0xd0f9db12, 0x249c, 0x11d5, { 0x99, 0x5, 0x0, 0x10, 0x83, 0x1, 0xe, 0x9b } }
NS_GENERIC_FACTORY_CONSTRUCTOR(nsIconDecoder)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsIconProtocolHandler)
static nsModuleComponentInfo components[] =
{
{ "icon decoder",
NS_ICONDECODER_CID,
"@mozilla.org/image/decoder;2?type=image/icon",
nsIconDecoderConstructor, },
{ "Icon Protocol Handler",
NS_ICONPROTOCOL_CID,
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "icon",
nsIconProtocolHandlerConstructor
}
};
NS_IMPL_NSGETMODULE("nsIconDecoderModule", components)

View File

@@ -1,90 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* 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 Brian Ryner.
* Portions created by Brian Ryner are Copyright (C) 2000 Brian Ryner.
* All Rights Reserved.
*
* Contributor(s):
* Scott MacGregor <mscott@netscape.com>
*/
#include "nsIconChannel.h"
#include "nsIconProtocolHandler.h"
#include "nsIURL.h"
#include "nsCRT.h"
#include "nsCOMPtr.h"
#include "nsIComponentManager.h"
#include "nsIServiceManager.h"
static NS_DEFINE_CID(kStandardURICID, NS_STANDARDURL_CID);
////////////////////////////////////////////////////////////////////////////////
nsIconProtocolHandler::nsIconProtocolHandler()
{
NS_INIT_REFCNT();
}
nsIconProtocolHandler::~nsIconProtocolHandler()
{}
NS_IMPL_ISUPPORTS2(nsIconProtocolHandler, nsIProtocolHandler, nsISupportsWeakReference)
////////////////////////////////////////////////////////////////////////////////
// nsIProtocolHandler methods:
NS_IMETHODIMP nsIconProtocolHandler::GetScheme(char* *result)
{
*result = nsCRT::strdup("icon");
if (!*result) return NS_ERROR_OUT_OF_MEMORY;
return NS_OK;
}
NS_IMETHODIMP nsIconProtocolHandler::GetDefaultPort(PRInt32 *result)
{
*result = 0;
return NS_OK;
}
NS_IMETHODIMP nsIconProtocolHandler::NewURI(const char *aSpec, nsIURI *aBaseURI, nsIURI **result)
{
nsresult rv;
// no concept of a relative icon url
NS_ASSERTION(!aBaseURI, "base url passed into icon protocol handler");
nsCOMPtr<nsIURI> url = do_CreateInstance(kStandardURICID, &rv);
if (NS_FAILED(rv)) return rv;
rv = url->SetSpec((char*)aSpec);
*result = url;
NS_IF_ADDREF(*result);
return rv;
}
NS_IMETHODIMP nsIconProtocolHandler::NewChannel(nsIURI* url, nsIChannel* *result)
{
nsCOMPtr<nsIChannel> channel;
NS_NEWXPCOM(channel, nsIconChannel);
if (channel)
NS_STATIC_CAST(nsIconChannel*,NS_STATIC_CAST(nsIChannel*, channel))->Init(url);
*result = channel;
NS_IF_ADDREF(*result);
return NS_OK;
}
////////////////////////////////////////////////////////////////////////////////

View File

@@ -1,377 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* 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 Brian Ryner.
* Portions created by Brian Ryner are Copyright (C) 2000 Brian Ryner.
* All Rights Reserved.
*
* Contributor(s):
* Scott MacGregor <mscott@netscape.com>
*/
#include "nsIconChannel.h"
#include "nsIServiceManager.h"
#include "nsIInterfaceRequestor.h"
#include "nsXPIDLString.h"
#include "nsMimeTypes.h"
#include "nsMemory.h"
#include "nsIStringStream.h"
#include "nsIURL.h"
#include "nsNetUtil.h"
// we need windows.h to read out registry information...
#include <windows.h>
#include <shellapi.h>
// nsIconChannel methods
nsIconChannel::nsIconChannel()
{
NS_INIT_REFCNT();
mStatus = NS_OK;
}
nsIconChannel::~nsIconChannel()
{}
NS_IMPL_THREADSAFE_ISUPPORTS2(nsIconChannel,
nsIChannel,
nsIRequest)
nsresult nsIconChannel::Init(nsIURI* uri)
{
nsresult rv;
NS_ASSERTION(uri, "no uri");
mUrl = uri;
return NS_OK;
}
////////////////////////////////////////////////////////////////////////////////
// nsIRequest methods:
NS_IMETHODIMP nsIconChannel::GetName(PRUnichar* *result)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsIconChannel::IsPending(PRBool *result)
{
NS_NOTREACHED("nsIconChannel::IsPending");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsIconChannel::GetStatus(nsresult *status)
{
*status = mStatus;
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::Cancel(nsresult status)
{
NS_ASSERTION(NS_FAILED(status), "shouldn't cancel with a success code");
nsresult rv = NS_ERROR_FAILURE;
mStatus = status;
return rv;
}
NS_IMETHODIMP nsIconChannel::Suspend(void)
{
NS_NOTREACHED("nsIconChannel::Suspend");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsIconChannel::Resume(void)
{
NS_NOTREACHED("nsIconChannel::Resume");
return NS_ERROR_NOT_IMPLEMENTED;
}
////////////////////////////////////////////////////////////////////////////////
// nsIChannel methods:
NS_IMETHODIMP nsIconChannel::GetOriginalURI(nsIURI* *aURI)
{
*aURI = mOriginalURI ? mOriginalURI : mUrl;
NS_ADDREF(*aURI);
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::SetOriginalURI(nsIURI* aURI)
{
mOriginalURI = aURI;
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::GetURI(nsIURI* *aURI)
{
*aURI = mUrl;
NS_IF_ADDREF(*aURI);
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::SetURI(nsIURI* aURI)
{
mUrl = aURI;
return NS_OK;
}
NS_IMETHODIMP
nsIconChannel::Open(nsIInputStream **_retval)
{
return NS_ERROR_FAILURE;
}
void InvertRows(unsigned char * aInitialBuffer, PRUint32 sizeOfBuffer, PRUint32 numBytesPerRow)
{
PRUint32 numRows = sizeOfBuffer / numBytesPerRow;
void * temporaryRowHolder = (void *) nsMemory::Alloc(numBytesPerRow);
PRUint32 currentRow = 0;
PRUint32 lastRow = (numRows - 1) * numBytesPerRow;
while (currentRow < lastRow)
{
// store the current row into a temporary buffer
nsCRT::memcpy(temporaryRowHolder, (void *) &aInitialBuffer[currentRow], numBytesPerRow);
nsCRT::memcpy((void *) &aInitialBuffer[currentRow], (void *)&aInitialBuffer[lastRow], numBytesPerRow);
nsCRT::memcpy((void *) &aInitialBuffer[lastRow], temporaryRowHolder, numBytesPerRow);
lastRow -= numBytesPerRow;
currentRow += numBytesPerRow;
}
}
NS_IMETHODIMP nsIconChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports *ctxt)
{
// get the file name from the url
nsXPIDLCString fileName; // will contain a dummy file we'll use to figure out the type of icon desired.
nsXPIDLCString filePath; // will contain an optional parameter for small vs. large icon. default is small
mUrl->GetHost(getter_Copies(fileName));
nsCOMPtr<nsIURL> url (do_QueryInterface(mUrl));
if (url)
url->GetFileBaseName(getter_Copies(filePath));
// 1) get a hIcon for the file.
SHFILEINFO sfi;
UINT infoFlags = SHGFI_USEFILEATTRIBUTES | SHGFI_ICON;
if (filePath && !nsCRT::strcmp(filePath, "large"))
infoFlags |= SHGFI_LARGEICON;
else // default to small
infoFlags |= SHGFI_SMALLICON;
LONG result= SHGetFileInfo(fileName, FILE_ATTRIBUTE_ARCHIVE, &sfi, sizeof(sfi), infoFlags);
if (result > 0 && sfi.hIcon)
{
// we got a handle to an icon. Now we want to get a bitmap for the icon using GetIconInfo....
ICONINFO pIconInfo;
result = GetIconInfo(sfi.hIcon, &pIconInfo);
if (result > 0)
{
// now we have the bit map we need to get info about the bitmap
BITMAPINFO pBitMapInfo;
BITMAPINFOHEADER pBitMapInfoHeader;
pBitMapInfo.bmiHeader.biBitCount = 0;
pBitMapInfo.bmiHeader.biSize = sizeof(pBitMapInfoHeader);
HDC pDC = CreateCompatibleDC(NULL); // get a device context for the screen.
result = GetDIBits(pDC, pIconInfo.hbmColor, 0, 0, NULL, &pBitMapInfo, DIB_RGB_COLORS);
if (result > 0 && pBitMapInfo.bmiHeader.biSizeImage > 0)
{
// allocate a buffer to hold the bit map....this should be a buffer that's biSizeImage...
unsigned char * buffer = (PRUint8 *) nsMemory::Alloc(pBitMapInfo.bmiHeader.biSizeImage);
result = GetDIBits(pDC, pIconInfo.hbmColor, 0, pBitMapInfo.bmiHeader.biHeight, (void *) buffer, &pBitMapInfo, DIB_RGB_COLORS);
if (result > 0)
{
PRUint32 bytesPerPixel = pBitMapInfo.bmiHeader.biBitCount / 8;
InvertRows(buffer, pBitMapInfo.bmiHeader.biSizeImage, pBitMapInfo.bmiHeader.biWidth * bytesPerPixel);
// Convert our little icon buffer which is padded to 4 bytes per pixel into a nice 3 byte per pixel
// description.
nsCString iconBuffer;
iconBuffer.Assign((char) pBitMapInfo.bmiHeader.biWidth);
iconBuffer.Append((char) pBitMapInfo.bmiHeader.biHeight);
PRInt32 index = 0;
if (pBitMapInfo.bmiHeader.biBitCount == 16)
{
PRUint8 redValue, greenValue, blueValue, partialGreen;
while (index < pBitMapInfo.bmiHeader.biSizeImage)
{
DWORD dst=(DWORD) buffer[index];
PRUint16 num = 0;
num = (PRUint8) buffer[index];
num <<= 8;
num |= (PRUint8) buffer[index+1];
//blueValue = (PRUint8)((*dst)&(0x1F));
//greenValue = (PRUint8)(((*dst)>>5)&(0x1F));
//redValue = (PRUint8)(((*dst)>>10)&(0x1F));
redValue = ((PRUint32) (((float)(num & 0x7c00) / 0x7c00) * 0xFF0000) & 0xFF0000)>> 16;
greenValue = ((PRUint32)(((float)(num & 0x03E0) / 0x03E0) * 0x00FF00) & 0x00FF00)>> 8;
blueValue = ((PRUint32)(((float)(num & 0x001F) / 0x001F) * 0x0000FF) & 0x0000FF);
// now we have the right RGB values...
iconBuffer.Append((char) redValue);
iconBuffer.Append((char) greenValue);
iconBuffer.Append((char) blueValue);
index += bytesPerPixel;
}
}
else
{
while (index <pBitMapInfo.bmiHeader.biSizeImage)
{
iconBuffer.Append((char) buffer[index]);
iconBuffer.Append((char) buffer[index+1]);
iconBuffer.Append((char) buffer[index+2]);
index += bytesPerPixel;
}
}
// now we need to tack on the alpha data...which is hbmMask
pBitMapInfo.bmiHeader.biBitCount = 0;
pBitMapInfo.bmiHeader.biSize = sizeof(pBitMapInfoHeader);
result = GetDIBits(pDC, pIconInfo.hbmMask, 0, 0, NULL, &pBitMapInfo, DIB_RGB_COLORS);
if (result > 0 && pBitMapInfo.bmiHeader.biSizeImage > 0)
{
// allocate a buffer to hold the bit map....this should be a buffer that's biSizeImage...
unsigned char * maskBuffer = (PRUint8 *) nsMemory::Alloc(pBitMapInfo.bmiHeader.biSizeImage);
result = GetDIBits(pDC, pIconInfo.hbmMask, 0, pBitMapInfo.bmiHeader.biHeight, (void *) maskBuffer, &pBitMapInfo, DIB_RGB_COLORS);
if (result > 0)
{
InvertRows(maskBuffer, pBitMapInfo.bmiHeader.biSizeImage, 4);
index = 0;
// for some reason the bit mask on windows are flipped from the values we really want for transparency.
// So complement each byte in the bit mask.
while (index < pBitMapInfo.bmiHeader.biSizeImage)
{
maskBuffer[index]^=255;
index += 1;
}
iconBuffer.Append((char *) maskBuffer, pBitMapInfo.bmiHeader.biSizeImage);
}
nsMemory::Free(maskBuffer);
} // if we have a mask buffer to apply
// turn our nsString into a stream looking object...
aListener->OnStartRequest(this, ctxt);
// turn our string into a stream...
nsCOMPtr<nsISupports> streamSupports;
NS_NewByteInputStream(getter_AddRefs(streamSupports), iconBuffer.get(), iconBuffer.Length());
nsCOMPtr<nsIInputStream> inputStr (do_QueryInterface(streamSupports));
aListener->OnDataAvailable(this, ctxt, inputStr, 0, iconBuffer.Length());
aListener->OnStopRequest(this, ctxt, NS_OK, nsnull);
} // if we got valid bits for the main bitmap mask
nsMemory::Free(buffer);
}
DeleteDC(pDC);
}
}
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::GetLoadAttributes(PRUint32 *aLoadAttributes)
{
*aLoadAttributes = mLoadAttributes;
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::SetLoadAttributes(PRUint32 aLoadAttributes)
{
mLoadAttributes = aLoadAttributes;
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::GetContentType(char* *aContentType)
{
if (!aContentType) return NS_ERROR_NULL_POINTER;
*aContentType = nsCRT::strdup("image/icon");
if (!*aContentType) return NS_ERROR_OUT_OF_MEMORY;
return NS_OK;
}
NS_IMETHODIMP
nsIconChannel::SetContentType(const char *aContentType)
{
//It doesn't make sense to set the content-type on this type
// of channel...
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsIconChannel::GetContentLength(PRInt32 *aContentLength)
{
*aContentLength = mContentLength;
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::SetContentLength(PRInt32 aContentLength)
{
NS_NOTREACHED("nsIconChannel::SetContentLength");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsIconChannel::GetLoadGroup(nsILoadGroup* *aLoadGroup)
{
*aLoadGroup = mLoadGroup;
NS_IF_ADDREF(*aLoadGroup);
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::SetLoadGroup(nsILoadGroup* aLoadGroup)
{
mLoadGroup = aLoadGroup;
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::GetOwner(nsISupports* *aOwner)
{
*aOwner = mOwner.get();
NS_IF_ADDREF(*aOwner);
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::SetOwner(nsISupports* aOwner)
{
mOwner = aOwner;
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::GetNotificationCallbacks(nsIInterfaceRequestor* *aNotificationCallbacks)
{
*aNotificationCallbacks = mCallbacks.get();
NS_IF_ADDREF(*aNotificationCallbacks);
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::SetNotificationCallbacks(nsIInterfaceRequestor* aNotificationCallbacks)
{
mCallbacks = aNotificationCallbacks;
return NS_OK;
}
NS_IMETHODIMP nsIconChannel::GetSecurityInfo(nsISupports * *aSecurityInfo)
{
*aSecurityInfo = nsnull;
return NS_OK;
}

View File

@@ -1,56 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* 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 Brian Ryner.
* Portions created by Brian Ryner are Copyright (C) 2000 Brian Ryner.
* All Rights Reserved.
*
* Contributor(s):
* Scott MacGregor <mscott@netscape.com>
*/
#ifndef nsIconChannel_h___
#define nsIconChannel_h___
#include "nsCOMPtr.h"
#include "nsXPIDLString.h"
#include "nsIChannel.h"
#include "nsILoadGroup.h"
#include "nsIInterfaceRequestor.h"
#include "nsIURI.h"
class nsIconChannel : public nsIChannel
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIREQUEST
NS_DECL_NSICHANNEL
nsIconChannel();
virtual ~nsIconChannel();
nsresult Init(nsIURI* uri);
protected:
nsCOMPtr<nsIURI> mUrl;
nsCOMPtr<nsIURI> mOriginalURI;
PRUint32 mLoadAttributes;
PRInt32 mContentLength;
nsCOMPtr<nsILoadGroup> mLoadGroup;
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
nsCOMPtr<nsISupports> mOwner;
nsresult mStatus;
};
#endif /* nsIconChannel_h___ */

View File

@@ -1,52 +0,0 @@
#!nmake
#
# 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 Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 2001 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Stuart Parmenter <pavlov@netscape.com>
#
DEPTH=..\..\..\..
include <$(DEPTH)/config/config.mak>
MODULE = imgjpeg
LIBRARY_NAME = imgjpeg
DLL = $(OBJDIR)\$(LIBRARY_NAME).dll
MAKE_OBJ_TYPE = DLL
OBJS = \
.\$(OBJDIR)\nsJPEGDecoder.obj \
.\$(OBJDIR)\nsJPEGFactory.obj \
$(NULL)
LLIBS=\
$(LIBNSPR) \
$(DIST)\lib\jpeg3250.lib \
$(DIST)\lib\xpcom.lib \
$(DIST)\lib\gkgfxwin.lib \
$(NULL)
include <$(DEPTH)\config\rules.mak>
install:: $(DLL)
$(MAKE_INSTALL) .\$(OBJDIR)\$(LIBRARY_NAME).dll $(DIST)\bin\components
$(MAKE_INSTALL) .\$(OBJDIR)\$(LIBRARY_NAME).lib $(DIST)\lib
clobber::
rm -f $(DIST)\bin\components\$(LIBRARY_NAME).dll
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib

View File

@@ -1,829 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation.
* All Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
*
*/
#include "nsJPEGDecoder.h"
#include "nsIInputStream.h"
#include "nspr.h"
#include "nsCRT.h"
#include "nsIComponentManager.h"
#include "imgIContainerObserver.h"
#include "ImageLogging.h"
NS_IMPL_ISUPPORTS2(nsJPEGDecoder, imgIDecoder, nsIOutputStream)
#if defined(PR_LOGGING)
PRLogModuleInfo *gJPEGlog = PR_NewLogModule("JPEGDecoder");
#else
#define gJPEGlog
#endif
void PR_CALLBACK init_source (j_decompress_ptr jd);
boolean PR_CALLBACK fill_input_buffer (j_decompress_ptr jd);
void PR_CALLBACK skip_input_data (j_decompress_ptr jd, long num_bytes);
void PR_CALLBACK term_source (j_decompress_ptr jd);
void PR_CALLBACK my_error_exit (j_common_ptr cinfo);
/* Normal JFIF markers can't have more bytes than this. */
#define MAX_JPEG_MARKER_LENGTH (((PRUint32)1 << 16) - 1)
/* Possible states for JPEG source manager */
enum data_source_state {
READING_BACK = 0, /* Must be zero for init purposes */
READING_NEW
};
/*
* Implementation of a JPEG src object that understands our state machine
*/
typedef struct {
/* public fields; must be first in this struct! */
struct jpeg_source_mgr pub;
nsJPEGDecoder *decoder;
} decoder_source_mgr;
nsJPEGDecoder::nsJPEGDecoder()
{
NS_INIT_ISUPPORTS();
mState = JPEG_HEADER;
mFillState = READING_BACK;
mSamples = nsnull;
mSamples3 = nsnull;
mRGBPadRow = nsnull;
mRGBPadRowLength = 0;
mBytesToSkip = 0;
memset(&mInfo, 0, sizeof(jpeg_decompress_struct));
mCompletedPasses = 0;
mBuffer = nsnull;
mBufferLen = mBufferSize = 0;
mBackBuffer = nsnull;
mBackBufferLen = mBackBufferSize = mBackBufferUnreadLen = 0;
}
nsJPEGDecoder::~nsJPEGDecoder()
{
if (mBuffer)
PR_Free(mBuffer);
if (mBackBuffer)
PR_Free(mBackBuffer);
if (mRGBPadRow)
PR_Free(mRGBPadRow);
}
/** imgIDecoder methods **/
/* void init (in imgIRequest aRequest); */
NS_IMETHODIMP nsJPEGDecoder::Init(imgIRequest *aRequest)
{
mRequest = aRequest;
mObserver = do_QueryInterface(mRequest);
aRequest->GetImage(getter_AddRefs(mImage));
/* We set up the normal JPEG error routines, then override error_exit. */
mInfo.err = jpeg_std_error(&mErr.pub);
/* mInfo.err = jpeg_std_error(&mErr.pub); */
mErr.pub.error_exit = my_error_exit;
/* Establish the setjmp return context for my_error_exit to use. */
if (setjmp(mErr.setjmp_buffer)) {
/* If we get here, the JPEG code has signaled an error.
* We need to clean up the JPEG object, close the input file, and return.
*/
return NS_ERROR_FAILURE;
}
/* Step 1: allocate and initialize JPEG decompression object */
jpeg_create_decompress(&mInfo);
decoder_source_mgr *src;
if (mInfo.src == NULL) {
//mInfo.src = PR_NEWZAP(decoder_source_mgr);
src = PR_NEWZAP(decoder_source_mgr);
if (!src) {
return PR_FALSE;
}
mInfo.src = (struct jpeg_source_mgr *) src;
}
/* Step 2: specify data source (eg, a file) */
/* Setup callback functions. */
src->pub.init_source = init_source;
src->pub.fill_input_buffer = fill_input_buffer;
src->pub.skip_input_data = skip_input_data;
src->pub.resync_to_restart = jpeg_resync_to_restart;
src->pub.term_source = term_source;
src->decoder = this;
return NS_OK;
}
/* readonly attribute imgIRequest request; */
NS_IMETHODIMP nsJPEGDecoder::GetRequest(imgIRequest * *aRequest)
{
*aRequest = mRequest;
NS_ADDREF(*aRequest);
return NS_OK;
}
/** nsIOutputStream methods **/
/* void close (); */
NS_IMETHODIMP nsJPEGDecoder::Close()
{
PR_LOG(gJPEGlog, PR_LOG_DEBUG,
("[this=%p] nsJPEGDecoder::Close\n", this));
if (mState != JPEG_DONE && mState != JPEG_SINK_NON_JPEG_TRAILER)
NS_WARNING("Never finished decoding the JPEG.");
/* Step 8: Release JPEG decompression object */
/* This is an important step since it will release a good deal of memory. */
jpeg_destroy_decompress(&mInfo);
return NS_OK;
}
/* void flush (); */
NS_IMETHODIMP nsJPEGDecoder::Flush()
{
LOG_SCOPE(gJPEGlog, "nsJPEGDecoder::Flush");
PRUint32 ret;
if (mState != JPEG_DONE && mState != JPEG_SINK_NON_JPEG_TRAILER)
return this->WriteFrom(nsnull, 0, &ret);
return NS_OK;
}
/* unsigned long write (in string buf, in unsigned long count); */
NS_IMETHODIMP nsJPEGDecoder::Write(const char *buf, PRUint32 count, PRUint32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* unsigned long writeFrom (in nsIInputStream inStr, in unsigned long count); */
NS_IMETHODIMP nsJPEGDecoder::WriteFrom(nsIInputStream *inStr, PRUint32 count, PRUint32 *_retval)
{
LOG_SCOPE_WITH_PARAM(gJPEGlog, "nsJPEGDecoder::WriteFrom", "count", count);
/* We use our private extension JPEG error handler.
* Note that this struct must live as long as the main JPEG parameter
* struct, to avoid dangling-pointer problems.
*/
// XXX above what is this?
if (inStr) {
if (!mBuffer) {
mBuffer = (JOCTET *)PR_Malloc(count);
mBufferSize = count;
} else if (count > mBufferSize) {
mBuffer = (JOCTET *)PR_Realloc(mBuffer, count);
mBufferSize = count;
}
nsresult rv = inStr->Read((char*)mBuffer, count, &mBufferLen);
*_retval = mBufferLen;
//nsresult rv = mOutStream->WriteFrom(inStr, count, _retval);
NS_ASSERTION(NS_SUCCEEDED(rv), "nsJPEGDecoder::WriteFrom -- mOutStream->WriteFrom failed");
}
// else no input stream.. Flush() ?
nsresult error_code = NS_ERROR_FAILURE;
/* Return here if there is a fatal error. */
if ((error_code = setjmp(mErr.setjmp_buffer)) != 0) {
return error_code;
}
PR_LOG(gJPEGlog, PR_LOG_DEBUG,
("[this=%p] nsJPEGDecoder::WriteFrom -- processing JPEG data\n", this));
decoder_source_mgr *src = NS_REINTERPRET_CAST(decoder_source_mgr *, mInfo.src);
switch (mState) {
case JPEG_HEADER:
{
LOG_SCOPE(gJPEGlog, "nsJPEGDecoder::WriteFrom -- entering JPEG_HEADER case");
/* Step 3: read file parameters with jpeg_read_header() */
if (jpeg_read_header(&mInfo, TRUE) == JPEG_SUSPENDED)
return NS_OK; /* I/O suspension */
/*
* Don't allocate a giant and superfluous memory buffer
* when the image is a sequential JPEG.
*/
mInfo.buffered_image = jpeg_has_multiple_scans(&mInfo);
/* Used to set up image size so arrays can be allocated */
jpeg_calc_output_dimensions(&mInfo);
mObserver->OnStartDecode(nsnull, nsnull);
mImage->Init(mInfo.image_width, mInfo.image_height, mObserver);
mObserver->OnStartContainer(nsnull, nsnull, mImage);
mFrame = do_CreateInstance("@mozilla.org/gfx/image/frame;2");
gfx_format format;
#ifdef XP_PC
format = gfxIFormats::BGR;
#else
format = gfxIFormats::RGB;
#endif
mFrame->Init(0, 0, mInfo.image_width, mInfo.image_height, format);
mImage->AppendFrame(mFrame);
mObserver->OnStartFrame(nsnull, nsnull, mFrame);
/*
* Make a one-row-high sample array that will go away
* when done with image. Always make it big enough to
* hold an RGB row. Since this uses the IJG memory
* manager, it must be allocated before the call to
* jpeg_start_compress().
*/
int row_stride;
if(mInfo.output_components == 1)
row_stride = mInfo.output_width;
else
row_stride = mInfo.output_width * 4; // use 4 instead of mInfo.output_components
// so we don't have to fuss with byte alignment.
// Mac wants 4 anyways.
mSamples = (*mInfo.mem->alloc_sarray)((j_common_ptr) &mInfo,
JPOOL_IMAGE,
row_stride, 1);
#if defined(XP_PC) || defined(XP_MAC)
// allocate buffer to do byte flipping if needed
if (mInfo.output_components == 3) {
mRGBPadRow = (PRUint8*) PR_MALLOC(row_stride);
mRGBPadRowLength = row_stride;
memset(mRGBPadRow, 0, mRGBPadRowLength);
}
#endif
/* Allocate RGB buffer for conversion from greyscale. */
if (mInfo.output_components != 3) {
row_stride = mInfo.output_width * 4;
mSamples3 = (*mInfo.mem->alloc_sarray)((j_common_ptr) &mInfo,
JPOOL_IMAGE,
row_stride, 1);
}
mState = JPEG_START_DECOMPRESS;
}
case JPEG_START_DECOMPRESS:
{
LOG_SCOPE(gJPEGlog, "nsJPEGDecoder::WriteFrom -- entering JPEG_START_DECOMPRESS case");
/* Step 4: set parameters for decompression */
/* FIXME -- Should reset dct_method and dither mode
* for final pass of progressive JPEG
*/
mInfo.dct_method = JDCT_FASTEST;
mInfo.dither_mode = JDITHER_ORDERED;
mInfo.do_fancy_upsampling = FALSE;
mInfo.enable_2pass_quant = FALSE;
mInfo.do_block_smoothing = TRUE;
/* Step 5: Start decompressor */
if (jpeg_start_decompress(&mInfo) == FALSE)
return NS_OK; /* I/O suspension */
/* If this is a progressive JPEG ... */
if (mInfo.buffered_image) {
mState = JPEG_DECOMPRESS_PROGRESSIVE;
} else {
mState = JPEG_DECOMPRESS_SEQUENTIAL;
}
}
case JPEG_DECOMPRESS_SEQUENTIAL:
{
if (mState == JPEG_DECOMPRESS_SEQUENTIAL)
{
LOG_SCOPE(gJPEGlog, "nsJPEGDecoder::WriteFrom -- JPEG_DECOMPRESS_SEQUENTIAL case");
if (OutputScanlines(-1) == PR_FALSE)
return NS_OK; /* I/O suspension */
/* If we've completed image output ... */
NS_ASSERTION(mInfo.output_scanline == mInfo.output_height, "We didn't process all of the data!");
mState = JPEG_DONE;
}
}
case JPEG_DECOMPRESS_PROGRESSIVE:
{
if (mState == JPEG_DECOMPRESS_PROGRESSIVE)
{
LOG_SCOPE(gJPEGlog, "nsJPEGDecoder::WriteFrom -- JPEG_DECOMPRESS_PROGRESSIVE case");
int status;
do {
status = jpeg_consume_input(&mInfo);
} while (!((status == JPEG_SUSPENDED) ||
(status == JPEG_REACHED_EOI)));
switch (status) {
case JPEG_REACHED_EOI:
// End of image
mState = JPEG_FINAL_PROGRESSIVE_SCAN_OUTPUT;
break;
case JPEG_SUSPENDED:
PR_LOG(gJPEGlog, PR_LOG_DEBUG,
("[this=%p] nsJPEGDecoder::WriteFrom -- suspending\n", this));
return NS_OK; /* I/O suspension */
default:
printf("got someo other state!?\n");
}
}
}
case JPEG_FINAL_PROGRESSIVE_SCAN_OUTPUT:
{
if (mState == JPEG_FINAL_PROGRESSIVE_SCAN_OUTPUT)
{
LOG_SCOPE(gJPEGlog, "nsJPEGDecoder::WriteFrom -- entering JPEG_FINAL_PROGRESSIVE_SCAN_OUTPUT case");
// XXX progressive? ;)
// not really progressive according to the state machine... -saari
jpeg_start_output(&mInfo, mInfo.input_scan_number);
if (OutputScanlines(-1) == PR_FALSE)
return NS_OK; /* I/O suspension */
jpeg_finish_output(&mInfo);
mState = JPEG_DONE;
}
}
case JPEG_DONE:
{
LOG_SCOPE(gJPEGlog, "nsJPEGDecoder::WriteFrom -- entering JPEG_DONE case");
/* Step 7: Finish decompression */
if (jpeg_finish_decompress(&mInfo) == FALSE)
return NS_OK; /* I/O suspension */
mState = JPEG_SINK_NON_JPEG_TRAILER;
/* we're done dude */
break;
}
case JPEG_SINK_NON_JPEG_TRAILER:
PR_LOG(gJPEGlog, PR_LOG_DEBUG,
("[this=%p] nsJPEGDecoder::WriteFrom -- entering JPEG_SINK_NON_JPEG_TRAILER case\n", this));
break;
}
return NS_OK;
}
int
nsJPEGDecoder::OutputScanlines(int num_scanlines)
{
int pass = 0;
if (mState == JPEG_FINAL_PROGRESSIVE_SCAN_OUTPUT)
pass = -1;
else
pass = mCompletedPasses + 1;
while ((mInfo.output_scanline < mInfo.output_height) && num_scanlines--) {
JSAMPROW samples;
/* Request one scanline. Returns 0 or 1 scanlines. */
int ns = jpeg_read_scanlines(&mInfo, mSamples, 1);
if (ns != 1) {
return PR_FALSE; /* suspend */
}
/* If grayscale image ... */
if (mInfo.output_components == 1) {
JSAMPLE j;
JSAMPLE *j1 = mSamples[0];
const JSAMPLE *j1end = j1 + mInfo.output_width;
JSAMPLE *j3 = mSamples3[0];
/* Convert from grayscale to RGB. */
while (j1 < j1end) {
#ifdef XP_MAC
j = *j1++;
j3[0] = 0;
j3[1] = j;
j3[2] = j;
j3[3] = j;
j3 += 4;
#else
j = *j1++;
j3[0] = j;
j3[1] = j;
j3[2] = j;
j3 += 3;
#endif
}
samples = mSamples3[0];
} else {
/* 24-bit color image */
#ifdef XP_PC
memset(mRGBPadRow, 0, mInfo.output_width * 4);
PRUint8 *ptrOutputBuf = mRGBPadRow;
JSAMPLE *j1 = mSamples[0];
for (PRUint32 i=0;i<mInfo.output_width;++i) {
ptrOutputBuf[2] = *j1++;
ptrOutputBuf[1] = *j1++;
ptrOutputBuf[0] = *j1++;
ptrOutputBuf += 3;
}
samples = mRGBPadRow;
#else
#ifdef XP_MAC
memset(mRGBPadRow, 0, mInfo.output_width * 4);
PRUint8 *ptrOutputBuf = mRGBPadRow;
JSAMPLE *j1 = mSamples[0];
for (PRUint32 i=0;i<mInfo.output_width;++i) {
ptrOutputBuf[0] = 0;
ptrOutputBuf[1] = *j1++;
ptrOutputBuf[2] = *j1++;
ptrOutputBuf[3] = *j1++;
ptrOutputBuf += 4;
}
samples = mRGBPadRow;
#else
samples = mSamples[0];
#endif
#endif
}
PRUint32 bpr;
mFrame->GetImageBytesPerRow(&bpr);
mFrame->SetImageData(
samples, // data
bpr, // length
(mInfo.output_scanline-1) * bpr); // offset
nsRect r(0, mInfo.output_scanline, mInfo.output_width, 1);
mObserver->OnDataAvailable(nsnull, nsnull, mFrame, &r);
}
return PR_TRUE;
}
/* [noscript] unsigned long writeSegments (in nsReadSegmentFun reader, in voidPtr closure, in unsigned long count); */
NS_IMETHODIMP nsJPEGDecoder::WriteSegments(nsReadSegmentFun reader, void * closure, PRUint32 count, PRUint32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute boolean nonBlocking; */
NS_IMETHODIMP nsJPEGDecoder::GetNonBlocking(PRBool *aNonBlocking)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsJPEGDecoder::SetNonBlocking(PRBool aNonBlocking)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute nsIOutputStreamObserver observer; */
NS_IMETHODIMP nsJPEGDecoder::GetObserver(nsIOutputStreamObserver * *aObserver)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsJPEGDecoder::SetObserver(nsIOutputStreamObserver * aObserver)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* Override the standard error method in the IJG JPEG decoder code. */
void PR_CALLBACK
my_error_exit (j_common_ptr cinfo)
{
nsresult error_code = NS_ERROR_FAILURE;
decoder_error_mgr *err = (decoder_error_mgr *) cinfo->err;
#if 0
#ifdef DEBUG
/*ptn fix later */
if (il_debug >= 1) {
char buffer[JMSG_LENGTH_MAX];
/* Create the message */
(*cinfo->err->format_message) (cinfo, buffer);
ILTRACE(1,("%s\n", buffer));
}
#endif
/* Convert error to a browser error code */
if (cinfo->err->msg_code == JERR_OUT_OF_MEMORY)
error_code = MK_OUT_OF_MEMORY;
else
error_code = MK_IMAGE_LOSSAGE;
#endif
char buffer[JMSG_LENGTH_MAX];
/* Create the message */
(*cinfo->err->format_message) (cinfo, buffer);
fprintf(stderr, "my_error_exit()\n%s\n", buffer);
/* Return control to the setjmp point. */
longjmp(err->setjmp_buffer, error_code);
}
/******************************************************************************/
/*-----------------------------------------------------------------------------
* This is the callback routine from the IJG JPEG library used to supply new
* data to the decompressor when its input buffer is exhausted. It juggles
* multiple buffers in an attempt to avoid unnecessary copying of input data.
*
* (A simpler scheme is possible: It's much easier to use only a single
* buffer; when fill_input_buffer() is called, move any unconsumed data
* (beyond the current pointer/count) down to the beginning of this buffer and
* then load new data into the remaining buffer space. This approach requires
* a little more data copying but is far easier to get right.)
*
* At any one time, the JPEG decompressor is either reading from the necko
* input buffer, which is volatile across top-level calls to the IJG library,
* or the "backtrack" buffer. The backtrack buffer contains the remaining
* unconsumed data from the necko buffer after parsing was suspended due
* to insufficient data in some previous call to the IJG library.
*
* When suspending, the decompressor will back up to a convenient restart
* point (typically the start of the current MCU). The variables
* next_input_byte & bytes_in_buffer indicate where the restart point will be
* if the current call returns FALSE. Data beyond this point must be
* rescanned after resumption, so it must be preserved in case the decompressor
* decides to backtrack.
*
* Returns:
* TRUE if additional data is available, FALSE if no data present and
* the JPEG library should therefore suspend processing of input stream
*---------------------------------------------------------------------------*/
/******************************************************************************/
/* data source manager method
/******************************************************************************/
/******************************************************************************/
/* data source manager method
Initialize source. This is called by jpeg_read_header() before any
data is actually read. May leave
bytes_in_buffer set to 0 (in which case a fill_input_buffer() call
will occur immediately).
*/
void PR_CALLBACK
init_source (j_decompress_ptr jd)
{
}
/******************************************************************************/
/* data source manager method
Skip num_bytes worth of data. The buffer pointer and count should
be advanced over num_bytes input bytes, refilling the buffer as
needed. This is used to skip over a potentially large amount of
uninteresting data (such as an APPn marker). In some applications
it may be possible to optimize away the reading of the skipped data,
but it's not clear that being smart is worth much trouble; large
skips are uncommon. bytes_in_buffer may be zero on return.
A zero or negative skip count should be treated as a no-op.
*/
void PR_CALLBACK
skip_input_data (j_decompress_ptr jd, long num_bytes)
{
decoder_source_mgr *src = (decoder_source_mgr *)jd->src;
if (num_bytes > (long)src->pub.bytes_in_buffer) {
/*
* Can't skip it all right now until we get more data from
* network stream. Set things up so that fill_input_buffer
* will skip remaining amount.
*/
src->decoder->mBytesToSkip = (size_t)num_bytes - src->pub.bytes_in_buffer;
src->pub.next_input_byte += src->pub.bytes_in_buffer;
src->pub.bytes_in_buffer = 0;
} else {
/* Simple case. Just advance buffer pointer */
src->pub.bytes_in_buffer -= (size_t)num_bytes;
src->pub.next_input_byte += num_bytes;
}
}
/******************************************************************************/
/* data source manager method
This is called whenever bytes_in_buffer has reached zero and more
data is wanted. In typical applications, it should read fresh data
into the buffer (ignoring the current state of next_input_byte and
bytes_in_buffer), reset the pointer & count to the start of the
buffer, and return TRUE indicating that the buffer has been reloaded.
It is not necessary to fill the buffer entirely, only to obtain at
least one more byte. bytes_in_buffer MUST be set to a positive value
if TRUE is returned. A FALSE return should only be used when I/O
suspension is desired.
*/
boolean PR_CALLBACK
fill_input_buffer (j_decompress_ptr jd)
{
decoder_source_mgr *src = (decoder_source_mgr *)jd->src;
unsigned char *new_buffer = (unsigned char *)src->decoder->mBuffer;
PRUint32 new_buflen = src->decoder->mBufferLen;
PRUint32 bytesToSkip = src->decoder->mBytesToSkip;
switch(src->decoder->mFillState) {
case READING_BACK:
{
if (!new_buffer || new_buflen == 0)
return PR_FALSE; /* suspend */
src->decoder->mBufferLen = 0;
if (bytesToSkip != 0) {
if (bytesToSkip < new_buflen) {
/* All done skipping bytes; Return what's left. */
new_buffer += bytesToSkip;
new_buflen -= bytesToSkip;
src->decoder->mBytesToSkip = 0;
} else {
/* Still need to skip some more data in the future */
src->decoder->mBytesToSkip -= (size_t)new_buflen;
return PR_FALSE; /* suspend */
}
}
src->decoder->mBackBufferUnreadLen = src->pub.bytes_in_buffer;
src->pub.next_input_byte = new_buffer;
src->pub.bytes_in_buffer = (size_t)new_buflen;
src->decoder->mFillState = READING_NEW;
return PR_TRUE;
}
break;
case READING_NEW:
{
if (src->pub.next_input_byte != src->decoder->mBuffer) {
/* Backtrack data has been permanently consumed. */
src->decoder->mBackBufferUnreadLen = 0;
src->decoder->mBackBufferLen = 0;
}
/* Save remainder of netlib buffer in backtrack buffer */
PRUint32 new_backtrack_buflen = src->pub.bytes_in_buffer + src->decoder->mBackBufferLen;
/* Make sure backtrack buffer is big enough to hold new data. */
if (src->decoder->mBackBufferSize < new_backtrack_buflen) {
/* Round up to multiple of 16 bytes. */
PRUint32 roundup_buflen = ((new_backtrack_buflen + 15) >> 4) << 4;
if (src->decoder->mBackBufferSize) {
src->decoder->mBackBuffer =
(JOCTET *)PR_REALLOC(src->decoder->mBackBuffer, roundup_buflen);
} else {
src->decoder->mBackBuffer = (JOCTET*)PR_MALLOC(roundup_buflen);
}
/* Check for OOM */
if (!src->decoder->mBackBuffer) {
#if 0
j_common_ptr cinfo = (j_common_ptr)(&src->js->jd);
cinfo->err->msg_code = JERR_OUT_OF_MEMORY;
my_error_exit(cinfo);
#endif
}
src->decoder->mBackBufferSize = (size_t)roundup_buflen;
/* Check for malformed MARKER segment lengths. */
if (new_backtrack_buflen > MAX_JPEG_MARKER_LENGTH) {
my_error_exit((j_common_ptr)(&src->decoder->mInfo));
}
}
/* Copy remainder of netlib buffer into backtrack buffer. */
nsCRT::memmove(src->decoder->mBackBuffer + src->decoder->mBackBufferLen,
src->pub.next_input_byte,
src->pub.bytes_in_buffer);
/* Point to start of data to be rescanned. */
src->pub.next_input_byte = src->decoder->mBackBuffer + src->decoder->mBackBufferLen - src->decoder->mBackBufferUnreadLen;
src->pub.bytes_in_buffer += src->decoder->mBackBufferUnreadLen;
src->decoder->mBackBufferLen = (size_t)new_backtrack_buflen;
src->decoder->mFillState = READING_BACK;
return PR_FALSE;
}
break;
}
return PR_FALSE;
}
/******************************************************************************/
/* data source manager method */
/*
* Terminate source --- called by jpeg_finish_decompress() after all
* data has been read to clean up JPEG source manager. NOT called by
* jpeg_abort() or jpeg_destroy().
*/
void PR_CALLBACK
term_source (j_decompress_ptr jd)
{
decoder_source_mgr *src = (decoder_source_mgr *)jd->src;
if (src->decoder->mObserver) {
src->decoder->mObserver->OnStopFrame(nsnull, nsnull, src->decoder->mFrame);
src->decoder->mObserver->OnStopContainer(nsnull, nsnull, src->decoder->mImage);
src->decoder->mObserver->OnStopDecode(nsnull, nsnull, NS_OK, nsnull);
}
/* No work necessary here */
}

View File

@@ -1,121 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation.
* All Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
*/
#ifndef nsJPEGDecoder_h__
#define nsJPEGDecoder_h__
#include "imgIDecoder.h"
#include "nsCOMPtr.h"
#include "imgIContainer.h"
#include "gfxIImageFrame.h"
#include "imgIDecoderObserver.h"
#include "imgIRequest.h"
#include "nsIInputStream.h"
#include "nsIPipe.h"
extern "C" {
#include "jpeglib.h"
}
#include <setjmp.h>
#define NS_JPEGDECODER_CID \
{ /* 5871a422-1dd2-11b2-ab3f-e2e56be5da9c */ \
0x5871a422, \
0x1dd2, \
0x11b2, \
{0xab, 0x3f, 0xe2, 0xe5, 0x6b, 0xe5, 0xda, 0x9c} \
}
typedef struct {
struct jpeg_error_mgr pub; /* "public" fields for IJG library*/
jmp_buf setjmp_buffer; /* For handling catastropic errors */
} decoder_error_mgr;
typedef enum {
JPEG_HEADER, /* Reading JFIF headers */
JPEG_START_DECOMPRESS,
JPEG_DECOMPRESS_PROGRESSIVE, /* Output progressive pixels */
JPEG_DECOMPRESS_SEQUENTIAL, /* Output sequential pixels */
JPEG_FINAL_PROGRESSIVE_SCAN_OUTPUT,
JPEG_DONE,
JPEG_SINK_NON_JPEG_TRAILER, /* Some image files have a */
/* non-JPEG trailer */
JPEG_ERROR
} jstate;
class nsJPEGDecoder : public imgIDecoder
{
public:
NS_DECL_ISUPPORTS
NS_DECL_IMGIDECODER
NS_DECL_NSIOUTPUTSTREAM
nsJPEGDecoder();
virtual ~nsJPEGDecoder();
PRBool FillInput(j_decompress_ptr jd);
PRUint32 mBytesToSkip;
protected:
int OutputScanlines(int num_scanlines);
public:
nsCOMPtr<imgIContainer> mImage;
nsCOMPtr<gfxIImageFrame> mFrame;
nsCOMPtr<imgIRequest> mRequest;
nsCOMPtr<imgIDecoderObserver> mObserver;
struct jpeg_decompress_struct mInfo;
decoder_error_mgr mErr;
jstate mState;
JSAMPARRAY mSamples;
JSAMPARRAY mSamples3;
PRUint8* mRGBPadRow;
PRUint32 mRGBPadRowLength;
PRInt32 mCompletedPasses;
PRInt32 mPasses;
int mFillState;
JOCTET *mBuffer;
PRUint32 mBufferLen; // amount of data currently in mBuffer
PRUint32 mBufferSize; // size in bytes what mBuffer was created with
JOCTET *mBackBuffer;
PRUint32 mBackBufferLen; // Offset of end of active backtrack data
PRUint32 mBackBufferSize; // size in bytes what mBackBuffer was created with
PRUint32 mBackBufferUnreadLen; // amount of data currently in mBackBuffer
};
#endif // nsJPEGDecoder_h__

View File

@@ -1,16 +0,0 @@
?Release@nsJPEGDecoder@@UAGKXZ ; 172
?AddRef@nsJPEGDecoder@@UAGKXZ ; 172
?fill_input_buffer@@YAEPAUjpeg_decompress_struct@@@Z ; 126
?skip_input_data@@YAXPAUjpeg_decompress_struct@@J@Z ; 109
?WriteFrom@nsJPEGDecoder@@UAGIPAVnsIInputStream@@IPAI@Z ; 106
?OutputScanlines@nsJPEGDecoder@@IAEHH@Z ; 93
?init_source@@YAXPAUjpeg_decompress_struct@@@Z ; 86
??1nsJPEGDecoder@@UAE@XZ ; 86
?Close@nsJPEGDecoder@@UAGIXZ ; 86
?term_source@@YAXPAUjpeg_decompress_struct@@@Z ; 86
?Init@nsJPEGDecoder@@UAGIPAVimgIRequest@@@Z ; 86
??0nsJPEGDecoder@@QAE@XZ ; 86
?Flush@nsJPEGDecoder@@UAGIXZ ; 86
?QueryInterface@nsJPEGDecoder@@UAGIABUnsID@@PAPAX@Z ; 86
??_EnsJPEGDecoder@@UAEPAXI@Z ; 86
_NSGetModule ; 1

View File

@@ -1,53 +0,0 @@
#!nmake
#
# 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 Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 2001 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Stuart Parmenter <pavlov@netscape.com>
#
DEPTH=..\..\..\..
include <$(DEPTH)/config/config.mak>
MODULE = imgpng
LIBRARY_NAME = imgpng
DLL = $(OBJDIR)\$(LIBRARY_NAME).dll
MAKE_OBJ_TYPE = DLL
OBJS = \
.\$(OBJDIR)\nsPNGDecoder.obj \
.\$(OBJDIR)\nsPNGFactory.obj \
$(NULL)
LLIBS=\
$(LIBNSPR) \
$(DIST)\lib\xpcom.lib \
$(DIST)\lib\png.lib \
$(DIST)\lib\zlib.lib \
$(DIST)\lib\gkgfxwin.lib \
$(NULL)
include <$(DEPTH)\config\rules.mak>
install:: $(DLL)
$(MAKE_INSTALL) .\$(OBJDIR)\$(LIBRARY_NAME).dll $(DIST)\bin\components
$(MAKE_INSTALL) .\$(OBJDIR)\$(LIBRARY_NAME).lib $(DIST)\lib
clobber::
rm -f $(DIST)\bin\components\$(LIBRARY_NAME).dll
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib

View File

@@ -1,553 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation.
* All Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
*
*/
#include "nsPNGDecoder.h"
#include "nsIInputStream.h"
#include "nspr.h"
#include "nsIComponentManager.h"
#include "png.h"
#include "nsIStreamObserver.h"
#include "nsRect.h"
#include "nsMemory.h"
#include "imgIContainerObserver.h"
// XXX we need to be sure to fire onStopDecode messages to mObserver in error cases.
NS_IMPL_ISUPPORTS2(nsPNGDecoder, imgIDecoder, nsIOutputStream)
nsPNGDecoder::nsPNGDecoder()
{
NS_INIT_ISUPPORTS();
mPNG = nsnull;
mInfo = nsnull;
colorLine = 0;
alphaLine = 0;
interlacebuf = 0;
}
nsPNGDecoder::~nsPNGDecoder()
{
if (colorLine)
nsMemory::Free(colorLine);
if (alphaLine)
nsMemory::Free(alphaLine);
if (interlacebuf)
nsMemory::Free(interlacebuf);
}
/** imgIDecoder methods **/
/* void init (in imgIRequest aRequest); */
NS_IMETHODIMP nsPNGDecoder::Init(imgIRequest *aRequest)
{
mRequest = aRequest;
mObserver = do_QueryInterface(aRequest); // we're holding 2 strong refs to the request.
aRequest->GetImage(getter_AddRefs(mImage));
/* do png init stuff */
/* Initialize the container's source image header. */
/* Always decode to 24 bit pixdepth */
mPNG = png_create_read_struct(PNG_LIBPNG_VER_STRING,
NULL, NULL,
NULL);
if (!mPNG) {
return NS_ERROR_FAILURE;
}
mInfo = png_create_info_struct(mPNG);
if (!mInfo) {
png_destroy_read_struct(&mPNG, NULL, NULL);
return NS_ERROR_FAILURE;
}
/* use ic as libpng "progressive pointer" (retrieve in callbacks) */
png_set_progressive_read_fn(mPNG, NS_STATIC_CAST(png_voidp, this), nsPNGDecoder::info_callback, nsPNGDecoder::row_callback, nsPNGDecoder::end_callback);
return NS_OK;
}
/* readonly attribute imgIRequest request; */
NS_IMETHODIMP nsPNGDecoder::GetRequest(imgIRequest * *aRequest)
{
*aRequest = mRequest;
NS_ADDREF(*aRequest);
return NS_OK;
}
/** nsIOutputStream methods **/
/* void close (); */
NS_IMETHODIMP nsPNGDecoder::Close()
{
if (mPNG)
png_destroy_read_struct(&mPNG, mInfo ? &mInfo : NULL, NULL);
return NS_OK;
}
/* void flush (); */
NS_IMETHODIMP nsPNGDecoder::Flush()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* unsigned long write (in string buf, in unsigned long count); */
NS_IMETHODIMP nsPNGDecoder::Write(const char *buf, PRUint32 count, PRUint32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
static NS_METHOD ReadDataOut(nsIInputStream* in,
void* closure,
const char* fromRawSegment,
PRUint32 toOffset,
PRUint32 count,
PRUint32 *writeCount)
{
nsPNGDecoder *decoder = NS_STATIC_CAST(nsPNGDecoder*, closure);
// we need to do the setjmp here otherwise bad things will happen
if (setjmp(decoder->mPNG->jmpbuf)) {
png_destroy_read_struct(&decoder->mPNG, &decoder->mInfo, NULL);
// is this NS_ERROR_FAILURE enough?
decoder->mRequest->Cancel(NS_BINDING_ABORTED); // XXX is this the correct error ?
return NS_ERROR_FAILURE;
}
*writeCount = decoder->ProcessData((unsigned char*)fromRawSegment, count);
return NS_OK;
}
PRUint32 nsPNGDecoder::ProcessData(unsigned char *data, PRUint32 count)
{
png_process_data(mPNG, mInfo, data, count);
return count; // we always consume all the data
}
/* unsigned long writeFrom (in nsIInputStream inStr, in unsigned long count); */
NS_IMETHODIMP nsPNGDecoder::WriteFrom(nsIInputStream *inStr, PRUint32 count, PRUint32 *_retval)
{
// PRUint32 sourceOffset = *_retval;
inStr->ReadSegments(ReadDataOut, this, count, _retval);
return NS_OK;
}
/* [noscript] unsigned long writeSegments (in nsReadSegmentFun reader, in voidPtr closure, in unsigned long count); */
NS_IMETHODIMP nsPNGDecoder::WriteSegments(nsReadSegmentFun reader, void * closure, PRUint32 count, PRUint32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute boolean nonBlocking; */
NS_IMETHODIMP nsPNGDecoder::GetNonBlocking(PRBool *aNonBlocking)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsPNGDecoder::SetNonBlocking(PRBool aNonBlocking)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute nsIOutputStreamObserver observer; */
NS_IMETHODIMP nsPNGDecoder::GetObserver(nsIOutputStreamObserver * *aObserver)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsPNGDecoder::SetObserver(nsIOutputStreamObserver * aObserver)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
void
nsPNGDecoder::info_callback(png_structp png_ptr, png_infop info_ptr)
{
/* int number_passes; NOT USED */
png_uint_32 width, height;
int bit_depth, color_type, interlace_type, compression_type, filter_type;
int channels;
double LUT_exponent, CRT_exponent = 2.2, display_exponent, aGamma;
png_bytep trans=NULL;
int num_trans =0;
/* always decode to 24-bit RGB or 32-bit RGBA */
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
&interlace_type, &compression_type, &filter_type);
if (color_type == PNG_COLOR_TYPE_PALETTE)
png_set_expand(png_ptr);
if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
png_set_expand(png_ptr);
if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, NULL);
png_set_expand(png_ptr);
}
if (bit_depth == 16)
png_set_strip_16(png_ptr);
if (color_type == PNG_COLOR_TYPE_GRAY ||
color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
png_set_gray_to_rgb(png_ptr);
#ifdef XP_PC
// windows likes BGR
png_set_bgr(png_ptr);
#endif
/* set up gamma correction for Mac, Unix and (Win32 and everything else)
* using educated guesses for display-system exponents; do preferences
* later */
#if defined(XP_MAC)
LUT_exponent = 1.8 / 2.61;
#elif defined(XP_UNIX)
# if defined(__sgi)
LUT_exponent = 1.0 / 1.7; /* typical default for SGI console */
# elif defined(NeXT)
LUT_exponent = 1.0 / 2.2; /* typical default for NeXT cube */
# else
LUT_exponent = 1.0; /* default for most other Unix workstations */
# endif
#else
LUT_exponent = 1.0; /* virtually all PCs and most other systems */
#endif
/* (alternatively, could check for SCREEN_GAMMA environment variable) */
display_exponent = LUT_exponent * CRT_exponent;
if (png_get_gAMA(png_ptr, info_ptr, &aGamma))
png_set_gamma(png_ptr, display_exponent, aGamma);
else
png_set_gamma(png_ptr, display_exponent, 0.45455);
/* let libpng expand interlaced images */
if (interlace_type == PNG_INTERLACE_ADAM7) {
/* number_passes = */
png_set_interlace_handling(png_ptr);
}
/* now all of those things we set above are used to update various struct
* members and whatnot, after which we can get channels, rowbytes, etc. */
png_read_update_info(png_ptr, info_ptr);
channels = png_get_channels(png_ptr, info_ptr);
PR_ASSERT(channels == 3 || channels == 4);
/*---------------------------------------------------------------*/
/* copy PNG info into imagelib structs (formerly png_set_dims()) */
/*---------------------------------------------------------------*/
PRInt32 alpha_bits = 1;
if (channels > 3) {
/* check if alpha is coming from a tRNS chunk and is binary */
if (num_trans) {
/* if it's not a indexed color image, tRNS means binary */
if (color_type == PNG_COLOR_TYPE_PALETTE) {
for (int i=0; i<num_trans; i++) {
if ((trans[i] != 0) && (trans[i] != 255)) {
alpha_bits = 8;
break;
}
}
}
} else {
alpha_bits = 8;
}
}
nsPNGDecoder *decoder = NS_STATIC_CAST(nsPNGDecoder*, png_get_progressive_ptr(png_ptr));
if (decoder->mObserver)
decoder->mObserver->OnStartDecode(nsnull, nsnull);
// since the png is only 1 frame, initalize the container to the width and height of the frame
decoder->mImage->Init(width, height, decoder->mObserver);
if (decoder->mObserver)
decoder->mObserver->OnStartContainer(nsnull, nsnull, decoder->mImage);
decoder->mFrame = do_CreateInstance("@mozilla.org/gfx/image/frame;2");
#if 0
// XXX should we longjmp to png_ptr->jumpbuf here if we failed?
if (!decoder->mFrame)
return NS_ERROR_FAILURE;
#endif
gfx_format format;
if (channels == 3) {
format = gfxIFormats::RGB;
} else if (channels > 3) {
if (alpha_bits == 8) {
decoder->mImage->GetPreferredAlphaChannelFormat(&format);
} else if (alpha_bits == 1) {
format = gfxIFormats::RGB_A1;
}
}
#ifdef XP_PC
// XXX this works...
format += 1; // RGB to BGR
#endif
// then initalize the frame and append it to the container
decoder->mFrame->Init(0, 0, width, height, format);
decoder->mImage->AppendFrame(decoder->mFrame);
if (decoder->mObserver)
decoder->mObserver->OnStartFrame(nsnull, nsnull, decoder->mFrame);
PRUint32 bpr, abpr;
decoder->mFrame->GetImageBytesPerRow(&bpr);
decoder->mFrame->GetAlphaBytesPerRow(&abpr);
decoder->colorLine = (PRUint8 *)nsMemory::Alloc(bpr);
if (channels > 3)
decoder->alphaLine = (PRUint8 *)nsMemory::Alloc(abpr);
if (interlace_type == PNG_INTERLACE_ADAM7) {
decoder->interlacebuf = (PRUint8 *)nsMemory::Alloc(channels*width*height);
decoder->ibpr = channels*width;
if (!decoder->interlacebuf) {
// return NS_ERROR_FAILURE;
}
}
return;
}
void
nsPNGDecoder::row_callback(png_structp png_ptr, png_bytep new_row,
png_uint_32 row_num, int pass)
{
/* libpng comments:
*
* this function is called for every row in the image. If the
* image is interlacing, and you turned on the interlace handler,
* this function will be called for every row in every pass.
* Some of these rows will not be changed from the previous pass.
* When the row is not changed, the new_row variable will be NULL.
* The rows and passes are called in order, so you don't really
* need the row_num and pass, but I'm supplying them because it
* may make your life easier.
*
* For the non-NULL rows of interlaced images, you must call
* png_progressive_combine_row() passing in the row and the
* old row. You can call this function for NULL rows (it will
* just return) and for non-interlaced images (it just does the
* memcpy for you) if it will make the code easier. Thus, you
* can just do this for all cases:
*
* png_progressive_combine_row(png_ptr, old_row, new_row);
*
* where old_row is what was displayed for previous rows. Note
* that the first pass (pass == 0 really) will completely cover
* the old row, so the rows do not have to be initialized. After
* the first pass (and only for interlaced images), you will have
* to pass the current row, and the function will combine the
* old row and the new row.
*/
nsPNGDecoder *decoder = NS_STATIC_CAST(nsPNGDecoder*, png_get_progressive_ptr(png_ptr));
PRUint32 bpr, abpr;
decoder->mFrame->GetImageBytesPerRow(&bpr);
decoder->mFrame->GetAlphaBytesPerRow(&abpr);
png_bytep line;
if (decoder->interlacebuf) {
line = decoder->interlacebuf+(row_num*decoder->ibpr);
png_progressive_combine_row(png_ptr, line, new_row);
}
else
line = new_row;
if (new_row) {
nscoord width;
decoder->mFrame->GetWidth(&width);
PRUint32 iwidth = width;
gfx_format format;
decoder->mFrame->GetFormat(&format);
PRUint8 *aptr, *cptr;
// The mac specific ifdefs in the code below are there to make sure we
// always fill in 4 byte pixels right now, which is what the mac always
// allocates for its pixel buffers in true color mode. This will change
// when we start storing images with color palettes when they don't need
// true color support (GIFs).
switch (format) {
case gfxIFormats::RGB:
case gfxIFormats::BGR:
#ifdef XP_MAC
cptr = decoder->colorLine;
for (PRUint32 x=0; x<iwidth; x++) {
*cptr++ = 0;
*cptr++ = *line++;
*cptr++ = *line++;
*cptr++ = *line++;
}
decoder->mFrame->SetImageData(decoder->colorLine, bpr, row_num*bpr);
#else
decoder->mFrame->SetImageData((PRUint8*)line, bpr, row_num*bpr);
#endif
break;
case gfxIFormats::RGB_A1:
case gfxIFormats::BGR_A1:
{
cptr = decoder->colorLine;
aptr = decoder->alphaLine;
memset(aptr, 0, abpr);
for (PRUint32 x=0; x<iwidth; x++) {
#ifdef XP_MAC
*cptr++ = 0;
#endif
*cptr++ = *line++;
*cptr++ = *line++;
*cptr++ = *line++;
if (*line++) {
aptr[x>>3] |= 1<<(7-x&0x7);
}
}
decoder->mFrame->SetImageData(decoder->colorLine, bpr, row_num*bpr);
decoder->mFrame->SetAlphaData(decoder->alphaLine, abpr, row_num*abpr);
}
break;
case gfxIFormats::RGB_A8:
case gfxIFormats::BGR_A8:
{
cptr = decoder->colorLine;
aptr = decoder->alphaLine;
for (PRUint32 x=0; x<iwidth; x++) {
#ifdef XP_MAC
*cptr++ = 0;
#endif
*cptr++ = *line++;
*cptr++ = *line++;
*cptr++ = *line++;
*aptr++ = *line++;
}
decoder->mFrame->SetImageData(decoder->colorLine, bpr, row_num*bpr);
decoder->mFrame->SetAlphaData(decoder->alphaLine, abpr, row_num*abpr);
}
break;
case gfxIFormats::RGBA:
case gfxIFormats::BGRA:
#ifdef XP_MAC
{
cptr = decoder->colorLine;
aptr = decoder->alphaLine;
for (PRUint32 x=0; x<iwidth; x++) {
*cptr++ = 0;
*cptr++ = *line++;
*cptr++ = *line++;
*cptr++ = *line++;
*aptr++ = *line++;
}
decoder->mFrame->SetImageData(decoder->colorLine, bpr, row_num*bpr);
decoder->mFrame->SetAlphaData(decoder->alphaLine, abpr, row_num*abpr);
}
#else
decoder->mFrame->SetImageData(line, bpr, row_num*bpr);
#endif
break;
}
nsRect r(0, row_num, width, 1);
decoder->mObserver->OnDataAvailable(nsnull, nsnull, decoder->mFrame, &r);
}
}
void
nsPNGDecoder::end_callback(png_structp png_ptr, png_infop info_ptr)
{
/* libpng comments:
*
* this function is called when the whole image has been read,
* including any chunks after the image (up to and including
* the IEND). You will usually have the same info chunk as you
* had in the header, although some data may have been added
* to the comments and time fields.
*
* Most people won't do much here, perhaps setting a flag that
* marks the image as finished.
*/
nsPNGDecoder *decoder = NS_STATIC_CAST(nsPNGDecoder*, png_get_progressive_ptr(png_ptr));
if (decoder->mObserver) {
decoder->mObserver->OnStopFrame(nsnull, nsnull, decoder->mFrame);
decoder->mObserver->OnStopContainer(nsnull, nsnull, decoder->mImage);
decoder->mObserver->OnStopDecode(nsnull, nsnull, NS_OK, nsnull);
}
}

View File

@@ -1,82 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation.
* All Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
*/
#ifndef nsPNGDecoder_h__
#define nsPNGDecoder_h__
#include "imgIDecoder.h"
#include "imgIContainer.h"
#include "imgIDecoderObserver.h"
#include "gfxIImageFrame.h"
#include "imgIRequest.h"
#include "nsCOMPtr.h"
#include "png.h"
#define NS_PNGDECODER_CID \
{ /* 36fa00c2-1dd2-11b2-be07-d16eeb4c50ed */ \
0x36fa00c2, \
0x1dd2, \
0x11b2, \
{0xbe, 0x07, 0xd1, 0x6e, 0xeb, 0x4c, 0x50, 0xed} \
}
class nsPNGDecoder : public imgIDecoder
{
public:
NS_DECL_ISUPPORTS
NS_DECL_IMGIDECODER
NS_DECL_NSIOUTPUTSTREAM
nsPNGDecoder();
virtual ~nsPNGDecoder();
PR_STATIC_CALLBACK(void)
info_callback(png_structp png_ptr, png_infop info_ptr);
PR_STATIC_CALLBACK(void)
row_callback(png_structp png_ptr, png_bytep new_row,
png_uint_32 row_num, int pass);
PR_STATIC_CALLBACK(void)
end_callback(png_structp png_ptr, png_infop info_ptr);
inline PRUint32 ProcessData(unsigned char *data, PRUint32 count);
public:
nsCOMPtr<imgIContainer> mImage;
nsCOMPtr<gfxIImageFrame> mFrame;
nsCOMPtr<imgIRequest> mRequest;
nsCOMPtr<imgIDecoderObserver> mObserver; // this is just qi'd from mRequest for speed
png_structp mPNG;
png_infop mInfo;
PRUint8 *colorLine, *alphaLine;
PRUint8 *interlacebuf;
PRUint32 ibpr;
};
#endif // nsPNGDecoder_h__

View File

@@ -1,46 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
*/
#include "nsIGenericFactory.h"
#include "nsIModule.h"
#include "nsPNGDecoder.h"
// objects that just require generic constructors
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPNGDecoder)
static nsModuleComponentInfo components[] =
{
{ "PNG decoder",
NS_PNGDECODER_CID,
"@mozilla.org/image/decoder;2?type=image/png",
nsPNGDecoderConstructor, },
{ "PNG decoder",
NS_PNGDECODER_CID,
"@mozilla.org/image/decoder;2?type=image/x-png",
nsPNGDecoderConstructor, },
};
NS_IMPL_NSGETMODULE("nsPNGDecoderModule", components)

View File

@@ -1,51 +0,0 @@
#!nmake
#
# 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 Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 2001 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Stuart Parmenter <pavlov@netscape.com>
#
DEPTH=..\..\..\..
include <$(DEPTH)/config/config.mak>
MODULE = imgppm
LIBRARY_NAME = imgppm
DLL = $(OBJDIR)\$(LIBRARY_NAME).dll
MAKE_OBJ_TYPE = DLL
OBJS = \
.\$(OBJDIR)\nsPPMDecoder.obj \
.\$(OBJDIR)\nsPPMFactory.obj \
$(NULL)
LLIBS=\
$(LIBNSPR) \
$(DIST)\lib\xpcom.lib \
$(DIST)\lib\gkgfxwin.lib \
$(NULL)
include <$(DEPTH)\config\rules.mak>
install:: $(DLL)
$(MAKE_INSTALL) .\$(OBJDIR)\$(LIBRARY_NAME).dll $(DIST)\bin\components
$(MAKE_INSTALL) .\$(OBJDIR)\$(LIBRARY_NAME).lib $(DIST)\lib
clobber::
rm -f $(DIST)\bin\components\$(LIBRARY_NAME).dll
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib

View File

@@ -1,305 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation.
* All Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
*
*/
#include "nsPPMDecoder.h"
#include "nsIInputStream.h"
#include "imgIContainer.h"
#include "imgIContainerObserver.h"
#include "nspr.h"
#include "nsIComponentManager.h"
#include "nsRect.h"
NS_IMPL_ISUPPORTS2(nsPPMDecoder, imgIDecoder, nsIOutputStream)
nsPPMDecoder::nsPPMDecoder()
{
NS_INIT_ISUPPORTS();
mDataReceived = 0;
mDataWritten = 0;
mDataLeft = 0;
mPrevData = nsnull;
}
nsPPMDecoder::~nsPPMDecoder()
{
}
/** imgIDecoder methods **/
/* void init (in imgIRequest aRequest); */
NS_IMETHODIMP nsPPMDecoder::Init(imgIRequest *aRequest)
{
mRequest = aRequest;
mObserver = do_QueryInterface(aRequest); // we're holding 2 strong refs to the request.
aRequest->GetImage(getter_AddRefs(mImage));
mFrame = do_CreateInstance("@mozilla.org/gfx/image/frame;2");
if (!mFrame)
return NS_ERROR_FAILURE;
return NS_OK;
}
/* readonly attribute imgIRequest request; */
NS_IMETHODIMP nsPPMDecoder::GetRequest(imgIRequest * *aRequest)
{
*aRequest = mRequest;
NS_ADDREF(*aRequest);
return NS_OK;
}
/** nsIOutputStream methods **/
/* void close (); */
NS_IMETHODIMP nsPPMDecoder::Close()
{
if (mObserver) {
mObserver->OnStopFrame(nsnull, nsnull, mFrame);
mObserver->OnStopContainer(nsnull, nsnull, mImage);
mObserver->OnStopDecode(nsnull, nsnull, NS_OK, nsnull);
}
return NS_OK;
}
/* void flush (); */
NS_IMETHODIMP nsPPMDecoder::Flush()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* unsigned long write (in string buf, in unsigned long count); */
NS_IMETHODIMP nsPPMDecoder::Write(const char *buf, PRUint32 count, PRUint32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
static char *__itoa(int n)
{
char *s;
int i, j, sign, tmp;
/* check sign and convert to positive to stringify numbers */
if ( (sign = n) < 0)
n = -n;
i = 0;
s = (char*) malloc(sizeof(char));
/* grow string as needed to add numbers from powers of 10
* down till none left
*/
do
{
s = (char*) realloc(s, (i+1)*sizeof(char));
s[i++] = n % 10 + '0'; /* '0' or 30 is where ASCII numbers start */
s[i] = '\0';
}
while( (n /= 10) > 0);
/* tack on minus sign if we found earlier that this was negative */
if (sign < 0)
{
s = (char*) realloc(s, (i+1)*sizeof(char));
s[i++] = '-';
}
s[i] = '\0';
/* pop numbers (and sign) off of string to push back into right direction */
for (i = 0, j = strlen(s) - 1; i < j; i++, j--)
{
tmp = s[i];
s[i] = s[j];
s[j] = tmp;
}
return s;
}
/* unsigned long writeFrom (in nsIInputStream inStr, in unsigned long count); */
NS_IMETHODIMP nsPPMDecoder::WriteFrom(nsIInputStream *inStr, PRUint32 count, PRUint32 *_retval)
{
nsresult rv;
char *buf = (char *)PR_Malloc(count + mDataLeft);
if (!buf)
return NS_ERROR_OUT_OF_MEMORY; /* we couldn't allocate the object */
// read the data from the input stram...
PRUint32 readLen;
rv = inStr->Read(buf+mDataLeft, count, &readLen);
PRUint32 dataLen = readLen + mDataLeft;
if (mPrevData) {
strncpy(buf, mPrevData, mDataLeft);
PR_Free(mPrevData);
mPrevData = nsnull;
mDataLeft = 0;
}
char *data = buf;
if (NS_FAILED(rv)) return rv;
if (mDataReceived == 0) {
mObserver->OnStartDecode(nsnull, nsnull);
// Check the magic number
char type;
if ((sscanf(data, "P%c\n", &type) !=1) || (type != '6')) {
return NS_ERROR_FAILURE;
}
int i = 3;
data += i;
#if 0
// XXX
// Ignore comments
while ((input = fgetc(f)) == '#')
fgets(junk, 512, f);
ungetc(input, f);
#endif
// Read size
int w, h, mcv;
if (sscanf(data, "%d %d\n%d\n", &w, &h, &mcv) != 3) {
return NS_ERROR_FAILURE;
}
char *ws = __itoa(w), *hs = __itoa(h), *mcvs = __itoa(mcv);
int j = strlen(ws) + strlen(hs) + strlen(mcvs) + 3;
data += j;
// free(ws);
// free(hs);
// free(mcvs);
readLen -= i + j;
dataLen = readLen; // since this is the first pass, we don't have any data waiting that we need to keep track of
mImage->Init(w, h, mObserver);
if (mObserver)
mObserver->OnStartContainer(nsnull, nsnull, mImage);
mFrame->Init(0, 0, w, h, gfxIFormats::RGB);
mImage->AppendFrame(mFrame);
if (mObserver)
mObserver->OnStartFrame(nsnull, nsnull, mFrame);
}
PRUint32 bpr;
nscoord width;
mFrame->GetImageBytesPerRow(&bpr);
mFrame->GetWidth(&width);
// XXX ceil?
PRUint32 real_bpr = width * 3;
PRUint32 i = 0;
PRUint32 rownum = mDataWritten / real_bpr; // XXX this better not have a decimal
PRUint32 wroteLen = 0;
if (readLen > real_bpr) {
do {
PRUint8 *line = (PRUint8*)data + i*real_bpr;
mFrame->SetImageData(line, real_bpr, (rownum++)*bpr);
nsRect r(0, rownum, width, 1);
mObserver->OnDataAvailable(nsnull, nsnull, mFrame, &r);
wroteLen += real_bpr ;
i++;
} while(dataLen >= real_bpr * (i+1));
}
mDataReceived += readLen; // don't double count previous data that is in 'dataLen'
mDataWritten += wroteLen;
PRUint32 dataLeft = dataLen - wroteLen;
if (dataLeft > 0) {
if (mPrevData) {
mPrevData = (char *)PR_Realloc(mPrevData, mDataLeft + dataLeft);
strncpy(mPrevData + mDataLeft, data+wroteLen, dataLeft);
mDataLeft += dataLeft;
} else {
mDataLeft = dataLeft;
mPrevData = (char *)PR_Malloc(mDataLeft);
strncpy(mPrevData, data+wroteLen, mDataLeft);
}
}
PR_FREEIF(buf);
return NS_OK;
}
/* [noscript] unsigned long writeSegments (in nsReadSegmentFun reader, in voidPtr closure, in unsigned long count); */
NS_IMETHODIMP nsPPMDecoder::WriteSegments(nsReadSegmentFun reader, void * closure, PRUint32 count, PRUint32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute boolean nonBlocking; */
NS_IMETHODIMP nsPPMDecoder::GetNonBlocking(PRBool *aNonBlocking)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsPPMDecoder::SetNonBlocking(PRBool aNonBlocking)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute nsIOutputStreamObserver observer; */
NS_IMETHODIMP nsPPMDecoder::GetObserver(nsIOutputStreamObserver * *aObserver)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsPPMDecoder::SetObserver(nsIOutputStreamObserver * aObserver)
{
return NS_ERROR_NOT_IMPLEMENTED;
}

View File

@@ -1,67 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation.
* All Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
*/
#ifndef nsPPMDecoder_h__
#define nsPPMDecoder_h__
#include "imgIDecoder.h"
#include "nsCOMPtr.h"
#include "imgIContainer.h"
#include "imgIDecoderObserver.h"
#include "gfxIImageFrame.h"
#include "imgIRequest.h"
#define NS_PPMDECODER_CID \
{ /* e90bfa06-1dd1-11b2-8217-f38fe5d431a2 */ \
0xe90bfa06, \
0x1dd1, \
0x11b2, \
{0x82, 0x17, 0xf3, 0x8f, 0xe5, 0xd4, 0x31, 0xa2} \
}
class nsPPMDecoder : public imgIDecoder
{
public:
NS_DECL_ISUPPORTS
NS_DECL_IMGIDECODER
NS_DECL_NSIOUTPUTSTREAM
nsPPMDecoder();
virtual ~nsPPMDecoder();
private:
nsCOMPtr<imgIContainer> mImage;
nsCOMPtr<gfxIImageFrame> mFrame;
nsCOMPtr<imgIRequest> mRequest;
nsCOMPtr<imgIDecoderObserver> mObserver; // this is just qi'd from mRequest for speed
PRUint32 mDataReceived;
PRUint32 mDataWritten;
PRUint32 mDataLeft;
char *mPrevData;
};
#endif // nsPPMDecoder_h__

View File

@@ -1,42 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
*/
#include "nsIGenericFactory.h"
#include "nsIModule.h"
#include "nsPPMDecoder.h"
// objects that just require generic constructors
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPPMDecoder)
static nsModuleComponentInfo components[] =
{
{ "ppm decoder",
NS_PPMDECODER_CID,
"@mozilla.org/image/decoder;2?type=image/x-portable-pixmap",
nsPPMDecoderConstructor, },
};
NS_IMPL_NSGETMODULE("nsPPMDecoderModule", components)

View File

@@ -1,111 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation.
* All Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
*/
#include "prlog.h"
#include "nsString.h"
#if defined(PR_LOGGING)
extern PRLogModuleInfo *gImgLog;
class LogScope {
public:
LogScope(PRLogModuleInfo *aLog, void *from, const nsAReadableCString &fn) :
mLog(aLog), mFrom(from), mFunc(fn)
{
PR_LOG(mLog, PR_LOG_DEBUG, ("[this=%p] %s {ENTER}\n",
mFrom, mFunc.get()));
}
/* const char * constructor */
LogScope(PRLogModuleInfo *aLog, void *from, const nsAReadableCString &fn,
const nsLiteralCString &paramName, const char *paramValue) :
mLog(aLog), mFrom(from), mFunc(fn)
{
PR_LOG(mLog, PR_LOG_DEBUG, ("[this=%p] %s (%s=\"%s\") {ENTER}\n",
mFrom, mFunc.get(),
paramName.get(),
paramValue));
}
/* void ptr constructor */
LogScope(PRLogModuleInfo *aLog, void *from, const nsAReadableCString &fn,
const nsLiteralCString &paramName, const void *paramValue) :
mLog(aLog), mFrom(from), mFunc(fn)
{
PR_LOG(mLog, PR_LOG_DEBUG, ("[this=%p] %s (%s=%p) {ENTER}\n",
mFrom, mFunc.get(),
paramName.get(),
paramValue));
}
/* PRInt32 constructor */
LogScope(PRLogModuleInfo *aLog, void *from, const nsAReadableCString &fn,
const nsLiteralCString &paramName, PRInt32 paramValue) :
mLog(aLog), mFrom(from), mFunc(fn)
{
PR_LOG(mLog, PR_LOG_DEBUG, ("[this=%p] %s (%s=\"%d\") {ENTER}\n",
mFrom, mFunc.get(),
paramName.get(),
paramValue));
}
/* PRUint32 constructor */
LogScope(PRLogModuleInfo *aLog, void *from, const nsAReadableCString &fn,
const nsLiteralCString &paramName, PRUint32 paramValue) :
mLog(aLog), mFrom(from), mFunc(fn)
{
PR_LOG(mLog, PR_LOG_DEBUG, ("[this=%p] %s (%s=\"%d\") {ENTER}\n",
mFrom, mFunc.get(),
paramName.get(),
paramValue));
}
~LogScope() {
PR_LOG(mLog, PR_LOG_DEBUG, ("[this=%p] %s {EXIT}\n",
mFrom, mFunc.get()));
}
private:
PRLogModuleInfo *mLog;
void *mFrom;
nsCAutoString mFunc;
};
#define LOG_SCOPE(l, s) \
LogScope LOG_SCOPE_TMP_VAR ##__LINE__ (l, \
NS_STATIC_CAST(void *, this), \
NS_LITERAL_CSTRING(s))
#define LOG_SCOPE_WITH_PARAM(l, s, pn, pv) \
LogScope LOG_SCOPE_TMP_VAR ##__LINE__ (l, \
NS_STATIC_CAST(void *, this), \
NS_LITERAL_CSTRING(s), \
NS_LITERAL_CSTRING(pn), pv)
#else
#define LOG_SCOPE(l, s)
#define LOG_SCOPE_WITH_PARAM(l, s, pn, pv)
#endif

View File

@@ -1 +0,0 @@
ImageLogging.h

View File

@@ -1,6 +0,0 @@
imgIContainer.idl
imgIContainerObserver.idl
imgIDecoder.idl
imgIDecoderObserver.idl
imgILoader.idl
imgIRequest.idl

View File

@@ -1,109 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
*/
#include "nsISupports.idl"
#include "gfxtypes.idl"
#include "gfxIFormats.idl"
interface gfxIImageFrame;
interface nsIEnumerator;
interface imgIContainerObserver;
/**
* gfxIImageContainer interface
*
* @author Stuart Parmenter <pavlov@netscape.com>
* @version 0.1
* @see "gfx2"
*/
[scriptable, uuid(5e8405a4-1dd2-11b2-8385-bc8e3446cad3)]
interface imgIContainer : nsISupports
{
/**
* Create a new \a aWidth x \a aHeight sized image container.
*
* @param aWidth The width of the container in which all the
* gfxIImageFrame children will fit.
* @param aHeight The height of the container in which all the
* gfxIImageFrame children will fit.
* @param aObserver Observer to send animation notifications to.
*/
void init(in nscoord aWidth,
in nscoord aHeight,
in imgIContainerObserver aObserver);
/* this should probably be on the device context (or equiv) */
readonly attribute gfx_format preferredAlphaChannelFormat;
/**
* The width of the container rectangle.
*/
readonly attribute nscoord width;
/**
* The height of the container rectangle.
*/
readonly attribute nscoord height;
/**
* Get the current frame that would be drawn if the image was to be drawn now
*/
readonly attribute gfxIImageFrame currentFrame;
readonly attribute unsigned long numFrames;
gfxIImageFrame getFrameAt(in unsigned long index);
/**
* Adds \a item to the end of the list of frames.
* @param item frame to add.
*/
void appendFrame(in gfxIImageFrame item);
void removeFrame(in gfxIImageFrame item);
/* notification when the current frame is done decoding */
void endFrameDecode(in unsigned long framenumber, in unsigned long timeout);
/* notification that the entire image has been decoded */
void decodingComplete();
nsIEnumerator enumerate();
void clear();
void startAnimation();
void stopAnimation();
/* animation stuff */
/**
* number of times to loop the image.
* @note -1 means forever.
*/
attribute long loopCount;
};

View File

@@ -1,53 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation.
* All Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
*/
#include "nsISupports.idl"
#include "nsIOutputStream.idl"
#include "gfxtypes.idl"
interface imgIRequest;
/**
* imgIDecoder interface
*
* @author Stuart Parmenter <pavlov@netscape.com>
* @version 0.1
* @see imagelib2
*/
[scriptable, uuid(9eebf43a-1dd1-11b2-953e-f1782f4cbad3)]
interface imgIDecoder : nsIOutputStream
{
/**
* Initalize an image decoder.
* @param aRequest the request that owns the decoder.
*
* @note The decode should QI \a aRequest to an imgIDecoderObserver
* and should send decoder notifications to the request.
* The decoder should always pass NULL as the first two parameters to
* all of the imgIDecoderObserver APIs.
*/
void init(in imgIRequest aRequest);
/// allows access to the nsIImage we have to put bits in to.
readonly attribute imgIRequest request;
};

View File

@@ -1,80 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
*/
#include "imgIContainerObserver.idl"
interface imgIRequest;
interface imgIContainer;
interface gfxIImageFrame;
%{C++
#include "nsRect.h"
%}
/**
* imgIDecoderObserver interface
*
* @author Stuart Parmenter <pavlov@netscape.com>
* @version 0.1
* @see imagelib2
*/
[scriptable, uuid(350163d2-1dd2-11b2-9e69-89959ecec1f3)]
interface imgIDecoderObserver : imgIContainerObserver
{
/**
* called as soon as the image begins getting decoded
*/
void onStartDecode(in imgIRequest aRequest, in nsISupports cx);
/**
* called once the image has been inited and therefore has a width and height
*/
void onStartContainer(in imgIRequest aRequest, in nsISupports cx, in imgIContainer aContainer);
/**
* called when each frame is created
*/
void onStartFrame(in imgIRequest aRequest, in nsISupports cx, in gfxIImageFrame aFrame);
/**
* called when some part of the frame has new data in it
*/
[noscript] void onDataAvailable(in imgIRequest aRequest, in nsISupports cx, in gfxIImageFrame aFrame, [const] in nsRect aRect);
/**
* called when a frame is finished decoding
*/
void onStopFrame(in imgIRequest aRequest, in nsISupports cx, in gfxIImageFrame aFrame);
/**
* probably not needed. called right before onStopDecode
*/
void onStopContainer(in imgIRequest aRequest, in nsISupports cx, in imgIContainer aContainer);
/**
* called when the decoder is dying off
*/
void onStopDecode(in imgIRequest aRequest, in nsISupports cx,
in nsresult status, in wstring statusArg);
};

View File

@@ -1,62 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation.
* All Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
*/
#include "nsISupports.idl"
#include "gfxtypes.idl"
interface imgIDecoderObserver;
interface imgIRequest;
interface nsIChannel;
interface nsILoadGroup;
interface nsIStreamListener;
interface nsIURI;
interface nsISimpleEnumerator;
/**
* imgILoader interface
*
* @author Stuart Parmenter <pavlov@netscape.com>
* @version 0.1
* @see imagelib2
*/
[scriptable, uuid(4c8cf1e0-1dd2-11b2-aff9-c51cdbfcb6da)]
interface imgILoader : nsISupports
{
/**
* Start the load and decode of an image.
* @param uri the URI to load
* @param aObserver the observer
* @param cx some random data
*/
imgIRequest loadImage(in nsIURI uri, in nsILoadGroup aLoadGroup, in imgIDecoderObserver aObserver, in nsISupports cx);
/**
* Start the load and decode of an image.
* @param uri the URI to load
* @param aObserver the observer
* @param cx some random data
*/
imgIRequest loadImageWithChannel(in nsIChannel aChannel, in imgIDecoderObserver aObserver, in nsISupports cx, out nsIStreamListener aListener);
};

View File

@@ -1,80 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation.
* All Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
*/
#include "nsISupports.idl"
#include "nsIRequest.idl"
interface imgIContainer;
interface imgIDecoderObserver;
interface nsIURI;
/**
* imgIRequest interface
*
* @author Stuart Parmenter <pavlov@netscape.com>
* @version 0.1
* @see imagelib2
*/
[scriptable, uuid(ccf705f6-1dd1-11b2-82ef-e18eccf7f7ec)]
interface imgIRequest : nsIRequest
{
/**
* the image container...
* @return the image object associated with the request.
* @attention NEED DOCS
*/
readonly attribute imgIContainer image;
/**
* Bits set in the return value from imageStatus
* @name statusflags
*/
//@{
const long STATUS_NONE = 0x0;
const long STATUS_SIZE_AVAILABLE = 0x1;
const long STATUS_LOAD_COMPLETE = 0x2;
const long STATUS_ERROR = 0x4;
//@}
/**
* something
* @attention NEED DOCS
*/
readonly attribute unsigned long imageStatus;
readonly attribute nsIURI URI;
readonly attribute imgIDecoderObserver decoderObserver;
};
%{C++
/**
* imagelib specific nsresult success and error codes
*/
#define NS_IMAGELIB_SUCCESS_LOAD_FINISHED NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_IMGLIB, 0)
#define NS_IMAGELIB_ERROR_FAILURE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_IMGLIB, 5)
#define NS_IMAGELIB_ERROR_NO_DECODER NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_IMGLIB, 6)
%}

View File

@@ -1,43 +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.org code
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 2001 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Stuart Parmenter <pavlov@netscape.com>
#
DEPTH = ..\..\..
include <$(DEPTH)/config/config.mak>
MODULE = imglib2
XPIDL_MODULE = imglib2
EXPORTS = ImageLogging.h
XPIDLSRCS = \
.\imgIContainer.idl \
.\imgIContainerObserver.idl \
.\imgIDecoder.idl \
.\imgIDecoderObserver.idl \
.\imgILoader.idl \
.\imgIRequest.idl \
$(NULL)
include <$(DEPTH)\config\rules.mak>

View File

@@ -1,146 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation.
* All Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
*/
#include "DummyChannel.h"
#include "nsCOMPtr.h"
#include "nsIServiceManager.h"
NS_IMPL_ISUPPORTS1(DummyChannel, nsIChannel)
DummyChannel::DummyChannel(imgIRequest *aRequest, nsILoadGroup *aLoadGroup) :
mRequest(aRequest),
mLoadGroup(aLoadGroup),
mLoadFlags(nsIChannel::LOAD_NORMAL)
{
NS_INIT_ISUPPORTS();
/* member initializers and constructor code */
}
DummyChannel::~DummyChannel()
{
/* destructor code */
}
/* attribute nsIURI originalURI; */
NS_IMETHODIMP DummyChannel::GetOriginalURI(nsIURI * *aOriginalURI)
{
return mRequest->GetURI(aOriginalURI);
}
NS_IMETHODIMP DummyChannel::SetOriginalURI(nsIURI * aOriginalURI)
{
return NS_ERROR_FAILURE;
}
/* attribute nsIURI URI; */
NS_IMETHODIMP DummyChannel::GetURI(nsIURI * *aURI)
{
return mRequest->GetURI(aURI);
}
NS_IMETHODIMP DummyChannel::SetURI(nsIURI * aURI)
{
return NS_ERROR_FAILURE;
}
/* attribute nsISupports owner; */
NS_IMETHODIMP DummyChannel::GetOwner(nsISupports * *aOwner)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP DummyChannel::SetOwner(nsISupports * aOwner)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute nsILoadGroup loadGroup; */
NS_IMETHODIMP DummyChannel::GetLoadGroup(nsILoadGroup * *aLoadGroup)
{
*aLoadGroup = mLoadGroup;
NS_IF_ADDREF(*aLoadGroup);
return NS_OK;
}
NS_IMETHODIMP DummyChannel::SetLoadGroup(nsILoadGroup * aLoadGroup)
{
return NS_ERROR_FAILURE;
}
/* attribute nsLoadFlags loadAttributes; */
NS_IMETHODIMP DummyChannel::GetLoadAttributes(nsLoadFlags *aLoadAttributes)
{
*aLoadAttributes = mLoadFlags;
return NS_OK;
}
NS_IMETHODIMP DummyChannel::SetLoadAttributes(nsLoadFlags aLoadAttributes)
{
mLoadFlags = aLoadAttributes;
return NS_OK;
}
/* attribute nsIInterfaceRequestor notificationCallbacks; */
NS_IMETHODIMP DummyChannel::GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks)
{
return NS_OK;
}
NS_IMETHODIMP DummyChannel::SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks)
{
return NS_OK;
}
/* readonly attribute nsISupports securityInfo; */
NS_IMETHODIMP DummyChannel::GetSecurityInfo(nsISupports * *aSecurityInfo)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute string contentType; */
NS_IMETHODIMP DummyChannel::GetContentType(char * *aContentType)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP DummyChannel::SetContentType(const char * aContentType)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute long contentLength; */
NS_IMETHODIMP DummyChannel::GetContentLength(PRInt32 *aContentLength)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP DummyChannel::SetContentLength(PRInt32 aContentLength)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIInputStream open (); */
NS_IMETHODIMP DummyChannel::Open(nsIInputStream **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void asyncOpen (in nsIStreamListener listener, in nsISupports ctxt); */
NS_IMETHODIMP DummyChannel::AsyncOpen(nsIStreamListener *listener, nsISupports *ctxt)
{
return NS_ERROR_NOT_IMPLEMENTED;
}

View File

@@ -1,166 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation.
* All Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
*/
#include "ImageCache.h"
#ifdef MOZ_NEW_CACHE
#include "prlog.h"
#if defined(PR_LOGGING)
extern PRLogModuleInfo *gImgLog;
#else
#define gImgLog
#endif
#include "nsXPIDLString.h"
#include "nsCOMPtr.h"
#include "nsIServiceManager.h"
#include "nsICache.h"
#include "nsICacheService.h"
#include "nsICacheSession.h"
#include "nsICacheEntryDescriptor.h"
static nsCOMPtr<nsICacheSession> gSession = nsnull;
ImageCache::ImageCache()
{
/* member initializers and constructor code */
}
ImageCache::~ImageCache()
{
/* destructor code */
}
void GetCacheSession(nsICacheSession **_retval)
{
if (!gSession) {
nsCOMPtr<nsICacheService> cacheService(do_GetService("@mozilla.org/network/cache-service;1"));
NS_ASSERTION(cacheService, "Unable to get the cache service");
cacheService->CreateSession("images", nsICache::NOT_STREAM_BASED, PR_FALSE, getter_AddRefs(gSession));
NS_ASSERTION(gSession, "Unable to create a cache session");
}
*_retval = gSession;
NS_IF_ADDREF(*_retval);
}
void ImageCache::Shutdown()
{
gSession = nsnull;
}
PRBool ImageCache::Put(nsIURI *aKey, imgRequest *request, nsICacheEntryDescriptor **aEntry)
{
PR_LOG(gImgLog, PR_LOG_DEBUG,
("ImageCache::Put\n"));
nsresult rv;
nsCOMPtr<nsICacheSession> ses;
GetCacheSession(getter_AddRefs(ses));
nsXPIDLCString spec;
aKey->GetSpec(getter_Copies(spec));
nsCOMPtr<nsICacheEntryDescriptor> entry;
rv = ses->OpenCacheEntry(spec, nsICache::ACCESS_WRITE, getter_AddRefs(entry));
if (!entry || NS_FAILED(rv))
return PR_FALSE;
entry->SetCacheElement(NS_STATIC_CAST(nsISupports *, NS_STATIC_CAST(imgIRequest*, request)));
entry->MarkValid();
*aEntry = entry;
NS_ADDREF(*aEntry);
return PR_TRUE;
}
PRBool ImageCache::Get(nsIURI *aKey, imgRequest **aRequest, nsICacheEntryDescriptor **aEntry)
{
PR_LOG(gImgLog, PR_LOG_DEBUG,
("ImageCache::Get\n"));
nsresult rv;
nsCOMPtr<nsICacheSession> ses;
GetCacheSession(getter_AddRefs(ses));
nsXPIDLCString spec;
aKey->GetSpec(getter_Copies(spec));
nsCOMPtr<nsICacheEntryDescriptor> entry;
rv = ses->OpenCacheEntry(spec, nsICache::ACCESS_READ, getter_AddRefs(entry));
if (!entry || NS_FAILED(rv))
return PR_FALSE;
nsCOMPtr<nsISupports> sup;
entry->GetCacheElement(getter_AddRefs(sup));
nsCOMPtr<imgIRequest> req(do_QueryInterface(sup));
*aRequest = NS_REINTERPRET_CAST(imgRequest*, req.get());
NS_IF_ADDREF(*aRequest);
*aEntry = entry;
NS_ADDREF(*aEntry);
return PR_TRUE;
}
PRBool ImageCache::Remove(nsIURI *aKey)
{
PR_LOG(gImgLog, PR_LOG_DEBUG,
("ImageCache::Remove\n"));
nsresult rv;
nsCOMPtr<nsICacheSession> ses;
GetCacheSession(getter_AddRefs(ses));
nsXPIDLCString spec;
aKey->GetSpec(getter_Copies(spec));
nsCOMPtr<nsICacheEntryDescriptor> entry;
rv = ses->OpenCacheEntry(spec, nsICache::ACCESS_READ, getter_AddRefs(entry));
if (!entry || NS_FAILED(rv))
return PR_FALSE;
entry->Doom();
return PR_TRUE;
}
#endif /* MOZ_NEW_CACHE */

View File

@@ -1,72 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation.
* All Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
*/
#ifndef ImageCache_h__
#define ImageCache_h__
#include "nsIURI.h"
#include "imgRequest.h"
#include "prtypes.h"
#ifdef MOZ_NEW_CACHE
#include "nsICacheEntryDescriptor.h"
#else
class nsICacheEntryDescriptor;
#endif
class ImageCache
{
public:
#ifdef MOZ_NEW_CACHE
ImageCache();
~ImageCache();
static void Shutdown(); // for use by the factory
/* additional members */
static PRBool Put(nsIURI *aKey, imgRequest *request, nsICacheEntryDescriptor **aEntry);
static PRBool Get(nsIURI *aKey, imgRequest **aRequest, nsICacheEntryDescriptor **aEntry);
static PRBool Remove(nsIURI *aKey);
#else
ImageCache() { }
~ImageCache() { }
static void Shutdown() { }
/* additional members */
static PRBool Put(nsIURI *aKey, imgRequest *request, nsICacheEntryDescriptor **aEntry) {
return PR_FALSE;
}
static PRBool Get(nsIURI *aKey, imgRequest **aRequest, nsICacheEntryDescriptor **aEntry) {
return PR_FALSE;
}
static PRBool Remove(nsIURI *aKey) {
return PR_FALSE;
}
#endif /* MOZ_NEW_CACHE */
};
#endif

View File

@@ -1,67 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
*/
#include "nsIGenericFactory.h"
#include "nsIModule.h"
#include "imgContainer.h"
#include "imgLoader.h"
#include "imgRequest.h"
#include "imgRequestProxy.h"
#include "ImageCache.h"
// objects that just require generic constructors
NS_GENERIC_FACTORY_CONSTRUCTOR(imgContainer)
NS_GENERIC_FACTORY_CONSTRUCTOR(imgLoader)
NS_GENERIC_FACTORY_CONSTRUCTOR(imgRequest)
NS_GENERIC_FACTORY_CONSTRUCTOR(imgRequestProxy)
static nsModuleComponentInfo components[] =
{
{ "image container",
NS_IMGCONTAINER_CID,
"@mozilla.org/image/container;1",
imgContainerConstructor, },
{ "image loader",
NS_IMGLOADER_CID,
"@mozilla.org/image/loader;1",
imgLoaderConstructor, },
{ "image request",
NS_IMGREQUEST_CID,
"@mozilla.org/image/request/real;1",
imgRequestConstructor, },
{ "image request proxy",
NS_IMGREQUESTPROXY_CID,
"@mozilla.org/image/request/proxy;1",
imgRequestProxyConstructor, },
};
PR_STATIC_CALLBACK(void)
ImageModuleDestructor(nsIModule *self)
{
ImageCache::Shutdown();
}
NS_IMPL_NSGETMODULE_WITH_DTOR("nsImageLib2Module", components, ImageModuleDestructor)

View File

@@ -0,0 +1,221 @@
/* -*- 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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation.
* All Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
*/
#include "imgCache.h"
#include "ImageLogging.h"
#include "imgRequest.h"
#include "nsXPIDLString.h"
#include "nsCOMPtr.h"
#include "nsIServiceManager.h"
#include "nsICache.h"
#include "nsICacheService.h"
#include "nsICacheSession.h"
#include "nsICacheEntryDescriptor.h"
NS_IMPL_ISUPPORTS1(imgCache, imgICache)
imgCache::imgCache()
{
NS_INIT_ISUPPORTS();
/* member initializers and constructor code */
}
imgCache::~imgCache()
{
/* destructor code */
}
/* void clearCache (in boolean chrome); */
NS_IMETHODIMP imgCache::ClearCache(PRBool chrome)
{
if (chrome)
return imgCache::ClearChromeImageCache();
else
return imgCache::ClearImageCache();
}
static nsCOMPtr<nsICacheSession> gSession = nsnull;
static nsCOMPtr<nsICacheSession> gChromeSession = nsnull;
void GetCacheSession(nsIURI *aURI, nsICacheSession **_retval)
{
NS_ASSERTION(aURI, "Null URI!");
PRBool isChrome = PR_FALSE;
aURI->SchemeIs("chrome", &isChrome);
if (gSession && !isChrome) {
*_retval = gSession;
NS_ADDREF(*_retval);
return;
}
if (gChromeSession && isChrome) {
*_retval = gChromeSession;
NS_ADDREF(*_retval);
return;
}
nsCOMPtr<nsICacheService> cacheService(do_GetService("@mozilla.org/network/cache-service;1"));
if (!cacheService) {
NS_WARNING("Unable to get the cache service");
return;
}
nsCOMPtr<nsICacheSession> newSession;
cacheService->CreateSession(isChrome ? "image-chrome" : "image",
nsICache::NOT_STREAM_BASED,
PR_FALSE, getter_AddRefs(newSession));
if (!newSession) {
NS_WARNING("Unable to create a cache session");
return;
}
if (isChrome)
gChromeSession = newSession;
else
gSession = newSession;
*_retval = newSession;
NS_ADDREF(*_retval);
}
void imgCache::Shutdown()
{
gSession = nsnull;
gChromeSession = nsnull;
}
nsresult imgCache::ClearChromeImageCache()
{
if (!gChromeSession)
return NS_OK;
return gChromeSession->EvictEntries();
}
nsresult imgCache::ClearImageCache()
{
if (!gSession)
return NS_OK;
return gSession->EvictEntries();
}
PRBool imgCache::Put(nsIURI *aKey, imgRequest *request, nsICacheEntryDescriptor **aEntry)
{
LOG_STATIC_FUNC(gImgLog, "imgCache::Put");
nsresult rv;
nsCOMPtr<nsICacheSession> ses;
GetCacheSession(aKey, getter_AddRefs(ses));
if (!ses) return PR_FALSE;
nsXPIDLCString spec;
aKey->GetSpec(getter_Copies(spec));
nsCOMPtr<nsICacheEntryDescriptor> entry;
rv = ses->OpenCacheEntry(spec, nsICache::ACCESS_WRITE, nsICache::BLOCKING, getter_AddRefs(entry));
if (NS_FAILED(rv) || !entry)
return PR_FALSE;
nsCOMPtr<nsISupports> sup(do_QueryInterface(NS_STATIC_CAST(imgIRequest*, request)));
entry->SetCacheElement(sup);
entry->MarkValid();
*aEntry = entry;
NS_ADDREF(*aEntry);
return PR_TRUE;
}
PRBool imgCache::Get(nsIURI *aKey, imgRequest **aRequest, nsICacheEntryDescriptor **aEntry)
{
LOG_STATIC_FUNC(gImgLog, "imgCache::Get");
nsresult rv;
nsCOMPtr<nsICacheSession> ses;
GetCacheSession(aKey, getter_AddRefs(ses));
if (!ses) return PR_FALSE;
nsXPIDLCString spec;
aKey->GetSpec(getter_Copies(spec));
nsCOMPtr<nsICacheEntryDescriptor> entry;
rv = ses->OpenCacheEntry(spec, nsICache::ACCESS_READ, nsICache::BLOCKING, getter_AddRefs(entry));
if (NS_FAILED(rv) || !entry)
return PR_FALSE;
nsCOMPtr<nsISupports> sup;
entry->GetCacheElement(getter_AddRefs(sup));
nsCOMPtr<imgIRequest> req(do_QueryInterface(sup));
*aRequest = NS_REINTERPRET_CAST(imgRequest*, req.get());
NS_IF_ADDREF(*aRequest);
*aEntry = entry;
NS_ADDREF(*aEntry);
return PR_TRUE;
}
PRBool imgCache::Remove(nsIURI *aKey)
{
LOG_STATIC_FUNC(gImgLog, "imgCache::Remove");
nsresult rv;
nsCOMPtr<nsICacheSession> ses;
GetCacheSession(aKey, getter_AddRefs(ses));
if (!ses) return PR_FALSE;
nsXPIDLCString spec;
aKey->GetSpec(getter_Copies(spec));
nsCOMPtr<nsICacheEntryDescriptor> entry;
rv = ses->OpenCacheEntry(spec, nsICache::ACCESS_READ, nsICache::BLOCKING, getter_AddRefs(entry));
if (NS_FAILED(rv) || !entry)
return PR_FALSE;
entry->Doom();
return PR_TRUE;
}

View File

@@ -1,555 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
* Chris Saari <saari@netscape.com>
*/
#include "imgContainer.h"
#include "nsIServiceManager.h"
#include "nsIInterfaceRequestor.h"
#include "gfxIImageFrame.h"
#include "nsIImage.h"
NS_IMPL_ISUPPORTS3(imgContainer, imgIContainer, nsITimerCallback,imgIDecoderObserver)
//******************************************************************************
imgContainer::imgContainer()
{
NS_INIT_ISUPPORTS();
/* member initializers and constructor code */
mCurrentDecodingFrameIndex = 0;
mCurrentAnimationFrameIndex = 0;
mCurrentFrameIsFinishedDecoding = PR_FALSE;
mDoneDecoding = PR_FALSE;
mAnimating = PR_FALSE;
mObserver = nsnull;
}
//******************************************************************************
imgContainer::~imgContainer()
{
if (mTimer)
mTimer->Cancel();
/* destructor code */
mFrames.Clear();
}
//******************************************************************************
/* void init (in nscoord aWidth, in nscoord aHeight, in imgIContainerObserver aObserver); */
NS_IMETHODIMP imgContainer::Init(nscoord aWidth, nscoord aHeight, imgIContainerObserver *aObserver)
{
if (aWidth <= 0 || aHeight <= 0) {
NS_WARNING("error - negative image size\n");
return NS_ERROR_FAILURE;
}
mSize.SizeTo(aWidth, aHeight);
mObserver = getter_AddRefs(NS_GetWeakReference(aObserver));
return NS_OK;
}
//******************************************************************************
/* readonly attribute gfx_format preferredAlphaChannelFormat; */
NS_IMETHODIMP imgContainer::GetPreferredAlphaChannelFormat(gfx_format *aFormat)
{
/* default.. platform's should probably overwrite this */
*aFormat = gfxIFormats::RGB_A8;
return NS_OK;
}
//******************************************************************************
/* readonly attribute nscoord width; */
NS_IMETHODIMP imgContainer::GetWidth(nscoord *aWidth)
{
*aWidth = mSize.width;
return NS_OK;
}
//******************************************************************************
/* readonly attribute nscoord height; */
NS_IMETHODIMP imgContainer::GetHeight(nscoord *aHeight)
{
*aHeight = mSize.height;
return NS_OK;
}
//******************************************************************************
/* readonly attribute gfxIImageFrame currentFrame; */
NS_IMETHODIMP imgContainer::GetCurrentFrame(gfxIImageFrame * *aCurrentFrame)
{
if(mCompositingFrame)
return mCompositingFrame->QueryInterface(NS_GET_IID(gfxIImageFrame), (void**)aCurrentFrame); // addrefs again
else
return this->GetFrameAt(mCurrentAnimationFrameIndex, aCurrentFrame);
}
//******************************************************************************
/* readonly attribute unsigned long numFrames; */
NS_IMETHODIMP imgContainer::GetNumFrames(PRUint32 *aNumFrames)
{
return mFrames.Count(aNumFrames);
}
//******************************************************************************
/* gfxIImageFrame getFrameAt (in unsigned long index); */
NS_IMETHODIMP imgContainer::GetFrameAt(PRUint32 index, gfxIImageFrame **_retval)
{
nsISupports *sup = mFrames.ElementAt(index); // addrefs
if (!sup)
return NS_ERROR_FAILURE;
nsresult rv;
rv = sup->QueryInterface(NS_GET_IID(gfxIImageFrame), (void**)_retval); // addrefs again
NS_RELEASE(sup);
return rv;
}
//******************************************************************************
/* void appendFrame (in gfxIImageFrame item); */
NS_IMETHODIMP imgContainer::AppendFrame(gfxIImageFrame *item)
{
// If we don't have a composite frame already allocated, make sure that our container
// size is the same the frame size. Otherwise, we'll either need the composite frame
// for animation compositing (GIF) or for filling in with a background color.
// XXX IMPORTANT: this means that the frame should be initialized BEFORE appending to container
PRUint32 numFrames;
this->GetNumFrames(&numFrames);
if(!mCompositingFrame) {
nsRect frameRect;
item->GetRect(frameRect);
// We used to create a compositing frame if any frame was smaller than the logical
// image size. You could create a single frame that was 10x10 in the middle of
// an 20x20 logical screen and have the extra screen space filled by the image
// background color. However, it turns out that neither NS4.x nor IE correctly
// support this, and as a result there are many GIFs out there that look "wrong"
// when this is correctly supported. So for now, we only create a compositing frame
// if we have more than one frame in the image.
if(/*(frameRect.x != 0) ||
(frameRect.y != 0) ||
(frameRect.width != mSize.width) ||
(frameRect.height != mSize.height) ||*/
(numFrames >= 1)) // Not sure if I want to create a composite frame for every anim. Could be smarter.
{
mCompositingFrame = do_CreateInstance("@mozilla.org/gfx/image/frame;2");
mCompositingFrame->Init(0, 0, mSize.width, mSize.height, gfxIFormats::RGB);
nsCOMPtr<nsIImage> img(do_GetInterface(mCompositingFrame));
img->SetDecodedRect(0, 0, mSize.width, mSize.height);
nsCOMPtr<gfxIImageFrame> firstFrame;
this->GetFrameAt(0, getter_AddRefs(firstFrame));
firstFrame->DrawTo(mCompositingFrame, 0, 0, mSize.width, mSize.height);
}
}
// If this is our second frame, init a timer so we don't display
// the next frame until the delay timer has expired for the current
// frame.
if (!mTimer && (numFrames >= 1)) {
PRInt32 timeout;
nsCOMPtr<gfxIImageFrame> currentFrame;
this->GetFrameAt(mCurrentDecodingFrameIndex, getter_AddRefs(currentFrame));
currentFrame->GetTimeout(&timeout);
if (timeout != -1 &&
timeout >= 0) { // -1 means display this frame forever
if(mAnimating) {
// Since we have more than one frame we need a timer
mTimer = do_CreateInstance("@mozilla.org/timer;1");
mTimer->Init(
NS_STATIC_CAST(nsITimerCallback*, this),
timeout, NS_PRIORITY_NORMAL, NS_TYPE_REPEATING_SLACK);
}
}
}
if (numFrames > 0) mCurrentDecodingFrameIndex++;
mCurrentFrameIsFinishedDecoding = PR_FALSE;
return mFrames.AppendElement(NS_STATIC_CAST(nsISupports*, item));
}
//******************************************************************************
/* void removeFrame (in gfxIImageFrame item); */
NS_IMETHODIMP imgContainer::RemoveFrame(gfxIImageFrame *item)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
//******************************************************************************
/* void endFrameDecode (in gfxIImageFrame item, in unsigned long timeout); */
NS_IMETHODIMP imgContainer::EndFrameDecode(PRUint32 aFrameNum, PRUint32 aTimeout)
{
// It is now okay to start the timer for the next frame in the animation
mCurrentFrameIsFinishedDecoding = PR_TRUE;
nsCOMPtr<gfxIImageFrame> currentFrame;
this->GetFrameAt(aFrameNum-1, getter_AddRefs(currentFrame));
currentFrame->SetTimeout(aTimeout);
if (!mTimer && mAnimating){
PRUint32 numFrames;
this->GetNumFrames(&numFrames);
if (numFrames > 1) {
if (aTimeout != -1 &&
aTimeout >= 0) { // -1 means display this frame forever
mAnimating = PR_TRUE;
mTimer = do_CreateInstance("@mozilla.org/timer;1");
mTimer->Init(NS_STATIC_CAST(nsITimerCallback*, this),
aTimeout, NS_PRIORITY_NORMAL, NS_TYPE_REPEATING_SLACK);
}
}
}
return NS_OK;
}
//******************************************************************************
/* void decodingComplete (); */
NS_IMETHODIMP imgContainer::DecodingComplete(void)
{
mDoneDecoding = PR_TRUE;
return NS_OK;
}
//******************************************************************************
/* nsIEnumerator enumerate (); */
NS_IMETHODIMP imgContainer::Enumerate(nsIEnumerator **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void clear (); */
NS_IMETHODIMP imgContainer::Clear()
{
return mFrames.Clear();
}
//******************************************************************************
/* void startAnimation () */
NS_IMETHODIMP imgContainer::StartAnimation()
{
mAnimating = PR_TRUE;
if (mTimer)
return NS_OK;
PRUint32 numFrames;
this->GetNumFrames(&numFrames);
if (numFrames > 1) {
PRInt32 timeout;
nsCOMPtr<gfxIImageFrame> currentFrame;
this->GetCurrentFrame(getter_AddRefs(currentFrame));
if (currentFrame) {
currentFrame->GetTimeout(&timeout);
if (timeout != -1 &&
timeout >= 0) { // -1 means display this frame forever
mAnimating = PR_TRUE;
if(!mTimer) mTimer = do_CreateInstance("@mozilla.org/timer;1");
mTimer->Init(NS_STATIC_CAST(nsITimerCallback*, this),
timeout, NS_PRIORITY_NORMAL, NS_TYPE_REPEATING_SLACK);
}
} else {
// XXX hack.. the timer notify code will do the right thing, so just get that started
mAnimating = PR_TRUE;
if(!mTimer) mTimer = do_CreateInstance("@mozilla.org/timer;1");
mTimer->Init(NS_STATIC_CAST(nsITimerCallback*, this),
100, NS_PRIORITY_NORMAL, NS_TYPE_REPEATING_SLACK);
}
}
return NS_OK;
}
//******************************************************************************
/* void stopAnimation (); */
NS_IMETHODIMP imgContainer::StopAnimation()
{
mAnimating = PR_FALSE;
if (!mTimer)
return NS_OK;
mTimer->Cancel();
mTimer = nsnull;
// don't bother trying to change the frame (to 0, etc.) here.
// No one is listening.
return NS_OK;
}
//******************************************************************************
/* attribute long loopCount; */
NS_IMETHODIMP imgContainer::GetLoopCount(PRInt32 *aLoopCount)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP imgContainer::SetLoopCount(PRInt32 aLoopCount)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP_(void) imgContainer::Notify(nsITimer *timer)
{
NS_ASSERTION(mTimer == timer, "uh");
if(!mAnimating || !mTimer)
return;
nsCOMPtr<imgIContainerObserver> observer(do_QueryReferent(mObserver));
if (!observer) {
// the imgRequest that owns us is dead, we should die now too.
this->StopAnimation();
return;
}
nsCOMPtr<gfxIImageFrame> nextFrame;
PRInt32 timeout = 100;
PRUint32 numFrames;
GetNumFrames(&numFrames);
if(!numFrames)
return;
// If we're done decoding the next frame, go ahead and display it now and reinit
// the timer with the next frame's delay time.
PRUint32 previousAnimationFrameIndex = mCurrentAnimationFrameIndex;
if (mCurrentFrameIsFinishedDecoding && !mDoneDecoding) {
// If we have the next frame in the sequence set the timer callback from it
GetFrameAt(mCurrentAnimationFrameIndex+1, getter_AddRefs(nextFrame));
if (nextFrame) {
// Go to next frame in sequence
nextFrame->GetTimeout(&timeout);
mCurrentAnimationFrameIndex++;
} else {
// twiddle our thumbs
GetFrameAt(mCurrentAnimationFrameIndex, getter_AddRefs(nextFrame));
if(!nextFrame) return;
nextFrame->GetTimeout(&timeout);
}
} else if (mDoneDecoding){
if ((numFrames-1) == mCurrentAnimationFrameIndex) {
// Go back to the beginning of the animation
GetFrameAt(0, getter_AddRefs(nextFrame));
if(!nextFrame) return;
mCurrentAnimationFrameIndex = 0;
nextFrame->GetTimeout(&timeout);
} else {
mCurrentAnimationFrameIndex++;
GetFrameAt(mCurrentAnimationFrameIndex, getter_AddRefs(nextFrame));
if(!nextFrame) return;
nextFrame->GetTimeout(&timeout);
}
} else {
GetFrameAt(mCurrentAnimationFrameIndex, getter_AddRefs(nextFrame));
if(!nextFrame) return;
}
if(timeout >= 0)
mTimer->SetDelay(timeout);
else
this->StopAnimation();
nsRect dirtyRect;
// update the composited frame
if(mCompositingFrame && (previousAnimationFrameIndex != mCurrentAnimationFrameIndex)) {
nsCOMPtr<gfxIImageFrame> frameToUse;
DoComposite(getter_AddRefs(frameToUse), &dirtyRect, previousAnimationFrameIndex, mCurrentAnimationFrameIndex);
// do notification to FE to draw this frame, but hand it the compositing frame
observer->FrameChanged(this, nsnull, mCompositingFrame, &dirtyRect);
}
else {
nextFrame->GetRect(dirtyRect);
// do notification to FE to draw this frame
observer->FrameChanged(this, nsnull, nextFrame, &dirtyRect);
}
}
//******************************************************************************
// DoComposite gets called when the timer for animation get fired and we have to
// update the composited frame of the animation.
void imgContainer::DoComposite(gfxIImageFrame** aFrameToUse, nsRect* aDirtyRect, PRInt32 aPrevFrame, PRInt32 aNextFrame)
{
NS_ASSERTION(aDirtyRect, "DoComposite aDirtyRect is null");
NS_ASSERTION(mCompositingFrame, "DoComposite mCompositingFrame is null");
*aFrameToUse = nsnull;
PRUint32 numFrames;
this->GetNumFrames(&numFrames);
PRInt32 nextFrameIndex = aNextFrame;
PRInt32 prevFrameIndex = aPrevFrame;
if(nextFrameIndex >= numFrames) nextFrameIndex = numFrames-1;
if(prevFrameIndex >= numFrames) prevFrameIndex = numFrames-1;
nsCOMPtr<gfxIImageFrame> prevFrame;
this->GetFrameAt(prevFrameIndex, getter_AddRefs(prevFrame));
PRInt32 prevFrameDisposalMethod;
prevFrame->GetFrameDisposalMethod(&prevFrameDisposalMethod);
nsCOMPtr<gfxIImageFrame> nextFrame;
this->GetFrameAt(nextFrameIndex, getter_AddRefs(nextFrame));
PRInt32 x;
PRInt32 y;
PRInt32 width;
PRInt32 height;
nextFrame->GetX(&x);
nextFrame->GetY(&y);
nextFrame->GetWidth(&width);
nextFrame->GetHeight(&height);
switch (prevFrameDisposalMethod) {
default:
case 0: // DISPOSE_NOT_SPECIFIED
case 1: // DISPOSE_KEEP Leave previous frame in the framebuffer
mCompositingFrame->QueryInterface(NS_GET_IID(gfxIImageFrame), (void**)aFrameToUse); // addrefs again
//XXX blit into the composite frame too!!!
nextFrame->DrawTo(mCompositingFrame, x, y, width, height);
// we're drawing only the updated frame
(*aDirtyRect).x = x;
(*aDirtyRect).y = y;
(*aDirtyRect).width = width;
(*aDirtyRect).height = height;
break;
case 2: // DISPOSE_OVERWRITE_BGCOLOR Overwrite with background color
//XXX overwrite mCompositeFrame with background color
gfx_color backgroundColor;
nextFrame->GetBackgroundColor(&backgroundColor);
//XXX Do background color overwrite of mCompositeFrame here
// blit next frame into this clean slate
nextFrame->DrawTo(mCompositingFrame, x, y, width, height);
// In this case we need to blit the whole composite frame
(*aDirtyRect).x = 0;
(*aDirtyRect).y = 0;
(*aDirtyRect).width = mSize.width;
(*aDirtyRect).height = mSize.height;
mCompositingFrame->QueryInterface(NS_GET_IID(gfxIImageFrame), (void**)aFrameToUse); // addrefs again
break;
case 4: // DISPOSE_OVERWRITE_PREVIOUS Save-under
//XXX Reblit previous composite into frame buffer
//
(*aDirtyRect).x = 0;
(*aDirtyRect).y = 0;
(*aDirtyRect).width = mSize.width;
(*aDirtyRect).height = mSize.height;
break;
}
// Get the next frame's disposal method, if it is it DISPOSE_OVER, save off
// this mCompositeFrame for reblitting when this timer gets fired again and
// we
PRInt32 nextFrameDisposalMethod;
nextFrame->GetFrameDisposalMethod(&nextFrameDisposalMethod);
//XXX if(nextFrameDisposalMethod == 4)
// blit mPreviousCompositeFrame with this frame
}
//******************************************************************************
/* void onStartDecode (in imgIRequest aRequest, in nsISupports cx); */
NS_IMETHODIMP imgContainer::OnStartDecode(imgIRequest *aRequest, nsISupports *cx)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
//******************************************************************************
/* void onStartContainer (in imgIRequest aRequest, in nsISupports cx, in imgIContainer aContainer); */
NS_IMETHODIMP imgContainer::OnStartContainer(imgIRequest *aRequest, nsISupports *cx, imgIContainer *aContainer)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
//******************************************************************************
/* void onStartFrame (in imgIRequest aRequest, in nsISupports cx, in gfxIImageFrame aFrame); */
NS_IMETHODIMP imgContainer::OnStartFrame(imgIRequest *aRequest, nsISupports *cx, gfxIImageFrame *aFrame)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
//******************************************************************************
/* [noscript] void onDataAvailable (in imgIRequest aRequest, in nsISupports cx, in gfxIImageFrame aFrame, [const] in nsRect aRect); */
NS_IMETHODIMP imgContainer::OnDataAvailable(imgIRequest *aRequest, nsISupports *cx, gfxIImageFrame *aFrame, const nsRect * aRect)
{
if(mCompositingFrame && !mCurrentDecodingFrameIndex) {
// Update the composite frame
PRInt32 x;
aFrame->GetX(&x);
aFrame->DrawTo(mCompositingFrame, x, aRect->y, aRect->width, aRect->height);
}
return NS_OK;
}
//******************************************************************************
/* void onStopFrame (in imgIRequest aRequest, in nsISupports cx, in gfxIImageFrame aFrame); */
NS_IMETHODIMP imgContainer::OnStopFrame(imgIRequest *aRequest, nsISupports *cx, gfxIImageFrame *aFrame)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
//******************************************************************************
/* void onStopContainer (in imgIRequest aRequest, in nsISupports cx, in imgIContainer aContainer); */
NS_IMETHODIMP imgContainer::OnStopContainer(imgIRequest *aRequest, nsISupports *cx, imgIContainer *aContainer)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
//******************************************************************************
/* void onStopDecode (in imgIRequest aRequest, in nsISupports cx, in nsresult status, in wstring statusArg); */
NS_IMETHODIMP imgContainer::OnStopDecode(imgIRequest *aRequest, nsISupports *cx, nsresult status, const PRUnichar *statusArg)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
//******************************************************************************
/* [noscript] void frameChanged (in imgIContainer aContainer, in nsISupports aCX, in gfxIImageFrame aFrame, in nsRect aDirtyRect); */
NS_IMETHODIMP imgContainer::FrameChanged(imgIContainer *aContainer, nsISupports *aCX, gfxIImageFrame *aFrame, nsRect * aDirtyRect)
{
return NS_ERROR_NOT_IMPLEMENTED;
}

View File

@@ -1,95 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
* Chris Saari <saari@netscape.com>
*/
#ifndef __imgContainer_h__
#define __imgContainer_h__
#include "imgIContainer.h"
#include "imgIContainerObserver.h"
#include "nsSize.h"
#include "nsSupportsArray.h"
#include "nsCOMPtr.h"
#include "nsITimer.h"
#include "nsITimerCallback.h"
#include "imgIDecoderObserver.h"
#include "gfxIImageFrame.h"
#include "nsWeakReference.h"
#define NS_IMGCONTAINER_CID \
{ /* 5e04ec5e-1dd2-11b2-8fda-c4db5fb666e0 */ \
0x5e04ec5e, \
0x1dd2, \
0x11b2, \
{0x8f, 0xda, 0xc4, 0xdb, 0x5f, 0xb6, 0x66, 0xe0} \
}
class imgContainer : public imgIContainer,
public nsITimerCallback,
public imgIDecoderObserver
{
public:
NS_DECL_ISUPPORTS
NS_DECL_IMGICONTAINER
NS_DECL_IMGIDECODEROBSERVER
NS_DECL_IMGICONTAINEROBSERVER
NS_IMETHOD_(void) Notify(nsITimer *timer);
imgContainer();
virtual ~imgContainer();
private:
/* additional members */
nsSupportsArray mFrames;
nsSize mSize;
PRUint32 mCurrentDecodingFrameIndex; // 0 to numFrames-1
PRUint32 mCurrentAnimationFrameIndex; // 0 to numFrames-1
PRBool mCurrentFrameIsFinishedDecoding;
PRBool mDoneDecoding;
PRBool mAnimating;
nsWeakPtr mObserver;
// GIF specific bits
nsCOMPtr<nsITimer> mTimer;
// GIF animations will use the mCompositingFrame to composite images
// and just hand this back to the caller when it is time to draw the frame.
nsCOMPtr<gfxIImageFrame> mCompositingFrame;
// Private function for doing the frame compositing of animations and in cases
// where there is a backgound color and single frame placed withing a larger
// logical screen size. Smart GIF compressors may do this to save space.
void DoComposite(gfxIImageFrame** aFrameToUse, nsRect* aDirtyRect,
PRInt32 aPrevFrame, PRInt32 aNextFrame);
};
#endif /* __imgContainer_h__ */

View File

@@ -21,26 +21,24 @@
* Stuart Parmenter <pavlov@netscape.com>
*/
#include "imgLoader.h"
#include "imgIRequest.h"
#include "nsIServiceManager.h"
#include "nsCOMPtr.h"
#include "nsIChannel.h"
#include "nsIHttpChannel.h"
#include "nsIIOService.h"
#include "nsILoadGroup.h"
#include "nsIProxyObjectManager.h"
#include "nsIServiceManager.h"
#include "nsIStreamListener.h"
#include "nsIURI.h"
#include "imgRequest.h"
#include "imgRequestProxy.h"
#include "ImageCache.h"
#include "nsXPIDLString.h"
#include "nsCOMPtr.h"
#include "imgCache.h"
#include "imgRequest.h"
#include "imgRequestProxy.h"
#include "ImageLogging.h"
@@ -73,30 +71,27 @@ NS_IMETHODIMP imgLoader::LoadImage(nsIURI *aURI, nsILoadGroup *aLoadGroup, imgID
imgRequest *request = nsnull;
#ifdef MOZ_NEW_CACHE
nsCOMPtr<nsICacheEntryDescriptor> entry;
ImageCache::Get(aURI, &request, getter_AddRefs(entry)); // addrefs request
imgCache::Get(aURI, &request, getter_AddRefs(entry)); // addrefs request
if (request && entry && aLoadGroup) {
/* this isn't exactly what I want here. This code will re-doom every cache hit in a document while
it is force reloading. So for multiple copies of an image on a page, when you force reload, this
will cause you to get seperate loads for each copy of the image... this sucks.
*/
/* this isn't exactly what I want here. This code will re-doom every
cache hit in a document while it is force reloading. So for multiple
copies of an image on a page, when you force reload, this will cause
you to get seperate loads for each copy of the image... this sucks.
*/
PRUint32 flags = 0;
PRBool doomRequest = PR_FALSE;
aLoadGroup->GetDefaultLoadAttributes(&flags);
if (flags & nsIChannel::FORCE_RELOAD)
aLoadGroup->GetLoadFlags(&flags);
if (flags & nsIRequest::LOAD_BYPASS_CACHE)
doomRequest = PR_TRUE;
else {
nsCOMPtr<nsIRequest> r;
aLoadGroup->GetDefaultLoadRequest(getter_AddRefs(r));
if (r) {
nsCOMPtr<nsIChannel> c(do_QueryInterface(r));
if (c) {
c->GetLoadAttributes(&flags);
if (flags & nsIChannel::FORCE_RELOAD)
doomRequest = PR_TRUE;
}
r->GetLoadFlags(&flags);
if (flags & nsIRequest::LOAD_BYPASS_CACHE)
doomRequest = PR_TRUE;
}
}
@@ -107,7 +102,6 @@ NS_IMETHODIMP imgLoader::LoadImage(nsIURI *aURI, nsILoadGroup *aLoadGroup, imgID
request = nsnull;
}
}
#endif
if (!request) {
/* no request from the cache. do a new load */
@@ -122,8 +116,8 @@ NS_IMETHODIMP imgLoader::LoadImage(nsIURI *aURI, nsILoadGroup *aLoadGroup, imgID
if (aLoadGroup) {
PRUint32 flags;
aLoadGroup->GetDefaultLoadAttributes(&flags);
newChannel->SetLoadAttributes(flags);
aLoadGroup->GetLoadFlags(&flags);
newChannel->SetLoadFlags(flags);
}
NS_NEWXPCOM(request, imgRequest);
@@ -135,10 +129,8 @@ NS_IMETHODIMP imgLoader::LoadImage(nsIURI *aURI, nsILoadGroup *aLoadGroup, imgID
("[this=%p] imgLoader::LoadImage -- Created new imgRequest [request=%p]\n", this, request));
#ifdef MOZ_NEW_CACHE
ImageCache::Put(aURI, request, getter_AddRefs(entry));
#endif
imgCache::Put(aURI, request, getter_AddRefs(entry));
#ifdef MOZ_NEW_CACHE
request->Init(newChannel, entry);
#else
request->Init(newChannel, nsnull);
@@ -147,36 +139,76 @@ NS_IMETHODIMP imgLoader::LoadImage(nsIURI *aURI, nsILoadGroup *aLoadGroup, imgID
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgLoader::LoadImage -- Calling channel->AsyncOpen()\n", this));
// XXX are we calling this too early?
newChannel->AsyncOpen(NS_STATIC_CAST(nsIStreamListener *, request), nsnull);
// create the proxy listener
ProxyListener *pl = new ProxyListener(NS_STATIC_CAST(nsIStreamListener *, request));
if (!pl) {
NS_RELEASE(request);
return NS_ERROR_OUT_OF_MEMORY;
}
NS_ADDREF(pl);
// set the referrer if this is an HTTP request
nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(newChannel));
if (aLoadGroup && httpChannel) {
nsresult rv;
// Get the defloadRequest from the loadgroup
nsCOMPtr<nsIRequest> defLoadRequest;
rv = aLoadGroup->GetDefaultLoadRequest(getter_AddRefs(defLoadRequest));
if (NS_SUCCEEDED(rv) && defLoadRequest) {
nsCOMPtr<nsIChannel> reqChannel(do_QueryInterface(defLoadRequest));
if (reqChannel) {
// Get the referrer from the loadchannel
nsCOMPtr<nsIURI> referrer;
rv = reqChannel->GetURI(getter_AddRefs(referrer));
if (NS_SUCCEEDED(rv)) {
// Set the referrer
httpChannel->SetReferrer(referrer, nsIHttpChannel::REFERRER_INLINES);
}
}
}
}
/* XXX Are we calling AsyncOpen() too early? Is it possible for
AsyncOpen to result in an OnStartRequest to the channel before
we call CreateNewProxyForRequest() ?
*/
nsresult asyncOpenResult = newChannel->AsyncOpen(NS_STATIC_CAST(nsIStreamListener *, pl), nsnull);
NS_RELEASE(pl);
if (NS_FAILED(asyncOpenResult)) {
/* If AsyncOpen fails, then we want to hand back a request proxy
object that has a canceled load.
*/
LOG_MSG(gImgLog, "imgLoader::LoadImage", "async open failed.");
nsresult rv = CreateNewProxyForRequest(request, aLoadGroup, aObserver,
cx, _retval);
if (NS_SUCCEEDED(rv)) {
request->OnStartRequest(newChannel, nsnull);
request->OnStopRequest(newChannel, nsnull, NS_BINDING_ABORTED);
}
NS_RELEASE(request);
return asyncOpenResult;
}
} else {
/* request found in cache. use it */
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgLoader::LoadImage |cache hit| [request=%p]\n",
this, request));
LOG_MSG_WITH_PARAM(gImgLog, "imgLoader::LoadImage |cache hit|", "request", request);
}
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgLoader::LoadImage -- creating proxy request.\n", this));
LOG_MSG(gImgLog, "imgLoader::LoadImage", "creating proxy request.");
imgRequestProxy *proxyRequest;
NS_NEWXPCOM(proxyRequest, imgRequestProxy);
if (!proxyRequest) return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(proxyRequest);
// init adds itself to imgRequest's list of observers
proxyRequest->Init(request, aLoadGroup, aObserver, cx);
nsresult rv = CreateNewProxyForRequest(request, aLoadGroup, aObserver, cx, _retval);
NS_RELEASE(request);
*_retval = NS_STATIC_CAST(imgIRequest*, proxyRequest);
NS_ADDREF(*_retval);
NS_RELEASE(proxyRequest);
return NS_OK;
return rv;
}
/* imgIRequest loadImageWithChannel(in nsIChannel, in imgIDecoderObserver aObserver, in nsISupports cx, out nsIStreamListener); */
@@ -189,16 +221,15 @@ NS_IMETHODIMP imgLoader::LoadImageWithChannel(nsIChannel *channel, imgIDecoderOb
nsCOMPtr<nsIURI> uri;
channel->GetOriginalURI(getter_AddRefs(uri));
#ifdef MOZ_NEW_CACHE
nsCOMPtr<nsICacheEntryDescriptor> entry;
ImageCache::Get(uri, &request, getter_AddRefs(entry)); // addrefs request
#endif
imgCache::Get(uri, &request, getter_AddRefs(entry)); // addrefs request
if (request) {
// we have this in our cache already.. cancel the current (document) load
// XXX
// if *listener is null when we return here, the caller should probably cancel
// the channel instead of us doing it here.
/* XXX If |*listener| is null when we return here, the caller should
probably cancel the channel instead of us doing it here.
*/
channel->Cancel(NS_BINDING_ABORTED); // this should fire an OnStopRequest
*listener = nsnull; // give them back a null nsIStreamListener
@@ -208,20 +239,48 @@ NS_IMETHODIMP imgLoader::LoadImageWithChannel(nsIChannel *channel, imgIDecoderOb
NS_ADDREF(request);
#ifdef MOZ_NEW_CACHE
ImageCache::Put(uri, request, getter_AddRefs(entry));
#endif
imgCache::Put(uri, request, getter_AddRefs(entry));
#ifdef MOZ_NEW_CACHE
request->Init(channel, entry);
#else
request->Init(channel, nsnull);
#endif
*listener = NS_STATIC_CAST(nsIStreamListener*, request);
NS_IF_ADDREF(*listener);
ProxyListener *pl = new ProxyListener(NS_STATIC_CAST(nsIStreamListener *, request));
if (!pl) {
NS_RELEASE(request);
return NS_ERROR_OUT_OF_MEMORY;
}
NS_ADDREF(pl);
*listener = NS_STATIC_CAST(nsIStreamListener*, pl);
NS_ADDREF(*listener);
NS_RELEASE(pl);
}
nsCOMPtr<nsILoadGroup> loadGroup;
channel->GetLoadGroup(getter_AddRefs(loadGroup));
nsresult rv = CreateNewProxyForRequest(request, loadGroup, aObserver, cx, _retval);
NS_RELEASE(request);
return rv;
}
nsresult
imgLoader::CreateNewProxyForRequest(imgRequest *aRequest, nsILoadGroup *aLoadGroup,
imgIDecoderObserver *aObserver, nsISupports *cx,
imgIRequest **_retval)
{
LOG_SCOPE_WITH_PARAM(gImgLog, "imgLoader::CreateNewProxyForRequest", "imgRequest", aRequest);
/* XXX If we move decoding onto seperate threads, we should save off the
calling thread here and pass it off to |proxyRequest| so that it call
proxy calls to |aObserver|.
*/
imgRequestProxy *proxyRequest;
NS_NEWXPCOM(proxyRequest, imgRequestProxy);
if (!proxyRequest) return NS_ERROR_OUT_OF_MEMORY;
@@ -229,9 +288,11 @@ NS_IMETHODIMP imgLoader::LoadImageWithChannel(nsIChannel *channel, imgIDecoderOb
NS_ADDREF(proxyRequest);
// init adds itself to imgRequest's list of observers
proxyRequest->Init(request, nsnull, aObserver, cx);
NS_RELEASE(request);
nsresult rv = proxyRequest->Init(aRequest, aLoadGroup, aObserver, cx);
if (NS_FAILED(rv)) {
NS_RELEASE(proxyRequest);
return rv;
}
*_retval = NS_STATIC_CAST(imgIRequest*, proxyRequest);
NS_ADDREF(*_retval);
@@ -240,3 +301,88 @@ NS_IMETHODIMP imgLoader::LoadImageWithChannel(nsIChannel *channel, imgIDecoderOb
return NS_OK;
}
/**
* proxy stream listener class used to handle multipart/x-mixed-replace
*/
#include "nsIRequest.h"
#include "nsIStreamConverterService.h"
#include "nsXPIDLString.h"
NS_IMPL_ISUPPORTS2(ProxyListener, nsIStreamListener, nsIRequestObserver)
ProxyListener::ProxyListener(nsIStreamListener *dest) :
mDestListener(dest)
{
NS_INIT_ISUPPORTS();
/* member initializers and constructor code */
}
ProxyListener::~ProxyListener()
{
/* destructor code */
}
/** nsIRequestObserver methods **/
/* void onStartRequest (in nsIRequest request, in nsISupports ctxt); */
NS_IMETHODIMP ProxyListener::OnStartRequest(nsIRequest *aRequest, nsISupports *ctxt)
{
if (!mDestListener)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIChannel> channel(do_QueryInterface(aRequest));
if (channel) {
nsXPIDLCString contentType;
nsresult rv = channel->GetContentType(getter_Copies(contentType));
if (contentType.get()) {
/* If multipart/x-mixed-replace content, we'll insert a MIME decoder
in the pipeline to handle the content and pass it along to our
original listener.
*/
if (NS_LITERAL_CSTRING("multipart/x-mixed-replace").Equals(contentType)) {
nsCOMPtr<nsIStreamConverterService> convServ(do_GetService("@mozilla.org/streamConverters;1", &rv));
if (NS_SUCCEEDED(rv)) {
nsCOMPtr<nsIStreamListener> toListener(mDestListener);
nsCOMPtr<nsIStreamListener> fromListener;
rv = convServ->AsyncConvertData(NS_LITERAL_STRING("multipart/x-mixed-replace").get(),
NS_LITERAL_STRING("*/*").get(),
toListener,
nsnull,
getter_AddRefs(fromListener));
if (NS_SUCCEEDED(rv))
mDestListener = fromListener;
}
}
}
}
return mDestListener->OnStartRequest(aRequest, ctxt);
}
/* void onStopRequest (in nsIRequest request, in nsISupports ctxt, in nsresult status); */
NS_IMETHODIMP ProxyListener::OnStopRequest(nsIRequest *aRequest, nsISupports *ctxt, nsresult status)
{
if (!mDestListener)
return NS_ERROR_FAILURE;
return mDestListener->OnStopRequest(aRequest, ctxt, status);
}
/** nsIStreamListener methods **/
/* void onDataAvailable (in nsIRequest request, in nsISupports ctxt, in nsIInputStream inStr, in unsigned long sourceOffset, in unsigned long count); */
NS_IMETHODIMP ProxyListener::OnDataAvailable(nsIRequest *aRequest, nsISupports *ctxt, nsIInputStream *inStr, PRUint32 sourceOffset, PRUint32 count)
{
if (!mDestListener)
return NS_ERROR_FAILURE;
return mDestListener->OnDataAvailable(aRequest, ctxt, inStr, sourceOffset, count);
}

View File

@@ -1,821 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation.
* All Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
*/
#include "imgRequest.h"
#include "nsIAtom.h"
#include "nsIChannel.h"
#include "nsILoadGroup.h"
#include "nsIHTTPChannel.h"
#include "nsIInputStream.h"
#include "imgILoader.h"
#include "nsIComponentManager.h"
#include "nsIComponentManager.h"
#include "nsIServiceManager.h"
#include "nsString.h"
#include "nsXPIDLString.h"
#include "gfxIImageFrame.h"
#ifdef MOZ_NEW_CACHE
#include "nsICachingChannel.h"
#endif
#include "ImageCache.h"
#include "ImageLogging.h"
#if defined(PR_LOGGING)
PRLogModuleInfo *gImgLog = PR_NewLogModule("imgRequest");
#endif
NS_IMPL_ISUPPORTS7(imgRequest, imgIRequest, nsIRequest,
imgIDecoderObserver, imgIContainerObserver,
nsIStreamListener, nsIStreamObserver,
nsISupportsWeakReference)
imgRequest::imgRequest() :
mObservers(0), mLoading(PR_FALSE), mProcessing(PR_FALSE), mStatus(imgIRequest::STATUS_NONE), mState(0)
{
NS_INIT_ISUPPORTS();
/* member initializers and constructor code */
}
imgRequest::~imgRequest()
{
/* destructor code */
}
nsresult imgRequest::Init(nsIChannel *aChannel, nsICacheEntryDescriptor *aCacheEntry)
{
// XXX we should save off the thread we are getting called on here so that we can proxy all calls to mDecoder to it.
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgRequest::Init\n", this));
NS_ASSERTION(!mImage, "imgRequest::Init -- Multiple calls to init");
NS_ASSERTION(aChannel, "imgRequest::Init -- No channel");
mChannel = aChannel;
#ifdef MOZ_NEW_CACHE
mCacheEntry = aCacheEntry;
#endif
// XXX do not init the image here. this has to be done from the image decoder.
mImage = do_CreateInstance("@mozilla.org/image/container;1");
return NS_OK;
}
nsresult imgRequest::AddObserver(imgIDecoderObserver *observer)
{
LOG_SCOPE_WITH_PARAM(gImgLog, "imgRequest::AddObserver", "observer", observer);
mObservers.AppendElement(NS_STATIC_CAST(void*, observer));
// OnStartDecode
if (mState & onStartDecode)
observer->OnStartDecode(nsnull, nsnull);
// OnStartContainer
if (mState & onStartContainer)
observer->OnStartContainer(nsnull, nsnull, mImage);
// Send frame messages (OnStartFrame, OnDataAvailable, OnStopFrame)
PRUint32 nframes;
mImage->GetNumFrames(&nframes);
if (nframes > 0) {
nsCOMPtr<gfxIImageFrame> frame;
// Is this a single frame image?
if (nframes == 1) {
// Get the first frame
mImage->GetFrameAt(0, getter_AddRefs(frame));
NS_ASSERTION(frame, "GetFrameAt gave back a null frame!");
} else if (nframes > 1) {
/* multiple frames, we'll use the current one */
mImage->GetCurrentFrame(getter_AddRefs(frame));
NS_ASSERTION(frame, "GetCurrentFrame gave back a null frame!");
}
// OnStartFrame
observer->OnStartFrame(nsnull, nsnull, frame);
if (!(mState & onStopContainer)) {
// OnDataAvailable
nsRect r;
frame->GetRect(r); // XXX we shouldn't send the whole rect here
observer->OnDataAvailable(nsnull, nsnull, frame, &r);
} else {
// OnDataAvailable
nsRect r;
frame->GetRect(r); // We're done loading this image, send the the whole rect
observer->OnDataAvailable(nsnull, nsnull, frame, &r);
// OnStopFrame
observer->OnStopFrame(nsnull, nsnull, frame);
}
}
// OnStopContainer
if (mState & onStopContainer)
observer->OnStopContainer(nsnull, nsnull, mImage);
nsresult status;
if (mStatus & imgIRequest::STATUS_LOAD_COMPLETE)
status = NS_IMAGELIB_SUCCESS_LOAD_FINISHED;
else if (mStatus & imgIRequest::STATUS_ERROR)
status = NS_IMAGELIB_ERROR_FAILURE;
// OnStopDecode
if (mState & onStopDecode)
observer->OnStopDecode(nsnull, nsnull, status, nsnull);
if (mImage && (mObservers.Count() == 1)) {
PRUint32 nframes;
mImage->GetNumFrames(&nframes);
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgRequest::AddObserver -- starting animation\n", this));
mImage->StartAnimation();
}
if (mState & onStopRequest) {
nsCOMPtr<nsIStreamObserver> ob(do_QueryInterface(observer));
PR_ASSERT(observer);
ob->OnStopRequest(nsnull, nsnull, status, nsnull);
}
return NS_OK;
}
nsresult imgRequest::RemoveObserver(imgIDecoderObserver *observer, nsresult status)
{
LOG_SCOPE_WITH_PARAM(gImgLog, "imgRequest::RemoveObserver", "observer", observer);
mObservers.RemoveElement(NS_STATIC_CAST(void*, observer));
if (mObservers.Count() == 0) {
if (mImage) {
PRUint32 nframes;
mImage->GetNumFrames(&nframes);
if (nframes > 1) {
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgRequest::RemoveObserver -- stopping animation\n", this));
mImage->StopAnimation();
}
}
if (mChannel && mLoading) {
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgRequest::RemoveObserver -- load in progress. canceling\n", this));
this->RemoveFromCache();
this->Cancel(NS_BINDING_ABORTED);
if (!(mState & onStopDecode)) {
// make sure that observer gets an onStopRequest message sent to it
observer->OnStopDecode(nsnull, nsnull, NS_IMAGELIB_ERROR_FAILURE, nsnull);
}
if (!(mState & onStopRequest)) {
// make sure that observer gets an onStopRequest message sent to it
nsCOMPtr<nsIStreamObserver> ob(do_QueryInterface(observer));
PR_ASSERT(observer);
ob->OnStopRequest(nsnull, nsnull, NS_BINDING_ABORTED, nsnull);
}
}
}
return NS_OK;
}
PRBool imgRequest::RemoveFromCache()
{
LOG_SCOPE(gImgLog, "imgRequest::RemoveFromCache");
#ifdef MOZ_NEW_CACHE
if (mCacheEntry) {
mCacheEntry->Doom();
mCacheEntry = nsnull;
} else {
NS_WARNING("imgRequest::RemoveFromCache -- no entry!");
}
#endif
return PR_TRUE;
}
/** nsIRequest / imgIRequest methods **/
/* readonly attribute wstring name; */
NS_IMETHODIMP imgRequest::GetName(PRUnichar * *aName)
{
NS_NOTYETIMPLEMENTED("imgRequest::GetName");
return NS_ERROR_NOT_IMPLEMENTED;
}
/* boolean isPending (); */
NS_IMETHODIMP imgRequest::IsPending(PRBool *_retval)
{
NS_NOTYETIMPLEMENTED("imgRequest::IsPending");
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute nsresult status; */
NS_IMETHODIMP imgRequest::GetStatus(nsresult *aStatus)
{
NS_NOTYETIMPLEMENTED("imgRequest::GetStatus");
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void cancel (in nsresult status); */
NS_IMETHODIMP imgRequest::Cancel(nsresult status)
{
LOG_SCOPE(gImgLog, "imgRequest::Cancel");
if (mImage) {
PRUint32 nframes;
mImage->GetNumFrames(&nframes);
if (nframes > 1) {
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgRequest::RemoveObserver -- stopping animation\n", this));
mImage->StopAnimation();
}
}
if (mChannel && mLoading)
mChannel->Cancel(NS_BINDING_ABORTED); // should prolly use status here
return NS_OK;
}
/* void suspend (); */
NS_IMETHODIMP imgRequest::Suspend()
{
NS_NOTYETIMPLEMENTED("imgRequest::Suspend");
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void resume (); */
NS_IMETHODIMP imgRequest::Resume()
{
NS_NOTYETIMPLEMENTED("imgRequest::Resume");
return NS_ERROR_NOT_IMPLEMENTED;
}
/** imgIRequest methods **/
/* readonly attribute imgIContainer image; */
NS_IMETHODIMP imgRequest::GetImage(imgIContainer * *aImage)
{
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgRequest::GetImage\n", this));
*aImage = mImage;
NS_IF_ADDREF(*aImage);
return NS_OK;
}
/* readonly attribute unsigned long imageStatus; */
NS_IMETHODIMP imgRequest::GetImageStatus(PRUint32 *aStatus)
{
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgRequest::GetImageStatus\n", this));
*aStatus = mStatus;
return NS_OK;
}
/* readonly attribute nsIURI URI; */
NS_IMETHODIMP imgRequest::GetURI(nsIURI **aURI)
{
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgRequest::GetURI\n", this));
if (mChannel)
return mChannel->GetOriginalURI(aURI);
else if (mURI) {
*aURI = mURI;
NS_ADDREF(*aURI);
return NS_OK;
}
return NS_ERROR_FAILURE;
}
/* readonly attribute imgIDecoderObserver decoderObserver; */
NS_IMETHODIMP imgRequest::GetDecoderObserver(imgIDecoderObserver **aDecoderObserver)
{
return NS_ERROR_FAILURE;
}
/** imgIContainerObserver methods **/
/* [noscript] void frameChanged (in imgIContainer container, in nsISupports cx, in gfxIImageFrame newframe, in nsRect dirtyRect); */
NS_IMETHODIMP imgRequest::FrameChanged(imgIContainer *container, nsISupports *cx, gfxIImageFrame *newframe, nsRect * dirtyRect)
{
LOG_SCOPE(gImgLog, "imgRequest::FrameChanged");
PRInt32 i = -1;
PRInt32 count = mObservers.Count();
while (++i < count) {
imgIDecoderObserver *ob = NS_STATIC_CAST(imgIDecoderObserver*, mObservers[i]);
if (ob) ob->FrameChanged(container, cx, newframe, dirtyRect);
}
return NS_OK;
}
/** imgIDecoderObserver methods **/
/* void onStartDecode (in imgIRequest request, in nsISupports cx); */
NS_IMETHODIMP imgRequest::OnStartDecode(imgIRequest *request, nsISupports *cx)
{
LOG_SCOPE(gImgLog, "imgRequest::OnStartDecode");
mState |= onStartDecode;
PRInt32 i = -1;
PRInt32 count = mObservers.Count();
while (++i < count) {
imgIDecoderObserver *ob = NS_STATIC_CAST(imgIDecoderObserver*, mObservers[i]);
if (ob) ob->OnStartDecode(request, cx);
}
return NS_OK;
}
/* void onStartContainer (in imgIRequest request, in nsISupports cx, in imgIContainer image); */
NS_IMETHODIMP imgRequest::OnStartContainer(imgIRequest *request, nsISupports *cx, imgIContainer *image)
{
LOG_SCOPE(gImgLog, "imgRequest::OnStartContainer");
mState |= onStartContainer;
mStatus |= imgIRequest::STATUS_SIZE_AVAILABLE;
PRInt32 i = -1;
PRInt32 count = mObservers.Count();
while (++i < count) {
imgIDecoderObserver *ob = NS_STATIC_CAST(imgIDecoderObserver*, mObservers[i]);
if (ob) ob->OnStartContainer(request, cx, image);
}
return NS_OK;
}
/* void onStartFrame (in imgIRequest request, in nsISupports cx, in gfxIImageFrame frame); */
NS_IMETHODIMP imgRequest::OnStartFrame(imgIRequest *request, nsISupports *cx, gfxIImageFrame *frame)
{
LOG_SCOPE(gImgLog, "imgRequest::OnStartFrame");
PRInt32 i = -1;
PRInt32 count = mObservers.Count();
while (++i < count) {
imgIDecoderObserver *ob = NS_STATIC_CAST(imgIDecoderObserver*, mObservers[i]);
if (ob) ob->OnStartFrame(request, cx, frame);
}
return NS_OK;
}
/* [noscript] void onDataAvailable (in imgIRequest request, in nsISupports cx, in gfxIImageFrame frame, [const] in nsRect rect); */
NS_IMETHODIMP imgRequest::OnDataAvailable(imgIRequest *request, nsISupports *cx, gfxIImageFrame *frame, const nsRect * rect)
{
LOG_SCOPE(gImgLog, "imgRequest::OnDataAvailable");
nsCOMPtr<imgIDecoderObserver> container = do_QueryInterface(mImage);
container->OnDataAvailable(request, cx, frame, rect);
PRInt32 i = -1;
PRInt32 count = mObservers.Count();
while (++i < count) {
imgIDecoderObserver *ob = NS_STATIC_CAST(imgIDecoderObserver*, mObservers[i]);
if (ob) ob->OnDataAvailable(request, cx, frame, rect);
}
return NS_OK;
}
/* void onStopFrame (in imgIRequest request, in nsISupports cx, in gfxIImageFrame frame); */
NS_IMETHODIMP imgRequest::OnStopFrame(imgIRequest *request, nsISupports *cx, gfxIImageFrame *frame)
{
NS_ASSERTION(frame, "imgRequest::OnStopFrame called with NULL frame");
LOG_SCOPE(gImgLog, "imgRequest::OnStopFrame");
PRInt32 i = -1;
PRInt32 count = mObservers.Count();
#ifdef MOZ_NEW_CACHE
if (mCacheEntry) {
PRUint32 cacheSize = 0;
mCacheEntry->GetDataSize(&cacheSize);
PRUint32 imageSize = 0;
PRUint32 alphaSize = 0;
frame->GetImageDataLength(&imageSize);
frame->GetAlphaDataLength(&alphaSize);
mCacheEntry->SetDataSize(cacheSize + imageSize + alphaSize);
}
#endif
while (++i < count) {
imgIDecoderObserver *ob = NS_STATIC_CAST(imgIDecoderObserver*, mObservers[i]);
if (ob) ob->OnStopFrame(request, cx, frame);
}
return NS_OK;
}
/* void onStopContainer (in imgIRequest request, in nsISupports cx, in imgIContainer image); */
NS_IMETHODIMP imgRequest::OnStopContainer(imgIRequest *request, nsISupports *cx, imgIContainer *image)
{
LOG_SCOPE(gImgLog, "imgRequest::OnStopContainer");
mState |= onStopContainer;
PRInt32 i = -1;
PRInt32 count = mObservers.Count();
while (++i < count) {
imgIDecoderObserver *ob = NS_STATIC_CAST(imgIDecoderObserver*, mObservers[i]);
if (ob) ob->OnStopContainer(request, cx, image);
}
return NS_OK;
}
/* void onStopDecode (in imgIRequest request, in nsISupports cx, in nsresult status, in wstring statusArg); */
NS_IMETHODIMP imgRequest::OnStopDecode(imgIRequest *aRequest, nsISupports *aCX, nsresult aStatus, const PRUnichar *aStatusArg)
{
LOG_SCOPE(gImgLog, "imgRequest::OnStopDecode");
if (mState & onStopDecode) {
NS_WARNING("OnStopDecode called multiple times.");
return NS_OK;
}
mState |= onStopDecode;
if (!(mStatus & imgIRequest::STATUS_ERROR) && NS_FAILED(aStatus))
mStatus |= imgIRequest::STATUS_ERROR;
PRInt32 i = -1;
PRInt32 count = mObservers.Count();
nsresult status;
if (mStatus & imgIRequest::STATUS_LOAD_COMPLETE)
status = NS_IMAGELIB_SUCCESS_LOAD_FINISHED;
else if (mStatus & imgIRequest::STATUS_ERROR)
status = NS_IMAGELIB_ERROR_FAILURE;
while (++i < count) {
imgIDecoderObserver *ob = NS_STATIC_CAST(imgIDecoderObserver*, mObservers[i]);
if (ob) ob->OnStopDecode(aRequest, aCX, status, aStatusArg);
}
return NS_OK;
}
/** nsIStreamObserver methods **/
/* void onStartRequest (in nsIRequest request, in nsISupports ctxt); */
NS_IMETHODIMP imgRequest::OnStartRequest(nsIRequest *aRequest, nsISupports *ctxt)
{
LOG_SCOPE(gImgLog, "imgRequest::OnStartRequest");
NS_ASSERTION(!mDecoder, "imgRequest::OnStartRequest -- we already have a decoder");
NS_ASSERTION(!mLoading, "imgRequest::OnStartRequest -- we are loading again?");
/* set our loading flag to true */
mLoading = PR_TRUE;
/* notify our kids */
PRInt32 i = -1;
PRInt32 count = mObservers.Count();
while (++i < count) {
imgIDecoderObserver *iob = NS_STATIC_CAST(imgIDecoderObserver*, mObservers[i]);
if (iob) {
nsCOMPtr<nsIStreamObserver> ob(do_QueryInterface(iob));
if (ob) ob->OnStartRequest(aRequest, ctxt);
}
}
/* do our real work */
nsCOMPtr<nsIChannel> chan(do_QueryInterface(aRequest));
if (!mChannel) {
PR_LOG(gImgLog, PR_LOG_ALWAYS,
(" `-> Channel already stopped or no channel!?.\n"));
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIHTTPChannel> httpChannel(do_QueryInterface(chan));
if (httpChannel) {
PRUint32 httpStatus;
httpChannel->GetResponseStatus(&httpStatus);
if (httpStatus == 404) {
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgRequest::OnStartRequest -- http status = 404. canceling.\n", this));
mStatus |= imgIRequest::STATUS_ERROR;
this->Cancel(NS_BINDING_ABORTED);
this->RemoveFromCache();
return NS_BINDING_ABORTED;
}
}
/* get the expires info */
#if defined(MOZ_NEW_CACHE)
if (mCacheEntry) {
nsCOMPtr<nsICachingChannel> cacheChannel(do_QueryInterface(chan));
if (cacheChannel) {
nsCOMPtr<nsISupports> cacheToken;
cacheChannel->GetCacheToken(getter_AddRefs(cacheToken));
if (cacheToken) {
nsCOMPtr<nsICacheEntryDescriptor> entryDesc(do_QueryInterface(cacheToken));
if (entryDesc) {
PRUint32 expiration;
/* get the expiration time from the caching channel's token */
entryDesc->GetExpirationTime(&expiration);
/* set the expiration time on our entry */
mCacheEntry->SetExpirationTime(expiration);
}
}
}
}
#endif
return NS_OK;
}
/* void onStopRequest (in nsIRequest request, in nsISupports ctxt, in nsresult status, in wstring statusArg); */
NS_IMETHODIMP imgRequest::OnStopRequest(nsIRequest *aRequest, nsISupports *ctxt, nsresult status, const PRUnichar *statusArg)
{
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgRequest::OnStopRequest\n", this));
NS_ASSERTION(mChannel && mLoading, "imgRequest::OnStopRequest -- received multiple OnStopRequest");
mState |= onStopRequest;
/* set our loading flag to false */
mLoading = PR_FALSE;
/* set our processing flag to false */
mProcessing = PR_FALSE;
#ifdef MOZ_NEW_CACHE
/* break the cycle from the cache entry. */
mCacheEntry = nsnull;
#endif
if (NS_FAILED(status)) {
mStatus |= imgIRequest::STATUS_ERROR;
this->RemoveFromCache();
this->Cancel(status); // stops animations
} else {
mStatus |= imgIRequest::STATUS_LOAD_COMPLETE;
}
mChannel->GetOriginalURI(getter_AddRefs(mURI));
mChannel = nsnull; // we no longer need the channel
if (mDecoder) {
mDecoder->Flush();
mDecoder->Close();
mDecoder = nsnull; // release the decoder so that it can rest peacefully ;)
}
/* notify the kids */
PRInt32 i = -1;
PRInt32 count = mObservers.Count();
while (++i < count) {
void *item = NS_STATIC_CAST(void *, mObservers[i]);
if (item) {
imgIDecoderObserver *iob = NS_STATIC_CAST(imgIDecoderObserver*, item);
if (iob) {
nsCOMPtr<nsIStreamObserver> ob(do_QueryInterface(iob));
if (ob) ob->OnStopRequest(aRequest, ctxt, status, statusArg);
}
}
}
// if there was an error loading the image, (mState & onStopDecode) won't be true.
// Send an onStopDecode message
if (!(mState & onStopDecode)) {
this->OnStopDecode(nsnull, nsnull, status, statusArg);
}
return NS_OK;
}
/* prototype for this defined below */
static NS_METHOD sniff_mimetype_callback(nsIInputStream* in, void* closure, const char* fromRawSegment,
PRUint32 toOffset, PRUint32 count, PRUint32 *writeCount);
/** nsIStreamListener methods **/
/* void onDataAvailable (in nsIRequest request, in nsISupports ctxt, in nsIInputStream inStr, in unsigned long sourceOffset, in unsigned long count); */
NS_IMETHODIMP imgRequest::OnDataAvailable(nsIRequest *aRequest, nsISupports *ctxt, nsIInputStream *inStr, PRUint32 sourceOffset, PRUint32 count)
{
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgRequest::OnDataAvailable\n", this));
NS_ASSERTION(mChannel, "imgRequest::OnDataAvailable -- no channel!");
if (!mProcessing) {
/* set our processing flag to true if this is the first OnDataAvailable() */
mProcessing = PR_TRUE;
/* look at the first few bytes and see if we can tell what the data is from that
* since servers tend to lie. :(
*/
PRUint32 out;
inStr->ReadSegments(sniff_mimetype_callback, this, count, &out);
#ifdef NS_DEBUG
/* NS_WARNING if the content type from the channel isn't the same if the sniffing */
#endif
if (!mContentType.get()) {
nsXPIDLCString contentType;
nsresult rv = mChannel->GetContentType(getter_Copies(contentType));
if (NS_FAILED(rv)) {
PR_LOG(gImgLog, PR_LOG_ERROR,
("[this=%p] imgRequest::OnStartRequest -- Content type unavailable from the channel\n",
this));
this->RemoveFromCache();
return NS_BINDING_ABORTED; //NS_BASE_STREAM_CLOSED;
}
mContentType = contentType;
}
#if defined(PR_LOGGING)
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgRequest::OnStartRequest -- Content type is %s\n", this, mContentType.get()));
#endif
nsCAutoString conid("@mozilla.org/image/decoder;2?type=");
conid += mContentType.get();
mDecoder = do_CreateInstance(conid);
if (!mDecoder) {
PR_LOG(gImgLog, PR_LOG_WARNING,
("[this=%p] imgRequest::OnStartRequest -- Decoder not available\n", this));
// no image decoder for this mimetype :(
this->Cancel(NS_BINDING_ABORTED);
this->RemoveFromCache();
// XXX notify the person that owns us now that wants the imgIContainer off of us?
return NS_IMAGELIB_ERROR_NO_DECODER;
}
mDecoder->Init(NS_STATIC_CAST(imgIRequest*, this));
}
if (!mDecoder) {
PR_LOG(gImgLog, PR_LOG_WARNING,
("[this=%p] imgRequest::OnDataAvailable -- no decoder\n", this));
return NS_BASE_STREAM_CLOSED;
}
PRUint32 wrote;
nsresult rv = mDecoder->WriteFrom(inStr, count, &wrote);
return NS_OK;
}
static NS_METHOD sniff_mimetype_callback(nsIInputStream* in,
void* closure,
const char* fromRawSegment,
PRUint32 toOffset,
PRUint32 count,
PRUint32 *writeCount)
{
imgRequest *request = NS_STATIC_CAST(imgRequest*, closure);
NS_ASSERTION(request, "request is null!");
if (count > 0)
request->SniffMimeType(fromRawSegment, count);
*writeCount = 0;
return NS_ERROR_FAILURE;
}
void
imgRequest::SniffMimeType(const char *buf, PRUint32 len)
{
/* Is it a GIF? */
if (len >= 4 && !nsCRT::strncmp(buf, "GIF8", 4)) {
mContentType = NS_LITERAL_CSTRING("image/gif");
return;
}
/* or a PNG? */
if (len >= 4 && ((unsigned char)buf[0]==0x89 &&
(unsigned char)buf[1]==0x50 &&
(unsigned char)buf[2]==0x4E &&
(unsigned char)buf[3]==0x47))
{
mContentType = NS_LITERAL_CSTRING("image/png");
return;
}
/* maybe a JPEG (JFIF)? */
/* JFIF files start with SOI APP0 but older files can start with SOI DQT
* so we test for SOI followed by any marker, i.e. FF D8 FF
* this will also work for SPIFF JPEG files if they appear in the future.
*
* (JFIF is 0XFF 0XD8 0XFF 0XE0 <skip 2> 0X4A 0X46 0X49 0X46 0X00)
*/
if (len >= 3 &&
((unsigned char)buf[0])==0xFF &&
((unsigned char)buf[1])==0xD8 &&
((unsigned char)buf[2])==0xFF)
{
mContentType = NS_LITERAL_CSTRING("image/jpeg");
return;
}
/* or how about ART? */
/* ART begins with JG (4A 47). Major version offset 2.
* Minor version offset 3. Offset 4 must be NULL.
*/
if (len >= 5 &&
((unsigned char) buf[0])==0x4a &&
((unsigned char) buf[1])==0x47 &&
((unsigned char) buf[4])==0x00 )
{
mContentType = NS_LITERAL_CSTRING("image/x-jg");
return;
}
/* none of the above? I give up */
}

View File

@@ -1,113 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation.
* All Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
*/
#ifndef imgRequest_h__
#define imgRequest_h__
#include "imgIRequest.h"
#include "nsIRunnable.h"
#include "nsIChannel.h"
#include "nsIURI.h"
#include "imgIContainer.h"
#include "imgIDecoder.h"
#include "imgIDecoderObserver.h"
#include "nsIStreamListener.h"
#include "nsCOMPtr.h"
#include "nsVoidArray.h"
#include "nsWeakReference.h"
#include "nsString.h"
#ifdef MOZ_NEW_CACHE
#include "nsICacheEntryDescriptor.h"
#else
class nsICacheEntryDescriptor;
#endif
#define NS_IMGREQUEST_CID \
{ /* 9f733dd6-1dd1-11b2-8cdf-effb70d1ea71 */ \
0x9f733dd6, \
0x1dd1, \
0x11b2, \
{0x8c, 0xdf, 0xef, 0xfb, 0x70, 0xd1, 0xea, 0x71} \
}
enum {
onStartDecode = 0x1,
onStartContainer = 0x2,
onStopContainer = 0x4,
onStopDecode = 0x8,
onStopRequest = 0x16
};
class imgRequest : public imgIRequest,
public imgIDecoderObserver,
public nsIStreamListener,
public nsSupportsWeakReference
{
public:
imgRequest();
virtual ~imgRequest();
/* additional members */
nsresult Init(nsIChannel *aChannel, nsICacheEntryDescriptor *aCacheEntry);
nsresult AddObserver(imgIDecoderObserver *observer);
nsresult RemoveObserver(imgIDecoderObserver *observer, nsresult status);
PRBool RemoveFromCache();
void SniffMimeType(const char *buf, PRUint32 len);
NS_DECL_ISUPPORTS
NS_DECL_IMGIREQUEST
NS_DECL_NSIREQUEST
NS_DECL_IMGIDECODEROBSERVER
NS_DECL_IMGICONTAINEROBSERVER
NS_DECL_NSISTREAMLISTENER
NS_DECL_NSISTREAMOBSERVER
private:
nsCOMPtr<nsIChannel> mChannel;
nsCOMPtr<nsIURI> mURI;
nsCOMPtr<imgIContainer> mImage;
nsCOMPtr<imgIDecoder> mDecoder;
nsVoidArray mObservers;
PRBool mLoading;
PRBool mProcessing;
PRUint32 mStatus;
PRUint32 mState;
nsCString mContentType;
#ifdef MOZ_NEW_CACHE
nsCOMPtr<nsICacheEntryDescriptor> mCacheEntry; /* we hold on to this to this so long as we have observers */
#endif
};
#endif

View File

@@ -1,316 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation.
* All Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
*/
#include "imgRequestProxy.h"
#include "nsXPIDLString.h"
#include "nsIInputStream.h"
#include "imgILoader.h"
#include "nsIComponentManager.h"
#include "nsIComponentManager.h"
#include "nsIServiceManager.h"
#include "imgRequest.h"
#include "nsString.h"
#include "DummyChannel.h"
#include "nspr.h"
#include "ImageLogging.h"
NS_IMPL_ISUPPORTS5(imgRequestProxy, imgIRequest, nsIRequest, imgIDecoderObserver, imgIContainerObserver, nsIStreamObserver)
imgRequestProxy::imgRequestProxy() :
mCanceled(PR_FALSE)
{
NS_INIT_ISUPPORTS();
/* member initializers and constructor code */
}
imgRequestProxy::~imgRequestProxy()
{
/* destructor code */
// XXX pav
// it isn't the job of the request proxy to cancel itself.
// if your object goes away and you want to cancel the load, then do it yourself.
// cancel here for now until i make this work right like the above comment
Cancel(NS_ERROR_FAILURE);
}
nsresult imgRequestProxy::Init(imgRequest *request, nsILoadGroup *aLoadGroup, imgIDecoderObserver *aObserver, nsISupports *cx)
{
PR_ASSERT(request);
LOG_SCOPE_WITH_PARAM(gImgLog, "imgRequestProxy::Init", "request", request);
mOwner = NS_STATIC_CAST(imgIRequest*, request);
mObserver = aObserver;
// XXX we should save off the thread we are getting called on here so that we can proxy all calls to mDecoder to it.
mContext = cx;
// XXX we should only create a channel, etc if the image isn't finished loading already.
nsISupports *inst = nsnull;
inst = new DummyChannel(this, aLoadGroup);
NS_ADDREF(inst);
nsresult res = inst->QueryInterface(NS_GET_IID(nsIChannel), getter_AddRefs(mDummyChannel));
NS_RELEASE(inst);
nsCOMPtr<nsILoadGroup> loadGroup;
mDummyChannel->GetLoadGroup(getter_AddRefs(loadGroup));
if (loadGroup) {
loadGroup->AddRequest(mDummyChannel, cx);
}
request->AddObserver(this);
return NS_OK;
}
/** nsIRequest / imgIRequest methods **/
/* readonly attribute wstring name; */
NS_IMETHODIMP imgRequestProxy::GetName(PRUnichar * *aName)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* boolean isPending (); */
NS_IMETHODIMP imgRequestProxy::IsPending(PRBool *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute nsresult status; */
NS_IMETHODIMP imgRequestProxy::GetStatus(nsresult *aStatus)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void cancel (in nsresult status); */
NS_IMETHODIMP imgRequestProxy::Cancel(nsresult status)
{
if (mCanceled)
return NS_ERROR_FAILURE;
LOG_SCOPE(gImgLog, "imgRequestProxy::Cancel");
mCanceled = PR_TRUE;
NS_ASSERTION(mOwner, "canceling request proxy twice");
nsresult rv = NS_REINTERPRET_CAST(imgRequest*, mOwner.get())->RemoveObserver(this, status);
mOwner = nsnull;
return rv;
}
/* void suspend (); */
NS_IMETHODIMP imgRequestProxy::Suspend()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void resume (); */
NS_IMETHODIMP imgRequestProxy::Resume()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/** imgIRequest methods **/
/* readonly attribute imgIContainer image; */
NS_IMETHODIMP imgRequestProxy::GetImage(imgIContainer * *aImage)
{
if (!mOwner)
return NS_ERROR_FAILURE;
return mOwner->GetImage(aImage);
}
/* readonly attribute unsigned long imageStatus; */
NS_IMETHODIMP imgRequestProxy::GetImageStatus(PRUint32 *aStatus)
{
if (!mOwner) {
*aStatus = imgIRequest::STATUS_ERROR;
return NS_ERROR_FAILURE;
}
return mOwner->GetImageStatus(aStatus);
}
/* readonly attribute nsIURI URI; */
NS_IMETHODIMP imgRequestProxy::GetURI(nsIURI **aURI)
{
if (!mOwner)
return NS_ERROR_FAILURE;
return mOwner->GetURI(aURI);
}
/* readonly attribute imgIDecoderObserver decoderObserver; */
NS_IMETHODIMP imgRequestProxy::GetDecoderObserver(imgIDecoderObserver **aDecoderObserver)
{
*aDecoderObserver = mObserver;
NS_IF_ADDREF(*aDecoderObserver);
return NS_OK;
}
/** imgIContainerObserver methods **/
/* [noscript] void frameChanged (in imgIContainer container, in nsISupports cx, in gfxIImageFrame newframe, in nsRect dirtyRect); */
NS_IMETHODIMP imgRequestProxy::FrameChanged(imgIContainer *container, nsISupports *cx, gfxIImageFrame *newframe, nsRect * dirtyRect)
{
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgRequestProxy::FrameChanged\n", this));
if (mObserver)
mObserver->FrameChanged(container, mContext, newframe, dirtyRect);
return NS_OK;
}
/** imgIDecoderObserver methods **/
/* void onStartDecode (in imgIRequest request, in nsISupports cx); */
NS_IMETHODIMP imgRequestProxy::OnStartDecode(imgIRequest *request, nsISupports *cx)
{
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgRequestProxy::OnStartDecode\n", this));
if (mObserver)
mObserver->OnStartDecode(this, mContext);
return NS_OK;
}
/* void onStartContainer (in imgIRequest request, in nsISupports cx, in imgIContainer image); */
NS_IMETHODIMP imgRequestProxy::OnStartContainer(imgIRequest *request, nsISupports *cx, imgIContainer *image)
{
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgRequestProxy::OnStartContainer\n", this));
if (mObserver)
mObserver->OnStartContainer(this, mContext, image);
return NS_OK;
}
/* void onStartFrame (in imgIRequest request, in nsISupports cx, in gfxIImageFrame frame); */
NS_IMETHODIMP imgRequestProxy::OnStartFrame(imgIRequest *request, nsISupports *cx, gfxIImageFrame *frame)
{
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgRequestProxy::OnStartFrame\n", this));
if (mObserver)
mObserver->OnStartFrame(this, mContext, frame);
return NS_OK;
}
/* [noscript] void onDataAvailable (in imgIRequest request, in nsISupports cx, in gfxIImageFrame frame, [const] in nsRect rect); */
NS_IMETHODIMP imgRequestProxy::OnDataAvailable(imgIRequest *request, nsISupports *cx, gfxIImageFrame *frame, const nsRect * rect)
{
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgRequestProxy::OnDataAvailable\n", this));
if (mObserver)
mObserver->OnDataAvailable(this, mContext, frame, rect);
return NS_OK;
}
/* void onStopFrame (in imgIRequest request, in nsISupports cx, in gfxIImageFrame frame); */
NS_IMETHODIMP imgRequestProxy::OnStopFrame(imgIRequest *request, nsISupports *cx, gfxIImageFrame *frame)
{
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgRequestProxy::OnStopFrame\n", this));
if (mObserver)
mObserver->OnStopFrame(this, mContext, frame);
return NS_OK;
}
/* void onStopContainer (in imgIRequest request, in nsISupports cx, in imgIContainer image); */
NS_IMETHODIMP imgRequestProxy::OnStopContainer(imgIRequest *request, nsISupports *cx, imgIContainer *image)
{
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgRequestProxy::OnStopContainer\n", this));
if (mObserver)
mObserver->OnStopContainer(this, mContext, image);
return NS_OK;
}
/* void onStopDecode (in imgIRequest request, in nsISupports cx, in nsresult status, in wstring statusArg); */
NS_IMETHODIMP imgRequestProxy::OnStopDecode(imgIRequest *request, nsISupports *cx, nsresult status, const PRUnichar *statusArg)
{
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgRequestProxy::OnStopDecode\n", this));
if (mObserver)
mObserver->OnStopDecode(this, mContext, status, statusArg);
return NS_OK;
}
/* void onStartRequest (in nsIRequest request, in nsISupports ctxt); */
NS_IMETHODIMP imgRequestProxy::OnStartRequest(nsIRequest *request, nsISupports *ctxt)
{
return NS_OK;
}
/* void onStopRequest (in nsIRequest request, in nsISupports ctxt, in nsresult statusCode, in wstring statusText); */
NS_IMETHODIMP imgRequestProxy::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult statusCode, const PRUnichar *statusText)
{
if (!mDummyChannel)
return NS_OK;
nsCOMPtr<nsILoadGroup> loadGroup;
mDummyChannel->GetLoadGroup(getter_AddRefs(loadGroup));
if (loadGroup) {
loadGroup->RemoveRequest(mDummyChannel, mContext, statusCode, statusText);
}
mDummyChannel = nsnull;
return NS_OK;
}

View File

@@ -1,70 +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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation.
* All Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
*/
#include "imgRequest.h"
#include "imgIDecoderObserver.h"
#include "imgIContainer.h"
#include "imgIDecoder.h"
#include "nsIStreamObserver.h"
#include "nsIChannel.h"
#include "nsILoadGroup.h"
#include "nsCOMPtr.h"
#define NS_IMGREQUESTPROXY_CID \
{ /* 20557898-1dd2-11b2-8f65-9c462ee2bc95 */ \
0x20557898, \
0x1dd2, \
0x11b2, \
{0x8f, 0x65, 0x9c, 0x46, 0x2e, 0xe2, 0xbc, 0x95} \
}
class imgRequestProxy : public imgIRequest,
public imgIDecoderObserver,
public nsIStreamObserver
{
public:
NS_DECL_ISUPPORTS
NS_DECL_IMGIREQUEST
NS_DECL_NSIREQUEST
NS_DECL_IMGIDECODEROBSERVER
NS_DECL_IMGICONTAINEROBSERVER
NS_DECL_NSISTREAMOBSERVER
imgRequestProxy();
virtual ~imgRequestProxy();
/* additional members */
nsresult Init(imgRequest *request, nsILoadGroup *aLoadGroup, imgIDecoderObserver *aObserver, nsISupports *cx);
private:
nsCOMPtr<imgIDecoderObserver> mObserver;
nsCOMPtr<nsISupports> mContext;
nsCOMPtr<imgIRequest> mOwner;
nsCOMPtr<nsIChannel> mDummyChannel;
PRBool mCanceled;
};

View File

@@ -1,56 +0,0 @@
#!nmake
#
# 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 Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 2001 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Stuart Parmenter <pavlov@netscape.com>
#
DEPTH=..\..\..
include <$(DEPTH)/config/config.mak>
MODULE = imglib2
LIBRARY_NAME = imglib2
DLL = $(OBJDIR)\$(LIBRARY_NAME).dll
MAKE_OBJ_TYPE = DLL
OBJS = \
.\$(OBJDIR)\DummyChannel.obj \
.\$(OBJDIR)\ImageCache.obj \
.\$(OBJDIR)\ImageFactory.obj \
.\$(OBJDIR)\imgContainer.obj \
.\$(OBJDIR)\imgLoader.obj \
.\$(OBJDIR)\imgRequest.obj \
.\$(OBJDIR)\imgRequestProxy.obj \
$(NULL)
LLIBS=\
$(LIBNSPR) \
$(DIST)\lib\xpcom.lib \
$(DIST)\lib\gkgfxwin.lib \
$(NULL)
include <$(DEPTH)\config\rules.mak>
install:: $(DLL)
$(MAKE_INSTALL) .\$(OBJDIR)\$(LIBRARY_NAME).dll $(DIST)\bin\components
$(MAKE_INSTALL) .\$(OBJDIR)\$(LIBRARY_NAME).lib $(DIST)\lib
clobber::
rm -f $(DIST)\bin\components\$(LIBRARY_NAME).dll
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib

View File

@@ -1,90 +0,0 @@
?AddRef@imgRequestProxy@@UAGKXZ ; 143798
?Release@imgContainer@@UAGKXZ ; 120291
?OnDataAvailable@imgRequestProxy@@UAGIPAVimgIRequest@@PAVnsISupports@@PAVgfxIImageFrame@@PBUnsRect@@@Z ; 84442
?QueryInterface@imgContainer@@UAGIABUnsID@@PAPAX@Z ; 76980
?OnDataAvailable@imgContainer@@UAGIPAVimgIRequest@@PAVnsISupports@@PAVgfxIImageFrame@@PBUnsRect@@@Z ; 75604
?OnDataAvailable@imgRequest@@UAGIPAVimgIRequest@@PAVnsISupports@@PAVgfxIImageFrame@@PBUnsRect@@@Z ; 75604
?AddRef@DummyChannel@@UAGKXZ ; 45629
?QueryInterface@DummyChannel@@UAGIABUnsID@@PAPAX@Z ; 45310
?GetImage@imgRequest@@UAGIPAPAVimgIContainer@@@Z ; 41814
?Release@DummyChannel@@UAGKXZ ; 41716
?GetImage@imgRequestProxy@@UAGIPAPAVimgIContainer@@@Z ; 40453
?GetFrameAt@imgContainer@@UAGIIPAPAVgfxIImageFrame@@@Z ; 39613
?GetHeight@imgContainer@@UAGIPAH@Z ; 32348
?Release@imgRequest@@UAGKXZ ; 31603
?AddRef@imgRequest@@UAGKXZ ; 31603
?GetNumFrames@imgContainer@@UAGIPAI@Z ; 28342
?GetImageStatus@imgRequestProxy@@UAGIPAI@Z ; 27464
?Release@imgRequestProxy@@UAGKXZ ; 23383
?GetCurrentFrame@imgContainer@@UAGIPAPAVgfxIImageFrame@@@Z ; 19319
?QueryInterface@imgRequest@@UAGIABUnsID@@PAPAX@Z ; 16120
?assign_assuming_AddRef@nsCOMPtr_base@@IAEXPAVnsISupports@@@Z ; 13764
?FrameChanged@imgRequestProxy@@UAGIPAVimgIContainer@@PAVnsISupports@@PAVgfxIImageFrame@@PAUnsRect@@@Z ; 13455
?QueryInterface@imgRequestProxy@@UAGIABUnsID@@PAPAX@Z ; 10170
?Notify@imgContainer@@UAGXPAVnsITimer@@@Z ; 9611
??0nsQueryReferent@@QAE@PAVnsIWeakReference@@PAI@Z ; 9611
?FrameChanged@imgRequest@@UAGIPAVimgIContainer@@PAVnsISupports@@PAVgfxIImageFrame@@PAUnsRect@@@Z ; 9609
?DoComposite@imgContainer@@AAEXPAPAVgfxIImageFrame@@PAUnsRect@@HH@Z ; 9608
?GetLoadAttributes@DummyChannel@@UAGIPAI@Z ; 8258
?Cancel@imgRequestProxy@@UAGII@Z ; 7509
?GetLoadGroup@DummyChannel@@UAGIPAPAVnsILoadGroup@@@Z ; 7456
?GetURI@imgRequest@@UAGIPAPAVnsIURI@@@Z ; 5395
?GetURI@imgRequestProxy@@UAGIPAPAVnsIURI@@@Z ; 5395
?GetCacheSession@@YAXPAPAVnsICacheSession@@@Z ; 5165
?GetWidth@imgContainer@@UAGIPAH@Z ; 4675
?Release@imgLoader@@UAGKXZ ; 3791
?AddObserver@imgRequest@@QAEIPAVimgIDecoderObserver@@@Z ; 3789
?Get@ImageCache@@SAHPAVnsIURI@@PAPAVimgRequest@@PAPAVnsICacheEntryDescriptor@@@Z ; 3789
?RemoveObserver@imgRequest@@QAEIPAVimgIDecoderObserver@@I@Z ; 3789
?Init@imgRequestProxy@@QAEIPAVimgRequest@@PAVnsILoadGroup@@PAVimgIDecoderObserver@@PAVnsISupports@@@Z ; 3789
?QueryInterface@imgLoader@@UAGIABUnsID@@PAPAX@Z ; 3789
??0imgRequestProxy@@QAE@XZ ; 3789
??0DummyChannel@@QAE@PAVimgIRequest@@PAVnsILoadGroup@@@Z ; 3789
?LoadImage@imgLoader@@UAGIPAVnsIURI@@PAVnsILoadGroup@@PAVimgIDecoderObserver@@PAVnsISupports@@PAPAVimgIRequest@@@Z ; 3789
??1imgRequestProxy@@UAE@XZ ; 3667
??1DummyChannel@@QAE@XZ ; 3667
??_EimgRequestProxy@@UAEPAXI@Z ; 3667
?OnStopRequest@imgRequestProxy@@UAGIPAVnsIRequest@@PAVnsISupports@@IPBG@Z ; 3667
?OnStopDecode@imgRequestProxy@@UAGIPAVimgIRequest@@PAVnsISupports@@IPBG@Z ; 3652
?OnStartContainer@imgRequestProxy@@UAGIPAVimgIRequest@@PAVnsISupports@@PAVimgIContainer@@@Z ; 3652
?OnStopContainer@imgRequestProxy@@UAGIPAVimgIRequest@@PAVnsISupports@@PAVimgIContainer@@@Z ; 3652
?OnStartDecode@imgRequestProxy@@UAGIPAVimgIRequest@@PAVnsISupports@@@Z ; 3652
?OnStopFrame@imgRequestProxy@@UAGIPAVimgIRequest@@PAVnsISupports@@PAVgfxIImageFrame@@@Z ; 3491
?OnStartFrame@imgRequestProxy@@UAGIPAVimgIRequest@@PAVnsISupports@@PAVgfxIImageFrame@@@Z ; 3491
?OnStartRequest@imgRequestProxy@@UAGIPAVnsIRequest@@PAVnsISupports@@@Z ; 2714
?OnStopFrame@imgRequest@@UAGIPAVimgIRequest@@PAVnsISupports@@PAVgfxIImageFrame@@@Z ; 2082
?AppendFrame@imgContainer@@UAGIPAVgfxIImageFrame@@@Z ; 2082
?OnStartFrame@imgRequest@@UAGIPAVimgIRequest@@PAVnsISupports@@PAVgfxIImageFrame@@@Z ; 2082
?EndFrameDecode@imgContainer@@UAGIII@Z ; 1996
?StartAnimation@imgContainer@@UAGIXZ ; 1747
?OnDataAvailable@imgRequest@@UAGIPAVnsIRequest@@PAVnsISupports@@PAVnsIInputStream@@II@Z ; 1415
??0imgContainer@@QAE@XZ ; 1376
??1imgRequest@@UAE@XZ ; 1376
?OnStopRequest@imgRequest@@UAGIPAVnsIRequest@@PAVnsISupports@@IPBG@Z ; 1376
?Init@imgRequest@@QAEIPAVnsIChannel@@PAVnsICacheEntryDescriptor@@@Z ; 1376
??1imgContainer@@UAE@XZ ; 1376
?Put@ImageCache@@SAHPAVnsIURI@@PAVimgRequest@@PAPAVnsICacheEntryDescriptor@@@Z ; 1376
??_GimgRequest@@UAEPAXI@Z ; 1376
??_EimgContainer@@UAEPAXI@Z ; 1376
??0imgRequest@@QAE@XZ ; 1376
?OnStartRequest@imgRequest@@UAGIPAVnsIRequest@@PAVnsISupports@@@Z ; 1367
?OnStartContainer@imgRequest@@UAGIPAVimgIRequest@@PAVnsISupports@@PAVimgIContainer@@@Z ; 1361
?Init@imgContainer@@UAGIHHPAVimgIContainerObserver@@@Z ; 1361
?OnStartDecode@imgRequest@@UAGIPAVimgIRequest@@PAVnsISupports@@@Z ; 1361
?SniffMimeType@imgRequest@@QAEXPBDI@Z ; 1361
?OnStopContainer@imgRequest@@UAGIPAVimgIRequest@@PAVnsISupports@@PAVimgIContainer@@@Z ; 1361
?OnStopDecode@imgRequest@@UAGIPAVimgIRequest@@PAVnsISupports@@IPBG@Z ; 1361
?GetContentType@DummyChannel@@UAGIPAPAD@Z ; 1275
?DecodingComplete@imgContainer@@UAGIXZ ; 1275
?Cancel@DummyChannel@@UAGII@Z ; 122
?StopAnimation@imgContainer@@UAGIXZ ; 121
?GetDecoderObserver@imgRequestProxy@@UAGIPAPAVimgIDecoderObserver@@@Z ; 84
??0nsGetInterface@@QAE@PAVnsISupports@@PAI@Z ; 77
_NSGetModule ; 1
??_EimgLoader@@UAEPAXI@Z ; 1
??1imgLoader@@UAE@XZ ; 1
?Shutdown@ImageCache@@SAXXZ ; 1
??0imgLoader@@QAE@XZ ; 1
?do_GetService@@YA?BVnsGetServiceByContractID@@PBDPAI@Z ; 1
?Cancel@imgRequest@@UAGII@Z ; 1
?RemoveFromCache@imgRequest@@QAEHXZ ; 1

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