Compare commits

..

1578 Commits

Author SHA1 Message Date
sicking%bigfoot.com
85075a6806 sync with tip
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@132288 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-19 09:21:45 +00:00
sicking%bigfoot.com
e11654ea13 Fix petervs comments
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@132140 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-17 08:50:06 +00:00
sicking%bigfoot.com
f3a021458e Sync from heikkis scriptloader changes
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@132101 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-16 23:08:10 +00:00
sicking%bigfoot.com
5319b14aab Some parameters comments
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@132100 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-16 23:07:34 +00:00
peterv%netscape.com
e92a4510c2 Add txUnknownHandler.cpp
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@132093 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-16 21:31:01 +00:00
peterv%netscape.com
02c58369ea Buster
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@132084 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-16 12:55:39 +00:00
peterv%netscape.com
279f53d0fa Syncloader change
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@132083 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-16 12:47:28 +00:00
peterv%netscape.com
6621c65c8b Syncloader merge
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@132080 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-16 12:42:02 +00:00
axel%pike.org
39071eb504 fixing some of peterv's comments, attachement 102981
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@132073 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-16 08:57:39 +00:00
axel%pike.org
559d797da0 fixing some of peterv's comments, attachement 102981
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@132072 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-16 08:54:42 +00:00
axel%pike.org
de4b0d21fd fixing some of peterv's comments, attachement 102981
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@132071 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-16 08:26:54 +00:00
sicking%bigfoot.com
528893b831 Putting back DOMCI stuff using the name nsIXSLTProcessorObsolete
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@131958 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-14 09:41:34 +00:00
sicking%bigfoot.com
210ca527ea Remove nsIDocumentTransformer things that are not needed any more
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@131956 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-14 09:31:10 +00:00
sicking%bigfoot.com
dfceb46a39 Make transformToDoc wrap a transformiix:result element around the text when output-mode is text
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@131955 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-14 09:27:32 +00:00
sicking%bigfoot.com
cc547948db Fixing reviewcomments from Pike
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@131427 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-08 16:47:59 +00:00
axel%pike.org
eba0f773ab minor cleanup
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@131271 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-06 21:08:45 +00:00
axel%pike.org
1fe06cf2cd comments, linelengths, cruft
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@131270 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-06 21:07:45 +00:00
axel%pike.org
e23d373909 updating the version number
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@131269 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-06 21:06:38 +00:00
sicking%bigfoot.com
a618eccb97 sync darins checkin for bug 170789
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@131154 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-04 12:06:22 +00:00
sicking%bigfoot.com
3eb2af0d8e Support old nsIDocumentTransformer, but under the name nsIXSLTProcessorObsolete
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@131153 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-04 11:35:04 +00:00
sicking%bigfoot.com
5d3c85adc5 Set up mTextNode in the ctor for txMozillaTextOutput
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@130344 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-24 13:13:30 +00:00
sicking%bigfoot.com
b513581d84 Remove unneeded scoping-blocks.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@130335 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-24 08:26:20 +00:00
sicking%bigfoot.com
6b683cafcc throw the appropriate error for eMethodNotSet
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@130125 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-20 07:47:19 +00:00
axel%pike.org
9f28ddaaca merging bug 164174, skin version
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@130037 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-19 14:10:53 +00:00
axel%pike.org
bfa2ef5fe4 better errorcodes, api should be null-proof
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@129816 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-17 20:31:43 +00:00
axel%pike.org
56d27f0a54 merging bug 16140, html namespace
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@129815 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-17 20:30:36 +00:00
sicking%bigfoot.com
1d1426b995 Change the way output-handlers are created and set up.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@129786 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-17 12:30:33 +00:00
axel%pike.org
0d5b81928d merging stuff
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@129086 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-09 13:50:24 +00:00
peterv%netscape.com
2caad09fc9 Remove code that wasn't meant to be checked in.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@128669 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-02 17:31:28 +00:00
axel%pike.org
c94bfa7752 crasher when no result document was created
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@128580 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-30 20:24:25 +00:00
peterv%netscape.com
39b0605691 Some merging that was forgotten.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@128557 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-30 14:36:51 +00:00
axel%pike.org
d25630ed8c comments, createRTFDocument left todo
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@128457 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-29 12:21:09 +00:00
axel%pike.org
b17491ab21 fixing leak
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@128456 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-29 12:07:11 +00:00
axel%pike.org
07586351e6 adding r= comment by sicking from the trunk checkin of the trivialities to the branch
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@128450 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-29 08:46:11 +00:00
peterv%netscape.com
b14c942de9 I need more sleep.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@128342 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-28 14:09:31 +00:00
peterv%netscape.com
2490390c1b Merge.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@128271 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-27 19:03:39 +00:00
peterv%netscape.com
6f61127b88 Don't clone() global parameters.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@128270 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-27 18:58:01 +00:00
peterv%netscape.com
bc6fa7e9eb Merge.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@128269 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-27 18:56:14 +00:00
axel%pike.org
366841c39d fix global variables and params, module needs ownership still
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@128263 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-27 17:20:20 +00:00
axel%pike.org
dfa09f0d14 build standalone on windows, sync_with_stdio_sigh
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@128262 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-27 17:18:57 +00:00
axel%pike.org
3a13874f4a regression by argument cleanup, assertion proofing. txNodeSorter needed a bit argument cleanup, too.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127953 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-23 16:13:36 +00:00
axel%pike.org
7ab9515612 crash on text-only, d-o-e fix
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127949 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-23 14:23:52 +00:00
peterv%netscape.com
02b2ad6ae6 Warning fixes.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127948 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-23 14:14:24 +00:00
peterv%netscape.com
4ed0e899e6 Warning.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127945 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-23 13:30:57 +00:00
axel%pike.org
26b2a28a8f API for standalone, build on standalone. We have to executables now, transformiix and txXSLTMarkDriver, if MARK_INC is set to -I/path/of/xlstark/src
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127944 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-23 13:10:12 +00:00
peterv%netscape.com
ac1f1799c5 Merge.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127860 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-22 15:28:22 +00:00
peterv%netscape.com
ef12f99d07 do_GetService(kNameSpaceManagerCID);
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127859 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-22 15:21:29 +00:00
peterv%netscape.com
4c9f7a8932 do_GetService(kNameSpaceManagerCID); and Merge.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127858 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-22 15:21:05 +00:00
sicking%bigfoot.com
9df8b1038e Make module build on windows.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127804 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-21 22:56:16 +00:00
peterv%netscape.com
4c2b4540c4 Merge.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127782 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-21 18:43:29 +00:00
peterv%netscape.com
c4625a6dd6 Merge.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127781 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-21 18:31:22 +00:00
peterv%netscape.com
2b564c3c36 Merge.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127780 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-21 18:21:12 +00:00
peterv%netscape.com
3c9b9c3d66 has, not get.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127707 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-20 15:38:25 +00:00
peterv%netscape.com
2ccae20bd8 Variables, sicking's removal of source node in XSLTProcessor and more.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127705 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-20 15:31:00 +00:00
peterv%netscape.com
a07fd65d04 Merge.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127704 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-20 15:08:37 +00:00
peterv%netscape.com
3f01b3d09a Bah. (extensive commenting for Pike)
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127694 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-20 10:29:42 +00:00
peterv%netscape.com
daf040c4b9 Merge.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127661 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-19 23:01:03 +00:00
(no author)
dda787d3c0 This commit was manufactured by cvs2svn to create branch
'XSLTPROCESSOR_REFACTOR_20020630_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127652 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-19 22:16:10 +00:00
peterv%netscape.com
621e2a2ff1 Merge.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127607 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-19 11:47:43 +00:00
peterv%netscape.com
949bfcc753 Merge and add addStyleSheetParameter.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127606 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-19 11:47:24 +00:00
peterv%netscape.com
5f32c27eb7 Merge.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127605 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-19 11:29:56 +00:00
axel%pike.org
321e0d70ef merging build and expat stuff to the branch, bug 46754
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127367 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-15 12:03:53 +00:00
axel%pike.org
afef46cbed make this build standalone, on unix. win is pending.
The API for standalone is sicking-style (says peterv), check in now, think later.


git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127264 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-14 16:36:44 +00:00
peterv%netscape.com
45f4d97fbd case
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127248 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-14 11:35:04 +00:00
peterv%netscape.com
7053348658 Pike doesn't like the helper.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127246 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-14 10:01:08 +00:00
peterv%netscape.com
633bd7b08b Merge.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127245 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-14 09:59:00 +00:00
peterv%netscape.com
34c3a6e1d4 static babeee
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127244 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-14 09:58:46 +00:00
peterv%netscape.com
6a588df256 Merge.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127170 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-13 15:37:41 +00:00
peterv%netscape.com
54fe0c6eac Merge and stuff.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127169 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-13 15:34:43 +00:00
peterv%netscape.com
cc0515c37d Merge.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127164 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-13 14:23:15 +00:00
peterv%netscape.com
1821cd15db Merge.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127163 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-13 14:15:27 +00:00
peterv%netscape.com
f7e8a50afd Merge.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127162 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-13 13:41:55 +00:00
peterv%netscape.com
d47d1c0bf4 Merge.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127161 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-13 13:27:46 +00:00
peterv%netscape.com
cb38c4748a *** empty log message ***
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127160 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-13 13:06:56 +00:00
peterv%netscape.com
447c730eb8 Merge.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127159 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-13 12:56:31 +00:00
peterv%netscape.com
9592c1f26b Merge.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127156 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-13 12:47:04 +00:00
peterv%netscape.com
dba57993ec Merge.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127154 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-13 12:37:05 +00:00
peterv%netscape.com
c5681c87e6 Merge.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@127153 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-13 12:29:55 +00:00
(no author)
d1bf528445 This commit was manufactured by cvs2svn to create branch
'XSLTPROCESSOR_REFACTOR_20020630_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@126496 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-06 12:28:28 +00:00
peterv%netscape.com
6efd840cda *dump*
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@125012 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-11 10:19:37 +00:00
peterv%netscape.com
dfd5589995 Move init to txXSLTProcessor.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@125011 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-11 09:49:09 +00:00
peterv%netscape.com
9457458c19 Trunk merge.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@125010 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-11 09:38:21 +00:00
peterv%netscape.com
29bd0b8e6c Trunk merge
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@125009 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-11 09:27:14 +00:00
(no author)
2c5d6619ed This commit was manufactured by cvs2svn to create branch
'XSLTPROCESSOR_REFACTOR_20020630_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@124706 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-05 12:36:14 +00:00
peterv%netscape.com
63b2cf7f8b Merging string patch.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@124545 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-02 22:32:18 +00:00
peterv%netscape.com
11bee26936 More.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@124402 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-01 15:12:55 +00:00
peterv%netscape.com
80f7da9207 Making stuff work etc.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@124399 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-01 13:50:56 +00:00
peterv%netscape.com
9b4abe898c new interfaces and sickings stuff
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@124398 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-01 13:45:55 +00:00
peterv%netscape.com
308bc06c7b Split up.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@124372 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-30 16:17:49 +00:00
peterv%netscape.com
2b1e7c6e8d Split up.
git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@124371 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-30 15:54:13 +00:00
(no author)
1af84c1dfb This commit was manufactured by cvs2svn to create branch
'XSLTPROCESSOR_REFACTOR_20020630_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/XSLTPROCESSOR_REFACTOR_20020630_BRANCH@124281 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-28 17:43:40 +00:00
av%netscape.com
fae79aad48 Bug 150761 -- scroll button causes crash with windowless plugins, r=peterl, sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@124279 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-28 17:43:38 +00:00
ccarlen%netscape.com
4a7fe047d3 Bug 145827 - window.focus and window.blur not implemented in PPEmbed. r=adamlock/sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@124278 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-28 14:32:13 +00:00
rods%netscape.com
692772b640 If the user or JS requests to print while the document is still loading the DV
will print it in the LoadComplete
Bug 137739 r=dcone sr=jst


git-svn-id: svn://10.0.0.236/trunk@124276 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-28 13:39:44 +00:00
rods%netscape.com
f01814830a Minor fix up for improved dialog the min should have 30 to match mozilla
& in UI should have been &&
Implementing a better setup dialog
Bug 154239 r=chak rs=alecf


git-svn-id: svn://10.0.0.236/trunk@124275 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-28 13:29:06 +00:00
bryner%netscape.com
6af4a9e4af Adding a simple shell script to create a DMG disk image from a folder's contents (used for mach-o nightly builds). Not part of the regular build.
git-svn-id: svn://10.0.0.236/trunk@124272 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-28 09:31:28 +00:00
dprice%netscape.com
9fa1b91220 140104 r=curt sr=dveditz
blow away chrome.rdf and overlayinfo


git-svn-id: svn://10.0.0.236/trunk@124271 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-28 07:55:06 +00:00
law%netscape.com
b25de230e2 Bug 154238; tweak http\shell\open\ddeexec registry keys while running so that Acrobat plugin can converse with us via DDE; r=blythe@netscape.com, sr=ben@netscape.com
git-svn-id: svn://10.0.0.236/trunk@124270 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-28 07:31:23 +00:00
dbaron%fas.harvard.edu
ee63eedd77 Correcting comment. r=bzbarsky b=153032
git-svn-id: svn://10.0.0.236/trunk@124269 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-28 06:31:30 +00:00
leaf%mozilla.org
3ab8902748 Automated update
git-svn-id: svn://10.0.0.236/trunk@124268 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-28 06:25:47 +00:00
pete.zha%sun.com
d0f489236e bug 151388:To add a new compile switch to distinguish Windows and ATK code
patch=john.sun@sun.com r=cls(seawood@netscape.com)
So that we can use
#ifdef ACCESSIBILITY_ATK
//ATK code here
#else
//Windows code here
#endif
to keep the binaries smaller.


git-svn-id: svn://10.0.0.236/trunk@124267 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-28 06:24:43 +00:00
mkaply%us.ibm.com
9c996db925 #154161
r=cls
Turn on building of the NPNULL plugin on OS/2


git-svn-id: svn://10.0.0.236/trunk@124265 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-28 05:39:00 +00:00
blakeross%telocity.com
12fe395654 106092 - trunk m1br m100 n70pr1 topcrash @nsMenuFrame::OpenMenu. r=brade sr=ben
git-svn-id: svn://10.0.0.236/trunk@124261 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-28 03:10:08 +00:00
relyea%netscape.com
87e98bd000 Initialize type fields to supress purify uninitialized reference warnings.
git-svn-id: svn://10.0.0.236/trunk@124260 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-28 03:00:10 +00:00
caillon%returnzero.com
4417f20d9a Bug 154535. Don't depend on the sidebar overlay for context menu code.
r=sgehani
sr=jag


git-svn-id: svn://10.0.0.236/trunk@124256 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-28 01:55:48 +00:00
sfraser%netscape.com
b9749b23b6 Fix include paths for static target to include commandhandler
git-svn-id: svn://10.0.0.236/trunk@124255 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-28 01:50:09 +00:00
bzbarsky%mit.edu
866c407033 Allow embeddors to override helper apps. Bug 147142, patch by
philipl@mail.utexas.edu (Philip Langdale), r=bzbarsky, sr=blake


git-svn-id: svn://10.0.0.236/trunk@124254 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-28 01:35:57 +00:00
bzbarsky%mit.edu
7c94c072e9 Make content lists lazy. Bug 104603, r=jkeiser, sr=jst
git-svn-id: svn://10.0.0.236/trunk@124253 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-28 01:30:09 +00:00
jpierre%netscape.com
76ae2acfd8 Add VISA root cert - bug 139874
git-svn-id: svn://10.0.0.236/trunk@124251 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-28 01:07:37 +00:00
harishd%netscape.com
f549f2420d Putting back the idl change that was backed out in my previous checkin
git-svn-id: svn://10.0.0.236/trunk@124250 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-28 00:57:03 +00:00
naving%netscape.com
084a40dd7d 154501 r=cavin sr=bienvenu fixing regression can't save as draft/templates when using an imap acct that
doesn't already have Drafts or Templates folder


git-svn-id: svn://10.0.0.236/trunk@124247 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-28 00:39:10 +00:00
bbaetz%student.usyd.edu.au
1873bc6ab1 Bug 148488 - more HTML validation fixes
r=jouni, gerv


git-svn-id: svn://10.0.0.236/trunk@124240 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-28 00:18:32 +00:00
yokoyama%netscape.com
f8bc79285c bug 153470
Need to process WM_CHAR with (wParam > 0xff)
for CJK characters.
/r=shanjian; /sr=kin


git-svn-id: svn://10.0.0.236/trunk@124239 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-28 00:08:26 +00:00
harishd%netscape.com
6a17a8cbac Backing out my checkin to see if it fixes the Txul breakage
git-svn-id: svn://10.0.0.236/trunk@124236 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 23:32:51 +00:00
morse%netscape.com
5664835ece check in new image for lori, a=lorikaplan
git-svn-id: svn://10.0.0.236/trunk@124234 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 23:02:00 +00:00
mkaply%us.ibm.com
05443b36d2 #118546
r=pedemont, sr=blizzard
OS/2 only - bullet proof unicode stuff, better default fonts


git-svn-id: svn://10.0.0.236/trunk@124232 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 22:37:30 +00:00
mkaply%us.ibm.com
92e616c8ab #154161
r=pedemont, sr=blizzard
OS/2 only - get NPNULL plugin working on OS/2


git-svn-id: svn://10.0.0.236/trunk@124231 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 22:26:41 +00:00
bryner%netscape.com
c6d67052ab Bug 151607 - fix an uninitialized variable in DocumentViewerImpl::PrintDocContent that was causing a later crash. r=rods, sr=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@124230 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 22:20:59 +00:00
mkaply%us.ibm.com
ccaf9ebef4 #149365
r=mkaply, sr=blizzard
OS/2 only from jblanco - only set number of copies in one place


git-svn-id: svn://10.0.0.236/trunk@124229 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 22:20:44 +00:00
mkaply%us.ibm.com
4acd61aeec #151536
r=pedemont, sr=blizzard
OS/2 only - display Euro using current font, not Unicode font


git-svn-id: svn://10.0.0.236/trunk@124228 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 22:16:22 +00:00
pinkerton%netscape.com
12d6686d3a Fix crash clicking on url schemes we don't understand (bug 154538)
git-svn-id: svn://10.0.0.236/trunk@124227 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 22:16:09 +00:00
mkaply%us.ibm.com
7e004ae22a #62322
r=naving, sr=bienvenu
Hookup preference for displaying confirmation on deleting folders


git-svn-id: svn://10.0.0.236/trunk@124225 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 22:07:10 +00:00
pinkerton%netscape.com
50a39fafc8 Put up dialog to let users know when posting secure data from insecure site
(bug 151653).


git-svn-id: svn://10.0.0.236/trunk@124224 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 22:06:20 +00:00
sfraser%netscape.com
a22f40a4d3 Fixing history tab in sidebar to show history. Also hiding history tab by default.
git-svn-id: svn://10.0.0.236/trunk@124223 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 22:03:30 +00:00
varada%netscape.com
66f1f4f5bb fix for 147889;sending mail progress window gets longer with size of url attachment;r=ducarroz;sr=bienvenue
git-svn-id: svn://10.0.0.236/trunk@124222 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 21:56:25 +00:00
aaronl%netscape.com
b40993301a Bug 154340. Active Accessibility: name attribute should not map to nsIAccessible::GetAccName(). r=kyle, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@124218 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 21:18:56 +00:00
nicolson%netscape.com
95f38fdaf0 remove spurious println.
git-svn-id: svn://10.0.0.236/trunk@124217 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 21:16:42 +00:00
naving%netscape.com
f8d56c599a 154000 r=cavin sr=bienvenu fixing imap drag and drop of folders using non-ascii names.
git-svn-id: svn://10.0.0.236/trunk@124216 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 21:15:56 +00:00
sfraser%netscape.com
0a2126cb7a Fix for bug 146322; make Undo/Redo/Delete work correctly, and make menu items properly enable. r=pinkerton
git-svn-id: svn://10.0.0.236/trunk@124215 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 21:07:30 +00:00
sfraser%netscape.com
e1ec163df1 Fix for bug 146322; make Undo/Redo/Delete work correctly, and make menu items properly enable. Adding search patch to dist/include/commandhandler r=pinkerton
git-svn-id: svn://10.0.0.236/trunk@124214 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 21:06:36 +00:00
sfraser%netscape.com
f8d9f69304 Fix bug 146322; make Undo/Redo/Delete work, and menu items enable correctly. r=pinkerton.
git-svn-id: svn://10.0.0.236/trunk@124212 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 21:02:51 +00:00
dcone%netscape.com
c3dfc5ba55 b-153927 r=rods sr=waterson. Fixed comment. Should not effect build at all.
git-svn-id: svn://10.0.0.236/trunk@124211 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 21:01:15 +00:00
harishd%netscape.com
270da5e314 ** checking in for mstoltz **
Disable scripts on the requested docshell and containing docshells. Also, made setCurrentURI() scriptable ( approved by Adam Lock ). b=154647, r=harishd, sr=jst


git-svn-id: svn://10.0.0.236/trunk@124210 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 20:58:42 +00:00
pete%alphanumerica.com
81c2b5fa2b b=88049 r=bzbarsky sr=jst
[RFE] Support .selectionStart & friends for textareas

Enjoy

--pete


git-svn-id: svn://10.0.0.236/trunk@124209 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 20:22:28 +00:00
pinkerton%netscape.com
93c88c666f update windows when the bit depth changes (bug 153651)
git-svn-id: svn://10.0.0.236/trunk@124208 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 19:58:49 +00:00
mitchf%netscape.com
45900873d6 Added RequiredTools value to check existence of needed .exe's on startup.
Fixes bug 102537


git-svn-id: svn://10.0.0.236/trunk@124206 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 19:46:02 +00:00
mcs%netscape.com
b7046746c2 Fix bug # 153250 - need a way to set SSL options when using libssldap.
Added two new libssldap public functions: ldapssl_set_option() and
		ldapssl_get_option().
	Also fixed a bug in ldapsinit:do_ldapssl_connect() that sometimes
		caused PR_Close() to be called twice on an SSL file descriptor
		if an error occurred (once in do_ldapssl_connect() itself and
		once in the libprldap close function that is called from
		do_ldapssl_connect()).
	Also updated the NSPR and NSS "error code to string" mapping
		tables that are used by ldapssl_err2string().
	Also fixed a bug in common.c:ldaptool_print_lderror (LDAP command
		line tools) where we did not check for SSL errors when the
		error code was "can't connect."  We were only checking on
		"server down" errors.


git-svn-id: svn://10.0.0.236/trunk@124204 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 19:26:38 +00:00
shrutiv%netscape.com
031ef4a0d2 Fix for bugscape bug 13928: Extract file associated with help menu from
the XPI directory (r=mitchf)


git-svn-id: svn://10.0.0.236/trunk@124203 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 19:18:09 +00:00
shrutiv%netscape.com
782b31d708 renaming file as MailNews.cpp
git-svn-id: svn://10.0.0.236/trunk@124202 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 19:16:29 +00:00
shrutiv%netscape.com
3f5db2bdf8 Fix for bugscape bug 13928: Extract file associated with help menu from
the XPI directory (r=mitchf)


git-svn-id: svn://10.0.0.236/trunk@124201 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 19:11:37 +00:00
mikep%oeone.com
f734273127 Trying to get selection and checkbox checking working together.
git-svn-id: svn://10.0.0.236/trunk@124200 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 19:09:24 +00:00
cavin%netscape.com
81d0a1472a Fix for 149759. Carry fixes in nsTextAddress for ldif import problems to AddressBookParser. r=ducarroz, sr=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@124199 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 18:58:55 +00:00
pinkerton%netscape.com
8dd10215ba fix method name so we correctly load urls again (bug 154514)
git-svn-id: svn://10.0.0.236/trunk@124198 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 18:40:17 +00:00
wtc%netscape.com
93888c771e Bugzilla bug 154656: changed "softoken" to "softokn" to match the file
name.


git-svn-id: svn://10.0.0.236/trunk@124197 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 18:34:17 +00:00
pinkerton%netscape.com
56fecb2acf Reinstate dragging the proxy to the personal toolbar and the outliner as
well as fixing a crasher dragging to the end of the bookmarks list (bug 154460)


git-svn-id: svn://10.0.0.236/trunk@124194 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 18:07:56 +00:00
locka%iol.ie
1a423ebcd7 Fix for opening javascript: popup windows in embedding. b=149307 r=adamlock@netscape.com sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@124193 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 18:07:32 +00:00
mostafah%oeone.com
064711676a Removing multiple variable definitions caused by previous checkin
git-svn-id: svn://10.0.0.236/trunk@124192 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 18:00:42 +00:00
mikep%oeone.com
f18d3fbb72 Adding in to do items for the calendar.
git-svn-id: svn://10.0.0.236/trunk@124191 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 17:59:51 +00:00
mostafah%oeone.com
a55c7eaa4a Added seperate observer for Todos
git-svn-id: svn://10.0.0.236/trunk@124190 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 16:51:51 +00:00
pinkerton%netscape.com
e2d22de650 commented about broken window cascading on multiple monitors with
radar bug number


git-svn-id: svn://10.0.0.236/trunk@124181 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 14:53:20 +00:00
pinkerton%netscape.com
d8db107b1d Fix crash when deleting a folder and some of its subitems were selected
(bug 151901)


git-svn-id: svn://10.0.0.236/trunk@124180 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 13:33:19 +00:00
pinkerton%netscape.com
970c5fe1a6 Only stop the download when the network flag is set, not any time
we get a stop message on the listener. (bug 154277)


git-svn-id: svn://10.0.0.236/trunk@124179 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 13:09:30 +00:00
rods%netscape.com
8871a2fa92 Implementing a better setup dialog
Bug 154239 r=chak rs=alecf


git-svn-id: svn://10.0.0.236/trunk@124177 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 12:01:30 +00:00
jay.yan%sun.com
5006863a28 bug 151136 support nsIAccessibleSelection in MAI, patch=silvia, r=aaronl, this patch is not a part of the default build.
git-svn-id: svn://10.0.0.236/trunk@124174 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 08:26:39 +00:00
jay.yan%sun.com
c68338e04f bug 151134 support nsIAccessibleEditableText in MAI, patch=bolian,r=aaronl, this patch is not a part of default build.
git-svn-id: svn://10.0.0.236/trunk@124173 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 08:22:53 +00:00
jay.yan%sun.com
9434ebafc9 bug 151133, support nsIAccessibleText in MAI, patch=bolian, r=aaronl, this patch is not a part of default build.
git-svn-id: svn://10.0.0.236/trunk@124172 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 08:20:27 +00:00
timeless%mac.com
6f6688d9f7 Bug 148334 when autoHide pref is disabled, tabbrowser duplicates listeners for first browser
patch by neil@parkwaycc.co.uk r=timeless sr=jag


git-svn-id: svn://10.0.0.236/trunk@124171 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 08:19:28 +00:00
jay.yan%sun.com
7759f2b6a1 bug 151111 support nsIAccessibleTable in MAI, patch=bolian, r=aaronl, this patch is not a part of default build
git-svn-id: svn://10.0.0.236/trunk@124170 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 08:18:06 +00:00
timeless%mac.com
6e154e7cee Bug 149974 javascript strict warnings in mailCommands.js
patch by neil@parkwaycc.co.uk r=ssu sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@124169 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 08:17:06 +00:00
jay.yan%sun.com
c02bd0de60 bug 151108 support nsIAccessibleAction in MAI, patch=bolian, r=aaronl, not a part of default build
git-svn-id: svn://10.0.0.236/trunk@124168 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 08:14:45 +00:00
jkeiser%netscape.com
c214de3745 Keep background images from sending progress events (bug 133250, checkin #1). From Antonio.Xu@sun.com. r=bbaetz, sr=darin
git-svn-id: svn://10.0.0.236/trunk@124167 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 06:46:25 +00:00
ssu%netscape.com
eaa18c1fcd fixing bug 42604 - Windows shortcuts shouldn't be created with comments on Win2000. r=curt,syd sr=dveditz
git-svn-id: svn://10.0.0.236/trunk@124166 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 06:12:23 +00:00
dbaron%fas.harvard.edu
6bc536c9f5 Fix OS/2 bustage.
git-svn-id: svn://10.0.0.236/trunk@124165 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 05:12:25 +00:00
timeless%mac.com
a482d110b4 Bug 32239 rebuildcvshistory fails on files whose rlog date are in mm/dd/yyyy format.
patch by mgstahl@sonalysts.com r=tara


git-svn-id: svn://10.0.0.236/trunk@124162 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 04:31:28 +00:00
bzbarsky%mit.edu
62d8c48876 No need to CompressWhitespace here... Bug 154345, r=peterv, sr=jst
git-svn-id: svn://10.0.0.236/trunk@124161 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 04:22:45 +00:00
tara%tequilarista.org
e3c70a6bae Landing fix for bug #153744, enabling proper branch handling for diff and blame
git-svn-id: svn://10.0.0.236/trunk@124158 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 03:41:42 +00:00
jj%netscape.com
c6210a335b bug 139815: Fix for depend builds: delete the plugin directory structure if it already exists under dist before copying it again. by sfraser, r=jj
git-svn-id: svn://10.0.0.236/trunk@124156 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 02:39:12 +00:00
jj%netscape.com
68cac7cd8d forgot to set the postlinker to "Output Flags Post Linker" and set the "HasBundle" bit
git-svn-id: svn://10.0.0.236/trunk@124154 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 01:52:58 +00:00
peterlubczynski%netscape.com
bb8b77bf2b Fixing some plugins don't understand the DATA attribute on the OBJECT tag so in those cases copy that value to an appened "SRC" entry to the array of attributes/parameters plugins are passed. Bug 152334 r=av sr=waterson
git-svn-id: svn://10.0.0.236/trunk@124153 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 01:51:34 +00:00
harishd%netscape.com
cba309a0c0 Make marquee tag a block level element. b=154173, r=heikki, sr=jst
git-svn-id: svn://10.0.0.236/trunk@124152 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 01:49:38 +00:00
jst%netscape.com
203901ab68 Fixing potential crasher introduced by the original fix for bug 150087. The weak docshell pointer in the navigator object must be cleared when it's released. r=sicking@netscape.com, sr=alecf@netscape.com
git-svn-id: svn://10.0.0.236/trunk@124151 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 01:27:00 +00:00
alecf%netscape.com
9a41c0163b yay remove appshell -> rdf now that bug 132175 is fixed
not part of build


git-svn-id: svn://10.0.0.236/trunk@124148 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 00:29:10 +00:00
jpierre%netscape.com
080a53305e Fix for 154212 - make CERT_SaveSMimeProfile copy the cert to the database if it comes from an external source
git-svn-id: svn://10.0.0.236/trunk@124144 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 00:18:35 +00:00
dbaron%fas.harvard.edu
72fa987cbf Fix nmake bustage. b=132175
git-svn-id: svn://10.0.0.236/trunk@124143 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-27 00:06:49 +00:00
alecf%netscape.com
5e8f5af9e5 argh, I'm having a bad day - just noticed at the last second that the values of PR_FALSE and PR_TRUE were reversed here, so we only could hit the first window from the window menu
git-svn-id: svn://10.0.0.236/trunk@124142 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 23:57:59 +00:00
alecf%netscape.com
a0da5f8a04 oops, more files for bug 132175 (don't worry, these aren't bustage-inducing)
finish implementation of GetWindowForResource
r=bnesse, rs=waterson


git-svn-id: svn://10.0.0.236/trunk@124141 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 23:54:31 +00:00
pinkerton%netscape.com
9bfc5fdcd0 Change profile name back to chimera
git-svn-id: svn://10.0.0.236/trunk@124139 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 23:41:16 +00:00
alecf%netscape.com
6e63b2898f argh, add nsIWindowMediatorListener.idl to the nmake build
git-svn-id: svn://10.0.0.236/trunk@124138 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 23:36:46 +00:00
alecf%netscape.com
104fdb252d argh, now re-remove the line that I was originally intending to remove!
git-svn-id: svn://10.0.0.236/trunk@124137 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 23:34:42 +00:00
alecf%netscape.com
a5a2431862 back out these two files until I get the #ifdef situation cleared up
git-svn-id: svn://10.0.0.236/trunk@124136 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 23:32:09 +00:00
naving%netscape.com
b1bcf6fb22 153982 r=cavin sr=bienvenu Making drag and drop of imap to local and local to local folders work for non-ascii
and special ascii chars folder names work.


git-svn-id: svn://10.0.0.236/trunk@124135 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 23:21:28 +00:00
sicking%bigfoot.com
1bf6d687de Bug 88623: Remove the txList::iterator function and the ListIterator typedef
r=peterv sr=jst


git-svn-id: svn://10.0.0.236/trunk@124134 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 23:09:13 +00:00
alecf%netscape.com
5afc1a8426 final part of fix for bug 132175 - switch consumers over to new interface
r=bnesse, rs=waterson


git-svn-id: svn://10.0.0.236/trunk@124133 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 22:55:49 +00:00
alecf%netscape.com
9345c5817f add deprecation comment - now that we have a new guide.
doc only, no code, no review


git-svn-id: svn://10.0.0.236/trunk@124132 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 22:53:36 +00:00
alecf%netscape.com
da39ef1fe1 part of fix for bug 132175 - add nsWindowMediatorDataSource to the build
r=bnesse, rs=waterson


git-svn-id: svn://10.0.0.236/trunk@124131 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 22:34:39 +00:00
alecf%netscape.com
7fd62c0521 rest of fix for bug 132175 - move windowlist part of the window mediator into a seperate object (nsWindowDataSource) so that appshell is no longer dependent on RDF.
r=bnesse, sr=waterson


git-svn-id: svn://10.0.0.236/trunk@124130 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 22:34:09 +00:00
alecf%netscape.com
71d739a51e more stuff for bug 132175, add nsIWindowMediatorListener.idl to build
r=bnesse, rs=waterson


git-svn-id: svn://10.0.0.236/trunk@124129 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 22:25:31 +00:00
alecf%netscape.com
b6c2e7d426 part of fix for bug 132175 - add nsIWindowDataSource to the build r=bnesse rs=waterson
git-svn-id: svn://10.0.0.236/trunk@124128 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 22:22:01 +00:00
pinkerton%netscape.com
a32d343c85 Landing file rewrite changes for conrad
git-svn-id: svn://10.0.0.236/trunk@124127 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 21:59:47 +00:00
sicking%bigfoot.com
aeb31e27bc Bug 153600: Make <script>s with neither src attribute or childNodes not block the parser.
r=bz sr=jst


git-svn-id: svn://10.0.0.236/trunk@124123 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 21:07:37 +00:00
pinkerton%netscape.com
d00025748d don't enable 'find again' unless the user has done a 'find' first. (bug 153643)
git-svn-id: svn://10.0.0.236/trunk@124122 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 21:06:17 +00:00
caillon%returnzero.com
a57921536a Bug 154401. Cannot paste HTML on clipboard into composition or editor windows.
r=bzbarsky, sr=kin


git-svn-id: svn://10.0.0.236/trunk@124121 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 21:05:00 +00:00
pinkerton%netscape.com
42302ee9b4 Fix command updating in edit menu. (bug 154291)
git-svn-id: svn://10.0.0.236/trunk@124120 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 20:52:38 +00:00
cltbld%netscape.com
7c16f21282 Adding chimera_build_static, chimera_build_opt to help minimize script hacking.
git-svn-id: svn://10.0.0.236/trunk@124118 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 20:39:43 +00:00
blizzard%redhat.com
47cd6ed172 Bug #154348. Clipboard hangs when pasting to another application. Don't double free a string. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@124117 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 20:26:21 +00:00
leaf%mozilla.org
1e7e092b20 Automated update
git-svn-id: svn://10.0.0.236/trunk@124116 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 20:25:44 +00:00
dougt%netscape.com
fb1af816bd missing quote mark on XPCOM_GLUE_LIBS
git-svn-id: svn://10.0.0.236/trunk@124115 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 20:16:12 +00:00
shanjian%netscape.com
5d4ba0c34e #153980 Always display SimpChinese font as bold looking face
add simsun to simplied chinese default font name.
r=ftang, sr=blizzard


git-svn-id: svn://10.0.0.236/trunk@124114 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 20:09:14 +00:00
nhotta%netscape.com
b6d6d1447f Change default font size for Traditional and Simplifiled Chinese to 15
which let gfx to use 12 point instead of 13 for Quickdraw calls,
bug 143557, r=ftang, sr=sfraser.


git-svn-id: svn://10.0.0.236/trunk@124113 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 19:59:47 +00:00
nhotta%netscape.com
f253e32fcf Remove the unintended check in by rev=1.33,
bug 151907, r=ftang, sr=sfraser.


git-svn-id: svn://10.0.0.236/trunk@124112 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 19:57:28 +00:00
pinkerton%netscape.com
4787211262 Remove view->page info since it's not hooked up to anything
git-svn-id: svn://10.0.0.236/trunk@124111 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 19:54:07 +00:00
pinkerton%netscape.com
0cebb32e16 Remove personal prefs from list since they're not implemented
git-svn-id: svn://10.0.0.236/trunk@124110 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 19:52:16 +00:00
alecf%netscape.com
d8f4cf294a cleanup after the first fix for bug 154275 - handle errors better and get rid of mCount entirely
sr=jst, r=peterv


git-svn-id: svn://10.0.0.236/trunk@124109 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 19:36:24 +00:00
pschwartau%netscape.com
41c58a87db Correcting grammar in comment.
git-svn-id: svn://10.0.0.236/trunk@124108 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 19:16:53 +00:00
pschwartau%netscape.com
267cfc6c79 Initial add. Regression test for bug 154338.
git-svn-id: svn://10.0.0.236/trunk@124106 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 19:04:00 +00:00
mostafah%oeone.com
c0d269dc29 Adding parse of calendar file for VTODOs in the setserver function
git-svn-id: svn://10.0.0.236/trunk@124105 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 18:45:19 +00:00
mostafah%oeone.com
ad5dce3502 Adding new JS files
git-svn-id: svn://10.0.0.236/trunk@124104 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 18:44:27 +00:00
pinkerton%netscape.com
9608d2da6f Make viewSource work again. (bug 154413)
git-svn-id: svn://10.0.0.236/trunk@124103 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 17:30:22 +00:00
mikep%oeone.com
d67027bf10 Fixing bug 149291, problem with help menu for calendar.
git-svn-id: svn://10.0.0.236/trunk@124102 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 17:08:40 +00:00
pinkerton%netscape.com
ec1887864a booboo fix, fixes 152629 and 152903
git-svn-id: svn://10.0.0.236/trunk@124099 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 15:18:51 +00:00
mostafah%oeone.com
cd0a2db6d2 Adding URL property
git-svn-id: svn://10.0.0.236/trunk@124098 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 14:39:21 +00:00
kaie%netscape.com
ca7f2b6bb4 b=154240 security fix
r=javi sr=alecf


git-svn-id: svn://10.0.0.236/trunk@124097 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 14:15:11 +00:00
dcone%netscape.com
1ca2958b88 b=153456 r=kmmclusk sr=waterson. Took out a realizepalette call to stop some performance problems on windows. This
will effect only 256 color mode.


git-svn-id: svn://10.0.0.236/trunk@124096 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 13:43:23 +00:00
peterv%netscape.com
aa5f72e822 Bustage fix.
git-svn-id: svn://10.0.0.236/trunk@124095 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 13:17:12 +00:00
peterv%netscape.com
043c260894 Fix for bug 88623 (Cleanup Transformiix code). r=Pike, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@124094 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 12:42:13 +00:00
bbaetz%student.usyd.edu.au
2b8bfc61e5 Bug 154036 - ccing an invalid user on a bug posts the bug anyway
r=jouni, gerv


git-svn-id: svn://10.0.0.236/trunk@124093 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 12:17:25 +00:00
peterv%netscape.com
20ddec95d1 New files for bug 88623 (Cleanup Transformiix code). r=Pike, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@124090 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 10:37:02 +00:00
timeless%mac.com
b0d4d06151 Bug 126343 Can't drag attachment file into a new message
patch by antonio.xu@sun.com R=ducarroz sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@124084 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 07:36:59 +00:00
darin%netscape.com
72c614c38d fixes bug 149943 "prevent princeton exploit" r=dougt,mstoltz sr=dveditz
git-svn-id: svn://10.0.0.236/trunk@124083 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 06:35:38 +00:00
ben%netscape.com
ddd541db47 Fix for 86501 - bookmarks truncated when disk full
Make bookmarks check on the success of the file stream write before overwriting the old bookmarks file with the new one.
r=darin, sr=brendan


git-svn-id: svn://10.0.0.236/trunk@124082 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 05:18:41 +00:00
ben%netscape.com
86cd372634 Fix for 86501 - bookmarks truncated when disk full
allow file streams to store and report on the status of the write operation.
r=darin, sr=brendan


git-svn-id: svn://10.0.0.236/trunk@124081 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 05:17:54 +00:00
jj%netscape.com
e12af3346a bugscape #16402: new icons for Netscape installer, including 32-bit icns (custom icon)
git-svn-id: svn://10.0.0.236/trunk@124080 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 05:12:31 +00:00
jj%netscape.com
524eac8eff setting "custom icon" Finder flag to enable 32-bit icon for the installer
git-svn-id: svn://10.0.0.236/trunk@124079 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 05:10:46 +00:00
racham%netscape.com
57b8574438 Fixing bug 154274. When certificate is pre-configured, other elements associated with it should be lockable. This patch provides that ability. r=naving, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@124078 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 05:09:39 +00:00
av%netscape.com
a5938760b0 Bug 148889 -- unloading XPConnected plugin DLLs may cause crash [ViewPoint], r=peterl, sr=beard
git-svn-id: svn://10.0.0.236/trunk@124077 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 04:32:49 +00:00
alecf%netscape.com
2a546013ba bug 154280 - remove unimplemented operators from nsISupportsArray
r=dougt, sr=dveditz


git-svn-id: svn://10.0.0.236/trunk@124076 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 03:48:08 +00:00
alecf%netscape.com
8a015a6cb7 make nsStaticNameTable use PLDHash rather than nsHashtable, to reduce startup allocations from 1315 to 2
r=dougt, sr=dveditz
bug 154275


git-svn-id: svn://10.0.0.236/trunk@124075 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 03:46:39 +00:00
alecf%netscape.com
1a0216d3f1 ack! fix check of entries to use PL_DHASH_ENTRY_IS_FREE() from my previous checkin to prevent tree closure tomorrow!
git-svn-id: svn://10.0.0.236/trunk@124074 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 03:43:43 +00:00
dbaron%fas.harvard.edu
7e821aaa94 Convert handwritten GetIID methods to use NS_DEFINE_STATIC_IID_ACCESSOR and add |const| to GetCID methods so that static |nsID|s are declared as |const|. b=153525 sr=jag r=bryner
git-svn-id: svn://10.0.0.236/trunk@124073 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 03:38:55 +00:00
kyle.yuan%sun.com
433814b965 Bug 152786 The framework of new event interface between nsIAccessible and ATK
forgot to check in this file.


git-svn-id: svn://10.0.0.236/trunk@124072 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 03:33:16 +00:00
leaf%mozilla.org
d64bccb371 Automated update
git-svn-id: svn://10.0.0.236/trunk@124070 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 03:10:34 +00:00
dbaron%fas.harvard.edu
617f00d148 Build changes to build mach-o on gcc3: use -install_name option only when linking using -dynamiclib option, since with gcc3 it causes an error when used with -bundle or -execute. r=bryner sr=beard b=153525
git-svn-id: svn://10.0.0.236/trunk@124069 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 03:09:32 +00:00
dbaron%fas.harvard.edu
011a3b99d5 Build changes to build mach-o on gcc3: link asdecode with $(CXX) instead of $(CC). r=bryner sr=beard b=153525
git-svn-id: svn://10.0.0.236/trunk@124068 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 03:07:16 +00:00
dbaron%fas.harvard.edu
834cab4048 Cast for a conditional expression that won't otherwise compile on gcc3. r=bryner sr=beard b=153525
git-svn-id: svn://10.0.0.236/trunk@124067 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 03:02:38 +00:00
dbaron%fas.harvard.edu
841e7fcc0e xptcall porting changes for Darwin gcc3: account for different vtable layout and different symbol mangling, in ifdefs. r=bryner sr=beard b=153525
git-svn-id: svn://10.0.0.236/trunk@124066 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 03:01:02 +00:00
shanjian%netscape.com
e920908386 #149417 Auto-detect Chinese doesn't work
Eliminate gb18030 when considering apply frequence analysis.
r=ftang, sr=jst


git-svn-id: svn://10.0.0.236/trunk@124065 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 02:10:15 +00:00
kyle.yuan%sun.com
418bf748bc Bug 149856 [XBLFC] Active Accessibility: support XBL-based HTML button
r=aaronl, sr=jst


git-svn-id: svn://10.0.0.236/trunk@124064 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 01:53:11 +00:00
alecf%netscape.com
91708c91f6 remove a bunch more dead code from XPCOM - stringstream stuff that nobody was using anyway
r=dougt, sr=dveditz


git-svn-id: svn://10.0.0.236/trunk@124063 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 01:40:31 +00:00
alecf%netscape.com
b39a907034 fix for bug 153754 - make nsPersistentProperties (and thus string bundles) use PLDHash, saving some 1100+ allocations at startup.
r=dougt, sr=dveditz


git-svn-id: svn://10.0.0.236/trunk@124062 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 01:33:07 +00:00
arougthopher%lizardland.net
57d889d6b1 Bug#152097
"Windows" key not handled

isMeta was always false on keyboard events.  we can now use the "windows" key

r=serget@fi.tartu.ee


git-svn-id: svn://10.0.0.236/trunk@124061 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 01:31:06 +00:00
mkaply%us.ibm.com
9ebb13e6eb IRIX bustage - this is a C file
git-svn-id: svn://10.0.0.236/trunk@124060 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 01:20:20 +00:00
waldemar%netscape.com
c34c4debd7 Removed abstract methods
git-svn-id: svn://10.0.0.236/trunk@124059 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 01:12:09 +00:00
bryner%netscape.com
8814e22684 Removing files that really don't need to be in Contents/Resources.
git-svn-id: svn://10.0.0.236/trunk@124058 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 00:56:15 +00:00
serge%netscape.com
78d913a97d fix for 153547 crashed on page view - Trunk [@ nsPluginInstancePeerImpl::GetOwner] r=av,sr=beard
git-svn-id: svn://10.0.0.236/trunk@124056 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 00:42:25 +00:00
dveditz%netscape.com
2f0dcf4edc InstallTrigger.compareVersion() returns correct answer for directories (bug 136779) r=curt,sr=alecf
git-svn-id: svn://10.0.0.236/trunk@124055 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 00:41:06 +00:00
naving%netscape.com
2be4abd701 154000 r=cavin sr=bienvenu fixing can't move non-ascii imap subfolders and one assertion in AddSubfolderWithPath
on doing such a move.


git-svn-id: svn://10.0.0.236/trunk@124054 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 00:39:50 +00:00
shrutiv%netscape.com
b36b8f83f6 Fix for bugscape bug 11275: Update CCK version strings to 7.0 (r=mitchf)
git-svn-id: svn://10.0.0.236/trunk@124052 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 00:05:32 +00:00
akkana%netscape.com
f9a0b8ae70 126259: don't force a linebreak after img tags. Patch from burpmaster@truffula.net, r=akkana, sr=kin
git-svn-id: svn://10.0.0.236/trunk@124051 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-26 00:04:53 +00:00
timeless%mac.com
d82a6cb235 Bug 125090 Bad tag enum passed to CNavDTD::IntTagToStringTag()!!: 'str_ptr',
r=bz sr=jst
so much for consistency, the bug fix was errant in its parallelism and caused a crash
thanks to jonsmirl@yahoo.com for pointing out the correct index var


git-svn-id: svn://10.0.0.236/trunk@124050 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 23:49:02 +00:00
ssu%netscape.com
563a25a8b3 fixing bug 152895 - msg header pane loses focus. r=ducarroz, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@124049 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 23:46:43 +00:00
katakai%japan.sun.com
0c61f042fd bug 152790
tis620-2 is not defined as th language group
added tis620-2=th into charsetData.properties
r=ftang,sr=sfraser


git-svn-id: svn://10.0.0.236/trunk@124048 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 23:37:38 +00:00
kaie%netscape.com
d189f67974 b=154084 entering/leaving secure site alert pops up incessantly
r=javi sr=alecf


git-svn-id: svn://10.0.0.236/trunk@124047 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 23:32:42 +00:00
bzbarsky%mit.edu
b2c75a6476 Fix stretched icon. Bug 110456, patch by Chris Brien
<christopher_brien@hotmail.com>, r=bzbarsky,ssaux, sr=alecf


git-svn-id: svn://10.0.0.236/trunk@124046 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 23:29:48 +00:00
katakai%japan.sun.com
1de7967a25 bug 146658
unable to load ./libmozpango-thaix.so
modified pango.modules
r=Roland.Mainz@informatik.med.uni-giessen.de,sr=sfraser


git-svn-id: svn://10.0.0.236/trunk@124045 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 23:27:48 +00:00
shrutiv%netscape.com
3591cf3a12 Fix for bug 112977: CCK Linux installer will not run on Linux when
config.ini size is at 12388 bytes (r=mitchf)


git-svn-id: svn://10.0.0.236/trunk@124042 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 23:05:10 +00:00
relyea%netscape.com
424861117d Initialize type field to clear off purify warnings.
git-svn-id: svn://10.0.0.236/trunk@124041 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 23:00:59 +00:00
cavin%netscape.com
bc5d579da8 Fix for 119992. Enable the Back button when canceling out of the ldif file selection dialog. Also enable the Back and Next buttons when canceling out of the 4.x profile file list dialog. r=naving, sr=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@124040 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 22:58:50 +00:00
relyea%netscape.com
2e45089ac4 Don't force the update if the cert doesn't already exist.
git-svn-id: svn://10.0.0.236/trunk@124038 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 22:58:13 +00:00
aaronl%netscape.com
faaa4a7e41 Bug 142549. After find, spacebar doesn't scroll page. r=bryner, sr=kin. Bug 102679. Composer loses focus after image delete. r=kyle, sr=kin
git-svn-id: svn://10.0.0.236/trunk@124037 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 22:57:48 +00:00
relyea%netscape.com
ca3e3c1b06 Collect the full names of the certs, not just the stan names.
git-svn-id: svn://10.0.0.236/trunk@124036 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 22:57:22 +00:00
aaronl%netscape.com
5d57884434 Bug 153196. Active Accessibility: support MSAA caret object and events. r=kyle, sr=kin
git-svn-id: svn://10.0.0.236/trunk@124034 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 22:54:23 +00:00
morse%netscape.com
49be84943d bug 153581, move cookie properties file from wallet directory to cookie directory, r=brade, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@124033 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 22:33:44 +00:00
relyea%netscape.com
ca4e1df93c Add new function which returns the NSS 3.4 style nickname directly from a
NSSCertificate structure.


git-svn-id: svn://10.0.0.236/trunk@124032 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 22:33:37 +00:00
sfraser%netscape.com
bf14218920 Undoing objects.nib corruption caused by checking in using MacCVS Pro
git-svn-id: svn://10.0.0.236/trunk@124031 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 22:31:36 +00:00
dprice%netscape.com
83f5fd8286 154220 r=curt sr=dveditz
don't show 'setup paused' dialog when invalid http response code


git-svn-id: svn://10.0.0.236/trunk@124030 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 22:24:03 +00:00
jst%netscape.com
11fd8b4a06 Fixing bug 129622. Make comparing an XPConnect wrapped native object to a number (<, >, ==, ...) in JS always return falase. r=dbradley@netscape.com, sr=jband@netscape.com
git-svn-id: svn://10.0.0.236/trunk@124028 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 22:14:58 +00:00
rods%netscape.com
d5d3234fab We do not want to skip page ejects when printing the selection
BUg 153964 r=dcone sr=kin


git-svn-id: svn://10.0.0.236/trunk@124026 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 22:11:56 +00:00
sfraser%netscape.com
b4fd9a92a1 Fixing bug 154069; hooking up additional find options. Also did some file detabbing. r=ccarlen/pinkerton.
git-svn-id: svn://10.0.0.236/trunk@124025 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 22:08:33 +00:00
pinkerton%netscape.com
2a4abd365d Added ability to show/hide personal toolbar and persist (bug 149725)
git-svn-id: svn://10.0.0.236/trunk@124024 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 22:06:09 +00:00
sfraser%netscape.com
fac1614754 Fixing bug 154069; hooking up additional find options. Also did some file detabbing. r=ccarlen/pinkerton.
git-svn-id: svn://10.0.0.236/trunk@124022 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 21:53:27 +00:00
dbaron%fas.harvard.edu
b1b9817c5d Set up preference style rules before any frame creation happens. b=148414 r=bryner sr=waterson
git-svn-id: svn://10.0.0.236/trunk@124020 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 21:21:48 +00:00
dbaron%fas.harvard.edu
7c4652cc16 Split strict mode into almost-standards and full-standards mode, where the only quirk in almost standards mode is the quirky inline box model. Remove previous fix for bug 151620. Tweak mode detection to use almost-standards for XHTML Transitional, HTML 4.01 transitional with system ID, and for IBM system DOCTYPE. b=153032 r=karnaze, bzbarsky, harishd sr=waterson
git-svn-id: svn://10.0.0.236/trunk@124017 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 21:16:17 +00:00
bnesse%netscape.com
acbe281411 Fix for bug 153622. Remove macxprefs (no longer used) from the build. r=ccarlen, sr=sfraser.
git-svn-id: svn://10.0.0.236/trunk@124013 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 20:05:48 +00:00
caillon%returnzero.com
fd710e312e Speed up and move the helper functions in nsRange to nsContentUtils and make compareTreePosition() faster.
Bug 144014 r=bzbarsky sr=jst


git-svn-id: svn://10.0.0.236/trunk@124012 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 20:03:06 +00:00
mkaply%us.ibm.com
237c9d2ad9 No bug - fix scrollbar regressions caused by remove of nsCanvas
git-svn-id: svn://10.0.0.236/trunk@124011 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 19:46:21 +00:00
ian.mcgreer%sun.com
5bbb4298d4 two more places to dump templates
git-svn-id: svn://10.0.0.236/trunk@124010 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 19:40:16 +00:00
timeless%mac.com
96eae3a010 Bug 125411 [NuBus] Mac installer crashes with a type 12 error (SleepQInstall)
r=sfraser sr=beard
thanks to tim@maroney.org (see bug 138156)


git-svn-id: svn://10.0.0.236/trunk@124009 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 19:39:08 +00:00
bryner%netscape.com
815bc9a462 Fixing the problem where URL's containing certain characters won't load, by removing uses of NSURL (which has escaping conventions that are incompatible with nsIURI) internally, replacing it with NSString. Bug 147914, r=pink.
git-svn-id: svn://10.0.0.236/trunk@124008 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 19:25:27 +00:00
pinkerton%netscape.com
6b6816d5c4 Fix crash when trying to save page source, though it still doesn't work (bug 15204)
git-svn-id: svn://10.0.0.236/trunk@124007 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 19:23:16 +00:00
tor%cs.brown.edu
9aa3dc8721 Bug 150041 - turn on do_fancy_upsampling for higher quality decoding.
r=pavlov, sr=blizzard


git-svn-id: svn://10.0.0.236/trunk@124006 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 18:28:09 +00:00
pinkerton%netscape.com
e307ff1bc0 Fix a slew of bookmark dnd bugs in the sidebar and personal toolbar. (bug 143094)
git-svn-id: svn://10.0.0.236/trunk@124005 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 18:21:07 +00:00
mostafah%oeone.com
5ba1277bc6 Renaming "category" field to "categories" to reflect the standard usage
git-svn-id: svn://10.0.0.236/trunk@124004 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 18:09:18 +00:00
ian.mcgreer%sun.com
d59ab30e97 fix AIX builds, 64-bit compiler chokes on large switches in debug builds
git-svn-id: svn://10.0.0.236/trunk@124003 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 16:57:40 +00:00
timeless%mac.com
3a461afe2b Bug 154086 Want /css to display current css setting
patch by neil@parkwaycc.co.uk r=rginda


git-svn-id: svn://10.0.0.236/trunk@124002 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 14:32:39 +00:00
mostafah%oeone.com
118af15fda Adding filter functionality for getTodos
git-svn-id: svn://10.0.0.236/trunk@124001 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 13:50:39 +00:00
bbaetz%student.usyd.edu.au
c1b2445e4e Bug 157085 - verify-new-product doesn't set defaults
r=jouni, gerv


git-svn-id: svn://10.0.0.236/trunk@124000 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 10:08:57 +00:00
bbaetz%student.usyd.edu.au
2ea1819330 Bug 154030 - Handle directory index page title correctly
r=dougt, sr=darin


git-svn-id: svn://10.0.0.236/trunk@123999 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 07:51:05 +00:00
jay.yan%sun.com
735b4e8efd bug 153805, Gtk2 double buffer makes carets misbehave in mozilla(gtk2) patch=robin.lu, r=blizzard, this part is not part of default build.
git-svn-id: svn://10.0.0.236/trunk@123998 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 07:07:18 +00:00
bernd.mielke%snafu.de
95201415ad bug 151888 - use SafeElementAt as we use it in all other places r=karnaze sr=kin
git-svn-id: svn://10.0.0.236/trunk@123997 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 06:58:49 +00:00
timeless%mac.com
c865cd2a92 Bug 125090 Bad tag enum passed to CNavDTD::IntTagToStringTag()!!: 'str_ptr',
r=bz sr=jst


git-svn-id: svn://10.0.0.236/trunk@123996 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 06:47:53 +00:00
stephend%netscape.com
ee9c9b6cc4 Bug 149201. Center text in bookmark properties dialog. Patch by Stephen Walker <walk84@yahoo.com> r=caillon@netscape.com, sr=alecf@netscape.com
git-svn-id: svn://10.0.0.236/trunk@123994 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 06:06:46 +00:00
curt%netscape.com
675f88fdcf Support for Screen Reader
(Bug #104477, r=price, sr=dveditz)


git-svn-id: svn://10.0.0.236/trunk@123991 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 05:39:36 +00:00
curt%netscape.com
f0514d9184 Support in the listbox for Screen Readers
(Bug 10477, r=ssu, sr=dveditz, mozilla1.0.1+)


git-svn-id: svn://10.0.0.236/trunk@123990 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 05:36:22 +00:00
kyle.yuan%sun.com
0477aaf57b Bug 152786 The framework of new event interface between nsIAccessible and ATK
r=aaronl, sr=jst


git-svn-id: svn://10.0.0.236/trunk@123989 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 05:04:17 +00:00
bryner%netscape.com
eac3accf28 Don't set an initial title on the browser window, since we re-set it when a page loads.
git-svn-id: svn://10.0.0.236/trunk@123988 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 04:53:49 +00:00
jaggernaut%netscape.com
1d2361804a Bug 150099: Hide the tab bar when clicking the close box, add show/hide menuitem for tabbar. r=bryner, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@123986 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 04:52:46 +00:00
bryner%netscape.com
294c6fce96 Don't hardcode the number of frames in the throbber animation.
git-svn-id: svn://10.0.0.236/trunk@123985 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 04:47:58 +00:00
dougt%netscape.com
5fa0efb987 status ignored on OnDataWritable. 153414. r=me, sr=darin
git-svn-id: svn://10.0.0.236/trunk@123980 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 02:57:00 +00:00
aaronl%netscape.com
9240563bd9 Active Accessibility: XUL property pages (tab panels) should not report themselves as STATE_FOCUSABLE
git-svn-id: svn://10.0.0.236/trunk@123978 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 02:41:44 +00:00
serge%netscape.com
eb675ba4c8 fix for #149336 Linux Flash crashes and causes stack curruption in NPP_New when swLiveconnect=TRUE, r=av/Roland.Mainz,sr=darin
git-svn-id: svn://10.0.0.236/trunk@123974 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 01:29:59 +00:00
naving%netscape.com
e2a7130e41 151699 r=cavin sr=bienvenu If copying berkeley mailbox or summary file fails, bail out. This fixes losing
local folders when we try to move them and have insufficient disk space


git-svn-id: svn://10.0.0.236/trunk@123973 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 01:14:31 +00:00
naving%netscape.com
5c3cb24f7a 153943 r=cavin sr=bienvenu Increasing width of filterEditor dialog by 50 pixels, so that cancel|help
buttons don't get truncated.


git-svn-id: svn://10.0.0.236/trunk@123972 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 01:10:35 +00:00
depstein%netscape.com
06ea59bc4b added support for webProgress flags for AddWebProgressListener()
git-svn-id: svn://10.0.0.236/trunk@123971 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-25 00:41:01 +00:00
relyea%netscape.com
db66460cc5 Fix solaris compiler error/warning. Fix prototype to return correct value (PRBool not PRStatus).
git-svn-id: svn://10.0.0.236/trunk@123969 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 23:54:16 +00:00
kaie%netscape.com
cd78156f1e b=87902 Cannot reach TLS intolerant servers through SSL proxy.
r=javi sr=darin


git-svn-id: svn://10.0.0.236/trunk@123965 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 23:02:08 +00:00
yokoyama%netscape.com
df515d1752 Bug 153470
Use IsDBCSLeadByteEx() instead of IsDBCSLeadByte()
to allow specifying the current IME code point.
IME input method improvement
/r=shanjian;/sr=kin


git-svn-id: svn://10.0.0.236/trunk@123964 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 22:49:25 +00:00
relyea%netscape.com
b64d478e29 Don't decode or extract trust for certs if we are just getting the nicknames -- particularly for user certs.
git-svn-id: svn://10.0.0.236/trunk@123959 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 22:36:59 +00:00
ian.mcgreer%sun.com
d4431cf4c6 fix broken AIX builds
git-svn-id: svn://10.0.0.236/trunk@123958 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 22:29:12 +00:00
ian.mcgreer%sun.com
2346e1ae15 log more mechanisms and templates
git-svn-id: svn://10.0.0.236/trunk@123957 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 22:22:57 +00:00
cavin%netscape.com
a8e09c3c68 Fix for 153220. Back out the patch of bug 144141 (a dup of bug 123719). r=naving, sr=mscott.
git-svn-id: svn://10.0.0.236/trunk@123956 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 22:20:10 +00:00
pschwartau%netscape.com
8f331d44a3 Adjusting FAST constant upward again, so that test can pass in Rhino. 100 ms seems like a reasonable value.
git-svn-id: svn://10.0.0.236/trunk@123955 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 22:14:48 +00:00
relyea%netscape.com
e75b9bf3b7 Copy the type value as well as the rest.
git-svn-id: svn://10.0.0.236/trunk@123954 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 21:57:27 +00:00
relyea%netscape.com
aa413cb2ba More performance improvements for PK11ListCerts/ CERT_GetUserCertByUsage().
git-svn-id: svn://10.0.0.236/trunk@123953 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 21:54:41 +00:00
blakeross%telocity.com
caa7c66928 132027 - no menus work when download manager window has focus. patches by bryner and I. r=bryner/blake sr=ben/dveditz
git-svn-id: svn://10.0.0.236/trunk@123952 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 21:48:24 +00:00
mscott%netscape.com
d65d08cc92 Bug #153500 --> fix a regression caused by Bug #146559. Don't set the performing biff flag to true
when the user hits get new mail. It causes windows biff notifications to come up when the user initiated
the fetch which is annoying.

r=ere@atp.fi
sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@123950 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 21:44:58 +00:00
hewitt%netscape.com
ba1de533d0 151716 - fixing some annoying autocomplete problems, most importantly that escape should work to undo typing, and fixes some situations where the popup would appear and not go away, r=pink
git-svn-id: svn://10.0.0.236/trunk@123947 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 21:20:55 +00:00
kin%netscape.com
5817b5739c Fix for bug 152435 (Memory leak of 36 bytes from 1 block allocated in TypeInState::ClearProp)
Call Reset() in ~TypeInState() to release any data that may be in mClearedArray and mSetArray.

r=jfrancis@netscape.com  sr=sfraser@netscape.com


git-svn-id: svn://10.0.0.236/trunk@123932 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 20:02:25 +00:00
heikki%netscape.com
7bafc16ab3 Bug 151933, xml:base should call CheckLoadURI like HTML base. r=harishd, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@123931 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 19:53:50 +00:00
bryner%netscape.com
c4ea7ee755 Removing this file, it's dead. r=sfraser.
git-svn-id: svn://10.0.0.236/trunk@123930 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 19:45:41 +00:00
pinkerton%netscape.com
7893c66a21 Break cycle with throbber so that we no longer crash when animating the
throbber and closing a window, or continue loading the page after the
window has gone away. (bug 153421)


git-svn-id: svn://10.0.0.236/trunk@123929 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 19:33:45 +00:00
ashishbhatt%netscape.com
3fb8d58b92 Updated testEmbed for MRE application support. Changed files testembed.cpp, winfilelocprovider.cpp & .h
git-svn-id: svn://10.0.0.236/trunk@123928 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 19:32:18 +00:00
pinkerton%netscape.com
e5f2c53ab4 add kathy and conrad
git-svn-id: svn://10.0.0.236/trunk@123925 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 17:10:29 +00:00
blizzard%redhat.com
f450e08565 Mai is fixed. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@123924 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 14:35:43 +00:00
blizzard%redhat.com
5fbf79f7bb Bug #153788. Unscrew the gtk2 build. r=bryner,sr=jst
git-svn-id: svn://10.0.0.236/trunk@123923 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 14:16:03 +00:00
colin%theblakes.com
baebc923ae Initial publish support for OpenVMS. b=22299 r=bbaetz sr=scc
git-svn-id: svn://10.0.0.236/trunk@123922 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 14:00:45 +00:00
peterv%netscape.com
9145988f99 Fix for bug 153757 (hasAttribute on a HTML label crashes). r=caillon, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@123921 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 11:07:07 +00:00
timeless%mac.com
870dbacfc0 Bug 138019 radio form control images should have flex="1"
r=andreww sr=jst


git-svn-id: svn://10.0.0.236/trunk@123920 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 07:44:04 +00:00
dveditz%netscape.com
3df1d271c4 Don't reveal full plugin pathname (bug 88183) r=peterl, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@123919 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 07:17:42 +00:00
khanson%netscape.com
e76ec12e0a patch 88484 for bug 14044. checks for out of memory conditon in jsdtoa.c. sr=brendan, r=khanson
git-svn-id: svn://10.0.0.236/trunk@123918 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 06:14:02 +00:00
timeless%mac.com
7fb41ca544 Bug 95295 If imap server is named "imap" you can't emtpy your trash.
patch by jk@tools.de r=morten@nilsen.com sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@123916 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 04:31:41 +00:00
bryner%netscape.com
403f29b5fd Fixing a crash resulting from my checkin for bug 138237. Instead of causing an initial reflow so that we can dispatch the focus event, just update the focus controller's state. r=alexsavulov, sr=blake.
git-svn-id: svn://10.0.0.236/trunk@123915 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 04:16:49 +00:00
jay.yan%sun.com
ee13affff3 bug 145864, Implementation of Basic Object interface for MAI patch=bolian missing modification of nsMaiHook.h Not part of default build
git-svn-id: svn://10.0.0.236/trunk@123913 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 03:05:39 +00:00
kyle.yuan%sun.com
86dfb17197 Bug 151048 Implemetation of nsIAccessibleText
second step: other files


git-svn-id: svn://10.0.0.236/trunk@123910 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 01:22:35 +00:00
kyle.yuan%sun.com
924b21f4ac Bug 151048 Implemetation of nsIAccessibleText
r=aaronl, sr=jst
first step: the new files


git-svn-id: svn://10.0.0.236/trunk@123909 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-24 01:13:56 +00:00
blizzard%redhat.com
8e616b1053 Bug #122429. Use packed bitfields in nsWindow class. Patch from Brian Tarricone <bjt23@cornell.edu>. Not part of the default build.
git-svn-id: svn://10.0.0.236/trunk@123907 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-23 23:35:19 +00:00
blizzard%redhat.com
8d305598c6 Turn off MAI until it builds again. Not part of the default build.
git-svn-id: svn://10.0.0.236/trunk@123906 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-23 23:33:53 +00:00
alecf%netscape.com
20b069df40 fix really strange btek bustage
git-svn-id: svn://10.0.0.236/trunk@123905 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-23 18:42:50 +00:00
jouni%heikniemi.net
9a84dddba5 Bug 152632: My bugs query doesn't use the mybugstemplate parameter. Also removes the My Bugs query from the index page.
Patch by m@lcolm.org.uk (Malcolm Scott), r=jouni,gerv


git-svn-id: svn://10.0.0.236/trunk@123902 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-23 17:34:14 +00:00
alecf%netscape.com
0aa661f605 fix pending OS/2 bustage
git-svn-id: svn://10.0.0.236/trunk@123901 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-23 17:08:31 +00:00
alecf%netscape.com
53a6a0a100 argh, fix pending mac bustage
git-svn-id: svn://10.0.0.236/trunk@123900 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-23 17:07:54 +00:00
alecf%netscape.com
dd97fa24d4 fix unix bustage
git-svn-id: svn://10.0.0.236/trunk@123899 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-23 17:04:46 +00:00
alecf%netscape.com
6e5f467c6a fix for bug 148180 - untangle intl dependencies by removing redundant code to load .properties files
instead, go through the string bundle service.
all intl libraries except the string bundle service are now free of necko dependencies
r=ftang, sr=jag


git-svn-id: svn://10.0.0.236/trunk@123898 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-23 16:05:35 +00:00
gerv%gerv.net
1648440ff0 Bug 152772 - buglist.cgi truncates emails at 45 characters. Patch by gerv; 2xr=bbaetz.
git-svn-id: svn://10.0.0.236/trunk@123897 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-23 15:14:13 +00:00
timeless%mac.com
0ee4d3d7c9 Bug 153431 Bug 127784 introduced doubles of lines in navigator.properties
r=mkaply, sr=dveditz


git-svn-id: svn://10.0.0.236/trunk@123896 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-23 14:48:34 +00:00
naving%netscape.com
5969e90906 152713 r=racham sr=mscott Made it so that "Unsent Messages" folder cannot be deleted from Edit | Delete folder
git-svn-id: svn://10.0.0.236/trunk@123894 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-23 04:25:44 +00:00
kyle.yuan%sun.com
a257201203 For Bug 146400 To merge nsIAccessibleSelectable and nsIAccessibleSelection.
I forgot to remove nsIAccessibleSelection.idl. We don't need this file any more.


git-svn-id: svn://10.0.0.236/trunk@123892 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-23 03:41:40 +00:00
jaggernaut%netscape.com
3574a5f2c0 Bug 112769: better "new tab" button for classic theme. r=bryner, sr=blake
git-svn-id: svn://10.0.0.236/trunk@123890 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-23 02:30:12 +00:00
blakeross%telocity.com
3b48ad6bcf 152387 - prefs for location bar autocomplete don't stick. r=caillon sr=ben
git-svn-id: svn://10.0.0.236/trunk@123889 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-23 02:05:17 +00:00
bbaetz%student.usyd.edu.au
465a750add Bug 150153 - ConnectToDatabase/quietly_check_login issues pt 2
r=jouni x2


git-svn-id: svn://10.0.0.236/trunk@123888 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-23 00:46:08 +00:00
alecf%netscape.com
f01f613a74 fix for bug 125617 - use the category manager instead of the registry to keep our list of encoders/decoders
r=dougt, sr=dveditz


git-svn-id: svn://10.0.0.236/trunk@123886 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-23 00:05:20 +00:00
jouni%heikniemi.net
6eefdb02ac Bug 153629: Clean up the HTML in the remembered query option knob section of the query page.
2xr=kiko


git-svn-id: svn://10.0.0.236/trunk@123884 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 23:56:00 +00:00
pinkerton%netscape.com
e282cfc306 use mac prefs instead of unix ones
git-svn-id: svn://10.0.0.236/trunk@123882 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 21:52:35 +00:00
pinkerton%netscape.com
09b9b08e16 Remap cookie prefs to be something chimera understands before we
get to the pref panel. Ignore p3p and foreign cookies.


git-svn-id: svn://10.0.0.236/trunk@123881 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 21:21:44 +00:00
alecf%netscape.com
c6574552b4 fix for bug 125617 - use the category manager instead of the registry to keep our list of encoders/decoders
r=dougt, sr=dveditz


git-svn-id: svn://10.0.0.236/trunk@123880 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 21:08:00 +00:00
jouni%heikniemi.net
b472d71283 Bug 150778: Remove an extraneous linefeed above initial bug comments (not visible in all browsers).
2xr=bbaetz


git-svn-id: svn://10.0.0.236/trunk@123879 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 21:03:21 +00:00
blakeross%telocity.com
85271a01ac 152910 - setting global history expiration to 0 doesn't actually disable global history. r=adamlock sr=alecf
git-svn-id: svn://10.0.0.236/trunk@123877 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 20:06:37 +00:00
blakeross%telocity.com
cb3c931d7b 142310 - topcrash quitting while downloading @ nsHashTable::Exists. r=bryner sr=ben
git-svn-id: svn://10.0.0.236/trunk@123876 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 19:47:14 +00:00
rogerl%netscape.com
1ef77d8221 Fixed whitespace testing. Fixed bug 122167 - $nn handling in replace.
git-svn-id: svn://10.0.0.236/trunk@123874 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 19:38:02 +00:00
dougt%netscape.com
53a062e477 Removing extra XPCOM_GLUE_LIBS define. Thanks dbaron for point this out r=me
git-svn-id: svn://10.0.0.236/trunk@123873 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 19:05:08 +00:00
dougt%netscape.com
f38d95f12c Fixing Mismatched new [] / delete []. r=me. bug=153584. patch from pj@ludd.luth.se.
git-svn-id: svn://10.0.0.236/trunk@123872 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 19:03:11 +00:00
wtc%netscape.com
cb4e9d6cca Bug 150157: DosWrite is not returning an error when the disk is full.
We can tell the write failed if we did a partial write.  The patch is
contributed by Michael Kaply <mkaply@us.ibm.com>.


git-svn-id: svn://10.0.0.236/trunk@123870 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 14:39:43 +00:00
bryner%netscape.com
31a0f0b03e Bump version string to 0.3.1.
git-svn-id: svn://10.0.0.236/trunk@123868 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 10:48:57 +00:00
jouni%heikniemi.net
38c487570e Bug 152283: Show votes by bug -list has a logged out footer.
2xr=bbaetz


git-svn-id: svn://10.0.0.236/trunk@123867 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 10:35:09 +00:00
dprice%netscape.com
02440b06f9 fixing bustage on the ports page
see 153524 for details


git-svn-id: svn://10.0.0.236/trunk@123866 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 08:43:24 +00:00
bryner%netscape.com
a5fa9e3d05 Enable prebinding (and automatic prebind updating at runtime) for static builds. r=pinkerton.
git-svn-id: svn://10.0.0.236/trunk@123865 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 06:28:20 +00:00
jay.yan%sun.com
2f09b1be65 bug 145864 Implementation of Basic Object Interface for MAI patch=bolian.yin r=aaronl sr=jst this change is not included in default build.
git-svn-id: svn://10.0.0.236/trunk@123862 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 04:52:38 +00:00
depstein%netscape.com
d966ee4185 updated some urls in nsIWebNav.cpp
git-svn-id: svn://10.0.0.236/trunk@123861 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 03:25:39 +00:00
nelsonb%netscape.com
9b6375ccb6 Fix bug 135261. Create symbolic names for the values 2 and 3 for the
SSL_REQUIRE_CERTIFICATE option.  Value 2 has always been the default.
New Value 3 is appropriate for servers that want to re-request, but
still not require, client-auth from a client with whom an SSL session
is already established.


git-svn-id: svn://10.0.0.236/trunk@123859 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 01:40:32 +00:00
sicking%bigfoot.com
47a022a475 Remove obsolete and potentially harmfull ctor from ProcessorState.
b=88623 r=peterv sr=jst


git-svn-id: svn://10.0.0.236/trunk@123858 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 01:27:40 +00:00
sicking%bigfoot.com
ffba89f8d6 Make us evaluate a <script> as soon as it's in the main tree and it either contains children or has the "src" attribute set. Also make sure that the same <script> is never evaluated twice.
Bug 26790, r=peterv, sr=jst


git-svn-id: svn://10.0.0.236/trunk@123856 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 01:16:14 +00:00
shrutiv%netscape.com
4a1fbdf8b6 Fix for bug 96916: Support easy way to add a few bookmarks via CCK
(r=smeredith)


git-svn-id: svn://10.0.0.236/trunk@123854 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 01:07:18 +00:00
cltbld%netscape.com
dda7fed28f Static build comment
git-svn-id: svn://10.0.0.236/trunk@123853 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 00:53:41 +00:00
rdayal%netscape.com
1f2d98ea0e bug # 104931 - moved LDAP modules to be installed with the browser instead of mail
r=dmose, sr=dveditz


git-svn-id: svn://10.0.0.236/trunk@123852 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 00:49:06 +00:00
depstein%netscape.com
7a1a30c84e updated webBrowserFind tests
a=asa for QA checkins that are not part of the default builds


git-svn-id: svn://10.0.0.236/trunk@123850 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 00:24:55 +00:00
despotdaemon%netscape.com
7f32c25ed0 Pseudo-automatic update of changes made by jouni@heikniemi.net.
git-svn-id: svn://10.0.0.236/trunk@123849 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 00:21:12 +00:00
shrutiv%netscape.com
007d2a0244 Fix for bug 96916: Support easy way to add a few bookmarks via CCK
(r=smeredith)


git-svn-id: svn://10.0.0.236/trunk@123848 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 00:20:48 +00:00
shrutiv%netscape.com
1ff6a2d8d0 Fix for bug 96916: Support easy way to add a few bookmarks via CCK
(r=smeredith)


git-svn-id: svn://10.0.0.236/trunk@123847 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 00:15:05 +00:00
despotdaemon%netscape.com
74a304ed3a Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@123845 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 00:12:17 +00:00
bryner%netscape.com
6348ad392d Reorganize the Darwin xptcall code so that it works correctly with prebinding:
- Move all functions into the text section.
 - Use m4 to generate the StubNNN() functions in the .s file, so that we don't have to use an indirect call to SharedStub (which would clobber r12, where we pass the method index).
 - Use indirect calls for calling invoke_count_words and invoke_copy_to_stack from inside XPTC_InvokeByIndex.

Bug 151978, r=pavlov, sr=beard.


git-svn-id: svn://10.0.0.236/trunk@123843 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 00:09:55 +00:00
cltbld%netscape.com
1bd51431df Wrapping pull & build with TestOnly, now --testonly flag will skip this for chimera build also.
git-svn-id: svn://10.0.0.236/trunk@123842 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-22 00:00:43 +00:00
nicolson%netscape.com
822dbf177a Fix 128259: Cannot get SSL trust for a CA residing on PKCS#11 module.
git-svn-id: svn://10.0.0.236/trunk@123840 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 23:53:58 +00:00
dprice%netscape.com
017b3b9a47 144288 - r=sgehani sr=dveditz
make libxpnet understand http response codes


git-svn-id: svn://10.0.0.236/trunk@123837 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 23:43:26 +00:00
tor%cs.brown.edu
abecd7cc82 Bug 153280 - backout of pjpeg (bug 76776) due to Tp regression.
git-svn-id: svn://10.0.0.236/trunk@123836 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 23:42:49 +00:00
dprice%netscape.com
3abcdbccd4 151947 - r=curt sr=dveditz
let config.ini control what registry keys are cleaned up during upgrades


git-svn-id: svn://10.0.0.236/trunk@123835 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 23:40:58 +00:00
mstoltz%netscape.com
e600c92777 Bug 149777 - Do not clone images and other embeds into the pageInfo window;
just copy the src and other relevant attributes over. r=bzbarsky, sr=jag,
patch by jrgm.


git-svn-id: svn://10.0.0.236/trunk@123830 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 23:31:41 +00:00
shrutiv%netscape.com
1ac6d64fd5 Fix for bug 96916: Support easy way to add a few bookmarks via CCK
(r=smeredith)


git-svn-id: svn://10.0.0.236/trunk@123829 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 23:20:19 +00:00
naving%netscape.com
c186b96637 153101 r=cavin sr=bienvenu. fixing regression on copying mail to local folders after sending mail.
git-svn-id: svn://10.0.0.236/trunk@123828 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 23:15:21 +00:00
timeless%mac.com
36cbd28e05 Bug 153144 we don't need 'The return value is 3' outputed to the console form jsconsole
r=bzbarsky a=dcone (viewerApp)


git-svn-id: svn://10.0.0.236/trunk@123827 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 23:08:27 +00:00
rpotts%netscape.com
3b84d785bc bug #147741 (r=jst, sr=darin) Call nsIContentPolicy for toplevel and subdocuments.
git-svn-id: svn://10.0.0.236/trunk@123825 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 22:47:42 +00:00
bzbarsky%mit.edu
bcded6ff42 Save background images on tables/rows/cells. Bug 115532, r=adamlock, sr=jst
git-svn-id: svn://10.0.0.236/trunk@123824 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 22:33:50 +00:00
bzbarsky%mit.edu
8703400ee9 Fix dynamic changes to generated content. Bug 57226, r=dbaron, sr=kin
git-svn-id: svn://10.0.0.236/trunk@123823 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 22:31:19 +00:00
relyea%netscape.com
408808e54d Need to preserve non-modifiable trustbits.
git-svn-id: svn://10.0.0.236/trunk@123822 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 22:28:03 +00:00
bzbarsky%mit.edu
d998270f22 Fix build bustage
git-svn-id: svn://10.0.0.236/trunk@123821 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 22:25:28 +00:00
naving%netscape.com
6f431b6b1b 129540 r=robinf fixing help buttons to point to correct page for filterEditor.xul and pref-directoryadd.xul
git-svn-id: svn://10.0.0.236/trunk@123820 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 22:22:54 +00:00
cavin%netscape.com
acc08e7f30 Fix for 153465. In nsImapService::DeleteFolder(), if it's an aol server then use the new 'deletefolder' url to remove all msgs and the folder itself. r=naving, sr=bienvenu.
git-svn-id: svn://10.0.0.236/trunk@123819 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 21:55:10 +00:00
shanjian%netscape.com
e48b4e3b6f #149692 Japanese font is displayed ugly on linux RH7.2
use ffre name instead of only family name to better pass around
system font.
r=rbs, sr=waterson


git-svn-id: svn://10.0.0.236/trunk@123813 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 21:18:26 +00:00
alecf%netscape.com
580560b300 not part of build
move mContainer and mInner to be non-static members, and release them with the xpcom shutdown observer, to prevent leaks


git-svn-id: svn://10.0.0.236/trunk@123812 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 21:17:55 +00:00
jst%netscape.com
0a4d4ff021 Fixing bug 150824. Don't crash if initialization of an XBL JS class fails. r=dbradley@netscape.com, sr=alecf@netscape.com
git-svn-id: svn://10.0.0.236/trunk@123810 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 20:55:17 +00:00
pavlov%netscape.com
66a8b12322 fix for bug 148879. patch from balleysson@bigfoot.com. r=pavlov sr=tor
git-svn-id: svn://10.0.0.236/trunk@123808 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 20:32:48 +00:00
relyea%netscape.com
1be964d42e zero structure before we fill it in, not after
git-svn-id: svn://10.0.0.236/trunk@123807 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 20:25:49 +00:00
suresh%netscape.com
3fb09c9303 fix for bugscape 16611. crash in InMemoryDataSource::Assert. Checks for obs pointer before calling the app. function. r=rjc, sr=alecf.
git-svn-id: svn://10.0.0.236/trunk@123806 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 20:14:12 +00:00
mcs%netscape.com
b451b16592 Fix bug # 152852 - referrals: port 0 used by default instead of port 389.
git-svn-id: svn://10.0.0.236/trunk@123805 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 20:14:02 +00:00
dougt%netscape.com
3aebd6125f 151604 - XPCOM Glue standalone stupport of dynamically loading symbols. r=dp/rpotts sr=alecf
git-svn-id: svn://10.0.0.236/trunk@123802 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 19:58:54 +00:00
peterlubczynski%netscape.com
df1ebcf430 Reset the navigator object for each new document -- plugins may have changed, bug 150087 r=av sr=jst
git-svn-id: svn://10.0.0.236/trunk@123801 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 19:34:54 +00:00
pinkerton%netscape.com
2d383e548c pull the search button out of the default toolbar, move it to the left of
the url bar if it's there at all, and change the icon.


git-svn-id: svn://10.0.0.236/trunk@123800 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 19:33:59 +00:00
cltbld%netscape.com
31312aaabc Explicitly deleting binary. Removed install from pbxbuild line. Increased AliveTestTimeout to 60 seconds from 45. New URL for test8. (mcafee)
git-svn-id: svn://10.0.0.236/trunk@123799 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 19:18:49 +00:00
cltbld%netscape.com
a84796793f Explicitly set cwd to home directory after setting /u/cltbld, apparently MacOSX/Darwin needs this. -mcafee
git-svn-id: svn://10.0.0.236/trunk@123798 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 19:14:13 +00:00
rogerl%netscape.com
fbf3c70b40 Bug #112626 - setting RegExp static field 'input', making sure the paren
capture substring contents aren't gc'd. r=rginda, sr=brendan.


git-svn-id: svn://10.0.0.236/trunk@123797 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 18:38:45 +00:00
nicolson%netscape.com
ba6f6e9e4f fix a build error in JDK 1.2.
git-svn-id: svn://10.0.0.236/trunk@123796 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 18:31:36 +00:00
heikki%netscape.com
c7d4ac8120 Bug 133654, param attribute not recognized in XHTML. Patch from jst, r=peterv, sr=heikki.
git-svn-id: svn://10.0.0.236/trunk@123795 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 18:28:46 +00:00
wtc%netscape.com
c1bd73527f Bug 153380: TLS is enabled by default now.
git-svn-id: svn://10.0.0.236/trunk@123794 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 18:25:46 +00:00
rogerl%netscape.com
05f75c5206 Fixing bug 153223; - 'flat' input may be null. 'isWhiteSpace' does not
return true for non-break spaces, use 'isSpaceChar' instead. Bytes are
signed so needed to extract char values more carefully.


git-svn-id: svn://10.0.0.236/trunk@123793 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 18:19:25 +00:00
mostafah%oeone.com
6475015586 Second phase of TODO integration into calendar
git-svn-id: svn://10.0.0.236/trunk@123792 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 17:16:30 +00:00
despotdaemon%netscape.com
3a1e51ce13 Pseudo-automatic update of changes made by martinl@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@123791 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 16:57:55 +00:00
despotdaemon%netscape.com
d7a885939f Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@123790 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 16:49:42 +00:00
ducarroz%netscape.com
3b9467c589 Fix for bug 153354. Syntax error
git-svn-id: svn://10.0.0.236/trunk@123789 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 16:03:15 +00:00
cmanske%netscape.com
fde673846b Fixed retaining text attributes when using 'end' key. b=113613, fix=mjudge, r=blythe, sr=kin
git-svn-id: svn://10.0.0.236/trunk@123788 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 14:22:30 +00:00
kaie%netscape.com
98ff642747 b=137071 [UE] Replies to or forwarding S/MIME encrypted mail should default to encrypt
Additional required patch, to fix "forward inline".
Patch created by ducarroz.
r=kaie sr=mscott


git-svn-id: svn://10.0.0.236/trunk@123787 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 14:04:57 +00:00
leaf%mozilla.org
153338799c Automated update
git-svn-id: svn://10.0.0.236/trunk@123786 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 13:55:42 +00:00
leaf%mozilla.org
f24e3636f2 update the mre mozilla version to 1.1a+, r=cls
git-svn-id: svn://10.0.0.236/trunk@123785 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 13:52:59 +00:00
varga%utcru.sk
393768688e Fix for bug 127842 - Reload the Bookmark and History tab context menu in
sidebar crashes mozilla
r=bryner, sr=shaver


git-svn-id: svn://10.0.0.236/trunk@123784 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 12:18:48 +00:00
locka%iol.ie
d71d2b2f3a Remove MozillaControl.html b=150618
git-svn-id: svn://10.0.0.236/trunk@123783 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 11:57:07 +00:00
dmose%netscape.com
aa87dbcb0f Workaround so that older versions of Mozilla will not erase LDAP bind DN from the prefs (bug 148900); r=srilatha@netscape.com, sr=bienvenu@netscape.com
git-svn-id: svn://10.0.0.236/trunk@123778 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 07:01:42 +00:00
caillon%returnzero.com
6584856e59 Bug 153044. Computed style implementation for some -moz-border-radius properties.
r=bzbarsky
sr=jst


git-svn-id: svn://10.0.0.236/trunk@123776 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 06:42:21 +00:00
cmanske%netscape.com
8e324f78b9 Allow drag&drop of image from browser. b=146299 [checking in for mjudge] r=cmanske, sr=jag
git-svn-id: svn://10.0.0.236/trunk@123775 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 06:16:14 +00:00
aaronl%netscape.com
af2cd6c3ea Missing part of checkin. Fixes breakage
git-svn-id: svn://10.0.0.236/trunk@123774 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 05:54:47 +00:00
cotter%netscape.com
b894ded1da help content updates per bugzilla 122806 & ADT, r=oeschger; a few final corrections, search db update
git-svn-id: svn://10.0.0.236/trunk@123772 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 05:45:21 +00:00
seawood%netscape.com
7178b77e33 Use the proper file paths when generating dependencies on win32.
Fallout from bug #141834.


git-svn-id: svn://10.0.0.236/trunk@123770 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 05:06:47 +00:00
jaggernaut%netscape.com
b50de5df02 Bug 151807: New Tab button and New Tab context menu items don't set focus to urlbar after opening the new tab. r=bryner, sr=blake
git-svn-id: svn://10.0.0.236/trunk@123769 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 05:06:31 +00:00
aaronl%netscape.com
d8ba960367 Bug 151298. Correct accessible state for XUL radio buttons -should have STATE_FOCUSED when radio button is focused. r=jgaunt, sr=jst
git-svn-id: svn://10.0.0.236/trunk@123768 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 04:54:34 +00:00
aaronl%netscape.com
aa351de483 Bug 151914. Correct accessible state for XUL menubar - should not have STATE_FOCUSABLE bit set. r=kyle, sr=jst
git-svn-id: svn://10.0.0.236/trunk@123767 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 04:47:13 +00:00
aaronl%netscape.com
5ef4b427f4 Bug 152370. Active Accessibility: correct accessible value for XUL listbox and combobox. r=kyle, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@123766 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 04:44:26 +00:00
aaronl%netscape.com
2b3b345631 Bug 152425. Active accessibility: correct use of STATE_FOCUSABLE for XUL tabs. r=jgaunt, sr=kyle
git-svn-id: svn://10.0.0.236/trunk@123765 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 04:41:28 +00:00
jaggernaut%netscape.com
f3e6ac1869 Bug 147720: M1RC3 crash in nsMetaCharsetObserver.cpp. r=dbaron, sr=blake.
git-svn-id: svn://10.0.0.236/trunk@123764 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 04:12:29 +00:00
pinkerton%netscape.com
103ea1da45 Do better error checking to prevent crashing trying to show a JS dialog
when loading a tab in the background (bug 152945)


git-svn-id: svn://10.0.0.236/trunk@123763 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 03:36:44 +00:00
pinkerton%netscape.com
47d66db957 add separate "expired cert" alert (bug 150731)
git-svn-id: svn://10.0.0.236/trunk@123760 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 03:25:35 +00:00
blakeross%telocity.com
6fada4d97a 142310 - top crash if quitting while downloading [@nsHashTable::Exists]. r=bryner sr=ben
git-svn-id: svn://10.0.0.236/trunk@123759 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 03:25:21 +00:00
depstein%netscape.com
48bb8ab7af Adding test cases for nsIWebBrowserFind. New url for simple text search.
git-svn-id: svn://10.0.0.236/trunk@123755 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 02:31:36 +00:00
bzbarsky%mit.edu
48b10a682c Change ToInteger to not silently drop '+' and '#' in mid-string. Bug
54142, r=timeless, sr=jag


git-svn-id: svn://10.0.0.236/trunk@123754 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 02:22:48 +00:00
timeless%mac.com
042f32d6d7 Bug 143903 crash if I close the mail window while a save as dialog is open for a message attachment
patch by antonio.xu@sun.com r=dbaron sr=waterson


git-svn-id: svn://10.0.0.236/trunk@123751 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 01:55:14 +00:00
timeless%mac.com
1ebb7a8a84 Bug 143515 Compose:Attachment field context menu:Select All doesn't work
antonio.xu@sun.com r=varada sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@123750 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 01:52:02 +00:00
mcafee%netscape.com
dff99286a0 oops, didn't mean to uncomment delete binary part
git-svn-id: svn://10.0.0.236/trunk@123748 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 00:58:21 +00:00
curt%netscape.com
c0733fbd6c Looks like the disk space is negative.
(Bug #82448, r=dprice, sr=dveditz)


git-svn-id: svn://10.0.0.236/trunk@123747 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 00:46:59 +00:00
pinkerton%netscape.com
6b39ba9eda Hack for external protocol handlers. serious hack. oh my god it's a hack. (bug 145807)
git-svn-id: svn://10.0.0.236/trunk@123746 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 00:46:05 +00:00
kaie%netscape.com
df04878acc b=153243 Error in recipient certificate availability checking, causing unreadable mail
r=ssaux sr=jag


git-svn-id: svn://10.0.0.236/trunk@123745 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 00:43:18 +00:00
naving%netscape.com
2686facd07 151056 r=cavin sr=bienvenu making mdn work for large imap messages. The fix is to ignore read(\seen) flag changes
on nsImapMsgFetch.


git-svn-id: svn://10.0.0.236/trunk@123744 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 00:25:42 +00:00
pinkerton%netscape.com
9c2b39a976 a bunch of fixes that didn't land when i wanted them to.
git-svn-id: svn://10.0.0.236/trunk@123743 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 00:24:51 +00:00
naving%netscape.com
ad178ae388 152713 r=ssu sr=mscott made it so we cannot delete special folders dratfs, templates and sent using Edit menu.
git-svn-id: svn://10.0.0.236/trunk@123742 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 00:13:48 +00:00
ssu%netscape.com
a45162abb5 fixing bug 152456 - mail header To: field shows duplicate address. r=varada, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@123741 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 00:06:53 +00:00
srilatha%netscape.com
959c2a0a72 Fix for bug # 130403. When teh new card dialog is opened from selected addresses dialog,
there is no selectedab. Make personal addressbook selectedab, if there is no selected addressbook.
r=varada, sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@123738 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 23:48:54 +00:00
tor%cs.brown.edu
c1831076be Bug 76776 - incremental display of progressive jpegs. r=pavlov, sr=jag
git-svn-id: svn://10.0.0.236/trunk@123737 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 23:44:24 +00:00
dougt%netscape.com
e55242b0aa 153164. removed embed_base_s from XPCOM_GLUE_LIBS r/sr=seawood
git-svn-id: svn://10.0.0.236/trunk@123736 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 23:43:00 +00:00
mcafee%netscape.com
dd04539698 Fixing tab whitespace.
git-svn-id: svn://10.0.0.236/trunk@123735 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 23:41:33 +00:00
kaie%netscape.com
533c0e05ad b=90956 Dot (.) instead of localized characters in pipnss module
r=ssaux sr=alecf


git-svn-id: svn://10.0.0.236/trunk@123734 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 23:41:02 +00:00
leaf%mozilla.org
537d020e5d Automated update
git-svn-id: svn://10.0.0.236/trunk@123733 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 23:40:39 +00:00
kaie%netscape.com
351b59c701 https surfing: Clicking on a link early leads to "mixed/broken" lock icon
r=javi sr=rpotts


git-svn-id: svn://10.0.0.236/trunk@123732 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 23:36:48 +00:00
bryner%netscape.com
71b78df80d Don't crash if NSSDialogs doesn't implement nsICertificateDialogs (bug 150862). r=kaie, sr=blake.
git-svn-id: svn://10.0.0.236/trunk@123731 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 23:31:47 +00:00
timeless%mac.com
b840633886 backing out bug 128750
git-svn-id: svn://10.0.0.236/trunk@123729 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 23:02:31 +00:00
myk%mozilla.org
c6868cfe74 Fix for bgu 153114: Files bugs about changes (that the user can't make herself because she doesn't have CVS access) into the mozilla.org product, webmaster@mozilla.org component instead of the Documentation product. Also, adds a link to the document's change log so users can figure out to whom to assign the bug.
git-svn-id: svn://10.0.0.236/trunk@123728 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 22:56:23 +00:00
timeless%mac.com
966a773582 Bug 153146 makecopy.exe's error output is foobared
r=cls


git-svn-id: svn://10.0.0.236/trunk@123727 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 22:38:40 +00:00
javi%netscape.com
60969cbdf3 Make the file C++ friendly.
git-svn-id: svn://10.0.0.236/trunk@123725 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 22:32:38 +00:00
pschwartau%netscape.com
1de03ef582 Removing 6 skips. All pass now that the new Rhino RegExp engine has been checked in.
git-svn-id: svn://10.0.0.236/trunk@123724 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 22:31:47 +00:00
radha%netscape.com
392fbcdca7 Fix for bug # 35011. r=jst sr=kin. window.onscroll and element.onscroll don't fire.
git-svn-id: svn://10.0.0.236/trunk@123722 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 21:47:59 +00:00
bryner%netscape.com
e61f69bb3f Oops, forgot to add libjsj.dylib to the non-static target when I added liboji.
git-svn-id: svn://10.0.0.236/trunk@123721 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 21:46:21 +00:00
mkaply%us.ibm.com
7e4d76ba50 #149422
r=bnesse, sr=jst
OS/2 only - skip over EOF character on JS files in prefs


git-svn-id: svn://10.0.0.236/trunk@123720 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 21:37:21 +00:00
locka%iol.ie
4990bc8a8d Remove MozillaControl.html. b=150618 r=chak@netscape.com sr=rpotts@netscape.com
git-svn-id: svn://10.0.0.236/trunk@123719 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 21:33:59 +00:00
alecf%netscape.com
86b6d45c5d fix for bug 152929 - we were leaking 900+ nsFactoryEntry objects because they were not always allocated in an arena
(fixes a 75k leak on my system)
r=dougt, sr=dveditz


git-svn-id: svn://10.0.0.236/trunk@123718 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 21:22:50 +00:00
rpotts%netscape.com
3f2463d7dd bug #148981 (r=kaie, sr=darin). STATE_TRANSFERRING notifications are not fired if theunderlying channel does not provide nsIProgressEventSink notifications...
git-svn-id: svn://10.0.0.236/trunk@123717 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 21:16:46 +00:00
pschwartau%netscape.com
ce59881ff5 Adjusting FAST constant upward so that test can pass in Rhino -
git-svn-id: svn://10.0.0.236/trunk@123716 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 20:53:10 +00:00
pinkerton%netscape.com
95023ed66d Fix to switch window title when tab becomes primary and not switch url
when a bg tab refreshes its url. (bugs 150805, 152626)


git-svn-id: svn://10.0.0.236/trunk@123715 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 20:45:29 +00:00
dbaron%fas.harvard.edu
e76d62fd17 Fix accesskey regression for text inputs and textareas. b=148249 r=aaronl sr=jst
git-svn-id: svn://10.0.0.236/trunk@123714 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 20:44:27 +00:00
alecf%netscape.com
eb193c5571 fix bug 149102 - stop exporting some old unused methods from XPCOM, and get rid of nsOutputConsoleStream and consumers
also removing FilesTest from the build because its outdated, doesn't test anything useful anymore, and is the last consumer of nsOutputConsoleStream
r=dougt, sr=jag


git-svn-id: svn://10.0.0.236/trunk@123713 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 20:35:37 +00:00
bzbarsky%mit.edu
e045622d4e Bug 152979, r=dbaron,chak, sr=waterson
git-svn-id: svn://10.0.0.236/trunk@123712 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 20:34:37 +00:00
jst%netscape.com
6cf6add6c0 Fixing the DOM part of bug 59686. DOM properties not accessable on liveconnect wrapped Java applet due to the DOM applet element's prototype not being correctly set up. r=bzbarsky@mit.edu, sr=brendan@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@123711 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 20:32:46 +00:00
jst%netscape.com
e7622066bd Fixing bug 143782. Don't double release the content pointers in mCurrentEventContentStack when a presshell is destroyed from within an event handler called through the presshell. r=dbaron@fas.harvard.edu, sr=protts@netscape.com
git-svn-id: svn://10.0.0.236/trunk@123710 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 20:14:59 +00:00
varga%utcru.sk
800eb0e544 Fix for bug 123719 - Default account is not placed at the top of the folder pane
r=bryner, sr=blake


git-svn-id: svn://10.0.0.236/trunk@123709 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 20:06:25 +00:00
mitchf%netscape.com
5f6b3aaff9 Changed default URLDisplayLen to 47 if non found in the widget definition
Part of fix for bug 119400


git-svn-id: svn://10.0.0.236/trunk@123706 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 19:46:43 +00:00
relyea%netscape.com
0a5dcbb6de Reduce the cost of decoding a certificate.
git-svn-id: svn://10.0.0.236/trunk@123701 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 18:53:16 +00:00
relyea%netscape.com
1c8eb7a37f reduce the calls to get the login state as these calls seem to be pretty expensive
for some tokens.


git-svn-id: svn://10.0.0.236/trunk@123700 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 18:49:45 +00:00
relyea%netscape.com
d80230e4aa Patches to reduce the cost of getting attributes on certs or finding certs in lists.
git-svn-id: svn://10.0.0.236/trunk@123699 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 18:46:47 +00:00
wtc%netscape.com
30e77d7c98 Updated for NSPR 4.2.1.
git-svn-id: svn://10.0.0.236/trunk@123697 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 18:13:10 +00:00
shannond%netscape.com
d60d9f439a Bug 102190 - Allow customization fo Tooltip text for Animated Logo
r=shrutiv@netscape.com


git-svn-id: svn://10.0.0.236/trunk@123696 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 18:11:06 +00:00
peterv%netscape.com
ac30d3738a Remove unnecessary includes.
git-svn-id: svn://10.0.0.236/trunk@123694 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 14:35:17 +00:00
peterv%netscape.com
6aad9f8005 Fix Transformiix standalone bustage (does not affect Mozilla build). r=Pike.
git-svn-id: svn://10.0.0.236/trunk@123693 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 14:10:48 +00:00
cmanske%netscape.com
7fe128322b New Publish icon for modern theme, r=cmanske, sr=jst
git-svn-id: svn://10.0.0.236/trunk@123692 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 13:59:07 +00:00
peterv%netscape.com
9fd72b9ba8 Fix for bug 146966 (Standalone Transformiix outputs HTML with XML prolog). r=Pike, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@123690 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 13:25:48 +00:00
seawood%netscape.com
6a4588d35f Removing the extraneous dos newline that's killing the irix build.
git-svn-id: svn://10.0.0.236/trunk@123689 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 12:50:21 +00:00
peterv%netscape.com
473737daaa Fix for bug 142108 (Crash when reloading XML+XSLT Trunk, M100, N70PR1, M11A [@ nsXMLContentSink::Observe][@ 0x00000001]). r=Pike, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@123686 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 12:04:22 +00:00
peterv%netscape.com
c7e9e858d1 Fix for bug 94475 (if first whitespace in line in textarea is a tab it is changed to a new line). Patch by t_mutreja@yahoo.com, r=bratell@lysator.liu.se, sr=heikki.
git-svn-id: svn://10.0.0.236/trunk@123685 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 11:45:09 +00:00
rods%netscape.com
5a2025b86f check in for jblanco,, returns is no printers are available
Bug 152936 r=rods sr=jst


git-svn-id: svn://10.0.0.236/trunk@123684 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 11:44:34 +00:00
cotter%netscape.com
d0b0433757 ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; final corrections and search db update
git-svn-id: svn://10.0.0.236/trunk@123682 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 06:58:49 +00:00
henry.jia%sun.com
d879cfff92 Bug 105385 Cyrus IMAP: Server directory has / appended always
Patch description: Make this function more flexible and support other imap servers such as Cyrus and Courier besides UW server
r=bienvenu
sr=mscott


git-svn-id: svn://10.0.0.236/trunk@123680 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 06:11:50 +00:00
darin%netscape.com
4c00f288d2 secondary fix for bug 146094 "Stealing third-party cookies through a proxy"
r=dougt sr=rpotts


git-svn-id: svn://10.0.0.236/trunk@123679 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 05:49:04 +00:00
darin%netscape.com
000d05b462 pseudo fix for bug 140472 "No escape for non ASCII host name"
r=dougt sr=rpotts


git-svn-id: svn://10.0.0.236/trunk@123678 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 05:45:57 +00:00
mcafee%netscape.com
2b5f93b089 find, commandhandler need to be built before embedcomponents (152516). r=cls, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@123676 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 05:08:19 +00:00
saari%netscape.com
eecbbc3392 win32 only fix for 82534. focus goes wonky after minimizing a window. r=bryner, sr=jag
git-svn-id: svn://10.0.0.236/trunk@123675 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 04:55:13 +00:00
kyle.yuan%sun.com
92d37b3380 Bug 152469 DefAction does not work for tree column node.
r=aaronl, sr=jst
Bug 152472 nsIAccessible's accValue returns NS_ERROR_ILLEGAL_VALUE instead of return NS_ERROR_NOT_IMPLEMENTED for XUL Tree Node
r=aaronl, sr=jst


git-svn-id: svn://10.0.0.236/trunk@123672 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 02:51:55 +00:00
serge%netscape.com
7e3e5f670d fix for #85958 Shockwave/Flash pages cause crash under Solaris [x-server/bit-depth], patch by sep@sparc.spb.su,r=serge,sr=blizzard
git-svn-id: svn://10.0.0.236/trunk@123666 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 01:50:54 +00:00
dmose%netscape.com
a70407e6e2 If authentication fails during LDAP autocomplete, bring up a new password dialog rather than showing an obscure error message (bug 150723); r=ducarroz@netscape.com, sr=hewitt@netscape.com
git-svn-id: svn://10.0.0.236/trunk@123665 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 01:50:04 +00:00
ducarroz%netscape.com
d60661b832 Fix for bug 143882. We should not add dummy headers when saving a message as file. R=naving, SR=bienvenu
git-svn-id: svn://10.0.0.236/trunk@123664 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 01:49:18 +00:00
srilatha%netscape.com
15401e27bb Fix for bug # 148939. Updating the card does not update addresslists.
r=varada, sr=bienvenu.


git-svn-id: svn://10.0.0.236/trunk@123662 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 01:22:14 +00:00
morse%netscape.com
226b2f6a13 change p3p icon, r=kerz, sr=blake, a=lorikaplan
git-svn-id: svn://10.0.0.236/trunk@123661 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 01:17:56 +00:00
dmose%netscape.com
9ef8e7e0a0 Fix incorrect array length calculation + add temporary variable to work around egcs compiler bug which was causing bogus text to appear in the LDAP auth dialog on linux (bug 148897); r=bryner@netscape.com, sr=bienvenu@netscape.com
git-svn-id: svn://10.0.0.236/trunk@123660 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 01:07:32 +00:00
dmose%netscape.com
dfabf75f97 Fix incorrect array length calculation + add temporary variable to work around egcs compiler bug which was causing bogus text to appear in the LDAP auth dialog on linux (bug 148897); r=bryner@netscape.com, sr=bienvenu@netscape.com
git-svn-id: svn://10.0.0.236/trunk@123659 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 00:58:52 +00:00
nhotta%netscape.com
70c4e1fc68 MIME decode headers when creating nsMsgCompFields for sendlater,
bug 152690, r=ducarroz, sr=bienvenu.


git-svn-id: svn://10.0.0.236/trunk@123658 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 00:36:44 +00:00
timeless%mac.com
cc00cc5f7c Bug 125689 Mozinvaders crashes Mozilla! [@ nsGrid::FindRowsAndColumns]
r=varga sr=kin
<grid></grid> with no rows or collumns


git-svn-id: svn://10.0.0.236/trunk@123655 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 00:14:29 +00:00
bryner%netscape.com
e2a912e048 Make -autoRegister mode also perform chrome registration, so that this can be done during packaging. r=jag.
git-svn-id: svn://10.0.0.236/trunk@123654 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-20 00:08:02 +00:00
yokoyama%netscape.com
9eacd46b90 146844
Adding IME text input handling
for special cases (punctuation, period chars)
/r=shanjian;/sr=kin


git-svn-id: svn://10.0.0.236/trunk@123650 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 23:56:28 +00:00
karnaze%netscape.com
6ff33d9292 bug 127022 - make sure the desired width is at least as big as the max element width. sr=kin, r=alexsavulov
git-svn-id: svn://10.0.0.236/trunk@123642 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 23:16:33 +00:00
karnaze%netscape.com
6b987491e8 new regression tests, not affecting the build.
git-svn-id: svn://10.0.0.236/trunk@123638 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 23:07:11 +00:00
nicolson%netscape.com
505baf58aa catch a null pointer and throw it back to Java, instead of crashing in C.
git-svn-id: svn://10.0.0.236/trunk@123636 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 22:59:08 +00:00
nicolson%netscape.com
197d5ae79d upgrade to NSS 3.4.2.
git-svn-id: svn://10.0.0.236/trunk@123635 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 22:58:40 +00:00
gerv%gerv.net
55f576c6a6 Bug 151217 - buglist references the wrong priority field. Patch by gerv; 2xr=bbaetz.
git-svn-id: svn://10.0.0.236/trunk@123634 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 22:53:25 +00:00
naving%netscape.com
ece872da0f 129540 r=racham sr=alecf Adding help buttons in some cases and making them point to the right page (in all cases).
git-svn-id: svn://10.0.0.236/trunk@123633 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 22:53:04 +00:00
naving%netscape.com
972fe006e3 129540 r=racham sr=alecf making help buttons point to the right page
git-svn-id: svn://10.0.0.236/trunk@123632 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 22:52:54 +00:00
nicolson%netscape.com
83079a7bee add SSLClientAuth test.
remove obsolete socketTest.
Get passwords from a file so we can run in batch mode.


git-svn-id: svn://10.0.0.236/trunk@123631 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 22:50:47 +00:00
karnaze%netscape.com
e7dfc78299 bug 114706 - only use last height as desired size if a special reflow occurred during an incremental reflow. sr=kin
git-svn-id: svn://10.0.0.236/trunk@123627 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 22:42:41 +00:00
rginda%netscape.com
977eaa489e fix build bustage, NS_IF_RELEASE the raw pointer, not the COM pointer.
git-svn-id: svn://10.0.0.236/trunk@123626 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 22:40:19 +00:00
karnaze%netscape.com
6b5f0435d2 bug 127544 - fixed asserts when there are no cells in a row group and there is a column. sr=kin, r=alexsavulov.
git-svn-id: svn://10.0.0.236/trunk@123625 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 22:35:59 +00:00
karnaze%netscape.com
f849232aae bug 151620 - always use quirk line-height inside a td. sr=waterson, r=dbaron.
git-svn-id: svn://10.0.0.236/trunk@123624 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 22:28:47 +00:00
leaf%mozilla.org
6df33ab0e0 updating the user agent string, a=asa
git-svn-id: svn://10.0.0.236/trunk@123621 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 22:20:49 +00:00
rods%netscape.com
5dbadfe64a Need to call EndObservingDocument before destroy of PresShell
Bug 152536 r=dcone sr=jst


git-svn-id: svn://10.0.0.236/trunk@123620 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 22:18:43 +00:00
seawood%netscape.com
69ece6e75d Add generated header file to generated list so that files don't sit in the srcdir and mask bustage caused by a missing include path.
Not exactly fallout from bug #141834 but it's going in anyway.


git-svn-id: svn://10.0.0.236/trunk@123619 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 22:17:27 +00:00
rogerl%netscape.com
05e5562d17 New RegExp engine implementation.
git-svn-id: svn://10.0.0.236/trunk@123614 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 21:57:57 +00:00
rginda%netscape.com
de73e0dbca Bug 151803, "Debugger is leaking JSDValues", r=peterv, sr=jst
Stop caching jsdIValues, it doesn't seem to be worth the lookup cost.  This has the side effect of plugging the leak, as described in the bug.
also...
* Convert a few raw pointers to nsCOMPtrs
* Fix a bug where removing the last filter did not null out the list head,
causing a crash the next time filters were used.
* Track live jsdStackFrames, so we can invalidate them all when execution
continues.  Without this, only the top frame is properly invalidated, and any
other frame accessed after a continue will do Bad Things.
* Add some debugging prints to GetInitAtService, which seems to be failing at
random times.


git-svn-id: svn://10.0.0.236/trunk@123613 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 21:56:23 +00:00
rods%netscape.com
b9882159d7 Add PR_LOGGING for printing
Bug 121622 r=dcone sr=kin


git-svn-id: svn://10.0.0.236/trunk@123612 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 21:51:13 +00:00
mkaply%us.ibm.com
61740cd4da Back out the extra crap code I added with 147702 - just fix the bug, don't try anything fancy
git-svn-id: svn://10.0.0.236/trunk@123607 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 21:22:22 +00:00
leaf%mozilla.org
75555da65c Automated update
git-svn-id: svn://10.0.0.236/trunk@123606 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 20:55:43 +00:00
seawood%netscape.com
ec5eaef329 Fixing build bustaged caused by absolute path assumptions.
Fallout from bug #141834


git-svn-id: svn://10.0.0.236/trunk@123605 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 20:45:57 +00:00
nicolson%netscape.com
105074a197 Fix 112227: set SSL server without nickname
Specify the certificate to use for both server and client auth directly,
rather than by nickname.


git-svn-id: svn://10.0.0.236/trunk@123604 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 20:33:28 +00:00
stephend%netscape.com
35887f441f Bug 151418. Polish Page Info & Certificate Details. Patch by Stephen Walker <walk84@yahoo.com> r=kaie@netscape.com, sr=jaggernaut@netscape.com
git-svn-id: svn://10.0.0.236/trunk@123603 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 20:32:54 +00:00
shaver%mozilla.org
56496de266 Followup to checkin for 116653 (openURL(,new-tab) support). Seems that the
observer service doesn't implement classinfo, and some people were reporting
a strict warning (?) related to this.  This is a more correct approach anyway,
so here we go. r=blizzard, sr=jag.


git-svn-id: svn://10.0.0.236/trunk@123602 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 20:29:54 +00:00
bryner%netscape.com
ee0246f4a9 Adding OJI library to the static build target.
git-svn-id: svn://10.0.0.236/trunk@123601 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 20:15:54 +00:00
blakeross%telocity.com
329221d5ba 149357 - excess bloat in cookie prefs. r=morse sr=ben
git-svn-id: svn://10.0.0.236/trunk@123600 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 19:56:25 +00:00
blakeross%telocity.com
8d2bb87fb0 142824 - downloads.rdf keeps on growing. patch by jrgm@netscape.com. r=blake sr=ben
git-svn-id: svn://10.0.0.236/trunk@123599 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 19:53:58 +00:00
bryner%netscape.com
982a96dc4a Adding OJI library to the non-static build target.
git-svn-id: svn://10.0.0.236/trunk@123598 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 19:31:10 +00:00
ian.mcgreer%sun.com
dfe71a1368 bug 98926, PKCS#11 session logging
git-svn-id: svn://10.0.0.236/trunk@123597 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 18:32:57 +00:00
rangansen%netscape.com
00563fcd57 exporting CERT_VerifyCertChain. r=relyea
git-svn-id: svn://10.0.0.236/trunk@123595 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 15:58:51 +00:00
ian.mcgreer%sun.com
cc6d866e92 missed part of last patch (bug 145322)
git-svn-id: svn://10.0.0.236/trunk@123594 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 15:26:55 +00:00
ian.mcgreer%sun.com
662cdbc0f1 bug 145322, second patch, clean up pk11_saveContextHelper
git-svn-id: svn://10.0.0.236/trunk@123593 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 15:22:54 +00:00
ian.mcgreer%sun.com
d5ba19e9d7 bug 145322, reduce the number of PKCS#11 sessions used in SSL connections, implement new function PK11_SaveContextAlloc
r=relyea


git-svn-id: svn://10.0.0.236/trunk@123592 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 15:21:37 +00:00
leaf%mozilla.org
f6c4ac0d13 Automated update
git-svn-id: svn://10.0.0.236/trunk@123591 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 15:11:18 +00:00
mikep%oeone.com
95d5bd9fa3 Updating code, doing a little bit of clean up.
git-svn-id: svn://10.0.0.236/trunk@123590 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 15:00:38 +00:00
ian.mcgreer%sun.com
0dc85d2a26 bug 150704, PK11_Finalize can crash because softoken does not implement C_XXXFinal correctly
git-svn-id: svn://10.0.0.236/trunk@123589 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 14:59:24 +00:00
seawood%netscape.com
818b8f50de Add --disable-activex to turn off building of activex component (win32 only).
Thanks to Stephen Walker  <walk84@yahoo.com> for the patch.
Bug #141376 r=cls


git-svn-id: svn://10.0.0.236/trunk@123588 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 14:59:05 +00:00
locka%iol.ie
b7ef813c10 Sample code changed to use MIT licence. b=82339
git-svn-id: svn://10.0.0.236/trunk@123587 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 14:48:07 +00:00
locka%iol.ie
2dc724b259 Sample code changed to use MIT licence. b=82339
git-svn-id: svn://10.0.0.236/trunk@123586 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 14:38:39 +00:00
dcone%netscape.com
cfb63b946a added an installer for the debug plugin. Not part of build.
git-svn-id: svn://10.0.0.236/trunk@123585 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 14:35:40 +00:00
locka%iol.ie
614fe5d123 Sample code changed to use MIT licence. b=82339
git-svn-id: svn://10.0.0.236/trunk@123584 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 14:25:27 +00:00
kaie%netscape.com
1f3848c479 b=137071 [UE] Replies to or forwarding S/MIME encrypted mail should default to encrypt
r=ducarroz sr=mscott


git-svn-id: svn://10.0.0.236/trunk@123583 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 13:46:10 +00:00
karnaze%netscape.com
21b23754fb bug 149436 - shanmu's patch to fix crash on OSF/1, sr=kin, r=karnaze
git-svn-id: svn://10.0.0.236/trunk@123582 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 13:43:19 +00:00
karnaze%netscape.com
c982f01623 bug 151956 - make sure child of row group is a row in CalcRowHeights. sr=kin, r=bernd.
git-svn-id: svn://10.0.0.236/trunk@123581 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 13:37:18 +00:00
varga%utcru.sk
8d7b5f2cd2 Checking in for Neil.
Bug 151565 - JS strict warning in nsHelperAppDlg.js
r=varga, sr=jag


git-svn-id: svn://10.0.0.236/trunk@123580 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 12:59:20 +00:00
kaie%netscape.com
486242ccde b=137071 [UE] Replies to or forwarding S/MIME encrypted mail should default to encrypt
r=ducarroz sr=mscott


git-svn-id: svn://10.0.0.236/trunk@123579 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 12:49:29 +00:00
kaie%netscape.com
007764bf32 b=137071 [UE] Replies to or forwarding S/MIME encrypted mail should default to encrypt
r=ducarroz sr=mscott
(need to rename file because it is too long for Mac)


git-svn-id: svn://10.0.0.236/trunk@123578 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 12:47:44 +00:00
kaie%netscape.com
d83288e41b b=137071 [UE] Replies to or forwarding S/MIME encrypted mail should default to encrypt
r=ducarroz sr=mscott


git-svn-id: svn://10.0.0.236/trunk@123577 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 12:43:06 +00:00
jaggernaut%netscape.com
b506de82e7 Back out changes for bug 35011 (context menu, ctrl+key, page-up/down all stopped working in browser).
git-svn-id: svn://10.0.0.236/trunk@123576 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 12:37:57 +00:00
kaie%netscape.com
90aecc35e5 b=137071 [UE] Replies to or forwarding S/MIME encrypted mail should default to encrypt
r=ducarroz sr=mscott


git-svn-id: svn://10.0.0.236/trunk@123575 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 12:24:27 +00:00
locka%iol.ie
672184db5f Added nsIEmbeddingSiteWindow2 implementation. b=149307 r=rpotts@netscape.com sr=alecf@netscape.com
git-svn-id: svn://10.0.0.236/trunk@123574 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 11:41:25 +00:00
racham%netscape.com
5d5c91435f Fixing bug 144562. Allow ISPs and vendors to set up pre-configured mailnews accounts via prefs. Adding global version prefs which provide ISP/vendors the flexibility of adding new accounts/servers to the existing set of accounts/servers by increasing the default version number. r=srilatha, sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@123573 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 07:44:30 +00:00
racham%netscape.com
0cf2bf774a Fixing bug 144562. Allow ISPs and vendors to set up pre-configured mailnews accounts via prefs. When a proper set of prefs area added to the global prefs file, accounts are set up automatically. On launching mailnews app, Account Wizard will be brought up on identifying invalid accounts so that user information like name and email address can be entered. Please see the bug for set of prefs used as an example. r=srilatha, sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@123572 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 07:38:53 +00:00
timeless%mac.com
90d599f0f6 Bug 12180 Menu overlaps filenames
Bug 88759 improperly nested tags break links
r=tara


git-svn-id: svn://10.0.0.236/trunk@123571 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 07:00:18 +00:00
bzbarsky%mit.edu
6d7d25fd32 add an ID to the separator so things can go on the right side of it.
Bug 151479, r=bzbarsky, sr=blake


git-svn-id: svn://10.0.0.236/trunk@123569 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 06:42:27 +00:00
bzbarsky%mit.edu
89964087df Not all URIs are URLs. Bug 143987, r=law, sr=jag
git-svn-id: svn://10.0.0.236/trunk@123568 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 05:13:59 +00:00
bzbarsky%mit.edu
c2aaa714fc use oncommand, not onclick, for the link toolbar. Bug 139157,
r=sballard@netreach.net, sr=jag


git-svn-id: svn://10.0.0.236/trunk@123567 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 05:11:02 +00:00
dbaron%fas.harvard.edu
4f49013024 Oops.
git-svn-id: svn://10.0.0.236/trunk@123566 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 04:31:43 +00:00
dbaron%fas.harvard.edu
841cdced78 Correct documentation of initial/inherit values and of last boolean in CheckPropertyData. Note that document misses modifications to nsDOMCSSDeclaration and relevant interfaces. Massive formatting cleanup (especially <br> overuse), but not enough.
git-svn-id: svn://10.0.0.236/trunk@123565 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 04:29:07 +00:00
caillon%returnzero.com
438ada5443 Bug 152256, honor the pref to prevent sites from hiding the statusbar in the window.statusbar.visible=false case also. r=bzbarsky sr=jst
git-svn-id: svn://10.0.0.236/trunk@123564 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 04:09:57 +00:00
mkaply%us.ibm.com
3513f4811b #70141
r=timeless, sr=jag
Windows - map + on numpad to + character


git-svn-id: svn://10.0.0.236/trunk@123563 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 03:33:12 +00:00
katakai%japan.sun.com
902cca8ec9 bug 152260
AMPM order needs to be cared in time format
UNIX/Linux only: check AMPM order at strftime("%X")
r=yokoyama,sr=blizzard


git-svn-id: svn://10.0.0.236/trunk@123561 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 02:32:43 +00:00
jelwell%netscape.com
49c06cb235 Fix for bugzilla bug 152434
Need id's on the some menuitems so Other apps can hide unneeded ones.
r=cmanske, sr=dveditz


git-svn-id: svn://10.0.0.236/trunk@123560 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 02:11:04 +00:00
kyle.yuan%sun.com
0dbcd6e661 Bug 149858 [XBLFC] Active Accessibility: support XBL-based HTML radio
r=aaronl, sr=jst
Add nsIAccessibleProvider in radio.xml, create accessible object for XBL radio button


git-svn-id: svn://10.0.0.236/trunk@123559 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 02:00:38 +00:00
seawood%netscape.com
d02a1e6aa1 Yet another fix for the srcdir race problem. We'll just remove the srcdir copies whenever we regenerate the files.
Fallout from bug 141834


git-svn-id: svn://10.0.0.236/trunk@123557 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 01:31:47 +00:00
jruderman%hmc.edu
996e95ed25 86063 and 134614. add ctrl+shift+f shortcut for "search the web" and make "search the web" go to the user's selected search engine. r=aaronl,sgehani, sr=hewitt.
git-svn-id: svn://10.0.0.236/trunk@123554 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 00:50:20 +00:00
caillon%returnzero.com
d20e1a3975 Bug 149474, Implement preventdefault="true" on XBL handlers, so that bindings are able to prevent the default action even if JavaScript is disabled. r=bryner sr=jag
git-svn-id: svn://10.0.0.236/trunk@123553 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 00:43:46 +00:00
jst%netscape.com
d24a4a75b0 Fixing bug 123273. Don't let JS timeouts run with 0 delay, always force at least a 10ms delay. r=bzbarsky@mit.edu, sr=rpotts@netscape.com
git-svn-id: svn://10.0.0.236/trunk@123552 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 00:42:23 +00:00
pschwartau%netscape.com
cd7a709a52 Correcting Section 1 to test execution as well as compilation of function.
git-svn-id: svn://10.0.0.236/trunk@123551 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 00:23:43 +00:00
bzbarsky%mit.edu
861ed47bd4 Bug 126725, patch by Travis Crump <pretzalz@techhouse.org>, r=bzbarsky,
sr=alecf.


git-svn-id: svn://10.0.0.236/trunk@123549 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 00:17:18 +00:00
pschwartau%netscape.com
49b06a0ae3 Adding extra comments -
git-svn-id: svn://10.0.0.236/trunk@123548 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 00:13:04 +00:00
pschwartau%netscape.com
46de850836 Initial add. Regression test for bug 146596.
git-svn-id: svn://10.0.0.236/trunk@123546 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 00:02:29 +00:00
timeless%mac.com
c6da77a30d Bug 114121 miFindCSSRules.accesskey definied as "Find CSS Rules..."
r=hwaara sr=jst


git-svn-id: svn://10.0.0.236/trunk@123545 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 00:02:27 +00:00
myk%mozilla.org
84497df0ef Fix for bug 152688: HTML-escape CVS error messages before they are output.
git-svn-id: svn://10.0.0.236/trunk@123543 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 23:33:26 +00:00
cotter%netscape.com
d45cdeb9ad ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; latest formatting & editorial updates
git-svn-id: svn://10.0.0.236/trunk@123541 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 23:22:13 +00:00
naving%netscape.com
2b8574558e 134076 original patch=wilson r=oscheger sr=alecf Made it so that Help search engine should let user know that no matches were found
git-svn-id: svn://10.0.0.236/trunk@123538 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 23:08:38 +00:00
cavin%netscape.com
50352c57e2 Fix for 144141. Force folder pane to open if it's collapsed at startup. r=naving, sr=mscott.
git-svn-id: svn://10.0.0.236/trunk@123537 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 23:04:04 +00:00
radha%netscape.com
374aa80972 Fix for bug # 35011. window.onscroll and element.onscroll don't fire. r=joki sr=jst
git-svn-id: svn://10.0.0.236/trunk@123536 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 23:01:48 +00:00
robinf%netscape.com
a1a66f6c6c routine help updates per bug 122806, r=oeschger
git-svn-id: svn://10.0.0.236/trunk@123535 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 23:01:28 +00:00
radha%netscape.com
18e3f5da82 Fix for bug # 35011 r=joki sr=jst. window.onscroll and element.onscroll don't fire.
git-svn-id: svn://10.0.0.236/trunk@123534 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 23:00:50 +00:00
bzbarsky%mit.edu
1747596e9d Remove an unneeded flex. Bug 128750, r=law,sr=alecf
git-svn-id: svn://10.0.0.236/trunk@123533 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 22:36:27 +00:00
dbaron%fas.harvard.edu
211d1d0454 Add perl script for splitting jprof profiles into segments.
git-svn-id: svn://10.0.0.236/trunk@123532 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 22:35:05 +00:00
bishakhabanerjee%netscape.com
442e627ebf correcting init_mcom function to enable "nssqa" to run at Netscape - 150752
git-svn-id: svn://10.0.0.236/trunk@123531 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 21:45:31 +00:00
pinkerton%netscape.com
c5023cf92e Adding impl of nsIEmbeddingSiteWindow2 so certain QI's don't fail
git-svn-id: svn://10.0.0.236/trunk@123530 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 21:43:56 +00:00
leaf%mozilla.org
f3c2c57f2f Automated update
git-svn-id: svn://10.0.0.236/trunk@123529 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 21:40:40 +00:00
chak%netscape.com
817969dd8b Fix for #151574 - Add MRE packaging make target to embedding/config
r=adamlock,  sr=darin


git-svn-id: svn://10.0.0.236/trunk@123528 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 21:37:05 +00:00
seawood%netscape.com
dbbecbf41b Explicitly use sh when calling the cygwin-wrapper script as some developers are reporting that their shell can't call the script directly.
Fallout from bug #141834


git-svn-id: svn://10.0.0.236/trunk@123527 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 21:36:45 +00:00
locka%iol.ie
456fc59036 Add application launcher dialog to activex control, plus some member variable cleanup. b=126245 r=chak@netscape.com sr=rpotts@netscape.com
git-svn-id: svn://10.0.0.236/trunk@123525 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 21:31:41 +00:00
alexsavulov%netscape.com
0027d9c146 patch for bug 148199 - Images that are "broken" during document editing
don't redisplay using broken image icon.
added a request proxy removal from the mLoads to get the broken icon
when paint.
r=glazman, sr=waterson


git-svn-id: svn://10.0.0.236/trunk@123524 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 21:28:53 +00:00
darin%netscape.com
869750bcd2 fixes bug 133286 "Windows Media Player in full-page plugin mode may not repaint window"
patch=av r=dougt sr=darin


git-svn-id: svn://10.0.0.236/trunk@123523 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 21:21:47 +00:00
pinkerton%netscape.com
7039a328ba Check hidden attribute when creating separators. r=saari/sr=sfraser. bug#151693
git-svn-id: svn://10.0.0.236/trunk@123522 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 20:54:41 +00:00
locka%iol.ie
7ad7793c14 Add application launcher dialog to activex control, plus some member variable cleanup. b=126245 r=chak@netscape.com sr=rpotts@netscape.com
git-svn-id: svn://10.0.0.236/trunk@123520 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 20:47:41 +00:00
mitchf%netscape.com
3d1a4a6118 Added support for URLDisplayLength to DynamicText widgets.
Fixes bug 119400


git-svn-id: svn://10.0.0.236/trunk@123517 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 20:36:09 +00:00
ducarroz%netscape.com
7a2eba2709 Fix for bug 146584. We need to convert plain text data to HTML before inserting it into a HTML compose window. R=varada, SR=mscott
git-svn-id: svn://10.0.0.236/trunk@123516 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 20:34:10 +00:00
jst%netscape.com
e8443d3679 Adding new file for shared container elements. Not part of the build yet.
git-svn-id: svn://10.0.0.236/trunk@123513 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 20:03:54 +00:00
leaf%mozilla.org
83a9ba6026 adding java webclient for edburns (does not include blackwood)
git-svn-id: svn://10.0.0.236/trunk@123512 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 19:41:19 +00:00
pinkerton%netscape.com
5f466ecfab Add broken-image and loading-image gifs from dist/Embed/res
git-svn-id: svn://10.0.0.236/trunk@123511 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 19:07:34 +00:00
dougt%netscape.com
2842a2dd18 adding compreg.dat to package list. bug 152383 r=jj
git-svn-id: svn://10.0.0.236/trunk@123510 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 18:56:44 +00:00
pinkerton%netscape.com
f5a9707f87 Localize text and buttons (bug 148556)
git-svn-id: svn://10.0.0.236/trunk@123509 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 17:44:22 +00:00
pinkerton%netscape.com
648ccbb0bb add some strings
git-svn-id: svn://10.0.0.236/trunk@123508 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 17:43:39 +00:00
relyea%netscape.com
6414650fe0 1) Map flags both coming and going.
2) Finish transaction of the target database not the source database.


git-svn-id: svn://10.0.0.236/trunk@123507 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 16:41:41 +00:00
pinkerton%netscape.com
38a3814bbf Fix a warning
git-svn-id: svn://10.0.0.236/trunk@123506 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 14:35:12 +00:00
kaie%netscape.com
499a61f3ab b=145730 Avoid unnecessary repeated "encrypted page" alerts on JavaScript links.
r=jst sr=darin


git-svn-id: svn://10.0.0.236/trunk@123505 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 14:17:10 +00:00
pinkerton%netscape.com
62a1d41544 make us open url's as a service (bug 150860)
git-svn-id: svn://10.0.0.236/trunk@123504 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 13:52:17 +00:00
pinkerton%netscape.com
07377a75e2 Hookup more of the d/l progress dialog. change around the layout to get
rid of the dreaded groupboxes. remove a global variable.


git-svn-id: svn://10.0.0.236/trunk@123503 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 13:23:33 +00:00
rods%netscape.com
dbd287ce00 to fix breakage, using static cast.
git-svn-id: svn://10.0.0.236/trunk@123502 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 10:36:07 +00:00
bzbarsky%mit.edu
971edca6b3 layout tests, not part of build
git-svn-id: svn://10.0.0.236/trunk@123501 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 10:31:16 +00:00
bbaetz%student.usyd.edu.au
5c988c2ba0 Bug 152541 - After deleting remembered query it is still in page footer
r=jouni x2


git-svn-id: svn://10.0.0.236/trunk@123500 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 10:26:34 +00:00
racham%netscape.com
029d6ccdd3 Fixing bug 144563. Disable AccountManager panel elements and account setting preferences when the corresponding preferences are locked. This is a useful feature for Administrators and vendors. Special configuration tool to be used for generating a config file to feed the locked prefs to the app. r=srilatha, sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@123499 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 09:29:15 +00:00
glazman%netscape.com
0aa2a089cd nsHTMLEditor::GetInlinePropertyBase() was not detecting when the selection ends before first char of a text node; b=128401, r=brade, sr=kin
git-svn-id: svn://10.0.0.236/trunk@123498 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 09:20:07 +00:00
wtc%netscape.com
d642c6edd5 Bug 151940: SEC_PKCS12DecoderVerify should call SEC_ASN1DecoderFinish first
to detect insufficient input data error.


git-svn-id: svn://10.0.0.236/trunk@123497 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 05:00:39 +00:00
caillon%returnzero.com
ef6c5b4b10 Bug 152278, opening a groupmark shouldn't load about:blank into the active tab. r=blake sr=jag
git-svn-id: svn://10.0.0.236/trunk@123496 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 04:39:43 +00:00
arougthopher%lizardland.net
28efd0adf4 Bug#126843
Occasionally unable to get Focus set to URL bar and other text fields

fixed an ASSERTION when run with DEBUG enabled

r=serget@fi.tartu.ee


git-svn-id: svn://10.0.0.236/trunk@123495 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 04:11:07 +00:00
bzbarsky%mit.edu
fbbceb9ba0 Comments should match reality. No bug, r=jst, sr=jag
git-svn-id: svn://10.0.0.236/trunk@123494 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 02:55:09 +00:00
bzbarsky%mit.edu
adea31703d Check the status code of HTTP channels before blindly loading the
sheet.  Bug 112644, r=bbaetz, sr=darin


git-svn-id: svn://10.0.0.236/trunk@123493 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 02:46:11 +00:00
bzbarsky%mit.edu
8e8e728a62 fix rendering of <font size="+0">. Bug 150022, r=doron, sr=jst
git-svn-id: svn://10.0.0.236/trunk@123492 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 02:42:40 +00:00
kyle.yuan%sun.com
8057b841d9 Bug 133853 why always add <HTML> token into Tokenizer even there is an <HTML> token already?
r=harishd, sr=jst
Check in for Jerry Tan(jerry.tan@sun.com)'s fix.


git-svn-id: svn://10.0.0.236/trunk@123490 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 02:06:29 +00:00
srilatha%netscape.com
e02c16a0cb Fix for bug # 118804. Setting the width attribute on the directories List box
r=varada, andreww sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@123489 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 01:48:27 +00:00
mcafee%netscape.com
6989005c97 Adding xpcomsample to module map (152312). r=hwaara, sr=alecf. does not affect main seamonkey build.
git-svn-id: svn://10.0.0.236/trunk@123488 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 01:24:26 +00:00
rods%netscape.com
405c5bf75e Needs to be virtual (from sr's comments)
Implement the assign method with an "=" operator
Bug 151628 r=ccarlen sr=jst


git-svn-id: svn://10.0.0.236/trunk@123487 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 01:23:39 +00:00
mcafee%netscape.com
703b1a82b1 Explicitly call configure with sh, fixes windows (152312). r/code=hwaara, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@123486 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 01:18:46 +00:00
bzbarsky%mit.edu
9d76728323 fix build bustage -- views are not refcounted
git-svn-id: svn://10.0.0.236/trunk@123485 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 01:01:54 +00:00
seawood%netscape.com
da6eccbfc8 Bump lgot buffer again for MIPS builds.
Thanks to Nick Blievers <nickb@adacel.com.au> for the patch.
Bug #152453 r=cls


git-svn-id: svn://10.0.0.236/trunk@123484 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 01:01:07 +00:00
akkana%netscape.com
e38e444584 148713: prevent infinite loop when doing replace all backwards. r=brade sr=kin
git-svn-id: svn://10.0.0.236/trunk@123481 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 00:16:58 +00:00
rods%netscape.com
6eb9ee9ff3 Implement the assign method with an "=" operator
Bug 151628 r=ccarlen sr=jst
BUg CVS: ----------------------------------------------------------------------


git-svn-id: svn://10.0.0.236/trunk@123479 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-18 00:06:32 +00:00
alecf%netscape.com
c99c85379f add first-window case - when the window with the new title hasn't been seen, add it to the hashtable
git-svn-id: svn://10.0.0.236/trunk@123478 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 23:46:29 +00:00
bzbarsky%mit.edu
bd8809da27 NS4 measures image.x/image.y from the enclosing layer, not from the
body.  Bug 130415, r=jkeiser, sr=jst


git-svn-id: svn://10.0.0.236/trunk@123477 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 23:45:21 +00:00
cavin%netscape.com
b5784ffa5f Fix for 152449. Remember the CRC checksum for the updated card info in PatchHistoryTableWithNewID(). r=naving, sr=bienvenu.
git-svn-id: svn://10.0.0.236/trunk@123476 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 23:45:10 +00:00
alecf%netscape.com
2a4f3b2290 Not part of build
backing out my last change - totally unnecessary


git-svn-id: svn://10.0.0.236/trunk@123475 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 23:41:42 +00:00
kmcclusk%netscape.com
ecf379665c Save and restore transformation matrix translation components instead of setting a negative translation while painting to eliminate off by one pixel rendering errors in 120DPI display mode. bug=80530 r=dbaron sr=waterson
git-svn-id: svn://10.0.0.236/trunk@123474 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 23:35:15 +00:00
alecf%netscape.com
007d15c142 Not part of build
add category name to nsIWindowMediatorListener so listeners are created at startup


git-svn-id: svn://10.0.0.236/trunk@123473 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 23:25:21 +00:00
bzbarsky%mit.edu
7310cb4070 Bug 136670, bug 132688, add PR_LOG capability. r=jkeiser,sr=darin
git-svn-id: svn://10.0.0.236/trunk@123472 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 23:20:46 +00:00
mkaply%us.ibm.com
ef03642949 #128127
r=peterl, sr=beard
Add framework for plugin and java windowtypes


git-svn-id: svn://10.0.0.236/trunk@123471 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 22:52:48 +00:00
gerv%gerv.net
d223c17039 Bug 150955 - confirmation doesn't propagate when reassigning to new product/component. Patch by gerv; 2xr=bbaetz.
git-svn-id: svn://10.0.0.236/trunk@123470 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 21:52:19 +00:00
ssu%netscape.com
4f10888532 fixing bug 134745 - mail notification icon in system tray is the wrong icon (yellow triangle). r=bhuvan, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@123469 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 21:51:50 +00:00
nhotta%netscape.com
21b9094220 Check null pointer for arguments of Unicode conversion util functions,
bug 151769, r=ducarroz, sr=bienvenu.


git-svn-id: svn://10.0.0.236/trunk@123468 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 21:44:51 +00:00
seawood%netscape.com
1f965bacc3 Fix srcdir copy race condition by explicitly doing a cmp between the srcfile and the target.
Fixing tinderbox bustage.


git-svn-id: svn://10.0.0.236/trunk@123467 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 21:39:35 +00:00
tor%cs.brown.edu
8b077e2524 Bug 135579 - small interlaced PNGs not decoded correctly.
Patch from randeg@alum.rpi.edu, rs=tor.


git-svn-id: svn://10.0.0.236/trunk@123466 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 21:32:03 +00:00
ducarroz%netscape.com
543c79bf90 Fix for bug 151954. Fix bogus PR_Malloc check. Patch submitted by dbradley@netscape.com. R=ducarroz, SR=bienvenu
git-svn-id: svn://10.0.0.236/trunk@123465 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 21:22:29 +00:00
ducarroz%netscape.com
02934f0cd2 Fix for bug 150440. Change strings to be conform to spec. Patch submitted by mybugzilla@juima.org. R=ducarroz, SR=bienvenu
git-svn-id: svn://10.0.0.236/trunk@123464 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 21:16:48 +00:00
darin%netscape.com
65faf62727 fixes bug 140107 "HTTP headers show in frame [when server pipelines chunked
responses]" r=dougt sr=rpotts


git-svn-id: svn://10.0.0.236/trunk@123463 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 21:08:46 +00:00
ducarroz%netscape.com
beab16ccef Fix for bug 145291. We must generate the headers of all the children of an multipart/appledouble attachment when doing parts-on-demand in order to have all the needed information to generate the attachment entry in the UI. R=cavin, SR=bienvenu
git-svn-id: svn://10.0.0.236/trunk@123461 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 21:07:55 +00:00
mkaply%us.ibm.com
9d5e412a70 #150735
r=jeffreyj@us.ibm.com, sr=blizzard
OS/2 only - remove unnecessary class nsCanvas


git-svn-id: svn://10.0.0.236/trunk@123460 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 21:06:09 +00:00
shaver%mozilla.org
e97285d861 Bug 76968: expand ~/ into NS_OS_HOME_DIR in nsLocalFileUnix. r=bzbarsky,
sr=blizzard.


git-svn-id: svn://10.0.0.236/trunk@123459 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 21:03:43 +00:00
mkaply%us.ibm.com
b53a33b90f #147702
r=jeffreyj@us.ibm.com, sr=blizzard
OS/2 only - rewrite window proc to better handle things happening during deletion


git-svn-id: svn://10.0.0.236/trunk@123457 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 20:54:08 +00:00
naving%netscape.com
adb51ca23c bugscape 15244 r=cavin sr=bienvenu Make webmail folder "Draft" show Recipient instead of Sender
git-svn-id: svn://10.0.0.236/trunk@123455 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 20:49:44 +00:00
bzbarsky%mit.edu
93a8587b78 Don't send HEAD to FTP servers behind HTTP proxies. Bug 148813,
r=bbaetz, sr=darin


git-svn-id: svn://10.0.0.236/trunk@123454 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 20:49:42 +00:00
mkaply%us.ibm.com
2369ac1bcb #150679
r=jeffreyj@us.ibm.com, sr=mscott
OS/2 only - add OS mail integration


git-svn-id: svn://10.0.0.236/trunk@123451 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 20:49:26 +00:00
cmanske%netscape.com
3404165b95 Fixed crash when inserting column in table, b=152320, r=brade, sr=kin
git-svn-id: svn://10.0.0.236/trunk@123450 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 20:40:47 +00:00
shaver%mozilla.org
c2d949e101 Bug 116653: Teach x-remote about openURL(,new-tab). r=blizzard, sr=jag.
git-svn-id: svn://10.0.0.236/trunk@123449 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 20:39:54 +00:00
relyea%netscape.com
d3c91087e3 Standardize the open flags as 'enums' when using multiaccess databases, no matter
if we are using PR_ versions of the flags or O_ versions of the flags.


git-svn-id: svn://10.0.0.236/trunk@123448 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 18:46:27 +00:00
seawood%netscape.com
b795045d2a Re-adding with executable bit set.
git-svn-id: svn://10.0.0.236/trunk@123445 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 17:30:26 +00:00
seawood%netscape.com
5701b22ce4 Oops. These need to be executable by default
git-svn-id: svn://10.0.0.236/trunk@123444 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 17:28:39 +00:00
pinkerton%netscape.com
86ce5fd16c Hookup copy/paste/etc context menus for text areas. (bug 151662)
git-svn-id: svn://10.0.0.236/trunk@123443 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 17:14:51 +00:00
leaf%mozilla.org
b6af887650 Automated update
git-svn-id: svn://10.0.0.236/trunk@123442 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 17:10:43 +00:00
seawood%netscape.com
d401003cfc Fixing win32 gmake builds lack of debugging information problem by working around a combination MSVC & cygwin make deficiencies:
* We must use the full path to the source file when calling MSVC so that debugging information shows up in the object files.
* Because of cygwin's use of /cygdrive when using full paths, we must use a cygwin-wrapper script in some cases to allow native win32 programs to use a fully qualified cygwin path.
* We have to call configure using the full path so that $(srcdir) contains the
full path in the Makefiles. The rules have been changed for win32 so that it
always use $(srcdir)/$*.{c,cpp} as the sourcefile name even when the file is in
the cwd.  This works around both the /cygdrive issue and the msvc's path info
optimization.
* We still use the wrapper when calling rc.exe & nsinstall.  nsinstall
frequently takes multiple args and is called all over the tree so changing each
calling site is going to be expensive.	(I'll have to check  the logs again but
I think the rc wrapping can go.)
* nspr & ldap still use the wrappers for all native win32 progs.  Neither nspr
nor ldap uses the acoutput-fast.pl script to speed up the substitution of
@srcdir@ into their Makefiles so, makefile substitution will break if we use
dos-paths.
* In the handful of directories where we copy srcfiles from another directory
in lieu of using VPATHs, we have to now copy those files to $(srcdir) so that
the default rules can find them.
Bug #141834 r=leaf,wtc,dmose,mcs


git-svn-id: svn://10.0.0.236/trunk@123440 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 17:09:57 +00:00
seawood%netscape.com
77e5bb115a Fixing win32 gmake builds lack of debugging information problem by working around a combination MSVC & cygwin make deficiencies:
* We must use the full path to the source file when calling MSVC so that debugging information shows up in the object files.
* Because of cygwin's use of /cygdrive when using full paths, we must use a cygwin-wrapper script in some cases to allow native win32 programs to use a fully qualified cygwin path.
* We have to call configure using the full path so that $(srcdir) contains the
full path in the Makefiles. The rules have been changed for win32 so that it
always use $(srcdir)/$*.{c,cpp} as the sourcefile name even when the file is in
the cwd.  This works around both the /cygdrive issue and the msvc's path info
optimization.
* We still use the wrapper when calling rc.exe & nsinstall.  nsinstall
frequently takes multiple args and is called all over the tree so changing each
calling site is going to be expensive.	(I'll have to check  the logs again but
I think the rc wrapping can go.)
* nspr & ldap still use the wrappers for all native win32 progs.  Neither nspr
nor ldap uses the acoutput-fast.pl script to speed up the substitution of
@srcdir@ into their Makefiles so, makefile substitution will break if we use
dos-paths.
* In the handful of directories where we copy srcfiles from another directory
in lieu of using VPATHs, we have to now copy those files to $(srcdir) so that
the default rules can find them.
Bug #141834 r=leaf,wtc,dmose,mcs


git-svn-id: svn://10.0.0.236/trunk@123439 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 17:07:17 +00:00
myk%mozilla.org
a3473a60eb Fix for bug 150792: Locks profiles table so adding a CC while creating a bug doesn't fail.
2xr=bbaetz


git-svn-id: svn://10.0.0.236/trunk@123438 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 15:56:09 +00:00
pinkerton%netscape.com
bc31c14df0 Strip whitespace around url (bug 149082)
git-svn-id: svn://10.0.0.236/trunk@123437 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 15:24:29 +00:00
pinkerton%netscape.com
432946917c fixing up locked profile error text.
git-svn-id: svn://10.0.0.236/trunk@123436 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 15:16:46 +00:00
pinkerton%netscape.com
734cfd7f6b Fix for crash launching when another version is already running. bug 148556
git-svn-id: svn://10.0.0.236/trunk@123435 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 15:10:37 +00:00
dcone%netscape.com
a3cd5903f0 b=142513 r=kmmclusk sr=waterson Fixed blue text, used correct type for calculation.
git-svn-id: svn://10.0.0.236/trunk@123434 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 14:03:39 +00:00
mikep%oeone.com
fa0a102368 Adding in check for calendar window to remove js error.
git-svn-id: svn://10.0.0.236/trunk@123433 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 13:39:29 +00:00
mikep%oeone.com
0df4786fe7 Adding fix from bug 146212, allowing silent import of events.
git-svn-id: svn://10.0.0.236/trunk@123432 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 13:38:57 +00:00
mostafah%oeone.com
5f93e66fd4 Fixed bug 152274: Calling fetchEvent with null parameter crashes Mozilla
git-svn-id: svn://10.0.0.236/trunk@123431 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 12:42:24 +00:00
bbaetz%student.usyd.edu.au
63a996279d Bug 151529 - No list of votes shown if there is a + sign in the address
r=jouni x2


git-svn-id: svn://10.0.0.236/trunk@123430 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 11:29:51 +00:00
kaie%netscape.com
4ecef3845e b=148610 Lock icon should be updated as early as possible.
r=javi sr=rpotts


git-svn-id: svn://10.0.0.236/trunk@123429 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 09:56:14 +00:00
bbaetz%student.usyd.edu.au
4403bbe04e Bug 151053, ConnectToDatabase/quietly_check_login sometimes not called
early enough
r=mattyt, jouni


git-svn-id: svn://10.0.0.236/trunk@123428 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 09:39:48 +00:00
rogerl%netscape.com
6799a03665 Start.
git-svn-id: svn://10.0.0.236/trunk@123427 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 06:40:50 +00:00
shanjian%netscape.com
d2b36ef7f5 #84668 Ugly Chinese font in dialogs and menu on simplified chinese windows
Force system font to be 9 when default is 8. This only applies to simplified
chinese system.
r=ftang, sr=alecf


git-svn-id: svn://10.0.0.236/trunk@123426 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 05:22:34 +00:00
henry.jia%sun.com
cbd4179771 Bug 150627 inconsistant between display and action(modifier) of short cut key for function 'Select All'
r=Akkana
sr=hewitt


git-svn-id: svn://10.0.0.236/trunk@123422 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 01:43:29 +00:00
nboyd%atg.com
c048ebabbe Patch from morten@nvg.org :
I keep getting syntax errors with no line numbers as well.

That happens when I use Context.compileReader(..) to compile the script. The
DefaultErrorReporter will throw an exception with only the message and not the
line it happened on.

It is of course easy to workaround using your own error reporter, but I've
attached a patch to add on the line and source name so the DefaultErrorReporter
gives the similar output as EcmaError if that is wanted.


git-svn-id: svn://10.0.0.236/trunk@123421 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-17 00:49:47 +00:00
nboyd%atg.com
1eac87dfa5 Update last qualified release statement.
git-svn-id: svn://10.0.0.236/trunk@123420 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-16 23:51:15 +00:00
stephend%netscape.com
1fdca35cb1 Bug145409. JS strict warnings in certManager.js. Patch by Stephen Walker <walk84@yahoo.com> r=kaie@netscape.com, sr=jaggernaut@netscape.com
git-svn-id: svn://10.0.0.236/trunk@123419 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-16 21:19:25 +00:00
sicking%bigfoot.com
1a730ed138 Attribute axis should not include namespace declarations.
b=123357 r=peterv sr=jst


git-svn-id: svn://10.0.0.236/trunk@123417 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-16 16:58:13 +00:00
bernd.mielke%snafu.de
9843d9afab running the layout regression tests - a description not part of any build
git-svn-id: svn://10.0.0.236/trunk@123415 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-16 10:38:06 +00:00
cbiesinger%web.de
624f81eece bug 150002 r=paper sr=tor
make XBM images transparent


git-svn-id: svn://10.0.0.236/trunk@123414 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-16 08:27:25 +00:00
samuel%sieb.net
695cf90960 Bug 143039 - Typo in nsXmlRpcClient.js
r=samuel@sieb.net
sr=heikki


git-svn-id: svn://10.0.0.236/trunk@123413 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-16 06:17:54 +00:00
samuel%sieb.net
7db2a571f4 Bug 137171 - XML-RPC bug handling dates with months 10 and over
r=rginda
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@123412 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-16 06:14:31 +00:00
bbaetz%student.usyd.edu.au
7ff16f42c2 Bug 151369 - need to trim the entered assignee's email address
r=mattyt x2


git-svn-id: svn://10.0.0.236/trunk@123411 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-16 05:28:17 +00:00
arougthopher%lizardland.net
7ee08a9607 Bug#149332
Mozilla doesn't save its windows position when closed.

adds an implementation of GetScreemBounds, and registers frame movements, so they are saved and used when reopenning the window.

r=serget@fi.tartu.ee


git-svn-id: svn://10.0.0.236/trunk@123410 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-16 02:58:49 +00:00
arougthopher%lizardland.net
3e4a538051 Bug#152085
nsSound not being registered as a component under BeOS

The nsSound component was not being registerred, causing ChatZilla to not work properly.

r=serget@fi.tartu.ee


git-svn-id: svn://10.0.0.236/trunk@123409 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-16 02:51:27 +00:00
waterson%netscape.com
40294bf2aa Bug 146125. Zero top- and bottom-margin for <th> in same cases we zero for <td>. r=dbaron, sr=kin
git-svn-id: svn://10.0.0.236/trunk@123407 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-16 00:51:55 +00:00
waterson%netscape.com
f601d73d1d Bug 146797. Bullet-proof RDF containers so that uninitialized use (e.g., from script) won't cause a crash. r=tingley, sr=shaver
git-svn-id: svn://10.0.0.236/trunk@123406 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-16 00:44:06 +00:00
bryner%netscape.com
b848d573e1 Fix crasher 151568 caused by my checkin for focus bug 131651. r=dbaron, sr=blake.
git-svn-id: svn://10.0.0.236/trunk@123405 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-15 23:38:06 +00:00
arougthopher%lizardland.net
cc45d84576 Bug#126843
Occasionally unable to get Focues set to URL bar and other widgets

fixes a long standing focus issue under the BeOS port

r=arougthopher


git-svn-id: svn://10.0.0.236/trunk@123404 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-15 23:31:00 +00:00
caillon%returnzero.com
922782efff Bug 134800, Clicking on a groupmark shouldn't clobber all open tabs. r=jag sr=blake
git-svn-id: svn://10.0.0.236/trunk@123401 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-15 22:30:06 +00:00
bzbarsky%mit.edu
900c1c5529 Fixing strict js warning. Bug 79825, patch by neil@parkwaycc.co.uk, r=varada,sr=jag
git-svn-id: svn://10.0.0.236/trunk@123400 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-15 22:21:51 +00:00
cbiesinger%web.de
f805641c10 bug 144488 patch by leaf r=timeless sr=tor
Change get new themes link to http://mozilla.org/themes/download/ instead of xulplanet


git-svn-id: svn://10.0.0.236/trunk@123396 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-15 21:29:52 +00:00
ere%atp.fi
4ec4085cab Bug 146559 New mail indicator does not work for non-inbox imap folders
r=bienvenu@netscape.com, sr=brendan@mozilla.org


git-svn-id: svn://10.0.0.236/trunk@123391 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-15 20:07:49 +00:00
ere%atp.fi
0e191b52d4 Bug 120106 IMAP: Empty mail when disconnected
r=bienvenu@netscape.com, sr=brendan.mozilla.org


git-svn-id: svn://10.0.0.236/trunk@123390 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-15 19:51:47 +00:00
beard%netscape.com
1720b469d4 added #if QUICKTIME_THROBBER to conditionally use Quicktime Movie to implement throbber.
git-svn-id: svn://10.0.0.236/trunk@123389 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-15 16:34:48 +00:00
peterlubczynski%netscape.com
6d32e25bf6 Fixing IPIX for Mac Classic: SetWindow needed to be called and nsObjectFrame::DidReflow() needed to complete on Mac as well, bug 144896 r=av sr=beard
git-svn-id: svn://10.0.0.236/trunk@123388 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-15 16:05:09 +00:00
bryner%netscape.com
82cb05e5d3 Fix a crash on cbs.com in Mac mach-o builds by making sure to check the return value from initializing the image frame (which fails on mac for images wider that 4096 pixels or so). Bug 149091, r=saari, sr=ben.
git-svn-id: svn://10.0.0.236/trunk@123387 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-15 06:40:15 +00:00
seawood%netscape.com
eee428afe5 Use macros to declare static callback functions to make OS/2 happy.
Fixing tinderbox bustage.


git-svn-id: svn://10.0.0.236/trunk@123385 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-15 05:56:20 +00:00
bbaetz%student.usyd.edu.au
4e72d39123 Bug 148712 - add component with error/invalid initial owner results in
double header output
patch by stu@xanboo.com (Stu Tomlinson), r=jouni, bbaetz


git-svn-id: svn://10.0.0.236/trunk@123384 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-15 05:35:59 +00:00
dougt%netscape.com
3d5dfe1810 fixing a uninitialized var
git-svn-id: svn://10.0.0.236/trunk@123381 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-15 03:58:10 +00:00
bbaetz%student.usyd.edu.au
c07589174d Bug 151695 - assignee/qa contact can't access secure bugs
r=myk x2


git-svn-id: svn://10.0.0.236/trunk@123380 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-15 01:56:14 +00:00
beard%netscape.com
2f4e57a199 Bare bones "Search" toolbar button. Need a real icon, using the Finder's for now.
git-svn-id: svn://10.0.0.236/trunk@123379 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-15 01:42:05 +00:00
oeschger%netscape.com
3a70743e87 additions to search db for help, dispensaton per 122806
git-svn-id: svn://10.0.0.236/trunk@123378 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-15 00:49:43 +00:00
beard%netscape.com
39a9d51262 Only run the throbber timer if the throbber toolbar item is visible, and increase the timer interval to 1/5 second to use less CPU.
git-svn-id: svn://10.0.0.236/trunk@123376 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-15 00:41:03 +00:00
mstoltz%netscape.com
3cba7a04ae 133170 - Need to re-check host for security on a redirect after a call to
XMLHttpRequest.open(). For xmlextras, r=heikki, sr=jband. For caps,
r=bzbarsky, sr=jst
147754 - Add same-origin check to XMLSerializer. Patch by jst. r=mstoltz,
sr=jband
113351 - Add same-origin check to XSL Include. Patch by peterv and jst,
r=mstoltz, sr=rpotts
135267 - Add same-origin check to stylesheets included via LINK tags.
r=dveditz, sr=scc


git-svn-id: svn://10.0.0.236/trunk@123373 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 23:54:18 +00:00
rbs%maths.uq.edu.au
65cf3c1192 Treat the attributes of <mpadded> correctly, b=148326, r=roc+moz, sr=waterson
git-svn-id: svn://10.0.0.236/trunk@123366 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 23:20:03 +00:00
heikki%netscape.com
67bca4fa92 Forgot to remove extra addref.
git-svn-id: svn://10.0.0.236/trunk@123365 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 23:19:59 +00:00
beard%netscape.com
7ed0e8f76a Added throbber images to static target.
git-svn-id: svn://10.0.0.236/trunk@123364 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 23:18:14 +00:00
naving%netscape.com
3e45f6cfa0 15244 r=cavin sr=bienvenu Make aol "Sent Mail" and netscape webmail "Sent" folders show "Recipient" column instead of "Sender" column in thread pane.
git-svn-id: svn://10.0.0.236/trunk@123363 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 23:03:49 +00:00
naving%netscape.com
4d6a8f11a0 136721 r=bhuvan sr=bienvenu. fixing bug where news server should be prepopulated in account wizard after running auto-subscribe urls.
git-svn-id: svn://10.0.0.236/trunk@123362 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 22:53:15 +00:00
cmanske%netscape.com
2769794194 Forgot contributor line for b=150915, fix by r=ask@swva.net, r=cmanske, sr=kin
git-svn-id: svn://10.0.0.236/trunk@123361 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 22:52:06 +00:00
beard%netscape.com
170982670e Replace throbber-NN.tif with throbber-NN.gif.
git-svn-id: svn://10.0.0.236/trunk@123360 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 22:50:25 +00:00
naving%netscape.com
dc4de4894a 136721 r=bhuvan sr=bienvenu. fixing bug where news server should be prepopulated in account wizard after running auto-subscribe urls.
git-svn-id: svn://10.0.0.236/trunk@123359 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 22:49:22 +00:00
beard%netscape.com
c28831166e Fix broken throbber images. Switch to smaller .gif format.
git-svn-id: svn://10.0.0.236/trunk@123358 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 22:47:46 +00:00
dougt%netscape.com
0fa36f3315 strdup is not defined on the mac...
git-svn-id: svn://10.0.0.236/trunk@123356 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 22:25:24 +00:00
akkana%netscape.com
8c220f972c 145727: use nsString.FindChar, clean up conflicting string usages. Patch from skamio@netscape.net (Shotaro Kamio), r=akkana, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@123355 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 22:10:56 +00:00
bnesse%netscape.com
ee70597270 Fix for bug 141035. Missing autoconfig file in packaging. r=alecf, sr=dveditz.
git-svn-id: svn://10.0.0.236/trunk@123354 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 21:57:18 +00:00
mcafee%netscape.com
e4120d8a6c Fix REQUIRES-built TestGtkEmbed, missing directories for webbrwsr module. Adding some missing dirs to embedcomponents map as well. (149624) r=blythe, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@123353 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 21:51:37 +00:00
dougt%netscape.com
90166a6762 48888 missing makefile.win change
git-svn-id: svn://10.0.0.236/trunk@123352 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 21:50:50 +00:00
pinkerton%netscape.com
1ac239a535 Null params are allowed to be passed to GetDimensions. Just check when
they're being accessed. bug 151885


git-svn-id: svn://10.0.0.236/trunk@123351 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 21:40:04 +00:00
dougt%netscape.com
dffd6e4f8a Fixes 48888 - xpcom flat file backend. r=dp@netscape.com sr=waterson@netscape.com
git-svn-id: svn://10.0.0.236/trunk@123350 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 21:33:05 +00:00
oeschger%netscape.com
e9bfb59882 fixing help button in offline dialog, bug=129540, attachment 86751, r=andreww, sr=alecf, a=dbaron
git-svn-id: svn://10.0.0.236/trunk@123349 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 21:03:16 +00:00
tor%cs.brown.edu
8872709129 Bug 149743 - remove dead gfx2 files from the tree. rs=blizzard
git-svn-id: svn://10.0.0.236/trunk@123348 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 20:46:40 +00:00
peterlubczynski%netscape.com
3f4bbe0254 Fixing a crash with Java [@nsPluginHostImpl::AddInstanceToActiveList][@ jpins32.dll] where it doesn't addref the peer or returns error from Initialize, bug 140931 r=serge sr=beard
git-svn-id: svn://10.0.0.236/trunk@123347 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 20:45:29 +00:00
varga%utcru.sk
2a0ec34be8 Part of fix for bug 123719.
- using sort variables instead of cycleHeader()

r=neil, sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@123346 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 20:37:03 +00:00
alecf%netscape.com
496227a070 not part of build
add windowds to windows nmake build


git-svn-id: svn://10.0.0.236/trunk@123345 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 20:31:44 +00:00
pinkerton%netscape.com
adff61483a Update number of throbber images
git-svn-id: svn://10.0.0.236/trunk@123344 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 20:20:43 +00:00
pinkerton%netscape.com
2134ab0795 Throbber that needs some work.
git-svn-id: svn://10.0.0.236/trunk@123343 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 20:19:09 +00:00
heikki%netscape.com
0e9d23116e Bug 151745, need to stabilize XPCOM object before using (prevents a crash in SVG). Patch from alex.fritze@crocodile-clips.com, r=peterv, sr=heikki.
git-svn-id: svn://10.0.0.236/trunk@123342 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 20:02:29 +00:00
mitchf%netscape.com
ab9c3caa7a enlarged DynamicText widget lengths for longer pathnames
half of fix for bug 119400


git-svn-id: svn://10.0.0.236/trunk@123341 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 19:30:32 +00:00
mitchf%netscape.com
8e1853b8b8 Changed length of pathname trimming
Half of fix for bug 119400


git-svn-id: svn://10.0.0.236/trunk@123340 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 19:28:57 +00:00
cmanske%netscape.com
749479c013 Support 'file://' as destination protocol in Publishing, b=142171, r=brade, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@123339 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 19:17:57 +00:00
ftang%netscape.com
533691a6eb fix bug 15004. r=yokoyama sr=kin carry the member data correctly into the merged function.
git-svn-id: svn://10.0.0.236/trunk@123338 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 19:05:11 +00:00
cmanske%netscape.com
0f3c61e24e Fix font names in sans-serif font group, b=150915, fix by r=ask@swva.net, r=cmanske, sr=kin
git-svn-id: svn://10.0.0.236/trunk@123337 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 19:04:15 +00:00
bzbarsky%mit.edu
27c460e18b Remove UI for the target="_blank" blocking for now. Bug 78037, patch by
jonasj@jonasj.dk (Jonas Jorgensen), r=doron,bzbarsky, sr=jag


git-svn-id: svn://10.0.0.236/trunk@123336 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 18:56:19 +00:00
heikki%netscape.com
76e55d41f0 Bug 125583, disable automatic XLinks in mail, and make it so that pref dom.disable_open_during_load also disables all automatic XLinks that try to open in new window. r=harishd, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@123335 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 18:52:16 +00:00
pinkerton%netscape.com
85a1996b1f Fix throbber placement and label, fix Delete menu item
git-svn-id: svn://10.0.0.236/trunk@123334 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 18:44:52 +00:00
varada%netscape.com
a939fef597 fix for bug#144569;should import smtp username from eudora,oe and outlook;r=srilatha;sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@123332 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 18:32:21 +00:00
pavlov%netscape.com
eba5f529b4 checking in bug 101018 for paper@animecity.nu. r=pavlov sr=tor@acm.org.
git-svn-id: svn://10.0.0.236/trunk@123331 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 18:25:33 +00:00
nicolson%netscape.com
a9e7516ae5 add new tests.
git-svn-id: svn://10.0.0.236/trunk@123330 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 18:15:45 +00:00
nicolson%netscape.com
d785948113 remove broken code until bug is fixed.
git-svn-id: svn://10.0.0.236/trunk@123329 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 18:15:21 +00:00
nicolson%netscape.com
77c0f2a80a remove bogus comment.
git-svn-id: svn://10.0.0.236/trunk@123328 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 18:13:27 +00:00
beard%netscape.com
e2febf0616 Added calls to start/stop the throbber while pages load.
git-svn-id: svn://10.0.0.236/trunk@123327 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 18:10:26 +00:00
beard%netscape.com
fb3b5090df Added throbber images and Quicktime.framework
git-svn-id: svn://10.0.0.236/trunk@123326 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 18:09:40 +00:00
alecf%netscape.com
6623fb67f1 not part of build
update window datasource for bug 132175 - remove debugging, kill intaskslist support (nobody uses it anyway)


git-svn-id: svn://10.0.0.236/trunk@123325 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 18:08:23 +00:00
beard%netscape.com
9d067b2d3c Added Throbber toolbar item.
git-svn-id: svn://10.0.0.236/trunk@123324 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 18:07:08 +00:00
ducarroz%netscape.com
47dbeb95ff Fix for bug 80819. Do not automatically generate a message ID for news posting. Patch provided by frank.schoenheit@sun.com. R=ducarroz, SR=bienvenu
git-svn-id: svn://10.0.0.236/trunk@123323 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 18:07:07 +00:00
pinkerton%netscape.com
7d64dcef9e fix pref to turn off cg metrics. bug 149427, r=ccarlen/sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@123322 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 17:50:24 +00:00
peterlubczynski%netscape.com
866d996c57 Fixing NS_MakeAbsoluteURI so it doesn't crash on default parameters, bug 148233 r=serge, sr=darin
git-svn-id: svn://10.0.0.236/trunk@123321 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 17:44:20 +00:00
relyea%netscape.com
e85aa158d5 check version of the existing DB, not the updatedb.
git-svn-id: svn://10.0.0.236/trunk@123320 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 17:29:56 +00:00
myk%mozilla.org
af3f6a837f Fix for bug 151658: get UI for moving bugs showing again.
r=gerv,bbaetz


git-svn-id: svn://10.0.0.236/trunk@123319 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 16:56:20 +00:00
karnaze%netscape.com
e519a40b96 new regression tests, not affecting the build.
git-svn-id: svn://10.0.0.236/trunk@123318 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 14:56:54 +00:00
karnaze%netscape.com
54191082bf bug 148399 - fix places where patch in bug 145305 incorrectly changed checks for NS_FRAME_COMPLETE to use NS_FRAME_IS_NOT_COMPLETE macro. sr=kin, r=alexsavulov
git-svn-id: svn://10.0.0.236/trunk@123317 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 14:40:02 +00:00
karnaze%netscape.com
924ea247db bug 148245 - only split floaters when printing if the height is constrained, never split floating first letters. sr=waterson
git-svn-id: svn://10.0.0.236/trunk@123316 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 14:30:33 +00:00
karnaze%netscape.com
9f770f5106 bug 151230 - consider style width when calculating avail width for a cell only during initial reflow. sr=kin, r=alexsavulov
git-svn-id: svn://10.0.0.236/trunk@123315 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 14:21:03 +00:00
karnaze%netscape.com
e241f72315 bug 148338 - fixed optimization in nsTableRowGroupFrame::CalculateRowHeights to only process the newly added rows. sr=waterson, r=bernd
git-svn-id: svn://10.0.0.236/trunk@123314 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 14:17:01 +00:00
glazman%netscape.com
fa208cf299 Making nsCSSDeclaration::GetValue() call itself to respond !important values when needed was making the CSS Parser choke in nsCSSParserImpl::AppendValue()
b=148501, r=brade, r=bzbarsky, sr=jst


git-svn-id: svn://10.0.0.236/trunk@123313 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 12:36:43 +00:00
ccarlen%netscape.com
a7e7d2a7c2 Bug 134448 - xpti needs to scan OS-defined plugin dirs. r=peterl, sr=beard
git-svn-id: svn://10.0.0.236/trunk@123312 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 12:30:44 +00:00
rods%netscape.com
99a9d007bd Add an interface to nsDataObjectCollection so we can QI to check to make sure
it is one of our objects before doing the static cast.
Bug 106211 r=pink sr=jst


git-svn-id: svn://10.0.0.236/trunk@123311 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 11:28:13 +00:00
ssu%netscape.com
9b174da0a3 fixing bug 134745 - mail notification icon in system tray is the wrong icon (yellow triangle). r=varada, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@123310 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 08:38:29 +00:00
gerv%gerv.net
627b67ed9c Bug 151122 - Email prefs: Reporter / Owner messed up. Patch by jouni; r=gerv, bbbaetz.
git-svn-id: svn://10.0.0.236/trunk@123309 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 07:20:22 +00:00
jkeiser%netscape.com
cf0eaecfb1 Make enter fire onChange for non-dropped-down select. bug 150759, r=rods@netscape.com, sr=kin@netscape.com
git-svn-id: svn://10.0.0.236/trunk@123308 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 06:50:22 +00:00
jkeiser%netscape.com
be99cc147f Make form within table or tr not create a cell frame and screw up layout. bug 149282, r=dbaron@fas.harvard.edu, sr=waterson@netscape.com
git-svn-id: svn://10.0.0.236/trunk@123307 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 06:47:35 +00:00
kin%netscape.com
e85d2ba2cf Fix for bug 150566 (Readonly text fields aren't read-only)
Use kNameSpaceID_None when calling GetAttr() so that the
backend find attribute code in the content module matches
against atoms.

Removed calls to GetNameSpaceID().

r=jkeiser@netscape.com  sr=jst@netscape.com


git-svn-id: svn://10.0.0.236/trunk@123306 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 06:01:29 +00:00
wtc%netscape.com
f6ea2a23b1 The previous checkin didn't work. Backed it out.
git-svn-id: svn://10.0.0.236/trunk@123305 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 05:37:41 +00:00
seawood%netscape.com
0785c0f7d3 Use ftp.mozilla.org for the ftp test as ftp.netscape.com is ironicly unreachable from inside the Netscape firewall.
git-svn-id: svn://10.0.0.236/trunk@123302 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 05:29:20 +00:00
wtc%netscape.com
3e4310c8c8 Bug 151722: addr is in shared memory and is modified by another process, so
it needs to be declared volatile.


git-svn-id: svn://10.0.0.236/trunk@123300 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 05:25:52 +00:00
seawood%netscape.com
87c856e6bd Use the same name for the application profile directory in the registry as the profile manager does.
Bug #146150 r=arougthopher


git-svn-id: svn://10.0.0.236/trunk@123299 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 05:08:05 +00:00
wtc%netscape.com
6dfc18db5c Bug 151711: gcc on OSF1 needs to use the -mieee flag.
git-svn-id: svn://10.0.0.236/trunk@123298 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 05:05:59 +00:00
dprice%netscape.com
6cbca3a38a 149791 r=curt sr=dveditz
make superseded components invisible in selection list


git-svn-id: svn://10.0.0.236/trunk@123297 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 04:59:38 +00:00
dprice%netscape.com
968e75d5b8 137384 r=curt sr=dveditz
license file included with saved setup files


git-svn-id: svn://10.0.0.236/trunk@123296 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 04:56:39 +00:00
joki%netscape.com
bbd30f7c20 Fix for bug 123700, send synthetic mouseenter/out messages to IFRAME elements to allow tracking when mouse is inside IFRAME. r:harishd, sr:jst
git-svn-id: svn://10.0.0.236/trunk@123295 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 04:14:55 +00:00
jay.yan%sun.com
1ab12e40c7 bug 137106 need to move changes to nsPlatformToDOMKeyCOde into gtk2,r=akk,sr=blizard
git-svn-id: svn://10.0.0.236/trunk@123294 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 03:37:25 +00:00
wtc%netscape.com
b6972ae532 Bug 125819: fixed problems compiling using gcc on OSF1. The patch is
contributed by Chris Seawood <seawood@netscape.com>.
Modified Files: configure configure.in unix.c uxrng.c


git-svn-id: svn://10.0.0.236/trunk@123293 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 03:24:33 +00:00
cotter%netscape.com
160e779658 ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; latest privacy & security legal reviews, formatting updates
git-svn-id: svn://10.0.0.236/trunk@123287 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 02:19:38 +00:00
kaie%netscape.com
c4ca9e1986 b=119394 Support fetching certificates from LDAP servers.
r=javi/dmose sr=mscott


git-svn-id: svn://10.0.0.236/trunk@123285 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 02:10:02 +00:00
srilatha%netscape.com
fc1092ad79 Fix for bug # 149758. Pre-configuring and locking ldap server preferences
r=rdayal, sr=sspitzer.


git-svn-id: svn://10.0.0.236/trunk@123283 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 01:56:45 +00:00
aaronl%netscape.com
9ece420781 Bug 148007 - Active Accessibility: wrong accState for XUL label and description elements. r=kyle, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@123282 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 01:47:35 +00:00
aaronl%netscape.com
df8aa3ff05 Bug 147976 - Active Accessibility: progress meter get_accValue() sometimes returning value with 2 Progress meter <label> not getting picked up in get_accName(). r=kyle, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@123281 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 01:47:32 +00:00
aaronl%netscape.com
13c2f92491 Bug 147756 - Active Accessibility: get_accValue returning NS_ERROR_FAILURE for selects. r=kyle, sr=jst
git-svn-id: svn://10.0.0.236/trunk@123280 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 01:47:26 +00:00
naving%netscape.com
7e77598a7c 150716 patch by bienvenu and darin. r=dougt sr=bienvenu. make compact folders work again. The fix is to clear all the member variables pertaining to the request before calling OnStopRequest
git-svn-id: svn://10.0.0.236/trunk@123279 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 01:40:54 +00:00
dmose%netscape.com
05080f2575 First match not pre selected when multiple matches are present in directory (bug 102693); r=ducarroz@netscape.com, sr=mscott@netscape.com
git-svn-id: svn://10.0.0.236/trunk@123278 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 01:21:23 +00:00
dmose%netscape.com
e22bbce0e2 support for binary attribute values in LDAP XPCOM SDK (bug 119380). r=peterv@netscape.com, sr=sspitzer@netscape.com/mscott@netscape.com
git-svn-id: svn://10.0.0.236/trunk@123276 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-14 00:38:18 +00:00
kaie%netscape.com
ed4333f06f b=150863 Fix lock icon state for low/high crypto mix.
r=javi sr=alecf


git-svn-id: svn://10.0.0.236/trunk@123275 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 23:59:01 +00:00
kaie%netscape.com
39e7f2c5cb b=133995 Only allow sending encrypted mail using valid recipient certs.
r=javi sr=mscott


git-svn-id: svn://10.0.0.236/trunk@123274 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 23:54:56 +00:00
relyea%netscape.com
ba721cf789 Add transactions to the database update portion of the code.
git-svn-id: svn://10.0.0.236/trunk@123273 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 23:25:37 +00:00
despotdaemon%netscape.com
b77fd1f9df Pseudo-automatic update of changes made by asasaki@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@123272 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 22:55:20 +00:00
despotdaemon%netscape.com
51fe6ae058 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@123271 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 22:48:04 +00:00
gerv%gerv.net
0ffac72c3d Bug 151327 - verify_new_product.html.tmpl prints wrong message. Patch by gerv; 2xr=bbaetz.
git-svn-id: svn://10.0.0.236/trunk@123270 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 22:45:19 +00:00
peterv%netscape.com
9eb5e6fe2b Fix for bug 88623 (Cleanup Transformiix code - remove XSLType). r=sicking, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@123262 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 22:31:20 +00:00
peterv%netscape.com
3d78e09cce Fix for bug 136272 (definition of isDigit may be incomplete). r=sicking, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@123261 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 22:27:19 +00:00
cmanske%netscape.com
7087284a9a Fixed doubleclick to get color in colorpicker, b=151474, fix by neil@parkwaycc.co.uk, r=cmanske, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@123260 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 22:24:27 +00:00
gerv%gerv.net
3a58c581db Bug 151023 - duplicates.cgi sort by delta sorts in wrong direction. Patch by gerv; r=bbaetz, jouni.
git-svn-id: svn://10.0.0.236/trunk@123259 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 22:22:32 +00:00
wtc%netscape.com
66e159d87f Update the vercheck.c test for NSPR 4.2.1.
git-svn-id: svn://10.0.0.236/trunk@123258 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 22:15:59 +00:00
dbaron%fas.harvard.edu
f73c8cccfe XUL fastload shouldn't call ParseStyleAttribute when there is no style attribute. b=151262 r=waterson sr=brendan
git-svn-id: svn://10.0.0.236/trunk@123257 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 22:14:36 +00:00
wtc%netscape.com
8289062b7c Set NSPR version to 4.2.1 Beta.
git-svn-id: svn://10.0.0.236/trunk@123256 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 22:13:15 +00:00
dmose%netscape.com
6ef6e0913f NetBSD build-system fix (bug 135027); r=seawood@netscape.com
git-svn-id: svn://10.0.0.236/trunk@123253 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 22:02:08 +00:00
wtc%netscape.com
0a777bafa2 Bug 136458: removed the old -O workaround and use -m68020-60. The patch is
contributed by Richard Zidlicky <rz@linux-m68k.org>.  r=wtc.
Modified Files: configure.in configure Linux.mk


git-svn-id: svn://10.0.0.236/trunk@123252 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 22:00:29 +00:00
relyea%netscape.com
10f9a3f89c Update cert handle on token insertion/removal.
git-svn-id: svn://10.0.0.236/trunk@123246 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 21:43:30 +00:00
relyea%netscape.com
f48424e371 Add series to keep track of object handle value validity.
git-svn-id: svn://10.0.0.236/trunk@123245 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 21:42:41 +00:00
relyea%netscape.com
dbfdef4a37 Reset the cert cache and clobber cert handles on token insertion an removal
git-svn-id: svn://10.0.0.236/trunk@123244 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 21:40:43 +00:00
dougt%netscape.com
c5d80c4635 missed this file when I checked fixes in for bugs 149745 148918 149715 149730 149754 129959. embedding via xcom glue r=various, sr=shaver@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@123242 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 21:20:18 +00:00
darin%netscape.com
2fe9a1b7ba fixes solaris orange b=147333
patch=Roland.Mainz@informatik.med.uni-giessen.de
r/sr=alecf,darin


git-svn-id: svn://10.0.0.236/trunk@123241 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 21:14:24 +00:00
mkaply%us.ibm.com
d7b09cd884 #150012
r=dougt, sr=darin
Support ranges (x-y) in the list of banned.override ports


git-svn-id: svn://10.0.0.236/trunk@123240 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 20:51:03 +00:00
wtc%netscape.com
4b3c439243 Bug 144886: On platforms with gethostbyname2, add the infrastructure for
PR_GetIPNodeByName to implement PR_AI_ADDRCONFIG correctly.  Right now
only AIX implements the function to determine if the system has any IPv4
or IPv6 source address configured.  On other platforms PR_GetIPNodeByName
still behaves as if the system had both IPv4 and IPv6 source addresses
configured.


git-svn-id: svn://10.0.0.236/trunk@123238 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 20:47:39 +00:00
kin%netscape.com
3016bcf312 Partial fix for bug 141900 (Text entry fields in forms excruciatingly slow.)
mozilla/content/base/public/nsISelectionController.idl
  mozilla/content/base/src/nsSelection.cpp
  mozilla/editor/composer/src/nsEditorShell.cpp
  mozilla/editor/idl/nsIPlaintextEditor.idl
  mozilla/editor/libeditor/base/nsEditor.cpp
  mozilla/editor/libeditor/base/nsEditor.h
  mozilla/editor/libeditor/html/nsHTMLDataTransfer.cpp
  mozilla/editor/libeditor/html/nsHTMLEditor.cpp
  mozilla/editor/libeditor/text/nsEditorEventListeners.cpp
  mozilla/editor/libeditor/text/nsPlaintextDataTransfer.cpp
  mozilla/editor/libeditor/text/nsPlaintextEditor.cpp
  mozilla/editor/txtsvc/src/nsTextServicesDocument.cpp
  mozilla/editor/ui/dialogs/content/EdTableProps.js
  mozilla/embedding/components/find/src/nsWebBrowserFind.cpp
  mozilla/extensions/xmlterm/base/mozXMLTermSession.cpp
  mozilla/layout/base/public/nsIFrameSelection.h
  mozilla/layout/html/base/src/nsPresShell.cpp
  mozilla/layout/html/forms/src/nsGfxTextControlFrame2.cpp
  mozilla/mailnews/compose/src/nsMsgCompose.cpp
  mozilla/xpfe/browser/resources/content/viewPartialSource.js

    - Added aIsSynchronous arg to the ScrollSelectionIntoView()
      method of nsISelectionController and nsIFrameSelection.
      Updated all callers to pass new arg.

    - Modified selection to post a plevent to call which does the
      call to ScrollIntoView() in the async ScrollIntoView() case.

    - Edits in text widgets now use asynchronous reflow, paint,
      and scroll processing full time.

    - Removed redundant ScrollSelectionIntoView() calls in the
      editor event listeners.

    - Editor IME code now forced to flush reflows and paints before
      getting caret coordinates.

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


git-svn-id: svn://10.0.0.236/trunk@123237 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 20:43:32 +00:00
kin%netscape.com
fa152a3def Partial fix for bug 141900 (Text entry fields in forms excruciatingly slow.)
mozilla/content/base/public/nsISelectionController.idl
  mozilla/content/base/src/nsSelection.cpp
  mozilla/editor/composer/src/nsEditorShell.cpp
  mozilla/editor/idl/nsIPlaintextEditor.idl
  mozilla/editor/libeditor/base/nsEditor.cpp
  mozilla/editor/libeditor/base/nsEditor.h
  mozilla/editor/libeditor/html/nsHTMLDataTransfer.cpp
  mozilla/editor/libeditor/html/nsHTMLEditor.cpp
  mozilla/editor/libeditor/text/nsEditorEventListeners.cpp
  mozilla/editor/libeditor/text/nsPlaintextDataTransfer.cpp
  mozilla/editor/libeditor/text/nsPlaintextEditor.cpp
  mozilla/editor/txtsvc/src/nsTextServicesDocument.cpp
  mozilla/editor/ui/dialogs/content/EdTableProps.js
  mozilla/embedding/components/find/src/nsWebBrowserFind.cpp
  mozilla/extensions/xmlterm/base/mozXMLTermSession.cpp
  mozilla/layout/base/public/nsIFrameSelection.h
  mozilla/layout/html/base/src/nsPresShell.cpp
  mozilla/layout/html/forms/src/nsGfxTextControlFrame2.cpp
  mozilla/mailnews/compose/src/nsMsgCompose.cpp
  mozilla/xpfe/browser/resources/content/viewPartialSource.js

    - Added aIsSynchronous arg to the ScrollSelectionIntoView()
      method of nsISelectionController and nsIFrameSelection.
      Updated all callers to pass new arg.

    - Modified selection to post a plevent to call which does the
      call to ScrollIntoView() in the async ScrollIntoView() case.

    - Edits in text widgets now use asynchronous reflow, paint,
      and scroll processing full time.

    - Removed redundant ScrollSelectionIntoView() calls in the
      editor event listeners.

    - Editor IME code now forced to flush reflows and paints before
      getting caret coordinates.

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


git-svn-id: svn://10.0.0.236/trunk@123236 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 20:35:12 +00:00
alecf%netscape.com
d3afab8273 fix for bug 149102 - fix a harmless UMR in the string code
sr=jag, r=dbaron


git-svn-id: svn://10.0.0.236/trunk@123235 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 20:31:14 +00:00
kin%netscape.com
2ce51981fc Partial fix for bug 141900 (Text entry fields in forms excruciatingly slow.)
mozilla/layout/html/base/src/nsBlockFrame.cpp

    - Removed code in ReflowDirtyChild() which propagated
      the reflow command up to the block's parent if the
      block already had dirty children. There's no need
      for this optimization with waterson's reflow command
      tree changes.

  mozilla/xul/base/src/nsBox.cpp

    - Modified RelayoutDirtyChild() so that it posts
      a dirty reflow event if |this| is a reflow root.
      This prevents ReflowDirtyChild requests from
      propagating all the way out of the box hierarchy.

r=dbaron@fas.harvard.edu  sr=waterson@netscape.com


git-svn-id: svn://10.0.0.236/trunk@123234 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 20:30:14 +00:00
wtc%netscape.com
9817a97775 Bug 97475: the new 'af' field needs to be moved to the end of the
PRFilePrivate structure because the OJI code in Sun Java 2 1.3-1
distribution is reading the 'md.osfd' field of this private structure.


git-svn-id: svn://10.0.0.236/trunk@123233 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 20:30:13 +00:00
dougt%netscape.com
b4c6ecaa43 bug 150165 patch by t.bugz@lament.cjb.net r=bbaetz sr=shaver a=valeski fix typo - [noscrpit] was used instead of [noscript]
git-svn-id: svn://10.0.0.236/trunk@123231 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 20:13:17 +00:00
alecf%netscape.com
c181c1cb21 argh, just fixing a build warning that TestUConv.cpp is in the win32 gmake build twice - no affect on the build
git-svn-id: svn://10.0.0.236/trunk@123229 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 18:41:04 +00:00
alecf%netscape.com
7cc599691d fix for bug 149102 - fix consumers of outdated TypicalInput/Output stream
r=dougt, r=av (plugin stuff) sr=jag


git-svn-id: svn://10.0.0.236/trunk@123228 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 18:19:10 +00:00
wtc%netscape.com
99c3104086 Bug 97475: some platforms, such as OpenVMS, require us to pass the exact
socket address length to socket functions like accept.  Just fixed enough
of this problem for OJI to work with Mozilla on OpenVMS.
Modified Files: _openvms.h primpl.h ptio.c


git-svn-id: svn://10.0.0.236/trunk@123227 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 18:05:26 +00:00
bnesse%netscape.com
ca70f169dd Fix for bug 148444. Remove obsolete pref file references from embedding configs. r=adamlock, pinkerton. sr=cls.
git-svn-id: svn://10.0.0.236/trunk@123225 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 17:57:05 +00:00
ssu%netscape.com
ce6f9f4945 fixing bug 136417 - Mark newsgroup read from newsgroup folder context menu affects wrong folder. r=bhuvan, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@123224 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 17:56:25 +00:00
cltbld%netscape.com
bcdd06c6c7 updating installer to use http instead of ftp for downloading xpi files, does not affect build, bugscape 16662, kysmith checking in as cltbld
git-svn-id: svn://10.0.0.236/trunk@123223 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 16:12:23 +00:00
seawood%netscape.com
e0bcbe585e Use the unix native char conversion routines on BeOS.
Bug #151406 r=timeless


git-svn-id: svn://10.0.0.236/trunk@123222 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 14:53:30 +00:00
pinkerton%netscape.com
cc3c165b03 turn on CG metrics for quartz rendering if 10.1.5 is present. bug 149427, r=ccarlen/sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@123221 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 14:39:42 +00:00
mostafah%oeone.com
9ff9ac72b8 Fixed crash caused by temporarily disabled removeObserver function
git-svn-id: svn://10.0.0.236/trunk@123220 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 13:23:23 +00:00
seawood%netscape.com
97a5da83a0 Fix symlink detection (again) so that relative symlinks work and the binary is executed from the cwd, not the installation directory.
Thanks to Andrew Schultz <ajschult@eos.ncsu.edu> for the patch.
Bug #57866 r=cls


git-svn-id: svn://10.0.0.236/trunk@123219 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 12:16:52 +00:00
jpierre%netscape.com
454f59e06f Add missing AOL root CA certs
git-svn-id: svn://10.0.0.236/trunk@123215 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 10:14:50 +00:00
seawood%netscape.com
fa69852bc1 Make sure that all of the headers are installed during a 'make install'.
Thanks to Chris Blizzard <blizzard@mozilla.org> for the patch.
Bug #149483 r=cls


git-svn-id: svn://10.0.0.236/trunk@123214 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 09:07:40 +00:00
seawood%netscape.com
dc7263dc9e Fix real_install rules so that headers are still installed correctly if includedir is overridden on the commandline.
Bug #149483 r=blizzard


git-svn-id: svn://10.0.0.236/trunk@123212 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 09:01:48 +00:00
leaf%mozilla.org
75cefae6b4 Automated update
git-svn-id: svn://10.0.0.236/trunk@123211 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 08:55:45 +00:00
bryner%netscape.com
4f8c9ca73b Add an option to enable prebinding for mach-o builds (bug 151087). r=cls.
git-svn-id: svn://10.0.0.236/trunk@123209 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 08:52:55 +00:00
glazman%netscape.com
caec6c87e9 fixing crasher due to outbounds index in nsCSSStyleSheet.cpp; b=151198, r=brade, sr=jst
git-svn-id: svn://10.0.0.236/trunk@123208 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 08:29:51 +00:00
jaggernaut%netscape.com
a6ccc7e263 Gotta remember to check these binary files in with -kb. Just cvs admin -kb didn't help, apparently they were already corrupted. Checking in correct binaries.
git-svn-id: svn://10.0.0.236/trunk@123207 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 06:54:29 +00:00
sgehani%netscape.com
ed63a3af9d Fix ``Search engine name and search term string missing from search box
in autocomplete dropdown for first window in new profile''
b=144494; r=law; sr=hewitt


git-svn-id: svn://10.0.0.236/trunk@123204 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 01:11:01 +00:00
sgehani%netscape.com
82a129492a Accesskeys on print preview toolbar buttons.
b=133506; r=caillon; sr=blake


git-svn-id: svn://10.0.0.236/trunk@123203 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 01:08:48 +00:00
timeless%mac.com
2bb9b9faf5 Bug 147743 Xprint prints some (non-scaleable) bitmap fonts far too small
patch by Roland.Mainz@informatik.med.uni-giessen.de r=bstell@ix.netcom.com, sr=dveditz


git-svn-id: svn://10.0.0.236/trunk@123199 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 00:28:46 +00:00
mjudge%netscape.com
cc8e538c5c 113613 r=blythe sr=kin patch to fix end of line key moving caret outside of the style block. if we see a BR tag when searching for valid selection point keep backing up if possible.
git-svn-id: svn://10.0.0.236/trunk@123197 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-13 00:06:49 +00:00
darin%netscape.com
1ae7212ab9 fixes bug 147979 "Mac-SSL connections very slow"
r=sdagley sr=beard


git-svn-id: svn://10.0.0.236/trunk@123196 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 23:44:31 +00:00
bbaetz%student.usyd.edu.au
eccb8e91a1 Bug 150882 - SQL error when sorting by bugs.votes with explicit direction
r=gerv x2


git-svn-id: svn://10.0.0.236/trunk@123195 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 23:22:07 +00:00
jkeiser%netscape.com
c2a982333d Make X not crash with hugely silly font sizes (checking in for Roland.Mainz@informatik.med.uni-giessen.de). bug 150339, r=tor@acm.org, sr=blizzard@netscape.com/roc+moz@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@123194 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 23:06:11 +00:00
nicolson%netscape.com
152c5b3f06 add javadoc target.
git-svn-id: svn://10.0.0.236/trunk@123193 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 22:54:16 +00:00
mstoltz%netscape.com
8324b9ee2c Backing out fix for 135267 - this patch requires another change that hasn't gone in yet.
git-svn-id: svn://10.0.0.236/trunk@123192 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 22:49:14 +00:00
srilatha%netscape.com
fd77d8493b Fix for bugscape bug # 15236. The registry settings for simple MAPI needs to be set same as the installer
r=rdayal, sr=mscott


git-svn-id: svn://10.0.0.236/trunk@123191 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 22:07:24 +00:00
locka%iol.ie
92f24c181d Increase 20 character limit when creating filenames. b=134890 r=brade@netscape.com sr=kin@netscape.com
git-svn-id: svn://10.0.0.236/trunk@123190 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 21:47:43 +00:00
mstoltz%netscape.com
4a618befec Fixing 135267 - don't allow access to style rules loaded from a different
host. r=dveditz, sr=scc.


git-svn-id: svn://10.0.0.236/trunk@123189 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 21:20:17 +00:00
blakeross%telocity.com
d0aaf6b995 149812 - remove what's related domain blocking UI. r=bryner sr=ben
git-svn-id: svn://10.0.0.236/trunk@123187 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 20:38:42 +00:00
morse%netscape.com
78203efec8 bug 147223, URL bar doesn't function if launched too quickly in turbo mode, r=law, sr=darin
git-svn-id: svn://10.0.0.236/trunk@123186 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 20:29:46 +00:00
nicolson%netscape.com
e1e52a2b6c remove these files--there's no C code in this directory.
git-svn-id: svn://10.0.0.236/trunk@123185 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 20:18:10 +00:00
nicolson%netscape.com
bbce019e1f Grab NSS headers from directory "nss" instead of directory "security".
git-svn-id: svn://10.0.0.236/trunk@123184 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 20:11:22 +00:00
nicolson%netscape.com
2b8b549531 remove makefiles for this directory, since it's only Java files.
git-svn-id: svn://10.0.0.236/trunk@123183 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 20:08:39 +00:00
waterson%netscape.com
dafe48f551 Re-add, correct case.
git-svn-id: svn://10.0.0.236/trunk@123182 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 20:04:04 +00:00
waterson%netscape.com
2690e144de Removing; base case.
git-svn-id: svn://10.0.0.236/trunk@123181 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 20:03:46 +00:00
waterson%netscape.com
5d02703c6f Add extensions/pref/autoconfig/resources to makefile list.
git-svn-id: svn://10.0.0.236/trunk@123180 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 19:32:15 +00:00
igor%mir2.org
77a428cced Added get/setJavaPrimitiveWrap to WrapFactory to get/set if instances of String, Number should be wrapped or not.
git-svn-id: svn://10.0.0.236/trunk@123179 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 19:11:50 +00:00
bnesse%netscape.com
05e7ac85e3 Checkin for bug 121332. Fix implementation for getLDAPAttributes() so it correctly calls the user callback processLDAPValues(). r=dmose, sr=alecf.
git-svn-id: svn://10.0.0.236/trunk@123178 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 18:58:11 +00:00
bnesse%netscape.com
5fd2f31989 Fix for bug 141035. Application must quit if it fails to load the .cfg file. r=sgehani, ccarlen, sr=alecf.
git-svn-id: svn://10.0.0.236/trunk@123175 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 18:52:46 +00:00
shrutiv%netscape.com
0d116a24db Fix for bugscape bug 16679: Title bar for CD Autorun Screen contains
'6.2' string


git-svn-id: svn://10.0.0.236/trunk@123174 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 18:45:50 +00:00
depstein%netscape.com
8a411ee762 Url dialog now supports flag loading.
a=asa for QA checkins that are not part of the default builds


git-svn-id: svn://10.0.0.236/trunk@123173 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 18:44:48 +00:00
pinkerton%netscape.com
58c0e3f529 fix typo, bug 149283. r=tao/sr=alecf/a=valeski.
git-svn-id: svn://10.0.0.236/trunk@123171 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 18:19:42 +00:00
rods%netscape.com
0c480724b4 Needs to return back the appropriate flags for loading images, naming making them come fromthe cache
Bug 150072 r=dcone sr=kin


git-svn-id: svn://10.0.0.236/trunk@123170 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 18:04:48 +00:00
alecf%netscape.com
fc8e339e24 fix for bug 148831 - avoid crashing and do a best-effort case conversion/comparison when the nsICaseConversion service has already been shut down. r=dougt, sr=jag
git-svn-id: svn://10.0.0.236/trunk@123169 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 17:59:40 +00:00
ducarroz%netscape.com
317ad26b7e Fix for bug 137742. We need to prevent folding long header between the header name and the value. Patch submitted by taka@netscape.com. R=ducarroz, SR=bienvenu
git-svn-id: svn://10.0.0.236/trunk@123168 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 17:50:44 +00:00
nhotta%netscape.com
4838f6a790 Moved the flex value for the widget width out to .dtd file,
bug 150756, r=naving, sr=mscott.


git-svn-id: svn://10.0.0.236/trunk@123167 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 17:00:53 +00:00
nhotta%netscape.com
7a47a05a8a Uncheck the previously checked item before checking the new item
to workaround the Mac radio menu check mark problem,
bug 98625, r=pinkerton, sr=jst.


git-svn-id: svn://10.0.0.236/trunk@123166 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 16:58:12 +00:00
dbradley%netscape.com
768b5dd858 Bug 148732 - xpidl doesn't accept drive colon args. r=dbradley, sr=shaver
git-svn-id: svn://10.0.0.236/trunk@123165 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 16:56:19 +00:00
kaie%netscape.com
70448bead6 b=147770 Enhance S/Mime menu wordings
r=cotter sr=alecf


git-svn-id: svn://10.0.0.236/trunk@123164 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 16:54:45 +00:00
alecf%netscape.com
fe2ac2618f fix for bug 149121 - split up command line handler macros so we can write custom registration routines. r=bnesse, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@123163 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 16:47:23 +00:00
seawood%netscape.com
d52892536f Update toplevel ignore list
git-svn-id: svn://10.0.0.236/trunk@123162 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 16:44:41 +00:00
kaie%netscape.com
9a446139e8 b=126944 Handle NSS error codes within PSM.
r=ssaux sr=darin


git-svn-id: svn://10.0.0.236/trunk@123161 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 16:44:22 +00:00
peterlubczynski%netscape.com
014bbea9c5 Fixing bug 122119, cannot use consecutive white space characters in PARAM tags, r=harishd, sr=jst
git-svn-id: svn://10.0.0.236/trunk@123160 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 16:41:25 +00:00
pinkerton%netscape.com
d4386e47d8 bah, just remove the 'add separator' button since it looks lame disabled.
git-svn-id: svn://10.0.0.236/trunk@123159 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 14:43:27 +00:00
timeless%mac.com
53435db67b Bug 146207 javascript strict warning in bookmarks.xml
patch by neil@parkwaycc.co.uk r=timeless sr=jag


git-svn-id: svn://10.0.0.236/trunk@123158 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 14:38:29 +00:00
kaie%netscape.com
9a0c08391d b=149868 http must never use starttls type sockets, even when going over a proxy. http allows all flavors of SSL2/SSL3/TLS (while startls type sockets disallow some flavors).
r=bbaetz sr=darin


git-svn-id: svn://10.0.0.236/trunk@123157 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 14:36:08 +00:00
timeless%mac.com
a4f31a4ba2 Bug 143791 menuseparator in Go menu should stay hidden for tabbed mode
patch by neil@parkwaycc.co.uk r=timeless sr=jag


git-svn-id: svn://10.0.0.236/trunk@123156 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 14:31:40 +00:00
brade%netscape.com
dd6325c370 fix for handling control-backspace on Windows (submitted by bernie5412@hotmail.com (Bernie McGuire)); bug 105122; r=yokoyama, brade, sr=roc+moz
git-svn-id: svn://10.0.0.236/trunk@123155 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 14:25:02 +00:00
jfrancis%netscape.com
d889597d8d bug 83378: plaintext mail reply problems editing quotes. r=fm, sr=kin
git-svn-id: svn://10.0.0.236/trunk@123154 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 14:14:18 +00:00
jfrancis%netscape.com
97060bb3df bug 83378: plaintext mail reply editong problem in quotes
git-svn-id: svn://10.0.0.236/trunk@123153 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 14:12:32 +00:00
jfrancis%netscape.com
a65dcc4d82 bug 139466: paste can create nested headers. r=harish; sr=jst
git-svn-id: svn://10.0.0.236/trunk@123152 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 14:07:05 +00:00
jfrancis%netscape.com
ec1f2825a3 bug 146164: removing style can remove too much. r=glazman, sr=kin
git-svn-id: svn://10.0.0.236/trunk@123151 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 14:04:47 +00:00
pinkerton%netscape.com
dbdffe42cb Hook up "edit" bookmarks panel button to info window and gray out
"new separator" button until we hook it up.


git-svn-id: svn://10.0.0.236/trunk@123150 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 14:03:41 +00:00
pinkerton%netscape.com
9914bb59c9 Implement copy link location from brade (bug 150827)
git-svn-id: svn://10.0.0.236/trunk@123149 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 13:47:48 +00:00
timeless%mac.com
034f35f406 Bug 128098 Index should be expanded by default
patch by neil@parkwaycc.co.uk r=oeschger sr=alecf


git-svn-id: svn://10.0.0.236/trunk@123148 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 13:43:50 +00:00
jaggernaut%netscape.com
843d8cc562 Bug 112769: Add "New Tab" button to tab bar. r=sgehani, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@123147 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 11:49:54 +00:00
brendan%mozilla.org
97b9374b49 Back out last change pending debug build (see crash bug 151066).
git-svn-id: svn://10.0.0.236/trunk@123146 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 08:31:43 +00:00
brendan%mozilla.org
125cb784d6 Report uncaught errors-as-exceptions from outermost JS_Compile*Function* API calls, just as for JS_Compile*Script* (150584, r=rginda, sr=jst).
git-svn-id: svn://10.0.0.236/trunk@123145 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 08:04:28 +00:00
jkeiser%netscape.com
decd49ffba Make input type=file disabled work properly and look right. bug 92858, r=rods@netscape.com, sr=roc+moz
git-svn-id: svn://10.0.0.236/trunk@123144 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 07:58:26 +00:00
jkeiser%netscape.com
b39021ec8c Make pressing enter submit by clicking the first button in form even if there is only one textfield in form. bug 147850, r=bzbarsky@mit.edu, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@123143 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 07:50:45 +00:00
jkeiser%netscape.com
43ad149022 Comment form submission more thoroughly. bug 148466, r=alexsavulov@netscape.com, rs=jband@netscape.com
git-svn-id: svn://10.0.0.236/trunk@123142 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 07:39:08 +00:00
jkeiser%netscape.com
2e33319f15 Make select.selectedIndex = 3; clear all selections in multiple select. bug 77039, r=rods@netscape.com, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@123141 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 07:36:57 +00:00
jkeiser%netscape.com
53396e1fbd Make input type=hidden save/restore value. bug 149962, r=rods, sr=jst
git-svn-id: svn://10.0.0.236/trunk@123140 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 06:35:11 +00:00
igor%mir2.org
0544f7b57c Removal of unused code for explicit JSObject support:
> Norris Boyd wrote:
>
> Igor Bukaniv wrote:
> >
> > I am curios, why there is a need to have a special JSObject support in Rhino? Was it used for anything? The implementation in the ICEbrowser does not use it as in rare cases where conversion from JSObject to/from JS type may be needed (like calling JSObject.getWindow from a script), it seems that WrapHandler (or similar modifications to pre Rhino 1.5R2 sources) and Wrapper are enough to cover all the cases.
> Yes, we should probably just remove the JSObject code. We added it early on when Rhino was first written and we thought we might need JSObject compatibility with the JS + Java implementation in Navigator 4.x. That's not important now, so we should just remove this code (which likely doesn't work at this point anyway).


git-svn-id: svn://10.0.0.236/trunk@123139 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 05:32:35 +00:00
kyle.yuan%sun.com
05ea7d8cad Bug 148902 Implemetation of nsIAccessibleEditableText
r=aaronl, sr=jst


git-svn-id: svn://10.0.0.236/trunk@123138 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 05:27:37 +00:00
kyle.yuan%sun.com
7c08110482 Bug 146400 To merge nsIAccessibleSelectable and nsIAccessibleSelection
r=aaronl, sr=jst


git-svn-id: svn://10.0.0.236/trunk@123137 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 05:16:30 +00:00
dmose%netscape.com
e1d98d30e0 authenticated LDAP autocompletion incorrectly autopicks current addr after password entered (bug 146569) r=blake@netscape.com, sr=hewitt@netscape.com
git-svn-id: svn://10.0.0.236/trunk@123136 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 05:14:32 +00:00
mkaply%us.ibm.com
15156fea65 OS/2 bustage
git-svn-id: svn://10.0.0.236/trunk@123134 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 05:04:12 +00:00
bryner%netscape.com
f6cf7c683b Fix the situation where clicking a link that has a mousedown handler which opens a window would erroneously send a blur to the newly-opened window (bug 131651). r=saari, sr=hewitt.
git-svn-id: svn://10.0.0.236/trunk@123133 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 05:00:35 +00:00
kyle.yuan%sun.com
a1dd71ed8e Bug 148010 JS exceptions in mailnews autocomplete widget on trunk
r=varga, sr=hewitt
Prevent JS exception and disable key-navigation feature in autocomplete


git-svn-id: svn://10.0.0.236/trunk@123132 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 04:32:04 +00:00
shanjian%netscape.com
447b7a35cc #102407 Unexpected instances of POSTDATA warning messages [form sub]
Swap the priority of weakdoc charset and default charset.
disable auto detection for POST document.
r=ftang, sr=darin


git-svn-id: svn://10.0.0.236/trunk@123131 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 04:18:31 +00:00
suresh%netscape.com
17e7119c51 fix for 149189. update goPreference calls with correct parameters. r-ducarroz, sr-alecf.
git-svn-id: svn://10.0.0.236/trunk@123130 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 04:09:52 +00:00
dbaron%fas.harvard.edu
b362818ab8 Fix crash exiting print preview in certain cases (pages with frames; embedding apps) by ensuring view manager outlives pres shell. b=148308 r=rods sr=waterson
git-svn-id: svn://10.0.0.236/trunk@123129 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 03:32:24 +00:00
dbaron%fas.harvard.edu
df58df2f0b Fix crash when looking at style rules of element matching no rules. b=141022 r=hewitt sr=waterson
git-svn-id: svn://10.0.0.236/trunk@123128 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 03:30:32 +00:00
dbaron%fas.harvard.edu
cfc603f54a Fix crashes related to editing of HR elements by wrapping generated content for leaf frames in an extra frame so :before and :after are always the first/last children of the primary frame. Disable generated content for floating and absolutely positioned leaf frames. b=141054 sr=waterson r=kin
git-svn-id: svn://10.0.0.236/trunk@123127 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 03:27:48 +00:00
roc+%cs.cmu.edu
f300916895 Bug 124685. Change damage propagation algorithm to traverse the widget tree instead of the view tree; speeds up certain testcases. r=kmcclusk,rs=waterson
git-svn-id: svn://10.0.0.236/trunk@123126 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 03:22:35 +00:00
dbaron%fas.harvard.edu
f06e55f876 Fix performance problem on home.netscape.com: Don't do full reflow of all absolutely positioned elements whose containing block is on the path to the target of an incremental reflow. b=146831 sr=waterson r=kin
git-svn-id: svn://10.0.0.236/trunk@123125 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 03:21:00 +00:00
roc+%cs.cmu.edu
eb9ced023d Bug 148350. Fix the gcc optimizer workaround. r=kmcclusk,sr=waterson
git-svn-id: svn://10.0.0.236/trunk@123124 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 03:18:10 +00:00
despotdaemon%netscape.com
c2cc19d860 Pseudo-automatic update of changes made by Henry.Jia@sun.com.
git-svn-id: svn://10.0.0.236/trunk@123123 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 01:28:16 +00:00
dougt%netscape.com
3a92abc171 Fixes build bustage for cbiesinger
git-svn-id: svn://10.0.0.236/trunk@123121 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 00:29:17 +00:00
andreww%netscape.com
bd218e60bc bugzilla 150696 - Dom Inspector needs "window" menu - r=timeless, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@123120 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 00:25:28 +00:00
waldemar%netscape.com
666b68b3c9 Added lots of new code for frames and function definitions
git-svn-id: svn://10.0.0.236/trunk@123119 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 00:24:29 +00:00
waldemar%netscape.com
12bcdf7ee7 Added optional test to unique-elt-of
git-svn-id: svn://10.0.0.236/trunk@123118 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 00:23:45 +00:00
wtc%netscape.com
6d69027606 Bug 150143: use map file to limit exported symbols on Mac OS X. The patch
is contributed by Brian Ryner <bryner@netscape.com>.
Modified files: Darwin.mk rules.mk


git-svn-id: svn://10.0.0.236/trunk@123115 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-12 00:21:19 +00:00
robinf%netscape.com
9abf84847a routine help uer bug 122806, r=oeschger
git-svn-id: svn://10.0.0.236/trunk@123113 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 23:50:29 +00:00
stephend%netscape.com
a96a7ab047 Bug 150653. Fixing a comment for nsHTMLEntities::UnicodeToEntity(). Patch by alge@samsen.com. r=choess, sr=vidur
git-svn-id: svn://10.0.0.236/trunk@123111 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 23:37:34 +00:00
smontagu%netscape.com
1a78e93074 Bug 150519 ("Search results from http://www.google.co.il/ print in horrible quality"), Author=Roland.Mainz@informatik.med.uni-giessen.de, r=shanjian, sr=jst
git-svn-id: svn://10.0.0.236/trunk@123110 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 23:33:35 +00:00
relyea%netscape.com
8599f9d962 When checking NeedInit status, go back and check the token in case the token
has been initialized offline.


git-svn-id: svn://10.0.0.236/trunk@123109 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 23:33:25 +00:00
harishd%netscape.com
2f67ab9c46 Strip leading/trailing spaces from img src attribute value that was preventing image rendering. b=87894, r=jkaiser, sr=jst
git-svn-id: svn://10.0.0.236/trunk@123108 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 23:23:12 +00:00
jpierre%netscape.com
f707f2b47f Update for root certs - bug 139874
git-svn-id: svn://10.0.0.236/trunk@123107 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 23:16:25 +00:00
ssu%netscape.com
60bd4d527e fixing bug 149515 - Mail header optimizations disabled critical mail header feature. r=bhuvan, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@123106 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 23:14:06 +00:00
harishd%netscape.com
a8c3e46cbb Fixed data loss of malformed table content. b=138577, r=heikki, sr=jst
git-svn-id: svn://10.0.0.236/trunk@123105 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 23:13:48 +00:00
ssu%netscape.com
57d7ae7c5d fixing bug 114952 - Labels: not available in standalone msg window, Message & context menu items disabled. r=varada, sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@123104 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 23:10:04 +00:00
mitchf%netscape.com
188285b281 don't respond to every WM_COMMAND message for DropBox or ComboBox widgets
fixes bug 11873


git-svn-id: svn://10.0.0.236/trunk@123103 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 23:09:54 +00:00
smontagu%netscape.com
d57f95f1d1 Bug 146622 'PrefEnumCallback does not work as expected', Author=Roland.Mainz@informatik.med.uni-giessen.de,r=bstell+katakai,sr=jag+scc
git-svn-id: svn://10.0.0.236/trunk@123102 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 23:08:25 +00:00
ssu%netscape.com
ebf144fb29 fixing bug 150678 - native installer progress bar looks choppy. r=curt, sr=dveditz. affects windows platforms only
git-svn-id: svn://10.0.0.236/trunk@123101 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 23:03:52 +00:00
yokoyama%netscape.com
c873d40552 Bug 149397 Can't enter "?" and "!" using MSPY on WinXP-SC
This is to process special IME input.
/r=shanjian;/sr=brendan


git-svn-id: svn://10.0.0.236/trunk@123100 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 22:59:54 +00:00
dougt%netscape.com
70a555f5ae mac project file fix
git-svn-id: svn://10.0.0.236/trunk@123098 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 22:44:12 +00:00
kirk.erickson%sun.com
ed9469d29f Fixed indentation caught by Wan-Teh (66606).
git-svn-id: svn://10.0.0.236/trunk@123097 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 22:41:45 +00:00
cbiesinger%web.de
dcde01e817 bug 150142 r=pavlov sr=tor
imgLoader::GetMimeTypeFromContent doesn't check for malloc failure


git-svn-id: svn://10.0.0.236/trunk@123096 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 22:40:29 +00:00
dougt%netscape.com
e1d433d7c1 fixes hp bustage. r=jdunn
git-svn-id: svn://10.0.0.236/trunk@123095 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 22:35:10 +00:00
smontagu%netscape.com
8cd326a2d9 Bug 148470: Xprint-specific X font banning code is broken. Author=Roland.Mainz@informatik.med.uni-giessen.de, r=timeless, sr=scc
git-svn-id: svn://10.0.0.236/trunk@123094 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 22:34:25 +00:00
cbiesinger%web.de
49fadf233c forgot to check this change in before. bug 8031, r=tor, sr=dveditz, a=valeski, XBM support
git-svn-id: svn://10.0.0.236/trunk@123093 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 22:33:13 +00:00
darin%netscape.com
79a24a38c3 fixes bug 149073 "nsStorageTransport::GetNthSegment is slow"
r=dbaron sr=rpotts


git-svn-id: svn://10.0.0.236/trunk@123092 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 22:32:35 +00:00
pavlov%netscape.com
3f9af8db03 fixing bug 148551. patch from paper@animecity.nu. r=pavlov sr=tor
git-svn-id: svn://10.0.0.236/trunk@123091 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 22:30:36 +00:00
pavlov%netscape.com
59ca1eaf18 fixing bug 85595. patch from paper@animecity.nu. r=pavlov sr=tor
git-svn-id: svn://10.0.0.236/trunk@123090 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 22:29:31 +00:00
mcafee%netscape.com
f2e7fa038e Adding export-idl rule for REQUIRES-based embed build (150088). r=blythe, sr=alecf, a=asa
git-svn-id: svn://10.0.0.236/trunk@123089 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 22:26:27 +00:00
yokoyama%netscape.com
6e1d4791e4 Bug 149171 and 146844
IME input processing in Widget
Impact only on Windows platform.
/r=shanjian, /sr=brendan


git-svn-id: svn://10.0.0.236/trunk@123087 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 22:20:39 +00:00
beard%netscape.com
437ca845cf Convert Cocoa key events to Mac Event records. This gets typing in plugins working. NPOB from the CHIMERA branch.
git-svn-id: svn://10.0.0.236/trunk@123086 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 22:13:03 +00:00
smontagu%netscape.com
1fff05a1b3 Bug 148470: Ban "-dt-*" (bitmap!!) fonts from Xprint. Author=Roland.Mainz@informatik.med.uni-giessen.de, r=shanjian, sr=jst
git-svn-id: svn://10.0.0.236/trunk@123085 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 22:11:14 +00:00
mscott%netscape.com
4b610493ea new mail biff icon for windows system tray from the UI group.
git-svn-id: svn://10.0.0.236/trunk@123084 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 22:09:15 +00:00
mkaply%us.ibm.com
25824ec712 r=mkaply, sr=blizzard, OS/2 only - fixes a couple names/comments
git-svn-id: svn://10.0.0.236/trunk@123082 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 22:03:09 +00:00
smontagu%netscape.com
1a3973781e Bug 148690: For Xprint force use of outline scaleable fonts if possible. Author Roland.Mainz@informatik.med.uni-giessen.de, r=shanjian, sr=jst
git-svn-id: svn://10.0.0.236/trunk@123078 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 21:43:08 +00:00
brendan%mozilla.org
d6cd3ded85 For the file input case, roll our own fgets replacement to handle NULs in files (148800, r=rogerl, sr=shaver).
git-svn-id: svn://10.0.0.236/trunk@123077 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 21:32:54 +00:00
radha%netscape.com
da252450dc Fix for bug # 144301. shift-reload on a frameset page causes misbehavior of back and forward on future subframe navigations on the same page. a=adamlock sr=rpotts.
git-svn-id: svn://10.0.0.236/trunk@123076 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 21:12:27 +00:00
stephend%netscape.com
1039fd8f26 Bug 148555. Replace class='big-left-margin' with class='indent'. Patch by Stephen Walker <walk84@yahoo.com> r=cmanske, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@123075 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 21:03:29 +00:00
naving%netscape.com
976567d167 bugscape 15175 r=cavin sr=bienvenu. Make netscape webmail folder "Draft" localizable.
git-svn-id: svn://10.0.0.236/trunk@123074 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 21:03:28 +00:00
smontagu%netscape.com
cc4e2832ab Do Arabic shaping earlier before measuring the text so that it gets laid out correctly. Bugs 117041, 138097. r=ftang, sr=waterson
git-svn-id: svn://10.0.0.236/trunk@123073 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 21:00:20 +00:00
dougt%netscape.com
c55073e22f fixing makefile.win bustage.
git-svn-id: svn://10.0.0.236/trunk@123071 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 20:54:30 +00:00
mikep%oeone.com
19a8442b18 Removing debug messages, turning them to dumps.
git-svn-id: svn://10.0.0.236/trunk@123070 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 20:51:35 +00:00
cbiesinger%web.de
a6c0e029bf bug 86693 r=caillon sr=hewitt
js strict warning in colorpicker.xml


git-svn-id: svn://10.0.0.236/trunk@123069 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 20:51:21 +00:00
cbiesinger%web.de
6f7dc93da9 bug 115473 r=pavlov sr=brendan
Remove timer priorities


git-svn-id: svn://10.0.0.236/trunk@123068 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 20:47:04 +00:00
brendan%mozilla.org
e9e6f18d96 Drop non-ECMA f.a-for-arg/var-a-in-active-f support (137000, r=khanson, sr=shaver).
git-svn-id: svn://10.0.0.236/trunk@123067 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 20:43:50 +00:00
akkana%netscape.com
ac744a4bf8 132352: Use the parser service for blockness detection. r=brade sr=kin
git-svn-id: svn://10.0.0.236/trunk@123066 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 20:43:49 +00:00
stephend%netscape.com
f3b7bec0d2 Bug 147438. Security panel needs some cleanup. Patch by Stephen Walker <walk84@yahoo.com> r=kaie, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@123065 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 20:42:53 +00:00
chak%netscape.com
017113fab2 Fix for #130877 - Chnages to create app specific component registries
r=dougt, sr=shaver, a=drivers


git-svn-id: svn://10.0.0.236/trunk@123064 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 20:38:01 +00:00
chak%netscape.com
04078c93d0 Fix for #129582 - Chnages to demostrate MRE usage
r=adamlock, sr=rpotts, a=drivers


git-svn-id: svn://10.0.0.236/trunk@123061 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 20:35:27 +00:00
bryner%netscape.com
547705eee2 Don't have any rules prior to including rules.mk, or just typing "make" in this directory won't work correctly. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@123060 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 20:35:22 +00:00
chak%netscape.com
ded609d173 Fix for #131175 - Chnages to register MRE components
r=dougt, sr=rpotts, a=drivers


git-svn-id: svn://10.0.0.236/trunk@123059 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 20:33:04 +00:00
nhotta%netscape.com
002351597a Map charset name to charset atom, this fixes the charset name canonicalization problem (e.g "utf-8" vs "UTF-8"),
bug 138638, r=rjc, sr=alecf.


git-svn-id: svn://10.0.0.236/trunk@123058 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 20:19:21 +00:00
nhotta%netscape.com
7d9c360c89 Added error handling for the Unicode conversion for message quote,
bug 132613, r=ducarroz, sr=bienvenu.


git-svn-id: svn://10.0.0.236/trunk@123057 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 20:18:20 +00:00
seawood%netscape.com
3c6c31fe23 Do not add these libraries to the generated static libs list as they have their own vars that are also used in the static build.
Bug #149211 r=bryner


git-svn-id: svn://10.0.0.236/trunk@123056 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 20:18:03 +00:00
nhotta%netscape.com
41942cd0e8 Changed the localization note to mention that "MsgMdnWishToSend" is localizable,
bug 149162, r=yxia, sr=bienvenu.


git-svn-id: svn://10.0.0.236/trunk@123055 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 20:17:27 +00:00
locka%iol.ie
4b321b16b0 NOT PART OF BUILD. First impl of helper app dialog for activex control.
git-svn-id: svn://10.0.0.236/trunk@123054 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 20:15:08 +00:00
law%netscape.com
ea952eb2de Bug 89907; add new UI to Nav pref panel to simply making Mozilla the default browser; r=sgehanni, sr=ben
git-svn-id: svn://10.0.0.236/trunk@123052 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 20:06:05 +00:00
wtc%netscape.com
99a907f780 Bug 134099: Worked around two BeOS bugs. 1. connect does not implicitly
bind the socket. 2. accept does not return the peer's address.
Modified files: _beos.h prsocket.c bnet.c


git-svn-id: svn://10.0.0.236/trunk@123051 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 20:05:32 +00:00
dougt%netscape.com
55cec71794 adding #include for stdio for printf
git-svn-id: svn://10.0.0.236/trunk@123050 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 19:50:28 +00:00
dougt%netscape.com
3c7968ad39 nsIInterfaceRequestor.cpp has been moved to mozilla/xpcom/glue/. see 149715. r=rpotts@netscape.com, sr=shaver.
git-svn-id: svn://10.0.0.236/trunk@123049 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 19:41:44 +00:00
dougt%netscape.com
d6dd9bea7f Fix for 149754. cleaner xpcom shutdown. r=rpotts, sr=shaver
git-svn-id: svn://10.0.0.236/trunk@123046 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 19:38:41 +00:00
dougt%netscape.com
fa93a8146a adding nsIIneterfaceRequestorUtils.cpp to glue. 149715. r=rpotts@netscape.com, sr=shaver
git-svn-id: svn://10.0.0.236/trunk@123045 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 19:36:42 +00:00
pinkerton%netscape.com
c36127dae2 Remove status bar entirely from popups that don't want it
git-svn-id: svn://10.0.0.236/trunk@123044 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 19:36:33 +00:00
leaf%mozilla.org
89c9a8fa37 Automated update
git-svn-id: svn://10.0.0.236/trunk@123043 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 19:26:16 +00:00
dougt%netscape.com
fe86486377 Fixes bugs 149745 148918 149715 149730 149754 129959. Cleanup of nsIFile and nsILocalFile interfaces, supporting do_GetInterface in embedding via xcom glue, and general cleanup of shutdown. r=various, sr=shaver@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@123042 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 19:26:04 +00:00
shrutiv%netscape.com
ad187f7e21 Fix for bugscape bug 14706: Additional Components not being picked up
in certain cases (r=mitchf)


git-svn-id: svn://10.0.0.236/trunk@123041 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 19:25:32 +00:00
shrutiv%netscape.com
23c9a321eb Fix for bugscape bug 16026: View install.bmp button not working (r=mitchf)
git-svn-id: svn://10.0.0.236/trunk@123040 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 19:03:17 +00:00
pinkerton%netscape.com
d68edc3610 Fix New Tab/SaveAs being enabled with no current window by creating a new
File menu and writing parts of validateMenuItem. bug 146320.


git-svn-id: svn://10.0.0.236/trunk@123039 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 18:44:30 +00:00
despotdaemon%netscape.com
5ff1ca3601 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@123037 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 18:11:28 +00:00
shrutiv%netscape.com
7824e01dae Fix for bug 16679: NCADM 7.0PR1: Title bar for CD Autorun Screen contains
'6.2' string


git-svn-id: svn://10.0.0.236/trunk@123036 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 18:07:35 +00:00
karnaze%netscape.com
7decc18c6e fix block regression test bustage, not affecting the build.
git-svn-id: svn://10.0.0.236/trunk@123035 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 16:50:42 +00:00
kirk.erickson%sun.com
74f18bf830 Resolves 66606. Added -O (enable OCSP checking).
git-svn-id: svn://10.0.0.236/trunk@123034 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 16:29:28 +00:00
pinkerton%netscape.com
3ae45f670b Fix refcount crash with find again. (bug 150532)
git-svn-id: svn://10.0.0.236/trunk@123031 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 15:00:15 +00:00
bbaetz%student.usyd.edu.au
66e8e60df6 Bug 150802 - default version for bug entry not read from cookies
r=jouni x2


git-svn-id: svn://10.0.0.236/trunk@123028 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 13:33:45 +00:00
bbaetz%student.usyd.edu.au
11df709295 Bug 150826 - missing space between list of attachments
r=mattyt x2


git-svn-id: svn://10.0.0.236/trunk@123027 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 09:27:27 +00:00
despotdaemon%netscape.com
6b4af86e93 Pseudo-automatic update of changes made by jruderman@hmc.edu.
git-svn-id: svn://10.0.0.236/trunk@123026 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 06:54:26 +00:00
bbaetz%student.usyd.edu.au
56f95190bc Bug 150798 - Extra whitespace included in saved query links
r=mattyt x2


git-svn-id: svn://10.0.0.236/trunk@123023 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 06:14:49 +00:00
myk%mozilla.org
a314830789 Backing out change I accidentally made while checking in fix for bug 137855.
git-svn-id: svn://10.0.0.236/trunk@123020 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-11 02:25:29 +00:00
myk%mozilla.org
23bc5f9630 Fix for bug 150703: Adds format support to query.cgi.
2rx=gerv


git-svn-id: svn://10.0.0.236/trunk@123015 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 22:38:48 +00:00
bryner%netscape.com
9b4781ce18 Fix handling of URL's from other applications, by enabling applescript for the static build target (bug 150122). r=sdagley.
git-svn-id: svn://10.0.0.236/trunk@123013 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 22:15:10 +00:00
ddrinan%netscape.com
c090144e53 Bug 150708. Incorrect keysize when finding bulk alg. r=wtc.
git-svn-id: svn://10.0.0.236/trunk@123011 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 22:00:32 +00:00
despotdaemon%netscape.com
c9cc369f1b Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@123009 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 21:33:58 +00:00
relyea%netscape.com
b9fd1de57a Return public and private keys in the order specified by the PKCS #11 spec.
git-svn-id: svn://10.0.0.236/trunk@123004 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 20:33:31 +00:00
cavin%netscape.com
52ad6d126f Fix for 141299. In nsMsgNewsFolder::SetReadSetFromStr(), after 'mReadSet' is recreated store the new pointer in the db as well. r=naving, sr=bienvenu, a=asa.
git-svn-id: svn://10.0.0.236/trunk@123001 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 19:58:10 +00:00
darin%netscape.com
893ea3031d fix more bustage
git-svn-id: svn://10.0.0.236/trunk@123000 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 19:47:22 +00:00
darin%netscape.com
de61026d65 fix win32 gmake build bustage
git-svn-id: svn://10.0.0.236/trunk@122999 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 19:46:19 +00:00
darin%netscape.com
b4a073fd41 fix some bustage
git-svn-id: svn://10.0.0.236/trunk@122998 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 19:44:07 +00:00
leaf%mozilla.org
16b7a6d7d0 Automated update
git-svn-id: svn://10.0.0.236/trunk@122996 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 18:55:49 +00:00
darin%netscape.com
dcfb0a0f1f fixes bug 147333 "Cannot load local files whose names contain
Japanese/Chinese characters" r=bstell sr=brendan a=asa


git-svn-id: svn://10.0.0.236/trunk@122994 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 18:50:11 +00:00
mikep%oeone.com
fc1f520157 Some small bug fixes from OEone calendar fixes.
git-svn-id: svn://10.0.0.236/trunk@122993 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 18:27:28 +00:00
shrutiv%netscape.com
2283486834 Fix for bug 141625: Need to better handle/check/clean output directory for
existing config files (r=mitchf)


git-svn-id: svn://10.0.0.236/trunk@122992 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 18:14:59 +00:00
shrutiv%netscape.com
bcef031062 Fix for bug 141625: Need to better handle/check/clean output directory for
existing config files (r=smeredith)


git-svn-id: svn://10.0.0.236/trunk@122991 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 18:10:10 +00:00
shrutiv%netscape.com
577f3246b1 Fix for bug 141625: Need to better handle/check/clean output directory for
existing config files (r=mitchf)


git-svn-id: svn://10.0.0.236/trunk@122990 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 18:01:06 +00:00
nboyd%atg.com
f9d9ec1879 Add to log of changes.
git-svn-id: svn://10.0.0.236/trunk@122989 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 17:44:44 +00:00
nboyd%atg.com
a1f8df61c4 Add new API class WrapFactory.
git-svn-id: svn://10.0.0.236/trunk@122987 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 14:28:37 +00:00
nboyd%atg.com
b16f815afb Update javadoc.
git-svn-id: svn://10.0.0.236/trunk@122986 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 14:27:43 +00:00
nboyd%atg.com
104176e6c6 Add PrimitiveWrapHandler example.
git-svn-id: svn://10.0.0.236/trunk@122985 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 14:23:32 +00:00
nboyd%atg.com
4f7b214f80 Add example of the use of a WrapFactory.
git-svn-id: svn://10.0.0.236/trunk@122984 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 14:19:09 +00:00
nboyd%atg.com
07e6387f6b Fix javadoc.
git-svn-id: svn://10.0.0.236/trunk@122983 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 14:09:26 +00:00
mikep%oeone.com
b0e4a10754 Fixing bug 149041, problem with old files still in jar file.
git-svn-id: svn://10.0.0.236/trunk@122982 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 13:19:25 +00:00
cotter%netscape.com
e2d02ab5b8 ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; latest security-related updates.
git-svn-id: svn://10.0.0.236/trunk@122976 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 04:41:17 +00:00
oeschger%netscape.com
a24ac0aed0 adding some images to help content, dispensation per bug 122806
git-svn-id: svn://10.0.0.236/trunk@122971 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 02:15:47 +00:00
despotdaemon%netscape.com
63dbabfc1a Pseudo-automatic update of changes made by hyatt@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@122970 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 02:06:30 +00:00
bryner%netscape.com
4c3e7a460f One more static build fix.
git-svn-id: svn://10.0.0.236/trunk@122969 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 01:24:14 +00:00
arougthopher%lizardland.net
e437cd60af Bug#125132
foreign characters not displayed properly in align=justify

this patch is a better algorythm for aligning/drawnig the text.  one word at a time, instead of one character.

r=arougthopher


git-svn-id: svn://10.0.0.236/trunk@122968 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-10 00:47:07 +00:00
law%netscape.com
500495a9f4 Bug 89907; new 'set default browser' UI for Nav pref panel; localization change only going in now; r=sgehani, sr=ben, a=asa
git-svn-id: svn://10.0.0.236/trunk@122965 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-09 22:43:29 +00:00
bryner%netscape.com
1adde8f96c Static build fixes.
git-svn-id: svn://10.0.0.236/trunk@122964 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-09 21:25:52 +00:00
igor%mir2.org
cc37fd3667 Deprecating NativeJavaObject.wrap and using Context.getWrapFactory().wrap() instead.
git-svn-id: svn://10.0.0.236/trunk@122962 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-09 15:58:15 +00:00
igor%mir2.org
95848e2010 More comments
git-svn-id: svn://10.0.0.236/trunk@122961 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-09 15:57:03 +00:00
igor%mir2.org
b996771d69 Documentation: points to watch when upgrading to WrapFactory
git-svn-id: svn://10.0.0.236/trunk@122960 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-09 15:56:12 +00:00
igor%mir2.org
aa742e4e57 Fixing broken logic in emulating custom WrapFactory via deprecated WrapHandler:
the code should not call setWrapFactory with null argument, but use new WrapFactory to restore default behaviour


git-svn-id: svn://10.0.0.236/trunk@122959 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-09 15:54:30 +00:00
ben%netscape.com
bb3938d55b Fix for topcrashers bug 143118 and bug 146891 - prevent continued deserialization after a a deserialization failure of the XUL PD by aborting on failure, also, ensure that that propagates up so we can catch it. Fix an oops (trying to remove the fasl file before closing the stream to it) and hack around a nsLocalFileWin bug (bug 150156) in the process. r=waterson, sr=brendan, a=asa
git-svn-id: svn://10.0.0.236/trunk@122957 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-09 10:31:00 +00:00
igor%mir2.org
111ad534c3 Introducing the WrapFactory class that should be used in place of the deprecated WrapHandler interface.
git-svn-id: svn://10.0.0.236/trunk@122956 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-09 09:23:00 +00:00
bryner%netscape.com
79d0374ca6 Add a command-line parameter, "-autoRegister", to allow automated component registration for static builds. r=ben.
git-svn-id: svn://10.0.0.236/trunk@122954 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-09 08:15:59 +00:00
mcafee%netscape.com
68dec9f1bd Re-generating this file to reflect alecf's latest modularization effort, also ran this on a tree with --enable-extensions=all so that we include extensions now.
git-svn-id: svn://10.0.0.236/trunk@122953 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-09 07:37:55 +00:00
bryner%netscape.com
89cfb1c4f3 Fix handling of the widget resources file by creating a data-fork resource file that lives in the application directory (bug 146895). r=ccarlen, sr=beard, a=asa for mach-o-only changes.
git-svn-id: svn://10.0.0.236/trunk@122948 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-09 00:05:37 +00:00
mcafee%netscape.com
093fc5db82 Adding mozilla favicon
git-svn-id: svn://10.0.0.236/trunk@122942 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-08 10:43:08 +00:00
bryner%netscape.com
83e4f8d0ae Fix a crash scrolling the address list in the mail compose window (bug 142542). r=ben, sr=jag, a=asa.
git-svn-id: svn://10.0.0.236/trunk@122935 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-08 07:50:34 +00:00
mcafee%netscape.com
13770b909f Splitting liveconnect off from the java module, new module is called liveconnect, similar to what was done for xpconnect (145347). r=blythe, sr=alecf, a=asa
git-svn-id: svn://10.0.0.236/trunk@122934 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-08 06:59:53 +00:00
mcafee%netscape.com
98a69d40fc Undo forced necko, mimetype ordering. Solve this problem in export/idl phase (150083). r/sr=alecf, a=asa
git-svn-id: svn://10.0.0.236/trunk@122933 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-08 06:54:02 +00:00
mcafee%netscape.com
31769bd611 Add js/src/fdlibm dir to js module map (150077). r=cls, sr=alecf, a=asa
git-svn-id: svn://10.0.0.236/trunk@122932 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-08 06:51:14 +00:00
pschwartau%netscape.com
acfdc5bfee Adding new sections authored by john@statesoftware.com from bug 150032.
git-svn-id: svn://10.0.0.236/trunk@122931 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-08 04:26:18 +00:00
bbaetz%student.usyd.edu.au
d62903a681 Bug 149845 - buglist.cgi checks for ORDER validity are wrong
r=myk x2


git-svn-id: svn://10.0.0.236/trunk@122927 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-08 03:06:10 +00:00
morse%netscape.com
23b7300d39 bug 149176, can't invoke profile manager if only one profile and turbo active, r=law, sr=ben,a=asa
git-svn-id: svn://10.0.0.236/trunk@122923 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-08 01:20:06 +00:00
robinf%netscape.com
ebf7c3a7fa routine help updates per bug 12
git-svn-id: svn://10.0.0.236/trunk@122918 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-08 01:10:51 +00:00
matty%chariot.net.au
c40459bfcc Release notes updates.
git-svn-id: svn://10.0.0.236/trunk@122908 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 23:39:35 +00:00
jkeiser%netscape.com
e7b5e6e67f Fire onSubmit event when enter pressed in no-submit-button forms (bug 149685). r=peterv, sr=jst, a=asa
git-svn-id: svn://10.0.0.236/trunk@122906 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 23:00:17 +00:00
pinkerton%netscape.com
efe610296d Adding a bunch of security warnings and dialogs, overriding the
XUL impl with our own.


git-svn-id: svn://10.0.0.236/trunk@122902 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 22:26:35 +00:00
yokoyama%netscape.com
4348dcd2d0 Backing out my change. Need drivers approval.....
git-svn-id: svn://10.0.0.236/trunk@122901 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 21:53:19 +00:00
yokoyama%netscape.com
67d555dd8f Bug 149171 and 146844
IME input processing
Only impact Simplified Chinese Windows.
/r=shanjian, /sr=brendan


git-svn-id: svn://10.0.0.236/trunk@122900 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 21:44:08 +00:00
mcafee%netscape.com
f229d201a6 Fixing one more typo, last one I promise. Does not affect normal SeaMonkey build. (143399) r=blythe, sr=alecf, a=asa
git-svn-id: svn://10.0.0.236/trunk@122899 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 21:37:12 +00:00
locka%iol.ie
206740d4be Persist data for embed & object tags. b=141316 r=brade@netscape.com sr=kin@netscape.com a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@122898 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 21:31:33 +00:00
mcafee%netscape.com
c8f46ae8cb Fixing typo from my last checkin. Does not affect normal SeaMonkey build. (143399) r=blythe, sr=alecf, a=asa
git-svn-id: svn://10.0.0.236/trunk@122897 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 21:29:58 +00:00
locka%iol.ie
1a345f8a80 (On behalf of Steve Williams <steve--w@dircon.co.uk>) Add activate message to fix focus in text areas. b=148613 r=adamlock@netscape.com sr=rpotts@netscape.com a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@122896 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 21:29:20 +00:00
mcafee%netscape.com
2c11535102 Adding new modules, modules that live in mozilla/extensions, and modules buried a few levels deep that I missed before. Cleaned up js module. (143399) r=blythe, sr=alecf, a=asa
git-svn-id: svn://10.0.0.236/trunk@122894 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 20:56:43 +00:00
djani%netscape.com
9ac81ff249 Bug 143300: Support for files with >2GB size. Now, we compile with _LARGEFILE64_SOURCE tag and we use fopen/fopen64 accordingly.
git-svn-id: svn://10.0.0.236/trunk@122893 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 20:09:11 +00:00
despotdaemon%netscape.com
8efb8cbaec Pseudo-automatic update of changes made by mcs@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@122892 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 19:16:13 +00:00
dkl%redhat.com
8675a909c5 Fix for bug 149964 - quietly_check_login() needs to be called in colchange.cgi. Patch author David Lawrence <dkl@redhat.com>. 2xr=justdave@syndicomm.com
git-svn-id: svn://10.0.0.236/trunk@122889 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 16:39:38 +00:00
rods%netscape.com
f762610be3 Don't check the range boolean for ending the page
Bug 146296 r=dcone sr=waterson a=asa


git-svn-id: svn://10.0.0.236/trunk@122887 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 14:30:17 +00:00
dcone%netscape.com
23878f8525 b=116042 r=rods sr=waterson a=asa. Fixed a null pointer situation on a mac call. This may fix alot of mac problems when
native widgets are not available. (ie printing)


git-svn-id: svn://10.0.0.236/trunk@122885 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 13:42:45 +00:00
morse%netscape.com
d789a6545f backing out last change, didn't realize trunk now requires driver approval
git-svn-id: svn://10.0.0.236/trunk@122879 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 12:20:47 +00:00
morse%netscape.com
e56d38a8bf bug 149176, profile manager doesn't appear when trying to create a 2nd profile and turbo is active, r=law, sr=ben
git-svn-id: svn://10.0.0.236/trunk@122878 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 12:17:23 +00:00
leaf%mozilla.org
1fd39ed4a0 updating locale version string for impending release, bug 149802
git-svn-id: svn://10.0.0.236/trunk@122873 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 07:45:38 +00:00
beard%netscape.com
f190b59da8 Fix build bustage by declaring PRInt32 index outside of for loop.
git-svn-id: svn://10.0.0.236/trunk@122871 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 06:26:14 +00:00
cotter%netscape.com
f609c35582 ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; latest legal & editorial correx.
git-svn-id: svn://10.0.0.236/trunk@122870 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 05:59:06 +00:00
darin%netscape.com
12ba22a968 fixes bug 149090 "viewing an image three times corrupts web pages [leaks
file descriptors on all platforms]" r=dougt, sr=rpotts, a=asa


git-svn-id: svn://10.0.0.236/trunk@122867 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 05:07:51 +00:00
bernd.mielke%snafu.de
7f3ec768d3 layout debug url correction not part of any build
git-svn-id: svn://10.0.0.236/trunk@122866 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 05:02:15 +00:00
bernd.mielke%snafu.de
bd3a26d33e layout docs - url correction not part of any build
git-svn-id: svn://10.0.0.236/trunk@122864 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 04:58:06 +00:00
cmanske%netscape.com
ce270b48fc Added tooltips to Publish dialogs, b=139896, r=brade/robinf, sr=kin, a=adt, a=shaver/drivers
git-svn-id: svn://10.0.0.236/trunk@122863 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 04:53:48 +00:00
bryner%netscape.com
7c12195130 Landing the changes for Chimera static builds (not on by default).
git-svn-id: svn://10.0.0.236/trunk@122862 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 04:35:37 +00:00
pete.zha%sun.com
db7886826b bug 148314:Implementation the nsIAccessibleTable
Description: let HTML table support nsIAccessibleTable extension
r=aaronl, sr=jst, a=asa


git-svn-id: svn://10.0.0.236/trunk@122861 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 04:15:18 +00:00
oeschger%netscape.com
2568ec4881 key updates for help, shoulda been part of yesterday's check-in for 129540, r=bhuvan, sr=alecf, a=asa
git-svn-id: svn://10.0.0.236/trunk@122859 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 02:56:36 +00:00
cltbld%netscape.com
e9be56c1ba part of updating installer for 1.1a bug 149142 ... r=jj sr=lpham a=leaf. asasaki checking in as cltbld.
git-svn-id: svn://10.0.0.236/trunk@122851 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 01:10:32 +00:00
cltbld%netscape.com
1ebccf3971 updating milestone.pl to allow for 1.1a, changes to 1.1a installer.
bug 149142, r=jj, sr/a=leaf, asasaki checking in as cltbld.


git-svn-id: svn://10.0.0.236/trunk@122850 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 01:06:28 +00:00
bryner%netscape.com
5f37ed3fea Fixing loss of focus when opening a URL in a new tab. If we receive a focus event and have not done an initial reflow yet, go ahead and do one so that we can dispatch the event. Otherwise, the focus controller becomes out of sync with the actual native widget focus. Bug 138237, r=dbaron, sr=waterson, a=asa.
git-svn-id: svn://10.0.0.236/trunk@122849 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-07 00:53:44 +00:00
stephend%netscape.com
f22c2ff39c Bug 148597. Can't drag a bookmark from personal toolbar to a tab. Patch by Pierre Chanial <pierrechanial@netscape.net> r=timeless, sr=blake, a=asa
git-svn-id: svn://10.0.0.236/trunk@122847 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 23:56:56 +00:00
leaf%mozilla.org
6bf15bb925 updating user agent for impending release, bug 149132
git-svn-id: svn://10.0.0.236/trunk@122846 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 23:52:04 +00:00
naving%netscape.com
5fc5b58188 139845 r=cavin sr=bienvenu a=asa fixing scrollbar missing when returning to folder view after doing quick search in certain cases.
git-svn-id: svn://10.0.0.236/trunk@122845 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 23:42:37 +00:00
beard%netscape.com
3b77c43899 Backout previous checkin. MRJPlugin.jar is now part of the tree.
git-svn-id: svn://10.0.0.236/trunk@122844 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 23:40:28 +00:00
beard%netscape.com
93377e9b1f Add MRJPlugin.jar to the tree for bootstrapping. Fix build bustage.
git-svn-id: svn://10.0.0.236/trunk@122841 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 23:37:14 +00:00
beard%netscape.com
4452c32d00 Fix build bustage, if no Java tools.
git-svn-id: svn://10.0.0.236/trunk@122840 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 23:32:07 +00:00
alecf%netscape.com
a6e1684fe2 backing out, don't know why this built on my machine
git-svn-id: svn://10.0.0.236/trunk@122839 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 23:25:43 +00:00
alecf%netscape.com
25283f33da argh, this never should have landed, that explains it..backing out this file
git-svn-id: svn://10.0.0.236/trunk@122834 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 22:17:45 +00:00
mkaply%us.ibm.com
215e1c2477 #149751
r=mkaply, sr=blizzard
OS/2 only - don't recycle compose windows - turn off pref


git-svn-id: svn://10.0.0.236/trunk@122833 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 22:17:25 +00:00
alecf%netscape.com
442d04a511 huh, I don't know how this got whacked.. fixing bustage
git-svn-id: svn://10.0.0.236/trunk@122832 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 22:14:46 +00:00
mkaply%us.ibm.com
7005ea8b71 #147929
r=jkobal, sr=blizzard
OS/2 only - handle special case of WM_QUIT so don't stop the OS from shutting down


git-svn-id: svn://10.0.0.236/trunk@122831 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 22:12:33 +00:00
alecf%netscape.com
1106f5b133 bug 149230 - crash launching helper apps
r=ducarroz, sr=blake, a=asa


git-svn-id: svn://10.0.0.236/trunk@122830 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 22:12:18 +00:00
myk%mozilla.org
32af0659a4 Backing out incorrect change to background color that was accidentally checked in as part of the fix for bug 148179.
git-svn-id: svn://10.0.0.236/trunk@122829 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 22:11:29 +00:00
cavin%netscape.com
9c27bf0ebd Fix for 107466. Reset msg uid in server state parser before calling 'foundShell->Generate()' because the uid may have been used by newly arrived mail. r=naving, sr=bienvenu, a=asa.
git-svn-id: svn://10.0.0.236/trunk@122828 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 21:44:27 +00:00
naving%netscape.com
269a6f4b8d 144228 r=cavin sr=bienvenu a=asa fixing security bug that breaks pop3 connection and prevents downloading of
msgs.


git-svn-id: svn://10.0.0.236/trunk@122827 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 21:31:43 +00:00
cavin%netscape.com
0f6982bbe6 Fix for 140850. In AddLdifRowToDatabase(), reset CR/LF counters and return if there's no data in the ldif buffer to process. R=ducarroz, sr=sspitzer, a=asa.
git-svn-id: svn://10.0.0.236/trunk@122826 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 21:29:25 +00:00
dcone%netscape.com
afae4e412f not part of build. Adding a new test case
git-svn-id: svn://10.0.0.236/trunk@122825 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 21:16:26 +00:00
dcone%netscape.com
ed1b38ea91 not part of build. Update on debug source
git-svn-id: svn://10.0.0.236/trunk@122824 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 21:15:53 +00:00
pinkerton%netscape.com
cb7f5ddb29 Fix prefs not getting written out (patch from bfoucher@mac.com). Removing
smooth text menu item since the non-atsui version is so much faster, we
always want it on.


git-svn-id: svn://10.0.0.236/trunk@122823 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 21:13:10 +00:00
pinkerton%netscape.com
23d9384d58 removing rename sheet, as it's not needed with info panel. making info panel
a bit larger.


git-svn-id: svn://10.0.0.236/trunk@122822 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 20:40:48 +00:00
beard%netscape.com
77530b2e38 Add MRJPluginCarbon to the build. r=jj, sr=waterson, a=adt/jaimejr.
git-svn-id: svn://10.0.0.236/trunk@122821 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 20:35:33 +00:00
alecf%netscape.com
6ebda75c34 fix for bug 101761 - REQUIRES update - remove all REQUIRES that are no longer necessary.. r=cls, a=asa (build-only changes)
git-svn-id: svn://10.0.0.236/trunk@122820 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 20:28:14 +00:00
dcone%netscape.com
4dedf2a23f b = 141786 r=rods sr=waterson a=valeski. Fine tune what algorithms the backgrounds go thru.
This speeds up the anything that had less than 32 background tiles.


git-svn-id: svn://10.0.0.236/trunk@122819 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 20:00:40 +00:00
pinkerton%netscape.com
a386886cfe turn on quartz rendering if 10.1.5 is present. bug 149427, r=sdagley/sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@122817 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 19:48:15 +00:00
bernd.mielke%snafu.de
57a503f498 debug docs not part of the build
git-svn-id: svn://10.0.0.236/trunk@122815 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 19:19:16 +00:00
shrutiv%netscape.com
34d0ccf06f Fix for bug 100423: Provide grey out feature for Proxy settings screen
(r=smeredith)


git-svn-id: svn://10.0.0.236/trunk@122813 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 17:18:24 +00:00
shrutiv%netscape.com
4dd793c40b Fix for bugzilla bug 100423: Provide grey out feature for Proxy
settings screen (r=smeredith)


git-svn-id: svn://10.0.0.236/trunk@122812 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 17:14:14 +00:00
shrutiv%netscape.com
a0cec7ba96 Fix for bug 103972: Provide warning dialog for empty help menu url (r=smeredith)
git-svn-id: svn://10.0.0.236/trunk@122811 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 17:05:49 +00:00
shrutiv%netscape.com
8580080825 Fix for bug 122819: include version info in cck.che (r=smeredith)
git-svn-id: svn://10.0.0.236/trunk@122810 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 16:54:35 +00:00
nboyd%atg.com
d51aa273b6 Fix for bug 149285: Complier does not report the correct line number on
SyntaxError:Invalid assignment left-hand side.


git-svn-id: svn://10.0.0.236/trunk@122809 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 15:01:57 +00:00
rods%netscape.com
b1b69dfd1a Add nsIObserver to the ShowPageSetup method for platforms that impl an Apply btn
Bug 149317 r=dcone sr=kin


git-svn-id: svn://10.0.0.236/trunk@122808 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 13:27:30 +00:00
mikep%oeone.com
9b7a6b8b79 Fixing small spelling mistake.
git-svn-id: svn://10.0.0.236/trunk@122807 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 13:13:35 +00:00
rods%netscape.com
8a7c290ff7 Add nsIObserver to the ShowPageSetup method for platforms that impl an Apply btn
Bug 149317 r=dcone sr=kin


git-svn-id: svn://10.0.0.236/trunk@122803 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 10:40:42 +00:00
oeschger%netscape.com
59b1fef7ab updating search db for Help, dispensation per 128806
git-svn-id: svn://10.0.0.236/trunk@122801 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 04:47:27 +00:00
oeschger%netscape.com
66a7f248dd adding im and icq 'keys' for context sensitive help, bug=129540, r=cotter, sr=alecf, a=asa/drivers
git-svn-id: svn://10.0.0.236/trunk@122800 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 04:42:49 +00:00
cmanske%netscape.com
92725f3819 Make font size in HTML source = user's fixed-width size set in prefs. b=114022, r=rbs, sr=alecf+kin, a=asa/drivers
git-svn-id: svn://10.0.0.236/trunk@122799 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 04:36:55 +00:00
matty%chariot.net.au
b0352fe719 Release notes updates.
git-svn-id: svn://10.0.0.236/trunk@122798 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 04:08:59 +00:00
sdagley%netscape.com
2ae0b2d1b5 Fix #149133 - crash when scrolling a tab created by 'Open Link in New Tab' due to not having a valid focused widget when the page finishes loading. r=pinkerton, sr=beard
git-svn-id: svn://10.0.0.236/trunk@122797 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 04:08:19 +00:00
bryner%netscape.com
3faacf9598 Bug 149225 - fix a crash on exit caused by shaver's checkin for bug 128335. r=pinkerton, sr=shaver, a=asa.
git-svn-id: svn://10.0.0.236/trunk@122796 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 03:04:56 +00:00
ssu%netscape.com
e9e63aa6a5 fixing bug 137141 - Wrong context menu items in stand alone mail window. r=neil sr=sspitzer a=drivers
git-svn-id: svn://10.0.0.236/trunk@122795 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 02:27:20 +00:00
caillon%returnzero.com
e9d52dc4f1 Bug 74688, Prevent context menus from appearing over scrollbars. r=sgehani, sr=jag, a=asa
git-svn-id: svn://10.0.0.236/trunk@122794 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 01:35:19 +00:00
bienvenu%netscape.com
e73d05592d rest of fix for 138018 disable move/delete for readonly folders r=naving, sr=sspitzer, a=asa
git-svn-id: svn://10.0.0.236/trunk@122793 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 01:19:42 +00:00
jj%netscape.com
7be8ad9e3f bug #149140 - updated Finder's get info string to '1.1a'. r=lpham, sr=leaf, a=leaf
git-svn-id: svn://10.0.0.236/trunk@122792 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 01:16:34 +00:00
jpierre%netscape.com
519cd93867 Fix for 141256 - rewrite OCSP HTTP download code to fix error handling
git-svn-id: svn://10.0.0.236/trunk@122791 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 01:05:40 +00:00
beard%netscape.com
dfe0761503 [not part of build] Remove obsolete project file.
git-svn-id: svn://10.0.0.236/trunk@122790 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 00:41:29 +00:00
beard%netscape.com
88353197a6 [not part of build, yet] Needed for plugin bundle automation.
git-svn-id: svn://10.0.0.236/trunk@122789 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 00:33:07 +00:00
jpierre%netscape.com
58ed7992a0 Fix for 139874 - Inject Latest CA Root Certs
git-svn-id: svn://10.0.0.236/trunk@122788 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 00:12:56 +00:00
leaf%mozilla.org
d8d721272a checking out all plugins/oji
git-svn-id: svn://10.0.0.236/trunk@122787 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-06 00:01:39 +00:00
mitchf%netscape.com
9ffe3b38b2 renumber modules correctly if Calendar exists. Fixes bug 13710
git-svn-id: svn://10.0.0.236/trunk@122786 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 20:56:39 +00:00
mitchf%netscape.com
62ad648322 added function 'configureAddText' Fixes bug 13710
git-svn-id: svn://10.0.0.236/trunk@122785 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 20:55:33 +00:00
igor%mir2.org
64390a84fc Replacing check for unescaped characters in encode/decode from searching in a string to doing switch. It provides a noticeable speedup during encoding/decoding of long strings where almost all characters should be encoded.
git-svn-id: svn://10.0.0.236/trunk@122784 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 20:40:57 +00:00
mikep%oeone.com
d3502e5237 Fixing about dialog to match Mozilla.
git-svn-id: svn://10.0.0.236/trunk@122783 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 19:58:47 +00:00
mikep%oeone.com
abc7212fff Update for using commands as broadcasters, and adding in keybindings to most things now.
git-svn-id: svn://10.0.0.236/trunk@122782 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 19:24:28 +00:00
timeless%mac.com
3b6afd04a4 Bug 90598 spelling and minor syntactic correctness [doeHs]
a=baloo


git-svn-id: svn://10.0.0.236/trunk@122781 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 17:57:41 +00:00
pinkerton%netscape.com
84ff93f0f8 Fixing un-necessary object creation.
git-svn-id: svn://10.0.0.236/trunk@122780 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 15:26:52 +00:00
mikep%oeone.com
df3b1882ad Updating classic skin for new moz-region. bug 149041.
git-svn-id: svn://10.0.0.236/trunk@122779 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 15:13:48 +00:00
mikep%oeone.com
b22a725980 Fixing bug 148435, problem with minutes being too narrow.
git-svn-id: svn://10.0.0.236/trunk@122778 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 15:04:59 +00:00
mikep%oeone.com
3937da8d3a Small fix to prevent JS error.
git-svn-id: svn://10.0.0.236/trunk@122777 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 14:56:45 +00:00
mikep%oeone.com
823f4da24f Fixing bug 137371, adding in keysets for window menu.
git-svn-id: svn://10.0.0.236/trunk@122776 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 14:56:34 +00:00
ben%netscape.com
9b5b8ae91e bookmark keyword back end + fix for missing bookmark file causes crash on startup
git-svn-id: svn://10.0.0.236/trunk@122775 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 14:24:54 +00:00
mikep%oeone.com
12dd33911a Updating jar.mn and date for about page.
git-svn-id: svn://10.0.0.236/trunk@122774 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 13:27:39 +00:00
jaggernaut%netscape.com
1ecc6f00ca Fix typo: |const browser = | -> |const browsers = |. r=Neil.
git-svn-id: svn://10.0.0.236/trunk@122772 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 11:06:37 +00:00
ben%netscape.com
f997e30e8d Hook up Bookmarks Info Window, bug 148933
git-svn-id: svn://10.0.0.236/trunk@122770 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 10:09:37 +00:00
matty%chariot.net.au
bde1b0a610 Release notes updates.
git-svn-id: svn://10.0.0.236/trunk@122765 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 04:43:05 +00:00
stephend%netscape.com
2161560370 Bug 139797. Addressbook should read address book in the Import Wizard. Patch by Dawn Endico <endico@mozilla.org> r=me, sr=jst. Cleanup tabs, also.
git-svn-id: svn://10.0.0.236/trunk@122764 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 04:18:32 +00:00
mkaply%us.ibm.com
d433fe17da #147977
r=jpierre, sr=blizzard
OS/2 only - int32 math causing incorrect computation of disk space


git-svn-id: svn://10.0.0.236/trunk@122763 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 04:02:33 +00:00
mcafee%netscape.com
764c900e03 Further-specify imglib2 module directories. Properly add png to the build using imgpng, not the raw png module. r=blythe, sr=alecf (149123)
git-svn-id: svn://10.0.0.236/trunk@122759 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 03:49:30 +00:00
matty%chariot.net.au
c48e3590b3 Bug 148919: Make entryheader a separate template. (again)
git-svn-id: svn://10.0.0.236/trunk@122754 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 03:40:28 +00:00
ducarroz%netscape.com
beb4464de3 Fix for bug 97055. The previous fix isn't working correctly when the pref "imageblocker.enabled" is set to false. mailnews element must not be disabled. R=morse, SR=bienvenu
git-svn-id: svn://10.0.0.236/trunk@122752 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 03:38:59 +00:00
beard%netscape.com
1ec1a80dcc Empirically determined vertical coordinate fixup (HACK) for Chimera.
git-svn-id: svn://10.0.0.236/trunk@122745 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 02:39:25 +00:00
beard%netscape.com
1cf870f45c Workaround for shutdown hang in Chimera.
git-svn-id: svn://10.0.0.236/trunk@122744 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 02:38:39 +00:00
justdave%syndicomm.com
1324aacb65 Fix for bug 148679: permit multiple stylesheets in the header template.
Patch by Joel Peshkin <bugreport@peshkin.net>
r= jouni, gerv


git-svn-id: svn://10.0.0.236/trunk@122743 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 02:23:12 +00:00
cmanske%netscape.com
a7a8c73bdb Save copy of document and restore if publishing fails, b=134883, r=brade, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@122735 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 01:38:08 +00:00
cmanske%netscape.com
b4a17af704 Improve Publishing progress and error notification, b=148425, r=brade, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@122734 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 01:17:33 +00:00
brendan%mozilla.org
13e8a43ab1 Ensure a live keyHash *after* multiplying by the irrational (146907, r=dbaron, sr=shaver).
git-svn-id: svn://10.0.0.236/trunk@122729 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 00:47:38 +00:00
ftang%netscape.com
1441afca01 fix bug 84668. r=shanjian sr=alecf
on simplfied chinese window. force any return value of
system font size < 9 to be at least 9 because we know
the glyph less than 9 look very very ugly on SimpChinese system


git-svn-id: svn://10.0.0.236/trunk@122725 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 00:41:04 +00:00
jaggernaut%netscape.com
c612097537 Bug 103452: When window.close() is called, close the tab for that content window, not the whole (XUL) window. Patch by jag and jst, r=hewitt, r=bryner, sr=jag, sr=jst
git-svn-id: svn://10.0.0.236/trunk@122723 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 00:38:31 +00:00
jaggernaut%netscape.com
96adc87948 Bug 103452: When window.close() is called, close the tab for that content window, not the whole (XUL) window. r=hewitt, sr=jag, sr=jst
git-svn-id: svn://10.0.0.236/trunk@122718 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 00:31:45 +00:00
stephend%netscape.com
a15b86895e Bug 146598. Disable Search button until we have entered text. Patch by Stephen Walker <walk84@yahoo.com> r=oeschger, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@122717 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 00:08:20 +00:00
stephend%netscape.com
efa4dc34f4 Bug 86986. Disable location textfield when mail startup checkbox is off. Patch by Stephen Walker <walk84@yahoo.com> r=ssu, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@122716 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-05 00:00:53 +00:00
jaggernaut%netscape.com
9387a01a7d Bug 148840: r=caillon, sr=jst on the previous checkin
git-svn-id: svn://10.0.0.236/trunk@122715 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 23:52:43 +00:00
stephend%netscape.com
edcb4785bd Bug 109554. Tooltips shouldn't appear on grippies unless minimized. Patch by Neil <neil@parkwaycc.co.uk> r=bryner, sr=ben
git-svn-id: svn://10.0.0.236/trunk@122714 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 23:51:23 +00:00
jaggernaut%netscape.com
7e8b6c72fa Bug 148840: work around checkbox binding not being available at onload the first time the dialog is opened.
git-svn-id: svn://10.0.0.236/trunk@122713 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 23:51:05 +00:00
cathleen%netscape.com
32cd03d43c clean up last traces of nsCRT::strlen(char* s), bug 124536 r=dp, sr=brendan
git-svn-id: svn://10.0.0.236/trunk@122710 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 23:05:39 +00:00
myk%mozilla.org
d5be1a75f5 Fix for bug 148179: Cleans up interface to header.html.tmpl.
r=justdave,bbaetz


git-svn-id: svn://10.0.0.236/trunk@122708 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 22:56:40 +00:00
caillon%returnzero.com
b4ae1be072 Bug 107949, Allow the user to prevent sites from disabling window features via window.open(). r=danm, sr=jag
git-svn-id: svn://10.0.0.236/trunk@122707 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 22:24:00 +00:00
pinkerton%netscape.com
53f4c512bd Stubbing in more tooltip support, ifdef'd out, doesn't fully work yet.
git-svn-id: svn://10.0.0.236/trunk@122706 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 21:52:44 +00:00
cmanske%netscape.com
caa368c66a Use standard Composer method for alert dialog in Replace code, b=146403, fix=neil@parkwaycc.co.uk, r=cmanske,sr=dveditz
git-svn-id: svn://10.0.0.236/trunk@122705 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 21:50:24 +00:00
pinkerton%netscape.com
231e3d4efb respect the chrome mask. hide the main toolbar, personal toolbar, and
status bar if required.


git-svn-id: svn://10.0.0.236/trunk@122704 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 21:50:14 +00:00
pinkerton%netscape.com
a5b66ac63a Adding a subview for the status bar so we can hide it when the chrome
mask says no status bar.


git-svn-id: svn://10.0.0.236/trunk@122703 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 21:49:45 +00:00
dougt%netscape.com
c4b7ad94e8 Fixes allocation/deallcation mismatch. sr=darin, verified by stephend, b=149108
git-svn-id: svn://10.0.0.236/trunk@122702 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 21:48:53 +00:00
thayes%netscape.com
7eb9837675 Reserve OID (netscape_name_components 2) - see 605437
git-svn-id: svn://10.0.0.236/trunk@122701 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 21:46:05 +00:00
naving%netscape.com
8ac1d8fd72 90064 r=cavin sr=bienvenu. fixing Subscribe error alerts when sending mail and copying msg to imap sent folder
without launching mailnews. The fix is to build the folder hierarchy.


git-svn-id: svn://10.0.0.236/trunk@122700 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 21:45:09 +00:00
cmanske%netscape.com
5fe52f3af6 Make Publish command more accessible, b=146522, r=akkana/brade, sr=dveditz
git-svn-id: svn://10.0.0.236/trunk@122698 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 21:39:10 +00:00
locka%iol.ie
b8260ca22c Added unsupported warnings to winEmbed.
git-svn-id: svn://10.0.0.236/trunk@122697 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 21:29:04 +00:00
beard%netscape.com
9346dad1cf Added some plugin source files (not built) for reference.
git-svn-id: svn://10.0.0.236/trunk@122696 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 20:57:00 +00:00
heikki%netscape.com
4fa84bff42 Bug 132105, XLinks must pay attention to the popup prefs. r=harishd, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@122694 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 20:24:37 +00:00
depstein%netscape.com
6cc179f821 added 'javascript' channel test in "TestYourMethod2()", Tests.cpp
a=asa for QA checkins that are not part of the default builds


git-svn-id: svn://10.0.0.236/trunk@122693 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 20:22:45 +00:00
mikep%oeone.com
7b764c6be1 Fixing bug 148370, problem with events changing day after switching start day.
git-svn-id: svn://10.0.0.236/trunk@122692 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 19:55:40 +00:00
pschwartau%netscape.com
bd469e1cf8 Cosmetic whitespace cleanup.
git-svn-id: svn://10.0.0.236/trunk@122691 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 19:51:59 +00:00
cbiesinger%web.de
9c8877de47 bug 148787 patch by hixie r=dbaron sr=roc+moz
Clicked links don't go red (prefs style sheet is overriding UA style sheet)


git-svn-id: svn://10.0.0.236/trunk@122690 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 19:44:53 +00:00
mikep%oeone.com
d1c1cef388 Fixing bug 139767, adding page up and page down keybindings to calendar code.
git-svn-id: svn://10.0.0.236/trunk@122689 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 19:37:51 +00:00
mikep%oeone.com
a9100ca2cd Fixing bug 149041, using image region now for modern skin.
git-svn-id: svn://10.0.0.236/trunk@122688 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 19:15:00 +00:00
pinkerton%netscape.com
7096840e76 default tab is the first one, not the second.
git-svn-id: svn://10.0.0.236/trunk@122687 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 19:10:01 +00:00
mikep%oeone.com
450bbf5543 Fixing bug 147319 so that the calendar remembers the last view you were on.
git-svn-id: svn://10.0.0.236/trunk@122686 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 19:01:03 +00:00
rogerl%netscape.com
a60dd76705 Corrected tests to match ECMA - unmatched paren contents need to have the
value 'undefined' rather than an empty string.


git-svn-id: svn://10.0.0.236/trunk@122685 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 18:51:05 +00:00
neeti%netscape.com
29dc4eb3d1 fix for bug 142629 - [win32 only] recursive copy / move errors are not properly bubbled up, r=dougt, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@122684 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 18:47:37 +00:00
nboyd%atg.com
15cf3a18a3 Fix ClassCastException.
git-svn-id: svn://10.0.0.236/trunk@122683 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 18:37:21 +00:00
pinkerton%netscape.com
167fbed364 make "home" button do the right thing. turn pref manager object into a
shared object owned by the main controller so other objects can easily
get to it to ask about prefs. reworked the code that gets the homepage
so that it conditionally checks if it should check the startup page
mode (obviously the home button doesn't want that). bug# 148936.


git-svn-id: svn://10.0.0.236/trunk@122682 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 18:36:29 +00:00
locka%iol.ie
2e9ed95e9d Clarify nsIWebBrowserSetup documentation. b=143326 r=depstein@netscape.com sr=rpotts@netscape.com
git-svn-id: svn://10.0.0.236/trunk@122681 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 18:31:00 +00:00
brendan%mozilla.org
28a8567dd7 Respect addProperty failure (148899, r=khanson, sr=shaver).
git-svn-id: svn://10.0.0.236/trunk@122680 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 18:13:55 +00:00
mostafah%oeone.com
d89b464a34 Applied patch to fix bug 145508
git-svn-id: svn://10.0.0.236/trunk@122679 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 17:56:36 +00:00
shrutiv%netscape.com
2bb1c58122 Fix for bugscape bug 15424: Support easy way to add a sidebar panel
via CCK (r=smeredith)


git-svn-id: svn://10.0.0.236/trunk@122678 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 17:55:33 +00:00
kmcclusk%netscape.com
eb567220f1 Dispatch (WIN32 only) and handle a new cross platform message NS_SYSCOLORCHANGE. bug 143174. r=rods sr=roc
git-svn-id: svn://10.0.0.236/trunk@122677 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 17:47:54 +00:00
mikep%oeone.com
ed4ced5369 Doing remove attribute now and fixing bug 145825, week view now shows the right colors for weekends after changing start days for week.
git-svn-id: svn://10.0.0.236/trunk@122676 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 17:38:24 +00:00
dougt%netscape.com
929734e23b Fixes static global initialization order. r=dougt@netscape.com, sr=brendan@mozilla.org, patch by bryner@netscape.com
git-svn-id: svn://10.0.0.236/trunk@122674 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 14:21:32 +00:00
rods%netscape.com
83ef4246aa Check for null dom content before doing QI
Bug 148760 r=jkesier sr=jst


git-svn-id: svn://10.0.0.236/trunk@122673 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 12:06:59 +00:00
jay.yan%sun.com
48f7217c07 bug 121266 gtk2 needs window raising. patch=jeff, r=jay, sr=blizzard
git-svn-id: svn://10.0.0.236/trunk@122672 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 11:02:26 +00:00
cbiesinger%web.de
97b4ba4704 bug 8031 r=tor sr=dveditz
XBM support


git-svn-id: svn://10.0.0.236/trunk@122670 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 08:48:12 +00:00
cbiesinger%web.de
7e07e3424b bug 8031 r=tor sr=dveditz
XBM support


git-svn-id: svn://10.0.0.236/trunk@122668 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 08:41:57 +00:00
sspitzer%netscape.com
90fdf26a1e fix for #148078. context menu problems in stand alone msg window.
use GetLoadedMsgFolder() instead of GetSelectedFolderResource().
regression caused by #138018.  r/sr=bienvenu.


git-svn-id: svn://10.0.0.236/trunk@122664 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 07:28:52 +00:00
matty%chariot.net.au
89092f0c1f Bug #142890: Make the banner a separate template.
git-svn-id: svn://10.0.0.236/trunk@122661 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 05:56:34 +00:00
matty%chariot.net.au
87f1ef3390 Bug #142890: Make the banner a separate template.
git-svn-id: svn://10.0.0.236/trunk@122659 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 05:56:03 +00:00
stephend%netscape.com
37f05808a8 Bug 140526. Offset checking clean-up in SetAlphaData & SetImageData. Patch by Arron M. <animecity.nu> r=pavlov@netscape.com, sr=tor@acm.org.
git-svn-id: svn://10.0.0.236/trunk@122658 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 05:51:44 +00:00
bbaetz%student.usyd.edu.au
1e731b00c5 Bug 143574 - taint errors with alternate formats. Also make data/template
writable for non webservergroup users.
r=myk, justdave


git-svn-id: svn://10.0.0.236/trunk@122657 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 05:47:28 +00:00
cotter%netscape.com
2434a69cab ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; misc formatting, privacy updates from legal
git-svn-id: svn://10.0.0.236/trunk@122655 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 05:38:17 +00:00
dougt%netscape.com
328e7b8d15 Fixes top crash in nsFileTransport::Process [nsFileTransport.cpp, line 753] and hoping to fix the move-email-crash-issue. This change inforces that a Async(Read|Write) of the file or socket transport must have a valid mProvider|mListener. sr=darin@netscape.com, r=pavlov, bug=107214
git-svn-id: svn://10.0.0.236/trunk@122654 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 05:36:15 +00:00
kaie%netscape.com
6e8339abe6 Part of bug 119394, landing UI strings only.
r=cotter sr=alecf


git-svn-id: svn://10.0.0.236/trunk@122652 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 05:09:47 +00:00
axel%pike.org
f1b78d408d bug 113611, XPath and XSLT contexts. fixes bugs 96410, 102293, 92106, 110266, 116534 and a bunch of other cases not filed. This mostly fixes namespaces and some really bad speed issues by fixing the time when namespaces are resolved, how default priorities are computed and how templates are matched.
HUGE PERFWIN :-)
r=peterv, sr=jst


git-svn-id: svn://10.0.0.236/trunk@122650 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 05:00:31 +00:00
roc+%cs.cmu.edu
c4d9baabad Bug 148350. Tweak code to avoid bug in gcc 2.95.3 with -O2. r=roc+moz,sr=jag
git-svn-id: svn://10.0.0.236/trunk@122648 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 04:55:04 +00:00
roc+%cs.cmu.edu
6be84e28ca Bug 142461. Turn off annoying debug messages. r=kmcclusk,sr=waterson
git-svn-id: svn://10.0.0.236/trunk@122645 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 04:48:04 +00:00
roc+%cs.cmu.edu
5ab88e7619 Bug 142461. Make sure clipped views are not marked transparent. r=kmcclusk,sr=waterson
git-svn-id: svn://10.0.0.236/trunk@122643 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 04:44:03 +00:00
bernd.mielke%snafu.de
dafbd8aee3 no math with NS_UNCONSTRAINEDSIZE please, bug 14862 r=karnaze sr=roc+moz
git-svn-id: svn://10.0.0.236/trunk@122641 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 04:37:06 +00:00
suresh%netscape.com
47616d75b2 mozilla side changes for bugscape 16296. r-blake, sr-ben. Given the Component id and panel, open the component and select the panel in the pref window.
git-svn-id: svn://10.0.0.236/trunk@122638 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 04:16:14 +00:00
ducarroz%netscape.com
5733ccf9bc Fix for bug 147877. Add UI for disabling plugins in mailnews. R=bhuvan, SR=bienvenu
git-svn-id: svn://10.0.0.236/trunk@122637 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 04:14:25 +00:00
jkeiser%netscape.com
ba9015bf6b Hellooooo Mac.
git-svn-id: svn://10.0.0.236/trunk@122633 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 03:53:05 +00:00
jkeiser%netscape.com
65ed9147ab Bug 125578.
git-svn-id: svn://10.0.0.236/trunk@122629 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 02:46:30 +00:00
bbaetz%student.usyd.edu.au
e096c8b73a Bug 144285 - checksetup.pl fails to set data dir (and other dir)
permissions properly
r=justdave, myk


git-svn-id: svn://10.0.0.236/trunk@122627 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 02:39:27 +00:00
jkeiser%netscape.com
5b189d7a7e Rest of patch (partial commit before). Remove nsFormFrame forever. bug 125578, r=alexsavulov@netscape.com, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@122626 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 02:34:30 +00:00
pschwartau%netscape.com
ef11e63725 Initial add; regression test for bug 137000.
git-svn-id: svn://10.0.0.236/trunk@122624 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 02:19:48 +00:00
jkeiser%netscape.com
54975d102e Rest of patch (partial commit before). Remove nsFormFrame forever. bug 125578, r=alexsavulov@netscape.com, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@122621 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 02:00:34 +00:00
jkeiser%netscape.com
d85e8fc690 Mac bustage fix.
git-svn-id: svn://10.0.0.236/trunk@122620 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 01:52:10 +00:00
depstein%netscape.com
ddc193d482 added GetTheChannel() and a few URIs for request handling.
git-svn-id: svn://10.0.0.236/trunk@122619 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 01:29:26 +00:00
jkeiser%netscape.com
0c2a8f4e96 Remove nsFormFrame forever. bug 125578, r=alexsavulov@netscape.com, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@122617 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 00:44:04 +00:00
beard%netscape.com
6c6de45f44 Fix PRODUCT_NAME for MRJPlugin.jar.
git-svn-id: svn://10.0.0.236/trunk@122616 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 00:36:09 +00:00
oeschger%netscape.com
e70d0f0cfb reorder tabs in help window per usability test, r=andreww, sr=alecf, bug=136654, drivers say bake on trunk
git-svn-id: svn://10.0.0.236/trunk@122614 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 00:15:39 +00:00
myk%mozilla.org
595520bd34 Fix for bug 148767: Eliminates warning in rare situations.
Patch by Jouni Heikniemi <jouni@heikniemi.net>.
2rx=myk


git-svn-id: svn://10.0.0.236/trunk@122612 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 00:12:57 +00:00
beard%netscape.com
383bd60e21 Added MRJPlugin.jar target.
git-svn-id: svn://10.0.0.236/trunk@122611 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-04 00:11:41 +00:00
bryner%netscape.com
308f0e52ca Fixing mach-o static build - made a function static in nsAppShellService so that it doesn't conflict with global symbols; add TK_LIBS (-framework Carbon) to the link line for mozilla-bin for both carbon and cocoa builds. r=cls, rs=brendan.
git-svn-id: svn://10.0.0.236/trunk@122610 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 23:53:31 +00:00
beard%netscape.com
a2bb716d28 Added Resources target.
git-svn-id: svn://10.0.0.236/trunk@122609 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 23:44:00 +00:00
beard%netscape.com
f781a8ed5f Decodes AppleSingle format resource files so ProjectBuilder can merge them.
git-svn-id: svn://10.0.0.236/trunk@122608 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 23:41:09 +00:00
myk%mozilla.org
11bd1df123 Fix for bug 145030: Removes use of CGI.pm from Template Toolkit until problems with it can be investigated and resolved.
r=jouni,gerv


git-svn-id: svn://10.0.0.236/trunk@122600 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 22:31:11 +00:00
blizzard%redhat.com
ab2025e799 No bug on this one. Fix the dependency for the mozilla-js package. Add a package file for nss. Not part of the standard build. r=cls
git-svn-id: svn://10.0.0.236/trunk@122599 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 22:26:01 +00:00
kin%netscape.com
79aa82cbf1 Fix for bug 138573 (hitting return in list item causes list problems; workaround is to refresh)
Modified SlideLine() to use the combined area instead of the linebox
  bounds when invalidating. This makes sure that we invalidate the
  area occupied by the list bullets/ordinals.

r=dbaron@fas.harvard.edu  sr=waterson@netscape.com


git-svn-id: svn://10.0.0.236/trunk@122594 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 21:35:54 +00:00
jaggernaut%netscape.com
07868fbe83 Bug 148840: Add "Bookmark This Group of Tabs..." to Bookmarks menu. r=caillon, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@122593 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 21:35:10 +00:00
pinkerton%netscape.com
b81a15d2af Fix warnings
git-svn-id: svn://10.0.0.236/trunk@122588 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 21:20:27 +00:00
timeless%mac.com
6b21bd4499 Update README to post TCL post terry world
This file probably contains many inaccuracies, but at least it's a bit closer to reality
a=tara


git-svn-id: svn://10.0.0.236/trunk@122585 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 21:09:49 +00:00
shanjian%netscape.com
5ba5e9d53a #140234 Japanese auto-detection marks ISO-8859-15 page as Windows-1252
Don't update chatset for document if existing one is of higher priority.
r=yokoyama, sr=jst


git-svn-id: svn://10.0.0.236/trunk@122584 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 21:09:22 +00:00
shanjian%netscape.com
b0d3bcb716 #136017 ome characters in menus/dialogs/etc. are rendered incorrectly
For Polish and Czech, don't skip native letters in bitmap font.
p=Marek.Wawoczny@GmbH.rubikon.pl r=shanjian, sr=waterson.


git-svn-id: svn://10.0.0.236/trunk@122581 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 21:01:34 +00:00
alecf%netscape.com
1ad0e9a6b0 oops, forgot to remove one REQUIRES entry (from checkin for bug 140136)
r=pinkerton, sr=blake


git-svn-id: svn://10.0.0.236/trunk@122580 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 20:54:01 +00:00
mikep%oeone.com
22959196d2 Removing old useless code.
git-svn-id: svn://10.0.0.236/trunk@122579 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 20:53:50 +00:00
mikep%oeone.com
8e5d762bc9 Removing the removal of observer, since it causes JS errors.
git-svn-id: svn://10.0.0.236/trunk@122578 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 20:53:28 +00:00
varada%netscape.com
7eef883f83 fix for 139814- Search the Web menu item should open page only in browser and not in any window with content area;r=law;sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@122577 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 20:53:23 +00:00
alecf%netscape.com
ef969213ad fix for bug 140136 - clean up progress listener stuff in the URI loader to more closely match what actually happens in the browser and embedded contexts - mostly just function renaming and code reorg
r=pinkerton, sr=blake


git-svn-id: svn://10.0.0.236/trunk@122576 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 20:52:27 +00:00
mikep%oeone.com
fd2465dcb3 Adding an id to the splitter to get the persist stuff working.
git-svn-id: svn://10.0.0.236/trunk@122575 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 20:34:21 +00:00
darin%netscape.com
69fdc31f3f fixes bug 136210 "cannot view any https urls when memory cache size is set to 0"
r=beard sr=rpotts


git-svn-id: svn://10.0.0.236/trunk@122574 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 20:05:53 +00:00
timeless%mac.com
a36ee39e7c Bug 144763 tolerate do_QueryReferent() returning null [@nsXULPrototypeScript::Compile]
r=harishd sr=jst


git-svn-id: svn://10.0.0.236/trunk@122571 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 19:17:46 +00:00
bernd.mielke%snafu.de
a42d51bdb9 bug 148240, percent text-indent should not be computed for NS_UNCONSTRAINEDSIZE
parent width. r=dbaron sr=waterson


git-svn-id: svn://10.0.0.236/trunk@122570 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 18:35:04 +00:00
dbaron%fas.harvard.edu
268cd40267 Make quirk stylesheet assertion |#ifdef DEBUG_dbaron| until I figure out why it's firing. b=147691 r=hwaara sr=waterson
git-svn-id: svn://10.0.0.236/trunk@122569 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 18:26:18 +00:00
pinkerton%netscape.com
154b67292f Fix warning
git-svn-id: svn://10.0.0.236/trunk@122568 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 18:10:17 +00:00
pinkerton%netscape.com
8bfd70f18f Fixup button reflow logic to avoid toolbar drawing over content area. bug 147923
git-svn-id: svn://10.0.0.236/trunk@122567 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 18:09:22 +00:00
brade%netscape.com
900a49bdd1 remove dump and warning
git-svn-id: svn://10.0.0.236/trunk@122566 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 18:05:02 +00:00
brade%netscape.com
6806e22931 bug 134503; add comments that were added to branch (r=akkana, sr=kin)
git-svn-id: svn://10.0.0.236/trunk@122565 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 18:04:33 +00:00
brade%netscape.com
f72ffa8d5c bug 138662; r=adamlock, cmanske, sr=alecf; add flag to serialize publishing
git-svn-id: svn://10.0.0.236/trunk@122564 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 18:03:53 +00:00
bishakhabanerjee%netscape.com
2aeaaa942a to build the new NSS tests.. bugzilla bug 144316
git-svn-id: svn://10.0.0.236/trunk@122562 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 17:16:57 +00:00
mikep%oeone.com
407a99c2ce Checking in patch from bug 135779.
git-svn-id: svn://10.0.0.236/trunk@122561 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 17:10:11 +00:00
timeless%mac.com
1fd29622e6 Bug 61366 "branchspam.cgi" and "branchspammer.cgi" should be removed from Makefile.in and README
suggested by bugzilla@gemal.dk
Also removed from bonsai.spec


git-svn-id: svn://10.0.0.236/trunk@122559 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 14:52:31 +00:00
pinkerton%netscape.com
9b25852c60 correctly launch if any non-ascii chars are in the path. bug 148432
git-svn-id: svn://10.0.0.236/trunk@122558 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 14:38:32 +00:00
pinkerton%netscape.com
0c2e47e48f Fix crashes at startup. (from william@dell.wisner.name)
git-svn-id: svn://10.0.0.236/trunk@122556 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 14:27:11 +00:00
matty%chariot.net.au
8958abf9bc Release notes updates.
git-svn-id: svn://10.0.0.236/trunk@122555 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 14:15:27 +00:00
oeschger%netscape.com
716a125a81 updating search db for Help, dispensation per 122806, r=cotter
git-svn-id: svn://10.0.0.236/trunk@122554 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 14:15:21 +00:00
pinkerton%netscape.com
ff710d4f49 Adding privacy panel back in to copy phase
git-svn-id: svn://10.0.0.236/trunk@122553 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 14:10:33 +00:00
bbaetz%student.usyd.edu.au
33f62fc9c7 Bug 93167 - &GroupExists and &GroupIsActive should push and pop sql state
r=justdave, jouni


git-svn-id: svn://10.0.0.236/trunk@122549 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 13:37:07 +00:00
brade%netscape.com
bd45eaa9a0 add flag and code to handle serialization of output (one file at a time) so that publishing doesn't fail due to too many logins or similar (bug 138662 and others); r=adamlock, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@122547 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 13:08:27 +00:00
mikep%oeone.com
4b6f95ec84 Fixing bug 147193, small problem with file -> export.
git-svn-id: svn://10.0.0.236/trunk@122546 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 13:01:52 +00:00
ben%netscape.com
b15518e675 Part of a fix for bug 142847, Trunk crashes launching mail @ nsBufferedStream::Fil
l. Null-check patch from darin@netscape.com, r=dougt, sr=ben


git-svn-id: svn://10.0.0.236/trunk@122544 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 12:44:13 +00:00
bryner%netscape.com
f0fa05dfb4 Make this symbol static to avoid clashes in a static build. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@122542 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 09:34:50 +00:00
kyle.yuan%sun.com
ad405e64da Bug 134426 Set image as wallpaper crashes Mozilla (when Mozilla Wallpaper.bmp is Read-Only)
r=timeless, sr=hewitt
return FAILURE instead of crashing when output stream can't be opend


git-svn-id: svn://10.0.0.236/trunk@122540 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 09:20:35 +00:00
ben%netscape.com
36fd36bbc6 Add support for persistence of folder open state between sessions and windows, disabled for the moment until I can figure out how to update the NSOutlineView's row count.
git-svn-id: svn://10.0.0.236/trunk@122539 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 09:17:51 +00:00
bryner%netscape.com
09d26c52c6 More static build fixing (from sfraser's rev 1.19 of widget/src/mac/Makefile.in).
git-svn-id: svn://10.0.0.236/trunk@122538 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 09:17:13 +00:00
bryner%netscape.com
a712f1b0d1 Make the module name agree with the Makefile so that static builds work. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@122537 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 09:02:31 +00:00
timeless%mac.com
cb0faf5955 Bug 135250 Context menu: "open link in new tab" should be below "open link in new window"
patch by alexbishopuk@yahoo.com r=bzbarsky sr=jag


git-svn-id: svn://10.0.0.236/trunk@122536 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 09:01:35 +00:00
cavin%netscape.com
e0a8ca6af3 Fix for 148520 (check in on behalf of David Baron). Make sure input realm is not an empty string before Stripping off trailing '/'. r=r=morse, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@122534 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 06:32:55 +00:00
cavin%netscape.com
c85ba6c523 Fix for 94775. When redirect login fails, invoke ForgetPassword(), instead of SetPassword(nsnull), to clean up all cached passwords. r=dmose, sr=bienvenu.
git-svn-id: svn://10.0.0.236/trunk@122533 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 06:04:47 +00:00
cotter%netscape.com
163e7fde2b ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; latest legal comments
git-svn-id: svn://10.0.0.236/trunk@122532 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 05:49:33 +00:00
dmose%netscape.com
ed5f6fb8ab Fix nmake build bustage by adding into to the REQUIRES list
git-svn-id: svn://10.0.0.236/trunk@122530 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 05:12:00 +00:00
dmose%netscape.com
4c0089d9ec Support LDAP authentication for autocomplete and addressbook (bug 135778); r=sspitzer@netscape.com, srilatha@netscape.com; sr=bienvenu@netscape.com
git-svn-id: svn://10.0.0.236/trunk@122529 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 04:05:48 +00:00
timeless%mac.com
893cd03459 Bug 148674 Boolean Charts don't work in Netpositive because '-' is sent as '%2D
This makes CGI.pl closer to CGI.pm by having it unescape the name field in addition to the value field.
r=preed,justdave


git-svn-id: svn://10.0.0.236/trunk@122525 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 02:42:00 +00:00
blakeross%telocity.com
6a36dd31a1 128322 - history sidebar opens topmost link automatically. patch by neil and me. r=andreww/hewitt sr=blake/hewitt
git-svn-id: svn://10.0.0.236/trunk@122523 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 01:49:19 +00:00
dougt%netscape.com
c6a6d9af87 Fixes top crash in M1RC3 crash [@ nsLocalFile::GetPath], r=rpotts@netscape.com, sr=darin@netscape.com
git-svn-id: svn://10.0.0.236/trunk@122522 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 01:47:11 +00:00
bbaetz%student.usyd.edu.au
98594a649b Bug 145702 - query.cgi doesn't always ConnectToDatabase() early enough
r=justdave, preed


git-svn-id: svn://10.0.0.236/trunk@122521 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-03 01:42:15 +00:00
justdave%syndicomm.com
b758fd6576 Fix for bug 147476: the affect of changing your dot/webdot preferences on your web server's accessibility option (.htaccess
for Apache) is now mentioned in the parameter description.
Patch by Jouni Heikniemi (jouni@heikniemi.net)
r= bbaetz, afranke


git-svn-id: svn://10.0.0.236/trunk@122518 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-02 20:38:27 +00:00
jaggernaut%netscape.com
790caa6b77 Bug 137005: Change wording of "File as group" to "Bookmark this group of tabs". r=bryner, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@122513 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-02 19:14:42 +00:00
justdave%syndicomm.com
f50647a44c Fix for bug 143108: comment change in localconfig to eliminate incorrect statement that your permissions won't get touched if
$webservergroup is empty.
r= jouni, MattyT


git-svn-id: svn://10.0.0.236/trunk@122511 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-02 17:25:14 +00:00
ben%netscape.com
de1dc32f3b Ensure that correct Bookmarks context menu items are enabled when certain types of element are selected. Hook up 'Open in New Window' for Bookmark Groups
git-svn-id: svn://10.0.0.236/trunk@122510 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-02 10:51:02 +00:00
ben%netscape.com
1a9df5a049 Hook up bookmarks context menu items for the sidebar view. The behaviour is a little broken in that you need to actually have selected something before any of these work, but it was like that before I touched it, and we can fix that. I'm just hooking up functionality. More specifically:
- Delete
- Open in New Window
- Open in New Tab
- New Folde


git-svn-id: svn://10.0.0.236/trunk@122509 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-02 08:28:10 +00:00
stephend%netscape.com
9322ecd365 Bug 140132. White line on the bottom border of the progressmeter in classic. r=Small Hands <kerz@netscape.com>, sr=Ben Goodger <ben@netscape.com>
git-svn-id: svn://10.0.0.236/trunk@122508 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-02 07:33:06 +00:00
bryner%netscape.com
7e8230a2e9 Removing obsolete files (old imagelib cruft). r=pavlov, not part of the build.
git-svn-id: svn://10.0.0.236/trunk@122507 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-02 06:01:26 +00:00
cltbld%netscape.com
19d0236976 Build chimera on macosx/darwin.
git-svn-id: svn://10.0.0.236/trunk@122506 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-02 03:15:14 +00:00
bryner%netscape.com
673702591a Allow Darwin to override the timezone with a local setting, since POSIX::strftime seems to have issues. r=timeless.
git-svn-id: svn://10.0.0.236/trunk@122505 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-01 23:16:24 +00:00
edburns%acm.org
dca1ac3c28 Patch contributed by Michal Ceresna and verified by John Marmion.
This patch makes the webclient trunk work with the MOZILLA_0_9_9_BRANCH
on linux.


git-svn-id: svn://10.0.0.236/trunk@122500 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-01 19:11:44 +00:00
ian%hixie.ch
b1e8ad1cac Download manager pref panel. b=132440, r=ben, sr=blake
git-svn-id: svn://10.0.0.236/trunk@122492 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-01 13:13:41 +00:00
preed%sigkill.com
4be6720d1d Bug 147486 - Fixes cross site scripting issues; first checked in on the 2.14.1 branch, but I forgot the 2.16 branch/trunk (thanks bbaetz); patch=preed, r=bbaetz,myk
git-svn-id: svn://10.0.0.236/trunk@122486 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-01 09:26:25 +00:00
mcafee%netscape.com
155d2b611c minor printf change
git-svn-id: svn://10.0.0.236/trunk@122484 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-01 08:00:14 +00:00
mcafee%netscape.com
5c7cdaf757 removing printf
git-svn-id: svn://10.0.0.236/trunk@122482 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-01 07:33:53 +00:00
mcafee%netscape.com
d972724220 Print out meta.dot dep tree as part of build.
git-svn-id: svn://10.0.0.236/trunk@122481 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-01 07:30:35 +00:00
mcafee%netscape.com
91cd3be265 Adding --skip-list option
git-svn-id: svn://10.0.0.236/trunk@122480 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-01 07:29:53 +00:00
mcafee%netscape.com
4a7949a501 Cleaned up list-only option logic. Added --skip-tree, --skip-dep-map print options.
git-svn-id: svn://10.0.0.236/trunk@122479 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-01 06:53:20 +00:00
bryner%netscape.com
d29ebeedfb Turning debugging symbols back off by default.
git-svn-id: svn://10.0.0.236/trunk@122478 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-01 06:10:50 +00:00
wtc%netscape.com
b132bf75bb Backed out the previous checkin, which is not being used and triggers
a bug in gmake 3.76.1 with MKS shell on Windows.


git-svn-id: svn://10.0.0.236/trunk@122477 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-01 04:31:44 +00:00
wtc%netscape.com
c0b5d9745f Use $(DLL_SUFFIX) instead of ${DLL_SUFFIX}.
git-svn-id: svn://10.0.0.236/trunk@122476 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-01 04:25:38 +00:00
bbaetz%student.usyd.edu.au
1945c01df8 Bug 148363 - minor html glitch on the enter_bug template
patch by jouni@heikniemi.net (Jouni Heikniemi), r=myk x2


git-svn-id: svn://10.0.0.236/trunk@122472 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-01 02:28:58 +00:00
serge%netscape.com
29be954fa3 fixing bustage checking in missing file bug #44160
git-svn-id: svn://10.0.0.236/trunk@122470 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-01 01:41:07 +00:00
jst%netscape.com
cd8c0a0283 Attempting to fix bug 138900. Avoid multiple calls to LoadSrc() in iframe elements while the document is being built. This should speed up pageloads for pages with iframes on them. r=jkeiser@netscape.com, sr=jaggernaut@netscape.com
git-svn-id: svn://10.0.0.236/trunk@122469 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-01 01:15:57 +00:00
morse%netscape.com
121b6eb0b7 bug 148213, flush cookies to disk after a remove-all-cookies, r=pinkerton, sr=beard
git-svn-id: svn://10.0.0.236/trunk@122468 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-01 01:11:34 +00:00
katakai%japan.sun.com
415ce592a5 bug 146287
Solaris specific mime names are not supported in Mozilla/Netscape Mail
Added some lines for chinese and TIS-620 for iso8859-11
r=ftang, sr=alecf, a=rjesup@wgate.com


git-svn-id: svn://10.0.0.236/trunk@122467 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-01 01:01:08 +00:00
serge%netscape.com
4f75363dc8 fix #44196 improperly parented modal dialog in nsPluginHostImpl.cpp, r=av, sr=beard
git-svn-id: svn://10.0.0.236/trunk@122466 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-01 00:56:38 +00:00
danm%netscape.com
0d4e89ab00 reverting part of rev 1.54 that caused a regression. code=jrgm r=jag,me
git-svn-id: svn://10.0.0.236/trunk@122465 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-01 00:49:46 +00:00
nicolson%netscape.com
ed427ced18 Fix 147794: PK11_ImportDERPrivateKeyInfoAndReturnKey frees the private key incorrectly.
git-svn-id: svn://10.0.0.236/trunk@122464 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-01 00:43:46 +00:00
rangansen%netscape.com
d092b189e7 Fix to ensure change password on db is commited - using rv == SECSuccess would actually abort it.
r = wtc


git-svn-id: svn://10.0.0.236/trunk@122461 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-01 00:37:00 +00:00
danm%netscape.com
f4f4bed53e scrollbar visibility is no longer reflected in mChromeFlags. bug 130174 r=bryner,jag,jst
git-svn-id: svn://10.0.0.236/trunk@122457 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-01 00:00:12 +00:00
beard%netscape.com
d58e517145 Fix some file references.
git-svn-id: svn://10.0.0.236/trunk@122455 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 22:58:10 +00:00
dougt%netscape.com
d3ccad6010 beard tells me that I need a class after friend - fixing mac bustage.
git-svn-id: svn://10.0.0.236/trunk@122449 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 22:03:38 +00:00
beard%netscape.com
426342b11c [not part of build] In mach-o plugin, don't do anything special with file: URLs
git-svn-id: svn://10.0.0.236/trunk@122446 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 21:17:02 +00:00
darin%netscape.com
58075ac77b fixes bug 145382 "cleanup 'HTTP Networking' prefs panel"
r=gagan sr=rpotts ue=mcarlson


git-svn-id: svn://10.0.0.236/trunk@122445 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 21:16:18 +00:00
dougt%netscape.com
569cf91012 this file should not have been checked in
git-svn-id: svn://10.0.0.236/trunk@122442 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 21:05:57 +00:00
bnesse%netscape.com
6875060a29 Fix for bug 148191. Remove now obsolete references to 'session-logout'. r=morse, sr= alecf.
git-svn-id: svn://10.0.0.236/trunk@122439 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 20:55:21 +00:00
dougt%netscape.com
eaad2f24e1 fixes crash in js_FreeStack caused by a race condition in necko. see 139556 for the details. r=rpotts, sr=darin
git-svn-id: svn://10.0.0.236/trunk@122438 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 20:40:11 +00:00
despotdaemon%netscape.com
420e948391 Pseudo-automatic update of changes made by hyatt@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@122437 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 20:27:29 +00:00
nhotta%netscape.com
42e8e1c328 Changed strcpy to strncpy to protect the buffer,
bug 145370, r=ducarroz, sr=bienvenu.


git-svn-id: svn://10.0.0.236/trunk@122434 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 19:41:45 +00:00
hwaara%chello.se
f294906d35 #122640, implement the ability to ignore/watch single messages (before they eventually become threads).
r=sspitzer, sr=hewitt


git-svn-id: svn://10.0.0.236/trunk@122433 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 19:08:46 +00:00
caillon%returnzero.com
aa9ec54e4c Bug 143267. 'Tools' > 'Download Manager' doesn't bring focus to the Download Manager if it is already open. r=sgehani, sr=blake
git-svn-id: svn://10.0.0.236/trunk@122432 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 18:50:31 +00:00
mkaply%us.ibm.com
d213103e86 #146252
r=mkaply, sr=blizzard
OS/2 only - Print Preview cleanup


git-svn-id: svn://10.0.0.236/trunk@122431 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 18:48:25 +00:00
ducarroz%netscape.com
5d8a5ea68e Fix for bug 97055. Add an option for disabling remote images in mailnews. R=bhuvan, SR=alecf
git-svn-id: svn://10.0.0.236/trunk@122430 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 18:43:23 +00:00
ducarroz%netscape.com
ecb82f94ae Fix for bug 97055. Add an option for disabling remote images in mailnews. R=morse, SR=alecf
git-svn-id: svn://10.0.0.236/trunk@122429 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 18:40:39 +00:00
pinkerton%netscape.com
2a651f59bb Adding support for tooltips from the content area
git-svn-id: svn://10.0.0.236/trunk@122428 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 18:26:57 +00:00
pinkerton%netscape.com
c5e3e718ed Cleaning up unused and misnamed classes in nibs
git-svn-id: svn://10.0.0.236/trunk@122427 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 17:25:18 +00:00
pinkerton%netscape.com
4290f5b5f0 Cleanup, and renaming clear history button
git-svn-id: svn://10.0.0.236/trunk@122426 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 15:13:27 +00:00
pinkerton%netscape.com
1f856aad23 Updating some class/method names, adding "clear global history" button
git-svn-id: svn://10.0.0.236/trunk@122425 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 15:08:45 +00:00
karnaze%netscape.com
fb3fcd3efb new regression tests, not affecting the build.
git-svn-id: svn://10.0.0.236/trunk@122423 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 14:53:34 +00:00
wtc%netscape.com
018fc5a795 Bug 92516: _MD_gethostname returns the host's IP address on Mac so the
code that converts the fully qualified hostname to the unqualified hostname
is invalid for Mac.  Thanks to Roger D <rogerd@netscape.com> for the fix.
Modified Files: _macos.h prsystem.c


git-svn-id: svn://10.0.0.236/trunk@122422 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 14:45:44 +00:00
karnaze%netscape.com
fbaf4d843a bug 144024 - Don't store first in flow row groups and rows in map border iterator. Use row group of first in flow row group when accessing offset for borders. sr=attinasi, r=alexsavulov
git-svn-id: svn://10.0.0.236/trunk@122421 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 14:40:51 +00:00
karnaze%netscape.com
bbd8189ddf bug 1458423 - don't repeat a thead or tbody that is continued. sr=attinasi, r=alexsavulov.
git-svn-id: svn://10.0.0.236/trunk@122419 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 14:32:38 +00:00
dbradley%netscape.com
60796a3343 Fixes XPCONNECT_STANDALONE bustage - see bug 121438 for details
git-svn-id: svn://10.0.0.236/trunk@122418 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 13:51:08 +00:00
ben%netscape.com
c006e6c2ff [NOT PART OF BUILD]
remove rogue project entry in solution file


git-svn-id: svn://10.0.0.236/trunk@122416 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 09:36:56 +00:00
dprice%netscape.com
302df74bf7 77443 r=ssu sr=dveditz
Compare version works properly on the mac


git-svn-id: svn://10.0.0.236/trunk@122415 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 09:23:29 +00:00
dprice%netscape.com
983543dd55 117263 r=sgehani sr=dveditz
Wrong "Host" HTTP header in install through proxy


git-svn-id: svn://10.0.0.236/trunk@122414 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 09:21:48 +00:00
dprice%netscape.com
038e706b57 146668 r=curt sr=dveditz
document supersede in config.it


git-svn-id: svn://10.0.0.236/trunk@122413 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 09:17:08 +00:00
dprice%netscape.com
af49f8e133 146668 r=curt sr=dveditz
finish supersede functionality in windows installer


git-svn-id: svn://10.0.0.236/trunk@122412 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 09:15:54 +00:00
timeless%mac.com
22bfbf8d90 back out this morning's mess, it caused crashes at startup on unix (not mac or win .. oddly enough)
#0  0x4197db8e in nsPluginHostImpl::~nsPluginHostImpl (this=0x81beca0, __in_chrg=3)
    at mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp:2630
#1  0x4197dd61 in nsPluginHostImpl::Release (this=0x81beca0)
    at mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp:2639
#2  0x4015a878 in nsObserverList::AddObserver (this=0x81bed08, anObserver=0x81becb0, ownsWeak=1)
    at ../../dist/include/xpcom/nsCOMPtr.h:490
#3  0x4015b7da in nsObserverService::AddObserver (this=0x80f1678,
    anObserver=0x81becb0, aTopic=0x419a2b73 "quit-application", ownsWeak=1)
    at mozilla/xpcom/ds/nsObserverService.cpp:163


git-svn-id: svn://10.0.0.236/trunk@122411 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 08:05:14 +00:00
timeless%mac.com
3eb9c1c912 bustage, sorry,
it's nsISupportsWeakReference, not nsIWeakReference
and we didn't want to touch nsPluginCacheListener which is what caused the original confusion


git-svn-id: svn://10.0.0.236/trunk@122408 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 06:15:05 +00:00
timeless%mac.com
3908d42e0b whoops bustage, you need to up the IMPL_ count when you implement a new interface
git-svn-id: svn://10.0.0.236/trunk@122407 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 05:48:09 +00:00
timeless%mac.com
9b9dc6b8cb Bug 107485 nsPluginHostImpl's shutdown listener should be a weak reference
patch by adu@sparc.spb.su r=dougt sr=darin


git-svn-id: svn://10.0.0.236/trunk@122406 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 05:14:00 +00:00
cotter%netscape.com
15fe936d2c ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; privacy & security updates per legal & engineering reviews
git-svn-id: svn://10.0.0.236/trunk@122405 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 05:03:11 +00:00
timeless%mac.com
63888ea623 Bug 100846 turbo: should get back on system tray after explorer.exe crash
patch by netdemonz@yahoo.com r=biesi sr=jag


git-svn-id: svn://10.0.0.236/trunk@122404 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 04:31:27 +00:00
mscott%netscape.com
901cf1d5a5 Drop in the new biff icon from the UI group.
rs=sspitzer


git-svn-id: svn://10.0.0.236/trunk@122403 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 03:59:14 +00:00
roc+%cs.cmu.edu
614583e822 Bug 50623. Don't forget background styles inherited from the initial context. This has the effect of making FRAME/IFRAME documents transparent by default. Also, make FRAME/IFRAME elements paint any background styles set on them. r=dbaron,sr=waterson
git-svn-id: svn://10.0.0.236/trunk@122398 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 03:20:23 +00:00
cavin%netscape.com
8f172d4096 Fix for 145150. Map "Content-Type: application/ms-tnef" to "Content-Type: text/plain" so the body text can be displayed normally (instead of in an attachment). r=ducarroz, sr=bienvenu.
git-svn-id: svn://10.0.0.236/trunk@122396 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 02:24:28 +00:00
cavin%netscape.com
790a46bb5c Fix for 70374. Use the right date format for the "From " line (ie, "From - Mon Jan 1 00:00:00 1965"). r=ducarroz, sr=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@122395 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 02:20:45 +00:00
seawood%netscape.com
ef78f2bb05 Add --disable-installer configure option for embedding purposes.
Bug #145343 r=mcafee


git-svn-id: svn://10.0.0.236/trunk@122391 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-31 00:39:07 +00:00
oeschger%netscape.com
1462713cdf adding help context ids to pref window, bug=129540, attachment 83972, r=bhuvan, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@122389 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 23:43:13 +00:00
oeschger%netscape.com
59c038e26c get default topic when context is not found (from help button), bug 145331, r=oeschger on pwilson@gorge.net's patch, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@122387 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 23:39:17 +00:00
pinkerton%netscape.com
b4b25bd669 Removing search panel
git-svn-id: svn://10.0.0.236/trunk@122384 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 23:12:58 +00:00
timeless%mac.com
4f3a63e507 Bug 134724 nsIOService::~nsIOService => nsIOService::SetOffline Getting service @mozilla.org/observer-service;1 on shutdown. [@nsThreadPool::Shutdown]
r=dougt sr=darin


git-svn-id: svn://10.0.0.236/trunk@122382 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 23:11:49 +00:00
leaf%mozilla.org
cb433052ff cleanup the hack
git-svn-id: svn://10.0.0.236/trunk@122375 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 23:00:04 +00:00
beard%netscape.com
e328978c43 [not part of build] MRJPlugin Carbon 1.0 release changes.
git-svn-id: svn://10.0.0.236/trunk@122369 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 22:56:21 +00:00
leaf%mozilla.org
b043c8daba trick who.cgi into passing the branchtype=regexp parameter to bonsai
git-svn-id: svn://10.0.0.236/trunk@122367 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 22:33:53 +00:00
peterlubczynski%netscape.com
f217155ede Fixing bug 134445, OBJECT tag needs to be able to access default plugin r=av sr=beard
git-svn-id: svn://10.0.0.236/trunk@122365 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 22:31:27 +00:00
srilatha%netscape.com
faaa2e6676 Fix for bug # 144508. Crashes importing mail from outlook.
patch given by ducarroz
r=varada, sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@122364 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 22:22:45 +00:00
timeless%mac.com
486055f4eb Bug 145350 Implement handling of canDrop and onDragEnter methods in drag and drop observers
patch=pierrechanial@netscape.net, r=timeless, sr=ben


git-svn-id: svn://10.0.0.236/trunk@122360 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 22:04:25 +00:00
timeless%mac.com
c92833f0d7 Bug 139605 Bookmark manager should not be "Bookmark for default" when #profile=1 and profile name is not "default"
patch=pierrechanial@netscape.net, r=biesi, sr=ben


git-svn-id: svn://10.0.0.236/trunk@122359 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 22:03:51 +00:00
timeless%mac.com
5e0dc42151 Bug 139471 Rewrite of the personal toolbar drag and drop observer patch=pierrechanial@netscape.net, r=timeless, sr=ben
(maybe you should increment the version number to 2.1)


git-svn-id: svn://10.0.0.236/trunk@122358 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 22:01:13 +00:00
timeless%mac.com
64c254f530 bug 137119 fix various insertion problems in bookmark trees
patch=pierrechanial@netscape.net, r=timeless, sr=ben


git-svn-id: svn://10.0.0.236/trunk@122356 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 21:58:45 +00:00
pinkerton%netscape.com
2bd78b3c4e Add Navigation pref panel.
git-svn-id: svn://10.0.0.236/trunk@122355 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 21:57:25 +00:00
pinkerton%netscape.com
fab5fd2009 First checkin
git-svn-id: svn://10.0.0.236/trunk@122354 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 21:56:11 +00:00
mkaply%us.ibm.com
ae54d3c170 #146252
r=mkaply, sr=blizzard
OS/2 only - Print Preview cleanup


git-svn-id: svn://10.0.0.236/trunk@122353 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 21:55:49 +00:00
pinkerton%netscape.com
a224ef2049 first checkin
git-svn-id: svn://10.0.0.236/trunk@122352 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 21:55:42 +00:00
depstein%netscape.com
94af771576 removed session-logout from observers, per bug 148189.
a=asa for QA checkins that are not part of the default builds


git-svn-id: svn://10.0.0.236/trunk@122351 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 21:54:32 +00:00
mkaply%us.ibm.com
43a14861d8 #148128
r=pedemont, sr=blizzard
OS/2 only - add prefs to set default telnet params


git-svn-id: svn://10.0.0.236/trunk@122348 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 21:46:58 +00:00
mkaply%us.ibm.com
271673dd33 #148124
r=pedemont, sr=blizzard
OS/2 only - support for custom splashscreen - same as Win - thanks to Bjorn Anderson for the sample code


git-svn-id: svn://10.0.0.236/trunk@122347 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 21:45:24 +00:00
mkaply%us.ibm.com
805b6b9d76 #148123
r=pedemont, sr=blizzard
OS/2 only - don't write an extra NULL char to URL objects


git-svn-id: svn://10.0.0.236/trunk@122344 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 21:34:33 +00:00
dougt%netscape.com
4269356169 support for OS2 XPCOM_DEBUG_BREAK env. r=dougt, sr=jband, patch by mkaply, b=148127
git-svn-id: svn://10.0.0.236/trunk@122343 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 21:27:53 +00:00
leaf%mozilla.org
d358a0a5f7 who menu still isn't getting branchtyp passed to it, trying another assignment
operation.


git-svn-id: svn://10.0.0.236/trunk@122342 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 21:23:37 +00:00
pinkerton%netscape.com
1ddeea5df5 clean up packaging warnings so real errors are easier to see. r=ccarlen/sr=beard/a=valeski. bug# 142556
git-svn-id: svn://10.0.0.236/trunk@122341 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 20:54:40 +00:00
dkl%redhat.com
0122066b4e Fix for bug 148157 - Bad sorting in describecomponents.cgi, patch by David Lawrence <dkl@redhat.com> r=jouni@heikniemi.net,myk@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@122332 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 19:54:55 +00:00
pinkerton%netscape.com
5b5427955e Updated nibs for new classnames. Made Privacy pane set prefs as soon
as you click the control, not only when the panel goes away.


git-svn-id: svn://10.0.0.236/trunk@122329 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 19:12:35 +00:00
leaf%mozilla.org
a270122e87 how about i send the variable i just modified to who.cgi, so it will do some good?
git-svn-id: svn://10.0.0.236/trunk@122328 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 18:19:26 +00:00
leaf%mozilla.org
a6ef5d919a extend hack to the who.cgi call so we can get "last checkin" queries working
git-svn-id: svn://10.0.0.236/trunk@122327 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 18:16:08 +00:00
tara%tequilarista.org
a95aac4dd5 Checking Myk's fix for bug #146244
git-svn-id: svn://10.0.0.236/trunk@122326 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 15:03:30 +00:00
pinkerton%netscape.com
9facdcf1e6 Make pref panel respect UI guidelines
git-svn-id: svn://10.0.0.236/trunk@122325 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 14:55:10 +00:00
bienvenu%netscape.com
e2fb1ccfa5 add code to sync msg hdr flags with newsrc flags, r=cavin, sr=sspitzer original patch by ayn2@cornell.edu 64476
git-svn-id: svn://10.0.0.236/trunk@122323 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 14:27:49 +00:00
bienvenu%netscape.com
8f6b3f45c6 part of fix for unread counts getting wrong in news threads 64476 r/sr =sspitzer
git-svn-id: svn://10.0.0.236/trunk@122322 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 14:25:05 +00:00
tara%tequilarista.org
963d88aa42 Checking in Myk's fix for bug #142317
git-svn-id: svn://10.0.0.236/trunk@122321 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 13:55:10 +00:00
nboyd%atg.com
6e25529d4a Fix bug found by felix.meschberger@day.com:
given the following object :

----------------------------------------------
function SomeObject() {}
SomeObject.prototype.exec = function() {
  var local = this.someField;
}
----------------------------------------------

i create an 'instance', set a field and call the exec method :

----------------------------------------------
var someField = "global field value";
var anInstance = new SomeObject();
anInstance.someField = "instance field value";
anInstance.exec();
----------------------------------------------

then the local variable 'local' in the exec() method is assigned the value
of the global 'someField' variable instead of the instance field value.

the problem seems to be in the ScriptRuntime.callOrNewSpecial() method,
which is called, because the parser treats the name 'exec' specially. in
this method the exec() method gets called with

   return call(cx, fun, thisArg, args, scope);

where the 'thisArg' parameter really is the global this value instead of
the dynamic this value, which is in the jsThis variable and which would be
the one needed...

is it legitimate to replace the above call in callOrNewSpecial() with the
following line :

   return call(cx, fun, jsThis, args, scope);

this seems to only happen for methods named 'exec', which are identified as
special in the NodeTransformer.isSpecialCallName() method.

any help is appreciated. thank you very much for your time.

kind regards,
felix


git-svn-id: svn://10.0.0.236/trunk@122320 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 13:41:16 +00:00
mikep%oeone.com
bd89da6c14 Fixing bug 148071 and updating the date / time stamp.
git-svn-id: svn://10.0.0.236/trunk@122319 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 13:31:05 +00:00
brendan%mozilla.org
859af084f0 Back out troublesome parts of patch for 130544 (147997, r/sr=me).
git-svn-id: svn://10.0.0.236/trunk@122318 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 07:15:01 +00:00
kaie%netscape.com
4fc8c979f9 b=138479 Disable Security tab in View Frame Info
r=javi sr=jag


git-svn-id: svn://10.0.0.236/trunk@122317 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 04:56:16 +00:00
timeless%mac.com
308c6661ba Bug 144837 bonsai file display always shows trunk revision
r=tara


git-svn-id: svn://10.0.0.236/trunk@122316 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 04:45:11 +00:00
sgehani%netscape.com
f93d1b547a Flush control socket when we first establish a connection with an
ftp server (large welcome messages can be ignored safely).
b=145776; r=ssu; sr=dveditz


git-svn-id: svn://10.0.0.236/trunk@122315 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 03:54:12 +00:00
shanjian%netscape.com
5146a834fb #148026 We should return error when default locale is used for unix platform charset
Replace error return code by success return code for unix platform charset getter.
r=bryner, sr=darin


git-svn-id: svn://10.0.0.236/trunk@122314 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 03:23:38 +00:00
leaf%mozilla.org
f05399f127 set branchtype to regexp if there are regexp-indicative characters in
the branchname


git-svn-id: svn://10.0.0.236/trunk@122313 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 03:11:59 +00:00
wtc%netscape.com
54676a22cc This is a test. I changed Revision and Date to bogus values and want to
see what actually got checked in.


git-svn-id: svn://10.0.0.236/trunk@122312 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 02:08:07 +00:00
roc+%cs.cmu.edu
03697b0f3a Bug 141900. Ensure that SetViewChildClip respects nsIClipView clipping. r=kmcclusk,sr=waterson
git-svn-id: svn://10.0.0.236/trunk@122311 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 01:59:57 +00:00
shliang%netscape.com
e8de478bf5 123687 - ui for adding ldap directory to addressbook - r=sspitzer, sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@122310 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 01:52:33 +00:00
myk%mozilla.org
ff9f55ad96 Fix for bug 148011: Move pseudo-method definitions together.
Patch by Myk Melez <myk@mozilla.org>.
2xr=justdave


git-svn-id: svn://10.0.0.236/trunk@122309 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 01:44:33 +00:00
roc+%cs.cmu.edu
d6109426ba Bug 136441. Don't let floating views get clipped by non-floating parents. r=kmcclusk,sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@122308 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 01:42:41 +00:00
shliang%netscape.com
da23c2e99a 147662 - adding option to remove free web mail in account manager - r=sspitzer, sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@122307 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 01:12:40 +00:00
depstein%netscape.com
feb7b283b1 some code cleanup. more test coverage for uri loads and reloads.
a=asa for QA checkins that are not part of the default builds


git-svn-id: svn://10.0.0.236/trunk@122306 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 01:11:53 +00:00
dp%netscape.com
43963340a9 bug 146537 Ftp moved from using 64k segment sizes to 4k r=bbaetz
sr=darin


git-svn-id: svn://10.0.0.236/trunk@122305 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 01:10:06 +00:00
shliang%netscape.com
892ac503e5 133402 - selected addressbook cards in sidebar do not prefill msg compose - r=sspitzer, sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@122304 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 01:08:13 +00:00
andreww%netscape.com
c9354336c5 bugzilla 89144 - Need keyboard access to "Tabs" menu in sidebar - r=aaronl,sgehani, sr=sspitzer,hewitt
git-svn-id: svn://10.0.0.236/trunk@122303 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 00:54:27 +00:00
glen.beasley%sun.com
8f9fb27400 for release eng to build multiple platforms
git-svn-id: svn://10.0.0.236/trunk@122302 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 00:47:18 +00:00
serge%netscape.com
e55c1e8c3d fix for 147256, Crash in nsDocShell::GetRootScrollableView, r=av, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@122301 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 00:46:12 +00:00
cavin%netscape.com
661fee64f8 Fix for 134014. Correct the mapping table to match the addrbook api calls. R=ducarroz, sr=bienvenu.
git-svn-id: svn://10.0.0.236/trunk@122300 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 00:43:38 +00:00
wtc%netscape.com
6f4b5cb4a7 Import NSPR 4.2 and DBM 1.61.
git-svn-id: svn://10.0.0.236/trunk@122299 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-30 00:36:48 +00:00
beard%netscape.com
75982dd3a9 [not part of build] Removed extraneous printf's.
git-svn-id: svn://10.0.0.236/trunk@122298 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 23:49:13 +00:00
leaf%mozilla.org
bfdfa6ecf5 hack to do bonsai branchtype=regexp queries if +, *, or ? is in the branch name, first part of bug 147948.
git-svn-id: svn://10.0.0.236/trunk@122297 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 23:41:44 +00:00
jaggernaut%netscape.com
5fcde94961 Bug 123563: Select the tab to the right when closing the active one. r=caillon, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@122296 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 23:22:42 +00:00
danm%netscape.com
0b5ceb9949 disable window size persistence before chrome is loaded. bug 116610 r=bryner,jag
git-svn-id: svn://10.0.0.236/trunk@122295 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 23:21:35 +00:00
danm%netscape.com
41b8d37fa7 persist min/max state only if normal or maximized. bug 72558 r=bryner,jag
git-svn-id: svn://10.0.0.236/trunk@122294 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 23:19:07 +00:00
jaggernaut%netscape.com
bd8eed92ac Bug 101955: middle-click -> open in new window fails for urls in mail/news, the better fix. r=caillon, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@122293 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 23:17:47 +00:00
seawood%netscape.com
d9186973fd Provide pkgconfig files.
Thanks to Chris Blizzard <blizzard@mozilla.org> for the patch.
Bug #134204 r=cls


git-svn-id: svn://10.0.0.236/trunk@122291 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 22:14:08 +00:00
nicolson%netscape.com
42d9d96233 Fix bug 112330: CryptoToken.changePassword(new ConsolePasswordCallback(), new ConsolePasswordCallback()) throws Native Exception.
We were zeroing the password after freeing it, which in some cases caused
memory corruption and crashing.


git-svn-id: svn://10.0.0.236/trunk@122288 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 21:54:14 +00:00
hewitt%netscape.com
b270f7600f backing out file checked in by accident
git-svn-id: svn://10.0.0.236/trunk@122285 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 21:45:40 +00:00
hewitt%netscape.com
fd4d0c989c crop really long page titles in Go menu
git-svn-id: svn://10.0.0.236/trunk@122282 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 21:41:54 +00:00
bienvenu%netscape.com
daae27a92f fix threading by subject r=cavin, sr=sspitzer 140613
git-svn-id: svn://10.0.0.236/trunk@122281 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 21:02:58 +00:00
hewitt%netscape.com
2b5b989cc5 137057 - tabbrowser tab strip grows when closing 2nd to last tab, r=sgehani, sr=jag
git-svn-id: svn://10.0.0.236/trunk@122280 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 21:02:29 +00:00
bienvenu%netscape.com
7ebf49f228 fix required by fix for threading by subject r=cavin, sr=sspitzer 140613
git-svn-id: svn://10.0.0.236/trunk@122279 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 21:02:09 +00:00
bienvenu%netscape.com
c20a657848 fix problem starting up with missing INBOX.msf for imap r=ere@atp.fi, sr=sspitzer 147896
git-svn-id: svn://10.0.0.236/trunk@122278 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 20:58:35 +00:00
hewitt%netscape.com
78627302c8 119770 - bad images for autocomplete pref window, patch=walk84@yahoo.com, r=shliang, sr=me
git-svn-id: svn://10.0.0.236/trunk@122277 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 20:58:34 +00:00
pinkerton%netscape.com
f3a6258360 Add sheet to rename bookmarks since inline editing doesn't work too well
with attributed strings. Cleaned up some unused outlets. Added a cancel
button to the location sheet. bugs 145819, 147721.


git-svn-id: svn://10.0.0.236/trunk@122276 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 20:42:54 +00:00
hwaara%chello.se
6bbfe0697a #147448, optimize mailnews' modern theme for better performance.
r=varga, sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@122275 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 20:15:49 +00:00
smontagu%netscape.com
e61e87ebaa Fix for bug 147183: Text shown inside JavaScript under title in IOL.co.il is aligned LTR rather than RTL. r=hixie, sr=jst
git-svn-id: svn://10.0.0.236/trunk@122274 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 19:42:07 +00:00
jst%netscape.com
f062933ad6 Removing duplicate #include...
git-svn-id: svn://10.0.0.236/trunk@122270 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 19:15:50 +00:00
bernd.mielke%snafu.de
886ec4bd2d removal of debug cruft bug 146474 r=karnaze sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@122269 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 18:55:34 +00:00
serge%netscape.com
aa2473dda9 fix #146328 PluginViewerImpl::Init(nsIWidget* aParentWidget ==> check out this parameter, a=av/peterl, sr=beard
git-svn-id: svn://10.0.0.236/trunk@122268 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 18:21:58 +00:00
ian.mcgreer%sun.com
88f990cef8 bug 136701, certutil should use PK11_ListCerts
git-svn-id: svn://10.0.0.236/trunk@122266 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 18:19:33 +00:00
brendan%mozilla.org
358ed6261c Clean up nsICollection/nsSupportsArray {Append,Remove}Element return type (130544, r=dougt, sr=bienvenu).
git-svn-id: svn://10.0.0.236/trunk@122264 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 18:08:37 +00:00
bnesse%netscape.com
907a0675c6 Fix for bug 98476. Add safe saving support to preferences. r=alecf, sr=jag.
git-svn-id: svn://10.0.0.236/trunk@122263 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 18:04:41 +00:00
jst%netscape.com
4e62966c87 Fixing one more part of bug 52334. Make onload handlers fire on hidden iframes. r=axel@pike.org, sr=vidur@netscape.com
git-svn-id: svn://10.0.0.236/trunk@122262 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 17:56:50 +00:00
pinkerton%netscape.com
8422c4dcf1 fix problem where resizing window would cause jiggling. the workaround we put in for os9 seems to no longer be needed and gives osx fits. patch from lws@mac.com. r=pink/rs=blake. bug#86740
git-svn-id: svn://10.0.0.236/trunk@122261 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 14:46:23 +00:00
pinkerton%netscape.com
d828c50b5e Updated icon from Ugo.
git-svn-id: svn://10.0.0.236/trunk@122260 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 14:26:45 +00:00
pinkerton%netscape.com
51d371bf2b Update pref panels so exported symbols are unique. follows apple's guidelines.
git-svn-id: svn://10.0.0.236/trunk@122259 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 14:19:17 +00:00
bbaetz%student.usyd.edu.au
9b0d389a5a Bug 147272 - no background for bugzilla pages
r=justdave, preed


git-svn-id: svn://10.0.0.236/trunk@122257 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 11:43:26 +00:00
seawood%netscape.com
8c815c3701 Fix typo that was causing pthreads to be selected by default on OpenBSD even though we default to NSPR threads on that platform.
Bug #145560 r=wtc


git-svn-id: svn://10.0.0.236/trunk@122256 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 08:01:42 +00:00
gerv%gerv.net
04fcbc1487 Bug 144728 - Midair collision doubles line feeds. Patch by jouni@heikniemi.net; 2xr=justdave.
git-svn-id: svn://10.0.0.236/trunk@122255 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 07:21:44 +00:00
bryner%netscape.com
40cddb9e13 Updating version to 0.3.0, with new splash screen from ugos@mac.com.
git-svn-id: svn://10.0.0.236/trunk@122254 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 05:32:38 +00:00
bryner%netscape.com
cb2621eb80 Don't let sidebar panels take focus unless the user just selected the panel (i.e. don't focus them when a new window is opened). Bug 76621. r=blake, sr=jag.
git-svn-id: svn://10.0.0.236/trunk@122253 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 05:06:42 +00:00
kaie%netscape.com
23e1977fbe b=139561 Implement S/Mime "on demand verification" for IMAP messages
r=javi/cotter sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@122252 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 04:44:50 +00:00
kaie%netscape.com
389b3e4cb5 b=130650 In page info, "Security" tab lacks shortcut.
r=kaie sr=jag


git-svn-id: svn://10.0.0.236/trunk@122250 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 03:40:46 +00:00
kaie%netscape.com
a40052c8c4 b=110195 Master passwords steals focus in prefs
r=kaie sr=alecf


git-svn-id: svn://10.0.0.236/trunk@122249 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 03:32:04 +00:00
depstein%netscape.com
efb2134f8c added more urls with more diversity to the URLTable. Stop() now tests with all 3 flags. Modified nsIWebNav code.
a=asa for QA checkins that are not part of the default builds


git-svn-id: svn://10.0.0.236/trunk@122248 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 03:13:37 +00:00
dbaron%fas.harvard.edu
b339b0f982 Remove universalSelector atom. b=112318 sr=waterson r=brendan
git-svn-id: svn://10.0.0.236/trunk@122247 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 00:49:48 +00:00
dbaron%fas.harvard.edu
3fad646b6d Convert the 4 tables of the RuleHash from nsHashtable to pldhash. Encapsulate the differences between tables, and the quirks/strict differences within the id and class tables, in the 6 sets of hashtable ops. Remove mCaseSensitive member and related code from AtomKey and remove nsInt32Key completely. Null-terminate lists of RuleValues rather than using a special mEndValue, and build the lists in the reverse order (reversing the meaning of their index). Store universal rules in their own list rather than using magic key. b=112318 sr=waterson r=brendan
git-svn-id: svn://10.0.0.236/trunk@122246 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-29 00:49:44 +00:00
karnaze%netscape.com
39e27ba055 new regression tests, not affecting the build.
git-svn-id: svn://10.0.0.236/trunk@122241 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 23:44:53 +00:00
shrutiv%netscape.com
326317fc30 Fix for bugscape bug 13112: Restrict user agent string to ASCII characters
only (r=smeredith)


git-svn-id: svn://10.0.0.236/trunk@122240 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 23:41:56 +00:00
stephend%netscape.com
7cfaf9463f Bug 115225. 'Exit' should be 'Exit &brandShortName;' in Quick Launch's systemtray icon context-menu. r=caillon@netscape.com/sr=blaker@netscape.com
git-svn-id: svn://10.0.0.236/trunk@122239 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 23:29:53 +00:00
jst%netscape.com
e9990e8c24 Whitespace changes only, die tabs, die!
git-svn-id: svn://10.0.0.236/trunk@122237 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 22:55:39 +00:00
karnaze%netscape.com
49e0a9f4cb bug 145305 - split floaters during printing. sr=attinasi, r=alexsavulov.
git-svn-id: svn://10.0.0.236/trunk@122236 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 22:50:43 +00:00
dougt%netscape.com
c3199263f2 Allowing ftp to work against servers that use port 22, r=bradley, sr=brendan/darin, bug 147496
git-svn-id: svn://10.0.0.236/trunk@122234 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 22:06:01 +00:00
morse%netscape.com
590d77d4fc bug 115818, context menu slow to appear when images are present, c=ajfeldman@brown.edu, r=morse, sr=waterson -- this is better patch than the one in bug 146048
git-svn-id: svn://10.0.0.236/trunk@122233 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 21:42:29 +00:00
smontagu%netscape.com
9f91e7fbe7 Bug 129666: Xlib/Xprint do not scale em-dash & co. correctly. r=bstell@ix.netcom.com, sr=scc. Checking in for Roland.Mainz@informatik.med.uni-giessen.de
git-svn-id: svn://10.0.0.236/trunk@122232 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 21:40:06 +00:00
caillon%returnzero.com
b3582cba8f Bug 145528, 'Send Page' context menu item sends the frame instead of the frameset. Patch contributed by Sander <mybugzilla@juima.org>, r=bzbarsky, sr=ben.
git-svn-id: svn://10.0.0.236/trunk@122231 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 21:19:30 +00:00
pinkerton%netscape.com
ef5de72e24 backing out changes when landing privacy panel. doh!
git-svn-id: svn://10.0.0.236/trunk@122230 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 20:59:29 +00:00
sspitzer%netscape.com
85363a5e88 fix for #146046. fix several regressions to the subscribe dialog.
1)  [search view] "Subscribe" and "Unsubscribe" buttons don't work (original bug)
2)  [search and tree views] space bar doesn't do the right thing (toggle state)
3)  [tree view] double click on a row that is a container should not toggle the subscribe state

r=hwaara, sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@122229 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 20:55:38 +00:00
pinkerton%netscape.com
43d12f8473 hookup tooltips in PPEmbed. fix embedding tooltip impl to check window/dialog tag before groveling for title attribute. r=pink/sr=beard. bug# 142814.
git-svn-id: svn://10.0.0.236/trunk@122228 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 20:31:39 +00:00
blizzard%redhat.com
1358b1a9fb Bug #134204. Add files for pkg-config. Not part of the build. r=cls,hp
git-svn-id: svn://10.0.0.236/trunk@122226 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 20:20:42 +00:00
pinkerton%netscape.com
86a8863718 remove 'block images from server' and 'view only this image' context menu
items. there's no code that goes along with these.


git-svn-id: svn://10.0.0.236/trunk@122225 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 20:07:24 +00:00
pinkerton%netscape.com
38cc2ea383 Normalizing the context menus, stubbing out copy link location and
bookmark link. hooks up bookmark page.


git-svn-id: svn://10.0.0.236/trunk@122224 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 19:55:58 +00:00
pinkerton%netscape.com
a2c8c4faa4 fixing some redundant ref counting and a leak of the autocomplete data
source. r=hyatt.


git-svn-id: svn://10.0.0.236/trunk@122223 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 18:42:21 +00:00
kirk.erickson%sun.com
12c97ff0d7 Fixed OCSP typo.
git-svn-id: svn://10.0.0.236/trunk@122222 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 18:26:37 +00:00
hyatt%netscape.com
60c3fbb7a2 Fix back forward key bindings.
git-svn-id: svn://10.0.0.236/trunk@122221 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 18:22:37 +00:00
pinkerton%netscape.com
3bfdc94f78 Fix crash for 147604. should retain these icons if i'm going to hold them indefinately.
git-svn-id: svn://10.0.0.236/trunk@122220 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 16:48:48 +00:00
peterv%netscape.com
aab00646c0 Fix for bug 88761 (html code for selected and noshade (and other minimizable attributes) not w3c conformant). r=heikki, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@122219 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 12:34:48 +00:00
hewitt%netscape.com
bff765059c more autocomplete details, and icons for bookmark menus
git-svn-id: svn://10.0.0.236/trunk@122218 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 10:30:42 +00:00
hewitt%netscape.com
d5879ebb3f 145802 - session history in Go menu for Chimera, 145803 - urlbar autocomplete for chimera
git-svn-id: svn://10.0.0.236/trunk@122217 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 09:07:53 +00:00
glazman%netscape.com
da45b23bb4 Test Selection debug menu item was horked in Composer; b=146424, r=neil@parkwaycc.co.uk, sr=jst
git-svn-id: svn://10.0.0.236/trunk@122216 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 09:00:25 +00:00
kyle.yuan%sun.com
cb6d4ae8ad Bug 146315, 146499, 146828 nsIAccessible's accDoAction does not work for XUL Button/Check Box/Radio Button Element
r=aaronl, sr=jst


git-svn-id: svn://10.0.0.236/trunk@122215 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 08:55:54 +00:00
seawood%netscape.com
a3fa4c9a26 Pull client.mk and modules.mk by date when MOZ_CO_DATE is set rather than always pulling the tip version.
Thanks to Andrew Schultz <ajschult@eos.ncsu.edu> for the patch.
Bug #143165 r=leaf


git-svn-id: svn://10.0.0.236/trunk@122213 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 08:40:31 +00:00
peterv%netscape.com
1c5c407540 Fix for bug 146965 (Standalone Transformiix outputs invalid XML). r=sicking, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@122211 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 08:27:28 +00:00
peterv%netscape.com
0d15d48291 Fix for bug 146964 (Bug in format-number XSLT function). r=sicking, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@122210 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 08:16:43 +00:00
timeless%mac.com
072b2a99f7 Bugzilla Bug 147022 Crash when calling prompt() with 2 arguments [@nsACString::Last]
The theory is that the string was "" but the code only handled (char*)0 for empty strings,
The result is a crash in Last() for an empty string.
r=bzbarsky sr=jst


git-svn-id: svn://10.0.0.236/trunk@122209 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 05:35:35 +00:00
bryner%netscape.com
7bc0a4464a - Remove some unneeded gecko files from the project.
- Bump the Chimera version to 0.2.8 in the project and credits file.

Note: we no longer copy libmozz.dylib from Mozilla, you need to use --with-system-zlib.  r=hyatt.


git-svn-id: svn://10.0.0.236/trunk@122206 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 04:00:40 +00:00
despotdaemon%netscape.com
6f1842fc38 Pseudo-automatic update of changes made by hyatt@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@122205 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 03:05:08 +00:00
stephend%netscape.com
e0eb0ff0ad Bug 60639. Proliferate amount of JS strict warnings in accountmanager.js. Patch by rossi@telnet.at (email address doesn't resolve). r=racham@netscape.com, sr=shaver@mozilla.org. I'm landing this for him because a) I'm not sure he has cvs commit access b) I _so_ don't want to see this bitrot any longer.
git-svn-id: svn://10.0.0.236/trunk@122204 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 02:39:31 +00:00
bryner%netscape.com
4bc8f3b853 Getting rid of a useless printf that I forgot to remove before checking in.
git-svn-id: svn://10.0.0.236/trunk@122203 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 00:16:13 +00:00
jaggernaut%netscape.com
ec89db1a6b Bug 101955: Middle-click -> Open in new tab/window fails for Mail/News URLs, r=sdagley, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@122202 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-28 00:02:41 +00:00
blakeross%telocity.com
178e018e1d 132013 - remove from list in download manager makes program unresponsive for too long. r=hewitt sr=blake (patch by ben)
git-svn-id: svn://10.0.0.236/trunk@122198 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-27 18:11:51 +00:00
blakeross%telocity.com
56927e95fb 132013 - remove from list in download manager makes program unresponsive for too long. r=hewitt sr=blake (patch by ben)
git-svn-id: svn://10.0.0.236/trunk@122197 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-27 18:06:31 +00:00
ben%netscape.com
a4cf12cc84 remove emacs backup file hyatt accidentally checked in
git-svn-id: svn://10.0.0.236/trunk@122196 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-27 06:17:10 +00:00
khanson%netscape.com
ae857abf6a patch to speed up array.sort of strings by 40% r=brendan, sr=shaver
git-svn-id: svn://10.0.0.236/trunk@122195 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-27 05:53:57 +00:00
bryner%netscape.com
6712df4ddb Ignore generated Makefiles.
git-svn-id: svn://10.0.0.236/trunk@122194 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-27 02:12:25 +00:00
bryner%netscape.com
0417fe3a86 Ignore generated makefiles.
git-svn-id: svn://10.0.0.236/trunk@122193 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-27 02:07:35 +00:00
bryner%netscape.com
210e5754a7 Ignore generated Makefiles.
git-svn-id: svn://10.0.0.236/trunk@122192 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-27 02:03:23 +00:00
serge%netscape.com
ba68761930 fix for #145377, crash after closing acrobat plugin, r=av, sr=darin
git-svn-id: svn://10.0.0.236/trunk@122189 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-26 22:52:19 +00:00
dbaron%fas.harvard.edu
cc452efb5b Fix FindPrimaryFrameFor regression: when previous sibling is out-of-flow, start search from previous sibling's placeholder. b=145224 sr=waterson r=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@122188 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-26 17:07:07 +00:00
dbaron%fas.harvard.edu
255ee4ff0c Clear the undisplayed content map before calling SetDocument(null), which can cause some XBL content to be destroyed without notifications, leaving dangling pointers in the undisplayed map. b=145737 r=bzbarsky sr=waterson
git-svn-id: svn://10.0.0.236/trunk@122187 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-26 17:03:42 +00:00
ian%hixie.ch
400e259499 Some versions of the Net::SMTP module handle the timeout by raising a SIG ALRM, so handle this case as well. Also increase the timeout by ten seconds since in the real world, some servers are actually that slow. We might need to make this asynchronous at some point.
git-svn-id: svn://10.0.0.236/trunk@122185 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-26 15:08:48 +00:00
ian%hixie.ch
9278fe7a1b Perl 5.005_03 compatability: the precedence of the not and comma operators changed at some point, so disambiguate this usage.
git-svn-id: svn://10.0.0.236/trunk@122184 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-26 15:05:37 +00:00
ian%hixie.ch
8fb371cdfa Cache the Term::ReadLine input device. On some systems, it has to be cached, otherwise you end up trying to open too many input handles or something like that. This also means we can have session history where available.
git-svn-id: svn://10.0.0.236/trunk@122183 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-26 15:03:48 +00:00
ian%hixie.ch
cbbeb386bf Add some null checking -- if the string is undefined, then turn it into the empty string. This avoids many undefined value warnings when the data provided by the user is incomplete.
git-svn-id: svn://10.0.0.236/trunk@122182 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-26 15:02:33 +00:00
ian%hixie.ch
f641659fa9 Implemented rowsAffected(), which will return the number of database rows that were affected by the last execution of the statement associated with the results frame.
git-svn-id: svn://10.0.0.236/trunk@122181 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-26 15:00:56 +00:00
gerv%gerv.net
a7c2106ebe Backing out mistakenly-checked-in code fragment. Thanks to MattyT for pointing this out.
git-svn-id: svn://10.0.0.236/trunk@122180 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-26 07:01:53 +00:00
stephend%netscape.com
98624addbd Bug 119764. JS strict warnings in pref-themes.js. Patch by Stephen Walker <walk84@yahoo.com> r=morten@nilsen.com/sr=hewitt@netscape.com
git-svn-id: svn://10.0.0.236/trunk@122179 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-26 06:09:26 +00:00
stephend%netscape.com
1cff1902c8 Bug 51985. 'Go' button should be styled as default. Patch by Bradley Hart <bhart@cvip.net>. r=walk84/sr=jag
git-svn-id: svn://10.0.0.236/trunk@122178 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-26 06:05:19 +00:00
matty%chariot.net.au
ed9688c668 Release notes updates.
git-svn-id: svn://10.0.0.236/trunk@122177 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-26 05:34:25 +00:00
brendan%mozilla.org
ce6cc88b16 Don't emit JSOP_DEF{VAR,CONST} unless at top-level or in a heavyweight function (146596, r=jband, sr=shaver).
git-svn-id: svn://10.0.0.236/trunk@122176 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-26 00:33:23 +00:00
caillon%returnzero.com
89f0cee255 Bug 141333, Renaming 'Add to Bookmarks' to 'Bookmark This Page' in the Bookmarks menu. r=gerv, rs=jag
git-svn-id: svn://10.0.0.236/trunk@122174 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-25 19:47:37 +00:00
caillon%returnzero.com
0e5079f263 Bug 142711, adding a trailling slash to the default homepage. r=mpt, rs=jag
git-svn-id: svn://10.0.0.236/trunk@122173 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-25 19:42:12 +00:00
wtc%netscape.com
d4325142df Bug 142575: use the PRIVATE keyword for the /EXPORT linker option.
git-svn-id: svn://10.0.0.236/trunk@122171 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-25 16:00:55 +00:00
gerv%gerv.net
ff1cf6b73e Bug 145849 - Non-maintainers with ability to bless others need "users" link in footer. Patch by bugreport@peshkin.net; r=gerv, justdave.
git-svn-id: svn://10.0.0.236/trunk@122163 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-25 10:35:53 +00:00
gerv%gerv.net
c59d1dd01a Bug 146091 - Sort order for votes is ascending instead of descending. Patch by myk; 2xr=gerv.
git-svn-id: svn://10.0.0.236/trunk@122162 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-25 10:29:20 +00:00
gerv%gerv.net
90856b23af Bug 144768 - Selecting multiple products on query page causes script error in IE. Patch by jouni@heikniemi.net; r=gerv, bbaetz.
git-svn-id: svn://10.0.0.236/trunk@122161 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-25 10:15:55 +00:00
wtc%netscape.com
1298f2f97f Bug 142575: use the /EXPORT linker option on the command line.
Modified files: nssinit.c config.mk


git-svn-id: svn://10.0.0.236/trunk@122157 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-25 06:52:19 +00:00
seawood%netscape.com
f20c39a04a Applying shanjian's API change from bug 142562 to BeOS gfx files.
git-svn-id: svn://10.0.0.236/trunk@122156 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-25 03:00:45 +00:00
wtc%netscape.com
c23c0dcdd0 Bug 142575: a better fix.
git-svn-id: svn://10.0.0.236/trunk@122154 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-25 01:02:39 +00:00
rginda%netscape.com
d6482d8b53 - chatzilla only -
Bug 139334 - [RFE] SQUERY command support
patch=jbontje@suespammers.org,r=me


git-svn-id: svn://10.0.0.236/trunk@122150 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-25 00:40:00 +00:00
morse%netscape.com
3ef731e4d2 bug 146048, image context menu is slow to appear, c=tomi.leppikangus@oulu.fi, r=morse, sr=waterson
git-svn-id: svn://10.0.0.236/trunk@122147 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 23:49:33 +00:00
shanjian%netscape.com
ac24fe5f24 Fix bustage caused by my recent checkin.
git-svn-id: svn://10.0.0.236/trunk@122138 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 21:04:32 +00:00
wtc%netscape.com
f013504775 Bug 142575: added function forwarder for 'mktemp' for "bug compatibility".
git-svn-id: svn://10.0.0.236/trunk@122137 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 21:00:55 +00:00
pavlov%netscape.com
0b2049aeb6 checking in fix for topcrash bug 145147. r=bienvenu sr=mscott
git-svn-id: svn://10.0.0.236/trunk@122136 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 20:54:44 +00:00
andreww%netscape.com
30586985bd bugzilla 141281 - r=cmanske, sr=hewitt - Editor: Format Menu: same mnemonic used for two menu items
git-svn-id: svn://10.0.0.236/trunk@122135 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 20:29:37 +00:00
andreww%netscape.com
f59b0f0a0f bugzilla 111031 - need access keys [mnemonics] for QuickSearch - r=shuehan, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@122134 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 20:20:34 +00:00
pinkerton%netscape.com
b6108f7820 Updating lock icons. Also fixing test of security state for new
state bits in nsIWebProgressListener.


git-svn-id: svn://10.0.0.236/trunk@122133 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 20:13:15 +00:00
javi%netscape.com
80b6170fbc Make pkcs12.h C++ friendly.
git-svn-id: svn://10.0.0.236/trunk@122132 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 20:11:29 +00:00
shanjian%netscape.com
a9c700ad59 #142562 problem with <td align=right or align=center
We are observing langGroup in some place while ignor it in others. This patch
make all font metrics call consistent. nsIRenderingContext API is change to
make things neat.
r=rbs, sr=waterson


git-svn-id: svn://10.0.0.236/trunk@122131 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 20:11:14 +00:00
depstein%netscape.com
2f838a3f76 adding web progress test cases. some minor code cleanup.
a=asa for QA checkins that are not part of the default builds


git-svn-id: svn://10.0.0.236/trunk@122130 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 20:03:19 +00:00
ducarroz%netscape.com
ba00cca6d5 Fix for bug 141648. We need to set the focus outside the eidtable field when recycling the compose window to avoid having focus problem on Mac. R=varada, SR=bienvenu
git-svn-id: svn://10.0.0.236/trunk@122129 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 19:07:22 +00:00
hwaara%chello.se
d5ce25ebd6 #115324, more removal and optimizing of search/filters code. This time hopefully with the correct line endings too. ;-)
r=biesi, sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@122128 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 18:35:18 +00:00
hwaara%chello.se
9c2691ca76 #146230, "search progress doesn't behave like other progress"
r=biesi, sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@122127 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 18:31:28 +00:00
mkaply%us.ibm.com
68c295e2dd Fix IRIX bustage. My gosh someone horked this file. So much for blame
git-svn-id: svn://10.0.0.236/trunk@122124 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 16:17:01 +00:00
wtc%netscape.com
722d3482dd Back out the previous checkin. It broken the cmd/certcgi build.
git-svn-id: svn://10.0.0.236/trunk@122123 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 14:58:02 +00:00
hwaara%chello.se
cea50b1fdb #115324, remove unused search/filters code. sr=jst, r=naving
git-svn-id: svn://10.0.0.236/trunk@122122 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 11:11:49 +00:00
shaver%mozilla.org
b676ad258e 146210: Add Date.now to mirror JS_Now in script. r=rginda, sr=brendan.
git-svn-id: svn://10.0.0.236/trunk@122121 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 01:55:15 +00:00
javi%netscape.com
66ad65de03 Add macros to make header file C++ friendly.
git-svn-id: svn://10.0.0.236/trunk@122120 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 00:53:48 +00:00
varada%netscape.com
9f5b3b789e fix for 70540;compose window should bring up account wizard when there are no identities;r=bhuvan;sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@122119 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 00:13:40 +00:00
darin%netscape.com
4a920a09e0 fixes bug 144442 "Microsoft-IIS/4.x and Netscape-Enterprise/3.x do not support pipelining"
r=gagan sr=rpotts


git-svn-id: svn://10.0.0.236/trunk@122118 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 00:12:28 +00:00
rjesup%wgate.com
17cb5dda88 Bug 139380: correctly parse font names again. Checkin for gisburn.
r=bstell, sr=attinasi


git-svn-id: svn://10.0.0.236/trunk@122117 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-24 00:00:33 +00:00
darin%netscape.com
ad0d32a868 fixes bug 100595 "crash @nsMultiMixedConv::FindToken [was: sandiegozoo.org
- this site crashes the browser, every time]"
r=dougt sr=rpotts


git-svn-id: svn://10.0.0.236/trunk@122116 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 23:46:01 +00:00
rjesup%wgate.com
75aeac8e24 Bug 143413: symbol-fontspecific missing for Xlib/Xprint. Checkin for
gisburn.  r=pete.zha, sr=attinasi


git-svn-id: svn://10.0.0.236/trunk@122115 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 23:39:06 +00:00
morse%netscape.com
0fc77e2b10 bug 145492, sending out duplicate cookies, r=brade, sr=scc
git-svn-id: svn://10.0.0.236/trunk@122114 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 23:25:43 +00:00
bienvenu%netscape.com
6abcb1feba fix 138018 should disable delete and move for readonly folders r=naving, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@122113 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 23:13:26 +00:00
dbaron%fas.harvard.edu
36706675ec Ensure that the quirks stylesheet is enabled/disabled before we start creating frames so that we don't have to build the rule cascade twice. Remove old compatibility mode pref that only controlled a small part of what it should have. b=141261 sr=waterson r=jst
git-svn-id: svn://10.0.0.236/trunk@122112 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 23:09:31 +00:00
cavin%netscape.com
0e77f84cff Fix for 94775. Strip off trailing '/' of input realm, if present, before making comparison in si_GetURL(). r=morse, sr=bienvenu.
git-svn-id: svn://10.0.0.236/trunk@122111 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 23:04:13 +00:00
beard%netscape.com
a7e6103928 Modifications for building under mach-o with project builder.
git-svn-id: svn://10.0.0.236/trunk@122110 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 22:33:04 +00:00
beard%netscape.com
79ed9a0f65 initial checkin of mach-o plugin
git-svn-id: svn://10.0.0.236/trunk@122108 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 22:30:28 +00:00
wtc%netscape.com
a2698a2a9f Bug 142575: on Windows added mktemp (which simply calls _mktemp in the C
run-time library) to be backward compatible with the bug that mktemp was
accidentally exported from the nss3.dll in NSS 3.2.x and 3.3.x.


git-svn-id: svn://10.0.0.236/trunk@122106 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 22:28:50 +00:00
despotdaemon%netscape.com
9e85f461e0 Pseudo-automatic update of changes made by richm@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@122105 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 22:27:37 +00:00
beard%netscape.com
22b4d6af78 Consume mouseDown events.
git-svn-id: svn://10.0.0.236/trunk@122104 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 22:24:51 +00:00
despotdaemon%netscape.com
286d31b7a6 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@122103 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 22:23:15 +00:00
kirk.erickson%sun.com
a271017d01 Resolves bug 90070 (now exiting with PK12UERR_PK11GETSLOT 13).
git-svn-id: svn://10.0.0.236/trunk@122102 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 22:21:42 +00:00
despotdaemon%netscape.com
5403a2da1a Pseudo-automatic update of changes made by djani@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@122101 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 22:19:58 +00:00
caillon%returnzero.com
e35a1e74d4 Fix for bug 137334: DOM Inspecting the URL bar will crash. r=timeless, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@122100 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 22:11:29 +00:00
jfrancis%netscape.com
d370191df3 fixing 136165: crash after deleting styled text. r=cmanske sr=dveditz
git-svn-id: svn://10.0.0.236/trunk@122099 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 22:05:35 +00:00
yokoyama%netscape.com
6847633535 bug 141513
IME candidate window is displayed in wrong position
Patch is to impact only in Windows XP
with MS PinYing IME and NeiMa IME
/r=shanjian, /sr=brendan


git-svn-id: svn://10.0.0.236/trunk@122098 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 22:03:49 +00:00
smontagu%netscape.com
8e6b566ead Fix for memory leak. Bug 145153, r=mkaply, sr=waterson
git-svn-id: svn://10.0.0.236/trunk@122097 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 22:03:19 +00:00
sspitzer%netscape.com
46c89f52e4 fix for #138826. context menu (for images and in general) is broken in the stand alone mail message window. r=sspitzer, sr=blake. thanks to antonio.xu@sun.com for the initial patch.
git-svn-id: svn://10.0.0.236/trunk@122096 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 21:39:34 +00:00
sspitzer%netscape.com
f202a313ac commenting the "browser.downloadmanager.behavior" pref. no bug.
sr=blake


git-svn-id: svn://10.0.0.236/trunk@122095 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 21:34:41 +00:00
chak%netscape.com
4ae0c542c3 Fix for #13127
FTP (HTML view) - folder and document icons do not display
(in an embedding scenario)
r=adamlock, sr=alecf


git-svn-id: svn://10.0.0.236/trunk@122094 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 21:25:19 +00:00
dcone%netscape.com
d2a9c8c9c0 Update of the debug plugin. Not part of the build
git-svn-id: svn://10.0.0.236/trunk@122093 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 21:06:49 +00:00
srilatha%netscape.com
b76bb6eb37 Fix for bug # 141438. added code so that we don't define SHORT_LIBNAME on winNT
r=cls, sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@122092 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 21:00:56 +00:00
nicolson%netscape.com
3c5501ee98 Fix 146515: PK11PrivKey.fromPrivateKeyInfo enables no operations for RSA keys
git-svn-id: svn://10.0.0.236/trunk@122091 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 20:32:10 +00:00
naving%netscape.com
5d51940703 140149 r=racham sr=mscott. fixing disappearing of "disable cookies in mail & newsgroups" checkbox on commercial mac builds.
git-svn-id: svn://10.0.0.236/trunk@122090 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 20:28:27 +00:00
naving%netscape.com
0b7f74cad2 146089 r=ducarroz sr=bienvenu fixing a crasher when downloading pop3 mail with malformed "From" address.
git-svn-id: svn://10.0.0.236/trunk@122089 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 20:21:42 +00:00
naving%netscape.com
d770508514 146313 r=cavin sr=bienvenu Making server->ForgetPassWord() call from imap protocol code thread-safe
git-svn-id: svn://10.0.0.236/trunk@122088 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 20:19:06 +00:00
waterson%netscape.com
bb86b1d414 Bug 145272. Handle incremental reflows that are targeted at a child of a caption frame. r=karnaze, sr=jst
git-svn-id: svn://10.0.0.236/trunk@122086 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 18:51:02 +00:00
nicolson%netscape.com
fddf628972 move new entry to end of file
git-svn-id: svn://10.0.0.236/trunk@122085 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 18:45:23 +00:00
nicolson%netscape.com
98a58d052f cleanup tabs and spaces.
git-svn-id: svn://10.0.0.236/trunk@122084 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 18:45:00 +00:00
nicolson%netscape.com
e8312e0827 Various minor tweaks for code cleanliness.
git-svn-id: svn://10.0.0.236/trunk@122083 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 18:29:07 +00:00
glen.beasley%sun.com
d1708d80b8 bug 144913 isCertValid addition
git-svn-id: svn://10.0.0.236/trunk@122082 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 17:52:23 +00:00
shrutiv%netscape.com
896214d3e2 Fix for bug 91195: Need to check remaining disk space before creating
the bld (r=smeredith)


git-svn-id: svn://10.0.0.236/trunk@122079 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 17:25:11 +00:00
mikep%oeone.com
c2d14ab79f Adding in patch from bug 141867 to fix copy / paste stuff.
git-svn-id: svn://10.0.0.236/trunk@122078 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 16:41:33 +00:00
mostafah%oeone.com
6f10f7fde1 Removing unneccessary line feed
git-svn-id: svn://10.0.0.236/trunk@122077 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 14:40:52 +00:00
mikep%oeone.com
a6a7877dff Uping version number.
git-svn-id: svn://10.0.0.236/trunk@122076 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 14:08:00 +00:00
mikep%oeone.com
a442f7cbba Fix to change file permissions to a more useful set, bug 146212
git-svn-id: svn://10.0.0.236/trunk@122075 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 14:06:49 +00:00
locka%iol.ie
0370268a4c NOT PART OF BUILD. More XPConnect scripting improvements
git-svn-id: svn://10.0.0.236/trunk@122073 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 13:28:38 +00:00
mikep%oeone.com
01770e4029 Fixing small bugs, as mentioned in bug 141867.
git-svn-id: svn://10.0.0.236/trunk@122072 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 13:27:15 +00:00
rods%netscape.com
42e0661834 temporary patch to the forms controls to ignore mouse events when in
printpreview until Bug 124990 gets fixed (radio and checkbox doesn't need the fix)
this code will be removed via bug 146399
Bug 129002 r=dcone sr=attinasi


git-svn-id: svn://10.0.0.236/trunk@122071 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 11:25:58 +00:00
pinkerton%netscape.com
4b5b93d8b9 Updates for api changes (signed->unsigned)
git-svn-id: svn://10.0.0.236/trunk@122070 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 11:19:51 +00:00
rods%netscape.com
7add5ab6a7 The allows TAB events to be processed. This seems to work fine, because the
forms controls can never get focus. I did a lot of testing and the focus goes
to the toolbar and doesn't go to any forms controls.
Bug 145388 r=dcone sr=attinasi


git-svn-id: svn://10.0.0.236/trunk@122068 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 10:48:37 +00:00
jdunn%netscape.com
99813d62d1 HP-UX requires STDC to be defined
# 146265
r=cls@seawood.org
sr=jaggernaut@netscape.com


git-svn-id: svn://10.0.0.236/trunk@122067 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 10:41:36 +00:00
rbs%maths.uq.edu.au
908f88658d Add the DOCTYPE for the XHTML+MathML+SVG profile in the recognized catalog list, b=145810, r=heikki, sr=jst
git-svn-id: svn://10.0.0.236/trunk@122065 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 08:16:54 +00:00
myk%mozilla.org
bc5d4e6aae Fix for bug 146261: fixes bug preventing the sending of email to users when the status of bugs changes in some situations.
Patch by Tim Taylor <ttaylor@mitre.org>.
r=myk,bbaetz


git-svn-id: svn://10.0.0.236/trunk@122063 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 08:08:53 +00:00
racham%netscape.com
3daa300f09 Fixing bugscape 15562. Removing duplicate entries from pageInfo.dtd file. r=ftang, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@122061 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 07:18:31 +00:00
jst%netscape.com
7f0a0a116f Backing out part of the fix for bug 143369 as a fix for bug 146333. Don't make ChromeWindow's prototype immutable.
git-svn-id: svn://10.0.0.236/trunk@122059 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 05:39:27 +00:00
matty%chariot.net.au
76e2e3d6e4 Release notes updates.
git-svn-id: svn://10.0.0.236/trunk@122057 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 05:31:37 +00:00
cotter%netscape.com
9de3ff9574 ongoing help content updates per bugzilla 122806 & ADT, r=oeschger; mostly privacy help updates based on Steve Morse's review.
git-svn-id: svn://10.0.0.236/trunk@122050 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 04:20:52 +00:00
pinkerton%netscape.com
166ae94eb0 Just born
git-svn-id: svn://10.0.0.236/trunk@122047 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 01:16:05 +00:00
pinkerton%netscape.com
6e15cb8a6a oops, some absolute paths snuck in
git-svn-id: svn://10.0.0.236/trunk@122046 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 00:46:53 +00:00
pinkerton%netscape.com
d42ff5a2c4 Add privacy panel
git-svn-id: svn://10.0.0.236/trunk@122045 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 00:25:31 +00:00
pinkerton%netscape.com
f38cc1e52f fix a lot of unicode problems. stub out some inline editing in case we ever
want to do that (we probably don't, but...)


git-svn-id: svn://10.0.0.236/trunk@122044 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 00:25:01 +00:00
pinkerton%netscape.com
3d2ebbbf5c Adding privacy panel
git-svn-id: svn://10.0.0.236/trunk@122043 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 00:24:08 +00:00
dbaron%fas.harvard.edu
ce23b316f1 Fix checking of checkboxes inside their label by not sending the duplicate event if the click was already within the form control. b=96813 r=jkeiser sr=jst
git-svn-id: svn://10.0.0.236/trunk@122042 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 00:23:12 +00:00
morse%netscape.com
04500578be bug 146094, leaking cookies, r=waterson, sr=darin
git-svn-id: svn://10.0.0.236/trunk@122040 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 00:08:42 +00:00
jst%netscape.com
0e34136ef1 Fixing bug 146034. Getting rid of nsHTMLIIDs.{h,cpp}. r=jfrancis@netscape.com, sr=rpotts@netscape.com
git-svn-id: svn://10.0.0.236/trunk@122039 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-23 00:00:34 +00:00
blythe%netscape.com
293f7a4a7a Not part of normal build.
Fix bug 145333.
Manual ordering of some modules can now be forced.
r=mcafee


git-svn-id: svn://10.0.0.236/trunk@122038 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 23:53:04 +00:00
harishd%netscape.com
eedcf9208e Preserve comment declaration for textarea and viewsource. b=133044, r=heikki, sr=jst
git-svn-id: svn://10.0.0.236/trunk@122037 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 23:51:30 +00:00
relyea%netscape.com
d0e52c624a Refresh token cache after login on tokens that need to log in before they
could read their certs.


git-svn-id: svn://10.0.0.236/trunk@122033 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 23:13:05 +00:00
relyea%netscape.com
8aaf6c1b1e Close our peer database handles because some platforms (Mac) do bad things
if you hold two berkelydb handles open to the same database in the same process.
(actually a lot of platforms could cause problems, the Mac version of dbm (1.85)
just does the bad things right away).


git-svn-id: svn://10.0.0.236/trunk@122032 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 21:47:23 +00:00
attinasi%netscape.com
33f7624433 Very High Level (tm) Layout Documentation. Work In Progress, not part of any build or product. Cheers, mates!
git-svn-id: svn://10.0.0.236/trunk@122031 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 21:07:29 +00:00
igor%mir2.org
52822661f9 Back-indent the interpreter main loop to ease code following
git-svn-id: svn://10.0.0.236/trunk@122027 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 18:42:40 +00:00
mikep%oeone.com
fc947a0f81 Fixing import / export thanks to bug 146212.
git-svn-id: svn://10.0.0.236/trunk@122026 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 17:13:35 +00:00
igor%mir2.org
38fddcf688 Fixing bug 145791: apply and call with null and undefined arguments behaves as required and Function.prototype.apply.length returns 2.
git-svn-id: svn://10.0.0.236/trunk@122025 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 16:46:28 +00:00
mostafah%oeone.com
f92684db76 Adding oeICalTodoImpl to build
git-svn-id: svn://10.0.0.236/trunk@122024 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 15:16:19 +00:00
jdunn%netscape.com
c62cc8b5d9 fixing plugins extensions for HP & AIX
# 106806
r=serge@netscape.com,pkw@austin.ibm.com


git-svn-id: svn://10.0.0.236/trunk@122023 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 14:54:23 +00:00
mostafah%oeone.com
4189aa0bd0 Adding new EventDisplay component. Fixing getEvents functions to return sorted-by-occurence events
git-svn-id: svn://10.0.0.236/trunk@122022 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 14:01:38 +00:00
jdunn%netscape.com
bb1bb5520a changing false to PR_FALSE
r=james.turner@crocodile-clips.com, bbaetz@student.usyd.edu.au


git-svn-id: svn://10.0.0.236/trunk@122021 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 13:17:13 +00:00
rods%netscape.com
7e8d6d3e59 patch to clamp to 1/10th of the largest dimension of a page - very low risk. I
think it is unrealistic that the smaller dim of the page would be less than 1/5
of the larger dimension. (and remove unneeded call to get the presshell)
Bug 145976 r=dcone sr=attinasi


git-svn-id: svn://10.0.0.236/trunk@122020 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-22 11:32:00 +00:00
1245 changed files with 351552 additions and 104258 deletions

View File

@@ -0,0 +1,38 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = base html xml xul xbl xsl
ifdef MOZ_SVG
DIRS += svg
endif
DIRS += events shared build
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,32 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public src
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,27 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..
DIRS=public src \
$(NULL)
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,31 @@
#
# This is a list of local files which get copied to the mozilla:dist:content directory
#
nsContentPolicyUtils.h
nsContentUtils.h
nsIAnonymousContent.h
nsIContent.h
nsIContentIterator.h
nsIContentSerializer.h
nsIDocument.h
nsIDocumentContainer.h
nsIDocumentEncoder.h
nsIDocumentObserver.h
nsIDocumentViewer.h
nsIElementFactory.h
nsIHTMLToTextSink.h
nsINameSpace.h
nsINameSpaceManager.h
nsINodeInfo.h
nsIPrivateDOMImplementation.h
nsIRangeUtils.h
nsIStyledContent.h
nsIStyleRule.h
nsIStyleRuleProcessor.h
nsIStyleRuleSupplier.h
nsIStyleSheet.h
nsIStyleSheetLinkingElement.h
nsITextContent.h
nsIContentList.h
nsIFrameLoader.h
mozISanitizingSerializer.h

View File

@@ -0,0 +1,17 @@
#
# This is a list of local files which get copied to the mozilla:dist:idl directory
#
nsIContentPolicy.idl
nsISelection.idl
nsISelectionController.idl
nsISelectionListener.idl
nsISelectionPrivate.idl
nsIScriptLoader.idl
nsIScriptLoaderObserver.idl
nsIPrintProgress.idl
nsIPrintStatusFeedback.idl
nsIPrintProgressParams.idl
nsIDragDropHandler.idl
nsIDragDropOverride.idl

View File

@@ -0,0 +1,80 @@
#
# 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 = content
XPIDL_MODULE = content_base
EXPORTS = \
nsIContent.h \
nsIAnonymousContent.h \
nsIContentIterator.h \
nsContentPolicyUtils.h \
nsContentUtils.h \
nsIDocument.h \
nsIDocumentContainer.h \
nsIDocumentEncoder.h \
nsIDocumentObserver.h \
nsIDocumentViewer.h \
nsIElementFactory.h \
nsINameSpace.h \
nsINameSpaceManager.h \
nsINodeInfo.h \
nsIRangeUtils.h \
nsIStyledContent.h \
nsIStyleRule.h \
nsIStyleRuleSupplier.h \
nsIStyleSheet.h \
nsIStyleSheetLinkingElement.h \
nsIStyleRuleProcessor.h \
nsITextContent.h \
nsIPrivateDOMImplementation.h \
nsIContentSerializer.h \
nsIHTMLToTextSink.h \
mozISanitizingSerializer.h \
nsIContentList.h \
nsIFrameLoader.h \
$(NULL)
XPIDLSRCS = \
nsIContentPolicy.idl \
nsISelectionController.idl \
nsISelectionDisplay.idl \
nsISelectionListener.idl \
nsISelection.idl \
nsISelectionPrivate.idl \
nsIScriptLoader.idl \
nsIScriptLoaderObserver.idl \
nsIPrintProgress.idl \
nsIPrintProgressParams.idl \
nsIPrintStatusFeedback.idl \
nsIDragDropHandler.idl \
nsIDragDropOverride.idl \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,76 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..\..
EXPORTS = \
nsContentPolicyUtils.h \
nsIContent.h \
nsIAnonymousContent.h \
nsIContentIterator.h \
nsIDocument.h \
nsIDocumentContainer.h \
nsIDocumentEncoder.h \
nsIDocumentObserver.h \
nsIDocumentViewer.h \
nsIElementFactory.h \
nsINameSpace.h \
nsINameSpaceManager.h \
nsINodeInfo.h \
nsIRangeUtils.h \
nsIStyledContent.h \
nsIStyleRule.h \
nsIStyleRuleSupplier.h \
nsIStyleSheet.h \
nsIStyleSheetLinkingElement.h \
nsIStyleRuleProcessor.h \
nsITextContent.h \
nsContentUtils.h \
nsIPrivateDOMImplementation.h \
nsIContentSerializer.h \
nsIHTMLToTextSink.h \
mozISanitizingSerializer.h \
nsIContentList.h \
nsIFrameLoader.h \
$(NULL)
MODULE=content
XPIDL_MODULE=content_base
XPIDLSRCS= \
.\nsIContentPolicy.idl \
.\nsISelectionController.idl \
.\nsISelectionDisplay.idl \
.\nsISelectionListener.idl \
.\nsISelection.idl \
.\nsISelectionPrivate.idl \
.\nsIScriptLoader.idl \
.\nsIScriptLoaderObserver.idl \
.\nsIPrintProgress.idl \
.\nsIPrintStatusFeedback.idl \
.\nsIPrintProgressParams.idl \
.\nsIDragDropHandler.idl \
.\nsIDragDropOverride.idl \
$(NULL)
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,125 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 HTML Sanitizer code.
*
* The Initial Developer of the Original Code is
* Ben Bucksch <mozilla@bucksch.org>.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Netscape
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* Cleans up HTML source from unwanted tags/attributes
This class implements a content sink, which takes a parsed HTML document
and removes all tags and attributes that are not explicitly allowed.
This may improve the viewing experience of the user and/or the
security/privacy.
What is allowed is defined by a string (format described before the
implementation of |mozHTMLSanitizer::ParsePrefs()|). The sytnax of the
definition is not very rich - you can only (dis)allow certain tags and
attributes, but not where they may appear. (This makes the implementation
much more simple.) E.g. it is impossible to disallow ordinary text as a
direct child of the <head> node or to disallow multiple <head> nodes.
We also remove some known bad attribute values like javascript: URLs.
Draconian attitude.
Currently, the output of this class is unparsed (!) HTML source, which
means that each document has to go through the parser twice. Of course,
that is a performance killer. There are some reasons for for me doing it
that way:
* There is, to my knowledge, no interface to hook up such modifiers
in the document display data flow. We have a nice interface for doing
the modifications (the DOM), but no place to get the DOM and to invoke
this code. As I don't want to hack this directly into the html sink,
I'd have to create a generic interface first, which is too much work for
me at the moment.
* It is quite easy to hook up modifiers for the (unparsed) data stream,
both in netwerk (for the browser) and esp. in libmime (for Mailnews).
* It seems like the safest method - it is easier to debug (you have the
HTML source output to check) and is less prone to security-relevant bugs
and regressions, because in the case of a bug, it will probably fall back
to not outputting, which is safer than erring on the side of letting
something slip through (most of the alternative approaches listed below
are probably vulnerable to the latter).
* It should be possible to later change this class to output a parsed HTML
document.
So, in other words, I had the choice between better design and better
performance. I choose design. Bad performance has an effect on the users
of this class only, while bad design has an effect on all users and
programmers.
That being said, I have some ideas, how do make it much more efficient, but
they involve hacking core code.
* At some point when we have DOM, but didn't do anything with it yet
(in particular, didn't load any external objects or ran any javascript),
walk the DOM and delete everything the user doesn't explicitly like.
* There's this nice GetPref() in the HTMLContentSink. It isn't used exactly
as I would like to, but that should be doable. Bascially, before
processing any tag (e.g. in OpenContainer or AddLeaf), ask that
function, if the tag is allowed. If not, just return.
In any case, there's the problem, how the users of the renderer
(e.g. Mailnews) can tell it to use the sanitizer and which tags are
allowed (the browser may want to allow more tags than Mailnews).
That probably means that I have to hack into the docshell (incl. its
interface) or similar, which I would really like to avoid.
Any ideas appreciated.
*/
#ifndef _mozISanitizingSerializer_h__
#define _mozISanitizingSerializer_h__
#include "nsISupports.h"
#include "nsAString.h"
#define MOZ_SANITIZINGHTMLSERIALIZER_CONTRACTID "@mozilla.org/layout/htmlsanitizer;1"
/* starting interface: nsIContentSerializer */
#define MOZ_ISANITIZINGHTMLSERIALIZER_IID_STR "feca3c34-205e-4ae5-bd1c-03c686ff012b"
#define MOZ_ISANITIZINGHTMLSERIALIZER_IID \
{0xfeca3c34, 0x205e, 0x4ae5, \
{ 0xbd, 0x1c, 0x03, 0xc6, 0x86, 0xff, 0x01, 0x2b }}
class mozISanitizingHTMLSerializer : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(MOZ_ISANITIZINGHTMLSERIALIZER_IID)
NS_IMETHOD Initialize(nsAString* aOutString,
PRUint32 aFlags,
const nsAString& allowedTags) = 0;
// This function violates string ownership rules, see impl.
};
#endif

View File

@@ -0,0 +1,305 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsContentCID_h__
#define nsContentCID_h__
#include "nsISupports.h"
#include "nsIFactory.h"
#include "nsIComponentManager.h"
// {1691E1F7-EE41-11d4-9885-00C04FA0CF4B}
#define NS_STYLESET_CID \
{ 0x1691e1f7, 0xee41, 0x11d4, { 0x98, 0x85, 0x0, 0xc0, 0x4f, 0xa0, 0xcf, 0x4b } }
// {96882B70-8A27-11d2-8EAF-00805F29F370}
#define NS_HTMLSTYLESHEET_CID \
{ 0x96882b70, 0x8a27, 0x11d2, { 0x8e, 0xaf, 0x0, 0x80, 0x5f, 0x29, 0xf3, 0x70 } }
// {972D8D8F-F0DA-11d4-9885-00C04FA0CF4B}
#define NS_DOCUMENT_VIEWER_CID \
{ 0x972d8d8f, 0xf0da, 0x11d4, { 0x98, 0x85, 0x0, 0xc0, 0x4f, 0xa0, 0xcf, 0x4b } }
// {A5121627-EDB6-11d4-9885-00C04FA0CF4B}
#define NS_ANONYMOUSCONTENT_CID \
{ 0xa5121627, 0xedb6, 0x11d4, { 0x98, 0x85, 0x0, 0xc0, 0x4f, 0xa0, 0xcf, 0x4b } }
// {FC886801-E768-11d4-9885-00C04FA0CF4B}
#define NS_CONTENT_DOCUMENT_LOADER_FACTORY_CID \
{ 0xfc886801, 0xe768, 0x11d4, { 0x98, 0x85, 0x0, 0xc0, 0x4f, 0xa0, 0xcf, 0x4b } }
/* a6cf90f9-15b3-11d2-932e-00805f8add32 */
#define NS_LAYOUT_DEBUGGER_CID \
{ 0xa6cf90f9, 0x15b3, 0x11d2,{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
/* a6cf90fc-15b3-11d2-932e-00805f8add32 */
#define NS_HTML_ELEMENT_FACTORY_CID \
{ 0xa6cf90fc, 0x15b3, 0x11d2,{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
#define NS_HTMLDOCUMENT_CID \
{ /* 5d0fcdd0-4daa-11d2-b328-00805f8a3859 */ \
0x5d0fcdd0, 0x4daa, 0x11d2, \
{0xb3, 0x28, 0x00, 0x80, 0x5f, 0x8a, 0x38, 0x59}}
#define NS_WYCIWYGPROTOCOLHANDLER_CID \
{ /* e7509b46-2eB2-410a-9d7c-c3ce73284d01 */ \
0xe7509b46, 0x2eb2, 0x410a, \
{0x9d, 0x7c, 0xc3, 0xce, 0x73, 0x28, 0x4d, 0x01}}
#define NS_XMLDOCUMENT_CID \
{ /* a6cf9063-15b3-11d2-932e-00805f8add32 */ \
0xa6cf9063, 0x15b3, 0x11d2, \
{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
#define NS_XML_ELEMENT_FACTORY_CID \
{ /* CF170391-79CC-11d3-BE44-0020A6361667 */ \
0xcf170391, 0x79cc, 0x11d3, \
{0xbe, 0x44, 0x0, 0x20, 0xa6, 0x36, 0x16, 0x67}}
#define NS_IMAGEDOCUMENT_CID \
{ /* e11a6080-4daa-11d2-b328-00805f8a3859 */ \
0xe11a6080, 0x4daa, 0x11d2, \
{0xb3, 0x28, 0x00, 0x80, 0x5f, 0x8a, 0x38, 0x59}}
// {A1FDE864-E802-11d4-9885-00C04FA0CF4B}
#define NS_HTMLHRELEMENT_CID \
{ 0xa1fde864, 0xe802, 0x11d4, { 0x98, 0x85, 0x0, 0xc0, 0x4f, 0xa0, 0xcf, 0x4b } }
// {A1FDE865-E802-11d4-9885-00C04FA0CF4B}
#define NS_HTMLINPUTELEMENT_CID \
{ 0xa1fde865, 0xe802, 0x11d4, { 0x98, 0x85, 0x0, 0xc0, 0x4f, 0xa0, 0xcf, 0x4b } }
#define NS_HTMLIMAGEELEMENT_CID \
{ /* d6008c40-4dad-11d2-b328-00805f8a3859 */ \
0xd6008c40, 0x4dad, 0x11d2, \
{0xb3, 0x28, 0x00, 0x80, 0x5f, 0x8a, 0x38, 0x59}}
#define NS_HTMLOPTIONELEMENT_CID \
{ /* a6cf90f5-15b3-11d2-932e-00805f8add32 */ \
0xa6cf90f5, 0x15b3, 0x11d2, \
{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
#define NS_NAMESPACEMANAGER_CID \
{ /* d9783472-8fe9-11d2-9d3c-0060088f9ff7 */ \
0xd9783472, 0x8fe9, 0x11d2, \
{0x9d, 0x3c, 0x00, 0x60, 0x08, 0x8f, 0x9f, 0xf7}}
/* a6cf90d7-15b3-11d2-932e-00805f8add32 */
#define NS_FRAME_UTIL_CID \
{ 0xa6cf90d5, 0x15b3, 0x11d2,{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
// XXX This should really be factored into a style-specific DLL so
// that all the HTML, generic layout, and style stuff isn't munged
// together.
// {2E363D60-872E-11d2-B531-000000000000}
#define NS_CSSPARSER_CID \
{ 0x2e363d60, 0x872e, 0x11d2, { 0xb5, 0x31, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } }
// {95F46161-D177-11d2-BF86-00105A1B0627}
#define NS_HTML_CSS_STYLESHEET_CID \
{ 0x95f46161, 0xd177, 0x11d2, { 0xbf, 0x86, 0x0, 0x10, 0x5a, 0x1b, 0x6, 0x27 } }
// {A1FDE867-E802-11d4-9885-00C04FA0CF4B}
#define NS_CSS_STYLESHEET_CID \
{ 0xa1fde867, 0xe802, 0x11d4, { 0x98, 0x85, 0x0, 0xc0, 0x4f, 0xa0, 0xcf, 0x4b } }
// {eaca2576-0d4a-11d3-9d7e-0060088f9ff7}
#define NS_CSS_LOADER_CID \
{ 0xeaca2576, 0x0d4a, 0x11d3, { 0x9d, 0x7e, 0x00, 0x60, 0x08, 0x8f, 0x9f, 0xf7 } }
// {96882B71-8A27-11d2-8EAF-00805F29F370}
#define NS_TEXTNODE_CID \
{ 0x96882b71, 0x8a27, 0x11d2, { 0x8e, 0xaf, 0x0, 0x80, 0x5f, 0x29, 0xf3, 0x70 } }
// {96882B72-8A27-11d2-8EAF-00805F29F370}
#define NS_SELECTION_CID \
{ 0x96882b72, 0x8a27, 0x11d2, { 0x8e, 0xaf, 0x0, 0x80, 0x5f, 0x29, 0xf3, 0x70 } }
#define NS_FRAMESELECTION_CID \
{/* {905F80F1-8A7B-11d2-918C-0080C8E44DB5}*/ \
0x905f80f1, 0x8a7b, 0x11d2, { 0x91, 0x8c, 0x0, 0x80, 0xc8, 0xe4, 0x4d, 0xb5 } }
#define NS_DOMSELECTION_CID \
{/* {C87A37FC-8109-4ce2-A322-8CDEC925379F}*/ \
0xc87a37fc, 0x8109, 0x4ce2, { 0xa3, 0x22, 0x8c, 0xde, 0xc9, 0x25, 0x37, 0x9f } }
#define NS_RANGE_CID \
{/* {56AD2981-8A87-11d2-918C-0080C8E44DB5}*/ \
0x56ad2981, 0x8a87, 0x11d2, { 0x91, 0x8c, 0x0, 0x80, 0xc8, 0xe4, 0x4d, 0xb5 } }
// {A1FDE868-E802-11d4-9885-00C04FA0CF4B}
#define NS_ATTRIBUTECONTENT_CID \
{ 0xa1fde868, 0xe802, 0x11d4, { 0x98, 0x85, 0x0, 0xc0, 0x4f, 0xa0, 0xcf, 0x4b } }
#define NS_CONTENTITERATOR_CID \
{/* {a6cf90e3-15b3-11d2-932e-00805f8add32}*/ \
0xa6cf90e3, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } }
#define NS_GENERATEDSUBTREEITERATOR_CID \
{/* {9A45253B-EB8F-49f1-B925-E9EA90D3EB3A}*/ \
0x9a45253b, 0xeb8f, 0x49f1, { 0xb9, 0x25, 0xe9, 0xea, 0x90, 0xd3, 0xeb, 0x3a } }
#define NS_GENERATEDCONTENTITERATOR_CID \
{/* {A364930F-E353-49f1-AC69-91637EB8B757}*/ \
0xa364930f, 0xe353, 0x49f1, { 0xac, 0x69, 0x91, 0x63, 0x7e, 0xb8, 0xb7, 0x57 } }
#define NS_SUBTREEITERATOR_CID \
{/* {a6cf90e5-15b3-11d2-932e-00805f8add32}*/ \
0xa6cf90e5, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } }
// {09F689E0-B4DA-11d2-A68B-00104BDE6048}
#define NS_EVENTLISTENERMANAGER_CID \
{ 0x9f689e0, 0xb4da, 0x11d2, { 0xa6, 0x8b, 0x0, 0x10, 0x4b, 0xde, 0x60, 0x48 } }
// {A1FDE862-E802-11d4-9885-00C04FA0CF4B}
#define NS_EVENTSTATEMANAGER_CID \
{ 0xa1fde862, 0xe802, 0x11d4, { 0x98, 0x85, 0x0, 0xc0, 0x4f, 0xa0, 0xcf, 0x4b } }
// {64F300A1-C88C-11d3-97FB-00400553EEF0}
#define NS_XBLSERVICE_CID \
{ 0x64f300a1, 0xc88c, 0x11d3, { 0x97, 0xfb, 0x0, 0x40, 0x5, 0x53, 0xee, 0xf0 } }
// {15671AF5-39F9-4c70-8CE3-72C97111B52D}
#define NS_BINDINGMANAGER_CID \
{ 0x15671af5, 0x39f9, 0x4c70, { 0x8c, 0xe3, 0x72, 0xc9, 0x71, 0x11, 0xb5, 0x2d } }
// 3a9cd622-264d-11d4-ba06-0060b0fc76dd
#define NS_DOM_IMPLEMENTATION_CID \
{ 0x3a9cd622, 0x264d, 0x11d4, {0xba, 0x06, 0x00, 0x60, 0xb0, 0xfc, 0x76, 0xdd } }
// {AE52FE52-683A-437D-B661-DE55F4E0A873}
#define NS_NODEINFOMANAGER_CID \
{ 0xae52fe52, 0x683a, 0x437d, { 0xb6, 0x61, 0xde, 0x55, 0xf4, 0xe0, 0xa8, 0x73 } }
// {ECEA1B28-AE54-4047-8BBE-C624235106B4}
#define NS_COMPUTEDDOMSTYLE_CID \
{ 0xecea1b28, 0xae54, 0x4047, { 0x8b, 0xbe, 0xc6, 0x24, 0x23, 0x51, 0x06, 0xb4 } }
// {4aef38b7-6364-4e23-a5e7-12f837fbbd9c}
#define NS_XMLCONTENTSERIALIZER_CID \
{ 0x4aef38b7, 0x6364, 0x4e23, { 0xa5, 0xe7, 0x12, 0xf8, 0x37, 0xfb, 0xbd, 0x9c } }
// {9d3f70da-86e9-11d4-95ec-00b0d03e37b7}
#define NS_HTMLCONTENTSERIALIZER_CID \
{ 0x9d3f70da, 0x86e9, 0x11d4, { 0x95, 0xec, 0x00, 0xb0, 0xd0, 0x3e, 0x37, 0xb7 } }
// {feca3c34-205e-4ae5-bd1c-03c686ff012b}
#define MOZ_SANITIZINGHTMLSERIALIZER_CID \
{ 0xfeca3c34, 0x205e, 0x4ae5, { 0xbd, 0x1c, 0x03, 0xc6, 0x86, 0xff, 0x01, 0x2b } }
// {6030f7ef-32ed-46a7-9a63-6a5d3f90445f}
#define NS_PLAINTEXTSERIALIZER_CID \
{ 0x6030f7ef, 0x32ed, 0x46a7, { 0x9a, 0x63, 0x6a, 0x5d, 0x3f, 0x90, 0x44, 0x5f } }
// {3986B301-097C-11d3-BF87-00105A1B0627}
#define NS_XULPOPUPLISTENER_CID \
{ 0x3986b301, 0x97c, 0x11d3, { 0xbf, 0x87, 0x0, 0x10, 0x5a, 0x1b, 0x6, 0x27 } }
// {1F5C1721-7DC3-11d3-BF87-00105A1B0627}
#define NS_XULCONTROLLERS_CID \
{ 0x1f5c1721, 0x7dc3, 0x11d3, { 0xbf, 0x87, 0x0, 0x10, 0x5a, 0x1b, 0x6, 0x27 } }
// {daedcb43-1dd1-11b2-b1d2-caf06cb40387}
#define NS_DLGDEFAULTKEYS_CID \
{ 0xdaedcb43, 0x1dd1, 0x11b2, { 0xb1, 0xd2, 0xca, 0xf0, 0x6c, 0xb4, 0x3, 0x87 } }
// {76E92881-CDDB-11d3-BF87-00105A1B0627}
#define NS_XULELEMENTFACTORY_CID \
{ 0x76e92881, 0xcddb, 0x11d3, { 0xbf, 0x87, 0x0, 0x10, 0x5a, 0x1b, 0x6, 0x27 } }
// {508f5601-e09b-11d3-9f7e-cf931f9f173c}
#define NS_CONTROLLERCOMMANDMANAGER_CID \
{ 0x508f5601, 0xe09b, 0x11d3, { 0x9f, 0x7e, 0xcf, 0x93, 0x1f, 0x9f, 0x17, 0x3c } }
// {BFD05264-834C-11d2-8EAC-00805F29F371}
#define NS_XULSORTSERVICE_CID \
{ 0xbfd05264, 0x834c, 0x11d2, { 0x8e, 0xac, 0x0, 0x80, 0x5f, 0x29, 0xf3, 0x71 } }
// {3D262D00-8B5A-11d2-8EB0-00805F29F370}
#define NS_XULTEMPLATEBUILDER_CID \
{ 0x3d262d00, 0x8b5a, 0x11d2, { 0x8e, 0xb0, 0x0, 0x80, 0x5f, 0x29, 0xf3, 0x70 } }
// {1abdcc96-1dd2-11b2-b520-f8f59cdd67bc}
#define NS_XULTREEBUILDER_CID \
{ 0x1abdcc96, 0x1dd2, 0x11b2, { 0xb5, 0x20, 0xf8, 0xf5, 0x9c, 0xdd, 0x67, 0xbc } }
// {CE058B21-BA9C-11d2-BF86-00105A1B0627}
#define NS_XULCONTENTSINK_CID \
{ 0xce058b21, 0xba9c, 0x11d2, { 0xbf, 0x86, 0x0, 0x10, 0x5a, 0x1b, 0x6, 0x27 } }
// {541AFCB2-A9A3-11d2-8EC5-00805F29F370}
#define NS_XULDOCUMENT_CID \
{ 0x541afcb2, 0xa9a3, 0x11d2, { 0x8e, 0xc5, 0x0, 0x80, 0x5f, 0x29, 0xf3, 0x70 } }
// {3A0A0FC1-8349-11d3-BE47-00104BDE6048}
#define NS_XULPROTOTYPECACHE_CID \
{ 0x3a0a0fc1, 0x8349, 0x11d3, { 0xbe, 0x47, 0x0, 0x10, 0x4b, 0xde, 0x60, 0x48 } }
// {a6cf9126-15b3-11d2-932e-00805f8add32}
#define NS_RANGEUTILS_CID \
{ 0xa6cf9126, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } }
#ifdef MOZ_MATHML
// {68b9fbda-f230-45a9-bf92-dbbbd4ac8555}
#define NS_MATHMLELEMENTFACTORY_CID \
{ 0x68b9fbda, 0xf230, 0x45a9, {0xbf, 0x92, 0xdb, 0xbb, 0xd4, 0xac, 0x85, 0x55 } }
#endif // MOZ_MATHML
#ifdef MOZ_SVG
// {4E48C00A-E20F-4061-B869-2BAC285D68E8}
#define NS_SVGELEMENTFACTORY_DEPRECATED_CID \
{ 0x4e48c00a, 0xe20f, 0x4061, { 0xb8, 0x69, 0x2b, 0xac, 0x28, 0x5d, 0x68, 0xe8 } }
// {34D9B28A-FBFF-4bbd-8546-1822FE3FB8B5}
#define NS_SVGELEMENTFACTORY_CID \
{ 0x34d9b28a, 0xfbff, 0x4bbd, { 0x85, 0x46, 0x18, 0x22, 0xfe, 0x3f, 0xb8, 0xb5 } }
#define NS_SVGDOCUMENT_CID \
{ /* b7f44954-1dd1-11b2-8c2e-c2feab4186bc */ \
0xb7f44954, 0x11d1, 0x11b2, \
{0x8c, 0x2e, 0xc2, 0xfe, 0xab, 0x41, 0x86, 0xbc}}
#endif // MOZ_SVG
#endif /* nsContentCID_h__ */

View File

@@ -0,0 +1,69 @@
/* -*- 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 code.
*
* The Initial Developer of the Original Code is Zero-Knowledge Systems,
* Inc. Portions created by Zero-Knowledge are Copyright (C) 2000
* Zero-Knowledge Systems, Inc. All Rights Reserved.
*
* Contributor(s):
*/
/*
* Utility routines for checking content load/process policy settings.
*/
#include "nsString.h"
#include "nsIContentPolicy.h"
#include "nsIMemory.h"
#include "nsIServiceManager.h"
#ifndef __nsContentPolicyUtils_h__
#define __nsContentPolicyUtils_h__
class nsIDOMElement;
#define NS_CONTENTPOLICY_CONTRACTID "@mozilla.org/layout/content-policy;1"
#define NS_CONTENTPOLICY_CATEGORY "content-policy"
#define NS_CONTENTPOLICY_CID \
{0x0e3afd3d, 0xeb60, 0x4c2b, \
{ 0x96, 0x3b, 0x56, 0xd7, 0xc4, 0x39, 0xf1, 0x24 }}
/* Takes contentType, aURI, context, and window from its "caller"'s context. */
#define CHECK_CONTENT_POLICY(action, result) \
nsCOMPtr<nsIContentPolicy> policy = \
do_GetService(NS_CONTENTPOLICY_CONTRACTID); \
if (!policy) \
return NS_ERROR_FAILURE; \
\
return policy-> action (contentType, aURI, context, window, result);
inline nsresult
NS_CheckContentLoadPolicy(PRInt32 contentType, nsIURI *aURI,
nsISupports *context, nsIDOMWindow *window,
PRBool *shouldLoad)
{
CHECK_CONTENT_POLICY(ShouldLoad, shouldLoad);
}
inline nsresult
NS_CheckContentProcessPolicy(PRInt32 contentType, nsIURI *aURI,
nsISupports *context, nsIDOMWindow *window,
PRBool *shouldProcess)
{
CHECK_CONTENT_POLICY(ShouldProcess, shouldProcess);
}
#undef CHECK_CONTENT_POLICY
#endif /* __nsContentPolicyUtils_h__ */

View File

@@ -0,0 +1,194 @@
/* -*- 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, released
* March 31, 1998.
*
* 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):
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
/* A namespace class for static content utilities. */
#ifndef nsContentUtils_h___
#define nsContentUtils_h___
#include "jspubtd.h"
#include "nsAString.h"
#include "nsIDOMNode.h"
#include "nsIDOMScriptObjectFactory.h"
class nsIScriptContext;
class nsIScriptGlobalObject;
class nsIXPConnect;
class nsIContent;
class nsIDocument;
class nsContentUtils
{
public:
static nsresult Init();
static nsresult ReparentContentWrapper(nsIContent *aContent,
nsIContent *aNewParent,
nsIDocument *aNewDocument,
nsIDocument *aOldDocument);
static PRBool IsCallerChrome();
/*
* Returns true if the nodes are both in the same document or
* if neither is in a document.
* Returns false if the nodes are not in the same document.
*/
static PRBool InSameDoc(nsIDOMNode *aNode,
nsIDOMNode *aOther);
/**
* Do not ever pass null pointers to this method. If one of your
* nsIContents is null, you have to decide for yourself what
* "IsDescendantOf" really means.
*
* @param aPossibleDescendant node to test for being a descendant of
* aPossibleAncestor
* @param aPossibleAncestor node to test for being an ancestor of
* aPossibleDescendant
* @return PR_TRUE if aPossibleDescendant is a descendant of
* aPossibleAncestor (or is aPossibleAncestor). PR_FALSE
* otherwise.
*/
static PRBool ContentIsDescendantOf(nsIContent* aPossibleDescendant,
nsIContent* aPossibleAncestor);
/*
* This method fills the |aArray| with all ancestor nodes of |aNode|
* including |aNode| at the zero index.
*
* These elements were |nsIDOMNode*|s before casting to |void*| and must
* be cast back to |nsIDOMNode*| on usage, or bad things will happen.
*/
static nsresult GetAncestors(nsIDOMNode* aNode,
nsVoidArray* aArray);
/*
* This method fills |aAncestorNodes| with all ancestor nodes of |aNode|
* including |aNode| (QI'd to nsIContent) at the zero index.
* For each ancestor, there is a corresponding element in |aAncestorOffsets|
* which is the IndexOf the child in relation to its parent.
*
* The elements of |aAncestorNodes| were |nsIContent*|s before casting to
* |void*| and must be cast back to |nsIContent*| on usage, or bad things
* will happen.
*
* This method just sucks.
*/
static nsresult GetAncestorsAndOffsets(nsIDOMNode* aNode,
PRInt32 aOffset,
nsVoidArray* aAncestorNodes,
nsVoidArray* aAncestorOffsets);
/*
* The out parameter, |aCommonAncestor| will be the closest node, if any,
* to both |aNode| and |aOther| which is also an ancestor of each.
*/
static nsresult GetCommonAncestor(nsIDOMNode *aNode,
nsIDOMNode *aOther,
nsIDOMNode** aCommonAncestor);
/*
* |aDifferentNodes| will contain up to 3 elements.
* The first, if present, is the common ancestor of |aNode| and |aOther|.
* The second, if present, is the ancestor node of |aNode| which is
* closest to the common ancestor, but not an ancestor of |aOther|.
* The third, if present, is the ancestor node of |aOther| which is
* closest to the common ancestor, but not an ancestor of |aNode|.
*
* These elements were |nsIDOMNode*|s before casting to void* and must
* be cast back to |nsIDOMNode*| on usage, or bad things will happen.
*/
static nsresult GetFirstDifferentAncestors(nsIDOMNode *aNode,
nsIDOMNode *aOther,
nsVoidArray* aDifferentNodes);
// These are copied from nsJSUtils.h
static nsresult GetStaticScriptGlobal(JSContext* aContext,
JSObject* aObj,
nsIScriptGlobalObject** aNativeGlobal);
static nsresult GetStaticScriptContext(JSContext* aContext,
JSObject* aObj,
nsIScriptContext** aScriptContext);
static nsresult GetDynamicScriptGlobal(JSContext *aContext,
nsIScriptGlobalObject** aNativeGlobal);
static nsresult GetDynamicScriptContext(JSContext *aContext,
nsIScriptContext** aScriptContext);
static PRUint32 CopyNewlineNormalizedUnicodeTo(const nsAString& aSource,
PRUint32 aSrcOffset,
PRUnichar* aDest,
PRUint32 aLength,
PRBool& aLastCharCR);
static PRUint32 CopyNewlineNormalizedUnicodeTo(nsReadingIterator<PRUnichar>& aSrcStart, const nsReadingIterator<PRUnichar>& aSrcEnd, nsAString& aDest);
static nsISupports *
GetClassInfoInstance(nsDOMClassInfoID aID);
static const nsDependentSubstring TrimCharsInSet(const char* aSet,
const nsAString& aValue);
static void Shutdown();
private:
static nsresult doReparentContentWrapper(nsIContent *aChild,
nsIDocument *aNewDocument,
nsIDocument *aOldDocument,
JSContext *cx,
JSObject *parent_obj);
static nsIDOMScriptObjectFactory *sDOMScriptObjectFactory;
static nsIXPConnect *sXPConnect;
};
#define NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(_class) \
if (aIID.Equals(NS_GET_IID(nsIClassInfo))) { \
foundInterface = \
nsContentUtils::GetClassInfoInstance(eDOMClassInfo_##_class##_id); \
NS_ENSURE_TRUE(foundInterface, NS_ERROR_OUT_OF_MEMORY); \
\
*aInstancePtr = foundInterface; \
\
return NS_OK; \
} else
#endif /* nsContentUtils_h___ */

View File

@@ -0,0 +1,66 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIAnonymousContent_h___
#define nsIAnonymousContent_h___
#include "nsISupports.h"
#include "nsIContent.h"
#include "nsCOMPtr.h"
class nsISupportsArray;
class nsIAtom;
class nsINodeInfo;
#define NS_IANONYMOUS_CONTENT_IID { 0x41a69e00, 0x2d6d, 0x12d3, { 0xb0, 0x33, 0xa1, 0x38, 0x71, 0x39, 0x78, 0x7c } }
/**
* If a node is anonymous. Then it should implement this interface.
*/
class nsIAnonymousContent : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IANONYMOUS_CONTENT_IID)
NS_IMETHOD Init(nsINodeInfo *aInfo) = 0;
};
nsresult NS_NewAnonymousContent2(nsIContent **aNewNode);
#endif

View File

@@ -0,0 +1,383 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIContent_h___
#define nsIContent_h___
#include <stdio.h>
#include "nsISupports.h"
#include "nsEvent.h"
#include "nsAString.h"
// Forward declarations
class nsIAtom;
class nsIDocument;
class nsIPresContext;
class nsVoidArray;
class nsIDOMEvent;
class nsIContent;
class nsISupportsArray;
class nsIDOMRange;
class nsISizeOfHandler;
class nsINodeInfo;
class nsIEventListenerManager;
// IID for the nsIContent interface
#define NS_ICONTENT_IID \
{ 0x78030220, 0x9447, 0x11d1, \
{0x93, 0x23, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }
// A node of content in a documents content model. This interface
// is supported by all content objects.
class nsIContent : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICONTENT_IID)
NS_IMETHOD GetDocument(nsIDocument*& aResult) const = 0;
NS_IMETHOD SetDocument(nsIDocument* aDocument, PRBool aDeep, PRBool aCompileEventHandlers) = 0;
NS_IMETHOD GetParent(nsIContent*& aResult) const = 0;
NS_IMETHOD SetParent(nsIContent* aParent) = 0;
/**
* Get the namespace that this tag is defined in
*/
NS_IMETHOD GetNameSpaceID(PRInt32& aResult) const = 0;
NS_IMETHOD GetTag(nsIAtom*& aResult) const = 0;
NS_IMETHOD GetNodeInfo(nsINodeInfo*& aResult) const = 0;
NS_IMETHOD CanContainChildren(PRBool& aResult) const = 0;
NS_IMETHOD ChildCount(PRInt32& aResult) const = 0;
NS_IMETHOD ChildAt(PRInt32 aIndex, nsIContent*& aResult) const = 0;
NS_IMETHOD IndexOf(nsIContent* aPossibleChild, PRInt32& aIndex) const = 0;
NS_IMETHOD InsertChildAt(nsIContent* aKid, PRInt32 aIndex,
PRBool aNotify, PRBool aDeepSetDocument) = 0;
NS_IMETHOD ReplaceChildAt(nsIContent* aKid, PRInt32 aIndex,
PRBool aNotify, PRBool aDeepSetDocument) = 0;
NS_IMETHOD AppendChildTo(nsIContent* aKid, PRBool aNotify,
PRBool aDeepSetDocument) = 0;
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify) = 0;
/**
* Normalizes an attribute string into an atom that represents the
* qualified attribute name of the attribute. This method is intended
* for character case conversion if the content object is case
* insensitive (e.g. HTML).
*
* @param aStr the unparsed attribute string
* @param aName out parameter representing the complete name of the
* attribute
*/
NS_IMETHOD NormalizeAttrString(const nsAString& aStr,
nsINodeInfo*& aNodeInfo) = 0;
/**
* Set attribute values. All attribute values are assumed to have a
* canonical String representation that can be used for these
* methods. The SetAttr method is assumed to perform a translation
* of the canonical form into the underlying content specific
* form.
*
* @param aName the name of the attribute
* @param aValue may legitimately be the empty string.
*
* @param aUpdateMask specifies how whether or not the document should be
* notified of the attribute change.
*/
NS_IMETHOD SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
const nsAString& aValue,
PRBool aNotify) = 0;
/**
* Set attribute values. All attribute values are assumed to have a
* canonical string representation that can be used for these
* methods. The SetAttr method is assumed to perform a translation
* of the canonical form into the underlying content specific
* form.
*
* @param aNodeInfo the node info (name, prefix, namespace id) of the
* attribute
* @param aValue may legitimately be the empty string.
*
* @param aNotify specifies whether or not the document should be
* notified of the attribute change.
*/
NS_IMETHOD SetAttr(nsINodeInfo* aNodeInfo,
const nsAString& aValue,
PRBool aNotify) = 0;
/**
* Get the current value of the attribute. This returns a form that is
* suitable for passing back into SetAttr.
*
* <UL>
*
* <LI>If the attribute is not set and has no default value, return
* NS_CONTENT_ATTR_NOT_THERE.
*
* <LI>If the attribute exists, but has no value, return
* NS_CONTENT_ATTR_NO_VALUE.
*
* <LI>If the attribute has a non-empty value, set ret to
* be the value, and return NS_CONTENT_ATTR_HAS_VALUE (== NS_OK).
*
* </UL>
*/
NS_IMETHOD GetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
nsAString& aResult) const = 0;
/**
* Get the current value and prefix of the attribute. This returns a form
* that is suitable for passing back into SetAttr.
*
* <UL>
*
* <LI>If the attribute is not set and has no default value, return
* NS_CONTENT_ATTR_NOT_THERE.
*
* <LI>If the attribute exists, but has no value, return
* NS_CONTENT_ATTR_NO_VALUE.
*
* <LI>If the attribute has a non-empty value, set ret to
* be the value, and return NS_CONTENT_ATTR_HAS_VALUE (== NS_OK).
*
* </UL>
*
* NOTE! aPrefix is an OUT parameter.
*/
NS_IMETHOD GetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
nsIAtom*& aPrefix, nsAString& aResult) const = 0;
/**
* Determine if an attribute has been set.
*
* @param aNameSpaceId the namespace id of the attribute
* @param aAttr the attribute name
*/
NS_IMETHOD_(PRBool) HasAttr(PRInt32 aNameSpaceID, nsIAtom* aName) const = 0;
/**
* Remove an attribute so that it is no longer explicitly specified.
*
* @param aAttr the name of the attribute to unset
*
* @param aNotify specifies whether or not the document should be
* notified of the attribute change
*
*/
NS_IMETHOD UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttr,
PRBool aNotify) = 0;
/**
* Get the namespace & name of a given attribute.
*
* @param aIndex the index of the attribute name
* @param aNameSpace an out param of the name space ID of the attribute name
* @param aName an out param if the attribute name
*
*/
NS_IMETHOD GetAttrNameAt(PRInt32 aIndex,
PRInt32& aNameSpaceID,
nsIAtom*& aName,
nsIAtom*& aPrefix) const = 0;
/**
* Get the number of all specified attributes.
*
* @param aCountResult an out parameter to be filled in with
* the number of attributes
*
*/
NS_IMETHOD GetAttrCount(PRInt32& aCountResult) const = 0;
/**
* Inform content of range ownership changes. This allows content
* to do the right thing to ranges in the face of changes to the content
* model.
* RangeAdd -- informs content that it owns one or both range endpoints
* RangeRemove -- informs content that it no longer owns a range endpoint
* GetRangeList -- returns the list of ranges that have one or both endpoints
* within this content item
*/
NS_IMETHOD RangeAdd(nsIDOMRange* aRange) = 0;
NS_IMETHOD RangeRemove(nsIDOMRange* aRange) = 0;
NS_IMETHOD GetRangeList(nsVoidArray*& aResult) const = 0;
/**
* Handle a DOM event for this piece of content.
*/
NS_IMETHOD HandleDOMEvent(nsIPresContext* aPresContext,
nsEvent* aEvent,
nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
nsEventStatus* aEventStatus) = 0;
/**
* Get and set a unique ID for this piece of content.
* This ID is used as a key to store state information
* about this content object and its associated frame object.
* The state information is stored in a dictionary that is
* manipulated by the frame manager (nsIFrameManager) inside layout.
* An opaque pointer to this dictionary is passed to the session
* history as a handle associated with the current document's state
*/
NS_IMETHOD GetContentID(PRUint32* aID) = 0;
NS_IMETHOD SetContentID(PRUint32 aID) = 0;
/**
* All content elements are potentially focusable (according to CSS3).
* These methods are used to set and remove the focus on the content
* element.
*/
NS_IMETHOD SetFocus(nsIPresContext* aPresContext) = 0;
NS_IMETHOD RemoveFocus(nsIPresContext* aPresContext) = 0;
/**
* APIs for setting and obtaining the content node
* with the binding responsible for our construction (and existence)
* Used by anonymous content (XBL-generated). null for all explicit content.
*/
NS_IMETHOD SetBindingParent(nsIContent* aContent) = 0;
NS_IMETHOD GetBindingParent(nsIContent** aContent) = 0;
/**
* Bit-flags to pass (or'ed together) to IsContentOfType()
*/
enum {
eTEXT = 0x00000001,
eELEMENT = 0x00000002,
eHTML = 0x00000004,
eHTML_FORM_CONTROL = 0x00000008,
eXUL = 0x00000010
};
/**
* API for doing a quick check if a content object is of a given
* type, such as HTML, XUL, Text, ...
*/
NS_IMETHOD_(PRBool) IsContentOfType(PRUint32 aFlags) = 0;
NS_IMETHOD GetListenerManager(nsIEventListenerManager** aResult) = 0;
/**
* This method is called when the parser finishes creating the element. This
* particularly means that it has done everything you would expect it to have
* done after it encounters the > at the end of the tag (for HTML or XML).
* This includes setting the attributes, setting the document / form, and
* placing the element into the tree at its proper place.
*
* For container elements, this is called *before* any of the children are
* created or added into the tree.
*
* NOTE: this is currently only called for input and button, in the HTML
* content sink. If you want to call it on your element, modify the content
* sink of your choice to do so. This is an efficiency measure.
*
* If you also need to determine whether the parser is the one creating your
* element (through createElement() or cloneNode() generally) * aFromParser to the NS_NewXXX() constructor for your element and have the
* parser pass true. See nsHTMLInputElement.cpp and
* nsHTMLContentSink::MakeContentObject().
*
* DO NOT USE THIS METHOD to get around the fact that it's hard to deal with
* attributes dynamically. If you make attributes affect your element from
* this method, it will only happen on initialization and JavaScript will not
* be able to create elements (which requires them to first create the
* element and then call setAttribute() directly, at which point
* DoneCreatingElement() has already been called and is out of the picture).
*/
NS_IMETHOD DoneCreatingElement() = 0;
#ifdef DEBUG
/**
* Get the size of the content object. The size value should include
* all subordinate data referenced by the content that is not
* accounted for by child content. However, this value should not
* include the frame objects, style contexts, views or other data
* that lies logically outside the content model.
*
* If the implementation so chooses, instead of returning the total
* subordinate data it may instead use the sizeof handler to store
* away subordinate data under its own key so that the subordinate
* data may be tabulated independently of the frame itself.
*
* The caller is responsible for recursing over all children that
* the content contains.
*/
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const = 0;
/**
* List the content (and anything it contains) out to the given
* file stream. Use aIndent as the base indent during formatting.
* Returns NS_OK unless a file error occurs.
*/
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const = 0;
/**
* Dump the content (and anything it contains) out to the given
* file stream. Use aIndent as the base indent during formatting.
* Returns NS_OK unless a file error occurs.
*/
NS_IMETHOD DumpContent(FILE* out = stdout, PRInt32 aIndent = 0,PRBool aDumpAll=PR_TRUE) const = 0;
#endif
};
// nsresult codes for GetAttr
#define NS_CONTENT_ATTR_HAS_VALUE NS_OK
#define NS_CONTENT_ATTR_NO_VALUE \
NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_LAYOUT,0)
#define NS_CONTENT_ATTR_NOT_THERE \
NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_LAYOUT,1)
#endif /* nsIContent_h___ */

View File

@@ -0,0 +1,129 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef __nsIContentIterator_h___
#define __nsIContentIterator_h___
#include "nsISupports.h"
class nsIFocusTracker;
class nsIContent;
class nsIDOMRange;
#define NS_ICONTENTITERTOR_IID \
{0xa6cf90e4, 0x15b3, 0x11d2, \
{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }
// {B4BC9F63-D9BA-11d3-9938-00108301233C}
#define NS_IGENERATEDCONTENTITERTOR_IID \
{ 0xb4bc9f63, 0xd9ba, 0x11d3, \
{ 0x99, 0x38, 0x0, 0x10, 0x83, 0x1, 0x23, 0x3c } }
class nsIContentIterator : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICONTENTITERTOR_IID)
/* Initializes an iterator for the subtree rooted by the node aRoot
*/
NS_IMETHOD Init(nsIContent* aRoot)=0;
/* Initializes an iterator for the subtree defined by the range aRange
*/
NS_IMETHOD Init(nsIDOMRange* aRange)=0;
/** First will reset the list. will return NS_FAILED if no items
*/
NS_IMETHOD First()=0;
/** Last will reset the list to the end. will return NS_FAILED if no items
*/
NS_IMETHOD Last()=0;
/** Next will advance the list. will return failed if allready at end
*/
NS_IMETHOD Next()=0;
/** Prev will decrement the list. will return failed if allready at beginning
*/
NS_IMETHOD Prev()=0;
/** CurrentItem will return the CurrentItem item it will fail if the list is empty
* @param aItem return value
*/
NS_IMETHOD CurrentNode(nsIContent **aNode)=0;
/** return if the collection is at the end. that is the beginning following a call to Prev
* and it is the end of the list following a call to next
* @param aItem return value
*/
NS_IMETHOD IsDone()=0;
/** PositionAt will position the iterator to the supplied node
*/
NS_IMETHOD PositionAt(nsIContent* aCurNode)=0;
/** MakePre will make the iterator a pre-order iterator
*/
NS_IMETHOD MakePre()=0;
/** MakePost will make the iterator a post-order iterator
*/
NS_IMETHOD MakePost()=0;
};
class nsIPresShell;
class nsIGeneratedContentIterator : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IGENERATEDCONTENTITERTOR_IID)
/* Initializes an iterator for the subtree rooted by the node aRoot
*/
NS_IMETHOD Init(nsIPresShell *aShell, nsIDOMRange* aRange)=0;
NS_IMETHOD Init(nsIPresShell *aShell, nsIContent* aContent)=0;
};
#endif // __nsIContentIterator_h___

View File

@@ -0,0 +1,75 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIContentList_h___
#define nsIContentList_h___
#include "nsISupports.h"
#include "nsIContent.h"
#include "nsIDOMNode.h"
#include "nsCOMPtr.h"
// d72cb400-4b33-11d5-a041-0010a4ef48c9
#define NS_ICONTENTLIST_IID \
{ 0xd72cb400, 0x4b33, 0x11d5, { 0xa0, 0x41, 0x0, 0x10, 0xa4, 0xef, 0x48, 0xc9 } }
/**
* Interface for content list.
*/
class nsIContentList : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICONTENTLIST_IID)
// Callers will want to pass in PR_TRUE for aDoFlush unless they
// are explicitly avoiding an FlushPendingNotifications. The
// flush guarantees that the list will be up to date.
NS_IMETHOD GetLength(PRUint32* aLength, PRBool aDoFlush) = 0;
NS_IMETHOD Item(PRUint32 aIndex, nsIDOMNode** aReturn,
PRBool aDoFlush) = 0;
NS_IMETHOD NamedItem(const nsAString& aName, nsIDOMNode** aReturn,
PRBool aDoFlush) = 0;
NS_IMETHOD IndexOf(nsIContent *aContent, PRInt32& aIndex,
PRBool aDoFlush) = 0;
};
#endif /* nsIContentList_h___ */

View File

@@ -0,0 +1,58 @@
/* -*- Mode: C++; tab-width: 8; 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 code.
*
* The Initial Developer of the Original Code is Zero-Knowledge Systems,
* Inc. Portions created by Zero-Knowledge are Copyright (C) 2000
* Zero-Knowledge Systems, Inc. All Rights Reserved.
*
* Contributor(s):
*/
#include "nsISupports.idl"
interface nsIDOMWindow;
interface nsIURI;
/**
* Interface for content policy mechanism. Implementations of this
* interface can be used to control loading of various types of out-of-line
* content, or processing of certain types of in-line content.
*/
[scriptable,uuid(1cb4085d-5407-4169-bcfe-4c5ba013fa5b)]
interface nsIContentPolicy : nsISupports
{
const PRInt32 OTHER = 0;
const PRInt32 SCRIPT = 1;
const PRInt32 IMAGE = 2;
const PRInt32 STYLESHEET = 3;
const PRInt32 OBJECT = 4;
const PRInt32 SUBDOCUMENT = 5;
const PRInt32 CONTROL_TAG = 6;
const PRInt32 RAW_URL = 7;
const PRInt32 DOCUMENT = 8;
/**
* Should the content at this location be loaded and processed?
*
*/
boolean shouldLoad(in PRInt32 contentType, in nsIURI contentLocation,
in nsISupports ctxt, in nsIDOMWindow window);
/**
* Should the contents of the element in question be processed?
*/
boolean shouldProcess(in PRInt32 contentType, in nsIURI documentLocation,
in nsISupports ctxt, in nsIDOMWindow window);
};

View File

@@ -0,0 +1,99 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsIContentSerializer_h__
#define _nsIContentSerializer_h__
#include "nsISupports.h"
#include "nsAString.h"
#include "nsIAtom.h"
class nsIDOMText; /* forward declaration */
class nsIDOMCDATASection; /* forward declaration */
class nsIDOMProcessingInstruction; /* forward declaration */
class nsIDOMComment; /* forward declaration */
class nsIDOMDocumentType; /* forward declaration */
class nsIDOMElement; /* forward declaration */
/* starting interface: nsIContentSerializer */
#define NS_ICONTENTSERIALIZER_IID_STR "61e9b9a3-d30c-429e-b0cf-ade73466df06"
#define NS_ICONTENTSERIALIZER_IID \
{0x61e9b9a3, 0xd30c, 0x429e, \
{ 0xb0, 0xcf, 0xad, 0xe7, 0x34, 0x66, 0xdf, 0x06 }}
class nsIContentSerializer : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICONTENTSERIALIZER_IID)
NS_IMETHOD Init(PRUint32 flags, PRUint32 aWrapColumn,
nsIAtom* aCharSet, PRBool aIsCopying) = 0;
NS_IMETHOD AppendText(nsIDOMText* aText, PRInt32 aStartOffset,
PRInt32 aEndOffset, nsAString& aStr) = 0;
NS_IMETHOD AppendCDATASection(nsIDOMCDATASection* aCDATASection,
PRInt32 aStartOffset, PRInt32 aEndOffset,
nsAString& aStr) = 0;
NS_IMETHOD AppendProcessingInstruction(nsIDOMProcessingInstruction* aPI,
PRInt32 aStartOffset,
PRInt32 aEndOffset,
nsAString& aStr) = 0;
NS_IMETHOD AppendComment(nsIDOMComment* aComment, PRInt32 aStartOffset,
PRInt32 aEndOffset, nsAString& aStr) = 0;
NS_IMETHOD AppendDoctype(nsIDOMDocumentType *aDoctype,
nsAString& aStr) = 0;
NS_IMETHOD AppendElementStart(nsIDOMElement *aElement,
PRBool aHasChildren,
nsAString& aStr) = 0;
NS_IMETHOD AppendElementEnd(nsIDOMElement *aElement,
nsAString& aStr) = 0;
NS_IMETHOD Flush(nsAString& aStr) = 0;
};
#define NS_CONTENTSERIALIZER_CONTRACTID_PREFIX \
"@mozilla.org/layout/contentserializer;1?mimetype="
#endif /* __gen_nsIContentSerializer_h__ */

View File

@@ -0,0 +1,441 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIDocument_h___
#define nsIDocument_h___
#include "nsISupports.h"
#include "nsEvent.h"
#include "nsAString.h"
#include "nsString.h"
class nsIAtom;
class nsIArena;
class nsIContent;
class nsIDocumentContainer;
class nsIDocumentObserver;
class nsIPresContext;
class nsIPresShell;
class nsIStreamListener;
class nsIStreamObserver;
class nsIStyleSet;
class nsIStyleSheet;
class nsIStyleRule;
class nsIURI;
class nsILoadGroup;
class nsIViewManager;
class nsIScriptGlobalObject;
class nsIDOMEvent;
class nsIDeviceContext;
class nsIParser;
class nsIDOMNode;
class nsINameSpaceManager;
class nsIDOMDocumentFragment;
class nsILineBreaker;
class nsIWordBreaker;
class nsISelection;
class nsIChannel;
class nsIPrincipal;
class nsINodeInfoManager;
class nsIDOMDocument;
class nsIDOMDocumentType;
class nsIBindingManager;
class nsIObserver;
class nsISupportsArray;
class nsIScriptLoader;
class nsString;
class nsIFocusController;
class nsIContentSink;
// IID for the nsIDocument interface
#define NS_IDOCUMENT_IID \
{ 0x94c6ceb0, 0x9447, 0x11d1, \
{0x93, 0x23, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }
// The base value for the content ID counter.
// This counter is used by the document to
// assign a monotonically increasing ID to each content
// object it creates
#define NS_CONTENT_ID_COUNTER_BASE 10000
//----------------------------------------------------------------------
// Document interface
class nsIDocument : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOCUMENT_IID)
// All documents have a memory arena associated with them which is
// used for memory allocation during document creation. This call
// returns the arena associated with this document.
NS_IMETHOD GetArena(nsIArena** aArena) = 0;
NS_IMETHOD StartDocumentLoad(const char* aCommand,
nsIChannel* aChannel,
nsILoadGroup* aLoadGroup,
nsISupports* aContainer,
nsIStreamListener **aDocListener,
PRBool aReset,
nsIContentSink* aSink = nsnull) = 0;
NS_IMETHOD StopDocumentLoad() = 0;
/**
* Return the title of the document. May return null.
*/
virtual const nsString* GetDocumentTitle() const = 0;
/**
* Return the URL for the document. May return null.
*/
NS_IMETHOD GetDocumentURL(nsIURI** aURL) const = 0;
NS_IMETHOD SetDocumentURL(nsIURI* aURL) = 0;
/**
* Return the principal responsible for this document.
*/
NS_IMETHOD GetPrincipal(nsIPrincipal **aPrincipal) = 0;
/**
* Update principal responsible for this document to the intersection
* of its previous value and aPrincipal.
*/
NS_IMETHOD AddPrincipal(nsIPrincipal *aPrincipal) = 0;
/**
* Return the LoadGroup for the document. May return null.
*/
NS_IMETHOD GetDocumentLoadGroup(nsILoadGroup** aGroup) const = 0;
/**
* Return the base URL for relative URLs in the document. May return null (or the document URL).
*/
NS_IMETHOD GetBaseURL(nsIURI*& aURL) const = 0;
NS_IMETHOD SetBaseURL(nsIURI* aURL) = 0;
/**
* Get/Set the base target of a link in a document.
*/
NS_IMETHOD GetBaseTarget(nsAString &aBaseTarget)=0;
NS_IMETHOD SetBaseTarget(const nsAString &aBaseTarget)=0;
/**
* Return a standard name for the document's character set. This will
* trigger a startDocumentLoad if necessary to answer the question.
*/
NS_IMETHOD GetDocumentCharacterSet(nsAString& oCharSetID) = 0;
NS_IMETHOD SetDocumentCharacterSet(const nsAString& aCharSetID) = 0;
NS_IMETHOD GetDocumentCharacterSetSource(PRInt32* aCharsetSource) = 0;
NS_IMETHOD SetDocumentCharacterSetSource(PRInt32 aCharsetSource) = 0;
/**
* Add an observer that gets notified whenever the charset changes.
*/
NS_IMETHOD AddCharSetObserver(nsIObserver* aObserver) = 0;
/**
* Remove a charset observer.
*/
NS_IMETHOD RemoveCharSetObserver(nsIObserver* aObserver) = 0;
/**
* Return the language of this document.
*/
NS_IMETHOD GetContentLanguage(nsAString& aContentLanguage) const = 0;
#ifdef IBMBIDI
// The state BidiEnabled should persist across multiple views (screen, print)
// of the same document.
/**
* Check if the document contains bidi data.
* If so, we have to apply the Unicode Bidi Algorithm.
*/
NS_IMETHOD GetBidiEnabled(PRBool* aBidiEnabled) const = 0;
/**
* Indicate the document contains bidi data.
* Currently, we cannot disable bidi, because once bidi is enabled,
* it affects a frame model irreversibly, and plays even though
* the document no longer contains bidi data.
*/
NS_IMETHOD SetBidiEnabled(PRBool aBidiEnabled) = 0;
#endif // IBMBIDI
/**
* Return the Line Breaker for the document
*/
NS_IMETHOD GetLineBreaker(nsILineBreaker** aResult) = 0;
NS_IMETHOD SetLineBreaker(nsILineBreaker* aLineBreaker) = 0;
NS_IMETHOD GetWordBreaker(nsIWordBreaker** aResult) = 0;
NS_IMETHOD SetWordBreaker(nsIWordBreaker* aWordBreaker) = 0;
/**
* Access HTTP header data (this may also get set from other sources, like
* HTML META tags).
*/
NS_IMETHOD GetHeaderData(nsIAtom* aHeaderField, nsAString& aData) const = 0;
NS_IMETHOD SetHeaderData(nsIAtom* aheaderField, const nsAString& aData) = 0;
/**
* Create a new presentation shell that will use aContext for
* it's presentation context (presentation context's <b>must not</b> be
* shared among multiple presentation shell's).
*/
NS_IMETHOD CreateShell(nsIPresContext* aContext,
nsIViewManager* aViewManager,
nsIStyleSet* aStyleSet,
nsIPresShell** aInstancePtrResult) = 0;
virtual PRBool DeleteShell(nsIPresShell* aShell) = 0;
virtual PRInt32 GetNumberOfShells() = 0;
NS_IMETHOD GetShellAt(PRInt32 aIndex, nsIPresShell** aShell) = 0;
/**
* Return the parent document of this document. Will return null
* unless this document is within a compound document and has a
* parent. Note that this parent chain may cross chrome boundaries.
*/
NS_IMETHOD GetParentDocument(nsIDocument** aParent) = 0;
/**
* Set the parent document of this document.
*/
NS_IMETHOD SetParentDocument(nsIDocument* aParent) = 0;
/**
* Set the sub document for aContent to aSubDoc.
*/
NS_IMETHOD SetSubDocumentFor(nsIContent *aContent, nsIDocument* aSubDoc) = 0;
/**
* Get the sub document for aContent
*/
NS_IMETHOD GetSubDocumentFor(nsIContent *aContent,
nsIDocument** aSubDoc) = 0;
/**
* Find the content node for which aDocument is a sub document.
*/
NS_IMETHOD FindContentForSubDocument(nsIDocument *aDocument,
nsIContent **aContent) = 0;
/**
* Return the root content object for this document.
*/
NS_IMETHOD GetRootContent(nsIContent** aRoot) = 0;
NS_IMETHOD SetRootContent(nsIContent* aRoot) = 0;
/**
* Get the direct children of the document - content in
* the prolog, the root content and content in the epilog.
*/
NS_IMETHOD ChildAt(PRInt32 aIndex, nsIContent*& aResult) const = 0;
NS_IMETHOD IndexOf(nsIContent* aPossibleChild, PRInt32& aIndex) const = 0;
NS_IMETHOD GetChildCount(PRInt32& aCount) = 0;
/**
* Get the style sheets owned by this document.
* Style sheets are ordered, most significant last.
*/
NS_IMETHOD GetNumberOfStyleSheets(PRInt32* aCount) = 0;
NS_IMETHOD GetStyleSheetAt(PRInt32 aIndex, nsIStyleSheet** aSheet) = 0;
NS_IMETHOD GetIndexOfStyleSheet(nsIStyleSheet* aSheet, PRInt32* aIndex) = 0;
virtual void AddStyleSheet(nsIStyleSheet* aSheet, PRUint32 aFlags) = 0;
virtual void RemoveStyleSheet(nsIStyleSheet* aSheet) = 0;
NS_IMETHOD UpdateStyleSheets(nsISupportsArray* aOldSheets, nsISupportsArray* aNewSheets) = 0;
NS_IMETHOD InsertStyleSheetAt(nsIStyleSheet* aSheet, PRInt32 aIndex, PRBool aNotify) = 0;
virtual void SetStyleSheetDisabledState(nsIStyleSheet* aSheet,
PRBool aDisabled) = 0;
/**
* Set the object from which a document can get a script context.
* This is the context within which all scripts (during document
* creation and during event handling) will run.
*/
NS_IMETHOD GetScriptGlobalObject(nsIScriptGlobalObject** aGlobalObject) = 0;
NS_IMETHOD SetScriptGlobalObject(nsIScriptGlobalObject* aGlobalObject) = 0;
/**
* Get the name space manager for this document
*/
NS_IMETHOD GetNameSpaceManager(nsINameSpaceManager*& aManager) = 0;
/**
* Get the script loader for this document
*/
NS_IMETHOD GetScriptLoader(nsIScriptLoader** aScriptLoader) = 0;
/**
* Get the focus controller for this document
* This can usually be gotten through the ScriptGlobalObject, but
* it is set to null during document destruction, when we still might
* need to fire focus events.
*/
NS_IMETHOD GetFocusController(nsIFocusController** aFocusController) = 0;
//----------------------------------------------------------------------
// Document notification API's
/**
* Add a new observer of document change notifications. Whenever
* content is changed, appended, inserted or removed the observers are
* informed.
*/
virtual void AddObserver(nsIDocumentObserver* aObserver) = 0;
/**
* Remove an observer of document change notifications. This will
* return false if the observer cannot be found.
*/
virtual PRBool RemoveObserver(nsIDocumentObserver* aObserver) = 0;
// Observation hooks used by content nodes to propagate
// notifications to document observers.
NS_IMETHOD BeginUpdate() = 0;
NS_IMETHOD EndUpdate() = 0;
NS_IMETHOD BeginLoad() = 0;
NS_IMETHOD EndLoad() = 0;
NS_IMETHOD ContentChanged(nsIContent* aContent,
nsISupports* aSubContent) = 0;
// notify that one or two content nodes changed state
// either may be nsnull, but not both
NS_IMETHOD ContentStatesChanged(nsIContent* aContent1,
nsIContent* aContent2,
PRInt32 aStateMask) = 0;
NS_IMETHOD AttributeWillChange(nsIContent* aChild,
PRInt32 aNameSpaceID,
nsIAtom* aAttribute) = 0;
NS_IMETHOD AttributeChanged(nsIContent* aChild,
PRInt32 aNameSpaceID,
nsIAtom* aAttribute,
PRInt32 aModType,
PRInt32 aHint) = 0; // See nsStyleConsts fot hint values
NS_IMETHOD ContentAppended(nsIContent* aContainer,
PRInt32 aNewIndexInContainer) = 0;
NS_IMETHOD ContentInserted(nsIContent* aContainer,
nsIContent* aChild,
PRInt32 aIndexInContainer) = 0;
NS_IMETHOD ContentReplaced(nsIContent* aContainer,
nsIContent* aOldChild,
nsIContent* aNewChild,
PRInt32 aIndexInContainer) = 0;
NS_IMETHOD ContentRemoved(nsIContent* aContainer,
nsIContent* aChild,
PRInt32 aIndexInContainer) = 0;
// Observation hooks for style data to propagate notifications
// to document observers
NS_IMETHOD StyleRuleChanged(nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule,
PRInt32 aHint) = 0; // See nsStyleConsts fot hint values
NS_IMETHOD StyleRuleAdded(nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule) = 0;
NS_IMETHOD StyleRuleRemoved(nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule) = 0;
NS_IMETHOD HandleDOMEvent(nsIPresContext* aPresContext,
nsEvent* aEvent,
nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
nsEventStatus* aEventStatus) = 0;
NS_IMETHOD_(PRBool) EventCaptureRegistration(PRInt32 aCapturerIncrement) = 0;
NS_IMETHOD FlushPendingNotifications(PRBool aFlushReflows=PR_TRUE,
PRBool aUpdateViews=PR_FALSE) = 0;
NS_IMETHOD GetAndIncrementContentID(PRInt32* aID) = 0;
NS_IMETHOD GetBindingManager(nsIBindingManager** aResult) = 0;
NS_IMETHOD GetNodeInfoManager(nsINodeInfoManager*& aNodeInfoManager) = 0;
NS_IMETHOD Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup) = 0;
NS_IMETHOD ResetToURI(nsIURI *aURI, nsILoadGroup* aLoadGroup) = 0;
NS_IMETHOD AddReference(void *aKey, nsISupports *aReference) = 0;
NS_IMETHOD RemoveReference(void *aKey, nsISupports **aOldReference) = 0;
/**
* Set the container (docshell) for this document.
*/
NS_IMETHOD SetContainer(nsISupports *aContainer) = 0;
/**
* Get the container (docshell) for this document.
*/
NS_IMETHOD GetContainer(nsISupports **aContainer) = 0;
};
// XXX These belong somewhere else
extern NS_EXPORT nsresult
NS_NewHTMLDocument(nsIDocument** aInstancePtrResult);
extern NS_EXPORT nsresult
NS_NewXMLDocument(nsIDocument** aInstancePtrResult);
#ifdef MOZ_SVG
extern NS_EXPORT nsresult
NS_NewSVGDocument(nsIDocument** aInstancePtrResult);
#endif
extern NS_EXPORT nsresult
NS_NewImageDocument(nsIDocument** aInstancePtrResult);
extern NS_EXPORT nsresult
NS_NewDocumentFragment(nsIDOMDocumentFragment** aInstancePtrResult,
nsIDocument* aOwnerDocument);
extern NS_EXPORT nsresult
NS_NewDOMDocument(nsIDOMDocument** aInstancePtrResult,
const nsAString& aNamespaceURI,
const nsAString& aQualifiedName,
nsIDOMDocumentType* aDoctype,
nsIURI* aBaseURI);
// Note: The buffer passed into NewPostData(...) becomes owned by the IPostData
// instance and is freed when the instance is destroyed...
//
#if 0
extern NS_EXPORT nsresult
NS_NewPostData(PRBool aIsFile, char *aData, nsIPostData** aInstancePtrResult);
#endif
#endif /* nsIDocument_h___ */

View File

@@ -0,0 +1,91 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIDocumentContainer_h___
#define nsIDocumentContainer_h___
#include "nsISupports.h"
class nsIScriptable;
class nsIScriptEnvironment;
class nsIURI;
#define NS_IDOCUMENT_CONTAINER_IID \
{ 0x8efd4470, 0x944d, 0x11d1, \
{0x93, 0x23, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }
class nIDocumentContainer : public nsISupports {
public:
/**
* Display the specified URL with the given connection.
*
* @param url the URL to display
* @param connection the connection to use.
*/
virtual void Display(nsIURI* aURL) = 0;
/**
* Returns a script environment for the specified language and version.
* The expectation is that the script environment already has been
* set up with a container object. If a script environment has already
* been requested for the given language, the same instance should
* be returned.
*
* @param language the scripting language for the environment. If this
* is null, returns the default scripting environment.
* @param majorVersion the major version number of the language
* @param minorVersion the minor version number of the language
* @return the script environment for the language
* @see mg.magellan.script.IScriptEnvrionment
*/
virtual nsIScriptEnvironment*
GetScriptEnvironment(nsString* aLanguage,
PRInt32 aMajorVersion,
PRInt32 aMinorVersion) = 0;
/**
* Returns the scriptable container object for the document container.
* The scriptable object will be used as the scoping object in the
* definition of scriptable classes used in the Document Object Model.
*
* @return the scriptable container for the application
* @see mg.magellan.script.IScriptable
* @see mg.magellan.script.IScriptEnvrionment
*/
virtual nsIScriptable* GetScriptableContainer() = 0;
};
#endif /* nsIDocumentContainer_h___ */

View File

@@ -0,0 +1,237 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIDocumentEncoder_h__
#define nsIDocumentEncoder_h__
#include "nsISupports.h"
#include "nsString.h"
class nsIDocumentEncoder;
class nsIDocument;
class nsIDOMRange;
class nsISelection;
class nsIOutputStream;
class nsISupportsArray;
class nsIDOMNode;
#define NS_IDOCUMENT_ENCODER_IID \
{ /* a6cf9103-15b3-11d2-932e-00805f8add32 */ \
0xa6cf9103, \
0x15b3, \
0x11d2, \
{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} \
}
#define NS_TEXT_ENCODER_CID \
{ /* e7ba1480-1dea-11d3-830f-00104bed045e */ \
0xe7ba1480, \
0x1dea, \
0x11d3, \
{0x83, 0x0f, 0x00, 0x10, 0x4b, 0xed, 0x04, 0x5e} \
}
#define NS_DOC_ENCODER_CONTRACTID_BASE "@mozilla.org/layout/documentEncoder;1?type="
// {7f915b01-98fc-11d4-8eb0-a803f80ff1bc}
#define NS_HTMLCOPY_TEXT_ENCODER_CID \
{ 0x7f915b01, 0x98fc, 0x11d4, { 0x8e, 0xb0, 0xa8, 0x03, 0xf8, 0x0f, 0xf1, 0xbc } }
// {0BC1FAC0-B710-11d4-959F-0020183BF181}
#define NS_IDOCUMENTENCODERNODEFIXUP_IID \
{ 0xbc1fac0, 0xb710, 0x11d4, { 0x95, 0x9f, 0x0, 0x20, 0x18, 0x3b, 0xf1, 0x81 } }
#define NS_HTMLCOPY_ENCODER_CONTRACTID "@mozilla.org/layout/htmlCopyEncoder;1"
class nsIDocumentEncoderNodeFixup : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOCUMENTENCODERNODEFIXUP_IID)
/**
* Create a fixed up version of a node. This method is called before
* each node in a document is about to be persisted. The implementor
* may return a new node with fixed up attributes or nsnull.
*/
NS_IMETHOD FixupNode(nsIDOMNode *aNode, nsIDOMNode **aOutNode) = 0;
};
class nsIDocumentEncoder : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOCUMENT_ENCODER_IID)
/**
* Output methods flag bits.
*
* There are a frightening number of these,
* because everyone wants something a little bit different!
*
* These should move to an idl file so that Javascript can
* have access to the symbols, not just the constants.
*/
enum {
// Output only the selection (as opposed to the whole document).
OutputSelectionOnly = 1,
// Plaintext output: Convert html to plaintext that looks like the html.
// Implies wrap (except inside <pre>), since html wraps.
// HTML output: always do prettyprinting, ignoring existing formatting.
// (Probably not well tested for HTML output.)
OutputFormatted = 2,
// OutputRaw is used by copying text from widgets
OutputRaw = 4,
// No html head tags
OutputBodyOnly = 8,
// Wrap even if we're not doing formatted output (e.g. for text fields)
OutputPreformatted = 16,
// Output as though the content is preformatted
// (e.g. maybe it's wrapped in a MOZ_PRE or MOZ_PRE_WRAP style tag)
OutputWrap = 32,
// Output for format flowed (RFC 2646). This is used when converting
// to text for mail sending. This differs just slightly
// but in an important way from normal formatted, and that is that
// lines are space stuffed. This can't (correctly) be done later.
OutputFormatFlowed = 64,
// Convert links, image src, and script src to absolute URLs when possible
OutputAbsoluteLinks = 128,
// Encode entities when outputting to a string.
// E.g. If set, we'll output &nbsp; if clear, we'll output 0xa0.
OutputEncodeEntities = 256,
// LineBreak processing: we can do either platform line breaks,
// CR, LF, or CRLF. If neither of these flags is set, then we
// will use platform line breaks.
OutputCRLineBreak = 512,
OutputLFLineBreak = 1024,
// Output the content of noscript elements (only for serializing
// to plaintext).
OutputNoScriptContent = 2048,
// Output the content of noframes elements (only for serializing
// to plaintext).
OutputNoFramesContent = 4096,
// Don't allow any formatting nodes (e.g. <br>, <b>) inside a <pre>.
// This is used primarily by mail.
OutputNoFormattingInPre = 8192
};
/**
* Initialize with a pointer to the document and the mime type.
*/
NS_IMETHOD Init(nsIDocument* aDocument, const nsAString& aMimeType,
PRUint32 flags) = 0;
/**
* If the selection is set to a non-null value, then the
* selection is used for encoding, otherwise the entire
* document is encoded.
*/
NS_IMETHOD SetSelection(nsISelection* aSelection) = 0;
/**
* If the range is set to a non-null value, then the
* range is used for encoding, otherwise the entire
* document or selection is encoded.
*/
NS_IMETHOD SetRange(nsIDOMRange* aRange) = 0;
/**
* Documents typically have an intrinsic character set.
* If no intrinsic value is found, the platform character set
* is used.
* aCharset overrides the both the intrinsic or platform
* character set when encoding the document.
*
* Possible result codes: NS_ERROR_NO_CHARSET_CONVERTER
*/
NS_IMETHOD SetCharset(const nsAString& aCharset) = 0;
/**
* Set a wrap column. This may have no effect in some types of encoders.
*/
NS_IMETHOD SetWrapColumn(PRUint32 aWC) = 0;
/**
* Get the mime type preferred by the encoder. This piece of api was
* added because the copy encoder may need to switch mime types on you
* if you ask it to copy html that really represents plaintext content.
* Call this AFTER Init() and SetSelection() have both been called.
*/
NS_IMETHOD GetMimeType(nsAString& aMimeType) = 0;
/**
* The document is encoded, the result is sent to the
* to nsIOutputStream.
*
* Possible result codes are passing along whatever stream errors
* might have been encountered.
*/
NS_IMETHOD EncodeToStream(nsIOutputStream* aStream) = 0;
NS_IMETHOD EncodeToString(nsAString& aOutputString) = 0;
/**
* The document is encoded, the result is sent to the
* to aEncodedString. Parent heirarchy information is encoded
* to aContextString. Extra context info is encoded in aInfoString.
*
*/
NS_IMETHOD EncodeToStringWithContext(nsAString& aEncodedString,
nsAString& aContextString,
nsAString& aInfoString) = 0;
/**
* Set the fixup object associated with node persistence.
*/
NS_IMETHOD SetNodeFixup(nsIDocumentEncoderNodeFixup *aFixup) = 0;
};
#endif /* nsIDocumentEncoder_h__ */

View File

@@ -0,0 +1,333 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIDocumentObserver_h___
#define nsIDocumentObserver_h___
#include "nsISupports.h"
class nsIAtom;
class nsIContent;
class nsIPresShell;
class nsIStyleSheet;
class nsIStyleRule;
class nsString;
class nsIDocument;
#define NS_IDOCUMENT_OBSERVER_IID \
{ 0xb3f92460, 0x944c, 0x11d1, {0x93, 0x23, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
// Document observer interface
class nsIDocumentObserver : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOCUMENT_OBSERVER_IID)
/**
* Notify that a content model update is beginning. This call can be
* nested.
*/
NS_IMETHOD BeginUpdate(nsIDocument *aDocument) = 0;
/**
* Notify that a content model update is finished. This call can be
* nested.
*/
NS_IMETHOD EndUpdate(nsIDocument *aDocument) = 0;
/**
* Notify the observer that a document load is beginning.
*/
NS_IMETHOD BeginLoad(nsIDocument *aDocument) = 0;
/**
* Notify the observer that a document load has finished. Note that
* the associated reflow of the document will be done <b>before</b>
* EndLoad is invoked, not after.
*/
NS_IMETHOD EndLoad(nsIDocument *aDocument) = 0;
/**
* Notify the observer that the document is being reflowed in
* the given presentation shell.
*/
NS_IMETHOD BeginReflow(nsIDocument *aDocument, nsIPresShell* aShell) = 0;
/**
* Notify the observer that the document is done being reflowed in
* the given presentation shell.
*/
NS_IMETHOD EndReflow(nsIDocument *aDocument, nsIPresShell* aShell) = 0;
/**
* Notification that the content model has changed. This method is
* called automatically by content objects when their state is changed
* (therefore there is normally no need to invoke this method
* directly). The notification is passed to any
* IDocumentObservers. The notification is passed on to all of the
* document observers. <p>
*
* This notification is not sent when a piece of content is
* added/removed from the document (the other notifications are used
* for that).
*
* @param aDocument The document being observed
* @param aContent the piece of content that changed
* @param aSubContent subrange information about the piece of content
* that changed
*/
NS_IMETHOD ContentChanged(nsIDocument *aDocument,
nsIContent* aContent,
nsISupports* aSubContent) = 0;
/**
* Notification that the state of a content node has changed.
* (ie: gained or lost focus, became active or hovered over)
* This method is called automatically by content objects
* when their state is changed (therefore there is normally
* no need to invoke this method directly). The notification
* is passed to any IDocumentObservers. The notification is
* passed on to all of the document observers. <p>
*
* This notification is not sent when a piece of content is
* added/removed from the document or the content itself changed
* (the other notifications are used for that).
*
* The optional second content node is to allow optimization
* of the case where state moves from one node to another
* (as is likely for :focus and :hover)
*
* Either content node may be nsnull, but not both
*
* @param aDocument The document being observed
* @param aContent1 the piece of content that changed
* @param aContent2 optional second piece of content that changed
*/
NS_IMETHOD ContentStatesChanged(nsIDocument* aDocument,
nsIContent* aContent1,
nsIContent* aContent2,
PRInt32 aStateMask) = 0;
/**
* Notification that the content model has changed. This method is called
* automatically by content objects when an attribute's value has changed
* (therefore there is normally no need to invoke this method directly). The
* notification is passed to any IDocumentObservers document observers. <p>
*
* @param aDocument The document being observed
* @param aContent the piece of content whose attribute changed
* @param aAttribute the atom name of the attribute
* @param aModType Whether or not the attribute was added, changed, or removed.
* The constants are defined in nsIDOMMutationEvent.h.
* @param aHint The style hint.
*/
NS_IMETHOD AttributeChanged(nsIDocument *aDocument,
nsIContent* aContent,
PRInt32 aNameSpaceID,
nsIAtom* aAttribute,
PRInt32 aModType,
PRInt32 aHint) = 0; // See nsStyleConsts fot hint values
/**
* Notifcation that the content model has had data appended to the
* given content object. This method is called automatically by the
* content container objects when a new content object is appended to
* the container (therefore there is normally no need to invoke this
* method directly). The notification is passed on to all of the
* document observers.
*
* @param aDocument The document being observed
* @param aContainer the container that had a new child appended
* @param aNewIndexInContainer the index in the container of the first
* new child
*/
NS_IMETHOD ContentAppended(nsIDocument *aDocument,
nsIContent* aContainer,
PRInt32 aNewIndexInContainer) = 0;
/**
* Notification that content has been inserted. This method is called
* automatically by the content container objects when a new content
* object is inserted in the container (therefore there is normally no
* need to invoke this method directly). The notification is passed on
* to all of the document observers.
*
* @param aDocument The document being observed
* @param aContainer the container that now contains aChild
* @param aChild the child that was inserted
* @param aIndexInContainer the index of the child in the container
*/
NS_IMETHOD ContentInserted(nsIDocument *aDocument,
nsIContent* aContainer,
nsIContent* aChild,
PRInt32 aIndexInContainer) = 0;
/**
* Notification that content has been replaced. This method is called
* automatically by the content container objects when a content object
* is replaced in the container (therefore there is normally no need to
* invoke this method directly). The notification is passed on to all
* of the document observers.
*
* @param aDocument The document being observed
* @param aContainer the container that now contains aChild
* @param aOldChild the child that was replaced
* @param aNewChild the child that replaced aOldChild
* @param aIndexInContainer the index of the old and new child in the
* container
*/
NS_IMETHOD ContentReplaced(nsIDocument *aDocument,
nsIContent* aContainer,
nsIContent* aOldChild,
nsIContent* aNewChild,
PRInt32 aIndexInContainer) = 0;
/**
* Content has just been removed. This method is called automatically
* by content container objects when a content object has just been
* removed from the container (therefore there is normally no need to
* invoke this method directly). The notification is passed on to all
* of the document observers.
*
* @param aDocument The document being observed
* @param aContainer the container that had a child removed
* @param aChild the child that was just removed
* @param aIndexInContainer the index of the child in the container
* before it was removed
*/
NS_IMETHOD ContentRemoved(nsIDocument *aDocument,
nsIContent* aContainer,
nsIContent* aChild,
PRInt32 aIndexInContainer) = 0;
/**
* A StyleSheet has just been added to the document.
* This method is called automatically when a StyleSheet gets added
* to the document. The notification is passed on to all of the
* document observers.
*
* @param aDocument The document being observed
* @param aStyleSheet the StyleSheet that has been added
*/
NS_IMETHOD StyleSheetAdded(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet) = 0;
/**
* A StyleSheet has just been removed from the document.
* This method is called automatically when a StyleSheet gets removed
* from the document. The notification is passed on to all of the
* document observers.
*
* @param aDocument The document being observed
* @param aStyleSheet the StyleSheet that has been removed
*/
NS_IMETHOD StyleSheetRemoved(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet) = 0;
/**
* A StyleSheet has just disabled or enabled.
* This method is called automatically when the disabled state
* of a StyleSheet gets changed. The style sheet passes this
* notification to the document. The notification is passed on
* to all of the document observers.
*
* @param aDocument The document being observed
* @param aStyleSheet the StyleSheet that has been added
* @param aDisabled PR_TRUE if the sheet is disabled, PR_FALSE if
* it is enabled
*/
NS_IMETHOD StyleSheetDisabledStateChanged(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet,
PRBool aDisabled) = 0;
/**
* A StyleRule has just been modified within a style sheet.
* This method is called automatically when the rule gets
* modified. The style sheet passes this notification to
* the document. The notification is passed on to all of
* the document observers.
*
* @param aDocument The document being observed
* @param aStyleSheet the StyleSheet that contians the rule
* @param aStyleRule the rule that was modified
* @param aHint some possible info about the nature of the change
*/
NS_IMETHOD StyleRuleChanged(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule,
PRInt32 aHint) = 0; // See nsStyleConsts fot hint values
/**
* A StyleRule has just been added to a style sheet.
* This method is called automatically when the rule gets
* added to the sheet. The style sheet passes this
* notification to the document. The notification is passed on
* to all of the document observers.
*
* @param aDocument The document being observed
* @param aStyleSheet the StyleSheet that has been modified
* @param aStyleRule the rule that was added
*/
NS_IMETHOD StyleRuleAdded(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule) = 0;
/**
* A StyleRule has just been removed from a style sheet.
* This method is called automatically when the rule gets
* removed from the sheet. The style sheet passes this
* notification to the document. The notification is passed on
* to all of the document observers.
*
* @param aDocument The document being observed
* @param aStyleSheet the StyleSheet that has been modified
* @param aStyleRule the rule that was removed
*/
NS_IMETHOD StyleRuleRemoved(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule) = 0;
/**
* The document is in the process of being destroyed.
* This method is called automatically during document
* destruction.
*
* @param aDocument The document being observed
*/
NS_IMETHOD DocumentWillBeDestroyed(nsIDocument *aDocument) = 0;
};
#endif /* nsIDocumentObserver_h___ */

View File

@@ -0,0 +1,72 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIDocumentViewer_h___
#define nsIDocumentViewer_h___
#include "nsIContentViewer.h"
class nsIDocument;
class nsIPresContext;
class nsIPresShell;
class nsIStyleSheet;
#define NS_IDOCUMENT_VIEWER_IID \
{ 0xa6cf9057, 0x15b3, 0x11d2,{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
/**
* A document viewer is a kind of content viewer that uses NGLayout
* to manage the presentation of the content.
*/
class nsIDocumentViewer : public nsIContentViewer
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOCUMENT_VIEWER_IID)
NS_IMETHOD SetUAStyleSheet(nsIStyleSheet* aUAStyleSheet) = 0;
NS_IMETHOD GetDocument(nsIDocument*& aResult) = 0;
NS_IMETHOD GetPresShell(nsIPresShell*& aResult) = 0;
NS_IMETHOD GetPresContext(nsIPresContext*& aResult) = 0;
NS_IMETHOD CreateDocumentViewerUsing(nsIPresContext* aPresContext,
nsIDocumentViewer*& aResult) = 0;
};
#endif /* nsIDocumentViewer_h___ */

View File

@@ -0,0 +1,82 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator.
*
* The Initial Developer of the Original Code is
* Netscape Communications.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Mike Pinkerton <pinkerton@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
interface nsIDOMEventTarget;
interface nsIWebNavigation;
interface nsIOverrideDragSource;
interface nsIOverrideDropSite;
/**
* @status UNDER_REVIEW
*/
/**
* Interface for communicating with the built-in drag and drop
* implementation in the content area. Use this to register where
* the listeners should attach (something that implements
* |nsIDOMEventReceiver| which is what we end up using under the hood).
*/
[scriptable,uuid(4f418f58-f834-4736-a755-e0395bedca9d)]
interface nsIDragDropHandler : nsISupports
{
/**
* Attach drag handlers to receiver specified by |attachPoint| and
* specify callbacks to allow overriding of the built-in behaviors.
*
* @param attachPoint hookup listeners to this location
* @param navigator loads dropped urls via this interface. If NULL,
* the client must handle the drop itself, either
* through the method provided via |overrideDrop| or
* by letting the event bubble up through the DOM.
* @param overrideDrag callback to client to override portions of the
* drag start action. Can be NULL.
* @param overrideDrop callback to client to override portions of the
* drop action. Can be NULL.
*/
void hookupTo(in nsIDOMEventTarget attachPoint, in nsIWebNavigation navigator,
in nsIOverrideDragSource overrideDrag,
in nsIOverrideDropSite overrideDrop);
/**
* Unregister all handlers related to drag&drop
*/
void detach();
};

View File

@@ -0,0 +1,122 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator.
*
* The Initial Developer of the Original Code is
* Netscape Communications.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Mike Pinkerton <pinkerton@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
interface nsIDOMEventTarget;
interface nsIWebNavigation;
interface nsITransferable;
interface nsIDragSession;
interface nsIDOMEvent;
/**
* @status UNDER_REVIEW
*/
/**
* Interfaces for overriding the built-in drag and drop
* implementation in the content area. Use this to do things
* such as prevent a drag from starting, adding or removing
* data and flavors, or preventing the drop.
*/
/**
* Overrides operations at the source of a drag. Can prevent
* drag from starting and can modify what flavors/data are
* presented to the OS.
*/
[scriptable,uuid(e03e6c5e-0d84-4c0b-8739-e6b8d51922de)]
interface nsIOverrideDragSource : nsISupports
{
/**
* Prevents the drag from starting
*
* @param event DOM event (drag gesture)
*
* @return TRUE drag can proceed
* @return FALSE drag is cancelled, does not go to OS
*/
boolean allowStart(in nsIDOMEvent event);
/**
* Alter the flavors or data presented to the OS
*
* @param trans the transferable holding the list of flavors
* and the data for each flavor
*/
void modify(in nsITransferable trans);
};
/**
* Overrides operations at the destination of a drag. Can prevent
* drag from completing and provide an alternative action than
* the built-in behavior for a drop.
*/
[scriptable,uuid(a0ea9862-e2e6-4fd7-8cab-72afeb53c793)]
interface nsIOverrideDropSite : nsISupports
{
/**
* Tells the OS a drop is not allowed on this browser
*
* @param event DOM event (drag over)
* @param session the drag session from which client can get
* the flavors present or the actual data
*
* @return TRUE indicates to OS that if a drop does happen on this
* browser, it will be accepted.
* @return FALSE indicates to OS drop is not allowed. On win32, this
* will change the cursor to "reject".
*/
boolean allowDrop(in nsIDOMEvent event, in nsIDragSession session);
/**
* Provide an alternative action to the built-in behavior when
* something is dropped on the browser
*
* @param event DOM event (drag drop)
* @param trans the transferable holding the list of flavors
* and the data for each flavor
*
* @return TRUE action was handled, do not perform built-in
* behavior
* @return FALSE action was not overridden, do built-in behavior
*/
boolean dropAction(in nsIDOMEvent event, in nsITransferable trans);
};

View File

@@ -0,0 +1,85 @@
/* -*- Mode: c++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIElementFactory_h___
#define nsIElementFactory_h___
#include "nsISupports.h"
class nsIContent;
class nsINodeInfo;
/* a6cf90fb-15b3-11d2-932e-00805f8add32 */
#define NS_IELEMENT_FACTORY_IID \
{ 0xa6cf90fb, 0x15b3, 0x11d2,{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
/**
* An API for creating html content objects
*/
class nsIElementFactory : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IELEMENT_FACTORY_IID)
NS_IMETHOD CreateInstanceByTag(nsINodeInfo *aNodeInfo,
nsIContent** aResult) = 0;
};
// ContractIDs for element factory registration
#define NS_ELEMENT_FACTORY_CONTRACTID "@mozilla.org/layout/element-factory;1"
#define NS_ELEMENT_FACTORY_CONTRACTID_PREFIX NS_ELEMENT_FACTORY_CONTRACTID "?namespace="
#define NS_HTML_NAMESPACE "http://www.w3.org/1999/xhtml"
#define NS_XML_NAMESPACE "http://www.w3.org/XML/1998/namespace"
#define NS_HTML_ELEMENT_FACTORY_CONTRACTID NS_ELEMENT_FACTORY_CONTRACTID_PREFIX NS_HTML_NAMESPACE
#define NS_XML_ELEMENT_FACTORY_CONTRACTID NS_ELEMENT_FACTORY_CONTRACTID_PREFIX NS_XML_NAMESPACE
#ifdef MOZ_MATHML
#define NS_MATHML_NAMESPACE "http://www.w3.org/1998/Math/MathML"
#define NS_MATHML_ELEMENT_FACTORY_CONTRACTID NS_ELEMENT_FACTORY_CONTRACTID_PREFIX NS_MATHML_NAMESPACE
#endif
#ifdef MOZ_SVG
#define NS_SVG_DEPRECATED_NAMESPACE "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.svg"
#define NS_SVG_DEPRECATED_ELEMENT_FACTORY_CONTRACTID \
NS_ELEMENT_FACTORY_CONTRACTID_PREFIX NS_SVG_DEPRECATED_NAMESPACE
#define NS_SVG_NAMESPACE "http://www.w3.org/2000/svg"
#define NS_SVG_ELEMENT_FACTORY_CONTRACTID NS_ELEMENT_FACTORY_CONTRACTID_PREFIX NS_SVG_NAMESPACE
#endif
#endif /* nsIElementFactory_h___ */

View File

@@ -0,0 +1,114 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Johnny Stenback <jst@netscape.com> (original author)
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIFrameLoader_h___
#define nsIFrameLoader_h___
#include "nsISupports.h"
#include "nsAString.h"
// Forward declarations
class nsIContent;
class nsIDocShell;
class nsIURI;
// IID for the nsIFrameLoader interface
#define NS_IFRAMELOADER_IID \
{ 0x51e2b6df, 0xdaf2, 0x4a2f, \
{0x80, 0xe5, 0xed, 0x69, 0x5b, 0x8c, 0x67, 0x4f} }
// IID for the nsIFrameLoaderOwner interface
#define NS_IFRAMELOADEROWNER_IID \
{ 0x0080d493, 0x96b4, 0x4606, \
{0xa7, 0x43, 0x0f, 0x47, 0xee, 0x87, 0x14, 0xd1} }
// CID for the nsIFrameLoader implementation
#define NS_FRAMELOADER_CID \
{ 0x712603da, 0xf245, 0x4503, \
{0xa5, 0x41, 0xb0, 0x49, 0xcb, 0x06, 0x81, 0xae} }
#define NS_FRAMELOADER_CONTRACTID "@mozilla.org/content/frameloader"
class nsIFrameLoader : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFRAMELOADER_IID)
/**
* Initialize the frame loader, hand it the owner content. Note that
* the owner content reference is a weak reference, if the owner
* content is destroyed before the frame loader goes away the owner
* content must call the Destroy() method to clear the owner content
* reference.
*/
NS_IMETHOD Init(nsIContent *aOwner) = 0;
/**
* Start loading the frame. This method figures out what to load
* from the owner content in the frame loader.
*/
NS_IMETHOD LoadFrame() = 0;
/**
* Get the docshell from the frame loader.
*/
NS_IMETHOD GetDocShell(nsIDocShell **aDocShell) = 0;
/**
* Destroy the frame loader and everything inside it. This will
* clear the weak owner content reference. */
NS_IMETHOD Destroy() = 0;
};
class nsIFrameLoaderOwner : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFRAMELOADEROWNER_IID)
/**
* Get the frame loader from the frame loader owner.
*/
NS_IMETHOD GetFrameLoader(nsIFrameLoader **aFrameLoader) = 0;
};
nsresult
NS_NewFrameLoader(nsIFrameLoader **aFrameLoader);
#endif /* nsIFrameLoader_h___ */

View File

@@ -0,0 +1,65 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _nsIPlainTextSink_h__
#define _nsIPlainTextSink_h__
#include "nsISupports.h"
#include "nsAString.h"
#define NS_PLAINTEXTSINK_CONTRACTID "@mozilla.org/layout/plaintextsink;1"
/* starting interface: nsIContentSerializer */
#define NS_IHTMLTOTEXTSINK_IID_STR "b12b5643-07cb-401e-aabb-64b2dcd2717f"
#define NS_IHTMLTOTEXTSINK_IID \
{0xb12b5643, 0x07cb, 0x401e, \
{ 0xaa, 0xbb, 0x64, 0xb2, 0xdc, 0xd2, 0x71, 0x7f }}
class nsIHTMLToTextSink : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IHTMLTOTEXTSINK_IID)
NS_IMETHOD Initialize(nsAString* aOutString,
PRUint32 aFlags, PRUint32 aWrapCol) = 0;
// This function violates string ownership rules, see impl.
};
#endif

View File

@@ -0,0 +1,91 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsINameSpace_h___
#define nsINameSpace_h___
#include "nsISupports.h"
class nsIAtom;
class nsString;
class nsINameSpaceManager;
#define NS_INAMESPACE_IID \
{ 0xa6cf90d4, 0x15b3, 0x11d2, \
{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
/**
* A nsINameSpace registers the NameSpace URI with the NameSpaceManager
* (creating or finding an ID), and manages the relationship between
* the NameSpace ID and the (optional) Prefix.
*
* New NameSpaces are created as a child of an existing NameSpace. Searches
* for NameSpaces based on prefix search up the chain of nested NameSpaces
*
* Each NameSpace keeps a live reference on its parent and its Manager.
*
*/
class nsINameSpace : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_INAMESPACE_IID)
NS_IMETHOD GetNameSpaceManager(nsINameSpaceManager*& aManager) const = 0;
// Get data of this name space
NS_IMETHOD GetNameSpaceID(PRInt32& aID) const = 0;
NS_IMETHOD GetNameSpaceURI(nsAString& aURI) const = 0;
NS_IMETHOD GetNameSpacePrefix(nsIAtom*& aPrefix) const = 0;
NS_IMETHOD GetParentNameSpace(nsINameSpace*& aParent) const = 0;
// find name space within self and parents (not children)
NS_IMETHOD FindNameSpace(nsIAtom* aPrefix, nsINameSpace*& aNameSpace) const = 0;
NS_IMETHOD FindNameSpaceID(nsIAtom* aPrefix, PRInt32& aNameSpaceID) const = 0;
NS_IMETHOD FindNameSpacePrefix(PRInt32 aNameSpaceID, nsIAtom*& aPrefix) const = 0;
// create new child name space
NS_IMETHOD CreateChildNameSpace(nsIAtom* aPrefix,
const nsAString& aURI,
nsINameSpace*& aChildNameSpace) = 0;
NS_IMETHOD CreateChildNameSpace(nsIAtom* aPrefix, PRInt32 aNameSpaceID,
nsINameSpace*& aChildNameSpace) = 0;
};
#endif // nsINameSpace_h___

View File

@@ -0,0 +1,114 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsINameSpaceManager_h___
#define nsINameSpaceManager_h___
#include "nsISupports.h"
#include "nsAString.h"
class nsIAtom;
class nsString;
class nsINameSpace;
class nsIElementFactory;
#define kNameSpaceID_Unknown -1
#define kNameSpaceID_None 0
#define kNameSpaceID_XMLNS 1 // not really a namespace, but it needs to play the game
#define kNameSpaceID_XML 2
#define kNameSpaceID_XHTML 3
#define kNameSpaceID_XLink 4
#define kNameSpaceID_XSLT 5
#define kNameSpaceID_XBL 6
#define kNameSpaceID_MathML 7
// 'html' is by definition bound to the namespace name "urn:w3-org-ns:HTML" XXX ???
// 'xml' is by definition bound to the namespace name "urn:Connolly:input:required" XXX
#define NS_INAMESPACEMANAGER_IID \
{ 0xa6cf90d5, 0x15b3, 0x11d2, \
{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
/**
* The Name Space Manager tracks the associtation between a NameSpace
* URI and the PRInt32 runtime id. Mappings between NameSpaces and
* NameSpace prefixes are managed by nsINameSpaces
*
* All NameSpace URIs are stored in a global table so that IDs are
* consistent accross the app. NameSpace IDs are only consistent at runtime
* ie: they are not guaranteed to be consistent accross app sessions.
*
* The nsINameSpaceManager needs to have a live reference for as long as
* the NameSpace IDs are needed. Generally, a document keeps a reference to
* a nsINameSpaceManager. Also, each nsINameSpace that comes from the manager
* keeps a reference to it.
*
* To create a stack of NameSpaces, call CreateRootNameSpace, and then create
* child NameSpaces from the root.
*
* The "html" and "xml" namespaces come "pre-canned" from the root.
*
*/
class nsINameSpaceManager : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_INAMESPACEMANAGER_IID)
NS_IMETHOD CreateRootNameSpace(nsINameSpace*& aRootNameSpace) = 0;
NS_IMETHOD RegisterNameSpace(const nsAString& aURI,
PRInt32& aNameSpaceID) = 0;
NS_IMETHOD GetNameSpaceURI(PRInt32 aNameSpaceID,
nsAString& aURI) = 0;
NS_IMETHOD GetNameSpaceID(const nsAString& aURI,
PRInt32& aNameSpaceID) = 0;
NS_IMETHOD GetElementFactory(PRInt32 aNameSpaceID,
nsIElementFactory **aElementFactory) = 0;
};
nsresult
NS_NewNameSpaceManager(nsINameSpaceManager** aInstancePtrResult);
void
NS_NameSpaceManagerShutdown();
#endif // nsINameSpaceManager_h___

View File

@@ -0,0 +1,372 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* nsINodeInfo is an interface to node info, such as name, prefix, namespace
* ID and possibly other data that is shared between nodes (elements
* and attributes) that have the same name, prefix and namespace ID within
* the same document.
*
* nsINodeInfoManager is an interface to an object that manages a list of
* nsINodeInfo's, every document object should hold a strong reference to
* a nsINodeInfoManager and every nsINodeInfo also holds a strong reference
* to their owning manager. When a nsINodeInfo is no longer used it will
* automatically remove itself from its owner manager, and when all
* nsINodeInfo's have been removed from a nsINodeInfoManager and all external
* references are released the nsINodeInfoManager deletes itself.
*
* -- jst@netscape.com
*/
#ifndef nsINodeInfo_h___
#define nsINodeInfo_h___
#include "nsISupports.h"
#include "nsIAtom.h"
#include "nsAString.h"
#include "domstubs.h"
#include "nsINameSpaceManager.h"
// Forward declarations
class nsINodeInfoManager;
class nsINameSpaceManager;
class nsIDocument;
// IID for the nsINodeInfo interface
#define NS_INODEINFO_IID \
{ 0x93dbfd8c, 0x2fb3, 0x4ef5, \
{0xa2, 0xa0, 0xcf, 0xf2, 0x69, 0x6f, 0x07, 0x88} }
// IID for the nsINodeInfoManager interface
#define NS_INODEINFOMANAGER_IID \
{ 0xb622469b, 0x4dcf, 0x45c4, \
{0xb0, 0xb9, 0xa7, 0x32, 0xbc, 0xee, 0xa5, 0xcc} }
#define NS_NODEINFOMANAGER_CONTRACTID "@mozilla.org/layout/nodeinfomanager;1"
class nsINodeInfo : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_INODEINFO_IID)
nsINodeInfo()
: mInner(nsnull, nsnull, kNameSpaceID_None)
{
}
/*
* Get the name from this node as a string, this does not include the prefix.
*
* For the HTML element "<body>" this will return "body" and for the XML
* element "<html:body>" this will return "body".
*/
nsresult GetName(nsAString& aName) const
{
mInner.mName->ToString(aName);
return NS_OK;
}
/*
* Get the name from this node as an atom, this does not include the prefix.
* This function never returns a null atom.
*
* For the HTML element "<body>" this will return the "body" atom and for
* the XML element "<html:body>" this will return the "body" atom.
*/
nsresult GetNameAtom(nsIAtom*& aAtom) const
{
aAtom = mInner.mName;
NS_ADDREF(aAtom);
return NS_OK;
}
/*
* Get the qualified name from this node as a string, the qualified name
* includes the prefix, if one exists.
*
* For the HTML element "<body>" this will return "body" and for the XML
* element "<html:body>" this will return "html:body".
*/
NS_IMETHOD GetQualifiedName(nsAString& aQualifiedName) const = 0;
/*
* Get the local name from this node as a string, GetLocalName() gets the
* same string as GetName() but only if the node has a prefix and/or a
* namespace URI. If the node has neither a prefix nor a namespace URI the
* local name is a null string.
*
* For the HTML element "<body>" in a HTML document this will return a null
* string and for the XML element "<html:body>" this will return "body".
*/
NS_IMETHOD GetLocalName(nsAString& aLocalName) const = 0;
/*
* Get the prefix from this node as a string.
*
* For the HTML element "<body>" this will return a null string and for
* the XML element "<html:body>" this will return the string "html".
*/
nsresult GetPrefix(nsAString& aPrefix) const
{
if (mInner.mPrefix) {
mInner.mPrefix->ToString(aPrefix);
} else {
SetDOMStringToNull(aPrefix);
}
return NS_OK;
}
/*
* Get the prefix from this node as an atom.
*
* For the HTML element "<body>" this will return a null atom and for
* the XML element "<html:body>" this will return the "html" atom.
*/
nsresult GetPrefixAtom(nsIAtom*& aAtom) const
{
aAtom = mInner.mPrefix;
NS_IF_ADDREF(aAtom);
return NS_OK;
}
/*
* Get the namespace URI for a node, if the node has a namespace URI.
*
* For the HTML element "<body>" in a HTML document this will return a null
* string and for the XML element "<html:body>" (assuming that this element,
* or one of it's ancestors has an
* xmlns:html='http://www.w3.org/1999/xhtml' attribute) this will return
* the string "http://www.w3.org/1999/xhtml".
*/
NS_IMETHOD GetNamespaceURI(nsAString& aNameSpaceURI) const = 0;
/*
* Get the namespace ID for a node if the node has a namespace, if not this
* returns kNameSpaceID_None.
*
* For the HTML element "<body>" in a HTML document this will return
* kNameSpaceID_None and for the XML element "<html:body>" (assuming that
* this element, or one of it's ancestors has an
* xmlns:html='http://www.w3.org/1999/xhtml' attribute) this will return
* the namespace ID for "http://www.w3.org/1999/xhtml".
*/
nsresult GetNamespaceID(PRInt32& aNameSpaceID) const
{
aNameSpaceID = mInner.mNamespaceID;
return NS_OK;
}
/*
* Get and set the ID attribute atom for this node.
* See http://www.w3.org/TR/1998/REC-xml-19980210#sec-attribute-types
* for the definition of an ID attribute.
*
*/
NS_IMETHOD GetIDAttributeAtom(nsIAtom** aResult) const = 0;
NS_IMETHOD SetIDAttributeAtom(nsIAtom* aResult) = 0;
/*
* Get the owning node info manager, this will never return null.
*/
NS_IMETHOD GetNodeInfoManager(nsINodeInfoManager*& aNodeInfoManager) const = 0;
/*
* Utility functions that can be used to check if a nodeinfo holds a specific
* name, name and prefix, name and prefix and namespace ID, or just
* namespace ID.
*/
PRBool Equals(nsINodeInfo *aNodeInfo) const
{
return aNodeInfo == this || aNodeInfo->Equals(mInner.mName, mInner.mPrefix,
mInner.mNamespaceID);
}
PRBool NameAndNamespaceEquals(nsINodeInfo *aNodeInfo) const
{
return aNodeInfo == this || aNodeInfo->Equals(mInner.mName,
mInner.mNamespaceID);
}
PRBool Equals(nsIAtom *aNameAtom) const
{
return mInner.mName == aNameAtom;
}
PRBool Equals(nsIAtom *aNameAtom, nsIAtom *aPrefixAtom) const
{
return (mInner.mName == aNameAtom) && (mInner.mPrefix == aPrefixAtom);
}
PRBool Equals(nsIAtom *aNameAtom, PRInt32 aNamespaceID) const
{
return ((mInner.mName == aNameAtom) &&
(mInner.mNamespaceID == aNamespaceID));
}
PRBool Equals(nsIAtom *aNameAtom, nsIAtom *aPrefixAtom,
PRInt32 aNamespaceID) const
{
return ((mInner.mName == aNameAtom) &&
(mInner.mPrefix == aPrefixAtom) &&
(mInner.mNamespaceID == aNamespaceID));
}
PRBool NamespaceEquals(PRInt32 aNamespaceID) const
{
return mInner.mNamespaceID == aNamespaceID;
}
NS_IMETHOD_(PRBool) Equals(const nsAString& aName) const = 0;
NS_IMETHOD_(PRBool) Equals(const nsAString& aName,
const nsAString& aPrefix) const = 0;
NS_IMETHOD_(PRBool) Equals(const nsAString& aName,
PRInt32 aNamespaceID) const = 0;
NS_IMETHOD_(PRBool) Equals(const nsAString& aName,
const nsAString& aPrefix,
PRInt32 aNamespaceID) const = 0;
NS_IMETHOD_(PRBool) NamespaceEquals(const nsAString& aNamespaceURI) const = 0;
NS_IMETHOD_(PRBool) QualifiedNameEquals(const nsAString& aQualifiedName) const = 0;
/*
* This is a convinience method that creates a new nsINodeInfo that differs
* only by name from the one this is called on.
*/
NS_IMETHOD NameChanged(nsIAtom *aName, nsINodeInfo*& aResult) = 0;
/*
* This is a convinience method that creates a new nsINodeInfo that differs
* only by prefix from the one this is called on.
*/
NS_IMETHOD PrefixChanged(nsIAtom *aPrefix, nsINodeInfo*& aResult) = 0;
/*
* Retrieve a pointer to the document that owns this node info.
*/
NS_IMETHOD GetDocument(nsIDocument*& aDocument) const = 0;
protected:
/*
* nsNodeInfoInner is used for two things:
*
* 1. as a member in nsNodeInfo for holding the name, prefix and
* namespace ID
* 2. as the hash key in the hash table in nsNodeInfoManager
*
* nsNodeInfoInner does not do any kind of reference counting,
* that's up to the user of this class. Since nsNodeInfoInner is
* typically used as a member of nsNodeInfo, the hash table doesn't
* need to delete the keys. When the value (nsNodeInfo) is deleted
* the key is automatically deleted.
*/
class nsNodeInfoInner
{
public:
nsNodeInfoInner(nsIAtom *aName, nsIAtom *aPrefix, PRInt32 aNamespaceID)
: mName(aName), mPrefix(aPrefix), mNamespaceID(aNamespaceID)
{
}
nsIAtom* mName;
nsIAtom* mPrefix;
PRInt32 mNamespaceID;
};
// nsNodeInfoManager needs to pass mInner to the hash table.
friend class nsNodeInfoManager;
nsNodeInfoInner mInner;
};
class nsINodeInfoManager : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_INODEINFOMANAGER_IID)
/*
* Initialize the nodeinfo manager with a namespace manager, this should
* allways be done.
*/
NS_IMETHOD Init(nsIDocument *aDocument,
nsINameSpaceManager *aNameSpaceManager) = 0;
/*
* Release the reference to the document, this will be called when
* the document is going away.
*/
NS_IMETHOD DropDocumentReference() = 0;
/*
* Methods for creating nodeinfo's from atoms and/or strings.
*/
NS_IMETHOD GetNodeInfo(nsIAtom *aName, nsIAtom *aPrefix,
PRInt32 aNamespaceID, nsINodeInfo*& aNodeInfo) = 0;
NS_IMETHOD GetNodeInfo(const nsAString& aName, nsIAtom *aPrefix,
PRInt32 aNamespaceID, nsINodeInfo*& aNodeInfo) = 0;
NS_IMETHOD GetNodeInfo(const nsAString& aName, const nsAString& aPrefix,
PRInt32 aNamespaceID, nsINodeInfo*& aNodeInfo) = 0;
NS_IMETHOD GetNodeInfo(const nsAString& aName, const nsAString& aPrefix,
const nsAString& aNamespaceURI,
nsINodeInfo*& aNodeInfo) = 0;
NS_IMETHOD GetNodeInfo(const nsAString& aQualifiedName,
const nsAString& aNamespaceURI,
nsINodeInfo*& aNodeInfo) = 0;
/*
* Getter for the namespace manager used by this nodeinfo manager.
*/
NS_IMETHOD GetNamespaceManager(nsINameSpaceManager*& aNameSpaceManager) = 0;
/*
* Retrieve a pointer to the document that owns this node info
* manager.
*/
NS_IMETHOD GetDocument(nsIDocument*& aDocument) = 0;
};
extern nsresult NS_NewNodeInfoManager(nsINodeInfoManager** aResult);
#endif /* nsINodeInfo_h___ */

View File

@@ -0,0 +1,78 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Jean-Francois Ducarroz <ducarroz@netscape.com>
* Rod Spears <rods@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
#include "nsIWebProgressListener.idl"
interface nsIDOMWindowInternal;
interface nsIObserver;
interface nsIPrompt;
[scriptable, uuid(7E46BC35-FB7D-4b45-AB35-82FD61015380)]
interface nsIPrintProgress: nsIWebProgressListener {
/* Open the progress dialog
you can specify parameters through an xpcom object
*/
void openProgressDialog(in nsIDOMWindowInternal parent,
in string dialogURL,
in nsISupports parameters,
in nsIObserver openDialogObserver,
out boolean notifyOnOpen);
/* Close the progress dialog */
void closeProgressDialog(in boolean forceClose);
/* Register a Web Progress Listener */
void registerListener(in nsIWebProgressListener listener);
/* Unregister a Web Progress Listener */
void unregisterListener(in nsIWebProgressListener listener);
/* This method is called after the dialog that shows the progress has been shown
*/
void doneIniting();
/* Retrive the prompter, needed to display modal dialog on top of progress dialog */
nsIPrompt getPrompter();
/* Indicated if the user asked to cancel the current process */
attribute boolean processCanceledByUser;
};

View File

@@ -0,0 +1,48 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Jean-Francois Ducarroz <ducarroz@netscaape.com>
* Rod Spears <rods@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
[scriptable, uuid(CA89B55B-6FAF-4051-9645-1C03EF5108F8)]
interface nsIPrintProgressParams: nsISupports {
/* message subject */
attribute wstring docTitle;
attribute wstring docURL;
};

View File

@@ -0,0 +1,53 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1999
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
interface nsIDocShell;
interface nsIDOMWindowInternal;
[scriptable, uuid(19855DFF-3248-4902-B196-93EE4C477880)]
interface nsIPrintStatusFeedback : nsISupports {
void showStatusString(in wstring status);
void startMeteors();
void stopMeteors();
void showProgress(in long percent);
[noscript] void setDocShell(in nsIDocShell shell, in nsIDOMWindowInternal window);
void closeWindow();
};

View File

@@ -0,0 +1,65 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIPrivateDOMImplementation_h__
#define nsIPrivateDOMImplementation_h__
#include "nsISupports.h"
class nsIURI;
/*
* Event listener manager interface.
*/
#define NS_IPRIVATEDOMIMPLEMENTATION_IID \
{ /* d3205fb8-2652-11d4-ba06-0060b0fc76dd */ \
0xd3205fb8, 0x2652, 0x11d4, \
{0xba, 0x06, 0x00, 0x60, 0xb0, 0xfc, 0x76, 0xdd} }
class nsIPrivateDOMImplementation : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPRIVATEDOMIMPLEMENTATION_IID)
NS_IMETHOD Init(nsIURI* aBaseURI) = 0;
};
NS_EXPORT nsresult
NS_NewDOMImplementation(nsIDOMDOMImplementation** aInstancePtrResult);
#endif // nsIPrivateDOMImplementation_h__

View File

@@ -0,0 +1,67 @@
/* -*- 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, released
* March 31, 1998.
*
* 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):
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
/* A class for range utilities. */
#ifndef nsIRangeUtils_h___
#define nsIRangeUtils_h___
#include "nsISupports.h"
// Forward declarations
class nsIDOMRange;
class nsIDOMNode;
class nsIContent;
// IID for the nsIRangeUtils interface
#define NS_IRANGEUTILS_IID \
{ 0xa6cf9127, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }
class nsIRangeUtils : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IRANGEUTILS_IID)
NS_IMETHOD_(PRInt32) ComparePoints(nsIDOMNode* aParent1, PRInt32 aOffset1,
nsIDOMNode* aParent2, PRInt32 aOffset2) = 0;
NS_IMETHOD_(PRBool) IsNodeIntersectsRange(nsIContent* aNode, nsIDOMRange* aRange) = 0;
NS_IMETHOD CompareNodeToRange(nsIContent* aNode,
nsIDOMRange* aRange,
PRBool *outNodeBefore,
PRBool *outNodeAfter) = 0;
};
#endif /* nsIRangeUtils_h___ */

View File

@@ -0,0 +1,92 @@
/* -*- 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.
*
* The Initial Developer of the Original Code is Netscape
* Communications. Portions created by Netscape Communications are
* Copyright (C) 2001 by Netscape Communications. All
* Rights Reserved.
*
* Contributor(s):
* Vidur Apparao <vidur@netscape.com> (original author)
*/
#include "nsISupports.idl"
interface nsIDocument;
interface nsIDOMHTMLScriptElement;
interface nsIScriptLoaderObserver;
[scriptable, uuid(501209d3-7edf-437d-9948-3c6d1c08ef7a)]
interface nsIScriptLoader : nsISupports {
/**
* Initialize loader with a document. The container of this document
* will be used for getting script evaluation information, including
* the context in which to do the evaluation. The loader maintains a
* strong reference to the document.
*
* @param aDocument The document to use as the basis for script
* processing.
*/
void init(in nsIDocument aDocument);
/**
* The loader maintains a strong reference to the document with
* which it is initialized. This call forces the reference to
* be dropped.
*/
void dropDocumentReference();
/**
* Add an observer for all scripts loaded through this loader.
*
* @param aObserver observer for all script processing.
*/
void addObserver(in nsIScriptLoaderObserver aObserver);
/**
* Remove an observer.
*
* @param aObserver observer to be removed
*/
void removeObserver(in nsIScriptLoaderObserver aObserver);
/**
* Process a script element. This will include both loading the
* source of the element if it is not inline and evaluating
* the script itself.
*
* @param aElement The element representing the script to be loaded and
* evaluated.
* @param aObserver An observer for this script load only
*
*/
void processScriptElement(in nsIDOMHTMLScriptElement aElement,
in nsIScriptLoaderObserver aObserver);
/**
* Suspend processing of new script elements. Any call to
* processScriptElement() will fail with a return code of
* NS_ERROR_NOT_AVAILABLE. Note that this DOES NOT suspend
* currently loading or executing scripts. All calls to
* suspend() must be matched with an equal number of calls
* to resume() before processing of new script elements
* continues.
*/
void suspend();
/**
* Resume processing of new script elements.
*/
void resume();
};

View File

@@ -0,0 +1,77 @@
/* -*- 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.
*
* The Initial Developer of the Original Code is Netscape
* Communications. Portions created by Netscape Communications are
* Copyright (C) 2001 by Netscape Communications. All
* Rights Reserved.
*
* Contributor(s):
* Vidur Apparao <vidur@netscape.com> (original author)
*/
#include "nsISupports.idl"
interface nsIDOMHTMLScriptElement;
interface nsIURI;
[scriptable, uuid(501209d3-7edf-437d-9948-3c6d1c08ef7f)]
interface nsIScriptLoaderObserver : nsISupports {
/**
* The script is available for evaluation. For inline scripts, this
* method will be called synchronously. For externally loaded scripts,
* this method will be called when the load completes.
*
* @param aResult A result code representing the result of loading
* a script. If this is a failure code, script evaluation
* will not occur.
* @param aElement The element being processed.
* @param aIsInline Is this an inline script or externally loaded?
* @param aWasPending Did script processing have to be delayed,
* either for loading of an external script or
* because processing of an earlier scheduled
* script was delayed?
* @param aURI What is the URI of the script (the document URI if
* it is inline).
* @param aLineNo At what line does the script appear (generally 1
* if it is a loaded script).
* @param aScript String representation of the string to be evaluated.
*/
void scriptAvailable(in nsresult aResult,
in nsIDOMHTMLScriptElement aElement,
in boolean aIsInline,
in boolean aWasPending,
in nsIURI aURI,
in PRInt32 aLineNo,
in AString aScript);
/**
* The script has been evaluated.
*
* @param aResult A result code representing the success or failure of
* the script evaluation.
* @param aElement The element being processed.
* @param aIsInline Is this an inline script or externally loaded?
* @param aWasPending Did script processing have to be delayed,
* either for loading of an external script or
* because processing of an earlier scheduled
* script was delayed?
*/
void scriptEvaluated(in nsresult aResult,
in nsIDOMHTMLScriptElement aElement,
in boolean aIsInline,
in boolean aWasPending);
};

View File

@@ -0,0 +1,171 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
/* THIS IS A PUBLIC INTERFACE */
interface nsIDOMNode;
interface nsIDOMRange;
/**
* Interface for manipulating and querying the current selected range
* of nodes within the document.
*
* @status FROZEN
* @version 1.0
*/
[scriptable, uuid(B2C7ED59-8634-4352-9E37-5484C8B6E4E1)]
interface nsISelection : nsISupports
{
/**
* The node representing one end of the selection.
*/
readonly attribute nsIDOMNode anchorNode;
/**
* The offset within the (text) node where the selection begins.
*/
readonly attribute long anchorOffset;
/**
* The node with keyboard focus.
*/
readonly attribute nsIDOMNode focusNode;
/**
* The offset within the (text) node where focus starts.
*/
readonly attribute long focusOffset;
/**
* Indicates if the selection is collapsed or not.
*/
readonly attribute boolean isCollapsed;
/**
* Returns the number of ranges in the selection.
*/
readonly attribute long rangeCount;
/**
* Returns the range at the specified index.
*/
nsIDOMRange getRangeAt(in long index);
/**
* Collapses the selection to a single point, at the specified offset
* in the given DOM node. When the selection is collapsed, and the content
* is focused and editable, the caret will blink there.
* @param parentNode The given dom node where the selection will be set
* @param offset Where in given dom node to place the selection (the offset into the given node)
*/
void collapse(in nsIDOMNode parentNode, in long offset);
/**
* Extends the selection by moving the focus to the specified node and offset,
* preserving the anchor postion. The new selection end result will always
* be from the anchor to the new focus, regardless of direction.
* @param parentNode The node where the selection will be extended to
* @param offset Where in node to place the offset in the new focused node
*/
void extend(in nsIDOMNode parentNode, in long offset);
/**
* Collapses the whole selection to a single point at the start
* of the current selection (irrespective of direction). If content
* is focused and editable, the caret will blink there.
*/
void collapseToStart();
/**
* Collapses the whole selection to a single point at the end
* of the current selection (irrespective of direction). If content
* is focused and editable, the caret will blink there.
*/
void collapseToEnd();
/**
* The value of entirelyContained determines the detail of the search to determine if
* the selection contains the node. If entirelyContained is set to PR_TRUE, t
* or false if
* @param node The node where the selection will be extended to
* @param entirelyContained Whether
*/
boolean containsNode(in nsIDOMNode node, in boolean entirelyContained);
/**
* Adds all children of the specified node to the selection.
* @param parentNode the parent of the children to be added to the selection.
*/
void selectAllChildren(in nsIDOMNode parentNode);
/**
* Adds a range to the current selection.
*/
void addRange(in nsIDOMRange range);
/**
* Removes a range from the current selection.
*/
void removeRange(in nsIDOMRange range);
/**
* Removes all ranges from the current selection.
*/
void removeAllRanges();
/**
* Deletes this selection from document the nodes belong to.
*/
void deleteFromDocument();
/**
* Modifies the cursor Bidi level after a change in keyboard direction
* @param langRTL is PR_TRUE if the new language is right-to-left or
* PR_FALSE if the new language is left-to-right.
*/
void selectionLanguageChange(in boolean langRTL);
/**
* Returns the whole selection into a plain text string.
*/
wstring toString();
};

View File

@@ -0,0 +1,225 @@
/* -*- 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):
* Sammy Ford
*/
#include "nsISupports.idl"
#include "nsISelection.idl"
#include "nsISelectionDisplay.idl"
%{C++
class nsISelection;
typedef short SelectionType;
typedef short SelectionRegion;
%}
interface nsIDOMNode;
interface nsISelectionDisplay;
[scriptable, uuid(D2D1D179-85A7-11d3-9932-00108301233C)]
interface nsISelectionController : nsISelectionDisplay
{
const short SELECTION_NONE=0;
const short SELECTION_NORMAL=1;
const short SELECTION_SPELLCHECK=2;
const short SELECTION_IME_RAWINPUT=4;
const short SELECTION_IME_SELECTEDRAWTEXT=8;
const short SELECTION_IME_CONVERTEDTEXT=16;
const short SELECTION_IME_SELECTEDCONVERTEDTEXT=32;
const short NUM_SELECTIONTYPES=6;
const short SELECTION_ANCHOR_REGION = 0;
const short SELECTION_FOCUS_REGION = 1;
const short NUM_SELECTION_REGIONS = 2;
const short SELECTION_OFF = 0;
const short SELECTION_HIDDEN =1;//>HIDDEN displays selection
const short SELECTION_ON = 2;
const short SELECTION_DISABLED = 3;
/**
* SetDisplaySelection will set the display mode for the selection. OFF,ON,DISABLED
*/
void setDisplaySelection(in short toggle);
/**
* GetDisplaySelection will get the display mode for the selection. OFF,ON,DISABLED
*/
short getDisplaySelection();
/**
* GetSelection will return the selection that the presentation
* shell may implement.
*
* @param aType will hold the type of selection //SelectionType
* @param _return will hold the return value
*/
nsISelection getSelection(in short type);
/**
* ScrollSelectionIntoView scrolls a region of the selection,
* so that it is visible in the scrolled view.
*
* @param aType the selection to scroll into view. //SelectionType
* @param aRegion the region inside the selection to scroll into view. //SelectionRegion
* @param aIsSynchronous when true, scrolls the selection into view
* before returning. If false, posts a request which is processed
* at some point after the method returns.
*/
void scrollSelectionIntoView(in short type, in short region, in boolean isSynchronous);
/**
* RepaintSelection repaints the selection specified by aType.
*
* @param aType specifies the selection to repaint.
*/
void repaintSelection(in short type);
/**
* Set the caret as enabled or disabled. An enabled caret will
* draw or blink when made visible. A disabled caret will never show up.
* Can be called any time.
* @param aEnable PR_TRUE to enable caret. PR_FALSE to disable.
* @return always NS_OK
*/
void setCaretEnabled(in boolean enabled);
/**
* Set the carets width
* Can be called any time.
* @param pixels, the width of the caret in pixels
* @return always NS_OK if successful, NS_ERROR_FAILURE if not.
*/
void setCaretWidth(in short pixels);
/**
* Set the caret readonly or not. An readonly caret will
* draw but not blink when made visible.
* @param aReadOnly PR_TRUE to enable caret. PR_FALSE to disable.
* @return always NS_OK
*/
void setCaretReadOnly(in boolean readOnly);
/**
* Gets the current state of the caret.
* @param aEnabled [OUT] set to the current caret state, as set by SetCaretEnabled
* @return if aOutEnabled==null, returns NS_ERROR_INVALID_ARG
* else NS_OK
*/
boolean getCaretEnabled();
/** CharacterMove will move the selection one character forward/backward in the document.
* this will also have the effect of collapsing the selection if the aExtend = PR_FALSE
* the "point" of selection that is extended is considered the "focus" point.
* or the last point adjusted by the selection.
* @param aForward forward or backward if PR_FALSE
* @param aExtend should it collapse the selection of extend it?
*/
void characterMove(in boolean forward, in boolean extend);
/** WordMove will move the selection one word forward/backward in the document.
* this will also have the effect of collapsing the selection if the aExtend = PR_FALSE
* the "point" of selection that is extended is considered the "focus" point.
* or the last point adjusted by the selection.
* @param aForward forward or backward if PR_FALSE
* @param aExtend should it collapse the selection of extend it?
*/
void wordMove(in boolean forward, in boolean extend);
/** LineMove will move the selection one line forward/backward in the document.
* this will also have the effect of collapsing the selection if the aExtend = PR_FALSE
* the "point" of selection that is extended is considered the "focus" point.
* or the last point adjusted by the selection.
* @param aForward forward or backward if PR_FALSE
* @param aExtend should it collapse the selection of extend it?
*/
void lineMove(in boolean forward, in boolean extend);
/** IntraLineMove will move the selection to the front of the line or end of the line
* in the document.
* this will also have the effect of collapsing the selection if the aExtend = PR_FALSE
* the "point" of selection that is extended is considered the "focus" point.
* or the last point adjusted by the selection.
* @param aForward forward or backward if PR_FALSE
* @param aExtend should it collapse the selection of extend it?
*/
void intraLineMove(in boolean forward, in boolean extend);
/** PageMove will move the selection one page forward/backward in the document.
* this will also have the effect of collapsing the selection if the aExtend = PR_FALSE
* the "point" of selection that is extended is considered the "focus" point.
* or the last point adjusted by the selection.
* @param aForward forward or backward if PR_FALSE
* @param aExtend should it collapse the selection of extend it?
*/
void pageMove(in boolean forward, in boolean extend);
/** CompleteScroll will move page view to the top or bottom of the document
* @param aForward forward or backward if PR_FALSE
*/
void completeScroll(in boolean forward);
/** CompleteMove will move page view to the top or bottom of the document
* this will also have the effect of collapsing the selection if the aExtend = PR_FALSE
* the "point" of selection that is extended is considered the "focus" point.
* or the last point adjusted by the selection.
* @param aForward forward or backward if PR_FALSE
* @param aExtend should it collapse the selection of extend it?
*/
void completeMove(in boolean forward, in boolean extend);
/** ScrollPage will scroll the page without affecting the selection.
* @param aForward scroll forward or backwards in selection
*/
void scrollPage(in boolean forward);
/** ScrolLine will scroll line up or down dependent on the boolean
* @param aForward scroll forward or backwards in selection
*/
void scrollLine(in boolean forward);
/** ScrolHorizontal will scroll left or right dependent on the boolean
* @param aLeft if true will scroll left. if not will scroll right.
*/
void scrollHorizontal(in boolean left);
/** SelectAll will select the whole page
*/
void selectAll();
/** CheckVisibility will return true if textnode and offsets are actually rendered
* in the current precontext.
* @param aNode textNode to test
* @param aStartOffset offset in dom to first char of textnode to test
* @param aEndOffset offset in dom to last char of textnode to test
* @param aReturnBool boolean returned TRUE if visible FALSE if not
*/
boolean checkVisibility(in nsIDOMNode node, in short startOffset, in short endOffset);
};
%{ C++
#define NS_ISELECTIONCONTROLLER_CID \
{ 0xd2d1d179, 0x85a7, 0x11d3, \
{ 0x99, 0x32, 0x0, 0x10, 0x83, 0x1, 0x23, 0x3c }}
%}

View File

@@ -0,0 +1,53 @@
/* -*- Mode: IDL; tab-width: 4; 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 the Mozilla browser.
*
* The Initial Developer of the Original Code is Netscape
* Communications, Inc. Portions created by Netscape are
* Copyright (C) 1999, Mozilla. All Rights Reserved.
*
*/
#include "nsISupports.idl"
[scriptable, uuid(0DDF9E1C-1DD2-11B2-A183-908A08AA75AE)]
interface nsISelectionDisplay : nsISupports
{
const short DISPLAY_TEXT = 1; //display text selected.
const short DISPLAY_IMAGES = 2; //show images selected
const short DISPLAY_FRAMES = 4; //display hrules ect.
const short DISPLAY_ALL = 7; //display all. used for isEditor as well
/*
SetSelectionFlags used to set whether you want to see HRULES/IMAGES with border.
also used to tell if the presshell is an editor right now. this should change
@param aToggle -either DISPLAY_(TEXT,IMAGES,FRAMES,ALL)
This will tell the rendering engine to draw the different
selection types.
@return NS_OK if successful.
*/
void setSelectionFlags(in short toggle);
/*
GetSelectionFlags used to get whether you want to see HRULES/IMAGES with border.
also used to tell if the presshell is an editor right now. this should change
@param short *aReturn - This will be filled with DISPLAY_(TEXT,IMAGE,FRAMES,ALL)
bit flags.
@return NS_OK if successful.
*/
short getSelectionFlags();
};

View File

@@ -0,0 +1,57 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
interface nsIDOMDocument;
interface nsISelection;
[scriptable, uuid(A6CF90E2-15B3-11d2-932E-00805F8ADD32)]
interface nsISelectionListener : nsISupports
{
const short NO_REASON=0;
const short DRAG_REASON=1;
const short MOUSEDOWN_REASON=2;/*bitflags*/
const short MOUSEUP_REASON=4;/*bitflags*/
const short KEYPRESS_REASON=8;/*bitflags*/
const short SELECTALL_REASON=16;
void notifySelectionChanged(in nsIDOMDocument doc, in nsISelection sel, in short reason);
};

View File

@@ -0,0 +1,88 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
#include "nsISelectionListener.idl"
#include "nsIEnumerator.idl"
interface nsIDOMRange;
interface nsISelectionListener;
[scriptable, uuid(2d5535e2-1dd2-11b2-8e38-d53ec833adf6)]
interface nsISelectionPrivate : nsISupports
{
const short ENDOFPRECEDINGLINE=0;
const short STARTOFNEXTLINE=1;
attribute boolean interlinePosition;
/* startBatchChanges
match this up with endbatchChanges. will stop ui updates while multiple selection methods are called
*/
void startBatchChanges();
/* endBatchChanges
match this up with startBatchChanges
*/
void endBatchChanges();
nsIEnumerator getEnumerator();
wstring toStringWithFormat(in string formatType, in unsigned long flags, in PRInt32 wrapColumn);
void addSelectionListener(in nsISelectionListener newListener);
void removeSelectionListener(in nsISelectionListener listenerToRemove);
/* Table selection stuff
We should probably move this and table-related
items in nsIFrameSelection to a
new nsITableSelection interface
*/
const long TABLESELECTION_NONE = 0;
const long TABLESELECTION_CELL = 1;
const long TABLESELECTION_ROW = 2;
const long TABLESELECTION_COLUMN = 3;
const long TABLESELECTION_TABLE = 4;
const long TABLESELECTION_ALLCELLS = 5;
/** Test if supplied range points to a single table element:
* Result is one of above constants. "None" means
* a table element isn't selected.
*/
long getTableSelectionType(in nsIDOMRange range);
};

View File

@@ -0,0 +1,76 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIStyleRule_h___
#define nsIStyleRule_h___
#include <stdio.h>
#include "nsISupports.h"
class nsISizeOfHandler;
class nsIStyleSheet;
class nsIPresContext;
class nsIContent;
struct nsRuleData;
// IID for the nsIStyleRule interface {40ae5c90-ad6a-11d1-8031-006008159b5a}
#define NS_ISTYLE_RULE_IID \
{0x40ae5c90, 0xad6a, 0x11d1, {0x80, 0x31, 0x00, 0x60, 0x08, 0x15, 0x9b, 0x5a}}
class nsIStyleRule : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISTYLE_RULE_IID)
NS_IMETHOD GetStyleSheet(nsIStyleSheet*& aSheet) const = 0;
// Strength is an out-of-band weighting, useful for mapping CSS ! important
NS_IMETHOD GetStrength(PRInt32& aStrength) const = 0;
// The new mapping function.
NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData)=0;
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const = 0;
virtual void SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize) = 0;
#endif
};
#endif /* nsIStyleRule_h___ */

View File

@@ -0,0 +1,178 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIStyleRuleProcessor_h___
#define nsIStyleRuleProcessor_h___
#include <stdio.h>
#include "nsISupports.h"
#include "nsIPresContext.h" // for nsCompatability
#include "nsILinkHandler.h"
class nsISizeOfHandler;
class nsIStyleSheet;
class nsIStyleContext;
class nsIPresContext;
class nsIContent;
class nsIStyledContent;
class nsISupportsArray;
class nsIAtom;
class nsICSSPseudoComparator;
class nsRuleWalker;
// The implementation of the constructor and destructor are currently in
// nsCSSStyleSheet.cpp.
struct RuleProcessorData {
RuleProcessorData(nsIPresContext* aPresContext,
nsIContent* aContent,
nsRuleWalker* aRuleWalker,
nsCompatibility* aCompat = nsnull);
// NOTE: not |virtual|
~RuleProcessorData();
void* operator new(size_t sz, nsIPresContext* aContext) {
void* result = nsnull;
aContext->AllocateFromShell(sz, &result);
return result;
}
void Destroy(nsIPresContext* aContext) {
this->~RuleProcessorData();
aContext->FreeToShell(sizeof(RuleProcessorData), this);
};
nsIPresContext* mPresContext;
nsIContent* mContent;
nsIContent* mParentContent; // if content, content->GetParent()
nsRuleWalker* mRuleWalker; // Used to add rules to our results.
nsIContent* mScopedRoot; // Root of scoped stylesheet (set and unset by the supplier of the scoped stylesheet
nsIAtom* mContentTag; // if content, then content->GetTag()
nsIAtom* mContentID; // if styled content, then styledcontent->GetID()
nsIStyledContent* mStyledContent; // if content, content->QI(nsIStyledContent)
PRPackedBool mIsHTMLContent; // if content, then does QI on HTMLContent, true or false
PRPackedBool mIsHTMLLink; // if content, calls nsStyleUtil::IsHTMLLink
PRPackedBool mIsSimpleXLink; // if content, calls nsStyleUtil::IsSimpleXLink
nsCompatibility mCompatMode; // Possibly remove use of this in SelectorMatches?
PRPackedBool mHasAttributes; // if content, content->GetAttrCount() > 0
PRPackedBool mIsChecked; // checked/selected attribute for option and select elements
nsLinkState mLinkState; // if a link, this is the state, otherwise unknown
PRInt32 mEventState; // if content, eventStateMgr->GetContentState()
PRInt32 mNameSpaceID; // if content, content->GetNameSapce()
RuleProcessorData* mPreviousSiblingData;
RuleProcessorData* mParentData;
};
struct ElementRuleProcessorData : public RuleProcessorData {
ElementRuleProcessorData(nsIPresContext* aPresContext,
nsIContent* aContent,
nsRuleWalker* aRuleWalker)
: RuleProcessorData(aPresContext,aContent,aRuleWalker)
{
NS_PRECONDITION(aContent, "null pointer");
NS_PRECONDITION(aRuleWalker, "null pointer");
}
};
struct PseudoRuleProcessorData : public RuleProcessorData {
PseudoRuleProcessorData(nsIPresContext* aPresContext,
nsIContent* aParentContent,
nsIAtom* aPseudoTag,
nsICSSPseudoComparator* aComparator,
nsRuleWalker* aRuleWalker)
: RuleProcessorData(aPresContext, aParentContent, aRuleWalker)
{
NS_PRECONDITION(aPseudoTag, "null pointer");
NS_PRECONDITION(aRuleWalker, "null pointer");
mPseudoTag = aPseudoTag;
mComparator = aComparator;
}
nsIAtom* mPseudoTag;
nsICSSPseudoComparator* mComparator;
};
struct StateRuleProcessorData : public RuleProcessorData {
StateRuleProcessorData(nsIPresContext* aPresContext,
nsIContent* aContent,
PRInt32 aStateMask)
: RuleProcessorData(aPresContext, aContent, nsnull),
mStateMask(aStateMask)
{
NS_PRECONDITION(aContent, "null pointer");
}
const PRInt32 mStateMask; // |HasStateDependentStyle| for which state(s)?
// Constants defined in nsIEventStateManager.h .
};
// IID for the nsIStyleRuleProcessor interface {015575fe-7b6c-11d3-ba05-001083023c2b}
#define NS_ISTYLE_RULE_PROCESSOR_IID \
{0x015575fe, 0x7b6c, 0x11d3, {0xba, 0x05, 0x00, 0x10, 0x83, 0x02, 0x3c, 0x2b}}
/* The style rule processor interface is a mechanism to seperate the matching
* of style rules from style sheet instances.
* Simple style sheets can and will act as their own processor.
* Sheets where rule ordering interlaces between multiple sheets, will need to
* share a single rule processor between them (CSS sheets do this for cascading order)
*/
class nsIStyleRuleProcessor : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISTYLE_RULE_PROCESSOR_IID)
// populate rule node tree with nsIStyleRule*
// rules are ordered, those with higher precedence are farthest from the root of the tree
NS_IMETHOD RulesMatching(ElementRuleProcessorData* aData,
nsIAtom* aMedium) = 0;
NS_IMETHOD RulesMatching(PseudoRuleProcessorData* aData,
nsIAtom* aMedium) = 0;
// Test if style is dependent on content state
NS_IMETHOD HasStateDependentStyle(StateRuleProcessorData* aData,
nsIAtom* aMedium,
PRBool* aResult) = 0;
#ifdef DEBUG
virtual void SizeOf(nsISizeOfHandler *aSizeofHandler, PRUint32 &aSize) = 0;
#endif
};
#endif /* nsIStyleRuleProcessor_h___ */

View File

@@ -0,0 +1,30 @@
#ifndef _nsIStyleRuleSupplier_h
#define _nsIStyleRuleSupplier_h
#include "nsISupports.h"
#include "nsISupportsArray.h"
#include "nsIStyleRuleProcessor.h"
// {2D77A45B-4F3A-4203-A7D2-F4B84D0C1EE4}
#define NS_ISTYLERULESUPPLIER_IID \
{ 0x2d77a45b, 0x4f3a, 0x4203, { 0xa7, 0xd2, 0xf4, 0xb8, 0x4d, 0xc, 0x1e, 0xe4 } }
class nsIContent;
class nsIStyleSet;
class nsIStyleRuleSupplier : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISTYLERULESUPPLIER_IID)
NS_IMETHOD UseDocumentRules(nsIContent* aContent, PRBool* aResult)=0;
NS_IMETHOD WalkRules(nsIStyleSet* aStyleSet,
nsISupportsArrayEnumFunc aFunc,
RuleProcessorData* aData)=0;
NS_IMETHOD AttributeAffectsStyle(nsISupportsArrayEnumFunc aFunc,
void* aData,
nsIContent* aContent,
PRBool* aAffects)=0;
};
#endif /* _nsIStyleRuleSupplier_h */

View File

@@ -0,0 +1,100 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIStyleSheet_h___
#define nsIStyleSheet_h___
#include <stdio.h>
#include "nsISupports.h"
class nsISizeOfHandler;
class nsIAtom;
class nsString;
class nsIURI;
class nsIStyleRule;
class nsISupportsArray;
class nsIPresContext;
class nsIContent;
class nsIDocument;
class nsIStyleContext;
class nsIStyleRuleProcessor;
// IID for the nsIStyleSheet interface {8c4a80a0-ad6a-11d1-8031-006008159b5a}
#define NS_ISTYLE_SHEET_IID \
{0x8c4a80a0, 0xad6a, 0x11d1, {0x80, 0x31, 0x00, 0x60, 0x08, 0x15, 0x9b, 0x5a}}
class nsIStyleSheet : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISTYLE_SHEET_IID)
// basic style sheet data
NS_IMETHOD GetURL(nsIURI*& aURL) const = 0;
NS_IMETHOD GetTitle(nsString& aTitle) const = 0;
NS_IMETHOD GetType(nsString& aType) const = 0;
NS_IMETHOD GetMediumCount(PRInt32& aCount) const = 0;
NS_IMETHOD GetMediumAt(PRInt32 aIndex, nsIAtom*& aMedium) const = 0;
NS_IMETHOD_(PRBool) UseForMedium(nsIAtom* aMedium) const = 0;
NS_IMETHOD GetEnabled(PRBool& aEnabled) const = 0;
NS_IMETHOD SetEnabled(PRBool aEnabled) = 0;
// style sheet owner info
NS_IMETHOD GetParentSheet(nsIStyleSheet*& aParent) const = 0; // may be null
NS_IMETHOD GetOwningDocument(nsIDocument*& aDocument) const = 0; // may be null
NS_IMETHOD SetOwningDocument(nsIDocument* aDocument) = 0;
// style rule processor access
NS_IMETHOD GetStyleRuleProcessor(nsIStyleRuleProcessor*& aProcessor,
nsIStyleRuleProcessor* aPrevProcessor) = 0;
// XXX style rule enumerations
// If changing the given attribute cannot affect style context, aAffects
// will be PR_FALSE on return.
NS_IMETHOD AttributeAffectsStyle(nsIAtom *aAttribute, nsIContent *aContent,
PRBool &aAffects) = 0;
#ifdef DEBUG
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const = 0;
virtual void SizeOf(nsISizeOfHandler *aSizeofHandler, PRUint32 &aSize) = 0;
#endif
};
#endif /* nsIStyleSheet_h___ */

View File

@@ -0,0 +1,114 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIStyleSheetLinkingElement_h__
#define nsIStyleSheetLinkingElement_h__
#include "nsISupports.h"
class nsIParser;
class nsIDocument;
#define NS_ISTYLESHEETLINKINGELEMENT_IID \
{0xa6cf90e9, 0x15b3, 0x11d2, \
{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
class nsIStyleSheet;
class nsIStyleSheetLinkingElement : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISTYLESHEETLINKINGELEMENT_IID)
/**
* Used to make the association between a style sheet and
* the element that linked it to the document.
*
* @param aStyleSheet the style sheet associated with this
* element.
*/
NS_IMETHOD SetStyleSheet(nsIStyleSheet* aStyleSheet) = 0;
/**
* Used to obtain the style sheet linked in by this element.
*
* @param aStyleSheet out parameter that returns the style
* sheet associated with this element.
*/
NS_IMETHOD GetStyleSheet(nsIStyleSheet*& aStyleSheet) = 0;
/**
* Initialize the stylesheet linking element. This method passes
* in a parser that the element blocks if the stylesheet is
* a stylesheet that should be loaded with the parser blocked.
* If aDontLoadStyle is true the element will ignore the first
* modification to the element that would cause a stylesheet to
* be loaded. Subsequent modifications to the element will not
* be ignored.
*/
NS_IMETHOD InitStyleLinkElement(nsIParser *aParser, PRBool aDontLoadStyle) = 0;
/**
* Tells this element to update the stylesheet.
*
* @param aOldDocument the document that this element was part
* of (nsnull if we're not moving the element
* from one document to another).
* @param aDocIndex index of the stylesheet in the document's
* stylesheet list. -1 means we'll look up the
* index from the position of the element.
*/
NS_IMETHOD UpdateStyleSheet(nsIDocument *aOldDocument,
PRInt32 aDocIndex) = 0;
/**
* Tells this element wether to update the stylesheet when the
* element's properties change.
*
* @param aEnableUpdates update on changes or not.
*/
NS_IMETHOD SetEnableUpdates(PRBool aEnableUpdates) = 0;
/**
* Gets the charset that the element claims the style sheet is in
*
* @param aCharset the charset
*/
NS_IMETHOD GetCharset(nsAString& aCharset) = 0;
};
#endif // nsILinkingElement_h__

View File

@@ -0,0 +1,78 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsIStyledContent_h___
#define nsIStyledContent_h___
#include "nsIContent.h"
class nsString;
class nsIStyleRule;
class nsIStyleContext;
class nsISupportsArray;
class nsRuleWalker;
// IID for the nsIStyledContent class
#define NS_ISTYLEDCONTENT_IID \
{ 0xc1e84e01, 0xcd15, 0x11d2, { 0x96, 0xed, 0x0, 0x10, 0x4b, 0x7b, 0x7d, 0xeb } }
// Abstract interface for all styled content (that supports ID, CLASS, STYLE, and
// the ability to specify style hints on an attribute change).
class nsIStyledContent : public nsIContent {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISTYLEDCONTENT_IID)
NS_IMETHOD GetID(nsIAtom*& aResult) const = 0;
NS_IMETHOD GetClasses(nsVoidArray& aArray) const = 0;
NS_IMETHOD HasClass(nsIAtom* aClass, PRBool aCaseSensitive) const = 0;
NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker) = 0;
NS_IMETHOD WalkInlineStyleRules(nsRuleWalker* aRuleWalker) = 0;
/** NRA ***
* Get a hint that tells the style system what to do when
* an attribute on this node changes.
* This only applies to attributes that map their value
* DIRECTLY into style contexts via NON-CSS style rules
* All other attributes return NS_STYLE_HINT_CONTENT
*/
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
PRInt32& aHint) const = 0;
};
#endif /* nsIStyledContent_h___ */

View File

@@ -0,0 +1,150 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsITextContent_h___
#define nsITextContent_h___
#include "nsIContent.h"
class nsString;
class nsTextFragment;
// IID for the nsITextContent interface
#define NS_ITEXT_CONTENT_IID \
{0xa6cf9065, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
/**
* Interface for textual content. This interface is used to provide
* an efficient access to text content.
*/
class nsITextContent : public nsIContent {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITEXT_CONTENT_IID)
/**
* Get direct access (but read only) to the text in the text content.
*/
NS_IMETHOD GetText(const nsTextFragment** aFragmentsResult) = 0;
/**
* Get the length of the text content.
*/
NS_IMETHOD GetTextLength(PRInt32* aLengthResult) = 0;
/**
* Make a copy of the text content in aResult.
*/
NS_IMETHOD CopyText(nsAString& aResult) = 0;
/**
* Set the text to the given value. If aNotify is PR_TRUE then
* the document is notified of the content change.
*/
NS_IMETHOD SetText(const PRUnichar* aBuffer,
PRInt32 aLength,
PRBool aNotify) = 0;
/**
* Set the text to the given value. If aNotify is PR_TRUE then
* the document is notified of the content change.
*/
NS_IMETHOD SetText(const nsAString& aStr,
PRBool aNotify) = 0;
/**
* Set the text to the given value. If aNotify is PR_TRUE then
* the document is notified of the content change.
*/
NS_IMETHOD SetText(const char* aBuffer,
PRInt32 aLength,
PRBool aNotify) = 0;
/**
* Query method to see if the frame is nothing but whitespace
*/
NS_IMETHOD IsOnlyWhitespace(PRBool* aResult) = 0;
/**
* Clone this content node. Unlike the nsIDOMNode equivalent, this
* method allows you to specify whether to copy the text as well.
*/
NS_IMETHOD CloneContent(PRBool aCloneText, nsITextContent** aClone) = 0;
};
//----------------------------------------------------------------------
/* a6cf905e-15b3-11d2-932e-00805f8add32 */
#define NS_ITEXT_CONTENT_CHANGE_DATA_IID \
{0xa6cf905e, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
// Simple interface for encapsulating change data for a ContentChanged
// notification.
class nsITextContentChangeData : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITEXT_CONTENT_CHANGE_DATA_IID);
enum ChangeType {
Insert,
Append,
Replace
};
/**
* Get the type of change associated with the ContentChanged
* notification.
*/
NS_IMETHOD GetChangeType(ChangeType* aResult) = 0;
NS_IMETHOD GetInsertData(PRInt32* aOffset,
PRInt32* aInsertLength) = 0;
NS_IMETHOD GetAppendData(PRInt32* aOffset,
PRInt32* aAppendLength) = 0;
NS_IMETHOD GetReplaceData(PRInt32* aOffset,
PRInt32* aSourceLength,
PRInt32* aReplaceLength) = 0;
};
// XXX These belong elsewhere
extern nsresult
NS_NewTextNode(nsIContent** aResult);
extern nsresult
NS_NewCommentNode(nsIContent** aResult);
#endif /* nsITextContent_h___ */

View File

@@ -0,0 +1,7 @@
#
# This is a list of local files which get copied to the mozilla:dist:content directory
#
nsContentList.h
nsDocument.h
nsGenericDOMNodeList.h
nsGenericElement.h

View File

@@ -0,0 +1,125 @@
#
# 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 = content
LIBRARY_NAME = gkconbase_s
REQUIRES = xpcom \
string \
dom \
gfx \
layout \
widget \
view \
locale \
htmlparser \
js \
webshell \
necko \
caps \
lwbrk \
uconv \
chrome \
docshell \
pref \
xpconnect \
util \
unicharutil \
xuldoc \
intl \
windowwatcher \
imglib2 \
gfx2 \
uriloader \
webbrwsr \
$(NULL)
CPPSRCS = \
nsPrintPreviewListener.cpp \
nsCommentNode.cpp \
nsContentIterator.cpp \
nsContentList.cpp \
nsContentPolicy.cpp \
nsDocument.cpp \
nsDocumentEncoder.cpp \
nsDocumentFragment.cpp \
nsDocumentViewer.cpp \
nsDOMAttribute.cpp \
nsDOMAttributeMap.cpp \
nsDOMDocumentType.cpp \
nsGeneratedIterator.cpp \
nsGenericDOMDataNode.cpp \
nsGenericDOMNodeList.cpp \
nsGenericElement.cpp \
nsContentUtils.cpp \
nsNameSpaceManager.cpp \
nsNodeInfo.cpp \
nsNodeInfoManager.cpp \
nsRange.cpp \
nsRuleNode.cpp \
nsSelection.cpp \
nsStyleContext.cpp \
nsStyleSet.cpp \
nsTextContentChangeData.cpp \
nsTextNode.cpp \
nsTreeWalker.cpp \
nsXMLContentSerializer.cpp \
nsHTMLContentSerializer.cpp \
nsParserUtils.cpp \
nsPlainTextSerializer.cpp \
mozSanitizingSerializer.cpp \
nsScriptLoader.cpp \
nsStyleLinkElement.cpp \
nsContentAreaDragDrop.cpp \
nsFrameLoader.cpp \
$(NULL)
# we don't want the shared lib, but we want to force the creation of a
# static lib.
FORCE_STATIC_LIB = 1
include $(topsrcdir)/config/rules.mk
DEFINES += -D_IMPL_NS_LAYOUT
ifdef XP_NEW_SELECTION
DEFINES += -DXP_NEW_SELECTION
endif
ifeq ($(OS_ARCH),WINNT)
DEFINES += -DWIN32_LEAN_AND_MEAN
endif
INCLUDES += \
-I$(srcdir)/../../events/src \
-I$(srcdir)/../../html/base/src \
-I$(srcdir)/../../html/style/src \
-I$(srcdir)/../../xul/base/src \
-I$(srcdir)/../../xul/content/src \
-I$(srcdir)/../../html/content/src \
-I$(srcdir)/../../base/src \
$(NULL)

View File

@@ -0,0 +1,119 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..\..
LIBRARY_NAME=contentbase_s
DEFINES=-D_IMPL_NS_LAYOUT -DWIN32_LEAN_AND_MEAN
!if defined(XP_NEW_SELECTION)
DEFINES = $(DEFINES) -DXP_NEW_SELECTION
!endif
MODULE=content
REQUIRES = xpcom \
string \
dom \
widget \
view \
locale \
htmlparser \
js \
webshell \
necko \
caps \
lwbrk \
uconv \
chrome \
docshell \
uriloader \
pref \
xpconnect \
util \
unicharutil \
layout \
gfx \
layout_xul \
content_xul \
windowwatcher \
intl \
imglib2 \
gfx2 \
uriloader \
webBrowser_core\
$(NULL)
CPP_OBJS= \
.\$(OBJDIR)\nsPrintPreviewListener.obj \
.\$(OBJDIR)\nsStyleContext.obj \
.\$(OBJDIR)\nsStyleSet.obj \
.\$(OBJDIR)\nsCommentNode.obj \
.\$(OBJDIR)\nsGenericDOMDataNode.obj \
.\$(OBJDIR)\nsGenericDOMNodeList.obj \
.\$(OBJDIR)\nsGenericElement.obj \
.\$(OBJDIR)\nsContentList.obj \
.\$(OBJDIR)\nsContentIterator.obj \
.\$(OBJDIR)\nsContentPolicy.obj \
.\$(OBJDIR)\nsDocument.obj \
.\$(OBJDIR)\nsDocumentEncoder.obj \
.\$(OBJDIR)\nsDocumentFragment.obj \
.\$(OBJDIR)\nsDocumentViewer.obj \
.\$(OBJDIR)\nsDOMAttribute.obj \
.\$(OBJDIR)\nsDOMAttributeMap.obj \
.\$(OBJDIR)\nsDOMDocumentType.obj \
.\$(OBJDIR)\nsGeneratedIterator.obj \
.\$(OBJDIR)\nsNameSpaceManager.obj \
.\$(OBJDIR)\nsNodeInfo.obj \
.\$(OBJDIR)\nsNodeInfoManager.obj \
.\$(OBJDIR)\nsSelection.obj \
.\$(OBJDIR)\nsRange.obj \
.\$(OBJDIR)\nsRuleNode.obj \
.\$(OBJDIR)\nsTextContentChangeData.obj \
.\$(OBJDIR)\nsTextNode.obj \
.\$(OBJDIR)\nsTreeWalker.obj \
.\$(OBJDIR)\nsXMLContentSerializer.obj \
.\$(OBJDIR)\nsHTMLContentSerializer.obj \
.\$(OBJDIR)\nsParserUtils.obj \
.\$(OBJDIR)\nsPlainTextSerializer.obj \
.\$(OBJDIR)\mozSanitizingSerializer.obj \
.\$(OBJDIR)\nsContentUtils.obj \
.\$(OBJDIR)\nsScriptLoader.obj \
.\$(OBJDIR)\nsStyleLinkElement.obj \
.\$(OBJDIR)\nsContentAreaDragDrop.obj \
.\$(OBJDIR)\nsFrameLoader.obj \
$(NULL)
LINCS=-I..\..\html\base\src -I..\..\html\style\src \
-I..\..\xul\base\src -I..\..\xul\content\src \
-I..\..\events\src -I..\..\html\content\src
LCFLAGS = \
$(LCFLAGS) \
$(DEFINES) \
$(NULL)
include <$(DEPTH)\config\rules.mak>
libs:: $(LIBRARY)
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
clobber::
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
rm -f $(PDBFILE).pdb

View File

@@ -0,0 +1,835 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 HTML Sanitizer code.
*
* The Initial Developer of the Original Code is
* Ben Bucksch <mozilla@bucksch.org>.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Netscape
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* I used nsPlaintextSerializer as base for this class. I don't understand
all of the functions in the beginning. Possible that I fail to do
something or do something useless.
I am not proud about the implementation here at all.
Feel free to fix it :-).
I am moderately concerned about methods to obfuscate HTML, which the
parser can decode during execution.
E.g. there are these dreaded data: and javascript URLs and
base64 encoding (which I don't really understand how it alloies
*/
#include "mozSanitizingSerializer.h"
#include "nsIServiceManager.h"
#include "nsHTMLAtoms.h"
#include "nsIDOMText.h"
#include "nsIDOMElement.h"
#include "nsINameSpaceManager.h"
#include "nsIHTMLContent.h"
#include "nsITextContent.h"
#include "nsTextFragment.h"
#include "nsParserCIID.h"
#include "nsContentUtils.h"
#include "nsReadableUtils.h"
#include "plstr.h"
//#include "nsDependentString.h"
#include "nsIProperties.h"
//#define DEBUG_BenB
/* XXX: |printf|s in some error conditions. They are intended as information
for the user, because they complain about malformed pref values.
Not sure, if popping up dialog boxes is the right thing for such code
(and if so, how to do it).
*/
static NS_DEFINE_CID(kParserServiceCID, NS_PARSERSERVICE_CID);
#define TEXT_REMOVED "&lt;Text removed&gt;"
#define TEXT_BREAKER "|"
nsresult NS_NewSanitizingHTMLSerializer(nsIContentSerializer** aSerializer)
{
mozSanitizingHTMLSerializer* it = new mozSanitizingHTMLSerializer();
if (!it) {
return NS_ERROR_OUT_OF_MEMORY;
}
NS_ADDREF(it);
*aSerializer = it;
return NS_OK;
}
mozSanitizingHTMLSerializer::mozSanitizingHTMLSerializer()
: mAllowedTags(30) // Just some initial buffer size
{
NS_INIT_ISUPPORTS();
mOutputString = nsnull;
}
mozSanitizingHTMLSerializer::~mozSanitizingHTMLSerializer()
{
mAllowedTags.Enumerate(ReleaseProperties);
}
//<copied from="xpcom/ds/nsProperties.cpp">
PRBool PR_CALLBACK
mozSanitizingHTMLSerializer::ReleaseProperties(nsHashKey* key, void* data,
void* closure)
{
nsIProperties* prop = (nsIProperties*)data;
NS_IF_RELEASE(prop);
return PR_TRUE;
}
//</copied>
NS_IMPL_ISUPPORTS4(mozSanitizingHTMLSerializer,
nsIContentSerializer,
nsIContentSink,
nsIHTMLContentSink,
mozISanitizingHTMLSerializer)
NS_IMETHODIMP
mozSanitizingHTMLSerializer::Init(PRUint32 aFlags, PRUint32 dummy,
nsIAtom* aCharSet, PRBool aIsCopying)
{
return NS_OK;
}
NS_IMETHODIMP
mozSanitizingHTMLSerializer::Initialize(nsAString* aOutString,
PRUint32 aFlags,
const nsAString& allowedTags)
{
nsresult rv = Init(aFlags, 0, nsnull, PR_FALSE);
NS_ENSURE_SUCCESS(rv, rv);
// XXX This is wrong. It violates XPCOM string ownership rules.
// We're only getting away with this because instances of this
// class are restricted to single function scope.
// (Comment copied from nsPlaintextSerializer)
mOutputString = aOutString;
ParsePrefs(allowedTags);
return NS_OK;
}
// This is not used within the class, but maybe called from somewhere else?
NS_IMETHODIMP
mozSanitizingHTMLSerializer::Flush(nsAString& aStr)
{
#if DEBUG_BenB
printf("Flush: -%s-", NS_LossyConvertUCS2toASCII(aString).get());
#endif
Write(aStr);
return NS_OK;
}
void
mozSanitizingHTMLSerializer::Write(const nsAString& aString)
{
// printf("%s", NS_LossyConvertUCS2toASCII(aString).get());
mOutputString->Append(aString);
}
NS_IMETHODIMP
mozSanitizingHTMLSerializer::GetPref(PRInt32 aTag, PRBool& aPref)
{
aPref = PR_FALSE;
return NS_OK;
}
nsresult
mozSanitizingHTMLSerializer::GetParserService(
nsIParserService** aParserService)
{
if (!mParserService) {
nsresult rv;
mParserService = do_GetService(kParserServiceCID, &rv);
if (NS_FAILED(rv))
return rv;
}
*aParserService = mParserService;
NS_ADDREF(*aParserService);
return NS_OK;
}
/**
* Returns true, if the id represents a container
*/
PRBool
mozSanitizingHTMLSerializer::IsContainer(PRInt32 aId)
{
PRBool isContainer = PR_FALSE;
nsCOMPtr<nsIParserService> parserService;
GetParserService(getter_AddRefs(parserService));
if (parserService) {
parserService->IsContainer(aId, isContainer);
}
return isContainer;
}
/* XXX I don't really know, what these functions do, but they seem to be
needed ;-). Mostly copied from nsPlaintextSerializer. */
/* akk says:
"I wonder if the sanitizing class could inherit from nsHTMLSerializer,
so that at least these methods that none of us understand only have to be
written once?" */
nsresult
mozSanitizingHTMLSerializer::GetIdForContent(nsIContent* aContent,
PRInt32* aID)
{
nsCOMPtr<nsIHTMLContent> htmlcontent = do_QueryInterface(aContent);
if (!htmlcontent) {
*aID = eHTMLTag_unknown;
return NS_OK;
}
nsCOMPtr<nsIAtom> tagname;
mContent->GetTag(*getter_AddRefs(tagname));
if (!tagname)
return NS_ERROR_FAILURE;
nsresult rv;
nsCOMPtr<nsIParserService> parserService;
rv = GetParserService(getter_AddRefs(parserService));
if (NS_FAILED(rv))
return rv;
rv = parserService->HTMLAtomTagToId(tagname, aID);
if (NS_FAILED(rv))
return rv;
return NS_OK;
}
NS_IMETHODIMP
mozSanitizingHTMLSerializer::AppendText(nsIDOMText* aText,
PRInt32 aStartOffset,
PRInt32 aEndOffset,
nsAString& aStr)
{
nsresult rv = NS_OK;
mOutputString = &aStr;
nsAutoString linebuffer;
rv = DoAddLeaf(eHTMLTag_text, linebuffer);
return rv;
}
NS_IMETHODIMP
mozSanitizingHTMLSerializer::AppendElementStart(nsIDOMElement *aElement,
PRBool aHasChildren,
nsAString& aStr)
{
NS_ENSURE_ARG(aElement);
mContent = do_QueryInterface(aElement);
if (!mContent) return NS_ERROR_FAILURE;
mOutputString = &aStr;
nsresult rv;
PRInt32 id;
rv = GetIdForContent(mContent, &id);
if (NS_FAILED(rv)) return rv;
PRBool isContainer = IsContainer(id);
if (isContainer) {
rv = DoOpenContainer(id);
}
else {
nsAutoString empty;
rv = DoAddLeaf(id, empty);
}
mContent = 0;
mOutputString = nsnull;
return rv;
}
NS_IMETHODIMP
mozSanitizingHTMLSerializer::AppendElementEnd(nsIDOMElement *aElement,
nsAString& aStr)
{
NS_ENSURE_ARG(aElement);
mContent = do_QueryInterface(aElement);
if (!mContent) return NS_ERROR_FAILURE;
mOutputString = &aStr;
nsresult rv;
PRInt32 id;
rv = GetIdForContent(mContent, &id);
if (NS_FAILED(rv)) return rv;
PRBool isContainer = IsContainer(id);
if (isContainer) {
rv = DoCloseContainer(id);
}
mContent = 0;
mOutputString = nsnull;
return rv;
}
NS_IMETHODIMP
mozSanitizingHTMLSerializer::OpenContainer(const nsIParserNode& aNode)
{
PRInt32 type = aNode.GetNodeType();
mParserNode = NS_CONST_CAST(nsIParserNode *, &aNode);
return DoOpenContainer(type);
}
NS_IMETHODIMP
mozSanitizingHTMLSerializer::CloseContainer(const nsIParserNode& aNode)
{
PRInt32 type = aNode.GetNodeType();
const nsAString& namestr = aNode.GetText();
nsCOMPtr<nsIAtom> name = dont_AddRef(NS_NewAtom(namestr));
mParserNode = NS_CONST_CAST(nsIParserNode*, &aNode);
return DoCloseContainer(type);
}
NS_IMETHODIMP
mozSanitizingHTMLSerializer::AddLeaf(const nsIParserNode& aNode)
{
eHTMLTags type = (eHTMLTags)aNode.GetNodeType();
const nsAString& text = aNode.GetText();
mParserNode = NS_CONST_CAST(nsIParserNode*, &aNode);
return DoAddLeaf(type, text);
}
NS_IMETHODIMP
mozSanitizingHTMLSerializer::OpenHTML(const nsIParserNode& aNode)
{
return OpenContainer(aNode);
}
NS_IMETHODIMP
mozSanitizingHTMLSerializer::CloseHTML(const nsIParserNode& aNode)
{
return CloseContainer(aNode);
}
NS_IMETHODIMP
mozSanitizingHTMLSerializer::SetTitle(const nsString& aValue)
{
if (IsAllowedTag(eHTMLTag_title))
{
//Write(NS_LITERAL_STRING("<title>")); -- aValue already contains that
Write(aValue);
//Write(NS_LITERAL_STRING("</title>"));
}
return NS_OK;
}
NS_IMETHODIMP
mozSanitizingHTMLSerializer::AddDocTypeDecl(const nsIParserNode& aNode)
{
return NS_OK;
}
NS_IMETHODIMP
mozSanitizingHTMLSerializer::SetDocumentCharset(nsAString& aCharset)
{
// No idea, if this works - it isn't invoked by |TestOutput|.
Write(NS_LITERAL_STRING("\n<meta http-equiv=\"Context-Type\" content=\"text/html; charset=")
/* Danger: breaking the line within the string literal, like
"foo"\n"bar", breaks win32! */
+ aCharset + NS_LITERAL_STRING("\">\n"));
return NS_OK;
}
NS_IMETHODIMP
mozSanitizingHTMLSerializer::OpenHead(const nsIParserNode& aNode)
{
return OpenContainer(aNode);
}
NS_IMETHODIMP
mozSanitizingHTMLSerializer::CloseHead(const nsIParserNode& aNode)
{
return CloseContainer(aNode);
}
NS_IMETHODIMP
mozSanitizingHTMLSerializer::OpenBody(const nsIParserNode& aNode)
{
return OpenContainer(aNode);
}
NS_IMETHODIMP
mozSanitizingHTMLSerializer::CloseBody(const nsIParserNode& aNode)
{
return CloseContainer(aNode);
}
NS_IMETHODIMP
mozSanitizingHTMLSerializer::OpenForm(const nsIParserNode& aNode)
{
return OpenContainer(aNode);
}
NS_IMETHODIMP
mozSanitizingHTMLSerializer::CloseForm(const nsIParserNode& aNode)
{
return CloseContainer(aNode);
}
NS_IMETHODIMP
mozSanitizingHTMLSerializer::OpenMap(const nsIParserNode& aNode)
{
return OpenContainer(aNode);
}
NS_IMETHODIMP
mozSanitizingHTMLSerializer::CloseMap(const nsIParserNode& aNode)
{
return CloseContainer(aNode);
}
NS_IMETHODIMP
mozSanitizingHTMLSerializer::OpenFrameset(const nsIParserNode& aNode)
{
return OpenContainer(aNode);
}
NS_IMETHODIMP
mozSanitizingHTMLSerializer::CloseFrameset(const nsIParserNode& aNode)
{
return CloseContainer(aNode);
}
NS_IMETHODIMP
mozSanitizingHTMLSerializer::DoFragment(PRBool aFlag)
{
return NS_OK;
}
// Here comes the actual code...
nsresult
mozSanitizingHTMLSerializer::DoOpenContainer(PRInt32 aTag)
{
eHTMLTags type = (eHTMLTags)aTag;
if (IsAllowedTag(type))
{
nsCOMPtr<nsIParserService> parserService;
nsresult rv = GetParserService(getter_AddRefs(parserService));
if (NS_FAILED(rv))
return rv;
const PRUnichar* tag_name;
parserService->HTMLIdToStringTag(aTag, &tag_name);
NS_ENSURE_TRUE(tag_name, NS_ERROR_INVALID_POINTER);
Write(NS_LITERAL_STRING("<") + nsDependentString(tag_name));
// Attributes
if (mParserNode)
{
PRInt32 count = mParserNode->GetAttributeCount();
for (PRInt32 i = 0; i < count; i++)
{
const nsAString& key = mParserNode->GetKeyAt(i);
if(IsAllowedAttribute(type, key))
{
// Ensure basic sanity of value
nsAutoString value(mParserNode->GetValueAt(i));
// SanitizeAttrValue() modifies |value|
if (NS_SUCCEEDED(SanitizeAttrValue(type, key, value)))
{
// Write out
Write(NS_LITERAL_STRING(" "));
Write(key); // I get an infinive loop with | + key + | !!!
Write(NS_LITERAL_STRING("=\"") + value + NS_LITERAL_STRING("\""));
}
}
}
}
Write(NS_LITERAL_STRING(">"));
}
else
Write(NS_LITERAL_STRING(" "));
return NS_OK;
}
nsresult
mozSanitizingHTMLSerializer::DoCloseContainer(PRInt32 aTag)
{
eHTMLTags type = (eHTMLTags)aTag;
if (IsAllowedTag(type)) {
nsCOMPtr<nsIParserService> parserService;
nsresult rv = GetParserService(getter_AddRefs(parserService));
if (NS_FAILED(rv))
return rv;
const PRUnichar* tag_name;
parserService->HTMLIdToStringTag(aTag, &tag_name);
NS_ENSURE_TRUE(tag_name, NS_ERROR_INVALID_POINTER);
Write(NS_LITERAL_STRING("</") + nsDependentString(tag_name)
+ NS_LITERAL_STRING(">"));
}
else
Write(NS_LITERAL_STRING(" "));
return NS_OK;
}
nsresult
mozSanitizingHTMLSerializer::DoAddLeaf(PRInt32 aTag,
const nsAString& aText)
{
eHTMLTags type = (eHTMLTags)aTag;
nsresult rv = NS_OK;
if (type == eHTMLTag_whitespace ||
type == eHTMLTag_newline)
{
Write(aText);
}
else if (type == eHTMLTag_text)
{
nsAutoString text(aText);
if(NS_SUCCEEDED(SanitizeTextNode(text)))
Write(text);
else
Write(NS_LITERAL_STRING(TEXT_REMOVED)); // Does not happen (yet)
if (NS_FAILED(rv))
return rv;
}
else if (type == eHTMLTag_entity)
{
Write(NS_LITERAL_STRING("&"));
Write(aText);
// using + operator here might give an infinitive loop, see above.
}
else
{
DoOpenContainer(type);
}
return rv;
}
/**
Similar to SanitizeAttrValue.
*/
nsresult
mozSanitizingHTMLSerializer::SanitizeTextNode(nsString& aText /*inout*/)
{
nsString& text = aText; // alias
PRInt32 pos;
if ((pos = text.Find("base64")) != kNotFound)
// Probably useless, not sure, but perfhit
// return NS_ERROR_ILLEGAL_VALUE; -- this is too extreme
text.Insert(NS_LITERAL_STRING(TEXT_BREAKER), pos + 1);
/* Insert some other text after the first char of the problematic
text, so we prevent the processing by Gecko.
No idea, if that is needed, but better do it than being sorry.
Somebody who knows all the dangers and how they are reflected
in Gecko please jump in. */
return NS_OK;
}
/**
Ensures basic sanity of attribute value.
This function also (tries to :-( ) makes sure, that no
unwanted / dangerous URLs appear in the document
(like javascript: and data:).
Pass the value as |value| arg. It will be modified in-place.
If the value is not allowed at all, we return with NS_ERROR_ILLEGAL_VALUE.
In that case, do not use the |value|, but output nothing.
*/
nsresult
mozSanitizingHTMLSerializer::SanitizeAttrValue(nsHTMLTag aTag,
const nsAString& attr_name,
nsString& aValue /*inout*/)
{
/* First, cut the attribute to 1000 chars.
Attributes with values longer than 1000 chars seem bogus,
considering that we don't support any JS. The longest attributes
I can think of are URLs, and URLs with 1000 chars are likely to be
bogus, too. */
nsAutoString value(Substring(aValue, 0, 1000));
//value.Truncate(1000); //-- this cuts half of the document !!?!!
#ifdef DEBUG_BenB
printf("7: %s\n", ToNewUTF8String(value));
#endif
value.StripChars("\"'"); /* This will break javascript attributes,
but who wants javascript in
sanitized HTML? */
/* Check some known bad stuff. Add more!
I don't care too much, if it happens to trigger in some innocent cases
(like <img alt="Statistical data: Mortage rates and newspapers">) -
security first. */
if (value.Find("javascript:") != kNotFound ||
value.Find("data:") != kNotFound ||
value.Find("base64") != kNotFound)
return NS_ERROR_ILLEGAL_VALUE;
return NS_OK;
}
/**
*/
PRBool
mozSanitizingHTMLSerializer::IsAllowedTag(nsHTMLTag aTag)
{
nsPRUint32Key tag_key(aTag);
#ifdef DEBUG_BenB
printf("IsAllowedTag %d: %s\n",
aTag,
mAllowedTags.Exists(&tag_key)?"yes":"no");
#endif
return mAllowedTags.Exists(&tag_key);
}
/**
*/
PRBool
mozSanitizingHTMLSerializer::IsAllowedAttribute(nsHTMLTag aTag,
const nsAString& anAttributeName)
{
#ifdef DEBUG_BenB
printf("IsAllowedAttribute %d, -%s-\n",
aTag,
NS_LossyConvertUCS2toASCII(anAttributeName).get());
#endif
nsresult rv;
nsPRUint32Key tag_key(aTag);
nsIProperties* attr_bag = (nsIProperties*)mAllowedTags.Get(&tag_key);
NS_ENSURE_TRUE(attr_bag, PR_FALSE);
PRBool allowed;
nsAutoString attr(anAttributeName);
ToLowerCase(attr);
rv = attr_bag->Has(NS_LossyConvertUCS2toASCII(attr).get(),
&allowed);
if (NS_FAILED(rv))
return PR_FALSE;
#ifdef DEBUG_BenB
printf(" Allowed: %s\n", allowed?"yes":"no");
#endif
return allowed;
}
/**
aPref is a long string, which holds an exhaustive list of allowed tags
and attributes. All other tags and attributes will be removed.
aPref has the format
"html head body ul ol li a(href,name,title) img(src,alt,title) #text"
i.e.
- tags are separated by whitespace
- the attribute list follows the tag directly in brackets
- the attributes are separated by commas.
There is no way to express further restrictions, like "no text inside the
<head> element. This is so to considerably reduce the complexity of the
pref and this implementation.
Update: Akk told me that I might be able to use DTD classes. Later(TM)...
*/
nsresult
mozSanitizingHTMLSerializer::ParsePrefs(const nsAString& aPref)
{
nsCOMPtr<nsIParserService> parserService;
nsresult rv = GetParserService(getter_AddRefs(parserService));
if (NS_FAILED(rv))
return rv;
char* pref = ToNewCString(aPref);
#ifdef DEBUG_BenB
printf("pref: -%s-\n", pref);
#endif
char* tags_lasts;
for (char* iTag = PL_strtok_r(pref, " ", &tags_lasts);
iTag;
iTag = PL_strtok_r(NULL, " ", &tags_lasts))
{
ParseTagPref(nsCAutoString(iTag));
}
delete[] pref;
return NS_OK;
}
/**
Parses e.g. "a(href,title)" (but not several tags at once).
*/
nsresult
mozSanitizingHTMLSerializer::ParseTagPref(const nsCAutoString& tagpref)
{
nsCOMPtr<nsIParserService> parserService;
nsresult rv = GetParserService(getter_AddRefs(parserService));
if (NS_FAILED(rv))
return rv;
// Parsing tag
#ifdef DEBUG_BenB
printf("Processing tag pref -%s-\n", tagpref.get());
#endif
PRInt32 bracket = tagpref.Find("(");
nsCAutoString tag = tagpref;
if (bracket != kNotFound)
tag.Truncate(bracket);
#ifdef DEBUG_BenB
printf( "Tag -%s-\n", tag.get());
#endif
if (tag.Equals(""))
{
printf(" malformed pref: %s\n", tagpref.get());
return NS_ERROR_CANNOT_CONVERT_DATA;
}
// Create key
NS_ConvertASCIItoUCS2 tag_widestr(tag);
PRInt32 tag_id;
parserService->HTMLStringTagToId(tag_widestr, &tag_id);
#ifdef DEBUG_BenB
printf(" Have tag %d\n", tag_id);
const PRUnichar* tag_back;
parserService->HTMLIdToStringTag(tag_id, &tag_back);
printf(" Equals -%s-\n", tag_back
? NS_ConvertUCS2toUTF8(tag_back).get()
: "");
#endif
if (tag_id == eHTMLTag_userdefined ||
tag_id == eHTMLTag_unknown)
{
printf(" unknown tag <%s>, won't add.\n", tag.get());
return NS_ERROR_CANNOT_CONVERT_DATA;
}
nsPRUint32Key tag_key(tag_id);
if (mAllowedTags.Exists(&tag_key))
{
printf(" duplicate tag: %s\n", tag.get());
return NS_ERROR_CANNOT_CONVERT_DATA;
}
if (bracket == kNotFound)
/* There are no attributes in the pref. So, allow none; only the tag
itself */
{
mAllowedTags.Put(&tag_key, 0);
}
else
{
// Attributes
// where is the macro for non-fatal errors in opt builds?
if(tagpref[tagpref.Length() - 1] != ')' ||
tagpref.Length() < PRUint32(bracket) + 3)
{
printf(" malformed pref: %s\n", tagpref.get());
return NS_ERROR_CANNOT_CONVERT_DATA;
}
nsCOMPtr<nsIProperties> attr_bag =
do_CreateInstance(NS_PROPERTIES_CONTRACTID);
NS_ENSURE_TRUE(attr_bag, NS_ERROR_INVALID_POINTER);
nsCAutoString attrList;
attrList.Append(Substring(tagpref,
bracket + 1,
tagpref.Length() - 2 - bracket));
#ifdef DEBUG_BenB
printf(" Attr list: -%s-\n", attrList.get());
#endif
char* attrs_lasts;
for (char* iAttr = PL_strtok_r(NS_CONST_CAST(char*, attrList.get()),
",", &attrs_lasts);
iAttr;
iAttr = PL_strtok_r(NULL, ",", &attrs_lasts))
{
#ifdef DEBUG_BenB
printf(" Processing attr -%s-\n", iAttr);
#endif
attr_bag->Define(iAttr, 0);
}
nsIProperties* attr_bag_raw = attr_bag;
NS_ADDREF(attr_bag_raw);
mAllowedTags.Put(&tag_key, attr_bag_raw);
}
return NS_OK;
}
/*
might be useful:
htmlparser/public/nsHTMLTokens.h for tag categories
*/

View File

@@ -0,0 +1,166 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 HTML Sanitizer code.
*
* The Initial Developer of the Original Code is
* Ben Bucksch <mozilla@bucksch.org>.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Netscape
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef mozSanitizingSerializer_h__
#define mozSanitizingSerializer_h__
#include "mozISanitizingSerializer.h"
#include "nsIContentSerializer.h"
#include "nsIHTMLContentSink.h"
#include "nsHTMLTags.h"
#include "nsCOMPtr.h"
#include "nsIParserService.h"
#include "nsIContent.h"
#include "nsIAtom.h"
#include "nsIDocumentEncoder.h"
#include "nsString.h"
class mozSanitizingHTMLSerializer : public nsIContentSerializer,
public nsIHTMLContentSink,
public mozISanitizingHTMLSerializer
{
public:
mozSanitizingHTMLSerializer();
virtual ~mozSanitizingHTMLSerializer();
static PRBool PR_CALLBACK ReleaseProperties(nsHashKey* key, void* data,
void* closure);
NS_DECL_ISUPPORTS
// nsIContentSerializer
NS_IMETHOD Init(PRUint32 flags, PRUint32 dummy, nsIAtom* aCharSet,
PRBool aIsCopying);
NS_IMETHOD AppendText(nsIDOMText* aText, PRInt32 aStartOffset,
PRInt32 aEndOffset, nsAString& aStr);
NS_IMETHOD AppendCDATASection(nsIDOMCDATASection* aCDATASection,
PRInt32 aStartOffset, PRInt32 aEndOffset,
nsAString& aStr)
{ return NS_OK; }
NS_IMETHOD AppendProcessingInstruction(nsIDOMProcessingInstruction* aPI,
PRInt32 aStartOffset,
PRInt32 aEndOffset,
nsAString& aStr)
{ return NS_OK; }
NS_IMETHOD AppendComment(nsIDOMComment* aComment, PRInt32 aStartOffset,
PRInt32 aEndOffset, nsAString& aStr)
{ return NS_OK; }
NS_IMETHOD AppendDoctype(nsIDOMDocumentType *aDoctype, nsAString& aStr)
{ return NS_OK; }
NS_IMETHOD AppendElementStart(nsIDOMElement *aElement, PRBool aHasChildren,
nsAString& aStr);
NS_IMETHOD AppendElementEnd(nsIDOMElement *aElement, nsAString& aStr);
NS_IMETHOD Flush(nsAString& aStr);
// nsIContentSink
NS_IMETHOD WillBuildModel(void) { return NS_OK; }
NS_IMETHOD DidBuildModel(PRInt32 aQualityLevel) { return NS_OK; }
NS_IMETHOD WillInterrupt(void) { return NS_OK; }
NS_IMETHOD WillResume(void) { return NS_OK; }
NS_IMETHOD SetParser(nsIParser* aParser) { return NS_OK; }
NS_IMETHOD OpenContainer(const nsIParserNode& aNode);
NS_IMETHOD CloseContainer(const nsIParserNode& aNode);
NS_IMETHOD AddLeaf(const nsIParserNode& aNode);
NS_IMETHOD AddComment(const nsIParserNode& aNode) { return NS_OK; }
NS_IMETHOD AddProcessingInstruction(const nsIParserNode& aNode)
{ return NS_OK; }
NS_IMETHOD AddDocTypeDecl(const nsIParserNode& aNode);
NS_IMETHOD FlushPendingNotifications() { return NS_OK; }
NS_IMETHOD SetDocumentCharset(nsAString& aCharset);
NS_IMETHOD NotifyTagObservers(nsIParserNode* aNode) { return NS_OK; }
// nsIHTMLContentSink
NS_IMETHOD OpenHTML(const nsIParserNode& aNode);
NS_IMETHOD CloseHTML(const nsIParserNode& aNode);
NS_IMETHOD OpenHead(const nsIParserNode& aNode);
NS_IMETHOD CloseHead(const nsIParserNode& aNode);
NS_IMETHOD SetTitle(const nsString& aValue);
NS_IMETHOD OpenBody(const nsIParserNode& aNode);
NS_IMETHOD CloseBody(const nsIParserNode& aNode);
NS_IMETHOD OpenForm(const nsIParserNode& aNode);
NS_IMETHOD CloseForm(const nsIParserNode& aNode);
NS_IMETHOD OpenMap(const nsIParserNode& aNode);
NS_IMETHOD CloseMap(const nsIParserNode& aNode);
NS_IMETHOD OpenFrameset(const nsIParserNode& aNode);
NS_IMETHOD CloseFrameset(const nsIParserNode& aNode);
NS_IMETHOD GetPref(PRInt32 aTag,PRBool& aPref);
NS_IMETHOD_(PRBool) IsFormOnStack() { return PR_FALSE; }
NS_IMETHOD DoFragment(PRBool aFlag);
NS_IMETHOD BeginContext(PRInt32 aPosition) { return NS_OK; }
NS_IMETHOD EndContext(PRInt32 aPosition) { return NS_OK; }
NS_IMETHOD WillProcessTokens(void) { return NS_OK; }
NS_IMETHOD DidProcessTokens(void) { return NS_OK; }
NS_IMETHOD WillProcessAToken(void) { return NS_OK; }
NS_IMETHOD DidProcessAToken(void) { return NS_OK; }
// nsISanitizingHTMLSerializer
NS_IMETHOD Initialize(nsAString* aOutString,
PRUint32 aFlags, const nsAString& allowedTags);
protected:
nsresult ParsePrefs(const nsAString& aPref);
nsresult ParseTagPref(const nsCAutoString& tagpref);
PRBool IsAllowedTag(nsHTMLTag aTag);
PRBool IsAllowedAttribute(nsHTMLTag aTag, const nsAString& anAttributeName);
nsresult SanitizeAttrValue(nsHTMLTag aTag, const nsAString& attr_name,
nsString& value /*inout*/);
nsresult SanitizeTextNode(nsString& value /*inout*/);
PRBool IsContainer(PRInt32 aId);
nsresult GetIdForContent(nsIContent* aContent, PRInt32* aID);
nsresult GetParserService(nsIParserService** aParserService);
nsresult DoOpenContainer(PRInt32 aTag);
nsresult DoCloseContainer(PRInt32 aTag);
nsresult DoAddLeaf(PRInt32 aTag, const nsAString& aText);
void Write(const nsAString& aString);
protected:
PRInt32 mFlags;
nsHashtable mAllowedTags;
nsCOMPtr<nsIContent> mContent;
nsAString* mOutputString;
nsIParserNode* mParserNode;
nsCOMPtr<nsIParserService> mParserService;
};
extern nsresult NS_NewSanitizingHTMLSerializer(
nsIContentSerializer** aSerializer);
#endif

View File

@@ -0,0 +1,183 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsIDOMComment.h"
#include "nsGenericDOMDataNode.h"
#include "nsLayoutAtoms.h"
#include "nsCOMPtr.h"
#include "nsContentUtils.h"
class nsCommentNode : public nsGenericDOMDataNode,
public nsIDOMComment
{
public:
nsCommentNode();
virtual ~nsCommentNode();
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_IMPL_NSIDOMNODE_USING_GENERIC_DOM_DATA
// nsIDOMCharacterData
NS_FORWARD_NSIDOMCHARACTERDATA(nsGenericDOMDataNode::)
// nsIDOMComment
// Empty interface
// nsIContent
NS_IMETHOD GetTag(nsIAtom*& aResult) const;
#ifdef DEBUG
NS_IMETHOD List(FILE* out, PRInt32 aIndent) const;
NS_IMETHOD DumpContent(FILE* out = stdout, PRInt32 aIndent = 0,
PRBool aDumpAll = PR_TRUE) const
{
return NS_OK;
}
#endif
// nsITextContent
NS_IMETHOD CloneContent(PRBool aCloneText, nsITextContent** aClone);
};
nsresult
NS_NewCommentNode(nsIContent** aInstancePtrResult)
{
*aInstancePtrResult = new nsCommentNode();
NS_ENSURE_TRUE(*aInstancePtrResult, NS_ERROR_OUT_OF_MEMORY);
NS_ADDREF(*aInstancePtrResult);
return NS_OK;
}
nsCommentNode::nsCommentNode()
{
}
nsCommentNode::~nsCommentNode()
{
}
// QueryInterface implementation for nsCommentNode
NS_INTERFACE_MAP_BEGIN(nsCommentNode)
NS_INTERFACE_MAP_ENTRY(nsITextContent)
NS_INTERFACE_MAP_ENTRY(nsIDOMNode)
NS_INTERFACE_MAP_ENTRY(nsIDOMCharacterData)
NS_INTERFACE_MAP_ENTRY(nsIDOMComment)
NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(Comment)
NS_INTERFACE_MAP_END_INHERITING(nsGenericDOMDataNode)
NS_IMPL_ADDREF_INHERITED(nsCommentNode, nsGenericDOMDataNode)
NS_IMPL_RELEASE_INHERITED(nsCommentNode, nsGenericDOMDataNode)
NS_IMETHODIMP
nsCommentNode::GetTag(nsIAtom*& aResult) const
{
aResult = nsLayoutAtoms::commentTagName;
NS_ADDREF(aResult);
return NS_OK;
}
NS_IMETHODIMP
nsCommentNode::GetNodeName(nsAString& aNodeName)
{
aNodeName.Assign(NS_LITERAL_STRING("#comment"));
return NS_OK;
}
NS_IMETHODIMP
nsCommentNode::GetNodeType(PRUint16* aNodeType)
{
*aNodeType = (PRUint16)nsIDOMNode::COMMENT_NODE;
return NS_OK;
}
NS_IMETHODIMP
nsCommentNode::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
{
nsCOMPtr<nsITextContent> textContent;
nsresult rv = CloneContent(PR_TRUE, getter_AddRefs(textContent));
NS_ENSURE_SUCCESS(rv, rv);
return CallQueryInterface(textContent, aReturn);
}
NS_IMETHODIMP
nsCommentNode::CloneContent(PRBool aCloneText, nsITextContent** aReturn)
{
nsCommentNode* it = new nsCommentNode();
NS_ENSURE_TRUE(it, NS_ERROR_OUT_OF_MEMORY);
nsCOMPtr<nsIContent> kungFuDeathGrip(it);
if (aCloneText) {
it->mText = mText;
}
*aReturn = it;
NS_ADDREF(*aReturn);
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsCommentNode::List(FILE* out, PRInt32 aIndent) const
{
NS_PRECONDITION(mDocument, "bad content");
PRInt32 indx;
for (indx = aIndent; --indx >= 0; ) fputs(" ", out);
fprintf(out, "Comment@%p refcount=%d<!--", this, mRefCnt);
nsAutoString tmp;
ToCString(tmp, 0, mText.GetLength());
fputs(NS_LossyConvertUCS2toASCII(tmp).get(), out);
fputs("-->\n", out);
return NS_OK;
}
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,132 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator.
*
* The Initial Developer of the Original Code is
* Netscape Communications.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Mike Pinkerton <pinkerton@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsContentAreaDragDrop_h__
#define nsContentAreaDragDrop_h__
#include "nsCOMPtr.h"
#include "nsIDragDropHandler.h"
#include "nsIDOMDragListener.h"
#include "nsIDOMEventReceiver.h"
class nsIDOMNode;
class nsISelection;
class nsITransferable;
class nsIOverrideDragSource;
class nsIOverrideDropSite;
class nsIImage;
class nsIPresShell;
class nsIPresContext;
class nsIImageFrame;
class nsIContent;
class nsIDocument;
// {1f34bc80-1bc7-11d6-a384-d705dd0746fc}
#define NS_CONTENTAREADRAGDROP_CID \
{ 0x1f34bc80, 0x1bc7, 0x11d6, { 0xa3, 0x84, 0xd7, 0x05, 0xdd, 0x07, 0x46, 0xfc } }
#define NS_CONTENTAREADRAGDROP_CONTRACTID "@mozilla.org:/content/content-area-dragdrop;1"
//
// class nsContentAreaDragDrop
//
// The class that listens to the chrome events handles anything related
// to drag and drop. Registers itself with the DOM with AddChromeListeners()
// and removes itself with RemoveChromeListeners().
//
class nsContentAreaDragDrop : public nsIDOMDragListener, public nsIDragDropHandler
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIDRAGDROPHANDLER
nsContentAreaDragDrop ( ) ;
virtual ~nsContentAreaDragDrop ( ) ;
// nsIDOMDragListener
NS_IMETHOD DragEnter(nsIDOMEvent* aMouseEvent) ;
NS_IMETHOD DragOver(nsIDOMEvent* aMouseEvent) ;
NS_IMETHOD DragExit(nsIDOMEvent* aMouseEvent) ;
NS_IMETHOD DragDrop(nsIDOMEvent* aMouseEvent) ;
NS_IMETHOD DragGesture(nsIDOMEvent* aMouseEvent) ;
NS_IMETHOD HandleEvent(nsIDOMEvent *event) ;
private:
// Add/remove the relevant listeners
NS_IMETHOD AddDragListener();
NS_IMETHOD RemoveDragListener();
// utility routines
static void FindFirstAnchor(nsIDOMNode* inNode, nsIDOMNode** outAnchor);
static void FindParentLinkNode(nsIDOMNode* inNode, nsIDOMNode** outParent);
static void GetAnchorURL(nsIDOMNode* inNode, nsAString& outURL);
static void CreateLinkText(const nsAString& inURL, const nsAString & inText,
nsAString& outLinkText);
static void GetNodeString(nsIDOMNode* inNode, nsAString & outNodeString);
static void NormalizeSelection(nsIDOMNode* inBaseNode, nsISelection* inSelection);
static void GetEventDocument(nsIDOMEvent* inEvent, nsIDOMDocument** outDocument);
static nsresult GetImageFromDOMNode(nsIDOMNode* inNode, nsIImage** outImage);
static nsresult GetImageFrame(nsIContent* aContent, nsIDocument *aDocument, nsIPresContext *aPresContext,
nsIPresShell *aPresShell, nsIImageFrame** aImageFrame);
PRBool BuildDragData(nsIDOMEvent* inMouseEvent, nsAString & outURLString, nsAString & outTitleString,
nsAString & outHTMLString, nsIImage** outImage, PRBool* outIsAnchor);
nsresult CreateTransferable(const nsAString & inURLString, const nsAString & inTitleString,
const nsAString & inHTMLString, nsIImage* inImage, PRBool inIsAnchor,
nsITransferable** outTrans);
void ExtractURLFromData(const nsACString & inFlavor, nsISupports* inDataWrapper, PRUint32 inDataLen,
nsAString & outURL);
PRPackedBool mListenerInstalled;
nsCOMPtr<nsIDOMEventReceiver> mEventReceiver;
nsIWebNavigation* mNavigator; // weak ref, this is probably my owning webshell
nsIOverrideDragSource* mOverrideDrag; // weak, these could own us but probably will outlive us
nsIOverrideDropSite* mOverrideDrop;
}; // class nsContentAreaDragDrop
#endif /* nsContentAreaDragDrop_h__ */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,980 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsContentList.h"
#include "nsIContent.h"
#include "nsIDOMNode.h"
#include "nsIDOM3Node.h"
#include "nsIDocument.h"
#include "nsINameSpaceManager.h"
#include "nsGenericElement.h"
#include "nsContentUtils.h"
#include "nsLayoutAtoms.h"
#include "nsHTMLAtoms.h" // XXX until atoms get factored into nsLayoutAtoms
// Form related includes
#include "nsIDOMHTMLFormElement.h"
#include "nsIContentList.h"
#include "pldhash.h"
nsBaseContentList::nsBaseContentList()
{
NS_INIT_REFCNT();
}
nsBaseContentList::~nsBaseContentList()
{
// mElements only has weak references to the content objects so we
// don't need to do any cleanup here.
}
// QueryInterface implementation for nsBaseContentList
NS_INTERFACE_MAP_BEGIN(nsBaseContentList)
NS_INTERFACE_MAP_ENTRY(nsIDOMNodeList)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMNodeList)
NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(NodeList)
NS_INTERFACE_MAP_END
NS_IMPL_ADDREF(nsBaseContentList)
NS_IMPL_RELEASE(nsBaseContentList)
NS_IMETHODIMP
nsBaseContentList::GetLength(PRUint32* aLength)
{
*aLength = mElements.Count();
return NS_OK;
}
NS_IMETHODIMP
nsBaseContentList::Item(PRUint32 aIndex, nsIDOMNode** aReturn)
{
nsISupports *tmp = NS_REINTERPRET_CAST(nsISupports *,
mElements.SafeElementAt(aIndex));
if (!tmp) {
*aReturn = nsnull;
return NS_OK;
}
return CallQueryInterface(tmp, aReturn);
}
NS_IMETHODIMP
nsBaseContentList::AppendElement(nsIContent *aContent)
{
// Shouldn't hold a reference since we'll be told when the content
// leaves the document or the document will be destroyed.
mElements.AppendElement(aContent);
return NS_OK;
}
NS_IMETHODIMP
nsBaseContentList::RemoveElement(nsIContent *aContent)
{
mElements.RemoveElement(aContent);
return NS_OK;
}
NS_IMETHODIMP
nsBaseContentList::IndexOf(nsIContent *aContent, PRInt32& aIndex)
{
aIndex = mElements.IndexOf(aContent);
return NS_OK;
}
NS_IMETHODIMP
nsBaseContentList::Reset()
{
mElements.Clear();
return NS_OK;
}
// nsFormContentList
// This helper function checks if aContent is in some way associated
// with aForm, this check is only successful if the form is a
// container (and a form is a container as long as the document is
// wellformed). If the form is a container the only elements that are
// considerd to be associated with a form are the elements that are
// contained within the form. If the form is a leaf element then all
// the elements will be accepted into this list.
static PRBool BelongsInForm(nsIDOMHTMLFormElement *aForm,
nsIContent *aContent)
{
nsCOMPtr<nsIContent> form(do_QueryInterface(aForm));
if (!form) {
NS_WARNING("This should not happen, form is not an nsIContent!");
return PR_TRUE;
}
if (form.get() == aContent) {
// The list for aForm contains the form itself, forms should not
// be reachable by name in the form namespace, so we return false
// here.
return PR_FALSE;
}
nsCOMPtr<nsIContent> content;
aContent->GetParent(*getter_AddRefs(content));
while (content) {
if (content == form) {
// aContent is contained within the form so we return true.
return PR_TRUE;
}
nsCOMPtr<nsIAtom> tag;
content->GetTag(*getter_AddRefs(tag));
if (tag.get() == nsHTMLAtoms::form) {
// The child is contained within a form, but not the right form
// so we ignore it.
return PR_FALSE;
}
nsIContent *tmp = content;
tmp->GetParent(*getter_AddRefs(content));
}
PRInt32 count = 0;
form->ChildCount(count);
if (!count) {
// The form is a leaf and aContent wasn't inside any other form so
// we return true
return PR_TRUE;
}
// The form is a container but aContent wasn't inside the form,
// return false
return PR_FALSE;
}
nsFormContentList::nsFormContentList(nsIDOMHTMLFormElement *aForm,
nsBaseContentList& aContentList)
: nsBaseContentList()
{
NS_INIT_REFCNT();
// move elements that belong to mForm into this content list
PRUint32 i, length = 0;
nsCOMPtr<nsIDOMNode> item;
aContentList.GetLength(&length);
for (i = 0; i < length; i++) {
aContentList.Item(i, getter_AddRefs(item));
nsCOMPtr<nsIContent> c(do_QueryInterface(item));
if (c && BelongsInForm(aForm, c)) {
AppendElement(c);
}
}
}
nsFormContentList::~nsFormContentList()
{
Reset();
}
NS_IMETHODIMP
nsFormContentList::AppendElement(nsIContent *aContent)
{
NS_ADDREF(aContent);
return nsBaseContentList::AppendElement(aContent);
}
NS_IMETHODIMP
nsFormContentList::RemoveElement(nsIContent *aContent)
{
PRInt32 i = mElements.IndexOf(aContent);
if (i >= 0) {
nsIContent *content = NS_STATIC_CAST(nsIContent *, mElements.ElementAt(i));
NS_RELEASE(content);
mElements.RemoveElementAt(i);
}
return NS_OK;
}
NS_IMETHODIMP
nsFormContentList::Reset()
{
PRInt32 i, length = mElements.Count();
for (i = 0; i < length; i++) {
nsIContent *content = NS_STATIC_CAST(nsIContent *, mElements.ElementAt(i));
NS_RELEASE(content);
}
return nsBaseContentList::Reset();
}
// Hashtable for storing nsContentLists
static PLDHashTable gContentListHashTable;
struct ContentListHashEntry : public PLDHashEntryHdr
{
nsContentList* mContentList;
};
PR_STATIC_CALLBACK(const void *)
ContentListHashtableGetKey(PLDHashTable *table, PLDHashEntryHdr *entry)
{
ContentListHashEntry *e = NS_STATIC_CAST(ContentListHashEntry *, entry);
return e->mContentList->GetKey();
}
PR_STATIC_CALLBACK(PLDHashNumber)
ContentListHashtableHashKey(PLDHashTable *table, const void *key)
{
const nsContentListKey* list = NS_STATIC_CAST(const nsContentListKey *, key);
return list->GetHash();
}
PR_STATIC_CALLBACK(PRBool)
ContentListHashtableMatchEntry(PLDHashTable *table,
const PLDHashEntryHdr *entry,
const void *key)
{
const ContentListHashEntry *e =
NS_STATIC_CAST(const ContentListHashEntry *, entry);
const nsContentListKey* list1 = e->mContentList->GetKey();
const nsContentListKey* list2 = NS_STATIC_CAST(const nsContentListKey *, key);
return list1->Equals(*list2);
}
nsresult
NS_GetContentList(nsIDocument* aDocument, nsIAtom* aMatchAtom,
PRInt32 aMatchNameSpaceId, nsIContent* aRootContent,
nsIContentList** aInstancePtrResult)
{
*aInstancePtrResult = nsnull;
nsContentList* list = nsnull;
static PLDHashTableOps hash_table_ops =
{
PL_DHashAllocTable,
PL_DHashFreeTable,
ContentListHashtableGetKey,
ContentListHashtableHashKey,
ContentListHashtableMatchEntry,
PL_DHashMoveEntryStub,
PL_DHashClearEntryStub,
PL_DHashFinalizeStub
};
// Initialize the hashtable if needed.
if (!gContentListHashTable.ops) {
PRBool success = PL_DHashTableInit(&gContentListHashTable,
&hash_table_ops, nsnull,
sizeof(ContentListHashEntry),
16);
if (!success) {
gContentListHashTable.ops = nsnull;
}
}
ContentListHashEntry *entry = nsnull;
// First we look in our hashtable. Then we create a content list if needed
if (gContentListHashTable.ops) {
nsContentListKey hashKey(aDocument, aMatchAtom,
aMatchNameSpaceId, aRootContent);
// A PL_DHASH_ADD is equivalent to a PL_DHASH_LOOKUP for cases
// when the entry is already in the hashtable.
entry = NS_STATIC_CAST(ContentListHashEntry *,
PL_DHashTableOperate(&gContentListHashTable,
&hashKey,
PL_DHASH_ADD));
if (entry)
list = entry->mContentList;
}
if (!list) {
// We need to create a ContentList and add it to our new entry, if
// we have an entry
list = new nsContentList(aDocument, aMatchAtom,
aMatchNameSpaceId, aRootContent);
if (entry) {
if (list)
entry->mContentList = list;
else
PL_DHashTableRawRemove(&gContentListHashTable, entry);
}
}
NS_ENSURE_TRUE(list, NS_ERROR_OUT_OF_MEMORY);
*aInstancePtrResult = list;
NS_ADDREF(*aInstancePtrResult);
return NS_OK;
}
// nsContentList implementation
nsContentList::nsContentList(nsIDocument *aDocument,
nsIAtom* aMatchAtom,
PRInt32 aMatchNameSpaceId,
nsIContent* aRootContent)
: nsBaseContentList(), nsContentListKey(aDocument, aMatchAtom, aMatchNameSpaceId, aRootContent)
{
if (nsLayoutAtoms::wildcard == mMatchAtom) {
mMatchAll = PR_TRUE;
}
else {
mMatchAll = PR_FALSE;
}
mFunc = nsnull;
mData = nsnull;
mState = LIST_DIRTY;
Init(aDocument);
}
nsContentList::nsContentList(nsIDocument *aDocument,
nsContentListMatchFunc aFunc,
const nsAString& aData,
nsIContent* aRootContent)
: nsBaseContentList(), nsContentListKey(aDocument, nsnull, kNameSpaceID_Unknown, aRootContent)
{
mFunc = aFunc;
if (!aData.IsEmpty()) {
mData = new nsString(aData);
// If this fails, fail silently
}
else {
mData = nsnull;
}
mMatchAtom = nsnull;
mRootContent = aRootContent;
mMatchAll = PR_FALSE;
mState = LIST_DIRTY;
Init(aDocument);
}
void nsContentList::Init(nsIDocument *aDocument)
{
// We don't reference count the reference to the document
// If the document goes away first, we'll be informed and we
// can drop our reference.
// If we go away first, we'll get rid of ourselves from the
// document's observer list.
mDocument = aDocument;
if (mDocument) {
mDocument->AddObserver(this);
}
}
nsContentList::~nsContentList()
{
RemoveFromHashtable();
if (mDocument) {
mDocument->RemoveObserver(this);
}
delete mData;
}
// QueryInterface implementation for nsContentList
NS_INTERFACE_MAP_BEGIN(nsContentList)
NS_INTERFACE_MAP_ENTRY(nsIDOMHTMLCollection)
NS_INTERFACE_MAP_ENTRY(nsIContentList)
NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(HTMLCollection)
NS_INTERFACE_MAP_END_INHERITING(nsBaseContentList)
NS_IMPL_ADDREF_INHERITED(nsContentList, nsBaseContentList)
NS_IMPL_RELEASE_INHERITED(nsContentList, nsBaseContentList)
NS_IMETHODIMP
nsContentList::GetLength(PRUint32* aLength, PRBool aDoFlush)
{
nsresult result = CheckDocumentExistence();
if (NS_SUCCEEDED(result)) {
BringSelfUpToDate(aDoFlush);
*aLength = mElements.Count();
}
return result;
}
NS_IMETHODIMP
nsContentList::Item(PRUint32 aIndex, nsIDOMNode** aReturn, PRBool aDoFlush)
{
nsresult result = CheckDocumentExistence();
if (NS_SUCCEEDED(result)) {
if (mDocument && aDoFlush) {
// Flush pending content changes Bug 4891
mDocument->FlushPendingNotifications(PR_FALSE);
}
if (mState != LIST_UP_TO_DATE)
PopulateSelf(aIndex+1);
NS_ASSERTION(!mDocument || mState != LIST_DIRTY,
"PopulateSelf left the list in a dirty (useless) state!");
nsIContent *element = NS_STATIC_CAST(nsIContent *,
mElements.SafeElementAt(aIndex));
if (element) {
result = CallQueryInterface(element, aReturn);
}
else {
*aReturn = nsnull;
}
}
return result;
}
NS_IMETHODIMP
nsContentList::NamedItem(const nsAString& aName, nsIDOMNode** aReturn, PRBool aDoFlush)
{
nsresult result = CheckDocumentExistence();
if (NS_SUCCEEDED(result)) {
BringSelfUpToDate(aDoFlush);
PRInt32 i, count = mElements.Count();
for (i = 0; i < count; i++) {
nsIContent *content = NS_STATIC_CAST(nsIContent *,
mElements.ElementAt(i));
if (content) {
nsAutoString name;
// XXX Should it be an EqualsIgnoreCase?
if (((content->GetAttr(kNameSpaceID_None, nsHTMLAtoms::name,
name) == NS_CONTENT_ATTR_HAS_VALUE) &&
aName.Equals(name)) ||
((content->GetAttr(kNameSpaceID_None, nsHTMLAtoms::id,
name) == NS_CONTENT_ATTR_HAS_VALUE) &&
aName.Equals(name))) {
return CallQueryInterface(content, aReturn);
}
}
}
}
*aReturn = nsnull;
return result;
}
NS_IMETHODIMP
nsContentList::IndexOf(nsIContent *aContent, PRInt32& aIndex, PRBool aDoFlush)
{
nsresult result = CheckDocumentExistence();
if (NS_SUCCEEDED(result)) {
BringSelfUpToDate(aDoFlush);
aIndex = mElements.IndexOf(aContent);
}
return result;
}
NS_IMETHODIMP
nsContentList::GetLength(PRUint32* aLength)
{
return GetLength(aLength, PR_TRUE);
}
NS_IMETHODIMP
nsContentList::Item(PRUint32 aIndex, nsIDOMNode** aReturn)
{
return Item(aIndex, aReturn, PR_TRUE);
}
NS_IMETHODIMP
nsContentList::NamedItem(const nsAString& aName, nsIDOMNode** aReturn)
{
return NamedItem(aName, aReturn, PR_TRUE);
}
NS_IMETHODIMP
nsContentList::ContentAppended(nsIDocument *aDocument, nsIContent* aContainer,
PRInt32 aNewIndexInContainer)
{
/*
* If the state is LIST_DIRTY then we have no useful information in
* our list and we want to put off doing work as much as possible.
*/
if (mState == LIST_DIRTY)
return NS_OK;
PRInt32 count;
aContainer->ChildCount(count);
/*
* We want to handle the case of ContentAppended by sometimes
* appending the content to our list, not just setting state to
* LIST_DIRTY, since most of our ContentAppended notifications
* should come during pageload and be at the end of the document.
* Do a bit of work to see whether we could just append to what we
* already have.
*/
if ((count > 0) && IsDescendantOfRoot(aContainer)) {
PRInt32 ourCount = mElements.Count();
PRBool appendToList = PR_FALSE;
if (ourCount == 0) {
appendToList = PR_TRUE;
} else {
nsIContent* ourLastContent =
NS_STATIC_CAST(nsIContent*, mElements.ElementAt(ourCount - 1));
/*
* We want to append instead of invalidating in two cases:
* 1) aContainer is an ancestor of ourLastContent (this case
covers aContainer == ourLastContent)
* 2) aContainer comes after ourLastContent in document order
*/
if (nsContentUtils::ContentIsDescendantOf(ourLastContent, aContainer)) {
appendToList = PR_TRUE;
} else {
nsCOMPtr<nsIDOM3Node> ourLastDOM3Node(do_QueryInterface(ourLastContent));
nsCOMPtr<nsIDOMNode> newNodeContainer(do_QueryInterface(aContainer));
if (ourLastDOM3Node && newNodeContainer) {
PRUint16 comparisonFlags;
nsresult rv = ourLastDOM3Node->CompareTreePosition(newNodeContainer,
&comparisonFlags);
if (NS_SUCCEEDED(rv) &&
(comparisonFlags & nsIDOMNode::TREE_POSITION_FOLLOWING)) {
appendToList = PR_TRUE;
}
}
}
}
PRInt32 i;
if (!appendToList) {
// The new stuff is somewhere in the middle of our list; check
// whether we need to invalidate
nsCOMPtr<nsIContent> content;
for (i = aNewIndexInContainer; i <= count-1; ++i) {
aContainer->ChildAt(i, *getter_AddRefs(content));
if (MatchSelf(content)) {
// Uh-oh. We're gonna have to add elements into the middle
// of our list. That's not worth the effort.
mState = LIST_DIRTY;
break;
}
}
return NS_OK;
}
/*
* At this point we know we could append. If we're not up to
* date, however, that would be a bad idea -- it could miss some
* content that we never picked up due to being lazy. Further, we
* may never get asked for this content... so don't grab it yet.
*/
if (mState == LIST_LAZY) // be lazy
return NS_OK;
/*
* We're up to date. That means someone's actively using us; we
* may as well grab this content....
*/
nsCOMPtr<nsIContent> content;
for (i = aNewIndexInContainer; i <= count-1; ++i) {
aContainer->ChildAt(i, *getter_AddRefs(content));
PRUint32 limit = PRUint32(-1);
PopulateWith(content, PR_TRUE, limit);
}
}
return NS_OK;
}
NS_IMETHODIMP
nsContentList::ContentInserted(nsIDocument *aDocument,
nsIContent* aContainer,
nsIContent* aChild,
PRInt32 aIndexInContainer)
{
if (mState == LIST_DIRTY)
return NS_OK;
if (IsDescendantOfRoot(aContainer) && MatchSelf(aChild))
mState = LIST_DIRTY;
return NS_OK;
}
NS_IMETHODIMP
nsContentList::ContentReplaced(nsIDocument *aDocument,
nsIContent* aContainer,
nsIContent* aOldChild,
nsIContent* aNewChild,
PRInt32 aIndexInContainer)
{
if (mState == LIST_DIRTY)
return NS_OK;
if (IsDescendantOfRoot(aContainer)) {
if (MatchSelf(aOldChild) || MatchSelf(aNewChild)) {
mState = LIST_DIRTY;
}
}
else if (ContainsRoot(aOldChild)) {
DisconnectFromDocument();
}
return NS_OK;
}
NS_IMETHODIMP
nsContentList::ContentRemoved(nsIDocument *aDocument,
nsIContent* aContainer,
nsIContent* aChild,
PRInt32 aIndexInContainer)
{
if (IsDescendantOfRoot(aContainer)) {
if (MatchSelf(aChild)) {
mState = LIST_DIRTY;
}
}
else if (ContainsRoot(aChild)) {
DisconnectFromDocument();
}
return NS_OK;
}
NS_IMETHODIMP
nsContentList::DocumentWillBeDestroyed(nsIDocument *aDocument)
{
DisconnectFromDocument();
Reset();
return NS_OK;
}
PRBool
nsContentList::Match(nsIContent *aContent)
{
if (!aContent)
return PR_FALSE;
if (mMatchAtom) {
nsCOMPtr<nsINodeInfo> ni;
aContent->GetNodeInfo(*getter_AddRefs(ni));
if (!ni)
return PR_FALSE;
nsCOMPtr<nsIDOMNode> node(do_QueryInterface(aContent));
if (!node)
return PR_FALSE;
PRUint16 type;
node->GetNodeType(&type);
if (type != nsIDOMNode::ELEMENT_NODE)
return PR_FALSE;
if (mMatchNameSpaceId == kNameSpaceID_Unknown) {
return (mMatchAll || ni->Equals(mMatchAtom));
}
return ((mMatchAll && ni->NamespaceEquals(mMatchNameSpaceId)) ||
ni->Equals(mMatchAtom, mMatchNameSpaceId));
}
else if (mFunc) {
return (*mFunc)(aContent, mData);
}
return PR_FALSE;
}
nsresult
nsContentList::CheckDocumentExistence()
{
nsresult result = NS_OK;
if (!mDocument && mRootContent) {
result = mRootContent->GetDocument(mDocument);
if (mDocument) {
mDocument->AddObserver(this);
mState = LIST_DIRTY;
}
}
return result;
}
PRBool
nsContentList::MatchSelf(nsIContent *aContent)
{
if (Match(aContent))
return PR_TRUE;
PRInt32 i, count = -1;
aContent->ChildCount(count);
nsCOMPtr<nsIContent> child;
for (i = 0; i < count; i++) {
aContent->ChildAt(i, *getter_AddRefs(child));
if (MatchSelf(child)) {
return PR_TRUE;
}
}
return PR_FALSE;
}
void
nsContentList::PopulateWith(nsIContent *aContent, PRBool aIncludeRoot,
PRUint32 & aElementsToAppend)
{
if (aIncludeRoot) {
if (Match(aContent)) {
mElements.AppendElement(aContent);
--aElementsToAppend;
if (aElementsToAppend == 0)
return;
}
}
PRInt32 i, count;
aContent->ChildCount(count);
nsCOMPtr<nsIContent> child;
for (i = 0; i < count; i++) {
aContent->ChildAt(i, *getter_AddRefs(child));
PopulateWith(child, PR_TRUE, aElementsToAppend);
if (aElementsToAppend == 0)
return;
}
}
void
nsContentList::PopulateWithStartingAfter(nsIContent *aStartRoot,
nsIContent *aStartChild,
PRUint32 & aElementsToAppend)
{
#ifdef DEBUG
PRUint32 invariant = aElementsToAppend + mElements.Count();
#endif
PRInt32 i = 0;
if (aStartChild) {
aStartRoot->IndexOf(aStartChild, i);
NS_ASSERTION(i >= 0, "The start child must be a child of the start root!");
++i; // move to one past
}
PRInt32 childCount;
aStartRoot->ChildCount(childCount);
nsCOMPtr<nsIContent> child;
for ( ; i < childCount; ++i) {
aStartRoot->ChildAt(i, *getter_AddRefs(child));
PopulateWith(child, PR_TRUE, aElementsToAppend);
NS_ASSERTION(aElementsToAppend + mElements.Count() == invariant,
"Something is awry in PopulateWith!");
if (aElementsToAppend == 0)
return;
}
nsCOMPtr<nsIContent> parent;
aStartRoot->GetParent(*getter_AddRefs(parent));
if (parent)
PopulateWithStartingAfter(parent, aStartRoot, aElementsToAppend);
}
void
nsContentList::PopulateSelf(PRUint32 aNeededLength)
{
if (mState == LIST_DIRTY) {
Reset();
}
PRUint32 count = mElements.Count();
if (count >= aNeededLength) // We're all set
return;
PRUint32 elementsToAppend = aNeededLength - count;
#ifdef DEBUG
PRUint32 invariant = elementsToAppend + mElements.Count();
#endif
if (count != 0) {
PopulateWithStartingAfter(NS_STATIC_CAST(nsIContent*,
mElements.ElementAt(count - 1)),
nsnull,
elementsToAppend);
NS_ASSERTION(elementsToAppend + mElements.Count() == invariant,
"Something is awry in PopulateWithStartingAfter!");
} else if (mRootContent) {
PopulateWith(mRootContent, PR_FALSE, elementsToAppend);
NS_ASSERTION(elementsToAppend + mElements.Count() == invariant,
"Something is awry in PopulateWith!");
}
else if (mDocument) {
nsCOMPtr<nsIContent> root;
mDocument->GetRootContent(getter_AddRefs(root));
if (root) {
PopulateWith(root, PR_TRUE, elementsToAppend);
NS_ASSERTION(elementsToAppend + mElements.Count() == invariant,
"Something is awry in PopulateWith!");
}
}
if (mDocument) {
if (elementsToAppend != 0)
mState = LIST_UP_TO_DATE;
else
mState = LIST_LAZY;
} else {
// No document means we have to stay on our toes since we don't
// get content notifications.
mState = LIST_DIRTY;
}
}
PRBool
nsContentList::IsDescendantOfRoot(nsIContent* aContainer)
{
if (!mRootContent) {
#ifdef DEBUG
nsCOMPtr<nsIDocument> doc;
aContainer->GetDocument(*getter_AddRefs(doc));
NS_ASSERTION(doc == mDocument, "We should not get in here if aContainer is appended to some _other_ document!");
#endif
return PR_TRUE;
}
if (!aContainer) {
return PR_FALSE;
}
return nsContentUtils::ContentIsDescendantOf(aContainer, mRootContent);
}
PRBool
nsContentList::ContainsRoot(nsIContent* aContent)
{
if (!mRootContent || !aContent) {
return PR_FALSE;
}
return nsContentUtils::ContentIsDescendantOf(mRootContent, aContent);
}
void
nsContentList::DisconnectFromDocument()
{
if (mDocument) {
// Our key will change... Best remove ourselves before that happens.
RemoveFromHashtable();
mDocument->RemoveObserver(this);
mDocument = nsnull;
}
// We will get no more updates, so we can never know we're up to
// date
mState = LIST_DIRTY;
}
void
nsContentList::RemoveFromHashtable()
{
if (!gContentListHashTable.ops)
return;
PL_DHashTableOperate(&gContentListHashTable,
GetKey(),
PL_DHASH_REMOVE);
if (gContentListHashTable.entryCount == 0) {
PL_DHashTableFinish(&gContentListHashTable);
gContentListHashTable.ops = nsnull;
}
}
void
nsContentList::BringSelfUpToDate(PRBool aDoFlush)
{
if (mDocument && aDoFlush) {
mDocument->FlushPendingNotifications(PR_FALSE); // Flush pending content changes Bug 4891
}
if (mState != LIST_UP_TO_DATE)
PopulateSelf(PRUint32(-1));
NS_ASSERTION(!mDocument || mState == LIST_UP_TO_DATE,
"PopulateSelf dod not bring content list up to date!");
}

View File

@@ -0,0 +1,379 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsContentList_h___
#define nsContentList_h___
#include "nsISupports.h"
#include "nsVoidArray.h"
#include "nsString.h"
#include "nsIDOMHTMLCollection.h"
#include "nsIDOMNodeList.h"
#include "nsIDocumentObserver.h"
#include "nsIContentList.h"
typedef PRBool (*nsContentListMatchFunc)(nsIContent* aContent,
nsString* aData);
class nsIDocument;
class nsIDOMHTMLFormElement;
class nsBaseContentList : public nsIDOMNodeList
{
public:
nsBaseContentList();
virtual ~nsBaseContentList();
NS_DECL_ISUPPORTS
// nsIDOMNodeList
NS_DECL_NSIDOMNODELIST
NS_IMETHOD AppendElement(nsIContent *aContent);
NS_IMETHOD RemoveElement(nsIContent *aContent);
NS_IMETHOD IndexOf(nsIContent *aContent, PRInt32& aIndex);
NS_IMETHOD Reset();
protected:
nsAutoVoidArray mElements;
};
// This class is used only by form element code and this is a static
// list of elements. NOTE! This list holds strong references to
// the elements in the list.
class nsFormContentList : public nsBaseContentList
{
public:
nsFormContentList(nsIDOMHTMLFormElement *aForm,
nsBaseContentList& aContentList);
virtual ~nsFormContentList();
NS_IMETHOD AppendElement(nsIContent *aContent);
NS_IMETHOD RemoveElement(nsIContent *aContent);
NS_IMETHOD Reset();
};
/**
* Class that's used as the key to hash nsContentList implementations
* for fast retrieval
*/
class nsContentListKey
{
public:
nsContentListKey(nsIDocument *aDocument,
nsIAtom* aMatchAtom,
PRInt32 aMatchNameSpaceId,
nsIContent* aRootContent)
: mMatchAtom(aMatchAtom),
mMatchNameSpaceId(aMatchNameSpaceId),
mDocument(aDocument),
mRootContent(aRootContent)
{
}
nsContentListKey(const nsContentListKey& aContentListKey)
: mMatchAtom(aContentListKey.mMatchAtom),
mMatchNameSpaceId(aContentListKey.mMatchNameSpaceId),
mDocument(aContentListKey.mDocument),
mRootContent(aContentListKey.mRootContent)
{
}
PRBool Equals(const nsContentListKey& aContentListKey) const
{
return
mMatchAtom == aContentListKey.mMatchAtom &&
mMatchNameSpaceId == aContentListKey.mMatchNameSpaceId &&
mDocument == aContentListKey.mDocument &&
mRootContent == aContentListKey.mRootContent;
}
inline PRUint32 GetHash(void) const
{
return
NS_PTR_TO_INT32(mMatchAtom.get()) ^
(NS_PTR_TO_INT32(mRootContent) << 8) ^
(NS_PTR_TO_INT32(mDocument) << 16) ^
(mMatchNameSpaceId << 24);
}
protected:
nsCOMPtr<nsIAtom> mMatchAtom;
PRInt32 mMatchNameSpaceId;
nsIDocument* mDocument; // Weak ref
// XXX What if the mRootContent is detached from the doc and _then_
// goes away (so we never get notified)?
nsIContent* mRootContent; // Weak ref
};
/**
* Class that implements a live NodeList that matches nodes in the
* tree based on some criterion
*/
class nsContentList : public nsBaseContentList,
protected nsContentListKey,
public nsIDOMHTMLCollection,
public nsIDocumentObserver,
public nsIContentList
{
public:
NS_DECL_ISUPPORTS_INHERITED
nsContentList(nsIDocument *aDocument,
nsIAtom* aMatchAtom,
PRInt32 aMatchNameSpaceId,
nsIContent* aRootContent=nsnull);
nsContentList(nsIDocument *aDocument,
nsContentListMatchFunc aFunc,
const nsAString& aData,
nsIContent* aRootContent=nsnull);
virtual ~nsContentList();
// nsIDOMHTMLCollection
NS_IMETHOD GetLength(PRUint32* aLength);
NS_IMETHOD Item(PRUint32 aIndex, nsIDOMNode** aReturn);
NS_IMETHOD NamedItem(const nsAString& aName, nsIDOMNode** aReturn);
/// nsIContentList
NS_IMETHOD GetLength(PRUint32* aLength, PRBool aDoFlush);
NS_IMETHOD Item(PRUint32 aIndex, nsIDOMNode** aReturn,
PRBool aDoFlush);
NS_IMETHOD NamedItem(const nsAString& aName, nsIDOMNode** aReturn,
PRBool aDoFlush);
NS_IMETHOD IndexOf(nsIContent *aContent, PRInt32& aIndex,
PRBool aDoFlush);
// nsIDocumentObserver
NS_IMETHOD BeginUpdate(nsIDocument *aDocument) { return NS_OK; }
NS_IMETHOD EndUpdate(nsIDocument *aDocument) { return NS_OK; }
NS_IMETHOD BeginLoad(nsIDocument *aDocument) { return NS_OK; }
NS_IMETHOD EndLoad(nsIDocument *aDocument) { return NS_OK; }
NS_IMETHOD BeginReflow(nsIDocument *aDocument,
nsIPresShell* aShell) { return NS_OK; }
NS_IMETHOD EndReflow(nsIDocument *aDocument,
nsIPresShell* aShell) { return NS_OK; }
NS_IMETHOD ContentChanged(nsIDocument *aDocument,
nsIContent* aContent,
nsISupports* aSubContent) { return NS_OK; }
NS_IMETHOD ContentStatesChanged(nsIDocument* aDocument,
nsIContent* aContent1,
nsIContent* aContent2,
PRInt32 aStateMask) { return NS_OK; }
NS_IMETHOD AttributeChanged(nsIDocument *aDocument,
nsIContent* aContent,
PRInt32 aNameSpaceID,
nsIAtom* aAttribute,
PRInt32 aModType,
PRInt32 aHint) { return NS_OK; }
NS_IMETHOD ContentAppended(nsIDocument *aDocument,
nsIContent* aContainer,
PRInt32 aNewIndexInContainer);
NS_IMETHOD ContentInserted(nsIDocument *aDocument,
nsIContent* aContainer,
nsIContent* aChild,
PRInt32 aIndexInContainer);
NS_IMETHOD ContentReplaced(nsIDocument *aDocument,
nsIContent* aContainer,
nsIContent* aOldChild,
nsIContent* aNewChild,
PRInt32 aIndexInContainer);
NS_IMETHOD ContentRemoved(nsIDocument *aDocument,
nsIContent* aContainer,
nsIContent* aChild,
PRInt32 aIndexInContainer);
NS_IMETHOD StyleSheetAdded(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet) { return NS_OK; }
NS_IMETHOD StyleSheetRemoved(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet) { return NS_OK; }
NS_IMETHOD StyleSheetDisabledStateChanged(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet,
PRBool aDisabled) { return NS_OK; }
NS_IMETHOD StyleRuleChanged(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule,
PRInt32 aHint) { return NS_OK; }
NS_IMETHOD StyleRuleAdded(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule) { return NS_OK; }
NS_IMETHOD StyleRuleRemoved(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule) { return NS_OK; }
NS_IMETHOD DocumentWillBeDestroyed(nsIDocument *aDocument);
// Other public methods
nsContentListKey* GetKey() {
return NS_STATIC_CAST(nsContentListKey*, this);
}
protected:
void Init(nsIDocument *aDocument);
/**
* Returns whether the content element matches our criterion
*
* @param aContent the content to attempt to match
* @return whether we match
*/
PRBool Match(nsIContent *aContent);
/**
* Match recursively. See if anything in the subtree rooted at
* aContent matches our criterion.
*
* @param aContent the root of the subtree to match against
* @return whether we match something in the tree rooted at aContent
*/
PRBool MatchSelf(nsIContent *aContent);
/**
* Add elements in the subtree rooted in aContent that match our
* criterion to our list until we've picked up aElementsToAppend
* elements. This function enforces the invariant that
* |aElementsToAppend + mElements.Count()| is a constant.
*
* @param aContent the root of the subtree we want to traverse
* @param aIncludeRoot whether to include the root in the traversal
* @param aElementsToAppend how many elements to append to the list
* before stopping
*/
void PopulateWith(nsIContent *aContent, PRBool aIncludeRoot,
PRUint32 & aElementsToAppend);
/**
* Populate our list starting at the child of aStartRoot that comes
* after aStartChild (if such exists) and continuing in document
* order. Stop once we've picked up aElementsToAppend elements.
* This function enforces the invariant that |aElementsToAppend +
* mElements.Count()| is a constant.
*
* @param aStartRoot the node with whose children we want to start traversal
* @param aStartChild the child after which we want to start
* @param aElementsToAppend how many elements to append to the list
* before stopping
*/
void PopulateWithStartingAfter(nsIContent *aStartRoot,
nsIContent *aStartChild,
PRUint32 & aElementsToAppend);
/**
* Populate our list. Stop once we have at least aNeededLength
* elements. At the end of PopulateSelf running, either the last
* node we examined is the last node in our array or we have
* traversed the whole document (or both).
*
* @param aNeededLength the length the list should have when we are
* done (unless it exhausts the document)
*/
void PopulateSelf(PRUint32 aNeededLength);
/**
* Our root content has been disconnected from the document, so stop
* observing. From this point on, if someone asks us something we
* walk the tree rooted at mRootContent starting at the beginning
* and going as far as we need to to answer the question.
*/
void DisconnectFromDocument();
/**
* @param aContainer a content node which could be a descendant of
* mRootContent
* @return PR_TRUE if mRootContent is null, PR_FALSE if aContainer
* is null, PR_TRUE if aContainer is a descendant of mRootContent,
* PR_FALSE otherwise
*/
PRBool IsDescendantOfRoot(nsIContent* aContainer);
/**
* Does this subtree contain our mRootContent?
*
* @param aContainer the root of the subtree
* @return PR_FALSE if mRootContent is null, otherwise whether
* mRootContent is a descendant of aContainer
*/
PRBool ContainsRoot(nsIContent* aContent);
/**
* If we have no document and we have a root content, then check if
* our content has been added to a document. If so, we'll become an
* observer of the document.
*/
nsresult CheckDocumentExistence();
void RemoveFromHashtable();
inline void BringSelfUpToDate(PRBool aDoFlush);
/**
* Function to use to determine whether a piece of content matches
* our criterion
*/
nsContentListMatchFunc mFunc;
/**
* Closure data to pass to mFunc when we call it
*/
nsString* mData;
/**
* True if we are looking for elements named "*"
*/
PRPackedBool mMatchAll;
/**
* The current state of the list (possible values are:
* LIST_UP_TO_DATE, LIST_LAZY, LIST_DIRTY
*/
PRUint8 mState;
};
/**
* LIST_UP_TO_DATE means that the list is up to date and need not do
* any walking to be able to answer any questions anyone may have.
*/
#define LIST_UP_TO_DATE 0
/**
* LIST_DIRTY means that the list contains no useful information and
* if anyone asks it anything it will have to populate itself before
* answering.
*/
#define LIST_DIRTY 1
/**
* LIST_LAZY means that the list has populated itself to a certain
* extent and that that part of the list is still valid. Requests for
* things outside that part of the list will require walking the tree
* some more. When a list is in this state, the last thing in
* mElements is the last node in the tree that the list looked at.
*/
#define LIST_LAZY 2
extern nsresult
NS_GetContentList(nsIDocument* aDocument, nsIAtom* aMatchAtom,
PRInt32 aMatchNameSpaceId, nsIContent* aRootContent,
nsIContentList** aInstancePtrResult);
#endif // nsContentList_h___

View File

@@ -0,0 +1,177 @@
/* -*- Mode: C++; tab-width: 8; 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 code.
*
* The Initial Developer of the Original Code is Zero-Knowledge Systems,
* Inc. Portions created by Zero-Knowledge are Copyright (C) 2000
* Zero-Knowledge Systems, Inc. All Rights Reserved.
*
* Contributor(s):
*/
#include "nsISupports.h"
#include "nsISupportsPrimitives.h"
#include "nsXPIDLString.h"
#include "nsContentPolicyUtils.h"
#include "nsContentPolicy.h"
#include "nsICategoryManager.h"
NS_IMPL_ISUPPORTS1(nsContentPolicy, nsIContentPolicy)
nsresult
NS_NewContentPolicy(nsIContentPolicy **aResult)
{
*aResult = new nsContentPolicy;
if (!*aResult)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*aResult);
return NS_OK;
}
/*
* This constructor does far too much. I wish there was a way to get
* an Init method called by the service manager after the factory
* returned the new object, so that errors could be propagated back to
* the caller correctly.
*/
nsContentPolicy::nsContentPolicy()
{
NS_INIT_REFCNT();
nsresult rv;
nsCOMPtr<nsICategoryManager> catman =
do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
if (NS_FAILED(rv))
/* log an error? */
return;
/*
* I'd like to use GetCategoryContents, so that I can size the array
* correctly on the first go and avoid the enumerator overhead, but it's
* not yet implemented (see nsCategoryManager.cpp). No biggie, I guess.
*/
nsCOMPtr<nsISimpleEnumerator> catEnum;
if (NS_FAILED(catman->EnumerateCategory(NS_CONTENTPOLICY_CATEGORY,
getter_AddRefs(catEnum)))) {
/* no category, no problem */
return;
}
PRBool hasMore;
if (NS_FAILED(catEnum->HasMoreElements(&hasMore)) || !hasMore ||
NS_FAILED(NS_NewISupportsArray(getter_AddRefs(mPolicies)))) {
return;
}
/*
* Populate mPolicies with policy services named by contractids in the
* "content-policy" category.
*/
nsCOMPtr<nsISupports> item;
while (NS_SUCCEEDED(catEnum->GetNext(getter_AddRefs(item)))) {
nsCOMPtr<nsISupportsString> string = do_QueryInterface(item, &rv);
if (NS_FAILED(rv))
continue;
nsXPIDLCString contractid;
if (NS_FAILED(string->GetData(getter_Copies(contractid))))
continue;
#ifdef DEBUG_shaver
fprintf(stderr, "POLICY: loading %s\n", (const char *)contractid);
#endif
/*
* Create this policy service and add to mPolicies.
*
* Should we try to parse as a CID, in case the component prefers to be
* registered that way?
*/
nsCOMPtr<nsISupports> policy = do_GetService(contractid, &rv);
if (NS_SUCCEEDED(rv))
mPolicies->AppendElement(policy);
}
}
nsContentPolicy::~nsContentPolicy()
{
}
#define POLICY_LOAD (PRInt32)0
#define POLICY_PROCESS (PRInt32)1
NS_IMETHODIMP
nsContentPolicy::CheckPolicy(PRInt32 policyType, PRInt32 contentType,
nsIURI *contentLocation, nsISupports *context,
nsIDOMWindow *window, PRBool *shouldProceed)
{
*shouldProceed = PR_TRUE;
if (!mPolicies)
return NS_OK;
/*
* Enumerate mPolicies and ask each of them, taking the logical AND of
* their permissions.
*/
nsresult rv;
nsCOMPtr<nsIContentPolicy> policy;
PRUint32 count;
if (NS_FAILED(rv = mPolicies->Count(&count)))
return NS_OK;
for (PRUint32 i = 0; i < count; i++) {
rv = mPolicies->QueryElementAt(i, NS_GET_IID(nsIContentPolicy),
getter_AddRefs(policy));
if (NS_FAILED(rv))
continue;
/* check the appropriate policy */
if (policyType == POLICY_LOAD) {
rv = policy->ShouldLoad(contentType, contentLocation, context,
window, shouldProceed);
} else {
rv = policy->ShouldProcess(contentType, contentLocation, context,
window, shouldProceed);
}
if (NS_SUCCEEDED(rv) && !*shouldProceed)
/* policy says no, no point continuing to check */
return NS_OK;
}
/*
* One of the policy objects might be misbehaving and setting shouldProceed
* to PR_FALSE before returning an error, so force it back to PR_TRUE
* here.
*/
*shouldProceed = PR_TRUE;
return NS_OK;
}
NS_IMETHODIMP
nsContentPolicy::ShouldLoad(PRInt32 contentType, nsIURI *contentLocation,
nsISupports *context, nsIDOMWindow *window,
PRBool *shouldLoad)
{
return CheckPolicy(POLICY_LOAD, contentType, contentLocation, context,
window, shouldLoad);
}
NS_IMETHODIMP
nsContentPolicy::ShouldProcess(PRInt32 contentType, nsIURI *contentLocation,
nsISupports *context, nsIDOMWindow *window,
PRBool *shouldProcess)
{
return CheckPolicy(POLICY_PROCESS, contentType, contentLocation, context,
window, shouldProcess);
}

View File

@@ -0,0 +1,45 @@
/* -*- Mode: C++; tab-width: 8; 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 code.
*
* The Initial Developer of the Original Code is Zero-Knowledge Systems,
* Inc. Portions created by Zero-Knowledge are Copyright (C) 2000
* Zero-Knowledge Systems, Inc. All Rights Reserved.
*
* Contributor(s):
*/
#include "nsIContentPolicy.h"
#include "nsISupportsArray.h"
#ifndef __nsContentPolicy_h__
#define __nsContentPolicy_h__
class nsContentPolicy : public nsIContentPolicy
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSICONTENTPOLICY
nsContentPolicy();
virtual ~nsContentPolicy();
private:
nsCOMPtr<nsISupportsArray> mPolicies;
NS_IMETHOD CheckPolicy(PRInt32 policyType, PRInt32 contentType,
nsIURI *aURI, nsISupports *context,
nsIDOMWindow *window, PRBool *shouldProceed);
};
nsresult
NS_NewContentPolicy(nsIContentPolicy **aResult);
#endif /* __nsContentPolicy_h__ */

View File

@@ -0,0 +1,813 @@
/* -*- 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, released
* March 31, 1998.
*
* 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):
* Johnny Stenback <jst@netscape.com>
* Christopher A. Aillon <christopher@aillon.com>
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
/* A namespace class for static layout utilities. */
#include "jsapi.h"
#include "nsCOMPtr.h"
#include "nsIServiceManager.h"
#include "nsIScriptGlobalObject.h"
#include "nsIScriptContext.h"
#include "nsIDOMScriptObjectFactory.h"
#include "nsDOMCID.h"
#include "nsContentUtils.h"
#include "nsIXPConnect.h"
#include "nsIContent.h"
#include "nsIDocument.h"
#include "nsINodeInfo.h"
#include "nsReadableUtils.h"
#include "nsIJSContextStack.h"
#include "nsIDocShell.h"
#include "nsIDocShellTreeItem.h"
static const char *sJSStackContractID = "@mozilla.org/js/xpc/ContextStack;1";
nsIDOMScriptObjectFactory *nsContentUtils::sDOMScriptObjectFactory = nsnull;
nsIXPConnect *nsContentUtils::sXPConnect = nsnull;
// static
nsresult
nsContentUtils::Init()
{
NS_ENSURE_TRUE(!sXPConnect, NS_ERROR_ALREADY_INITIALIZED);
nsresult rv = nsServiceManager::GetService(nsIXPConnect::GetCID(),
nsIXPConnect::GetIID(),
(nsISupports **)&sXPConnect);
NS_ENSURE_SUCCESS(rv, rv);
return rv;
}
// static
nsresult
nsContentUtils::GetStaticScriptGlobal(JSContext* aContext, JSObject* aObj,
nsIScriptGlobalObject** aNativeGlobal)
{
if (!sXPConnect) {
*aNativeGlobal = nsnull;
return NS_OK;
}
JSObject* parent;
JSObject* glob = aObj; // starting point for search
if (!glob)
return NS_ERROR_FAILURE;
while (nsnull != (parent = JS_GetParent(aContext, glob))) {
glob = parent;
}
nsCOMPtr<nsIXPConnectWrappedNative> wrapped_native;
nsresult rv =
sXPConnect->GetWrappedNativeOfJSObject(aContext, glob,
getter_AddRefs(wrapped_native));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsISupports> native;
rv = wrapped_native->GetNative(getter_AddRefs(native));
NS_ENSURE_SUCCESS(rv, rv);
return CallQueryInterface(native, aNativeGlobal);
}
//static
nsresult
nsContentUtils::GetStaticScriptContext(JSContext* aContext,
JSObject* aObj,
nsIScriptContext** aScriptContext)
{
nsCOMPtr<nsIScriptGlobalObject> nativeGlobal;
GetStaticScriptGlobal(aContext, aObj, getter_AddRefs(nativeGlobal));
if (!nativeGlobal)
return NS_ERROR_FAILURE;
nsIScriptContext* scriptContext = nsnull;
nativeGlobal->GetContext(&scriptContext);
*aScriptContext = scriptContext;
return scriptContext ? NS_OK : NS_ERROR_FAILURE;
}
//static
nsresult
nsContentUtils::GetDynamicScriptGlobal(JSContext* aContext,
nsIScriptGlobalObject** aNativeGlobal)
{
nsCOMPtr<nsIScriptContext> scriptCX;
GetDynamicScriptContext(aContext, getter_AddRefs(scriptCX));
if (!scriptCX) {
*aNativeGlobal = nsnull;
return NS_ERROR_FAILURE;
}
return scriptCX->GetGlobalObject(aNativeGlobal);
}
//static
nsresult
nsContentUtils::GetDynamicScriptContext(JSContext *aContext,
nsIScriptContext** aScriptContext)
{
*aScriptContext = nsnull;
// XXX We rely on the rule that if any JSContext in our JSRuntime has a
// private set then that private *must* be a pointer to an nsISupports.
nsISupports *supports = (nsIScriptContext*)JS_GetContextPrivate(aContext);
if (!supports) {
return NS_OK;
}
return CallQueryInterface(supports, aScriptContext);
}
template <class OutputIterator>
struct NormalizeNewlinesCharTraits {
public:
typedef typename OutputIterator::value_type value_type;
public:
NormalizeNewlinesCharTraits(OutputIterator& aIterator) : mIterator(aIterator) { }
void writechar(typename OutputIterator::value_type aChar) {
*mIterator++ = aChar;
}
private:
OutputIterator mIterator;
};
#ifdef HAVE_CPP_PARTIAL_SPECIALIZATION
template <class CharT>
struct NormalizeNewlinesCharTraits<CharT*> {
public:
typedef CharT value_type;
public:
NormalizeNewlinesCharTraits(CharT* aCharPtr) : mCharPtr(aCharPtr) { }
void writechar(CharT aChar) {
*mCharPtr++ = aChar;
}
private:
CharT* mCharPtr;
};
#else
NS_SPECIALIZE_TEMPLATE
struct NormalizeNewlinesCharTraits<char*> {
public:
typedef char value_type;
public:
NormalizeNewlinesCharTraits(char* aCharPtr) : mCharPtr(aCharPtr) { }
void writechar(char aChar) {
*mCharPtr++ = aChar;
}
private:
char* mCharPtr;
};
NS_SPECIALIZE_TEMPLATE
struct NormalizeNewlinesCharTraits<PRUnichar*> {
public:
typedef PRUnichar value_type;
public:
NormalizeNewlinesCharTraits(PRUnichar* aCharPtr) : mCharPtr(aCharPtr) { }
void writechar(PRUnichar aChar) {
*mCharPtr++ = aChar;
}
private:
PRUnichar* mCharPtr;
};
#endif
template <class OutputIterator>
class CopyNormalizeNewlines
{
public:
typedef typename OutputIterator::value_type value_type;
public:
CopyNormalizeNewlines(OutputIterator* aDestination,PRBool aLastCharCR=PR_FALSE) :
mLastCharCR(aLastCharCR),
mDestination(aDestination),
mWritten(0)
{ }
PRUint32 GetCharsWritten() {
return mWritten;
}
PRBool IsLastCharCR() {
return mLastCharCR;
}
PRUint32 write(const typename OutputIterator::value_type* aSource, PRUint32 aSourceLength) {
const typename OutputIterator::value_type* done_writing = aSource + aSourceLength;
// If the last source buffer ended with a CR...
if (mLastCharCR) {
// ..and if the next one is a LF, then skip it since
// we've already written out a newline
if (aSourceLength && (*aSource == value_type('\n'))) {
++aSource;
}
mLastCharCR = PR_FALSE;
}
PRUint32 num_written = 0;
while ( aSource < done_writing ) {
if (*aSource == value_type('\r')) {
mDestination->writechar('\n');
++aSource;
// If we've reached the end of the buffer, record
// that we wrote out a CR
if (aSource == done_writing) {
mLastCharCR = PR_TRUE;
}
// If the next character is a LF, skip it
else if (*aSource == value_type('\n')) {
++aSource;
}
}
else {
mDestination->writechar(*aSource++);
}
++num_written;
}
mWritten += num_written;
return aSourceLength;
}
private:
PRBool mLastCharCR;
OutputIterator* mDestination;
PRUint32 mWritten;
};
// static
PRUint32
nsContentUtils::CopyNewlineNormalizedUnicodeTo(const nsAString& aSource,
PRUint32 aSrcOffset,
PRUnichar* aDest,
PRUint32 aLength,
PRBool& aLastCharCR)
{
typedef NormalizeNewlinesCharTraits<PRUnichar*> sink_traits;
sink_traits dest_traits(aDest);
CopyNormalizeNewlines<sink_traits> normalizer(&dest_traits,aLastCharCR);
nsReadingIterator<PRUnichar> fromBegin, fromEnd;
copy_string(aSource.BeginReading(fromBegin).advance( PRInt32(aSrcOffset) ),
aSource.BeginReading(fromEnd).advance( PRInt32(aSrcOffset+aLength) ),
normalizer);
aLastCharCR = normalizer.IsLastCharCR();
return normalizer.GetCharsWritten();
}
// static
PRUint32
nsContentUtils::CopyNewlineNormalizedUnicodeTo(nsReadingIterator<PRUnichar>& aSrcStart, const nsReadingIterator<PRUnichar>& aSrcEnd, nsAString& aDest)
{
typedef nsWritingIterator<PRUnichar> WritingIterator;
typedef NormalizeNewlinesCharTraits<WritingIterator> sink_traits;
WritingIterator iter;
aDest.BeginWriting(iter);
sink_traits dest_traits(iter);
CopyNormalizeNewlines<sink_traits> normalizer(&dest_traits);
copy_string(aSrcStart, aSrcEnd, normalizer);
return normalizer.GetCharsWritten();
}
// static
void
nsContentUtils::Shutdown()
{
NS_IF_RELEASE(sDOMScriptObjectFactory);
NS_IF_RELEASE(sXPConnect);
}
// static
nsISupports *
nsContentUtils::GetClassInfoInstance(nsDOMClassInfoID aID)
{
if (!sDOMScriptObjectFactory) {
static NS_DEFINE_CID(kDOMScriptObjectFactoryCID,
NS_DOM_SCRIPT_OBJECT_FACTORY_CID);
nsServiceManager::GetService(kDOMScriptObjectFactoryCID,
NS_GET_IID(nsIDOMScriptObjectFactory),
(nsISupports **)&sDOMScriptObjectFactory);
if (!sDOMScriptObjectFactory) {
return nsnull;
}
}
return sDOMScriptObjectFactory->GetClassInfoInstance(aID);
}
// static
nsresult
nsContentUtils::doReparentContentWrapper(nsIContent *aChild,
nsIDocument *aNewDocument,
nsIDocument *aOldDocument,
JSContext *cx,
JSObject *parent_obj)
{
nsCOMPtr<nsIXPConnectJSObjectHolder> old_wrapper;
nsresult rv;
rv = sXPConnect->ReparentWrappedNativeIfFound(cx, ::JS_GetGlobalObject(cx),
parent_obj, aChild,
getter_AddRefs(old_wrapper));
NS_ENSURE_SUCCESS(rv, rv);
if (!old_wrapper) {
// If aChild isn't wrapped none of it's children are wrapped so
// there's no need to walk into aChild's children.
return NS_OK;
}
if (aOldDocument) {
nsCOMPtr<nsISupports> old_ref;
aOldDocument->RemoveReference(aChild, getter_AddRefs(old_ref));
if (old_ref) {
// Transfer the reference from aOldDocument to aNewDocument
aNewDocument->AddReference(aChild, old_ref);
}
}
JSObject *old;
rv = old_wrapper->GetJSObject(&old);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIContent> child;
PRInt32 count = 0, i;
aChild->ChildCount(count);
for (i = 0; i < count; i++) {
aChild->ChildAt(i, *getter_AddRefs(child));
NS_ENSURE_TRUE(child, NS_ERROR_UNEXPECTED);
rv = doReparentContentWrapper(child, aNewDocument, aOldDocument, cx, old);
NS_ENSURE_SUCCESS(rv, rv);
}
return rv;
}
static
nsresult GetContextFromDocument(nsIDocument *aDocument, JSContext **cx)
{
*cx = nsnull;
nsCOMPtr<nsIScriptGlobalObject> sgo;
aDocument->GetScriptGlobalObject(getter_AddRefs(sgo));
if (!sgo) {
// No script global, no context.
return NS_OK;
}
nsCOMPtr<nsIScriptContext> scx;
sgo->GetContext(getter_AddRefs(scx));
if (!scx) {
// No context left in the old scope...
return NS_OK;
}
*cx = (JSContext *)scx->GetNativeContext();
return NS_OK;
}
// static
nsresult
nsContentUtils::ReparentContentWrapper(nsIContent *aContent,
nsIContent *aNewParent,
nsIDocument *aNewDocument,
nsIDocument *aOldDocument)
{
if (!aNewDocument || aNewDocument == aOldDocument) {
return NS_OK;
}
nsCOMPtr<nsIDocument> old_doc(aOldDocument);
if (!old_doc) {
nsCOMPtr<nsINodeInfo> ni;
aContent->GetNodeInfo(*getter_AddRefs(ni));
if (ni) {
ni->GetDocument(*getter_AddRefs(old_doc));
}
if (!aOldDocument) {
// If we can't find our old document we don't know what our old
// scope was so there's no way to find the old wrapper
return NS_OK;
}
}
NS_ENSURE_TRUE(sXPConnect, NS_ERROR_NOT_INITIALIZED);
nsCOMPtr<nsISupports> new_parent;
if (!aNewParent) {
nsCOMPtr<nsIContent> root;
old_doc->GetRootContent(getter_AddRefs(root));
if (root.get() == aContent) {
new_parent = old_doc;
}
} else {
new_parent = aNewParent;
}
JSContext *cx = nsnull;
GetContextFromDocument(old_doc, &cx);
if (!cx) {
// No JSContext left in the old scope, can't find the old wrapper
// w/o the old context.
return NS_OK;
}
nsCOMPtr<nsIXPConnectWrappedNative> wrapper;
nsresult rv;
rv = sXPConnect->GetWrappedNativeOfNativeObject(cx, ::JS_GetGlobalObject(cx),
aContent,
NS_GET_IID(nsISupports),
getter_AddRefs(wrapper));
NS_ENSURE_SUCCESS(rv, rv);
if (!wrapper) {
// aContent is not wrapped (and thus none of it's children are
// wrapped) so there's no need to reparent anything.
return NS_OK;
}
// Wrap the new parent and reparent aContent
nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
rv = sXPConnect->WrapNative(cx, ::JS_GetGlobalObject(cx), new_parent,
NS_GET_IID(nsISupports),
getter_AddRefs(holder));
NS_ENSURE_SUCCESS(rv, rv);
JSObject *obj;
rv = holder->GetJSObject(&obj);
NS_ENSURE_SUCCESS(rv, rv);
return doReparentContentWrapper(aContent, aNewDocument, aOldDocument, cx,
obj);
}
PRBool
nsContentUtils::IsCallerChrome()
{
nsCOMPtr<nsIDocShell> docShell;
nsCOMPtr<nsIThreadJSContextStack> stack(do_GetService(sJSStackContractID));
if (stack) {
JSContext *cx = nsnull;
stack->Peek(&cx);
if (cx) {
nsCOMPtr<nsIScriptGlobalObject> sgo;
nsContentUtils::GetDynamicScriptGlobal(cx, getter_AddRefs(sgo));
if (sgo) {
sgo->GetDocShell(getter_AddRefs(docShell));
}
}
}
nsCOMPtr<nsIDocShellTreeItem> item(do_QueryInterface(docShell));
if (item) {
PRInt32 callerType = nsIDocShellTreeItem::typeChrome;
item->GetItemType(&callerType);
if (callerType != nsIDocShellTreeItem::typeChrome) {
return PR_FALSE;
}
}
return PR_TRUE;
}
// static
PRBool
nsContentUtils::InSameDoc(nsIDOMNode* aNode, nsIDOMNode* aOther)
{
if (!aNode || !aOther) {
return PR_FALSE;
}
nsCOMPtr<nsIContent> content(do_QueryInterface(aNode));
nsCOMPtr<nsIContent> other(do_QueryInterface(aOther));
if (content && other) {
nsCOMPtr<nsIDocument> contentDoc;
nsCOMPtr<nsIDocument> otherDoc;
content->GetDocument(*getter_AddRefs(contentDoc));
other->GetDocument(*getter_AddRefs(otherDoc));
// XXXcaa Don't bother to check that either node is in a
// document. Editor relies on us returning true if neither
// node is in a document. See bug 154401.
if (contentDoc == otherDoc) {
return PR_TRUE;
}
}
return PR_FALSE;
}
// static
PRBool
nsContentUtils::ContentIsDescendantOf(nsIContent* aPossibleDescendant,
nsIContent* aPossibleAncestor)
{
NS_PRECONDITION(aPossibleDescendant, "The possible descendant is null!");
NS_PRECONDITION(aPossibleAncestor, "The possible ancestor is null!");
nsCOMPtr<nsIContent> parent;
do {
if (aPossibleDescendant == aPossibleAncestor)
return PR_TRUE;
aPossibleDescendant->GetParent(*getter_AddRefs(parent));
aPossibleDescendant = parent;
} while (aPossibleDescendant);
return PR_FALSE;
}
// static
nsresult
nsContentUtils::GetAncestors(nsIDOMNode* aNode,
nsVoidArray* aArray)
{
NS_ENSURE_ARG_POINTER(aNode);
nsCOMPtr<nsIDOMNode> node(aNode);
nsCOMPtr<nsIDOMNode> ancestor;
do {
aArray->AppendElement(node.get());
node->GetParentNode(getter_AddRefs(ancestor));
node = ancestor;
} while (node);
return NS_OK;
}
// static
nsresult
nsContentUtils::GetAncestorsAndOffsets(nsIDOMNode* aNode,
PRInt32 aOffset,
nsVoidArray* aAncestorNodes,
nsVoidArray* aAncestorOffsets)
{
NS_ENSURE_ARG_POINTER(aNode);
PRInt32 offset = 0;
nsCOMPtr<nsIContent> ancestor;
nsCOMPtr<nsIContent> content(do_QueryInterface(aNode));
if (!content) {
return NS_ERROR_FAILURE;
}
if (aAncestorNodes->Count() != 0) {
NS_WARNING("aAncestorNodes is not empty");
aAncestorNodes->Clear();
}
if (aAncestorOffsets->Count() != 0) {
NS_WARNING("aAncestorOffsets is not empty");
aAncestorOffsets->Clear();
}
// insert the node itself
aAncestorNodes->AppendElement(content.get());
aAncestorOffsets->AppendElement(NS_INT32_TO_PTR(aOffset));
// insert all the ancestors
content->GetParent(*getter_AddRefs(ancestor));
while (ancestor) {
ancestor->IndexOf(content, offset);
aAncestorNodes->AppendElement(ancestor.get());
aAncestorOffsets->AppendElement(NS_INT32_TO_PTR(offset));
content = ancestor;
content->GetParent(*getter_AddRefs(ancestor));
}
return NS_OK;
}
// static
nsresult
nsContentUtils::GetCommonAncestor(nsIDOMNode *aNode,
nsIDOMNode *aOther,
nsIDOMNode** aCommonAncestor)
{
*aCommonAncestor = nsnull;
nsAutoVoidArray nodeArray;
nsresult rv = GetFirstDifferentAncestors(aNode, aOther, &nodeArray);
NS_ENSURE_SUCCESS(rv, rv);
nsIDOMNode *common =
NS_STATIC_CAST(nsIDOMNode*, nodeArray.ElementAt(0));
NS_ASSERTION(common, "The common ancestor is null! Very bad!");
*aCommonAncestor = common;
NS_IF_ADDREF(*aCommonAncestor);
return NS_OK;
}
// static
nsresult
nsContentUtils::GetFirstDifferentAncestors(nsIDOMNode *aNode,
nsIDOMNode *aOther,
nsVoidArray* aDifferentNodes)
{
NS_ENSURE_ARG_POINTER(aNode);
NS_ENSURE_ARG_POINTER(aOther);
if (aDifferentNodes->Count() != 0) {
NS_WARNING("The aDifferentNodes array passed in is not empty!");
aDifferentNodes->Clear();
}
// Test if both are the same node.
if (aNode == aOther) {
aDifferentNodes->AppendElement(NS_STATIC_CAST(void*, aNode));
return NS_OK;
}
nsAutoVoidArray nodeAncestors;
nsAutoVoidArray otherAncestors;
// Insert all the ancestors of |aNode|
nsCOMPtr<nsIDOMNode> node(aNode);
nsCOMPtr<nsIDOMNode> ancestor(node);
do {
nodeAncestors.AppendElement(node.get());
node->GetParentNode(getter_AddRefs(ancestor));
if (ancestor == aOther) {
aDifferentNodes->AppendElement(NS_STATIC_CAST(void*, aOther));
return NS_OK;
}
node = ancestor;
} while (ancestor);
// Insert all the ancestors of |aOther|
nsCOMPtr<nsIDOMNode> other(aOther);
ancestor = other;
do {
otherAncestors.AppendElement(other.get());
other->GetParentNode(getter_AddRefs(ancestor));
if (ancestor == aNode) {
aDifferentNodes->AppendElement(NS_STATIC_CAST(void*, aNode));
return NS_OK;
}
other = ancestor;
} while (ancestor);
PRInt32 nodeIdx = nodeAncestors.Count() - 1;
PRInt32 otherIdx = otherAncestors.Count() - 1;
if (nodeAncestors.ElementAt(nodeIdx) != otherAncestors.ElementAt(otherIdx)) {
NS_ERROR("This function was called on two disconnected nodes!");
return NS_ERROR_FAILURE;
}
// Go back through the ancestors, starting from the root,
// until the first different ancestor found.
do {
--nodeIdx;
--otherIdx;
} while (nodeAncestors.ElementAt(nodeIdx) == otherAncestors.ElementAt(otherIdx));
NS_ASSERTION(nodeIdx >= 0 && otherIdx >= 0,
"Something's wrong: our indices should not be negative here!");
aDifferentNodes->AppendElement(nodeAncestors.ElementAt(nodeIdx + 1));
aDifferentNodes->AppendElement(nodeAncestors.ElementAt(nodeIdx));
aDifferentNodes->AppendElement(otherAncestors.ElementAt(otherIdx));
return NS_OK;
}
inline PRBool
IsCharInSet(const char* aSet,
const PRUnichar aChar)
{
PRUnichar ch;
while ((ch = *aSet)) {
if (aChar == PRUnichar(ch)) {
return PR_TRUE;
}
++aSet;
}
return PR_FALSE;
}
/**
* This method strips leading/trailing chars, in given set, from string.
*/
const nsDependentSubstring
nsContentUtils::TrimCharsInSet(const char* aSet,
const nsAString& aValue)
{
nsAString::const_iterator valueCurrent, valueEnd;
aValue.BeginReading(valueCurrent);
aValue.EndReading(valueEnd);
// Skip charaters in the beginning
while (valueCurrent != valueEnd) {
if (!IsCharInSet(aSet, *valueCurrent)) {
break;
}
++valueCurrent;
}
if (valueCurrent != valueEnd) {
for (;;) {
--valueEnd;
if (!IsCharInSet(aSet, *valueEnd)) {
break;
}
}
++valueEnd; // Step beyond the last character we want in the value.
}
// valueEnd should point to the char after the last to copy
return Substring(valueCurrent, valueEnd);
}

View File

@@ -0,0 +1,663 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsDOMAttribute.h"
#include "nsGenericElement.h"
#include "nsIContent.h"
#include "nsITextContent.h"
#include "nsINameSpaceManager.h"
#include "nsDOMError.h"
#include "nsContentUtils.h"
#include "nsUnicharUtils.h"
//----------------------------------------------------------------------
nsDOMAttribute::nsDOMAttribute(nsIContent* aContent, nsINodeInfo *aNodeInfo,
const nsAString& aValue)
: mContent(aContent), mNodeInfo(aNodeInfo), mValue(aValue), mChild(nsnull),
mChildList(nsnull)
{
NS_ABORT_IF_FALSE(mNodeInfo, "We must get a nodeinfo here!");
NS_INIT_REFCNT();
// We don't add a reference to our content. It will tell us
// to drop our reference when it goes away.
}
nsDOMAttribute::~nsDOMAttribute()
{
NS_IF_RELEASE(mChild);
NS_IF_RELEASE(mChildList);
}
// QueryInterface implementation for nsDOMAttribute
NS_INTERFACE_MAP_BEGIN(nsDOMAttribute)
NS_INTERFACE_MAP_ENTRY(nsIDOMAttr)
NS_INTERFACE_MAP_ENTRY(nsIDOMAttributePrivate)
NS_INTERFACE_MAP_ENTRY(nsIDOMNode)
NS_INTERFACE_MAP_ENTRY(nsIDOM3Node)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMAttr)
NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(Attr)
NS_INTERFACE_MAP_END
NS_IMPL_ADDREF(nsDOMAttribute)
NS_IMPL_RELEASE(nsDOMAttribute)
NS_IMETHODIMP
nsDOMAttribute::DropReference()
{
mContent = nsnull;
return NS_OK;
}
NS_IMETHODIMP
nsDOMAttribute::SetContent(nsIContent* aContent)
{
mContent = aContent;
return NS_OK;
}
NS_IMETHODIMP
nsDOMAttribute::GetContent(nsIContent** aContent)
{
*aContent = mContent;
NS_IF_ADDREF(*aContent);
return NS_OK;
}
nsresult
nsDOMAttribute::GetName(nsAString& aName)
{
NS_ENSURE_TRUE(mNodeInfo, NS_ERROR_FAILURE);
return mNodeInfo->GetQualifiedName(aName);
}
nsresult
nsDOMAttribute::GetValue(nsAString& aValue)
{
NS_ENSURE_TRUE(mNodeInfo, NS_ERROR_FAILURE);
nsresult result = NS_OK;
if (mContent) {
nsresult attrResult;
PRInt32 nameSpaceID;
nsCOMPtr<nsIAtom> name;
mNodeInfo->GetNameAtom(*getter_AddRefs(name));
mNodeInfo->GetNamespaceID(nameSpaceID);
nsAutoString tmpValue;
attrResult = mContent->GetAttr(nameSpaceID, name, tmpValue);
if (NS_CONTENT_ATTR_NOT_THERE != attrResult) {
mValue = tmpValue;
}
}
aValue=mValue;
return result;
}
nsresult
nsDOMAttribute::SetValue(const nsAString& aValue)
{
NS_ENSURE_TRUE(mNodeInfo, NS_ERROR_FAILURE);
nsresult result = NS_OK;
if (mContent) {
result = mContent->SetAttr(mNodeInfo, aValue, PR_TRUE);
}
mValue=aValue;
return result;
}
nsresult
nsDOMAttribute::GetSpecified(PRBool* aSpecified)
{
NS_ENSURE_TRUE(mNodeInfo, NS_ERROR_FAILURE);
NS_ENSURE_ARG_POINTER(aSpecified);
nsresult result = NS_OK;
if (nsnull == mContent) {
*aSpecified = PR_FALSE;
} else {
nsAutoString value;
nsresult attrResult;
PRInt32 nameSpaceID;
nsCOMPtr<nsIAtom> name;
mNodeInfo->GetNameAtom(*getter_AddRefs(name));
mNodeInfo->GetNamespaceID(nameSpaceID);
attrResult = mContent->GetAttr(nameSpaceID, name, value);
if (NS_CONTENT_ATTR_HAS_VALUE == attrResult) {
*aSpecified = PR_TRUE;
}
else {
*aSpecified = PR_FALSE;
}
}
return result;
}
NS_IMETHODIMP
nsDOMAttribute::GetOwnerElement(nsIDOMElement** aOwnerElement)
{
NS_ENSURE_ARG_POINTER(aOwnerElement);
if (mContent) {
return mContent->QueryInterface(NS_GET_IID(nsIDOMElement),
(void **)aOwnerElement);
}
*aOwnerElement = nsnull;
return NS_OK;
}
NS_IMETHODIMP
nsDOMAttribute::GetNodeName(nsAString& aNodeName)
{
return GetName(aNodeName);
}
NS_IMETHODIMP
nsDOMAttribute::GetNodeValue(nsAString& aNodeValue)
{
return GetValue(aNodeValue);
}
NS_IMETHODIMP
nsDOMAttribute::SetNodeValue(const nsAString& aNodeValue)
{
return SetValue(aNodeValue);
}
NS_IMETHODIMP
nsDOMAttribute::GetNodeType(PRUint16* aNodeType)
{
NS_ENSURE_ARG_POINTER(aNodeType);
*aNodeType = (PRUint16)nsIDOMNode::ATTRIBUTE_NODE;
return NS_OK;
}
NS_IMETHODIMP
nsDOMAttribute::GetParentNode(nsIDOMNode** aParentNode)
{
NS_ENSURE_ARG_POINTER(aParentNode);
*aParentNode = nsnull;
return NS_OK;
}
NS_IMETHODIMP
nsDOMAttribute::GetChildNodes(nsIDOMNodeList** aChildNodes)
{
if (!mChildList) {
mChildList = new nsAttributeChildList(this);
NS_ENSURE_TRUE(mChildList, NS_ERROR_OUT_OF_MEMORY);
NS_ADDREF(mChildList);
}
return CallQueryInterface(mChildList, aChildNodes);
}
NS_IMETHODIMP
nsDOMAttribute::HasChildNodes(PRBool* aHasChildNodes)
{
*aHasChildNodes = PR_FALSE;
if (mChild) {
*aHasChildNodes = PR_TRUE;
}
else if (mContent) {
nsAutoString value;
GetValue(value);
if (!value.IsEmpty()) {
*aHasChildNodes = PR_TRUE;
}
}
return NS_OK;
}
NS_IMETHODIMP
nsDOMAttribute::HasAttributes(PRBool* aHasAttributes)
{
NS_ENSURE_ARG_POINTER(aHasAttributes);
*aHasAttributes = PR_FALSE;
return NS_OK;
}
NS_IMETHODIMP
nsDOMAttribute::GetFirstChild(nsIDOMNode** aFirstChild)
{
nsAutoString value;
nsresult result;
result = GetValue(value);
if (NS_OK != result) {
return result;
}
if (!value.IsEmpty()) {
if (!mChild) {
nsIContent* content;
result = NS_NewTextNode(&content);
if (NS_OK != result) {
return result;
}
result = content->QueryInterface(NS_GET_IID(nsIDOMText), (void**)&mChild);
NS_RELEASE(content);
}
mChild->SetData(value);
result = mChild->QueryInterface(NS_GET_IID(nsIDOMNode), (void**)aFirstChild);
}
else {
*aFirstChild = nsnull;
}
return result;
}
NS_IMETHODIMP
nsDOMAttribute::GetLastChild(nsIDOMNode** aLastChild)
{
return GetFirstChild(aLastChild);
}
NS_IMETHODIMP
nsDOMAttribute::GetPreviousSibling(nsIDOMNode** aPreviousSibling)
{
NS_ENSURE_ARG_POINTER(aPreviousSibling);
*aPreviousSibling = nsnull;
return NS_OK;
}
NS_IMETHODIMP
nsDOMAttribute::GetNextSibling(nsIDOMNode** aNextSibling)
{
NS_ENSURE_ARG_POINTER(aNextSibling);
*aNextSibling = nsnull;
return NS_OK;
}
NS_IMETHODIMP
nsDOMAttribute::GetAttributes(nsIDOMNamedNodeMap** aAttributes)
{
NS_ENSURE_ARG_POINTER(aAttributes);
*aAttributes = nsnull;
return NS_OK;
}
NS_IMETHODIMP
nsDOMAttribute::InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, nsIDOMNode** aReturn)
{
return NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR;
}
NS_IMETHODIMP
nsDOMAttribute::ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild, nsIDOMNode** aReturn)
{
return NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR;
}
NS_IMETHODIMP
nsDOMAttribute::RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn)
{
return NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR;
}
NS_IMETHODIMP
nsDOMAttribute::AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn)
{
return NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR;
}
NS_IMETHODIMP
nsDOMAttribute::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
{
nsDOMAttribute* newAttr;
if (mContent) {
nsAutoString value;
PRInt32 nameSpaceID;
nsCOMPtr<nsIAtom> name;
mNodeInfo->GetNameAtom(*getter_AddRefs(name));
mNodeInfo->GetNamespaceID(nameSpaceID);
mContent->GetAttr(nameSpaceID, name, value);
newAttr = new nsDOMAttribute(nsnull, mNodeInfo, value);
}
else {
newAttr = new nsDOMAttribute(nsnull, mNodeInfo, mValue);
}
if (!newAttr) {
return NS_ERROR_OUT_OF_MEMORY;
}
return newAttr->QueryInterface(NS_GET_IID(nsIDOMNode), (void**)aReturn);
}
NS_IMETHODIMP
nsDOMAttribute::GetOwnerDocument(nsIDOMDocument** aOwnerDocument)
{
nsresult result = NS_OK;
if (mContent) {
nsIDOMNode* node;
result = mContent->QueryInterface(NS_GET_IID(nsIDOMNode), (void**)&node);
if (NS_SUCCEEDED(result)) {
result = node->GetOwnerDocument(aOwnerDocument);
NS_RELEASE(node);
}
}
else {
*aOwnerDocument = nsnull;
}
return result;
}
NS_IMETHODIMP
nsDOMAttribute::GetNamespaceURI(nsAString& aNamespaceURI)
{
NS_ENSURE_TRUE(mNodeInfo, NS_ERROR_FAILURE);
return mNodeInfo->GetNamespaceURI(aNamespaceURI);
}
NS_IMETHODIMP
nsDOMAttribute::GetPrefix(nsAString& aPrefix)
{
NS_ENSURE_TRUE(mNodeInfo, NS_ERROR_FAILURE);
return mNodeInfo->GetPrefix(aPrefix);
}
NS_IMETHODIMP
nsDOMAttribute::SetPrefix(const nsAString& aPrefix)
{
NS_ENSURE_TRUE(mNodeInfo, NS_ERROR_FAILURE);
nsCOMPtr<nsINodeInfo> newNodeInfo;
nsCOMPtr<nsIAtom> prefix;
nsresult rv = NS_OK;
if (!aPrefix.IsEmpty() && !DOMStringIsNull(aPrefix))
prefix = dont_AddRef(NS_NewAtom(aPrefix));
rv = mNodeInfo->PrefixChanged(prefix, *getter_AddRefs(newNodeInfo));
NS_ENSURE_SUCCESS(rv, rv);
if (mContent) {
nsCOMPtr<nsIAtom> name;
PRInt32 nameSpaceID;
nsAutoString tmpValue;
mNodeInfo->GetNameAtom(*getter_AddRefs(name));
mNodeInfo->GetNamespaceID(nameSpaceID);
rv = mContent->GetAttr(nameSpaceID, name, tmpValue);
if (rv == NS_CONTENT_ATTR_HAS_VALUE) {
mContent->UnsetAttr(nameSpaceID, name, PR_TRUE);
mContent->SetAttr(newNodeInfo, tmpValue, PR_TRUE);
}
}
mNodeInfo = newNodeInfo;
return NS_OK;
}
NS_IMETHODIMP
nsDOMAttribute::GetLocalName(nsAString& aLocalName)
{
NS_ENSURE_TRUE(mNodeInfo, NS_ERROR_FAILURE);
return mNodeInfo->GetLocalName(aLocalName);
}
NS_IMETHODIMP
nsDOMAttribute::Normalize()
{
// Nothing to do here
return NS_OK;
}
NS_IMETHODIMP
nsDOMAttribute::IsSupported(const nsAString& aFeature,
const nsAString& aVersion,
PRBool* aReturn)
{
return nsGenericElement::InternalIsSupported(aFeature, aVersion, aReturn);
}
NS_IMETHODIMP
nsDOMAttribute::GetBaseURI(nsAString &aURI)
{
aURI.Truncate();
nsresult rv = NS_OK;
nsCOMPtr<nsIDOM3Node> node(do_QueryInterface(mContent));
if (node)
rv = node->GetBaseURI(aURI);
return rv;
}
NS_IMETHODIMP
nsDOMAttribute::CompareTreePosition(nsIDOMNode* aOther,
PRUint16* aReturn)
{
NS_ENSURE_ARG_POINTER(aOther);
PRUint16 mask = nsIDOMNode::TREE_POSITION_DISCONNECTED;
nsCOMPtr<nsIDOMElement> el;
GetOwnerElement(getter_AddRefs(el));
if (el) {
// Check to see if the other node is also an attribute
PRUint16 nodeType = 0;
aOther->GetNodeType(&nodeType);
if (nodeType == nsIDOMNode::ATTRIBUTE_NODE) {
nsCOMPtr<nsIDOMAttr> otherAttr(do_QueryInterface(aOther));
nsCOMPtr<nsIDOMElement> otherEl;
otherAttr->GetOwnerElement(getter_AddRefs(otherEl));
if (el == otherEl) {
// same parent node, the two attributes have equivalent position
mask |= nsIDOMNode::TREE_POSITION_EQUIVALENT;
PRBool sameNode = PR_FALSE;
IsSameNode(aOther, &sameNode);
if (sameNode) {
mask |= nsIDOMNode::TREE_POSITION_SAME_NODE;
}
}
}
else {
// The other node isn't an attribute.
// Compare position relative to this attribute's owner element.
nsCOMPtr<nsIDOM3Node> parent(do_QueryInterface(el));
PRUint16 parentMask;
parent->CompareTreePosition(aOther, &parentMask);
if (parentMask & nsIDOMNode::TREE_POSITION_SAME_NODE) {
mask |= nsIDOMNode::TREE_POSITION_PRECEDING;
}
else {
mask |= parentMask & (nsIDOMNode::TREE_POSITION_FOLLOWING |
nsIDOMNode::TREE_POSITION_PRECEDING);
}
}
}
*aReturn = mask;
return NS_OK;
}
NS_IMETHODIMP
nsDOMAttribute::IsSameNode(nsIDOMNode* aOther,
PRBool* aReturn)
{
PRBool sameNode = PR_FALSE;
// XXXcaa Comparing pointers on two attributes is not yet reliable.
// When bug 93614 is fixed, this should be changed to simple pointer
// comparisons. But for now, check owner elements and node names.
PRUint16 otherType = 0;
aOther->GetNodeType(&otherType);
if (nsIDOMNode::ATTRIBUTE_NODE == otherType) {
nsCOMPtr<nsIDOMElement> nodeOwner;
GetOwnerElement(getter_AddRefs(nodeOwner));
nsCOMPtr<nsIDOMAttr> other(do_QueryInterface(aOther));
nsCOMPtr<nsIDOMElement> otherOwner;
other->GetOwnerElement(getter_AddRefs(otherOwner));
nsCOMPtr<nsIDOM3Node> owner(do_QueryInterface(nodeOwner));
PRBool sameOwners = PR_FALSE;
owner->IsSameNode(otherOwner, &sameOwners);
// Do these attributes belong to the same element?
if (sameOwners) {
PRBool ci = PR_FALSE;
nsCOMPtr<nsIContent> content(do_QueryInterface(nodeOwner));
// Check to see if we're in HTML.
if (content->IsContentOfType(nsIContent::eHTML)) {
nsCOMPtr<nsINodeInfo> ni;
content->GetNodeInfo(*getter_AddRefs(ni));
if (ni) {
// If there is no namespace, we're in HTML (as opposed to XHTML)
// and we'll need to compare node names case insensitively.
ci = ni->NamespaceEquals(kNameSpaceID_None);
}
}
nsAutoString nodeName;
nsAutoString otherName;
GetNodeName(nodeName);
aOther->GetNodeName(otherName);
// Compare node names
sameNode = ci ? nodeName.Equals(otherName,
nsCaseInsensitiveStringComparator())
: nodeName.Equals(otherName);
}
}
*aReturn = sameNode;
return NS_OK;
}
NS_IMETHODIMP
nsDOMAttribute::LookupNamespacePrefix(const nsAString& aNamespaceURI,
nsAString& aPrefix)
{
aPrefix.Truncate();
nsresult rv = NS_OK;
nsCOMPtr<nsIDOM3Node> node(do_QueryInterface(mContent));
if (node)
rv = node->LookupNamespacePrefix(aNamespaceURI, aPrefix);
return rv;
}
NS_IMETHODIMP
nsDOMAttribute::LookupNamespaceURI(const nsAString& aNamespacePrefix,
nsAString& aNamespaceURI)
{
aNamespaceURI.Truncate();
nsresult rv = NS_OK;
nsCOMPtr<nsIDOM3Node> node(do_QueryInterface(mContent));
if (node)
rv = node->LookupNamespaceURI(aNamespacePrefix, aNamespaceURI);
return rv;
}
//----------------------------------------------------------------------
nsAttributeChildList::nsAttributeChildList(nsDOMAttribute* aAttribute)
{
// Don't increment the reference count. The attribute will tell
// us when it's going away
mAttribute = aAttribute;
}
nsAttributeChildList::~nsAttributeChildList()
{
}
NS_IMETHODIMP
nsAttributeChildList::GetLength(PRUint32* aLength)
{
*aLength = 0;
if (mAttribute) {
nsAutoString value;
mAttribute->GetValue(value);
if (!value.IsEmpty()) {
*aLength = 1;
}
}
return NS_OK;
}
NS_IMETHODIMP
nsAttributeChildList::Item(PRUint32 aIndex, nsIDOMNode** aReturn)
{
*aReturn = nsnull;
if (mAttribute && 0 == aIndex) {
mAttribute->GetFirstChild(aReturn);
}
return NS_OK;
}
void
nsAttributeChildList::DropReference()
{
mAttribute = nsnull;
}

View File

@@ -0,0 +1,120 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsDOMAttribute_h___
#define nsDOMAttribute_h___
#include "nsIDOMAttr.h"
#include "nsIDOMText.h"
#include "nsIDOMNodeList.h"
#include "nsGenericDOMNodeList.h"
#include "nsString.h"
#include "nsCOMPtr.h"
#include "nsINodeInfo.h"
class nsIContent;
class nsDOMAttribute;
#define NS_IDOMATTRIBUTEPRIVATE_IID \
{0xa6cf90dd, 0x15b3, 0x11d2, \
{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
class nsIDOMAttributePrivate : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMATTRIBUTEPRIVATE_IID)
NS_IMETHOD DropReference() = 0;
NS_IMETHOD SetContent(nsIContent* aContent) = 0;
NS_IMETHOD GetContent(nsIContent** aContent) = 0;
};
// bogus child list for an attribute
class nsAttributeChildList : public nsGenericDOMNodeList
{
public:
nsAttributeChildList(nsDOMAttribute* aAttribute);
virtual ~nsAttributeChildList();
// interface nsIDOMNodeList
NS_IMETHOD GetLength(PRUint32* aLength);
NS_IMETHOD Item(PRUint32 aIndex, nsIDOMNode** aReturn);
void DropReference();
protected:
nsDOMAttribute* mAttribute;
};
// Attribute helper class used to wrap up an attribute with a dom
// object that implements nsIDOMAttr and nsIDOMNode
class nsDOMAttribute : public nsIDOMAttr,
public nsIDOM3Node,
public nsIDOMAttributePrivate
{
public:
nsDOMAttribute(nsIContent* aContent, nsINodeInfo *aNodeInfo,
const nsAString& aValue);
virtual ~nsDOMAttribute();
NS_DECL_ISUPPORTS
// nsIDOMNode interface
NS_DECL_NSIDOMNODE
// nsIDOM3Node interface
NS_DECL_NSIDOM3NODE
// nsIDOMAttr interface
NS_DECL_NSIDOMATTR
// nsIDOMAttributePrivate interface
NS_IMETHOD DropReference();
NS_IMETHOD SetContent(nsIContent* aContent);
NS_IMETHOD GetContent(nsIContent** aContent);
private:
nsIContent* mContent;
nsCOMPtr<nsINodeInfo> mNodeInfo;
nsString mValue;
// XXX For now, there's only a single child - a text
// element representing the value
nsIDOMText* mChild;
nsAttributeChildList* mChildList;
};
#endif /* nsDOMAttribute_h___ */

View File

@@ -0,0 +1,462 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsDOMAttributeMap.h"
#include "nsDOMAttribute.h"
#include "nsGenericElement.h"
#include "nsIContent.h"
#include "nsINameSpaceManager.h"
#include "nsDOMError.h"
#include "nsContentUtils.h"
//----------------------------------------------------------------------
nsDOMAttributeMap::nsDOMAttributeMap(nsIContent* aContent)
: mContent(aContent)
{
NS_INIT_REFCNT();
// We don't add a reference to our content. If it goes away,
// we'll be told to drop our reference
}
nsDOMAttributeMap::~nsDOMAttributeMap()
{
}
void
nsDOMAttributeMap::DropReference()
{
mContent = nsnull;
}
// QueryInterface implementation for nsDOMAttributeMap
NS_INTERFACE_MAP_BEGIN(nsDOMAttributeMap)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_ENTRY(nsIDOMNamedNodeMap)
NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(NamedNodeMap)
NS_INTERFACE_MAP_END
NS_IMPL_ADDREF(nsDOMAttributeMap)
NS_IMPL_RELEASE(nsDOMAttributeMap)
nsresult
nsDOMAttributeMap::GetNamedItem(const nsAString& aAttrName,
nsIDOMNode** aAttribute)
{
NS_ENSURE_ARG_POINTER(aAttribute);
*aAttribute = nsnull;
nsresult rv = NS_OK;
if (mContent) {
nsCOMPtr<nsINodeInfo> ni;
mContent->NormalizeAttrString(aAttrName, *getter_AddRefs(ni));
NS_ENSURE_TRUE(ni, NS_ERROR_FAILURE);
PRInt32 nsid;
nsCOMPtr<nsIAtom> nameAtom;
ni->GetNamespaceID(nsid);
ni->GetNameAtom(*getter_AddRefs(nameAtom));
nsresult attrResult;
nsAutoString value;
attrResult = mContent->GetAttr(nsid, nameAtom, value);
if (NS_CONTENT_ATTR_NOT_THERE != attrResult && NS_SUCCEEDED(attrResult)) {
nsDOMAttribute* domAttribute;
domAttribute = new nsDOMAttribute(mContent, ni, value);
NS_ENSURE_TRUE(domAttribute, NS_ERROR_OUT_OF_MEMORY);
rv = domAttribute->QueryInterface(NS_GET_IID(nsIDOMAttr),
(void **)aAttribute);
}
}
return rv;
}
nsresult
nsDOMAttributeMap::SetNamedItem(nsIDOMNode *aNode, nsIDOMNode **aReturn)
{
NS_ENSURE_ARG_POINTER(aReturn);
if (!aNode) {
return NS_ERROR_NULL_POINTER;
}
nsresult rv = NS_OK;
*aReturn = nsnull;
if (mContent) {
nsCOMPtr<nsIDOMAttr> attribute(do_QueryInterface(aNode));
if (!attribute) {
return NS_ERROR_DOM_HIERARCHY_REQUEST_ERR;
}
nsAutoString name, value;
attribute->GetName(name);
nsCOMPtr<nsINodeInfo> ni;
mContent->NormalizeAttrString(name, *getter_AddRefs(ni));
NS_ENSURE_TRUE(ni, NS_ERROR_FAILURE);
nsCOMPtr<nsIAtom> nameAtom;
PRInt32 nsid;
ni->GetNamespaceID(nsid);
ni->GetNameAtom(*getter_AddRefs(nameAtom));
nsresult attrResult = mContent->GetAttr(nsid, nameAtom, value);
if (NS_CONTENT_ATTR_NOT_THERE != attrResult && NS_SUCCEEDED(attrResult)) {
nsDOMAttribute* domAttribute;
// We pass a null content here since the attr node we return isn't
// tied to this content anymore.
domAttribute = new nsDOMAttribute(nsnull, ni, value);
if (!domAttribute) {
return NS_ERROR_OUT_OF_MEMORY;
}
rv = domAttribute->QueryInterface(NS_GET_IID(nsIDOMAttr),
(void **)aReturn);
}
attribute->GetValue(value);
rv = mContent->SetAttr(ni, value, PR_TRUE);
}
return rv;
}
NS_IMETHODIMP
nsDOMAttributeMap::RemoveNamedItem(const nsAString& aName,
nsIDOMNode** aReturn)
{
NS_ENSURE_ARG_POINTER(aReturn);
*aReturn = nsnull;
nsresult rv = NS_OK;
if (mContent) {
nsCOMPtr<nsINodeInfo> ni;
mContent->NormalizeAttrString(aName, *getter_AddRefs(ni));
NS_ENSURE_TRUE(ni, NS_ERROR_FAILURE);
nsCOMPtr<nsIAtom> nameAtom;
PRInt32 nsid;
ni->GetNamespaceID(nsid);
ni->GetNameAtom(*getter_AddRefs(nameAtom));
nsCOMPtr<nsIDOMNode> attribute;
nsresult attrResult;
nsAutoString value;
attrResult = mContent->GetAttr(nsid, nameAtom, value);
if (NS_CONTENT_ATTR_NOT_THERE != attrResult && NS_SUCCEEDED(attrResult)) {
nsDOMAttribute* domAttribute;
domAttribute = new nsDOMAttribute(nsnull, ni, value);
if (!domAttribute) {
return NS_ERROR_OUT_OF_MEMORY;
}
rv = domAttribute->QueryInterface(NS_GET_IID(nsIDOMAttr),
(void **)aReturn);
} else {
return NS_ERROR_DOM_NOT_FOUND_ERR;
}
rv = mContent->UnsetAttr(nsid, nameAtom, PR_TRUE);
}
return rv;
}
nsresult
nsDOMAttributeMap::Item(PRUint32 aIndex, nsIDOMNode** aReturn)
{
NS_ENSURE_ARG_POINTER(aReturn);
PRInt32 nameSpaceID;
nsCOMPtr<nsIAtom> nameAtom, prefix;
nsresult rv = NS_OK;
if (mContent &&
NS_SUCCEEDED(mContent->GetAttrNameAt(aIndex,
nameSpaceID,
*getter_AddRefs(nameAtom),
*getter_AddRefs(prefix)))) {
nsAutoString value, name;
mContent->GetAttr(nameSpaceID, nameAtom, value);
nsCOMPtr<nsINodeInfo> ni;
mContent->GetNodeInfo(*getter_AddRefs(ni));
NS_ENSURE_TRUE(ni, NS_ERROR_FAILURE);
nsCOMPtr<nsINodeInfoManager> nimgr;
ni->GetNodeInfoManager(*getter_AddRefs(nimgr));
NS_ENSURE_TRUE(nimgr, NS_ERROR_FAILURE);
nimgr->GetNodeInfo(nameAtom, prefix, nameSpaceID, *getter_AddRefs(ni));
NS_ENSURE_TRUE(ni, NS_ERROR_FAILURE);
nsDOMAttribute* domAttribute = new nsDOMAttribute(mContent, ni, value);
NS_ENSURE_TRUE(domAttribute, NS_ERROR_OUT_OF_MEMORY);
rv = domAttribute->QueryInterface(NS_GET_IID(nsIDOMAttr),
(void **)aReturn);
}
else {
*aReturn = nsnull;
}
return rv;
}
nsresult
nsDOMAttributeMap::GetLength(PRUint32 *aLength)
{
NS_ENSURE_ARG_POINTER(aLength);
PRInt32 n;
nsresult rv = NS_OK;
if (nsnull != mContent) {
rv = mContent->GetAttrCount(n);
*aLength = PRUint32(n);
} else {
*aLength = 0;
}
return rv;
}
nsresult
nsDOMAttributeMap::GetNamedItemNS(const nsAString& aNamespaceURI,
const nsAString& aLocalName,
nsIDOMNode** aReturn)
{
NS_ENSURE_ARG_POINTER(aReturn);
*aReturn = nsnull;
nsresult rv = NS_OK;
if (mContent) {
nsCOMPtr<nsIAtom> nameAtom(dont_AddRef(NS_NewAtom(aLocalName)));
PRInt32 nameSpaceID = kNameSpaceID_None;
nsCOMPtr<nsIAtom> prefix;
nsCOMPtr<nsINodeInfo> ni;
mContent->GetNodeInfo(*getter_AddRefs(ni));
NS_ENSURE_TRUE(ni, NS_ERROR_FAILURE);
nsCOMPtr<nsINodeInfoManager> nimgr;
ni->GetNodeInfoManager(*getter_AddRefs(nimgr));
NS_ENSURE_TRUE(nimgr, NS_ERROR_FAILURE);
if (aNamespaceURI.Length()) {
nsCOMPtr<nsINameSpaceManager> nsmgr;
nimgr->GetNamespaceManager(*getter_AddRefs(nsmgr));
NS_ENSURE_TRUE(nsmgr, NS_ERROR_FAILURE);
nsmgr->GetNameSpaceID(aNamespaceURI, nameSpaceID);
if (nameSpaceID == kNameSpaceID_Unknown)
return NS_OK;
}
nsresult attrResult;
nsAutoString value;
attrResult = mContent->GetAttr(nameSpaceID, nameAtom,
*getter_AddRefs(prefix), value);
if (NS_CONTENT_ATTR_NOT_THERE != attrResult && NS_SUCCEEDED(attrResult)) {
nimgr->GetNodeInfo(nameAtom, prefix, nameSpaceID, *getter_AddRefs(ni));
NS_ENSURE_TRUE(ni, NS_ERROR_FAILURE);
nsDOMAttribute* domAttribute;
domAttribute = new nsDOMAttribute(mContent, ni, value);
NS_ENSURE_TRUE(domAttribute, NS_ERROR_OUT_OF_MEMORY);
rv = domAttribute->QueryInterface(NS_GET_IID(nsIDOMAttr),
(void **)aReturn);
}
}
return rv;
}
nsresult
nsDOMAttributeMap::SetNamedItemNS(nsIDOMNode* aArg, nsIDOMNode** aReturn)
{
NS_ENSURE_ARG_POINTER(aReturn);
nsresult rv = NS_OK;
*aReturn = nsnull;
if (mContent) {
nsCOMPtr<nsIDOMAttr> attribute(do_QueryInterface(aArg));
if (!attribute) {
return NS_ERROR_DOM_HIERARCHY_REQUEST_ERR;
}
nsAutoString name, nsURI, value;
nsCOMPtr<nsIAtom> nameAtom;
PRInt32 nameSpaceID;
attribute->GetName(name);
attribute->GetPrefix(name);
attribute->GetNamespaceURI(nsURI);
nsCOMPtr<nsINodeInfo> ni;
mContent->GetNodeInfo(*getter_AddRefs(ni));
NS_ENSURE_TRUE(ni, NS_ERROR_FAILURE);
nsCOMPtr<nsINodeInfoManager> nimgr;
ni->GetNodeInfoManager(*getter_AddRefs(nimgr));
NS_ENSURE_TRUE(nimgr, NS_ERROR_FAILURE);
nimgr->GetNodeInfo(name, nsURI, *getter_AddRefs(ni));
NS_ENSURE_TRUE(ni, NS_ERROR_FAILURE);
ni->GetNameAtom(*getter_AddRefs(nameAtom));
ni->GetNamespaceID(nameSpaceID);
nsresult attrResult = mContent->GetAttr(nameSpaceID, nameAtom, value);
if (NS_CONTENT_ATTR_NOT_THERE != attrResult && NS_SUCCEEDED(attrResult)) {
nsDOMAttribute* domAttribute;
// We pass a null content here since the attr node we return isn't
// tied to this content anymore.
domAttribute = new nsDOMAttribute(nsnull, ni, value);
if (!domAttribute) {
return NS_ERROR_OUT_OF_MEMORY;
}
rv = domAttribute->QueryInterface(NS_GET_IID(nsIDOMAttr),
(void **)aReturn);
}
attribute->GetValue(value);
rv = mContent->SetAttr(ni, value, PR_TRUE);
}
return rv;
}
nsresult
nsDOMAttributeMap::RemoveNamedItemNS(const nsAString& aNamespaceURI,
const nsAString& aLocalName,
nsIDOMNode** aReturn)
{
NS_ENSURE_ARG_POINTER(aReturn);
*aReturn = nsnull;
nsresult rv = NS_OK;
if (mContent) {
nsCOMPtr<nsIAtom> nameAtom(dont_AddRef(NS_NewAtom(aLocalName)));
PRInt32 nameSpaceID = kNameSpaceID_None;
nsCOMPtr<nsIDOMNode> attribute;
nsCOMPtr<nsIAtom> prefix;
nsCOMPtr<nsINodeInfo> ni;
mContent->GetNodeInfo(*getter_AddRefs(ni));
NS_ENSURE_TRUE(ni, NS_ERROR_FAILURE);
nsCOMPtr<nsINodeInfoManager> nimgr;
ni->GetNodeInfoManager(*getter_AddRefs(nimgr));
NS_ENSURE_TRUE(nimgr, NS_ERROR_FAILURE);
if (aNamespaceURI.Length()) {
nsCOMPtr<nsINameSpaceManager> nsmgr;
nimgr->GetNamespaceManager(*getter_AddRefs(nsmgr));
NS_ENSURE_TRUE(nsmgr, NS_ERROR_FAILURE);
nsmgr->GetNameSpaceID(aNamespaceURI, nameSpaceID);
if (nameSpaceID == kNameSpaceID_Unknown)
return NS_ERROR_DOM_NOT_FOUND_ERR;
}
nsresult attrResult;
nsAutoString value;
attrResult = mContent->GetAttr(nameSpaceID, nameAtom,
*getter_AddRefs(prefix), value);
if (NS_CONTENT_ATTR_NOT_THERE != attrResult && NS_SUCCEEDED(attrResult)) {
nimgr->GetNodeInfo(nameAtom, prefix, nameSpaceID, *getter_AddRefs(ni));
NS_ENSURE_TRUE(ni, NS_ERROR_FAILURE);
nsDOMAttribute* domAttribute;
domAttribute = new nsDOMAttribute(nsnull, ni, value);
if (!domAttribute) {
return NS_ERROR_OUT_OF_MEMORY;
}
rv = domAttribute->QueryInterface(NS_GET_IID(nsIDOMAttr),
(void **)aReturn);
} else {
return NS_ERROR_DOM_NOT_FOUND_ERR;
}
rv = mContent->UnsetAttr(nameSpaceID, nameAtom, PR_TRUE);
}
return rv;
}
#ifdef DEBUG
nsresult
nsDOMAttributeMap::SizeOfNamedNodeMap(nsIDOMNamedNodeMap* aMap,
nsISizeOfHandler* aSizer,
PRUint32* aResult)
{
if (!aResult) return NS_ERROR_NULL_POINTER;
*aResult = sizeof(nsDOMAttributeMap);
return NS_OK;
}
#endif

View File

@@ -0,0 +1,73 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsDOMAttributeMap_h___
#define nsDOMAttributeMap_h___
#include "nsIDOMNamedNodeMap.h"
#include "nsVoidArray.h"
#include "nsString.h"
#include "plhash.h"
class nsIContent;
// Helper class that implements the nsIDOMNamedNodeMap interface.
class nsDOMAttributeMap : public nsIDOMNamedNodeMap
{
public:
nsDOMAttributeMap(nsIContent* aContent);
virtual ~nsDOMAttributeMap();
NS_DECL_ISUPPORTS
// nsIDOMNamedNodeMap interface
NS_DECL_NSIDOMNAMEDNODEMAP
void DropReference();
#ifdef DEBUG
static nsresult SizeOfNamedNodeMap(nsIDOMNamedNodeMap* aMap,
nsISizeOfHandler* aSizer,
PRUint32* aResult);
#endif
private:
nsIContent* mContent; // Weak reference
};
#endif /* nsDOMAttributeMap_h___ */

View File

@@ -0,0 +1,239 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsDOMDocumentType.h"
#include "nsDOMAttributeMap.h"
#include "nsIDOMNamedNodeMap.h"
#include "nsLayoutAtoms.h"
#include "nsCOMPtr.h"
#include "nsContentUtils.h"
nsresult
NS_NewDOMDocumentType(nsIDOMDocumentType** aDocType,
const nsAString& aName,
nsIDOMNamedNodeMap *aEntities,
nsIDOMNamedNodeMap *aNotations,
const nsAString& aPublicId,
const nsAString& aSystemId,
const nsAString& aInternalSubset)
{
NS_ENSURE_ARG_POINTER(aDocType);
*aDocType = new nsDOMDocumentType(aName, aEntities, aNotations, aPublicId,
aSystemId, aInternalSubset);
if (!*aDocType) {
return NS_ERROR_OUT_OF_MEMORY;
}
NS_ADDREF(*aDocType);
return NS_OK;
}
nsDOMDocumentType::nsDOMDocumentType(const nsAString& aName,
nsIDOMNamedNodeMap *aEntities,
nsIDOMNamedNodeMap *aNotations,
const nsAString& aPublicId,
const nsAString& aSystemId,
const nsAString& aInternalSubset) :
mName(aName),
mPublicId(aPublicId),
mSystemId(aSystemId),
mInternalSubset(aInternalSubset)
{
NS_INIT_REFCNT();
mEntities = aEntities;
mNotations = aNotations;
NS_IF_ADDREF(mEntities);
NS_IF_ADDREF(mNotations);
}
nsDOMDocumentType::~nsDOMDocumentType()
{
NS_IF_RELEASE(mEntities);
NS_IF_RELEASE(mNotations);
}
// QueryInterface implementation for nsDOMDocumentType
NS_INTERFACE_MAP_BEGIN(nsDOMDocumentType)
NS_INTERFACE_MAP_ENTRY(nsIContent)
NS_INTERFACE_MAP_ENTRY(nsIDOMNode)
NS_INTERFACE_MAP_ENTRY(nsIDOMDocumentType)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIContent)
NS_INTERFACE_MAP_ENTRY_TEAROFF(nsIDOM3Node, nsNode3Tearoff(this))
NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(DocumentType)
NS_INTERFACE_MAP_END
NS_IMPL_ADDREF(nsDOMDocumentType)
NS_IMPL_RELEASE(nsDOMDocumentType)
NS_IMETHODIMP
nsDOMDocumentType::GetName(nsAString& aName)
{
aName=mName;
return NS_OK;
}
NS_IMETHODIMP
nsDOMDocumentType::GetEntities(nsIDOMNamedNodeMap** aEntities)
{
NS_ENSURE_ARG_POINTER(aEntities);
*aEntities = mEntities;
NS_IF_ADDREF(*aEntities);
return NS_OK;
}
NS_IMETHODIMP
nsDOMDocumentType::GetNotations(nsIDOMNamedNodeMap** aNotations)
{
NS_ENSURE_ARG_POINTER(aNotations);
*aNotations = mNotations;
NS_IF_ADDREF(*aNotations);
return NS_OK;
}
NS_IMETHODIMP
nsDOMDocumentType::GetPublicId(nsAString& aPublicId)
{
aPublicId = mPublicId;
return NS_OK;
}
NS_IMETHODIMP
nsDOMDocumentType::GetSystemId(nsAString& aSystemId)
{
aSystemId = mSystemId;
return NS_OK;
}
NS_IMETHODIMP
nsDOMDocumentType::GetInternalSubset(nsAString& aInternalSubset)
{
// XXX: null string
aInternalSubset = mInternalSubset;
return NS_OK;
}
NS_IMETHODIMP
nsDOMDocumentType::GetTag(nsIAtom*& aResult) const
{
aResult = NS_NewAtom(mName.get());
return NS_OK;
}
NS_IMETHODIMP
nsDOMDocumentType::GetNodeName(nsAString& aNodeName)
{
aNodeName=mName;
return NS_OK;
}
NS_IMETHODIMP
nsDOMDocumentType::GetNodeType(PRUint16* aNodeType)
{
*aNodeType = nsIDOMNode::DOCUMENT_TYPE_NODE;
return NS_OK;
}
NS_IMETHODIMP
nsDOMDocumentType::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
{
nsDOMDocumentType* it = new nsDOMDocumentType(mName,
mEntities,
mNotations,
mPublicId,
mSystemId,
mInternalSubset);
if (nsnull == it) {
return NS_ERROR_OUT_OF_MEMORY;
}
return it->QueryInterface(NS_GET_IID(nsIDOMNode), (void**) aReturn);
}
#ifdef DEBUG
NS_IMETHODIMP
nsDOMDocumentType::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
NS_ENSURE_ARG_POINTER(aResult);
PRUint32 sum;
nsGenericDOMDataNode::SizeOf(aSizer, &sum);
PRUint32 ssize;
mName.SizeOf(aSizer, &ssize);
sum = sum - sizeof(mName) + ssize;
if (mEntities) {
PRBool recorded;
aSizer->RecordObject((void*) mEntities, &recorded);
if (!recorded) {
PRUint32 size;
nsDOMAttributeMap::SizeOfNamedNodeMap(mEntities, aSizer, &size);
aSizer->AddSize(nsLayoutAtoms::xml_document_entities, size);
}
}
if (mNotations) {
PRBool recorded;
aSizer->RecordObject((void*) mNotations, &recorded);
if (!recorded) {
PRUint32 size;
nsDOMAttributeMap::SizeOfNamedNodeMap(mNotations, aSizer, &size);
aSizer->AddSize(nsLayoutAtoms::xml_document_notations, size);
}
}
return NS_OK;
}
#endif

View File

@@ -0,0 +1,100 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsDOMDocumentType_h___
#define nsDOMDocumentType_h___
#include "nsIDOMDocumentType.h"
#include "nsIContent.h"
#include "nsGenericDOMDataNode.h"
#include "nsString.h"
#include "nsISizeOfHandler.h"
// XXX DocumentType is currently implemented by inheriting the generic
// CharacterData object, even though DocumentType is not character
// data. This is done simply for convenience and should be changed if
// this restricts what should be done for character data.
class nsDOMDocumentType : public nsGenericDOMDataNode,
public nsIDOMDocumentType
{
public:
nsDOMDocumentType(const nsAString& aName,
nsIDOMNamedNodeMap *aEntities,
nsIDOMNamedNodeMap *aNotations,
const nsAString& aPublicId,
const nsAString& aSystemId,
const nsAString& aInternalSubset);
virtual ~nsDOMDocumentType();
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_IMPL_NSIDOMNODE_USING_GENERIC_DOM_DATA
// nsIDOMDocumentType
NS_DECL_NSIDOMDOCUMENTTYPE
// nsIContent
NS_IMETHOD GetTag(nsIAtom*& aResult) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
protected:
nsString mName;
nsIDOMNamedNodeMap* mEntities;
nsIDOMNamedNodeMap* mNotations;
nsString mPublicId;
nsString mSystemId;
nsString mInternalSubset;
};
extern nsresult
NS_NewDOMDocumentType(nsIDOMDocumentType** aDocType,
const nsAString& aName,
nsIDOMNamedNodeMap *aEntities,
nsIDOMNamedNodeMap *aNotations,
const nsAString& aPublicId,
const nsAString& aSystemId,
const nsAString& aInternalSubset);
#endif // nsDOMDocument_h___

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,673 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsDocument_h___
#define nsDocument_h___
#include "nsIDocument.h"
#include "nsWeakReference.h"
#include "nsWeakPtr.h"
#include "nsVoidArray.h"
#include "nsIDOMXMLDocument.h"
#include "nsIDOMDocumentView.h"
#include "nsIDOMDocumentXBL.h"
#include "nsIDOMNSDocument.h"
#include "nsIDOMDocumentStyle.h"
#include "nsIDOMDocumentRange.h"
#include "nsIDOMDocumentTraversal.h"
#include "nsIDocumentObserver.h"
#include "nsIDOMEventReceiver.h"
#include "nsIDOMStyleSheetList.h"
#include "nsIScriptGlobalObject.h"
#include "nsIDOMEventTarget.h"
#include "nsIContent.h"
#include "nsGenericDOMNodeList.h"
#include "nsIPrincipal.h"
#include "nsIBindingManager.h"
#include "nsINodeInfo.h"
#include "nsIDOMDocumentEvent.h"
#include "nsISupportsArray.h"
#include "nsHashtable.h"
#include "nsIWordBreakerFactory.h"
#include "nsILineBreakerFactory.h"
#include "nsIScriptObjectPrincipal.h"
#include "nsIURI.h"
#include "nsScriptLoader.h"
#include "nsICSSLoader.h"
#include "nsIDOMXPathEvaluator.h"
#include "pldhash.h"
class nsIEventListenerManager;
class nsDOMStyleSheetList;
class nsIOutputStream;
class nsDocument;
class nsIDTD;
class nsXPathDocumentTearoff;
#if 0
class nsPostData : public nsIPostData {
public:
nsPostData(PRBool aIsFile, char* aData);
NS_DECL_ISUPPORTS
virtual PRBool IsFile();
virtual const char* GetData();
virtual PRInt32 GetDataLength();
protected:
virtual ~nsPostData();
PRBool mIsFile;
char* mData;
PRInt32 mDataLen;
};
#endif
class nsDocHeaderData
{
public:
nsDocHeaderData(nsIAtom* aField, const nsAString& aData)
{
mField = aField;
NS_IF_ADDREF(mField);
mData.Assign(aData);
mNext = nsnull;
}
~nsDocHeaderData(void)
{
NS_IF_RELEASE(mField);
if (nsnull != mNext) {
delete mNext;
mNext = nsnull;
}
}
nsIAtom* mField;
nsString mData;
nsDocHeaderData* mNext;
};
// Represents the children of a document (prolog, epilog and
// document element)
class nsDocumentChildNodes : public nsGenericDOMNodeList
{
public:
nsDocumentChildNodes(nsIDocument* aDocument);
~nsDocumentChildNodes();
NS_IMETHOD GetLength(PRUint32* aLength);
NS_IMETHOD Item(PRUint32 aIndex, nsIDOMNode** aReturn);
void DropReference();
protected:
nsIDocument* mDocument;
};
class nsDOMStyleSheetList : public nsIDOMStyleSheetList,
public nsIDocumentObserver
{
public:
nsDOMStyleSheetList(nsIDocument *aDocument);
virtual ~nsDOMStyleSheetList();
NS_DECL_ISUPPORTS
NS_DECL_NSIDOMSTYLESHEETLIST
NS_IMETHOD BeginUpdate(nsIDocument *aDocument) { return NS_OK; }
NS_IMETHOD EndUpdate(nsIDocument *aDocument) { return NS_OK; }
NS_IMETHOD BeginLoad(nsIDocument *aDocument) { return NS_OK; }
NS_IMETHOD EndLoad(nsIDocument *aDocument) { return NS_OK; }
NS_IMETHOD BeginReflow(nsIDocument *aDocument,
nsIPresShell* aShell) { return NS_OK; }
NS_IMETHOD EndReflow(nsIDocument *aDocument,
nsIPresShell* aShell) { return NS_OK; }
NS_IMETHOD ContentChanged(nsIDocument *aDocument,
nsIContent* aContent,
nsISupports* aSubContent) { return NS_OK; }
NS_IMETHOD ContentStatesChanged(nsIDocument* aDocument,
nsIContent* aContent1,
nsIContent* aContent2,
PRInt32 aStateMask) { return NS_OK; }
NS_IMETHOD AttributeChanged(nsIDocument *aDocument,
nsIContent* aContent,
PRInt32 aNameSpaceID,
nsIAtom* aAttribute,
PRInt32 aModType,
PRInt32 aHint) { return NS_OK; }
NS_IMETHOD ContentAppended(nsIDocument *aDocument,
nsIContent* aContainer,
PRInt32 aNewIndexInContainer)
{ return NS_OK; }
NS_IMETHOD ContentInserted(nsIDocument *aDocument,
nsIContent* aContainer,
nsIContent* aChild,
PRInt32 aIndexInContainer) { return NS_OK; }
NS_IMETHOD ContentReplaced(nsIDocument *aDocument,
nsIContent* aContainer,
nsIContent* aOldChild,
nsIContent* aNewChild,
PRInt32 aIndexInContainer) { return NS_OK; }
NS_IMETHOD ContentRemoved(nsIDocument *aDocument,
nsIContent* aContainer,
nsIContent* aChild,
PRInt32 aIndexInContainer) { return NS_OK; }
NS_IMETHOD StyleSheetAdded(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet);
NS_IMETHOD StyleSheetRemoved(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet);
NS_IMETHOD StyleSheetDisabledStateChanged(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet,
PRBool aDisabled) { return NS_OK; }
NS_IMETHOD StyleRuleChanged(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule,
PRInt32 aHint) { return NS_OK; }
NS_IMETHOD StyleRuleAdded(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule) { return NS_OK; }
NS_IMETHOD StyleRuleRemoved(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule) { return NS_OK; }
NS_IMETHOD DocumentWillBeDestroyed(nsIDocument *aDocument);
protected:
PRInt32 mLength;
nsIDocument* mDocument;
void* mScriptObject;
};
// Helper structs for the content->subdoc map
class SubDocMapEntry : public PLDHashEntryHdr
{
public:
// Both of these are strong references
nsIContent *mKey; // must be first, to look like PLDHashEntryStub
nsIDocument *mSubDocument;
};
struct FindContentData
{
FindContentData(nsIDocument *aSubDoc)
: mSubDocument(aSubDoc), mResult(nsnull)
{
}
nsISupports *mSubDocument;
nsIContent *mResult;
};
// Base class for our document implementations.
//
// Note that this class *implements* nsIDOMXMLDocument, but it's not
// really an nsIDOMXMLDocument. The reason for implementing
// nsIDOMXMLDocument on this class is to avoid having to duplicate all
// its inherited methods on document classes that *are*
// nsIDOMXMLDocument's. nsDocument's QI should *not* claim to support
// nsIDOMXMLDocument unless someone writes a real implementation of
// the interface.
class nsDocument : public nsIDocument,
public nsIDOMXMLDocument, // inherits nsIDOMDocument
public nsIDOMNSDocument,
public nsIDOMDocumentEvent,
public nsIDOMDocumentStyle,
public nsIDOMDocumentView,
public nsIDOMDocumentRange,
public nsIDOMDocumentTraversal,
public nsIDOMDocumentXBL,
public nsIDOM3Node,
public nsSupportsWeakReference,
public nsIDOMEventReceiver,
public nsIScriptObjectPrincipal
{
public:
NS_DECL_ISUPPORTS
NS_IMETHOD GetArena(nsIArena** aArena);
NS_IMETHOD Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup);
NS_IMETHOD ResetToURI(nsIURI *aURI, nsILoadGroup *aLoadGroup);
NS_IMETHOD StartDocumentLoad(const char* aCommand,
nsIChannel* aChannel,
nsILoadGroup* aLoadGroup,
nsISupports* aContainer,
nsIStreamListener **aDocListener,
PRBool aReset = PR_TRUE,
nsIContentSink* aContentSink = nsnull);
NS_IMETHOD StopDocumentLoad();
/**
* Return the title of the document. May return null.
*/
virtual const nsString* GetDocumentTitle() const;
/**
* Return the URL for the document. May return null.
*/
NS_IMETHOD GetDocumentURL(nsIURI** aURI) const;
/**
* Return the principal responsible for this document.
*/
NS_IMETHOD GetPrincipal(nsIPrincipal **aPrincipal);
/**
* Update principal responsible for this document to the intersection
* of its previous value and aPrincipal, and return its new value.
*/
NS_IMETHOD AddPrincipal(nsIPrincipal *aPrincipal);
/**
* Return the content language of this document.
*/
NS_IMETHOD GetContentLanguage(nsAString& aContentLanguage) const;
/**
* Return the LoadGroup for the document. May return null.
*/
NS_IMETHOD GetDocumentLoadGroup(nsILoadGroup **aGroup) const;
/**
* Return the base URL for relative URLs in the document. May return null (or the document URL).
*/
NS_IMETHOD GetBaseURL(nsIURI*& aURL) const;
NS_IMETHOD SetBaseURL(nsIURI* aURL);
/**
* Get/Set the base target of a link in a document.
*/
NS_IMETHOD GetBaseTarget(nsAString &aBaseTarget);
NS_IMETHOD SetBaseTarget(const nsAString &aBaseTarget);
/**
* Return a standard name for the document's character set. This will
* trigger a startDocumentLoad if necessary to answer the question.
*/
NS_IMETHOD GetDocumentCharacterSet(nsAString& oCharsetID);
NS_IMETHOD SetDocumentCharacterSet(const nsAString& aCharSetID);
NS_IMETHOD GetDocumentCharacterSetSource(PRInt32* aCharsetSource);
NS_IMETHOD SetDocumentCharacterSetSource(PRInt32 aCharsetSource);
/**
* Add an observer that gets notified whenever the charset changes.
*/
NS_IMETHOD AddCharSetObserver(nsIObserver* aObserver);
/**
* Remove a charset observer.
*/
NS_IMETHOD RemoveCharSetObserver(nsIObserver* aObserver);
#ifdef IBMBIDI
/**
* Check if the document contains bidi data.
* If so, we have to apply the Unicode Bidi Algorithm.
*/
NS_IMETHOD GetBidiEnabled(PRBool* aBidiEnabled) const;
/**
* Indicate the document contains RTL characters.
*/
NS_IMETHOD SetBidiEnabled(PRBool aBidiEnabled);
#endif // IBMBIDI
/**
* Return the Line Breaker for the document
*/
NS_IMETHOD GetLineBreaker(nsILineBreaker** aResult) ;
NS_IMETHOD SetLineBreaker(nsILineBreaker* aLineBreaker) ;
NS_IMETHOD GetWordBreaker(nsIWordBreaker** aResult) ;
NS_IMETHOD SetWordBreaker(nsIWordBreaker* aWordBreaker) ;
/**
* Access HTTP header data (this may also get set from other sources, like
* HTML META tags).
*/
NS_IMETHOD GetHeaderData(nsIAtom* aHeaderField,
nsAString& aData) const;
NS_IMETHOD SetHeaderData(nsIAtom* aheaderField,
const nsAString& aData);
/**
* Create a new presentation shell that will use aContext for
* it's presentation context (presentation context's <b>must not</b> be
* shared among multiple presentation shell's).
*/
#if 0
// XXX Temp hack: moved to nsMarkupDocument
NS_IMETHOD CreateShell(nsIPresContext* aContext,
nsIViewManager* aViewManager,
nsIStyleSet* aStyleSet,
nsIPresShell** aInstancePtrResult);
#endif
virtual PRBool DeleteShell(nsIPresShell* aShell);
virtual PRInt32 GetNumberOfShells();
NS_IMETHOD GetShellAt(PRInt32 aIndex, nsIPresShell** aShell);
/**
* Return the parent document of this document. Will return null
* unless this document is within a compound document and has a parent.
*/
NS_IMETHOD GetParentDocument(nsIDocument** aParent);
NS_IMETHOD SetParentDocument(nsIDocument* aParent);
NS_IMETHOD SetSubDocumentFor(nsIContent *aContent, nsIDocument* aSubDoc);
NS_IMETHOD GetSubDocumentFor(nsIContent *aContent, nsIDocument** aSubDoc);
NS_IMETHOD FindContentForSubDocument(nsIDocument *aDocument,
nsIContent **aContent);
/**
* Return the root content object for this document.
*/
NS_IMETHOD GetRootContent(nsIContent** aRoot);
NS_IMETHOD SetRootContent(nsIContent* aRoot);
/**
* Get the direct children of the document - content in
* the prolog, the root content and content in the epilog.
*/
NS_IMETHOD ChildAt(PRInt32 aIndex, nsIContent*& aResult) const;
NS_IMETHOD IndexOf(nsIContent* aPossibleChild, PRInt32& aIndex) const;
NS_IMETHOD GetChildCount(PRInt32& aCount);
/**
* Get the style sheets owned by this document.
* These are ordered, highest priority last
*/
NS_IMETHOD GetNumberOfStyleSheets(PRInt32* aCount);
NS_IMETHOD GetStyleSheetAt(PRInt32 aIndex, nsIStyleSheet** aSheet);
NS_IMETHOD GetIndexOfStyleSheet(nsIStyleSheet* aSheet, PRInt32* aIndex);
virtual void AddStyleSheet(nsIStyleSheet* aSheet, PRUint32 aFlags);
virtual void RemoveStyleSheet(nsIStyleSheet* aSheet);
NS_IMETHOD UpdateStyleSheets(nsISupportsArray* aOldSheets,
nsISupportsArray* aNewSheets);
virtual void AddStyleSheetToStyleSets(nsIStyleSheet* aSheet);
virtual void RemoveStyleSheetFromStyleSets(nsIStyleSheet* aSheet);
NS_IMETHOD InsertStyleSheetAt(nsIStyleSheet* aSheet, PRInt32 aIndex,
PRBool aNotify);
virtual void SetStyleSheetDisabledState(nsIStyleSheet* aSheet,
PRBool mDisabled);
/**
* Set the object from which a document can get a script context.
* This is the context within which all scripts (during document
* creation and during event handling) will run.
*/
NS_IMETHOD GetScriptGlobalObject(nsIScriptGlobalObject** aGlobalObject);
NS_IMETHOD SetScriptGlobalObject(nsIScriptGlobalObject* aGlobalObject);
/**
* Get the name space manager for this document
*/
NS_IMETHOD GetNameSpaceManager(nsINameSpaceManager*& aManager);
/**
* Get the script loader for this document
*/
NS_IMETHOD GetScriptLoader(nsIScriptLoader** aScriptLoader);
/**
* Get the focus controller for this document
* This can usually be gotten through the ScriptGlobalObject, but
* it is set to null during document destruction, when we still might
* need to fire focus events.
*/
NS_IMETHOD GetFocusController(nsIFocusController** aFocusController);
/**
* Add a new observer of document change notifications. Whenever
* content is changed, appended, inserted or removed the observers are
* informed.
*/
virtual void AddObserver(nsIDocumentObserver* aObserver);
/**
* Remove an observer of document change notifications. This will
* return false if the observer cannot be found.
*/
virtual PRBool RemoveObserver(nsIDocumentObserver* aObserver);
// Observation hooks used by content nodes to propagate
// notifications to document observers.
NS_IMETHOD BeginUpdate();
NS_IMETHOD EndUpdate();
NS_IMETHOD BeginLoad();
NS_IMETHOD EndLoad();
NS_IMETHOD ContentChanged(nsIContent* aContent,
nsISupports* aSubContent);
NS_IMETHOD ContentStatesChanged(nsIContent* aContent1,
nsIContent* aContent2,
PRInt32 aStateMask);
NS_IMETHOD AttributeWillChange(nsIContent* aChild,
PRInt32 aNameSpaceID,
nsIAtom* aAttribute);
NS_IMETHOD AttributeChanged(nsIContent* aChild,
PRInt32 aNameSpaceID,
nsIAtom* aAttribute,
PRInt32 aModType,
PRInt32 aHint);
NS_IMETHOD ContentAppended(nsIContent* aContainer,
PRInt32 aNewIndexInContainer);
NS_IMETHOD ContentInserted(nsIContent* aContainer,
nsIContent* aChild,
PRInt32 aIndexInContainer);
NS_IMETHOD ContentReplaced(nsIContent* aContainer,
nsIContent* aOldChild,
nsIContent* aNewChild,
PRInt32 aIndexInContainer);
NS_IMETHOD ContentRemoved(nsIContent* aContainer,
nsIContent* aChild,
PRInt32 aIndexInContainer);
NS_IMETHOD StyleRuleChanged(nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule,
PRInt32 aHint); // See nsStyleConsts fot hint values
NS_IMETHOD StyleRuleAdded(nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule);
NS_IMETHOD StyleRuleRemoved(nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule);
NS_IMETHOD FlushPendingNotifications(PRBool aFlushReflows = PR_TRUE,
PRBool aUpdateViews = PR_FALSE);
NS_IMETHOD GetAndIncrementContentID(PRInt32* aID);
NS_IMETHOD GetBindingManager(nsIBindingManager** aResult);
NS_IMETHOD GetNodeInfoManager(nsINodeInfoManager*& aNodeInfoManager);
NS_IMETHOD AddReference(void *aKey, nsISupports *aReference);
NS_IMETHOD RemoveReference(void *aKey, nsISupports **aOldReference);
NS_IMETHOD SetContainer(nsISupports *aContainer);
NS_IMETHOD GetContainer(nsISupports **aContainer);
// nsIDOMNode
NS_DECL_NSIDOMNODE
// nsIDOM3Node
NS_DECL_NSIDOM3NODE
// nsIDOMDocument
NS_DECL_NSIDOMDOCUMENT
// nsIDOMXMLDocument
NS_DECL_NSIDOMXMLDOCUMENT
// nsIDOMNSDocument
NS_DECL_NSIDOMNSDOCUMENT
// nsIDOMDocumentEvent
NS_DECL_NSIDOMDOCUMENTEVENT
// nsIDOMDocumentStyle
NS_DECL_NSIDOMDOCUMENTSTYLE
// nsIDOMDocumentView
NS_DECL_NSIDOMDOCUMENTVIEW
// nsIDOMDocumentRange
NS_DECL_NSIDOMDOCUMENTRANGE
// nsIDOMDocumentTraversal
NS_DECL_NSIDOMDOCUMENTTRAVERSAL
// nsIDOMDocumentXBL
NS_DECL_NSIDOMDOCUMENTXBL
// nsIDOMEventReceiver interface
NS_IMETHOD AddEventListenerByIID(nsIDOMEventListener *aListener,
const nsIID& aIID);
NS_IMETHOD RemoveEventListenerByIID(nsIDOMEventListener *aListener,
const nsIID& aIID);
NS_IMETHOD GetListenerManager(nsIEventListenerManager** aInstancePtrResult);
NS_IMETHOD HandleEvent(nsIDOMEvent *aEvent);
// nsIDOMEventTarget interface
NS_IMETHOD AddEventListener(const nsAString& aType,
nsIDOMEventListener* aListener,
PRBool aUseCapture);
NS_IMETHOD RemoveEventListener(const nsAString& aType,
nsIDOMEventListener* aListener,
PRBool aUseCapture);
NS_IMETHOD DispatchEvent(nsIDOMEvent* aEvent, PRBool *_retval);
NS_IMETHOD HandleDOMEvent(nsIPresContext* aPresContext,
nsEvent* aEvent,
nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
nsEventStatus* aEventStatus);
NS_IMETHOD_(PRBool) EventCaptureRegistration(PRInt32 aCapturerIncrement);
NS_IMETHOD SetDocumentURL(nsIURI* aURI);
virtual nsresult Init();
protected:
// subclass hooks for sheet ordering
virtual void InternalAddStyleSheet(nsIStyleSheet* aSheet,
PRUint32 aFlags);
virtual void InternalInsertStyleSheetAt(nsIStyleSheet* aSheet,
PRInt32 aIndex);
nsDocument();
virtual ~nsDocument();
nsIArena* mArena;
nsString mDocumentTitle;
nsIURI* mDocumentURL;
nsCOMPtr<nsIURI> mDocumentBaseURL;
nsIPrincipal* mPrincipal;
nsWeakPtr mDocumentLoadGroup;
nsWeakPtr mDocumentContainer;
nsString mCharacterSet;
PRInt32 mCharacterSetSource;
nsVoidArray mCharSetObservers;
nsIDocument* mParentDocument;
PLDHashTable *mSubDocuments;
nsVoidArray mPresShells;
nsCOMPtr<nsISupportsArray> mChildren; // contains owning references
nsIContent* mRootContent; // a weak reference to the only element in
// mChildren, or null if no such element exists.
nsAutoVoidArray mStyleSheets;
nsAutoVoidArray mObservers; // basically always has at least 1 entry
nsCOMPtr<nsIScriptGlobalObject> mScriptGlobalObject;
nsIEventListenerManager* mListenerManager;
PRBool mInDestructor;
nsCOMPtr<nsIDOMStyleSheetList> mDOMStyleSheets;
nsINameSpaceManager* mNameSpaceManager;
nsCOMPtr<nsIScriptLoader> mScriptLoader;
nsDocHeaderData* mHeaderData;
nsCOMPtr<nsILineBreaker> mLineBreaker;
nsCOMPtr<nsIWordBreaker> mWordBreaker;
nsDocumentChildNodes* mChildNodes;
// A content ID counter used to give a monotonically increasing ID to the content
// objects in the document's content model
PRInt32 mNextContentID;
#ifdef IBMBIDI
PRBool mBidiEnabled;
#endif // IBMBIDI
// disk file members
nsCOMPtr<nsIURI> mDocumentURI;
PRInt32 mModCount;
nsIDTD* mDTD;
nsCOMPtr<nsIBindingManager> mBindingManager;
nsCOMPtr<nsINodeInfoManager> mNodeInfoManager; // OWNER
PRBool mIsGoingAway; // True if the document is being destroyed.
nsSupportsHashtable* mBoxObjectTable;
PRInt32 mNumCapturers; //Number of capturing event handlers in doc. Used to optimize event delivery.
nsSupportsHashtable mContentWrapperHash;
nsCOMPtr<nsICSSLoader> mCSSLoader;
nsWeakPtr mFocusController;
nsString mContentLanguage;
nsString mContentType;
private:
// These are not implemented and not supported.
nsDocument(const nsDocument& aOther);
nsDocument& operator=(const nsDocument& aOther);
nsXPathDocumentTearoff* mXPathDocument;
};
#endif /* nsDocument_h___ */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,445 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.h"
#include "nsIContent.h"
#include "nsIDOMDocumentFragment.h"
#include "nsGenericElement.h"
#include "nsINameSpaceManager.h"
#include "nsINodeInfo.h"
#include "nsNodeInfoManager.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
#include "nsDOMError.h"
class nsDocumentFragment : public nsGenericContainerElement,
public nsIDocumentFragment,
public nsIDOM3Node
{
public:
nsDocumentFragment(nsIDocument* aOwnerDocument);
virtual ~nsDocumentFragment();
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// interface nsIDocumentFragment
NS_IMETHOD DisconnectChildren();
NS_IMETHOD ReconnectChildren();
NS_IMETHOD DropChildReferences();
// interface nsIDOMDocumentFragment
NS_IMETHOD GetNodeName(nsAString& aNodeName)
{ return nsGenericContainerElement::GetNodeName(aNodeName); }
NS_IMETHOD GetNodeValue(nsAString& aNodeValue)
{ return nsGenericContainerElement::GetNodeValue(aNodeValue); }
NS_IMETHOD SetNodeValue(const nsAString& aNodeValue)
{ return nsGenericContainerElement::SetNodeValue(aNodeValue); }
NS_IMETHOD GetNodeType(PRUint16* aNodeType);
NS_IMETHOD GetParentNode(nsIDOMNode** aParentNode)
{ return nsGenericContainerElement::GetParentNode(aParentNode); }
NS_IMETHOD GetChildNodes(nsIDOMNodeList** aChildNodes)
{ return nsGenericContainerElement::GetChildNodes(aChildNodes); }
NS_IMETHOD GetFirstChild(nsIDOMNode** aFirstChild)
{ return nsGenericContainerElement::GetFirstChild(aFirstChild); }
NS_IMETHOD GetLastChild(nsIDOMNode** aLastChild)
{ return nsGenericContainerElement::GetLastChild(aLastChild); }
NS_IMETHOD GetPreviousSibling(nsIDOMNode** aPreviousSibling)
{ return nsGenericContainerElement::GetPreviousSibling(aPreviousSibling); }
NS_IMETHOD GetNextSibling(nsIDOMNode** aNextSibling)
{ return nsGenericContainerElement::GetNextSibling(aNextSibling); }
NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap** aAttributes)
{
*aAttributes = nsnull;
return NS_OK;
}
NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument);
NS_IMETHOD InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild,
nsIDOMNode** aReturn)
{ return nsGenericContainerElement::InsertBefore(aNewChild, aRefChild,
aReturn); }
NS_IMETHOD ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild,
nsIDOMNode** aReturn)
{ return nsGenericContainerElement::ReplaceChild(aNewChild, aOldChild,
aReturn); }
NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn)
{ return nsGenericContainerElement::RemoveChild(aOldChild, aReturn); }
NS_IMETHOD AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn)
{ return nsGenericContainerElement::AppendChild(aNewChild, aReturn); }
NS_IMETHOD HasChildNodes(PRBool* aReturn)
{ return nsGenericContainerElement::HasChildNodes(aReturn); }
NS_IMETHOD HasAttributes(PRBool* aReturn)
{ return nsGenericContainerElement::HasAttributes(aReturn); }
NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn);
NS_IMETHOD GetPrefix(nsAString& aPrefix)
{ return nsGenericContainerElement::GetPrefix(aPrefix); }
NS_IMETHOD SetPrefix(const nsAString& aPrefix);
NS_IMETHOD GetNamespaceURI(nsAString& aNamespaceURI)
{ return nsGenericContainerElement::GetNamespaceURI(aNamespaceURI); }
NS_IMETHOD GetLocalName(nsAString& aLocalName)
{ return nsGenericContainerElement::GetLocalName(aLocalName); }
NS_IMETHOD Normalize()
{ return nsGenericContainerElement::Normalize(); }
NS_IMETHOD IsSupported(const nsAString& aFeature,
const nsAString& aVersion,
PRBool* aReturn)
{ return nsGenericContainerElement::IsSupported(aFeature, aVersion,
aReturn); }
// nsIDOM3Node
NS_IMETHOD GetBaseURI(nsAString& aURI)
{ aURI.Truncate(); return NS_OK; }
NS_IMETHOD CompareTreePosition(nsIDOMNode *aOther, PRUint16* aReturn);
NS_IMETHOD IsSameNode(nsIDOMNode *aOther, PRBool* aReturn);
NS_IMETHOD LookupNamespacePrefix(const nsAString& aNamespaceURI,
nsAString& aPrefix) {
aPrefix.Truncate(); return NS_OK;
}
NS_IMETHOD LookupNamespaceURI(const nsAString& aNamespacePrefix,
nsAString& aNamespaceURI) {
aNamespaceURI.Truncate(); return NS_OK;
}
// nsIContent
NS_IMETHOD SetParent(nsIContent* aParent)
{ return NS_OK; }
NS_IMETHOD SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
const nsAString& aValue,
PRBool aNotify)
{ return NS_OK; }
NS_IMETHOD SetAttr(nsINodeInfo* aNodeInfo,
const nsAString& aValue,
PRBool aNotify)
{ return NS_OK; }
NS_IMETHOD GetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
nsAString& aResult) const
{ return NS_CONTENT_ATTR_NOT_THERE; }
NS_IMETHOD GetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
nsIAtom*& aPrefix, nsAString& aResult) const
{ return NS_CONTENT_ATTR_NOT_THERE; }
NS_IMETHOD UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
PRBool aNotify)
{ return NS_OK; }
NS_IMETHOD GetAttrNameAt(PRInt32 aIndex,
PRInt32& aNameSpaceID,
nsIAtom*& aName,
nsIAtom*& aPrefix) const
{
aName = nsnull;
aPrefix = nsnull;
return NS_ERROR_ILLEGAL_VALUE;
}
NS_IMETHOD HandleDOMEvent(nsIPresContext* aPresContext,
nsEvent* aEvent,
nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG_POINTER(aEventStatus);
*aEventStatus = nsEventStatus_eIgnore;
return NS_OK;
}
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const {
if (!aResult) {
return NS_ERROR_NULL_POINTER;
}
*aResult = sizeof(*this);
return NS_OK;
}
#endif
protected:
nsCOMPtr<nsIDocument> mOwnerDocument;
};
nsresult
NS_NewDocumentFragment(nsIDOMDocumentFragment** aInstancePtrResult,
nsIDocument* aOwnerDocument)
{
NS_ENSURE_ARG_POINTER(aInstancePtrResult);
nsCOMPtr<nsINodeInfoManager> nimgr;
nsCOMPtr<nsINodeInfo> nodeInfo;
nsresult rv;
if (aOwnerDocument) {
rv = aOwnerDocument->GetNodeInfoManager(*getter_AddRefs(nimgr));
} else {
rv = nsNodeInfoManager::GetAnonymousManager(*getter_AddRefs(nimgr));
}
NS_ENSURE_SUCCESS(rv, rv);
rv = nimgr->GetNodeInfo(NS_LITERAL_STRING("#document-fragment"),
nsnull, kNameSpaceID_None,
*getter_AddRefs(nodeInfo));
NS_ENSURE_SUCCESS(rv, rv);
nsDocumentFragment* it = new nsDocumentFragment(aOwnerDocument);
if (!it) {
return NS_ERROR_OUT_OF_MEMORY;
}
rv = it->Init(nodeInfo);
if (NS_FAILED(rv)) {
delete it;
return rv;
}
*aInstancePtrResult = NS_STATIC_CAST(nsIDOMDocumentFragment *, it);
NS_ADDREF(*aInstancePtrResult);
return NS_OK;
}
nsDocumentFragment::nsDocumentFragment(nsIDocument* aOwnerDocument)
{
mOwnerDocument = aOwnerDocument;
}
nsDocumentFragment::~nsDocumentFragment()
{
}
// QueryInterface implementation for nsDocumentFragment
NS_INTERFACE_MAP_BEGIN(nsDocumentFragment)
NS_INTERFACE_MAP_ENTRY(nsIDocumentFragment)
NS_INTERFACE_MAP_ENTRY(nsIDOMDocumentFragment)
NS_INTERFACE_MAP_ENTRY(nsIDOMNode)
NS_INTERFACE_MAP_ENTRY(nsIDOM3Node)
NS_INTERFACE_MAP_ENTRY(nsIContent)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIContent)
NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(DocumentFragment)
NS_INTERFACE_MAP_END
NS_IMPL_ADDREF(nsDocumentFragment)
NS_IMPL_RELEASE(nsDocumentFragment)
NS_IMETHODIMP
nsDocumentFragment::DisconnectChildren()
{
nsCOMPtr<nsIContent> child;
PRInt32 i, count;
ChildCount(count);
for (i = 0; i < count; i++) {
ChildAt(i, *getter_AddRefs(child));
NS_ASSERTION(child, "Bad content container");
child->SetParent(nsnull);
}
return NS_OK;
}
NS_IMETHODIMP
nsDocumentFragment::ReconnectChildren()
{
nsCOMPtr<nsIContent> child, parent;
PRInt32 i, count = 0;
ChildCount(count);
for (i = 0; i < count; i++) {
ChildAt(i, *getter_AddRefs(child));
NS_ASSERTION(child, "Bad content container");
child->GetParent(*getter_AddRefs(parent));
if (parent) {
PRInt32 indx = -1;
// This is potentially a O(n**2) operation, but it should only
// happen in error cases (such as out of memory or something
// similar) so we don't care for now.
parent->IndexOf(child, indx);
if (indx >= 0) {
parent->RemoveChildAt(indx, PR_TRUE);
}
}
child->SetParent(this);
}
return NS_OK;
}
NS_IMETHODIMP
nsDocumentFragment::DropChildReferences()
{
mChildren.Clear();
return NS_OK;
}
NS_IMETHODIMP
nsDocumentFragment::GetNodeType(PRUint16* aNodeType)
{
*aNodeType = (PRUint16)nsIDOMNode::DOCUMENT_FRAGMENT_NODE;
return NS_OK;
}
NS_IMETHODIMP
nsDocumentFragment::GetOwnerDocument(nsIDOMDocument** aOwnerDocument)
{
NS_ENSURE_ARG_POINTER(aOwnerDocument);
if (!mOwnerDocument) {
*aOwnerDocument = nsnull;
return NS_OK;
}
return mOwnerDocument->QueryInterface(NS_GET_IID(nsIDOMDocument),
(void **)aOwnerDocument);
}
NS_IMETHODIMP
nsDocumentFragment::SetPrefix(const nsAString& aPrefix)
{
return NS_ERROR_DOM_NAMESPACE_ERR;
}
NS_IMETHODIMP
nsDocumentFragment::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
{
NS_ENSURE_ARG_POINTER(aReturn);
*aReturn = nsnull;
nsresult rv = NS_OK;
nsCOMPtr<nsIDOMDocumentFragment> newFragment;
rv = NS_NewDocumentFragment(getter_AddRefs(newFragment), mOwnerDocument);
NS_ENSURE_SUCCESS(rv, rv);
if (aDeep) {
nsCOMPtr<nsIDOMNodeList> childNodes;
GetChildNodes(getter_AddRefs(childNodes));
if (childNodes) {
PRUint32 index, count;
childNodes->GetLength(&count);
for (index = 0; index < count; ++index) {
nsCOMPtr<nsIDOMNode> child;
childNodes->Item(index, getter_AddRefs(child));
if (child) {
nsCOMPtr<nsIDOMNode> newChild;
rv = child->CloneNode(PR_TRUE, getter_AddRefs(newChild));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDOMNode> dummyNode;
rv = newFragment->AppendChild(newChild,
getter_AddRefs(dummyNode));
NS_ENSURE_SUCCESS(rv, rv);
}
} // End of for loop
} // if (childNodes)
} // if (aDeep)
return CallQueryInterface(newFragment, aReturn);
}
NS_IMETHODIMP
nsDocumentFragment::CompareTreePosition(nsIDOMNode* aOther,
PRUint16* aReturn)
{
NS_ENSURE_ARG_POINTER(aOther);
PRUint32 mask = nsIDOMNode::TREE_POSITION_DISCONNECTED;
PRBool sameNode = PR_FALSE;
IsSameNode(aOther, &sameNode);
if (sameNode) {
mask |= nsIDOMNode::TREE_POSITION_SAME_NODE;
}
else {
nsCOMPtr<nsIDOMNode> other(aOther);
while (other) {
IsSameNode(other, &sameNode);
if (sameNode) {
mask |= nsIDOMNode::TREE_POSITION_DESCENDANT;
break;
}
nsCOMPtr<nsIDOMNode> tmp(other);
tmp->GetParentNode(getter_AddRefs(other));
if (!other) {
// No parent. Check to see if we're at an attribute node.
PRUint16 nodeType = 0;
tmp->GetNodeType(&nodeType);
if (nodeType == nsIDOMNode::ATTRIBUTE_NODE) {
// If we are, let's get the owner element and continue up the tree
nsCOMPtr<nsIDOMAttr> attr(do_QueryInterface(tmp));
nsCOMPtr<nsIDOMElement> owner;
attr->GetOwnerElement(getter_AddRefs(owner));
other = do_QueryInterface(owner);
continue;
}
break;
}
}
}
*aReturn = mask;
return NS_OK;
}
NS_IMETHODIMP
nsDocumentFragment::IsSameNode(nsIDOMNode* aOther,
PRBool* aReturn)
{
PRBool sameNode = PR_FALSE;
if (this == aOther) {
sameNode = PR_TRUE;
}
*aReturn = sameNode;
return NS_OK;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,507 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Johnny Stenback <jst@netscape.com> (original author)
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsIFrameLoader.h"
#include "nsIDOMHTMLIFrameElement.h"
#include "nsIDOMHTMLFrameElement.h"
#include "nsIDOMWindow.h"
#include "nsIPresContext.h"
#include "nsIPresShell.h"
#include "nsIContent.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
#include "nsIDOMWindow.h"
#include "nsPIDOMWindow.h"
#include "nsIWebNavigation.h"
#include "nsIChromeEventHandler.h"
#include "nsIDocShell.h"
#include "nsIDocShellTreeItem.h"
#include "nsIDocShellTreeNode.h"
#include "nsIDocShellTreeOwner.h"
#include "nsIDocShellLoadInfo.h"
#include "nsIBaseWindow.h"
#include "nsIWebShell.h"
#include "nsIScriptSecurityManager.h"
#include "nsICodebasePrincipal.h"
#include "nsIURI.h"
#include "nsNetUtil.h"
#include "nsHTMLAtoms.h"
#include "nsINameSpaceManager.h"
// Bug 8065: Limit content frame depth to some reasonable level. This
// does not count chrome frames when determining depth, nor does it
// prevent chrome recursion.
#define MAX_DEPTH_CONTENT_FRAMES 8
class nsFrameLoader : public nsIFrameLoader
{
public:
nsFrameLoader();
virtual ~nsFrameLoader();
// nsISupports
NS_DECL_ISUPPORTS
// nsIFrameLoader
NS_IMETHOD Init(nsIContent *aOwner);
NS_IMETHOD LoadFrame();
NS_IMETHOD GetDocShell(nsIDocShell **aDocShell);
NS_IMETHOD Destroy();
protected:
nsresult GetPresContext(nsIPresContext **aPresContext);
nsresult EnsureDocShell();
void GetURL(nsAString& aURL);
nsCOMPtr<nsIDocShell> mDocShell;
nsIContent *mOwnerContent; // WEAK
};
nsresult
NS_NewFrameLoader(nsIFrameLoader **aFrameLoader)
{
*aFrameLoader = new nsFrameLoader();
NS_ENSURE_TRUE(*aFrameLoader, NS_ERROR_OUT_OF_MEMORY);
NS_ADDREF(*aFrameLoader);
return NS_OK;
}
nsFrameLoader::nsFrameLoader()
: mOwnerContent(nsnull)
{
NS_INIT_ISUPPORTS();
}
nsFrameLoader::~nsFrameLoader()
{
Destroy();
}
// QueryInterface implementation for nsFrameLoader
NS_INTERFACE_MAP_BEGIN(nsFrameLoader)
NS_INTERFACE_MAP_ENTRY(nsIFrameLoader)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END
NS_IMPL_ADDREF(nsFrameLoader);
NS_IMPL_RELEASE(nsFrameLoader);
NS_IMETHODIMP
nsFrameLoader::Init(nsIContent *aOwner)
{
mOwnerContent = aOwner; // WEAK
return NS_OK;
}
NS_IMETHODIMP
nsFrameLoader::LoadFrame()
{
NS_ENSURE_TRUE(mOwnerContent, NS_ERROR_NOT_INITIALIZED);
nsresult rv = EnsureDocShell();
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDocument> doc;
mOwnerContent->GetDocument(*getter_AddRefs(doc));
if (!doc) {
return NS_OK;
}
nsAutoString src;
GetURL(src);
src.Trim(" \t\n\r");
if (src.IsEmpty()) {
src.Assign(NS_LITERAL_STRING("about:blank"));
}
// Make an absolute URI
nsCOMPtr<nsIURI> base_uri;
doc->GetBaseURL(*getter_AddRefs(base_uri));
nsAutoString doc_charset;
doc->GetDocumentCharacterSet(doc_charset);
nsCOMPtr<nsIURI> uri;
rv = NS_NewURI(getter_AddRefs(uri), src,
doc_charset.IsEmpty() ? nsnull :
NS_ConvertUCS2toUTF8(doc_charset).get(), base_uri);
NS_ENSURE_SUCCESS(rv, rv);
// Check for security
nsCOMPtr<nsIScriptSecurityManager> secMan =
do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDocShellLoadInfo> loadInfo;
mDocShell->CreateLoadInfo(getter_AddRefs(loadInfo));
NS_ENSURE_TRUE(loadInfo, NS_ERROR_FAILURE);
// Get referring URL
nsCOMPtr<nsIURI> referrer;
nsCOMPtr<nsIPrincipal> principal;
rv = secMan->GetSubjectPrincipal(getter_AddRefs(principal));
NS_ENSURE_SUCCESS(rv, rv);
// If we were called from script, get the referring URL from the script
if (principal) {
nsCOMPtr<nsICodebasePrincipal> codebase(do_QueryInterface(principal));
if (codebase) {
rv = codebase->GetURI(getter_AddRefs(referrer));
NS_ENSURE_SUCCESS(rv, rv);
}
// Pass the script principal to the docshell
loadInfo->SetOwner(principal);
}
if (!referrer) {
// We're not being called form script, tell the docshell
// to inherit an owner from the current document.
loadInfo->SetInheritOwner(PR_TRUE);
referrer = base_uri;
}
loadInfo->SetReferrer(referrer);
// Check if we are allowed to load absURL
rv = secMan->CheckLoadURI(referrer, uri,
nsIScriptSecurityManager::STANDARD);
if (NS_FAILED(rv)) {
return rv; // We're not
}
// Kick off the load...
rv = mDocShell->LoadURI(uri, loadInfo, nsIWebNavigation::LOAD_FLAGS_NONE,
PR_FALSE);
NS_ASSERTION(NS_SUCCEEDED(rv), "failed to load URL");
return rv;
}
NS_IMETHODIMP
nsFrameLoader::GetDocShell(nsIDocShell **aDocShell)
{
*aDocShell = nsnull;
nsresult rv = EnsureDocShell();
NS_ENSURE_SUCCESS(rv, rv);
*aDocShell = mDocShell;
NS_IF_ADDREF(*aDocShell);
return NS_OK;
}
NS_IMETHODIMP
nsFrameLoader::Destroy()
{
if (mOwnerContent) {
nsCOMPtr<nsIDocument> doc;
mOwnerContent->GetDocument(*getter_AddRefs(doc));
if (doc) {
doc->SetSubDocumentFor(mOwnerContent, nsnull);
}
mOwnerContent = nsnull;
}
nsCOMPtr<nsIBaseWindow> base_win(do_QueryInterface(mDocShell));
if (base_win) {
base_win->Destroy();
}
mDocShell = nsnull;
return NS_OK;
}
nsresult
nsFrameLoader::GetPresContext(nsIPresContext **aPresContext)
{
*aPresContext = nsnull;
nsCOMPtr<nsIDocument> doc;
mOwnerContent->GetDocument(*getter_AddRefs(doc));
while (doc) {
nsCOMPtr<nsIPresShell> presShell;
doc->GetShellAt(0, getter_AddRefs(presShell));
if (presShell) {
presShell->GetPresContext(aPresContext);
return NS_OK;
}
nsCOMPtr<nsIDocument> parent;
doc->GetParentDocument(getter_AddRefs(parent));
doc = parent;
}
return NS_OK;
}
nsresult
nsFrameLoader::EnsureDocShell()
{
if (mDocShell) {
return NS_OK;
}
nsCOMPtr<nsIPresContext> presContext;
GetPresContext(getter_AddRefs(presContext));
NS_ENSURE_TRUE(presContext, NS_ERROR_UNEXPECTED);
// Bug 8065: Don't exceed some maximum depth in content frames
// (MAX_DEPTH_CONTENT_FRAMES)
PRInt32 depth = 0;
nsCOMPtr<nsISupports> parentAsSupports;
presContext->GetContainer(getter_AddRefs(parentAsSupports));
if (parentAsSupports) {
nsCOMPtr<nsIDocShellTreeItem> parentAsItem =
do_QueryInterface(parentAsSupports);
while (parentAsItem) {
++depth;
if (MAX_DEPTH_CONTENT_FRAMES < depth) {
NS_WARNING("Too many nested content frames so giving up");
return NS_ERROR_UNEXPECTED; // Too deep, give up! (silently?)
}
// Only count depth on content, not chrome.
// If we wanted to limit total depth, skip the following check:
PRInt32 parentType;
parentAsItem->GetItemType(&parentType);
if (nsIDocShellTreeItem::typeContent == parentType) {
nsIDocShellTreeItem* temp = parentAsItem;
temp->GetParent(getter_AddRefs(parentAsItem));
} else {
break; // we have exited content, stop counting, depth is OK!
}
}
}
// Create the docshell...
mDocShell = do_CreateInstance("@mozilla.org/webshell;1");
NS_ENSURE_TRUE(mDocShell, NS_ERROR_FAILURE);
// Get the frame name and tell the docshell about it.
nsCOMPtr<nsIDocShellTreeItem> docShellAsItem(do_QueryInterface(mDocShell));
NS_ENSURE_TRUE(docShellAsItem, NS_ERROR_FAILURE);
nsAutoString frameName;
mOwnerContent->GetAttr(kNameSpaceID_None, nsHTMLAtoms::name, frameName);
if (!frameName.IsEmpty()) {
docShellAsItem->SetName(frameName.get());
}
// If our container is a web-shell, inform it that it has a new
// child. If it's not a web-shell then some things will not operate
// properly.
nsCOMPtr<nsISupports> container;
presContext->GetContainer(getter_AddRefs(container));
nsCOMPtr<nsIDocShellTreeNode> parentAsNode(do_QueryInterface(container));
if (parentAsNode) {
nsCOMPtr<nsIDocShellTreeItem> parentAsItem =
do_QueryInterface(parentAsNode);
PRInt32 parentType;
parentAsItem->GetItemType(&parentType);
nsAutoString value;
PRBool isContent;
isContent = PR_FALSE;
if (mOwnerContent->IsContentOfType(nsIContent::eXUL)) {
mOwnerContent->GetAttr(kNameSpaceID_None, nsHTMLAtoms::type, value);
}
// we accept "content" and "content-xxx" values.
// at time of writing, we expect "xxx" to be "primary", but
// someday it might be an integer expressing priority
if (value.Length() >= 7) {
// Lowercase the value, ContentShellAdded() further down relies
// on it being lowercased.
ToLowerCase(value);
nsAutoString::const_iterator start, end;
value.BeginReading(start);
value.EndReading(end);
nsAutoString::const_iterator iter(start);
iter.advance(7);
const nsAString& valuePiece = Substring(start, iter);
if (valuePiece.Equals(NS_LITERAL_STRING("content")) &&
(iter == end || *iter == '-')) {
isContent = PR_TRUE;
}
}
if (isContent) {
// The web shell's type is content.
docShellAsItem->SetItemType(nsIDocShellTreeItem::typeContent);
} else {
// Inherit our type from our parent webshell. If it is
// chrome, we'll be chrome. If it is content, we'll be
// content.
docShellAsItem->SetItemType(parentType);
}
parentAsNode->AddChild(docShellAsItem);
if (isContent) {
nsCOMPtr<nsIDocShellTreeOwner> parentTreeOwner;
parentAsItem->GetTreeOwner(getter_AddRefs(parentTreeOwner));
if(parentTreeOwner) {
PRBool is_primary = value.Equals(NS_LITERAL_STRING("content-primary"));
parentTreeOwner->ContentShellAdded(docShellAsItem, is_primary,
value.get());
}
}
// connect the container...
nsCOMPtr<nsIWebShell> webShell(do_QueryInterface(mDocShell));
nsCOMPtr<nsIWebShellContainer> outerContainer =
do_QueryInterface(container);
if (outerContainer) {
webShell->SetContainer(outerContainer);
}
// Make sure all shells have links back to the content element
// in the nearest enclosing chrome shell.
nsCOMPtr<nsIChromeEventHandler> chromeEventHandler;
if (parentType == nsIDocShellTreeItem::typeChrome) {
// Our parent shell is a chrome shell. It is therefore our nearest
// enclosing chrome shell.
chromeEventHandler = do_QueryInterface(mOwnerContent);
NS_WARN_IF_FALSE(chromeEventHandler,
"This mContent should implement this.");
} else {
nsCOMPtr<nsIDocShell> parentShell(do_QueryInterface(parentAsNode));
// Our parent shell is a content shell. Get the chrome event
// handler from it and use that for our shell as well.
parentShell->GetChromeEventHandler(getter_AddRefs(chromeEventHandler));
}
mDocShell->SetChromeEventHandler(chromeEventHandler);
}
// This is nasty, this code (the do_GetInterface(mDocShell) below)
// *must* come *after* the above call to
// mDocShell->SetChromeEventHandler() for the global window to get
// the right chrome event handler.
// Tell the window about the frame that hosts it.
nsCOMPtr<nsIDOMElement> frame_element(do_QueryInterface(mOwnerContent));
NS_ASSERTION(frame_element, "frame loader owner element not a DOM element!");
nsCOMPtr<nsIDOMWindow> win(do_GetInterface(mDocShell));
nsCOMPtr<nsPIDOMWindow> win_private(do_QueryInterface(win));
NS_ENSURE_TRUE(win_private, NS_ERROR_UNEXPECTED);
win_private->SetFrameElementInternal(frame_element);
nsCOMPtr<nsIBaseWindow> base_win(do_QueryInterface(mDocShell));
NS_ENSURE_TRUE(base_win, NS_ERROR_UNEXPECTED);
// This is kinda whacky, this call doesn't really create anything,
// but it must be called to make sure things are properly
// initialized
base_win->Create();
return NS_OK;
}
void
nsFrameLoader::GetURL(nsAString& aURI)
{
aURI.Truncate();
nsCOMPtr<nsIAtom> type;
mOwnerContent->GetTag(*getter_AddRefs(type));
if (type == nsHTMLAtoms::object) {
mOwnerContent->GetAttr(kNameSpaceID_None, nsHTMLAtoms::data, aURI);
} else {
mOwnerContent->GetAttr(kNameSpaceID_None, nsHTMLAtoms::src, aURI);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,22 @@
#include "nscore.h"
#include "nsCaretProperties.h"
//-----------------------------------------------------------------------------
nsCaretProperties::nsCaretProperties()
: mCaretWidth(eDefaultCaretWidth)
, mBlinkRate(eDefaulBlinkRate)
{
// in your platform-specific class, get data from the OS in your constructor
}
//-----------------------------------------------------------------------------
nsCaretProperties* NewCaretProperties()
{
return new nsCaretProperties();
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,409 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsGenericDOMDataNode_h___
#define nsGenericDOMDataNode_h___
#include "nsITextContent.h"
#include "nsIDOMCharacterData.h"
#include "nsIDOMEventReceiver.h"
#include "nsTextFragment.h"
#include "nsVoidArray.h"
#include "nsDOMError.h"
#include "nsIEventListenerManager.h"
#include "nsGenericElement.h"
class nsIDOMAttr;
class nsIDOMEventListener;
class nsIDOMNodeList;
class nsIFrame;
class nsIDOMText;
class nsINodeInfo;
#define PARENT_BIT_RANGELISTS ((PtrBits)0x1 << 0)
#define PARENT_BIT_LISTENERMANAGER ((PtrBits)0x1 << 1)
#define PARENT_BIT_MASK (PARENT_BIT_RANGELISTS | \
PARENT_BIT_LISTENERMANAGER)
class nsGenericDOMDataNode : public nsITextContent
{
public:
NS_DECL_ISUPPORTS
nsGenericDOMDataNode();
virtual ~nsGenericDOMDataNode();
// Implementation for nsIDOMNode
nsresult GetNodeValue(nsAString& aNodeValue);
nsresult SetNodeValue(const nsAString& aNodeValue);
nsresult GetParentNode(nsIDOMNode** aParentNode);
nsresult GetAttributes(nsIDOMNamedNodeMap** aAttributes)
{
NS_ENSURE_ARG_POINTER(aAttributes);
*aAttributes = nsnull;
return NS_OK;
}
nsresult GetPreviousSibling(nsIDOMNode** aPreviousSibling);
nsresult GetNextSibling(nsIDOMNode** aNextSibling);
nsresult GetChildNodes(nsIDOMNodeList** aChildNodes);
nsresult HasChildNodes(PRBool* aHasChildNodes)
{
NS_ENSURE_ARG_POINTER(aHasChildNodes);
*aHasChildNodes = PR_FALSE;
return NS_OK;
}
nsresult HasAttributes(PRBool* aHasAttributes)
{
NS_ENSURE_ARG_POINTER(aHasAttributes);
*aHasAttributes = PR_FALSE;
return NS_OK;
}
nsresult GetFirstChild(nsIDOMNode** aFirstChild)
{
NS_ENSURE_ARG_POINTER(aFirstChild);
*aFirstChild = nsnull;
return NS_OK;
}
nsresult GetLastChild(nsIDOMNode** aLastChild)
{
NS_ENSURE_ARG_POINTER(aLastChild);
*aLastChild = nsnull;
return NS_OK;
}
nsresult InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild,
nsIDOMNode** aReturn)
{
NS_ENSURE_ARG_POINTER(aReturn);
*aReturn = nsnull;
return NS_ERROR_DOM_HIERARCHY_REQUEST_ERR;
}
nsresult ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild,
nsIDOMNode** aReturn)
{
NS_ENSURE_ARG_POINTER(aReturn);
*aReturn = nsnull;
/*
* Data nodes can't have children.
*/
return NS_ERROR_DOM_HIERARCHY_REQUEST_ERR;
}
nsresult RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn)
{
NS_ENSURE_ARG_POINTER(aReturn);
*aReturn = nsnull;
/*
* Data nodes can't have children, i.e. aOldChild can't be a child of
* this node.
*/
return NS_ERROR_DOM_NOT_FOUND_ERR;
}
nsresult AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn)
{
NS_ENSURE_ARG_POINTER(aReturn);
*aReturn = nsnull;
return NS_ERROR_DOM_HIERARCHY_REQUEST_ERR;
}
nsresult GetOwnerDocument(nsIDOMDocument** aOwnerDocument);
nsresult GetNamespaceURI(nsAString& aNamespaceURI);
nsresult GetLocalName(nsAString& aLocalName);
nsresult GetPrefix(nsAString& aPrefix);
nsresult SetPrefix(const nsAString& aPrefix);
nsresult Normalize();
nsresult IsSupported(const nsAString& aFeature,
const nsAString& aVersion,
PRBool* aReturn);
nsresult GetBaseURI(nsAString& aURI);
nsresult LookupNamespacePrefix(const nsAString& aNamespaceURI,
nsAString& aPrefix);
nsresult LookupNamespaceURI(const nsAString& aNamespacePrefix,
nsAString& aNamespaceURI);
// Implementation for nsIDOMCharacterData
nsresult GetData(nsAString& aData);
nsresult SetData(const nsAString& aData);
nsresult GetLength(PRUint32* aLength);
nsresult SubstringData(PRUint32 aOffset, PRUint32 aCount,
nsAString& aReturn);
nsresult AppendData(const nsAString& aArg);
nsresult InsertData(PRUint32 aOffset, const nsAString& aArg);
nsresult DeleteData(PRUint32 aOffset, PRUint32 aCount);
nsresult ReplaceData(PRUint32 aOffset, PRUint32 aCount,
const nsAString& aArg);
// Implementation for nsIContent
NS_IMETHOD GetDocument(nsIDocument*& aResult) const;
NS_IMETHOD SetDocument(nsIDocument* aDocument, PRBool aDeep,
PRBool aCompileEventHandlers);
NS_IMETHOD GetParent(nsIContent*& aResult) const;
NS_IMETHOD SetParent(nsIContent* aParent);
NS_IMETHOD GetNameSpaceID(PRInt32& aID) const;
NS_IMETHOD NormalizeAttrString(const nsAString& aStr,
nsINodeInfo*& aNodeInfo);
NS_IMETHOD SetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
const nsAString& aValue, PRBool aNotify);
NS_IMETHOD SetAttr(nsINodeInfo *aNodeInfo,
const nsAString& aValue, PRBool aNotify);
NS_IMETHOD UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
PRBool aNotify);
NS_IMETHOD GetAttr(PRInt32 aNameSpaceID, nsIAtom *aAttribute,
nsAString& aResult) const;
NS_IMETHOD GetAttr(PRInt32 aNameSpaceID, nsIAtom *aAttribute,
nsIAtom*& aPrefix, nsAString& aResult) const;
NS_IMETHOD_(PRBool) HasAttr(PRInt32 aNameSpaceID, nsIAtom *aAttribute) const;
NS_IMETHOD GetAttrNameAt(PRInt32 aIndex, PRInt32& aNameSpaceID,
nsIAtom*& aName, nsIAtom*& aPrefix) const;
NS_IMETHOD GetAttrCount(PRInt32& aResult) const;
#ifdef DEBUG
NS_IMETHOD List(FILE* out, PRInt32 aIndent) const;
NS_IMETHOD DumpContent(FILE* out, PRInt32 aIndent, PRBool aDumpAll) const;
#endif
NS_IMETHOD HandleDOMEvent(nsIPresContext* aPresContext, nsEvent* aEvent,
nsIDOMEvent** aDOMEvent, PRUint32 aFlags,
nsEventStatus* aEventStatus);
NS_IMETHOD GetContentID(PRUint32* aID);
NS_IMETHOD SetContentID(PRUint32 aID);
NS_IMETHOD RangeAdd(nsIDOMRange* aRange);
NS_IMETHOD RangeRemove(nsIDOMRange* aRange);
NS_IMETHOD GetRangeList(nsVoidArray*& aResult) const;
NS_IMETHOD SetFocus(nsIPresContext *aPresContext);
NS_IMETHOD RemoveFocus(nsIPresContext *aPresContext);
NS_IMETHOD GetBindingParent(nsIContent** aContent);
NS_IMETHOD SetBindingParent(nsIContent* aParent);
NS_IMETHOD_(PRBool) IsContentOfType(PRUint32 aFlags);
NS_IMETHOD GetListenerManager(nsIEventListenerManager** aInstancePtrResult);
NS_IMETHOD DoneCreatingElement();
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
NS_IMETHOD GetNodeInfo(nsINodeInfo*& aResult) const;
NS_IMETHOD CanContainChildren(PRBool& aResult) const;
NS_IMETHOD ChildCount(PRInt32& aResult) const;
NS_IMETHOD ChildAt(PRInt32 aIndex, nsIContent*& aResult) const;
NS_IMETHOD IndexOf(nsIContent* aPossibleChild, PRInt32& aResult) const;
NS_IMETHOD InsertChildAt(nsIContent* aKid, PRInt32 aIndex, PRBool aNotify,
PRBool aDeepSetDocument);
NS_IMETHOD ReplaceChildAt(nsIContent* aKid, PRInt32 aIndex, PRBool aNotify,
PRBool aDeepSetDocument);
NS_IMETHOD AppendChildTo(nsIContent* aKid, PRBool aNotify,
PRBool aDeepSetDocument);
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify);
// nsITextContent
NS_IMETHOD SplitText(PRUint32 aOffset, nsIDOMText** aReturn);
NS_IMETHOD GetText(const nsTextFragment** aFragmentsResult);
NS_IMETHOD GetTextLength(PRInt32* aLengthResult);
NS_IMETHOD CopyText(nsAString& aResult);
NS_IMETHOD SetText(const PRUnichar* aBuffer, PRInt32 aLength,
PRBool aNotify);
NS_IMETHOD SetText(const nsAString& aStr, PRBool aNotify);
NS_IMETHOD SetText(const char* aBuffer, PRInt32 aLength, PRBool aNotify);
NS_IMETHOD IsOnlyWhitespace(PRBool* aResult);
NS_IMETHOD CloneContent(PRBool aCloneText, nsITextContent** aClone);
//----------------------------------------
#ifdef DEBUG
void ToCString(nsAString& aBuf, PRInt32 aOffset, PRInt32 aLen) const;
#endif
static void Shutdown();
protected:
nsIContent *GetParentWeak() const
{
PtrBits bits = mParentPtrBits & ~PARENT_BIT_MASK;
return NS_REINTERPRET_CAST(nsIContent *, bits);
}
nsTextFragment mText;
nsIDocument* mDocument; // WEAK
private:
void LookupListenerManager(nsIEventListenerManager **aListenerManager) const;
nsVoidArray *LookupRangeList() const;
#ifdef IBMBIDI
void SetBidiStatus();
#endif
typedef long PtrBits;
void SetHasRangeList(PRBool aHasRangeList)
{
if (aHasRangeList) {
mParentPtrBits |= PARENT_BIT_RANGELISTS;
} else {
mParentPtrBits &= ~PARENT_BIT_RANGELISTS;
}
}
void SetHasEventListenerManager(PRBool aHasRangeList)
{
if (aHasRangeList) {
mParentPtrBits |= PARENT_BIT_LISTENERMANAGER;
} else {
mParentPtrBits &= ~PARENT_BIT_LISTENERMANAGER;
}
}
PRBool HasRangeList() const
{
return mParentPtrBits & PARENT_BIT_RANGELISTS;
}
PRBool HasEventListenerManager() const
{
return mParentPtrBits & PARENT_BIT_LISTENERMANAGER;
}
// Weak parent pointer (nsIContent *) and bits for knowing if
// there's a rangelist or listener manager for this node
PtrBits mParentPtrBits;
};
//----------------------------------------------------------------------
/**
* Mostly implement the nsIDOMNode API by forwarding the methods to a
* generic content object (either nsGenericHTMLLeafElement or
* nsGenericHTMLContainerContent)
*
* Note that classes using this macro will need to implement:
* NS_IMETHOD GetNodeType(PRUint16* aNodeType);
* NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn);
*/
#define NS_IMPL_NSIDOMNODE_USING_GENERIC_DOM_DATA \
NS_IMETHOD GetNodeName(nsAString& aNodeName); \
NS_IMETHOD GetLocalName(nsAString& aLocalName) { \
return nsGenericDOMDataNode::GetLocalName(aLocalName); \
} \
NS_IMETHOD GetNodeValue(nsAString& aNodeValue) { \
return nsGenericDOMDataNode::GetNodeValue(aNodeValue); \
} \
NS_IMETHOD SetNodeValue(const nsAString& aNodeValue) { \
return nsGenericDOMDataNode::SetNodeValue(aNodeValue); \
} \
NS_IMETHOD GetNodeType(PRUint16* aNodeType); \
NS_IMETHOD GetParentNode(nsIDOMNode** aParentNode) { \
return nsGenericDOMDataNode::GetParentNode(aParentNode); \
} \
NS_IMETHOD GetChildNodes(nsIDOMNodeList** aChildNodes) { \
return nsGenericDOMDataNode::GetChildNodes(aChildNodes); \
} \
NS_IMETHOD HasChildNodes(PRBool* aHasChildNodes) { \
return nsGenericDOMDataNode::HasChildNodes(aHasChildNodes); \
} \
NS_IMETHOD HasAttributes(PRBool* aHasAttributes) { \
return nsGenericDOMDataNode::HasAttributes(aHasAttributes); \
} \
NS_IMETHOD GetFirstChild(nsIDOMNode** aFirstChild) { \
return nsGenericDOMDataNode::GetFirstChild(aFirstChild); \
} \
NS_IMETHOD GetLastChild(nsIDOMNode** aLastChild) { \
return nsGenericDOMDataNode::GetLastChild(aLastChild); \
} \
NS_IMETHOD GetPreviousSibling(nsIDOMNode** aPreviousSibling) { \
return nsGenericDOMDataNode::GetPreviousSibling(aPreviousSibling); \
} \
NS_IMETHOD GetNextSibling(nsIDOMNode** aNextSibling) { \
return nsGenericDOMDataNode::GetNextSibling(aNextSibling); \
} \
NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap** aAttributes) { \
return nsGenericDOMDataNode::GetAttributes(aAttributes); \
} \
NS_IMETHOD InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, \
nsIDOMNode** aReturn) { \
return nsGenericDOMDataNode::InsertBefore(aNewChild, aRefChild, \
aReturn); \
} \
NS_IMETHOD AppendChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn) { \
return nsGenericDOMDataNode::AppendChild(aOldChild, aReturn); \
} \
NS_IMETHOD ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild, \
nsIDOMNode** aReturn) { \
return nsGenericDOMDataNode::ReplaceChild(aNewChild, aOldChild, \
aReturn); \
} \
NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn) { \
return nsGenericDOMDataNode::RemoveChild(aOldChild, aReturn); \
} \
NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument) { \
return nsGenericDOMDataNode::GetOwnerDocument(aOwnerDocument); \
} \
NS_IMETHOD GetNamespaceURI(nsAString& aNamespaceURI) { \
return nsGenericDOMDataNode::GetNamespaceURI(aNamespaceURI); \
} \
NS_IMETHOD GetPrefix(nsAString& aPrefix) { \
return nsGenericDOMDataNode::GetPrefix(aPrefix); \
} \
NS_IMETHOD SetPrefix(const nsAString& aPrefix) { \
return nsGenericDOMDataNode::SetPrefix(aPrefix); \
} \
NS_IMETHOD Normalize() { \
return NS_OK; \
} \
NS_IMETHOD IsSupported(const nsAString& aFeature, \
const nsAString& aVersion, \
PRBool* aReturn) { \
return nsGenericDOMDataNode::IsSupported(aFeature, aVersion, aReturn); \
} \
NS_IMETHOD GetBaseURI(nsAString& aURI) { \
return nsGenericDOMDataNode::GetBaseURI(aURI); \
} \
NS_IMETHOD LookupNamespacePrefix(const nsAString& aNamespaceURI, \
nsAString& aPrefix) { \
return nsGenericDOMDataNode::LookupNamespacePrefix(aNamespaceURI, \
aPrefix); \
} \
NS_IMETHOD LookupNamespaceURI(const nsAString& aNamespacePrefix, \
nsAString& aNamespaceURI) { \
return nsGenericDOMDataNode::LookupNamespaceURI(aNamespacePrefix, \
aNamespaceURI); \
} \
NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn);
#endif /* nsGenericDOMDataNode_h___ */

View File

@@ -0,0 +1,63 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsGenericDOMNodeList.h"
#include "nsGenericElement.h"
nsGenericDOMNodeList::nsGenericDOMNodeList()
{
NS_INIT_REFCNT();
}
nsGenericDOMNodeList::~nsGenericDOMNodeList()
{
}
NS_IMPL_ADDREF(nsGenericDOMNodeList)
NS_IMPL_RELEASE(nsGenericDOMNodeList)
// QueryInterface implementation for nsGenericDOMNodeList
NS_INTERFACE_MAP_BEGIN(nsGenericDOMNodeList)
NS_INTERFACE_MAP_ENTRY(nsIDOMNodeList)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(NodeList)
NS_INTERFACE_MAP_END

View File

@@ -0,0 +1,67 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsGenericDOMNodeList_h__
#define nsGenericDOMNodeList_h__
#include "nsISupports.h"
#include "nsIDOMNodeList.h"
/**
* This is a base class for a generic DOM Node List. The base class
* provides implementations for nsISupports, it is up to the subclass
* to implement the core node list methods:
*
* GetLength
* Item
* */
class nsGenericDOMNodeList : public nsIDOMNodeList
{
public:
nsGenericDOMNodeList();
virtual ~nsGenericDOMNodeList();
NS_DECL_ISUPPORTS
// The following need to be defined in the subclass
// nsIDOMNodeList interface
NS_IMETHOD GetLength(PRUint32* aLength)=0;
NS_IMETHOD Item(PRUint32 aIndex, nsIDOMNode** aReturn)=0;
};
#endif // nsGenericDOMNodeList_h__

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,603 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsGenericElement_h___
#define nsGenericElement_h___
#include "nsCOMPtr.h"
#include "nsIHTMLContent.h"
#include "nsIDOMAttr.h"
#include "nsIDOMNamedNodeMap.h"
#include "nsIDOMElement.h"
#include "nsIDOMDocumentFragment.h"
#include "nsIDOMNodeList.h"
#include "nsIDOMLinkStyle.h"
#include "nsIDOMEventReceiver.h"
#include "nsIStyleSheetLinkingElement.h"
#include "nsICSSStyleSheet.h"
#include "nsICSSLoaderObserver.h"
#include "nsVoidArray.h"
#include "nsILinkHandler.h"
#include "nsGenericDOMNodeList.h"
#include "nsIEventListenerManager.h"
#include "nsINodeInfo.h"
#include "nsIParser.h"
#include "nsContentUtils.h"
class nsIDOMAttr;
class nsIDOMEventListener;
class nsIFrame;
class nsISupportsArray;
class nsDOMCSSDeclaration;
class nsIDOMCSSStyleDeclaration;
class nsDOMAttributeMap;
class nsIURI;
class nsINodeInfo;
// Class that holds the child list of a content element and also
// implements the nsIDOMNodeList interface.
class nsChildContentList : public nsGenericDOMNodeList
{
public:
nsChildContentList(nsIContent *aContent);
virtual ~nsChildContentList();
// nsIDOMNodeList interface
NS_DECL_NSIDOMNODELIST
void DropReference();
private:
nsIContent *mContent;
};
// There are a set of DOM- and scripting-specific instance variables
// that may only be instantiated when a content object is accessed
// through the DOM. Rather than burn actual slots in the content
// objects for each of these instance variables, we put them off
// in a side structure that's only allocated when the content is
// accessed through the DOM.
struct nsDOMSlots
{
nsChildContentList *mChildNodes;
nsDOMCSSDeclaration *mStyle;
nsDOMAttributeMap* mAttributeMap;
nsVoidArray *mRangeList;
nsIEventListenerManager* mListenerManager;
nsIContent* mBindingParent; // The nearest enclosing content node with a
// binding that created us. [Weak]
};
class nsNode3Tearoff : public nsIDOM3Node
{
NS_DECL_ISUPPORTS
NS_DECL_NSIDOM3NODE
nsNode3Tearoff(nsIContent *aContent) : mContent(aContent)
{
NS_INIT_ISUPPORTS();
}
virtual ~nsNode3Tearoff() {};
private:
nsCOMPtr<nsIContent> mContent;
};
// nsDOMEventRTTearoff is a tearoff class used by nsGenericElement and
// nsGenericDOMDataNode classes for implemeting the interfaces
// nsIDOMEventReceiver and nsIDOMEventTarget
#define NS_EVENT_TEAROFF_CACHE_SIZE 4
class nsDOMEventRTTearoff : public nsIDOMEventReceiver
{
private:
// This class uses a caching scheme so we don't let users of this
// class create new instances with 'new', in stead the callers
// should use the static method
// nsDOMEventRTTearoff::Create(). That's why the constructor and
// destrucor of this class is private.
nsDOMEventRTTearoff(nsIContent *aContent);
static nsDOMEventRTTearoff *mCachedEventTearoff[NS_EVENT_TEAROFF_CACHE_SIZE];
static PRUint32 mCachedEventTearoffCount;
// This method gets called by Release() when it's time to delete the
// this object, in stead of always deleting the object we'll put the
// object in the cache if unless the cache is already full.
void LastRelease();
nsresult GetEventReceiver(nsIDOMEventReceiver **aReceiver);
public:
virtual ~nsDOMEventRTTearoff();
// Use this static method to create instances of this tearoff class.
static nsDOMEventRTTearoff *Create(nsIContent *aContent);
static void Shutdown();
// nsISupports
NS_DECL_ISUPPORTS
// nsIDOMEventTarget
NS_DECL_NSIDOMEVENTTARGET
// nsIDOMEventReceiver
NS_IMETHOD AddEventListenerByIID(nsIDOMEventListener *aListener,
const nsIID& aIID);
NS_IMETHOD RemoveEventListenerByIID(nsIDOMEventListener *aListener,
const nsIID& aIID);
NS_IMETHOD GetListenerManager(nsIEventListenerManager** aResult);
NS_IMETHOD HandleEvent(nsIDOMEvent *aEvent);
private:
// Strong reference back to the content object from where an
// instance of this class was 'torn off'
nsCOMPtr<nsIContent> mContent;
};
class nsGenericElement : public nsIHTMLContent
{
public:
nsGenericElement();
virtual ~nsGenericElement();
NS_DECL_ISUPPORTS
nsresult Init(nsINodeInfo *aNodeInfo);
// If QI fails on an element, call this method to let the binding
// manager have a chance...
nsresult PostQueryInterface(REFNSIID aIID, void** aInstancePtr);
// Free globals, to be called from module destructor
static void Shutdown();
// nsIContent interface methods
NS_IMETHOD GetDocument(nsIDocument*& aResult) const;
NS_IMETHOD SetDocument(nsIDocument* aDocument, PRBool aDeep,
PRBool aCompileEventHandlers);
NS_IMETHOD GetParent(nsIContent*& aResult) const;
NS_IMETHOD SetParent(nsIContent* aParent);
NS_IMETHOD GetNameSpaceID(PRInt32& aNameSpaceID) const;
NS_IMETHOD GetTag(nsIAtom*& aResult) const;
NS_IMETHOD GetNodeInfo(nsINodeInfo*& aResult) const;
// NS_IMETHOD CanContainChildren(PRBool& aResult) const;
// NS_IMETHOD ChildCount(PRInt32& aResult) const;
// NS_IMETHOD ChildAt(PRInt32 aIndex, nsIContent*& aResult) const;
// NS_IMETHOD IndexOf(nsIContent* aPossibleChild, PRInt32& aResult) const;
// NS_IMETHOD InsertChildAt(nsIContent* aKid, PRInt32 aIndex,
// PRBool aNotify);
// NS_IMETHOD ReplaceChildAt(nsIContent* aKid, PRInt32 aIndex,
// PRBool aNotify);
// NS_IMETHOD AppendChildTo(nsIContent* aKid, PRBool aNotify);
// NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify);
// NS_IMETHOD NormalizeAttrString(const nsAString& aStr,
// nsINodeInfo*& aNodeInfo);
// NS_IMETHOD SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
// const nsAString& aValue,
// PRBool aNotify);
// NS_IMETHOD SetAttr(nsINodeInfo* aNodeInfo,
// const nsAString& aValue,
// PRBool aNotify);
// NS_IMETHOD GetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
// nsAString& aResult) const;
// NS_IMETHOD GetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
// nsIAtom*& aPrefix,
// nsAString& aResult) const;
// NS_IMETHOD UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
// PRBool aNotify);
// NS_IMETHOD GetAttrNameAt(PRInt32 aIndex,
// PRInt32& aNameSpaceID,
// nsIAtom*& aName,
// nsIAtom*& aPrefix) const;
// NS_IMETHOD GetAttrCount(PRInt32& aResult) const;
#ifdef DEBUG
// NS_IMETHOD List(FILE* out, PRInt32 aIndent) const;
// NS_IMETHOD DumpContent(FILE* out, PRInt32 aIndent,PRBool aDumpAll) const;
#endif
NS_IMETHOD RangeAdd(nsIDOMRange* aRange);
NS_IMETHOD RangeRemove(nsIDOMRange* aRange);
NS_IMETHOD GetRangeList(nsVoidArray*& aResult) const;
NS_IMETHOD HandleDOMEvent(nsIPresContext* aPresContext,
nsEvent* aEvent,
nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
nsEventStatus* aEventStatus);
NS_IMETHOD GetContentID(PRUint32* aID);
NS_IMETHOD SetContentID(PRUint32 aID);
NS_IMETHOD SetFocus(nsIPresContext* aContext);
NS_IMETHOD RemoveFocus(nsIPresContext* aContext);
NS_IMETHOD GetBindingParent(nsIContent** aContent);
NS_IMETHOD SetBindingParent(nsIContent* aParent);
NS_IMETHOD_(PRBool) IsContentOfType(PRUint32 aFlags);
NS_IMETHOD GetListenerManager(nsIEventListenerManager** aInstancePtrResult);
NS_IMETHOD DoneCreatingElement();
// nsIStyledContent interface methods
NS_IMETHOD GetID(nsIAtom*& aResult) const;
NS_IMETHOD GetClasses(nsVoidArray& aArray) const;
NS_IMETHOD HasClass(nsIAtom* aClass, PRBool aCaseSensitive) const;
NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker);
NS_IMETHOD WalkInlineStyleRules(nsRuleWalker* aRuleWalker);
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute,
PRInt32 aModType, PRInt32& aHint) const;
// nsIXMLContent interface methods
NS_IMETHOD SetContainingNameSpace(nsINameSpace* aNameSpace);
NS_IMETHOD GetContainingNameSpace(nsINameSpace*& aNameSpace) const;
NS_IMETHOD MaybeTriggerAutoLink(nsIWebShell *aShell);
NS_IMETHOD GetXMLBaseURI(nsIURI **aURI);
// nsIHTMLContent interface methods
NS_IMETHOD Compact();
NS_IMETHOD SetHTMLAttribute(nsIAtom* aAttribute,
const nsHTMLValue& aValue,
PRBool aNotify);
NS_IMETHOD GetHTMLAttribute(nsIAtom* aAttribute,
nsHTMLValue& aValue) const;
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
NS_IMETHOD AttributeToString(nsIAtom* aAttribute,
const nsHTMLValue& aValue,
nsAString& aResult) const;
NS_IMETHOD StringToAttribute(nsIAtom* aAttribute,
const nsAString& aValue,
nsHTMLValue& aResult);
NS_IMETHOD GetBaseURL(nsIURI*& aBaseURL) const;
NS_IMETHOD GetBaseTarget(nsAString& aBaseTarget) const;
// nsIDOMNode method implementation
NS_IMETHOD GetNodeName(nsAString& aNodeName);
NS_IMETHOD GetLocalName(nsAString& aLocalName);
NS_IMETHOD GetNodeValue(nsAString& aNodeValue);
NS_IMETHOD SetNodeValue(const nsAString& aNodeValue);
NS_IMETHOD GetNodeType(PRUint16* aNodeType);
NS_IMETHOD GetParentNode(nsIDOMNode** aParentNode);
NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap** aAttributes);
NS_IMETHOD GetPreviousSibling(nsIDOMNode** aPreviousSibling);
NS_IMETHOD GetNextSibling(nsIDOMNode** aNextSibling);
NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument);
NS_IMETHOD GetNamespaceURI(nsAString& aNamespaceURI);
NS_IMETHOD GetPrefix(nsAString& aPrefix);
NS_IMETHOD SetPrefix(const nsAString& aPrefix);
NS_IMETHOD Normalize();
NS_IMETHOD IsSupported(const nsAString& aFeature,
const nsAString& aVersion, PRBool* aReturn);
NS_IMETHOD HasAttributes(PRBool* aHasAttributes);
// nsIDOMElement method implementation
NS_IMETHOD GetTagName(nsAString& aTagName);
NS_IMETHOD GetAttribute(const nsAString& aName,
nsAString& aReturn);
NS_IMETHOD SetAttribute(const nsAString& aName,
const nsAString& aValue);
NS_IMETHOD RemoveAttribute(const nsAString& aName);
NS_IMETHOD GetAttributeNode(const nsAString& aName,
nsIDOMAttr** aReturn);
NS_IMETHOD SetAttributeNode(nsIDOMAttr* aNewAttr, nsIDOMAttr** aReturn);
NS_IMETHOD RemoveAttributeNode(nsIDOMAttr* aOldAttr, nsIDOMAttr** aReturn);
NS_IMETHOD GetElementsByTagName(const nsAString& aTagname,
nsIDOMNodeList** aReturn);
NS_IMETHOD GetAttributeNS(const nsAString& aNamespaceURI,
const nsAString& aLocalName,
nsAString& aReturn);
NS_IMETHOD SetAttributeNS(const nsAString& aNamespaceURI,
const nsAString& aQualifiedName,
const nsAString& aValue);
NS_IMETHOD RemoveAttributeNS(const nsAString& aNamespaceURI,
const nsAString& aLocalName);
NS_IMETHOD GetAttributeNodeNS(const nsAString& aNamespaceURI,
const nsAString& aLocalName,
nsIDOMAttr** aReturn);
NS_IMETHOD SetAttributeNodeNS(nsIDOMAttr* aNewAttr, nsIDOMAttr** aReturn);
NS_IMETHOD GetElementsByTagNameNS(const nsAString& aNamespaceURI,
const nsAString& aLocalName,
nsIDOMNodeList** aReturn);
NS_IMETHOD HasAttribute(const nsAString& aName, PRBool* aReturn);
NS_IMETHOD HasAttributeNS(const nsAString& aNamespaceURI,
const nsAString& aLocalName,
PRBool* aReturn);
// Generic DOMNode implementations
nsresult doInsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild,
nsIDOMNode** aReturn);
nsresult doReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild,
nsIDOMNode** aReturn);
nsresult doRemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn);
//----------------------------------------
nsresult RenderFrame(nsIPresContext*);
nsresult AddScriptEventListener(nsIAtom* aAttribute,
const nsAString& aValue);
nsresult TriggerLink(nsIPresContext* aPresContext,
nsLinkVerb aVerb,
nsIURI* aBaseURL,
const nsString& aURLSpec,
const nsString& aTargetSpec,
PRBool aClick);
nsresult JoinTextNodes(nsIContent* aFirst,
nsIContent* aSecond);
static void SetDocumentInChildrenOf(nsIContent* aContent,
nsIDocument* aDocument, PRBool aCompileEventHandlers);
static nsresult InternalIsSupported(const nsAString& aFeature,
const nsAString& aVersion,
PRBool* aReturn);
static PRBool HasMutationListeners(nsIContent* aContent,
PRUint32 aType);
protected:
#ifdef DEBUG
virtual PRUint32 BaseSizeOf(nsISizeOfHandler *aSizer) const;
#endif
nsDOMSlots *GetDOMSlots();
void MaybeClearDOMSlots();
nsIDocument* mDocument; // WEAK
nsIContent* mParent; // WEAK
nsINodeInfo* mNodeInfo; // OWNER
nsDOMSlots *mDOMSlots; // OWNER
PRUint32 mContentID;
};
class nsGenericContainerElement : public nsGenericElement {
public:
nsGenericContainerElement();
virtual ~nsGenericContainerElement();
NS_IMETHOD CopyInnerTo(nsIContent* aSrcContent,
nsGenericContainerElement* aDest,
PRBool aDeep);
// nsIDOMElement methods
NS_METHOD GetAttribute(const nsAString& aName,
nsAString& aReturn)
{
return nsGenericElement::GetAttribute(aName, aReturn);
}
NS_METHOD SetAttribute(const nsAString& aName,
const nsAString& aValue)
{
return nsGenericElement::SetAttribute(aName, aValue);
}
// Remainder of nsIDOMHTMLElement (and nsIDOMNode)
NS_IMETHOD GetChildNodes(nsIDOMNodeList** aChildNodes);
NS_IMETHOD HasChildNodes(PRBool* aHasChildNodes);
NS_IMETHOD GetFirstChild(nsIDOMNode** aFirstChild);
NS_IMETHOD GetLastChild(nsIDOMNode** aLastChild);
NS_IMETHOD InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild,
nsIDOMNode** aReturn)
{
return nsGenericElement::doInsertBefore(aNewChild, aRefChild, aReturn);
}
NS_IMETHOD ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild,
nsIDOMNode** aReturn)
{
return nsGenericElement::doReplaceChild(aNewChild, aOldChild, aReturn);
}
NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn)
{
return nsGenericElement::doRemoveChild(aOldChild, aReturn);
}
NS_IMETHOD AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn)
{
return nsGenericElement::doInsertBefore(aNewChild, nsnull, aReturn);
}
// Remainder of nsIContent
NS_IMETHOD NormalizeAttrString(const nsAString& aStr,
nsINodeInfo*& aNodeInfo);
NS_IMETHOD SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
const nsAString& aValue,
PRBool aNotify);
NS_IMETHOD SetAttr(nsINodeInfo* aNodeInfo,
const nsAString& aValue,
PRBool aNotify);
NS_IMETHOD GetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
nsAString& aResult) const;
NS_IMETHOD GetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
nsIAtom*& aPrefix, nsAString& aResult) const;
NS_IMETHOD_(PRBool) HasAttr(PRInt32 aNameSpaceID, nsIAtom* aName) const;
NS_IMETHOD UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
PRBool aNotify);
NS_IMETHOD GetAttrNameAt(PRInt32 aIndex,
PRInt32& aNameSpaceID,
nsIAtom*& aName,
nsIAtom*& aPrefix) const;
NS_IMETHOD GetAttrCount(PRInt32& aResult) const;
#ifdef DEBUG
NS_IMETHOD List(FILE* out, PRInt32 aIndent) const;
NS_IMETHOD DumpContent(FILE* out, PRInt32 aIndent,PRBool aDumpAll) const;
#endif
NS_IMETHOD CanContainChildren(PRBool& aResult) const;
NS_IMETHOD ChildCount(PRInt32& aResult) const;
NS_IMETHOD ChildAt(PRInt32 aIndex, nsIContent*& aResult) const;
NS_IMETHOD IndexOf(nsIContent* aPossibleChild, PRInt32& aResult) const;
NS_IMETHOD InsertChildAt(nsIContent* aKid, PRInt32 aIndex, PRBool aNotify,
PRBool aDeepSetDocument);
NS_IMETHOD ReplaceChildAt(nsIContent* aKid, PRInt32 aIndex, PRBool aNotify,
PRBool aDeepSetDocument);
NS_IMETHOD AppendChildTo(nsIContent* aKid, PRBool aNotify,
PRBool aDeepSetDocument);
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify);
#ifdef DEBUG
void ListAttributes(FILE* out) const;
#endif
protected:
#ifdef DEBUG
virtual PRUint32 BaseSizeOf(nsISizeOfHandler *aSizer) const;
#endif
nsVoidArray* mAttributes;
nsSmallVoidArray mChildren;
};
// Internal non-public interface
// IID for the nsIDocumentFragment interface
#define NS_IDOCUMENTFRAGMENT_IID \
{ 0xd8fb2853, 0xf6d6, 0x4499, \
{0x9c, 0x60, 0x6c, 0xa2, 0x75, 0x35, 0x09, 0xeb} }
// nsIDocumentFragment interface
class nsIDocumentFragment : public nsIDOMDocumentFragment
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOCUMENTFRAGMENT_IID)
// These methods are supposed to be used when *all* children of a
// document fragment are moved at once into a new parent w/o
// changing the relationship between the children. If the moving
// operation fails and some children were moved to a new parent and
// some weren't, ReconnectChildren() should be called to remove the
// children from their possible new parent and re-insert the
// children into the document fragment. Once the operation is
// complete and all children are successfully moved into their new
// parent DropChildReferences() should be called so that the
// document fragment will loose its references to the children.
NS_IMETHOD DisconnectChildren() = 0;
NS_IMETHOD ReconnectChildren() = 0;
NS_IMETHOD DropChildReferences() = 0;
};
#define NS_FORWARD_NSIDOMNODE_NO_CLONENODE(_to) \
NS_IMETHOD GetNodeName(nsAString& aNodeName) { \
return _to GetNodeName(aNodeName); \
} \
NS_IMETHOD GetNodeValue(nsAString& aNodeValue) { \
return _to GetNodeValue(aNodeValue); \
} \
NS_IMETHOD SetNodeValue(const nsAString& aNodeValue) { \
return _to SetNodeValue(aNodeValue); \
} \
NS_IMETHOD GetNodeType(PRUint16* aNodeType) { \
return _to GetNodeType(aNodeType); \
} \
NS_IMETHOD GetParentNode(nsIDOMNode** aParentNode) { \
return _to GetParentNode(aParentNode); \
} \
NS_IMETHOD GetChildNodes(nsIDOMNodeList** aChildNodes) { \
return _to GetChildNodes(aChildNodes); \
} \
NS_IMETHOD GetFirstChild(nsIDOMNode** aFirstChild) { \
return _to GetFirstChild(aFirstChild); \
} \
NS_IMETHOD GetLastChild(nsIDOMNode** aLastChild) { \
return _to GetLastChild(aLastChild); \
} \
NS_IMETHOD GetPreviousSibling(nsIDOMNode** aPreviousSibling) { \
return _to GetPreviousSibling(aPreviousSibling); \
} \
NS_IMETHOD GetNextSibling(nsIDOMNode** aNextSibling) { \
return _to GetNextSibling(aNextSibling); \
} \
NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap** aAttributes) { \
return _to GetAttributes(aAttributes); \
} \
NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument) { \
return _to GetOwnerDocument(aOwnerDocument); \
} \
NS_IMETHOD GetNamespaceURI(nsAString& aNamespaceURI) { \
return _to GetNamespaceURI(aNamespaceURI); \
} \
NS_IMETHOD GetPrefix(nsAString& aPrefix) { \
return _to GetPrefix(aPrefix); \
} \
NS_IMETHOD SetPrefix(const nsAString& aPrefix) { \
return _to SetPrefix(aPrefix); \
} \
NS_IMETHOD GetLocalName(nsAString& aLocalName) { \
return _to GetLocalName(aLocalName); \
} \
NS_IMETHOD InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, \
nsIDOMNode** aReturn) { \
return _to InsertBefore(aNewChild, aRefChild, aReturn); \
} \
NS_IMETHOD ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild, \
nsIDOMNode** aReturn) { \
return _to ReplaceChild(aNewChild, aOldChild, aReturn); \
} \
NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn) { \
return _to RemoveChild(aOldChild, aReturn); \
} \
NS_IMETHOD AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn) { \
return _to AppendChild(aNewChild, aReturn); \
} \
NS_IMETHOD HasChildNodes(PRBool* aReturn) { \
return _to HasChildNodes(aReturn); \
} \
NS_IMETHOD Normalize() { \
return _to Normalize(); \
} \
NS_IMETHOD IsSupported(const nsAString& aFeature, \
const nsAString& aVersion, PRBool* aReturn) { \
return _to IsSupported(aFeature, aVersion, aReturn); \
} \
NS_IMETHOD HasAttributes(PRBool* aReturn) { \
return _to HasAttributes(aReturn); \
} \
NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn);
#define NS_INTERFACE_MAP_ENTRY_TEAROFF(_iid, _tearoff) \
if (aIID.Equals(NS_GET_IID(_iid))) { \
foundInterface = new _tearoff; \
NS_ENSURE_TRUE(foundInterface, NS_ERROR_OUT_OF_MEMORY); \
} else
#endif /* nsGenericElement_h___ */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,154 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsHTMLContentSerializer_h__
#define nsHTMLContentSerializer_h__
#include "nsXMLContentSerializer.h"
#include "nsIParserService.h"
#include "nsIEntityConverter.h"
class nsIContent;
class nsIAtom;
class nsHTMLContentSerializer : public nsXMLContentSerializer {
public:
nsHTMLContentSerializer();
virtual ~nsHTMLContentSerializer();
NS_IMETHOD Init(PRUint32 flags, PRUint32 aWrapColumn,
nsIAtom* aCharSet, PRBool aIsCopying);
NS_IMETHOD AppendText(nsIDOMText* aText,
PRInt32 aStartOffset,
PRInt32 aEndOffset,
nsAString& aStr);
NS_IMETHOD AppendElementStart(nsIDOMElement *aElement,
PRBool aHasChildren,
nsAString& aStr);
NS_IMETHOD AppendElementEnd(nsIDOMElement *aElement,
nsAString& aStr);
protected:
PRBool HasDirtyAttr(nsIContent* aContent);
PRBool LineBreakBeforeOpen(nsIAtom* aName, PRBool aHasDirtyAttr);
PRBool LineBreakAfterOpen(nsIAtom* aName, PRBool aHasDirtyAttr);
PRBool LineBreakBeforeClose(nsIAtom* aName, PRBool aHasDirtyAttr);
PRBool LineBreakAfterClose(nsIAtom* aName, PRBool aHasDirtyAttr);
PRBool IsFirstChildOfOL(nsIDOMElement* aElement);
void StartIndentation(nsIAtom* aName,
PRBool aHasDirtyAttr,
nsAString& aStr);
void EndIndentation(nsIAtom* aName,
PRBool aHasDirtyAttr,
nsAString& aStr);
nsresult GetEntityConverter(nsIEntityConverter** aConverter);
nsresult GetParserService(nsIParserService** aParserService);
void SerializeAttributes(nsIContent* aContent,
nsIAtom* aTagName,
nsAString& aStr);
void SerializeLIValueAttribute(nsIDOMElement* aElement,
nsAString& aStr);
virtual void AppendToString(const PRUnichar* aStr,
PRInt32 aLength,
nsAString& aOutputStr);
virtual void AppendToString(const PRUnichar aChar,
nsAString& aOutputStr);
virtual void AppendToString(const nsAString& aStr,
nsAString& aOutputStr,
PRBool aTranslateEntities = PR_FALSE,
PRBool aIncrColumn = PR_TRUE);
virtual void AppendToStringConvertLF(const nsAString& aStr,
nsAString& aOutputStr);
virtual void AppendToStringWrapped(const nsAString& aStr,
nsAString& aOutputStr,
PRBool aTranslateEntities);
PRBool HasLongLines(const nsString& text, PRInt32& aLastNewlineOffset);
nsresult EscapeURI(const nsAString& aURI, nsAString& aEscapedURI);
PRBool IsJavaScript(nsIAtom* aAttrNameAtom, const nsAString& aAttrValueString);
nsCOMPtr<nsIParserService> mParserService;
nsCOMPtr<nsIEntityConverter> mEntityConverter;
PRInt32 mIndent;
PRInt32 mColPos;
PRUint32 mFlags;
PRPackedBool mInBody;
PRPackedBool mDoFormat;
PRPackedBool mDoHeader;
PRPackedBool mBodyOnly;
PRPackedBool mIsCopying; // Set to PR_TRUE only while copying
// To keep track of First LI child of OL in selected range
PRPackedBool mIsFirstChildOfOL;
PRInt32 mPreLevel;
/*
* mInCDATA is set to PR_TRUE while the serializer is serializing
* the content of a element whose content is considerd CDATA by the
* serializer (such elements are 'script', 'style', 'noscript' and
* possibly others) This doesn't have anything to do with if the
* element is defined as CDATA in the DTD, it simply means we'll
* output the content of the element without doing any entity encoding
* what so ever.
*/
PRPackedBool mInCDATA;
PRPackedBool mIsLatin1;
PRInt32 mMaxColumn;
nsString mLineBreak;
nsCOMPtr<nsIAtom> mCharSet;
// To keep track of startvalue of OL and first list item for nested lists
struct olState {
olState(PRInt32 aStart, PRBool aIsFirst):startVal(aStart),isFirstListItem(aIsFirst)
{
}
PRInt32 startVal;
PRBool isFirstListItem;
};
nsAutoVoidArray mOLStateStack;// Stack to store one olState struct per <OL>.
};
extern nsresult NS_NewHTMLContentSerializer(nsIContentSerializer** aSerializer);
#endif

View File

@@ -0,0 +1,577 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nscore.h"
#include "nsINameSpaceManager.h"
#include "nsINameSpace.h"
#include "nsISupportsArray.h"
#include "nsIElementFactory.h"
#include "nsIServiceManager.h"
#include "nsHashtable.h"
#include "nsVoidArray.h"
#include "nsLayoutAtoms.h"
#include "nsString.h"
#include "nsCRT.h"
#include "nsContentCID.h"
extern nsresult NS_NewXMLElementFactory(nsIElementFactory** aResult);
static const char kXMLNSNameSpaceURI[] = "http://www.w3.org/2000/xmlns/";
static const char kXMLNameSpaceURI[] = "http://www.w3.org/XML/1998/namespace";
static const char kXHTMLNameSpaceURI[] = "http://www.w3.org/1999/xhtml";
static const char kXLinkNameSpaceURI[] = "http://www.w3.org/1999/xlink";
static const char kXSLTNameSpaceURI[] = "http://www.w3.org/1999/XSL/Transform";
static const char kXBLNameSpaceURI[] = "http://www.mozilla.org/xbl";
static const char kMathMLNameSpaceURI[] = "http://www.w3.org/1998/Math/MathML";
//-----------------------------------------------------------
// Name Space ID table support
static PRBool gNameSpaceManagerIsInitialized = PR_FALSE;
static nsHashtable* gURIToIDTable;
static nsVoidArray* gURIArray;
static nsISupportsArray* gElementFactoryArray;
#ifdef NS_DEBUG
static PRBool gNameSpaceManagerWasShutDown = PR_FALSE;
#endif
static void InitializeNameSpaceManager()
{
if (gNameSpaceManagerIsInitialized) {
return;
}
NS_ASSERTION(!gURIToIDTable, "already have URI table");
NS_ASSERTION(!gURIArray, "already have URI array");
gURIToIDTable = new nsHashtable();
gURIArray = new nsVoidArray();
nsString* xmlns = new nsString(NS_ConvertASCIItoUCS2(kXMLNSNameSpaceURI));
nsString* xml = new nsString(NS_ConvertASCIItoUCS2(kXMLNameSpaceURI));
nsString* xhtml = new nsString(NS_ConvertASCIItoUCS2(kXHTMLNameSpaceURI));
nsString* xlink = new nsString(NS_ConvertASCIItoUCS2(kXLinkNameSpaceURI));
nsString* xslt = new nsString(NS_ConvertASCIItoUCS2(kXSLTNameSpaceURI));
nsString* xbl = new nsString(NS_ConvertASCIItoUCS2(kXBLNameSpaceURI));
nsString* mathml = new nsString(NS_ConvertASCIItoUCS2(kMathMLNameSpaceURI));
gURIArray->AppendElement(xmlns); // ordering here needs to match IDs
gURIArray->AppendElement(xml);
gURIArray->AppendElement(xhtml);
gURIArray->AppendElement(xlink);
gURIArray->AppendElement(xslt);
gURIArray->AppendElement(xbl);
gURIArray->AppendElement(mathml);
nsStringKey xmlnsKey(*xmlns);
nsStringKey xmlKey(*xml);
nsStringKey xhtmlKey(*xhtml);
nsStringKey xlinkKey(*xlink);
nsStringKey xsltKey(*xslt);
nsStringKey xblKey(*xbl);
nsStringKey mathmlKey(*mathml);
gURIToIDTable->Put(&xmlnsKey, NS_INT32_TO_PTR(kNameSpaceID_XMLNS));
gURIToIDTable->Put(&xmlKey, NS_INT32_TO_PTR(kNameSpaceID_XML));
gURIToIDTable->Put(&xhtmlKey, NS_INT32_TO_PTR(kNameSpaceID_XHTML));
gURIToIDTable->Put(&xlinkKey, NS_INT32_TO_PTR(kNameSpaceID_XLink));
gURIToIDTable->Put(&xsltKey, NS_INT32_TO_PTR(kNameSpaceID_XSLT));
gURIToIDTable->Put(&xblKey, NS_INT32_TO_PTR(kNameSpaceID_XBL));
gURIToIDTable->Put(&mathmlKey, NS_INT32_TO_PTR(kNameSpaceID_MathML));
NS_NewISupportsArray(&gElementFactoryArray);
NS_ASSERTION(gURIToIDTable, "no URI table");
NS_ASSERTION(gURIArray, "no URI array");
NS_ASSERTION(gElementFactoryArray, "no element factory array");
gNameSpaceManagerIsInitialized = PR_TRUE;
}
void NS_NameSpaceManagerShutdown()
{
delete gURIToIDTable;
PRInt32 index = gURIArray->Count();
while (0 < index--) {
nsString* str = (nsString*)gURIArray->ElementAt(index);
delete str;
}
delete gURIArray;
gURIToIDTable = nsnull;
gURIArray = nsnull;
NS_IF_RELEASE(gElementFactoryArray);
#ifdef NS_DEBUG
gNameSpaceManagerWasShutDown = PR_TRUE;
#endif
}
static PRInt32 FindNameSpaceID(const nsAString& aURI)
{
NS_ASSERTION(gURIToIDTable, "no URI table");
const nsPromiseFlatString& flatString = PromiseFlatString(aURI);
nsStringKey key(flatString);
void* value = gURIToIDTable->Get(&key);
if (value) {
return NS_PTR_TO_INT32(value);
}
return kNameSpaceID_Unknown;
}
static const nsString* FindNameSpaceURI(PRInt32 aID)
{
NS_ASSERTION(gURIArray, "no URI array");
return (const nsString*)gURIArray->SafeElementAt(aID - 1);
}
//-----------------------------------------------------------
// Name Space
class NameSpaceImpl : public nsINameSpace {
public:
NameSpaceImpl(nsINameSpaceManager* aManager,
NameSpaceImpl* aParent,
nsIAtom* aPrefix,
const nsAString& aURI);
NameSpaceImpl(nsINameSpaceManager* aManager,
NameSpaceImpl* aParent,
nsIAtom* aPrefix,
PRInt32 aNameSpaceID);
virtual ~NameSpaceImpl();
NS_DECL_ISUPPORTS
NS_IMETHOD GetNameSpaceManager(nsINameSpaceManager*& aManager) const;
NS_IMETHOD GetNameSpaceID(PRInt32& aID) const;
NS_IMETHOD GetNameSpaceURI(nsAString& aURI) const;
NS_IMETHOD GetNameSpacePrefix(nsIAtom*& aPrefix) const;
NS_IMETHOD GetParentNameSpace(nsINameSpace*& aParent) const;
NS_IMETHOD FindNameSpace(nsIAtom* aPrefix, nsINameSpace*& aNameSpace) const;
NS_IMETHOD FindNameSpaceID(nsIAtom* aPrefix, PRInt32& aNameSpaceID) const;
NS_IMETHOD FindNameSpacePrefix(PRInt32 aNameSpaceID, nsIAtom*& aPrefix) const;
NS_IMETHOD CreateChildNameSpace(nsIAtom* aPrefix, const nsAString& aURI,
nsINameSpace*& aChildNameSpace);
NS_IMETHOD CreateChildNameSpace(nsIAtom* aPrefix, PRInt32 aNameSpaceID,
nsINameSpace*& aChildNameSpace);
private:
// These are not supported and are not implemented!
NameSpaceImpl(const NameSpaceImpl& aCopy);
NameSpaceImpl& operator=(const NameSpaceImpl& aCopy);
public:
nsINameSpaceManager* mManager;
NameSpaceImpl* mParent;
nsIAtom* mPrefix;
PRInt32 mID;
};
NameSpaceImpl::NameSpaceImpl(nsINameSpaceManager* aManager,
NameSpaceImpl* aParent,
nsIAtom* aPrefix,
const nsAString& aURI)
: mManager(aManager),
mParent(aParent),
mPrefix(aPrefix)
{
NS_ASSERTION(aManager, "null namespace manager");
NS_INIT_REFCNT();
NS_ADDREF(mManager);
NS_IF_ADDREF(mParent);
NS_IF_ADDREF(mPrefix);
mManager->RegisterNameSpace(aURI, mID);
}
NameSpaceImpl::NameSpaceImpl(nsINameSpaceManager* aManager,
NameSpaceImpl* aParent,
nsIAtom* aPrefix,
PRInt32 aNameSpaceID)
: mManager(aManager),
mParent(aParent),
mPrefix(aPrefix),
mID(aNameSpaceID)
{
NS_ASSERTION(aManager, "null namespace manager");
NS_INIT_REFCNT();
NS_ADDREF(mManager);
NS_IF_ADDREF(mParent);
NS_IF_ADDREF(mPrefix);
}
NameSpaceImpl::~NameSpaceImpl()
{
NS_RELEASE(mManager);
NS_IF_RELEASE(mParent);
NS_IF_RELEASE(mPrefix);
}
NS_IMPL_ISUPPORTS1(NameSpaceImpl, nsINameSpace)
NS_IMETHODIMP
NameSpaceImpl::GetNameSpaceManager(nsINameSpaceManager*& aManager) const
{
NS_ASSERTION(aManager, "null namespace manager");
aManager = mManager;
NS_ADDREF(aManager);
return NS_OK;
}
NS_IMETHODIMP
NameSpaceImpl::GetNameSpaceID(PRInt32& aID) const
{
aID = mID;
return NS_OK;
}
NS_IMETHODIMP
NameSpaceImpl::GetNameSpaceURI(nsAString& aURI) const
{
NS_ASSERTION(mManager, "null namespace manager");
return mManager->GetNameSpaceURI(mID, aURI);
}
NS_IMETHODIMP
NameSpaceImpl::GetNameSpacePrefix(nsIAtom*& aPrefix) const
{
aPrefix = mPrefix;
NS_IF_ADDREF(aPrefix);
return NS_OK;
}
NS_IMETHODIMP
NameSpaceImpl::GetParentNameSpace(nsINameSpace*& aParent) const
{
aParent = mParent;
NS_IF_ADDREF(aParent);
return NS_OK;
}
NS_IMETHODIMP
NameSpaceImpl::FindNameSpace(nsIAtom* aPrefix, nsINameSpace*& aNameSpace) const
{
const NameSpaceImpl* nameSpace = this;
do {
if (aPrefix == nameSpace->mPrefix) {
aNameSpace = (nsINameSpace*)nameSpace;
NS_ADDREF(aNameSpace);
return NS_OK;
}
nameSpace = nameSpace->mParent;
} while (nameSpace);
aNameSpace = nsnull;
return NS_ERROR_ILLEGAL_VALUE;
}
NS_IMETHODIMP
NameSpaceImpl::FindNameSpaceID(nsIAtom* aPrefix, PRInt32& aNameSpaceID) const
{
const NameSpaceImpl* nameSpace = this;
do {
if (aPrefix == nameSpace->mPrefix) {
aNameSpaceID = nameSpace->mID;
return NS_OK;
}
nameSpace = nameSpace->mParent;
} while (nameSpace);
if (!aPrefix) {
aNameSpaceID = kNameSpaceID_None;
}
else {
aNameSpaceID = kNameSpaceID_Unknown;
}
return NS_ERROR_ILLEGAL_VALUE;
}
NS_IMETHODIMP
NameSpaceImpl::FindNameSpacePrefix(PRInt32 aNameSpaceID, nsIAtom*& aPrefix) const
{
const NameSpaceImpl* nameSpace = this;
do {
if (aNameSpaceID == nameSpace->mID) {
aPrefix = nameSpace->mPrefix;
NS_IF_ADDREF(aPrefix);
return NS_OK;
}
nameSpace = nameSpace->mParent;
} while (nameSpace);
aPrefix = nsnull;
return NS_ERROR_ILLEGAL_VALUE;
}
NS_IMETHODIMP
NameSpaceImpl::CreateChildNameSpace(nsIAtom* aPrefix, const nsAString& aURI,
nsINameSpace*& aChildNameSpace)
{
NameSpaceImpl* child = new NameSpaceImpl(mManager, this, aPrefix, aURI);
if (child) {
return child->QueryInterface(NS_GET_IID(nsINameSpace), (void**)&aChildNameSpace);
}
aChildNameSpace = nsnull;
return NS_ERROR_OUT_OF_MEMORY;
}
NS_IMETHODIMP
NameSpaceImpl::CreateChildNameSpace(nsIAtom* aPrefix, PRInt32 aNameSpaceID,
nsINameSpace*& aChildNameSpace)
{
if (FindNameSpaceURI(aNameSpaceID)) {
NameSpaceImpl* child = new NameSpaceImpl(mManager, this, aPrefix, aNameSpaceID);
if (child) {
return child->QueryInterface(NS_GET_IID(nsINameSpace), (void**)&aChildNameSpace);
}
aChildNameSpace = nsnull;
return NS_ERROR_OUT_OF_MEMORY;
}
aChildNameSpace = nsnull;
return NS_ERROR_ILLEGAL_VALUE;
}
//-----------------------------------------------------------
// Name Space Manager
class NameSpaceManagerImpl : public nsINameSpaceManager {
public:
NameSpaceManagerImpl();
NS_DECL_ISUPPORTS
NS_IMETHOD CreateRootNameSpace(nsINameSpace*& aRootNameSpace);
NS_IMETHOD RegisterNameSpace(const nsAString& aURI,
PRInt32& aNameSpaceID);
NS_IMETHOD GetNameSpaceURI(PRInt32 aNameSpaceID, nsAString& aURI);
NS_IMETHOD GetNameSpaceID(const nsAString& aURI,
PRInt32& aNameSpaceID);
NS_IMETHOD GetElementFactory(PRInt32 aNameSpaceID,
nsIElementFactory **aElementFactory);
private:
// These are not supported and are not implemented!
NameSpaceManagerImpl(const NameSpaceManagerImpl& aCopy);
NameSpaceManagerImpl& operator=(const NameSpaceManagerImpl& aCopy);
protected:
virtual ~NameSpaceManagerImpl();
};
NameSpaceManagerImpl::NameSpaceManagerImpl()
{
NS_ASSERTION(!gNameSpaceManagerWasShutDown,
"Namespace manager used past content module shutdown!!!");
NS_INIT_REFCNT();
InitializeNameSpaceManager();
}
NameSpaceManagerImpl::~NameSpaceManagerImpl()
{
}
NS_IMPL_ISUPPORTS1(NameSpaceManagerImpl, nsINameSpaceManager)
NS_IMETHODIMP
NameSpaceManagerImpl::CreateRootNameSpace(nsINameSpace*& aRootNameSpace)
{
NS_ASSERTION(!gNameSpaceManagerWasShutDown,
"Namespace manager used past content module shutdown!!!");
nsresult rv = NS_ERROR_OUT_OF_MEMORY;
aRootNameSpace = nsnull;
NameSpaceImpl* xmlns = new NameSpaceImpl(this, nsnull,
nsLayoutAtoms::xmlnsNameSpace,
kNameSpaceID_XMLNS);
if (nsnull != xmlns) {
NameSpaceImpl* xml = new NameSpaceImpl(this, xmlns,
nsLayoutAtoms::xmlNameSpace,
kNameSpaceID_XML);
if (xml) {
rv = CallQueryInterface(xml, &aRootNameSpace);
}
else {
delete xmlns;
}
}
return rv;
}
NS_IMETHODIMP
NameSpaceManagerImpl::RegisterNameSpace(const nsAString& aURI,
PRInt32& aNameSpaceID)
{
NS_ASSERTION(!gNameSpaceManagerWasShutDown,
"Namespace manager used past content module shutdown!!!");
PRInt32 id = FindNameSpaceID(aURI);
if (kNameSpaceID_Unknown == id) {
if (aURI.IsEmpty()) {
id = kNameSpaceID_None; // xmlns="", see bug 75700 for details
} else {
nsString* uri = new nsString(aURI);
if (!uri)
return NS_ERROR_OUT_OF_MEMORY;
gURIArray->AppendElement(uri);
id = gURIArray->Count(); // id is index + 1
nsStringKey key(*uri);
gURIToIDTable->Put(&key, (void*)id);
}
}
aNameSpaceID = id;
return NS_OK;
}
NS_IMETHODIMP
NameSpaceManagerImpl::GetNameSpaceURI(PRInt32 aNameSpaceID, nsAString& aURI)
{
NS_ASSERTION(!gNameSpaceManagerWasShutDown,
"Namespace manager used past content module shutdown!!!");
const nsString* result = FindNameSpaceURI(aNameSpaceID);
if (result) {
aURI = *result;
return NS_OK;
}
aURI.Truncate();
return NS_ERROR_ILLEGAL_VALUE;
}
NS_IMETHODIMP
NameSpaceManagerImpl::GetNameSpaceID(const nsAString& aURI, PRInt32& aNameSpaceID)
{
NS_ASSERTION(!gNameSpaceManagerWasShutDown,
"Namespace manager used past content module shutdown!!!");
aNameSpaceID = FindNameSpaceID(aURI);
return NS_OK;
}
NS_IMETHODIMP
NameSpaceManagerImpl::GetElementFactory(PRInt32 aNameSpaceID,
nsIElementFactory **aElementFactory)
{
NS_ASSERTION(!gNameSpaceManagerWasShutDown,
"Namespace manager used past content module shutdown!!!");
*aElementFactory = nsnull;
NS_ENSURE_TRUE(gElementFactoryArray, NS_ERROR_NOT_INITIALIZED);
NS_ENSURE_TRUE(aNameSpaceID >= 0, NS_ERROR_ILLEGAL_VALUE);
gElementFactoryArray->QueryElementAt(aNameSpaceID,
NS_GET_IID(nsIElementFactory),
(void **)aElementFactory);
if (*aElementFactory) {
return NS_OK;
}
nsAutoString uri;
GetNameSpaceURI(aNameSpaceID, uri);
nsCOMPtr<nsIElementFactory> ef;
if (!uri.IsEmpty()) {
nsCAutoString contract_id(NS_ELEMENT_FACTORY_CONTRACTID_PREFIX);
contract_id.Append(NS_ConvertUCS2toUTF8(uri));
ef = do_GetService(contract_id.get());
}
if (!ef) {
nsresult rv = NS_NewXMLElementFactory(getter_AddRefs(ef));
if (NS_FAILED(rv)) {
return rv;
}
}
PRUint32 count = 0;
gElementFactoryArray->Count(&count);
if ((PRUint32)aNameSpaceID < count) {
gElementFactoryArray->ReplaceElementAt(ef, aNameSpaceID);
} else {
// This sucks, simply doing an InsertElementAt() should IMNSHO
// automatically grow the array and insert null's as needed to
// fill up the array!?!!
for (PRInt32 i = count; i < aNameSpaceID; i++) {
gElementFactoryArray->AppendElement(nsnull);
}
gElementFactoryArray->AppendElement(ef);
}
*aElementFactory = ef;
NS_ADDREF(*aElementFactory);
return NS_OK;
}
nsresult
NS_NewNameSpaceManager(nsINameSpaceManager** aInstancePtrResult)
{
NS_ENSURE_ARG_POINTER(aInstancePtrResult);
*aInstancePtrResult = new NameSpaceManagerImpl();
if (!*aInstancePtrResult) {
return NS_ERROR_OUT_OF_MEMORY;
}
NS_ADDREF(*aInstancePtrResult);
return NS_OK;
}

View File

@@ -0,0 +1,327 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nscore.h"
#include "nsNodeInfo.h"
#include "nsNodeInfoManager.h"
#include "nsCOMPtr.h"
#include "nsString.h"
#include "nsIAtom.h"
#include "nsINameSpaceManager.h"
#include "domstubs.h" // for SetDOMStringToNull();
#include "nsCRT.h"
nsNodeInfo::nsNodeInfo()
: nsINodeInfo(), mOwnerManager(nsnull)
{
NS_INIT_REFCNT();
}
nsNodeInfo::~nsNodeInfo()
{
if (mOwnerManager) {
mOwnerManager->RemoveNodeInfo(this);
NS_RELEASE(mOwnerManager);
}
NS_IF_RELEASE(mInner.mName);
NS_IF_RELEASE(mInner.mPrefix);
}
nsresult
nsNodeInfo::Init(nsIAtom *aName, nsIAtom *aPrefix, PRInt32 aNamespaceID,
nsNodeInfoManager *aOwnerManager)
{
NS_ENSURE_TRUE(!mInner.mName && !mInner.mPrefix && !mOwnerManager,
NS_ERROR_ALREADY_INITIALIZED);
NS_ENSURE_ARG_POINTER(aName);
NS_ENSURE_ARG_POINTER(aOwnerManager);
mInner.mName = aName;
NS_ADDREF(mInner.mName);
mInner.mPrefix = aPrefix;
NS_IF_ADDREF(mInner.mPrefix);
mInner.mNamespaceID = aNamespaceID;
mOwnerManager = aOwnerManager;
NS_ADDREF(mOwnerManager);
return NS_OK;
}
// nsISupports
NS_IMPL_ISUPPORTS1(nsNodeInfo, nsINodeInfo);
// nsINodeInfo
NS_IMETHODIMP
nsNodeInfo::GetQualifiedName(nsAString& aQualifiedName) const
{
if (mInner.mPrefix) {
mInner.mPrefix->ToString(aQualifiedName);
aQualifiedName.Append(PRUnichar(':'));
} else {
aQualifiedName.Truncate();
}
const PRUnichar *name;
mInner.mName->GetUnicode(&name);
aQualifiedName.Append(name);
return NS_OK;
}
NS_IMETHODIMP
nsNodeInfo::GetLocalName(nsAString& aLocalName) const
{
#ifdef STRICT_DOM_LEVEL2_LOCALNAME
if (mInner.mNamespaceID > 0) {
return mInner.mName->ToString(aLocalName);
}
SetDOMStringToNull(aLocalName);
return NS_OK;
#else
return mInner.mName->ToString(aLocalName);
#endif
}
NS_IMETHODIMP
nsNodeInfo::GetNamespaceURI(nsAString& aNameSpaceURI) const
{
nsresult rv = NS_OK;
if (mInner.mNamespaceID > 0) {
nsCOMPtr<nsINameSpaceManager> nsm;
mOwnerManager->GetNamespaceManager(*getter_AddRefs(nsm));
NS_ENSURE_TRUE(nsm, NS_ERROR_NOT_INITIALIZED);
rv = nsm->GetNameSpaceURI(mInner.mNamespaceID, aNameSpaceURI);
} else {
SetDOMStringToNull(aNameSpaceURI);
}
return rv;
}
NS_IMETHODIMP
nsNodeInfo::GetIDAttributeAtom(nsIAtom** aResult) const
{
*aResult = mIDAttributeAtom;
NS_IF_ADDREF(*aResult);
return NS_OK;
}
NS_IMETHODIMP
nsNodeInfo::SetIDAttributeAtom(nsIAtom* aID)
{
NS_ENSURE_ARG(aID);
mIDAttributeAtom = aID;
return NS_OK;
}
NS_IMETHODIMP
nsNodeInfo::GetNodeInfoManager(nsINodeInfoManager*& aNodeInfoManager) const
{
aNodeInfoManager = mOwnerManager;
NS_ADDREF(aNodeInfoManager);
return NS_OK;
}
NS_IMETHODIMP_(PRBool)
nsNodeInfo::Equals(const nsAString& aName) const
{
const PRUnichar *name;
mInner.mName->GetUnicode(&name);
return aName.Equals(name);
}
NS_IMETHODIMP_(PRBool)
nsNodeInfo::Equals(const nsAString& aName, const nsAString& aPrefix) const
{
const PRUnichar *name;
mInner.mName->GetUnicode(&name);
if (!aName.Equals(name)) {
return PR_FALSE;
}
if (!mInner.mPrefix) {
return aPrefix.IsEmpty();
}
mInner.mPrefix->GetUnicode(&name);
return aPrefix.Equals(name);
}
NS_IMETHODIMP_(PRBool)
nsNodeInfo::Equals(const nsAString& aName, PRInt32 aNamespaceID) const
{
const PRUnichar *name;
mInner.mName->GetUnicode(&name);
return aName.Equals(name) && (mInner.mNamespaceID == aNamespaceID);
}
NS_IMETHODIMP_(PRBool)
nsNodeInfo::Equals(const nsAString& aName, const nsAString& aPrefix,
PRInt32 aNamespaceID) const
{
PRUnichar nullChar = '\0';
const PRUnichar *name, *prefix = &nullChar;
mInner.mName->GetUnicode(&name);
if (mInner.mPrefix) {
mInner.mPrefix->GetUnicode(&prefix);
}
return ((mInner.mNamespaceID == aNamespaceID) && aName.Equals(name) &&
aPrefix.Equals(prefix));
}
NS_IMETHODIMP_(PRBool)
nsNodeInfo::NamespaceEquals(const nsAString& aNamespaceURI) const
{
nsCOMPtr<nsINameSpaceManager> nsmgr;
NS_ENSURE_SUCCESS(mOwnerManager->GetNamespaceManager(*getter_AddRefs(nsmgr)),
NS_ERROR_NOT_INITIALIZED);
PRInt32 nsid;
nsmgr->GetNameSpaceID(aNamespaceURI, nsid);
return nsINodeInfo::NamespaceEquals(nsid);
}
NS_IMETHODIMP_(PRBool)
nsNodeInfo::QualifiedNameEquals(const nsAString& aQualifiedName) const
{
const PRUnichar *name;
mInner.mName->GetUnicode(&name);
if (!mInner.mPrefix) {
return aQualifiedName.Equals(name);
}
nsAString::const_iterator start;
aQualifiedName.BeginReading(start);
nsAString::const_iterator colon(start);
const PRUnichar *prefix;
mInner.mPrefix->GetUnicode(&prefix);
PRUint32 len = nsCRT::strlen(prefix);
if (len >= aQualifiedName.Length()) {
return PR_FALSE;
}
colon.advance(len);
// If the character at the prefix length index is not a colon,
// aQualifiedName is not equal to this string.
if (*colon != ':') {
return PR_FALSE;
}
// Compare the prefix to the string from the start to the colon
if (!Substring(start, colon).Equals(prefix)) {
return PR_FALSE;
}
++colon; // Skip the ':'
nsAString::const_iterator end;
aQualifiedName.EndReading(end);
// Compare the local name to the string between the colon and the
// end of aQualifiedName
return Substring(colon, end).Equals(name);
}
NS_IMETHODIMP
nsNodeInfo::NameChanged(nsIAtom *aName, nsINodeInfo*& aResult)
{
return mOwnerManager->GetNodeInfo(aName, mInner.mPrefix, mInner.mNamespaceID,
aResult);
}
NS_IMETHODIMP
nsNodeInfo::PrefixChanged(nsIAtom *aPrefix, nsINodeInfo*& aResult)
{
return mOwnerManager->GetNodeInfo(mInner.mName, aPrefix, mInner.mNamespaceID,
aResult);
}
NS_IMETHODIMP
nsNodeInfo::GetDocument(nsIDocument*& aDocument) const
{
return mOwnerManager->GetDocument(aDocument);
}

View File

@@ -0,0 +1,96 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsNodeInfo_h___
#define nsNodeInfo_h___
#include "nsINodeInfo.h"
#include "nsINameSpaceManager.h"
#include "plhash.h"
#include "nsIAtom.h"
#include "nsCOMPtr.h"
class nsNodeInfoManager;
class nsNodeInfo : public nsINodeInfo
{
public:
NS_DECL_ISUPPORTS
// nsINodeInfo
NS_IMETHOD GetQualifiedName(nsAString &aQualifiedName) const;
NS_IMETHOD GetLocalName(nsAString& aLocalName) const;
NS_IMETHOD GetNamespaceURI(nsAString& aNameSpaceURI) const;
NS_IMETHOD GetIDAttributeAtom(nsIAtom** aResult) const;
NS_IMETHOD SetIDAttributeAtom(nsIAtom* aResult);
NS_IMETHOD GetNodeInfoManager(nsINodeInfoManager*& aNodeInfoManager) const;
NS_IMETHOD_(PRBool) Equals(const nsAString& aName) const;
NS_IMETHOD_(PRBool) Equals(const nsAString& aName,
const nsAString& aPrefix) const;
NS_IMETHOD_(PRBool) Equals(const nsAString& aName,
PRInt32 aNamespaceID) const;
NS_IMETHOD_(PRBool) Equals(const nsAString& aName, const nsAString& aPrefix,
PRInt32 aNamespaceID) const;
NS_IMETHOD_(PRBool) NamespaceEquals(const nsAString& aNamespaceURI) const;
NS_IMETHOD_(PRBool) QualifiedNameEquals(const nsAString& aQualifiedName) const;
NS_IMETHOD NameChanged(nsIAtom *aName, nsINodeInfo*& aResult);
NS_IMETHOD PrefixChanged(nsIAtom *aPrefix, nsINodeInfo*& aResult);
NS_IMETHOD GetDocument(nsIDocument*& aDocument) const;
// nsNodeInfo
nsNodeInfo();
virtual ~nsNodeInfo();
/*
* Note! Init() must be called exactly once on every nsNodeInfo before
* the object is used, if Init() returns an error code the nsNodeInfo
* should not be used.
*
* aName and aOwnerManager may not be null.
*/
nsresult Init(nsIAtom *aName, nsIAtom *aPrefix, PRInt32 aNamespaceID,
nsNodeInfoManager *aOwnerManager);
protected:
nsCOMPtr<nsIAtom> mIDAttributeAtom;
nsNodeInfoManager* mOwnerManager; // Strong reference!
};
#endif /* nsNodeInfo_h___ */

View File

@@ -0,0 +1,378 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsNodeInfoManager.h"
#include "nsNodeInfo.h"
#include "nsCOMPtr.h"
#include "nsString.h"
#include "nsIAtom.h"
#include "nsIDocument.h"
nsNodeInfoManager* nsNodeInfoManager::gAnonymousNodeInfoManager = nsnull;
PRUint32 nsNodeInfoManager::gNodeManagerCount = 0;
nsresult NS_NewNodeInfoManager(nsINodeInfoManager** aResult)
{
NS_ENSURE_ARG_POINTER(aResult);
*aResult = new nsNodeInfoManager;
NS_ENSURE_TRUE(*aResult, NS_ERROR_OUT_OF_MEMORY);
NS_ADDREF(*aResult);
return NS_OK;
}
PLHashNumber
nsNodeInfoManager::GetNodeInfoInnerHashValue(const void *key)
{
NS_ASSERTION(key, "Null key passed to nsNodeInfo::GetHashValue!");
const nsINodeInfo::nsNodeInfoInner *node =
NS_REINTERPRET_CAST(const nsINodeInfo::nsNodeInfoInner *, key);
// Is this an acceptable hash value?
return (PLHashNumber(NS_PTR_TO_INT32(node->mName)) & 0xffff) >> 8;
}
PRIntn
nsNodeInfoManager::NodeInfoInnerKeyCompare(const void *key1, const void *key2)
{
NS_ASSERTION(key1 && key2, "Null key passed to NodeInfoInnerKeyCompare!");
const nsINodeInfo::nsNodeInfoInner *node1 =
NS_REINTERPRET_CAST(const nsINodeInfo::nsNodeInfoInner *, key1);
const nsINodeInfo::nsNodeInfoInner *node2 =
NS_REINTERPRET_CAST(const nsINodeInfo::nsNodeInfoInner *, key2);
return (node1->mName == node2->mName &&
node1->mPrefix == node2->mPrefix &&
node1->mNamespaceID == node2->mNamespaceID);
}
nsNodeInfoManager::nsNodeInfoManager()
: mDocument(nsnull)
{
NS_INIT_REFCNT();
if (gNodeManagerCount == 1 && gAnonymousNodeInfoManager) {
/*
* If we get here the global nodeinfo manager was the first one created,
* in that case we're not holding a strong reference to the global nodeinfo
* manager. Now we're creating one more nodeinfo manager so we'll grab
* a strong reference to the global nodeinfo manager so that it's
* lifetime will be longer than the lifetime of the other node managers.
*/
NS_ADDREF(gAnonymousNodeInfoManager);
}
gNodeManagerCount++;
mNodeInfoHash = PL_NewHashTable(32, GetNodeInfoInnerHashValue,
NodeInfoInnerKeyCompare,
PL_CompareValues, nsnull, nsnull);
#ifdef DEBUG_jst
printf ("Creating NodeInfoManager, gcount = %d\n", gNodeManagerCount);
#endif
}
nsNodeInfoManager::~nsNodeInfoManager()
{
gNodeManagerCount--;
if (gNodeManagerCount == 1 && gAnonymousNodeInfoManager) {
NS_RELEASE(gAnonymousNodeInfoManager);
} else if (!gNodeManagerCount) {
/*
* Here we just make sure that we don't leave a dangling pointer to
* the global nodeinfo manager after it's deleted.
*/
gAnonymousNodeInfoManager = nsnull;
}
if (mNodeInfoHash)
PL_HashTableDestroy(mNodeInfoHash);
#ifdef DEBUG_jst
printf ("Removing NodeInfoManager, gcount = %d\n", gNodeManagerCount);
#endif
}
NS_IMPL_THREADSAFE_ISUPPORTS1(nsNodeInfoManager, nsINodeInfoManager);
// nsINodeInfoManager
NS_IMETHODIMP
nsNodeInfoManager::Init(nsIDocument *aDocument,
nsINameSpaceManager *aNameSpaceManager)
{
NS_ENSURE_ARG_POINTER(aNameSpaceManager);
NS_ENSURE_TRUE(mNodeInfoHash, NS_ERROR_OUT_OF_MEMORY);
mDocument = aDocument;
mNameSpaceManager = aNameSpaceManager;
return NS_OK;
}
NS_IMETHODIMP
nsNodeInfoManager::DropDocumentReference()
{
mDocument = nsnull;
return NS_OK;
}
NS_IMETHODIMP
nsNodeInfoManager::GetNodeInfo(nsIAtom *aName, nsIAtom *aPrefix,
PRInt32 aNamespaceID, nsINodeInfo*& aNodeInfo)
{
NS_ENSURE_ARG_POINTER(aName);
nsINodeInfo::nsNodeInfoInner tmpKey(aName, aPrefix, aNamespaceID);
void *node = PL_HashTableLookup(mNodeInfoHash, &tmpKey);
if (node) {
aNodeInfo = NS_STATIC_CAST(nsINodeInfo *, node);
NS_ADDREF(aNodeInfo);
return NS_OK;
}
nsNodeInfo *newNodeInfo = new nsNodeInfo();
NS_ENSURE_TRUE(newNodeInfo, NS_ERROR_OUT_OF_MEMORY);
NS_ADDREF(newNodeInfo);
nsresult rv = newNodeInfo->Init(aName, aPrefix, aNamespaceID, this);
NS_ENSURE_SUCCESS(rv, rv);
PLHashEntry *he;
he = PL_HashTableAdd(mNodeInfoHash, &newNodeInfo->mInner, newNodeInfo);
NS_ENSURE_TRUE(he, NS_ERROR_OUT_OF_MEMORY);
aNodeInfo = newNodeInfo;
return NS_OK;
}
NS_IMETHODIMP
nsNodeInfoManager::GetNodeInfo(const nsAString& aName, nsIAtom *aPrefix,
PRInt32 aNamespaceID, nsINodeInfo*& aNodeInfo)
{
NS_ENSURE_ARG(!aName.IsEmpty());
nsCOMPtr<nsIAtom> name(dont_AddRef(NS_NewAtom(aName)));
NS_ENSURE_TRUE(name, NS_ERROR_OUT_OF_MEMORY);
return GetNodeInfo(name, aPrefix, aNamespaceID, aNodeInfo);
}
NS_IMETHODIMP
nsNodeInfoManager::GetNodeInfo(const nsAString& aName,
const nsAString& aPrefix, PRInt32 aNamespaceID,
nsINodeInfo*& aNodeInfo)
{
NS_ENSURE_ARG(!aName.IsEmpty());
nsCOMPtr<nsIAtom> name(dont_AddRef(NS_NewAtom(aName)));
NS_ENSURE_TRUE(name, NS_ERROR_OUT_OF_MEMORY);
nsCOMPtr<nsIAtom> prefix;
if (!aPrefix.IsEmpty()) {
prefix = dont_AddRef(NS_NewAtom(aPrefix));
NS_ENSURE_TRUE(prefix, NS_ERROR_OUT_OF_MEMORY);
}
return GetNodeInfo(name, prefix, aNamespaceID, aNodeInfo);
}
NS_IMETHODIMP
nsNodeInfoManager::GetNodeInfo(const nsAString& aName,
const nsAString& aPrefix,
const nsAString& aNamespaceURI,
nsINodeInfo*& aNodeInfo)
{
NS_ENSURE_ARG(!aName.IsEmpty());
nsCOMPtr<nsIAtom> name(dont_AddRef(NS_NewAtom(aName)));
NS_ENSURE_TRUE(name, NS_ERROR_OUT_OF_MEMORY);
nsCOMPtr<nsIAtom> prefix;
if (!aPrefix.IsEmpty()) {
prefix = dont_AddRef(NS_NewAtom(aPrefix));
NS_ENSURE_TRUE(prefix, NS_ERROR_OUT_OF_MEMORY);
}
if (!mNameSpaceManager) {
return NS_ERROR_NOT_INITIALIZED;
}
PRInt32 nsid;
nsresult rv = mNameSpaceManager->RegisterNameSpace(aNamespaceURI, nsid);
NS_ENSURE_SUCCESS(rv, rv);
return GetNodeInfo(name, prefix, nsid, aNodeInfo);
}
NS_IMETHODIMP
nsNodeInfoManager::GetNodeInfo(const nsAString& aQualifiedName,
const nsAString& aNamespaceURI,
nsINodeInfo*& aNodeInfo)
{
NS_ENSURE_ARG(!aQualifiedName.IsEmpty());
nsAutoString name(aQualifiedName);
nsAutoString prefix;
PRInt32 nsoffset = name.FindChar(':');
if (-1 != nsoffset) {
name.Left(prefix, nsoffset);
name.Cut(0, nsoffset+1);
}
nsCOMPtr<nsIAtom> nameAtom(dont_AddRef(NS_NewAtom(name)));
NS_ENSURE_TRUE(nameAtom, NS_ERROR_OUT_OF_MEMORY);
nsCOMPtr<nsIAtom> prefixAtom;
if (!prefix.IsEmpty()) {
prefixAtom = dont_AddRef(NS_NewAtom(prefix));
NS_ENSURE_TRUE(prefixAtom, NS_ERROR_OUT_OF_MEMORY);
}
PRInt32 nsid = kNameSpaceID_None;
if (!aNamespaceURI.IsEmpty()) {
NS_ENSURE_TRUE(mNameSpaceManager, NS_ERROR_NOT_INITIALIZED);
nsresult rv = mNameSpaceManager->RegisterNameSpace(aNamespaceURI, nsid);
NS_ENSURE_SUCCESS(rv, rv);
}
return GetNodeInfo(nameAtom, prefixAtom, nsid, aNodeInfo);
}
NS_IMETHODIMP
nsNodeInfoManager::GetNamespaceManager(nsINameSpaceManager*& aNameSpaceManager)
{
NS_ENSURE_TRUE(mNameSpaceManager, NS_ERROR_NOT_INITIALIZED);
aNameSpaceManager = mNameSpaceManager;
NS_ADDREF(aNameSpaceManager);
return NS_OK;
}
NS_IMETHODIMP
nsNodeInfoManager::GetDocument(nsIDocument*& aDocument)
{
aDocument = mDocument;
NS_IF_ADDREF(aDocument);
return NS_OK;
}
void
nsNodeInfoManager::RemoveNodeInfo(nsNodeInfo *aNodeInfo)
{
NS_WARN_IF_FALSE(aNodeInfo, "Trying to remove null nodeinfo from manager!");
if (aNodeInfo) {
PRBool ret = PL_HashTableRemove(mNodeInfoHash, &aNodeInfo->mInner);
NS_WARN_IF_FALSE(ret, "Can't find nsINodeInfo to remove!!!");
}
}
nsresult
nsNodeInfoManager::GetAnonymousManager(nsINodeInfoManager*& aNodeInfoManager)
{
if (!gAnonymousNodeInfoManager) {
gAnonymousNodeInfoManager = new nsNodeInfoManager;
if (!gAnonymousNodeInfoManager)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(gAnonymousNodeInfoManager);
nsresult rv = NS_NewNameSpaceManager(getter_AddRefs(gAnonymousNodeInfoManager->mNameSpaceManager));
if (NS_FAILED(rv)) {
NS_RELEASE(gAnonymousNodeInfoManager);
return rv;
}
}
aNodeInfoManager = gAnonymousNodeInfoManager;
/*
* If the only nodeinfo manager is the global one we don't hold a ref
* since the global nodeinfo manager should be destroyed when it's released,
* even if it's the last one arround.
*/
if (gNodeManagerCount > 1) {
NS_ADDREF(aNodeInfoManager);
}
return NS_OK;
}

View File

@@ -0,0 +1,108 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsNodeInfoManager_h___
#define nsNodeInfoManager_h___
#include "nsINodeInfo.h"
#include "nsINameSpaceManager.h"
#include "nsCOMPtr.h"
#include "plhash.h"
class nsNodeInfo;
class nsNodeInfoManager : public nsINodeInfoManager
{
public:
NS_DECL_ISUPPORTS
// nsINodeInfoManager
NS_IMETHOD Init(nsIDocument *aDocument,
nsINameSpaceManager *aNameSpaceManager);
NS_IMETHOD DropDocumentReference();
NS_IMETHOD GetNodeInfo(nsIAtom *aName, nsIAtom *aPrefix,
PRInt32 aNamespaceID, nsINodeInfo*& aNodeInfo);
NS_IMETHOD GetNodeInfo(const nsAString& aName, nsIAtom *aPrefix,
PRInt32 aNamespaceID, nsINodeInfo*& aNodeInfo);
NS_IMETHOD GetNodeInfo(const nsAString& aName, const nsAString& aPrefix,
PRInt32 aNamespaceID, nsINodeInfo*& aNodeInfo);
NS_IMETHOD GetNodeInfo(const nsAString& aName, const nsAString& aPrefix,
const nsAString& aNamespaceURI,
nsINodeInfo*& aNodeInfo);
NS_IMETHOD GetNodeInfo(const nsAString& aQualifiedName,
const nsAString& aNamespaceURI,
nsINodeInfo*& aNodeInfo);
NS_IMETHOD GetNamespaceManager(nsINameSpaceManager*& aNameSpaceManager);
NS_IMETHOD GetDocument(nsIDocument*& aDocument);
// nsNodeInfoManager
nsNodeInfoManager();
virtual ~nsNodeInfoManager();
void RemoveNodeInfo(nsNodeInfo *aNodeInfo);
static nsresult GetAnonymousManager(nsINodeInfoManager*& aNodeInfoManager);
private:
static PRIntn PR_CALLBACK NodeInfoInnerKeyCompare(const void *key1,
const void *key2);
static PLHashNumber PR_CALLBACK GetNodeInfoInnerHashValue(const void *key);
PLHashTable *mNodeInfoHash;
nsCOMPtr<nsINameSpaceManager> mNameSpaceManager;
nsIDocument *mDocument; // WEAK
/*
* gAnonymousNodeInfoManager is a global nodeinfo manager used for nodes
* that are no longer part of a document and for nodes that are created
* where no document is accessible.
*
* gAnonymousNodeInfoManager is allocated when requested for the first time
* and once the last nodeinfo manager (appart from gAnonymousNodeInfoManager)
* is destroyed gAnonymousNodeInfoManager is destroyed. If the global
* nodeinfo manager is the only nodeinfo manager used it can be deleted
* and later reallocated if all users of the nodeinfo manager drops the
* referernces to it.
*/
static nsNodeInfoManager *gAnonymousNodeInfoManager;
static PRUint32 gNodeManagerCount;
};
#endif /* nsNodeInfoManager_h___ */

View File

@@ -0,0 +1,161 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsParserUtils.h"
#include "nsIParser.h" // for kQuote et. al.
#include "jsapi.h"
#include "nsReadableUtils.h"
#include "nsCRT.h"
PRBool
nsParserUtils::GetQuotedAttributeValue(const nsAString& aSource,
const nsAString& aAttribute,
nsAString& aValue)
{
aValue.Truncate();
nsAString::const_iterator start, end;
aSource.BeginReading(start);
aSource.EndReading(end);
nsAString::const_iterator iter(end);
while (start != end) {
if (FindInReadable(aAttribute, start, iter)) {
// walk past any whitespace
while (iter != end && nsCRT::IsAsciiSpace(*iter)) {
++iter;
}
if (iter == end)
break;
// valid name="value" pair?
if (*iter != '=') {
start = iter;
iter = end;
continue;
}
// move past the =
++iter;
while (iter != end && nsCRT::IsAsciiSpace(*iter)) {
++iter;
}
if (iter == end)
break;
PRUnichar q = *iter;
if (q != '"' && q != '\'') {
start = iter;
iter = end;
continue;
}
// point to the first char of the value
++iter;
start = iter;
if (FindCharInReadable(q, iter, end)) {
aValue = Substring(start, iter);
return PR_TRUE;
}
// we've run out of string. Just return...
break;
}
}
return PR_FALSE;
}
// XXX Stolen from nsHTMLContentSink. Needs to be shared.
// XXXbe share also with nsRDFParserUtils.cpp and nsHTMLContentSink.cpp
// Returns PR_TRUE if the language name is a version of JavaScript and
// PR_FALSE otherwise
PRBool
nsParserUtils::IsJavaScriptLanguage(const nsString& aName, const char* *aVersion)
{
JSVersion version = JSVERSION_UNKNOWN;
if (aName.EqualsIgnoreCase("JavaScript") ||
aName.EqualsIgnoreCase("LiveScript") ||
aName.EqualsIgnoreCase("Mocha")) {
version = JSVERSION_DEFAULT;
}
else if (aName.EqualsIgnoreCase("JavaScript1.0")) {
version = JSVERSION_1_0;
}
else if (aName.EqualsIgnoreCase("JavaScript1.1")) {
version = JSVERSION_1_1;
}
else if (aName.EqualsIgnoreCase("JavaScript1.2")) {
version = JSVERSION_1_2;
}
else if (aName.EqualsIgnoreCase("JavaScript1.3")) {
version = JSVERSION_1_3;
}
else if (aName.EqualsIgnoreCase("JavaScript1.4")) {
version = JSVERSION_1_4;
}
else if (aName.EqualsIgnoreCase("JavaScript1.5")) {
version = JSVERSION_1_5;
}
if (version == JSVERSION_UNKNOWN)
return PR_FALSE;
*aVersion = JS_VersionToString(version);
return PR_TRUE;
}
void
nsParserUtils::SplitMimeType(const nsAString& aValue, nsString& aType,
nsString& aParams)
{
aType.Truncate();
aParams.Truncate();
PRInt32 semiIndex = aValue.FindChar(PRUnichar(';'));
if (-1 != semiIndex) {
aType = Substring(aValue, 0, semiIndex);
aParams = Substring(aValue, semiIndex + 1,
aValue.Length() - (semiIndex + 1));
aParams.StripWhitespace();
}
else {
aType = aValue;
}
aType.StripWhitespace();
}

View File

@@ -0,0 +1,62 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsParserUtils_h__
#define nsParserUtils_h__
#include "nsString.h"
class nsParserUtils {
public:
static PRBool
GetQuotedAttributeValue(const nsAString& aSource,
const nsAString& aAttribute,
nsAString& aValue);
static PRBool
IsJavaScriptLanguage(const nsString& aName, const char* *aVersion);
static void
SplitMimeType(const nsAString& aValue, nsString& aType,
nsString& aParams);
};
#endif // nsParserUtils_h__

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,260 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsPlainTextSerializer_h__
#define nsPlainTextSerializer_h__
#include "nsIContentSerializer.h"
#include "nsIHTMLContentSink.h"
#include "nsHTMLTags.h"
#include "nsCOMPtr.h"
#include "nsString.h"
#include "nsILineBreaker.h"
#include "nsIParserService.h"
#include "nsIContent.h"
#include "nsIAtom.h"
#include "nsIHTMLToTextSink.h"
#include "nsIDocumentEncoder.h"
class nsPlainTextSerializer : public nsIContentSerializer,
public nsIHTMLContentSink,
public nsIHTMLToTextSink
{
public:
nsPlainTextSerializer();
virtual ~nsPlainTextSerializer();
NS_DECL_ISUPPORTS
// nsIContentSerializer
NS_IMETHOD Init(PRUint32 flags, PRUint32 aWrapColumn,
nsIAtom* aCharSet, PRBool aIsCopying);
NS_IMETHOD AppendText(nsIDOMText* aText, PRInt32 aStartOffset,
PRInt32 aEndOffset, nsAString& aStr);
NS_IMETHOD AppendCDATASection(nsIDOMCDATASection* aCDATASection,
PRInt32 aStartOffset, PRInt32 aEndOffset,
nsAString& aStr) { return NS_OK; }
NS_IMETHOD AppendProcessingInstruction(nsIDOMProcessingInstruction* aPI,
PRInt32 aStartOffset,
PRInt32 aEndOffset,
nsAString& aStr) { return NS_OK; }
NS_IMETHOD AppendComment(nsIDOMComment* aComment, PRInt32 aStartOffset,
PRInt32 aEndOffset, nsAString& aStr) { return NS_OK; }
NS_IMETHOD AppendDoctype(nsIDOMDocumentType *aDoctype,
nsAString& aStr) { return NS_OK; }
NS_IMETHOD AppendElementStart(nsIDOMElement *aElement,
PRBool aHasChildren,
nsAString& aStr);
NS_IMETHOD AppendElementEnd(nsIDOMElement *aElement,
nsAString& aStr);
NS_IMETHOD Flush(nsAString& aStr);
// nsIContentSink
NS_IMETHOD WillBuildModel(void) { return NS_OK; }
NS_IMETHOD DidBuildModel(PRInt32 aQualityLevel) { return NS_OK; }
NS_IMETHOD WillInterrupt(void) { return NS_OK; }
NS_IMETHOD WillResume(void) { return NS_OK; }
NS_IMETHOD SetParser(nsIParser* aParser) { return NS_OK; }
NS_IMETHOD OpenContainer(const nsIParserNode& aNode);
NS_IMETHOD CloseContainer(const nsIParserNode& aNode);
NS_IMETHOD AddLeaf(const nsIParserNode& aNode);
NS_IMETHOD AddComment(const nsIParserNode& aNode) { return NS_OK; }
NS_IMETHOD AddProcessingInstruction(const nsIParserNode& aNode) { return NS_OK; }
NS_IMETHOD AddDocTypeDecl(const nsIParserNode& aNode) { return NS_OK; }
NS_IMETHOD FlushPendingNotifications() { return NS_OK; }
NS_IMETHOD SetDocumentCharset(nsAString& aCharset) { return NS_OK; }
NS_IMETHOD NotifyTagObservers(nsIParserNode* aNode) { return NS_OK; }
// nsIHTMLContentSink
NS_IMETHOD SetTitle(const nsString& aValue) { return NS_OK; }
NS_IMETHOD OpenHTML(const nsIParserNode& aNode);
NS_IMETHOD CloseHTML(const nsIParserNode& aNode);
NS_IMETHOD OpenHead(const nsIParserNode& aNode);
NS_IMETHOD CloseHead(const nsIParserNode& aNode);
NS_IMETHOD OpenBody(const nsIParserNode& aNode);
NS_IMETHOD CloseBody(const nsIParserNode& aNode);
NS_IMETHOD OpenForm(const nsIParserNode& aNode);
NS_IMETHOD CloseForm(const nsIParserNode& aNode);
NS_IMETHOD OpenMap(const nsIParserNode& aNode);
NS_IMETHOD CloseMap(const nsIParserNode& aNode);
NS_IMETHOD OpenFrameset(const nsIParserNode& aNode);
NS_IMETHOD CloseFrameset(const nsIParserNode& aNode);
NS_IMETHOD GetPref(PRInt32 aTag,PRBool& aPref);
NS_IMETHOD_(PRBool) IsFormOnStack() { return PR_FALSE; }
NS_IMETHOD DoFragment(PRBool aFlag);
NS_IMETHOD BeginContext(PRInt32 aPosition) { return NS_OK; }
NS_IMETHOD EndContext(PRInt32 aPosition) { return NS_OK; }
NS_IMETHOD WillProcessTokens(void) { return NS_OK; }
NS_IMETHOD DidProcessTokens(void) { return NS_OK; }
NS_IMETHOD WillProcessAToken(void) { return NS_OK; }
NS_IMETHOD DidProcessAToken(void) { return NS_OK; }
// nsIHTMLToTextSink
NS_IMETHOD Initialize(nsAString* aOutString,
PRUint32 aFlags, PRUint32 aWrapCol);
protected:
nsresult GetAttributeValue(nsIAtom* aName, nsString& aValueRet);
void AddToLine(const PRUnichar* aStringToAdd, PRInt32 aLength);
void EndLine(PRBool softlinebreak);
void EnsureVerticalSpace(PRInt32 noOfRows);
void FlushLine();
void OutputQuotesAndIndent(PRBool stripTrailingSpaces=PR_FALSE);
void Output(nsString& aString);
void Write(const nsAString& aString);
PRBool IsBlockLevel(PRInt32 aId);
PRBool IsContainer(PRInt32 aId);
PRBool IsInPre();
PRBool IsCurrentNodeConverted();
nsresult GetIdForContent(nsIContent* aContent, PRInt32* aID);
nsresult GetParserService(nsIParserService** aParserService);
nsresult DoOpenContainer(PRInt32 aTag);
nsresult DoCloseContainer(PRInt32 aTag);
nsresult DoAddLeaf(PRInt32 aTag, const nsAString& aText);
// Inlined functions
inline PRBool MayWrap()
{
return mWrapColumn &&
((mFlags & nsIDocumentEncoder::OutputFormatted) ||
(mFlags & nsIDocumentEncoder::OutputWrap));
}
inline PRBool DoOutput()
{
return !mInHead;
}
protected:
nsString mCurrentLine;
PRPackedBool mInHead;
PRPackedBool mAtFirstColumn;
// Handling of quoted text (for mail):
// Quotes need to be wrapped differently from non-quoted text,
// because quoted text has a few extra characters (e.g. ">> ")
// which makes the line length longer.
// Mail can represent quotes in different ways: it can wrap
// quotes in a <pre> (if editor.quotesPreformatted is set),
// or not wrapped in any special tag (if mail.compose.wrap_to_window_width)
// or in a <span> (if neither of the above are set).
PRPackedBool mQuotesPreformatted; // expect quotes wrapped in <pre>
PRPackedBool mDontWrapAnyQuotes; // no special quote markers
PRPackedBool mStructs; // Output structs (pref)
PRInt32 mIndent;
// mInIndentString keeps a header that has to be written in the indent.
// That could be, for instance, the bullet in a bulleted list.
nsString mInIndentString;
PRInt32 mCiteQuoteLevel;
PRInt32 mFlags;
PRInt32 mFloatingLines; // To store the number of lazy line breaks
// The wrap column is how many standard sized chars (western languages)
// should be allowed on a line. There could be less chars if the chars
// are wider than latin chars of more if the chars are more narrow.
PRUint32 mWrapColumn;
// The width of the line as it will appear on the screen (approx.)
PRUint32 mCurrentLineWidth;
// Treat quoted text as though it's preformatted -- don't wrap it.
// Having it on a pref is a temporary measure, See bug 69638.
PRInt32 mSpanLevel;
PRInt32 mEmptyLines; // Will be the number of empty lines before
// the current. 0 if we are starting a new
// line and -1 if we are in a line.
PRPackedBool mInWhitespace;
PRPackedBool mPreFormatted;
PRPackedBool mStartedOutput; // we've produced at least a character
// While handling a new tag, this variable should remind if any line break
// is due because of a closing tag. Setting it to "TRUE" while closing the tags.
// Hence opening tags are guaranteed to start with appropriate line breaks.
PRPackedBool mLineBreakDue;
nsString mURL;
PRInt32 mHeaderStrategy; /* Header strategy (pref)
0 = no indention
1 = indention, increased with
header level (default)
2 = numbering and slight indention */
PRInt32 mHeaderCounter[7]; /* For header-numbering:
Number of previous headers of
the same depth and in the same
section.
mHeaderCounter[1] for <h1> etc. */
nsCOMPtr<nsIContent> mContent;
nsIParserNode* mParserNode;
nsAString* mOutputString;
// The tag stack: the stack of tags we're operating on, so we can nest:
nsHTMLTag *mTagStack;
PRUint32 mTagStackIndex;
// Content in the stack above this index should be ignored:
PRUint32 mIgnoreAboveIndex;
// The stack for ordered lists:
PRInt32 *mOLStack;
PRUint32 mOLStackIndex;
PRUint32 mULCount;
nsString mLineBreak;
nsCOMPtr<nsILineBreaker> mLineBreaker;
nsCOMPtr<nsIParserService> mParserService;
// Conveniance constant. It would be nice to have it as a const static
// variable, but that causes issues with OpenBSD and module unloading.
const nsString kSpace;
};
extern nsresult NS_NewPlainTextSerializer(nsIContentSerializer** aSerializer);
#endif

View File

@@ -0,0 +1,189 @@
/* -*- Mode: C++; tab-width: 4; 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 the Mozilla browser.
*
* The Initial Developer of the Original Code is Netscape
* Communications, Inc. Portions created by Netscape are
* Copyright (C) 1999, Mozilla. All Rights Reserved.
*
* Contributor(s):
*
*/
#include "nsPrintPreviewListener.h"
#include "nsIDOMKeyEvent.h"
NS_IMPL_ADDREF(nsPrintPreviewListener)
NS_IMPL_RELEASE(nsPrintPreviewListener)
NS_INTERFACE_MAP_BEGIN(nsPrintPreviewListener)
NS_INTERFACE_MAP_ENTRY(nsIDOMContextMenuListener)
NS_INTERFACE_MAP_ENTRY(nsIDOMKeyListener)
NS_INTERFACE_MAP_ENTRY(nsIDOMMouseListener)
NS_INTERFACE_MAP_ENTRY(nsIDOMMouseMotionListener)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsIDOMEventListener, nsIDOMContextMenuListener)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMContextMenuListener)
NS_INTERFACE_MAP_END
//
// nsPrintPreviewListener ctor
//
nsPrintPreviewListener::nsPrintPreviewListener (nsIDOMEventReceiver* aEVRec)
: mEventReceiver(aEVRec),
mRegFlags(REG_NONE_LISTENER)
{
NS_INIT_REFCNT();
NS_ADDREF_THIS();
} // ctor
//-------------------------------------------------------
//
// AddListeners
//
// Subscribe to the events that will allow us to track various events.
//
nsresult
nsPrintPreviewListener::AddListeners()
{
if (mRegFlags != REG_NONE_LISTENER) return NS_ERROR_FAILURE;
if (mEventReceiver) {
nsIDOMContextMenuListener *pListener = NS_STATIC_CAST(nsIDOMContextMenuListener *, this);
NS_ASSERTION(pListener, "Cast can't fail!");
nsresult rv = mEventReceiver->AddEventListenerByIID(pListener, NS_GET_IID(nsIDOMContextMenuListener));
NS_ENSURE_SUCCESS(rv, rv);
mRegFlags |= REG_CONTEXTMENU_LISTENER;
rv = mEventReceiver->AddEventListenerByIID(pListener, NS_GET_IID(nsIDOMKeyListener));
NS_ENSURE_SUCCESS(rv, rv);
mRegFlags |= REG_KEY_LISTENER;
rv = mEventReceiver->AddEventListenerByIID(pListener, NS_GET_IID(nsIDOMMouseListener));
NS_ENSURE_SUCCESS(rv, rv);
mRegFlags |= REG_MOUSE_LISTENER;
rv = mEventReceiver->AddEventListenerByIID(pListener, NS_GET_IID(nsIDOMMouseMotionListener));
NS_ENSURE_SUCCESS(rv, rv);
mRegFlags |= REG_MOUSEMOTION_LISTENER;
}
return NS_OK;
}
//-------------------------------------------------------
//
// RemoveListeners
//
// Unsubscribe from all the various events that we were listening to.
//
nsresult
nsPrintPreviewListener::RemoveListeners()
{
if (mEventReceiver && mRegFlags != REG_NONE_LISTENER) {
nsIDOMContextMenuListener *pListener = NS_STATIC_CAST(nsIDOMContextMenuListener *, this);
NS_ASSERTION(pListener, "Cast can't fail!");
// ignore return values, so we can try to unregister the other listeners
if (mRegFlags & REG_CONTEXTMENU_LISTENER) {
mEventReceiver->RemoveEventListenerByIID(pListener, NS_GET_IID(nsIDOMContextMenuListener));
}
if (mRegFlags & REG_KEY_LISTENER) {
mEventReceiver->RemoveEventListenerByIID(pListener, NS_GET_IID(nsIDOMKeyListener));
}
if (mRegFlags & REG_MOUSE_LISTENER) {
mEventReceiver->RemoveEventListenerByIID(pListener, NS_GET_IID(nsIDOMMouseListener));
}
if (mRegFlags & REG_MOUSEMOTION_LISTENER) {
mEventReceiver->RemoveEventListenerByIID(pListener, NS_GET_IID(nsIDOMMouseMotionListener));
}
}
return NS_OK;
}
//-------------------------------------------------------
//
// IsKeyOK
//
// Helper function to let certain key events thru
//
static PRBool IsKeyOK(nsIDOMEvent* aEvent)
{
const PRUint32 kOKKeyCodes[] = {nsIDOMKeyEvent::DOM_VK_PAGE_UP, nsIDOMKeyEvent::DOM_VK_PAGE_DOWN,
nsIDOMKeyEvent::DOM_VK_UP, nsIDOMKeyEvent::DOM_VK_DOWN,
nsIDOMKeyEvent::DOM_VK_HOME, nsIDOMKeyEvent::DOM_VK_END,
nsIDOMKeyEvent::DOM_VK_TAB, 0};
nsCOMPtr<nsIDOMKeyEvent> keyEvent(do_QueryInterface(aEvent));
if (keyEvent) {
PRBool b;
keyEvent->GetAltKey(&b);
if (b) return PR_FALSE;
keyEvent->GetCtrlKey(&b);
if (b) return PR_FALSE;
keyEvent->GetShiftKey(&b);
if (b) return PR_FALSE;
PRUint32 keyCode;
keyEvent->GetKeyCode(&keyCode);
PRInt32 i = 0;
while (kOKKeyCodes[i] != 0) {
if (keyCode == kOKKeyCodes[i]) {
return PR_TRUE;
}
i++;
}
}
return PR_FALSE;
}
//-------------------------------------------------------
//
// KeyDown
//
NS_IMETHODIMP nsPrintPreviewListener::KeyDown(nsIDOMEvent* aKeyEvent)
{
if (!IsKeyOK(aKeyEvent)) {
aKeyEvent->PreventDefault();
}
return NS_OK;
}
//-------------------------------------------------------
//
// KeyUp
//
NS_IMETHODIMP nsPrintPreviewListener::KeyUp(nsIDOMEvent* aKeyEvent)
{
if (!IsKeyOK(aKeyEvent)) {
aKeyEvent->PreventDefault();
}
return NS_OK;
}
//-------------------------------------------------------
//
// KeyPress
//
NS_IMETHODIMP nsPrintPreviewListener::KeyPress(nsIDOMEvent* aKeyEvent)
{
if (!IsKeyOK(aKeyEvent)) {
aKeyEvent->PreventDefault();
}
return NS_OK;
}

View File

@@ -0,0 +1,98 @@
/* -*- Mode: C++; tab-width: 4; 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 the Mozilla browser.
*
* The Initial Developer of the Original Code is Netscape
* Communications, Inc. Portions created by Netscape are
* Copyright (C) 1999, Mozilla. All Rights Reserved.
*
* Contributor(s):
*
*/
#ifndef nsPrintPreviewListener_h__
#define nsPrintPreviewListener_h__
// Interfaces needed to be included
#include "nsIDOMContextMenuListener.h"
#include "nsIDOMKeyListener.h"
#include "nsIDOMMouseListener.h"
#include "nsIDOMMouseMotionListener.h"
// Helper Classes
#include "nsIDOMEventReceiver.h"
#include "nsCOMPtr.h"
#define REG_NONE_LISTENER 0x00
#define REG_CONTEXTMENU_LISTENER 0x01
#define REG_KEY_LISTENER 0x02
#define REG_MOUSE_LISTENER 0x04
#define REG_MOUSEMOTION_LISTENER 0x08
//
// class nsPrintPreviewListener
//
// The class that listens to the chrome events and tells the embedding
// chrome to show context menus, as appropriate. Handles registering itself
// with the DOM with AddChromeListeners() and removing itself with
// RemoveChromeListeners().
//
class nsPrintPreviewListener : public nsIDOMContextMenuListener,
public nsIDOMKeyListener,
public nsIDOMMouseListener,
public nsIDOMMouseMotionListener
{
public:
NS_DECL_ISUPPORTS
nsPrintPreviewListener(nsIDOMEventReceiver* aEVRec);
virtual ~nsPrintPreviewListener()
{
}
// nsIDOMContextMenuListener
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) { return NS_OK; }
NS_IMETHOD ContextMenu (nsIDOMEvent* aEvent) { aEvent->PreventDefault(); return NS_OK; }
// nsIDOMKeyListener
NS_IMETHOD KeyDown(nsIDOMEvent* aKeyEvent);
NS_IMETHOD KeyUp(nsIDOMEvent* aKeyEvent);
NS_IMETHOD KeyPress(nsIDOMEvent* aKeyEvent);
// nsIDOMMouseListener
NS_IMETHOD MouseDown(nsIDOMEvent* aMouseEvent) { aMouseEvent->StopPropagation();aMouseEvent->PreventDefault(); return NS_OK; }
NS_IMETHOD MouseUp(nsIDOMEvent* aMouseEvent) { aMouseEvent->StopPropagation();aMouseEvent->PreventDefault(); return NS_OK; }
NS_IMETHOD MouseClick(nsIDOMEvent* aMouseEvent) { aMouseEvent->StopPropagation();aMouseEvent->PreventDefault(); return NS_OK; }
NS_IMETHOD MouseDblClick(nsIDOMEvent* aMouseEvent) { aMouseEvent->StopPropagation();aMouseEvent->PreventDefault(); return NS_OK; }
NS_IMETHOD MouseOver(nsIDOMEvent* aMouseEvent) { aMouseEvent->StopPropagation();aMouseEvent->PreventDefault(); return NS_OK; }
NS_IMETHOD MouseOut(nsIDOMEvent* aMouseEvent) { aMouseEvent->StopPropagation();aMouseEvent->PreventDefault(); return NS_OK; }
// nsIDOMMouseMotionListener
NS_IMETHOD DragMove(nsIDOMEvent* aMouseEvent) { return NS_OK; };
NS_IMETHOD MouseMove(nsIDOMEvent* aMouseEvent) { aMouseEvent->PreventDefault(); return NS_OK; }
// Add/remove the relevant listeners, based on what interfaces
// the embedding chrome implements.
nsresult AddListeners();
nsresult RemoveListeners();
private:
nsCOMPtr<nsIDOMEventReceiver> mEventReceiver;
PRInt8 mRegFlags;
}; // class nsPrintPreviewListener
#endif /* nsPrintPreviewListener_h__ */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,277 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsRange_h___
#define nsRange_h___
/*
* nsRange.h: interface of the nsRange object.
*/
#include "nsIDOMRange.h"
#include "nsIRangeUtils.h"
#include "nsIDOMNSRange.h"
#include "nsCOMPtr.h"
#include "nsIDOMDocumentFragment.h"
#include "nsIContent.h"
#include "nsIDOMNode.h"
#include "prmon.h"
class nsVoidArray;
// -------------------------------------------------------------------------------
class nsRangeUtils : public nsIRangeUtils
{
public:
NS_DECL_ISUPPORTS
nsRangeUtils();
virtual ~nsRangeUtils();
// nsIRangeUtils interface
NS_IMETHOD_(PRInt32) ComparePoints(nsIDOMNode* aParent1, PRInt32 aOffset1,
nsIDOMNode* aParent2, PRInt32 aOffset2);
NS_IMETHOD_(PRBool) IsNodeIntersectsRange(nsIContent* aNode, nsIDOMRange* aRange);
NS_IMETHOD CompareNodeToRange(nsIContent* aNode,
nsIDOMRange* aRange,
PRBool *outNodeBefore,
PRBool *outNodeAfter);
};
// -------------------------------------------------------------------------------
class nsRange : public nsIDOMRange,
public nsIDOMNSRange
{
public:
NS_DECL_ISUPPORTS
nsRange();
virtual ~nsRange();
// for layout module destructor
static void Shutdown();
// nsIDOMRange interface
NS_IMETHOD GetIsPositioned(PRBool* aIsPositioned);
NS_IMETHOD GetStartContainer(nsIDOMNode** aStartParent);
NS_IMETHOD GetStartOffset(PRInt32* aStartOffset);
NS_IMETHOD GetEndContainer(nsIDOMNode** aEndParent);
NS_IMETHOD GetEndOffset(PRInt32* aEndOffset);
NS_IMETHOD GetCollapsed(PRBool* aIsCollapsed);
NS_IMETHOD GetCommonAncestorContainer(nsIDOMNode** aCommonParent);
NS_IMETHOD SetStart(nsIDOMNode* aParent, PRInt32 aOffset);
NS_IMETHOD SetStartBefore(nsIDOMNode* aSibling);
NS_IMETHOD SetStartAfter(nsIDOMNode* aSibling);
NS_IMETHOD SetEnd(nsIDOMNode* aParent, PRInt32 aOffset);
NS_IMETHOD SetEndBefore(nsIDOMNode* aSibling);
NS_IMETHOD SetEndAfter(nsIDOMNode* aSibling);
NS_IMETHOD Collapse(PRBool aToStart);
NS_IMETHOD Unposition();
NS_IMETHOD SelectNode(nsIDOMNode* aN);
NS_IMETHOD SelectNodeContents(nsIDOMNode* aN);
NS_IMETHOD CompareBoundaryPoints(PRUint16 how, nsIDOMRange* srcRange, PRInt32* ret);
NS_IMETHOD DeleteContents();
NS_IMETHOD ExtractContents(nsIDOMDocumentFragment** aReturn);
NS_IMETHOD CloneContents(nsIDOMDocumentFragment** aReturn);
NS_IMETHOD InsertNode(nsIDOMNode* aN);
NS_IMETHOD SurroundContents(nsIDOMNode* aN);
NS_IMETHOD CloneRange(nsIDOMRange** aReturn);
NS_IMETHOD Detach();
NS_IMETHOD ToString(nsAString& aReturn);
/*BEGIN nsIDOMNSRange interface implementations*/
NS_IMETHOD CreateContextualFragment(const nsAString& aFragment,
nsIDOMDocumentFragment** aReturn);
NS_IMETHOD IsPointInRange(nsIDOMNode* aParent, PRInt32 aOffset,
PRBool* aResult);
NS_IMETHOD ComparePoint(nsIDOMNode* aParent, PRInt32 aOffset,
PRInt16* aResult);
NS_IMETHOD IntersectsNode(nsIDOMNode* aNode, PRBool* aReturn);
NS_IMETHOD CompareNode(nsIDOMNode* aNode, PRUint16* aReturn);
NS_IMETHOD NSDetach();
/*END nsIDOMNSRange interface implementations*/
NS_IMETHOD GetHasGeneratedBefore(PRBool *aBool);
NS_IMETHOD GetHasGeneratedAfter(PRBool *aBool);
NS_IMETHOD SetHasGeneratedBefore(PRBool aBool);
NS_IMETHOD SetHasGeneratedAfter(PRBool aBool);
NS_IMETHOD SetBeforeAndAfter(PRBool aBefore, PRBool aAfter);
// nsRange interface extensions
static NS_METHOD OwnerGone(nsIContent* aParentNode);
static NS_METHOD OwnerChildInserted(nsIContent* aParentNode, PRInt32 aOffset);
static NS_METHOD OwnerChildRemoved(nsIContent* aParentNode, PRInt32 aOffset, nsIContent* aRemovedNode);
static NS_METHOD OwnerChildReplaced(nsIContent* aParentNode, PRInt32 aOffset, nsIContent* aReplacedNode);
static NS_METHOD TextOwnerChanged(nsIContent* aTextNode, PRInt32 aStartOffset, PRInt32 aEndOffset, PRInt32 aReplaceLength);
protected:
PRPackedBool mBeforeGenContent;
PRPackedBool mAfterGenContent;
PRPackedBool mIsPositioned;
PRPackedBool mIsDetached;
PRInt32 mStartOffset;
PRInt32 mEndOffset;
nsCOMPtr<nsIDOMNode> mStartParent;
nsCOMPtr<nsIDOMNode> mEndParent;
static PRMonitor *mMonitor; // monitor to protect the following statics
static nsVoidArray *mStartAncestors; // just keeping these static to avoid reallocing the arrays.
static nsVoidArray *mEndAncestors; // the contents of these arrays are discarded across calls.
static nsVoidArray *mStartAncestorOffsets; // this also makes nsRange objects lighter weight.
static nsVoidArray *mEndAncestorOffsets; //
// no copy's or assigns
nsRange(const nsRange&);
nsRange& operator=(const nsRange&);
public:
// helper routines
static PRInt32 IndexOf(nsIDOMNode* aNode);
static nsresult GetDOMNodeFromContent(nsIContent* inContentNode, nsCOMPtr<nsIDOMNode>* outDomNode);
static nsresult GetContentFromDOMNode(nsIDOMNode* inDomNode, nsCOMPtr<nsIContent>* outContentNode);
static nsresult PopRanges(nsIDOMNode* aDestNode, PRInt32 aOffset, nsIContent* aSourceNode);
static nsresult Lock();
static nsresult Unlock();
static nsresult CloneParentsBetween(nsIDOMNode* aAncestor,
nsIDOMNode* aNode,
nsIDOMNode** closestAncestor,
nsIDOMNode** farthestAncestor);
protected:
// CollapseRangeAfterDelete() should only be called from DeleteContents()
// or ExtractContents() since it makes certain assumptions about the state
// of the range used. It's purpose is to collapse the range according to
// the range spec after the removal of nodes within the range.
static nsresult CollapseRangeAfterDelete(nsIDOMRange *aRange);
nsresult DoSetRange(nsIDOMNode* aStartN, PRInt32 aStartOffset,
nsIDOMNode* aEndN, PRInt32 aEndOffset);
PRBool IsIncreasing(nsIDOMNode* aStartN, PRInt32 aStartOff,
nsIDOMNode* aEndN, PRInt32 aEndOff);
PRBool IsDetached(){return mIsDetached;}
nsresult ComparePointToRange(nsIDOMNode* aParent, PRInt32 aOffset, PRInt32* aResult);
nsresult AddToListOf(nsIDOMNode* aNode);
nsresult RemoveFromListOf(nsIDOMNode* aNode);
nsresult ContentOwnsUs(nsIDOMNode* domNode);
};
// Make a new nsIDOMRange object
nsresult NS_NewRange(nsIDOMRange** aInstancePtrResult);
// Make a new nsIRangeUtils object
nsresult NS_NewRangeUtils(nsIRangeUtils** aInstancePtrResult);
/*************************************************************************************
* Utility routine to compare two "points", were a point is a node/offset pair
* Returns -1 if point1 < point2, 1, if point1 > point2,
* 0 if error or if point1 == point2.
************************************************************************************/
PRInt32 ComparePoints(nsIDOMNode* aParent1, PRInt32 aOffset1,
nsIDOMNode* aParent2, PRInt32 aOffset2);
/*************************************************************************************
* Utility routine to detect if a content node intersects a range
************************************************************************************/
PRBool IsNodeIntersectsRange(nsIContent* aNode, nsIDOMRange* aRange);
/*************************************************************************************
* Utility routine to detect if a content node starts before a range and/or
* ends after a range. If neither it is contained inside the range.
*
* XXX - callers responsibility to ensure node in same doc as range!
*
************************************************************************************/
nsresult CompareNodeToRange(nsIContent* aNode,
nsIDOMRange* aRange,
PRBool *outNodeBefore,
PRBool *outNodeAfter);
/*************************************************************************************
* Utility routine to create a pair of dom points to represent
* the start and end locations of a single node. Return false
* if we dont' succeed.
************************************************************************************/
PRBool GetNodeBracketPoints(nsIContent* aNode,
nsCOMPtr<nsIDOMNode>* outParent,
PRInt32* outStartOffset,
PRInt32* outEndOffset);
#endif /* nsRange_h___ */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,787 @@
/* -*- 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.
*
* The Initial Developer of the Original Code is Netscape
* Communications. Portions created by Netscape Communications are
* Copyright (C) 2001 by Netscape Communications. All
* Rights Reserved.
*
* Contributor(s):
* Vidur Apparao <vidur@netscape.com> (original author)
*/
#include "nsScriptLoader.h"
#include "nsIDOMCharacterData.h"
#include "nsParserUtils.h"
#include "nsICharsetConverterManager.h"
#include "nsICharsetConverterManager2.h"
#include "nsIUnicodeDecoder.h"
#include "nsICharsetAlias.h"
#include "nsIContent.h"
#include "nsHTMLAtoms.h"
#include "nsNetUtil.h"
#include "nsIScriptGlobalObject.h"
#include "nsIScriptContext.h"
#include "nsINodeInfo.h"
#include "nsINameSpaceManager.h"
#include "nsIScriptSecurityManager.h"
#include "nsIPrincipal.h"
#include "nsContentPolicyUtils.h"
#include "nsIDOMWindow.h"
#include "nsIHttpChannel.h"
#include "nsIScriptElement.h"
#include "nsIDocShell.h"
#include "jsapi.h"
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
//////////////////////////////////////////////////////////////
//
//////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////
// Per-request data structure
//////////////////////////////////////////////////////////////
class nsScriptLoadRequest : public nsISupports {
public:
nsScriptLoadRequest(nsIDOMHTMLScriptElement* aElement,
nsIScriptLoaderObserver* aObserver,
const char* aVersionString);
virtual ~nsScriptLoadRequest();
NS_DECL_ISUPPORTS
void FireScriptAvailable(nsresult aResult,
const nsAFlatString& aScript);
void FireScriptEvaluated(nsresult aResult);
nsCOMPtr<nsIDOMHTMLScriptElement> mElement;
nsCOMPtr<nsIScriptLoaderObserver> mObserver;
PRBool mLoading; // Are we still waiting for a load to complete?
PRBool mWasPending; // Processed immediately or pending
PRBool mIsInline; // Is the script inline or loaded?
// nsSharableString mScriptText; // Holds script for loaded scripts
nsString mScriptText;
const char* mJSVersion; // We don't own this string
nsCOMPtr<nsIURI> mURI;
PRInt32 mLineNo;
};
nsScriptLoadRequest::nsScriptLoadRequest(nsIDOMHTMLScriptElement* aElement,
nsIScriptLoaderObserver* aObserver,
const char* aVersionString) :
mElement(aElement), mObserver(aObserver),
mLoading(PR_TRUE), mWasPending(PR_FALSE),
mIsInline(PR_TRUE), mJSVersion(aVersionString), mLineNo(1)
{
NS_INIT_ISUPPORTS();
}
nsScriptLoadRequest::~nsScriptLoadRequest()
{
}
// The nsScriptLoadRequest is passed as the context to necko, and thus
// it needs to be threadsafe. Necko won't do anything with this
// context, but it will AddRef and Release it on other threads.
NS_IMPL_THREADSAFE_ISUPPORTS0(nsScriptLoadRequest)
void
nsScriptLoadRequest::FireScriptAvailable(nsresult aResult,
const nsAFlatString& aScript)
{
if (mObserver) {
mObserver->ScriptAvailable(aResult, mElement, mIsInline, mWasPending,
mURI, mLineNo,
aScript);
}
}
void
nsScriptLoadRequest::FireScriptEvaluated(nsresult aResult)
{
if (mObserver) {
mObserver->ScriptEvaluated(aResult, mElement, mIsInline, mWasPending);
}
}
//////////////////////////////////////////////////////////////
//
//////////////////////////////////////////////////////////////
nsScriptLoader::nsScriptLoader()
: mDocument(nsnull), mSuspendCount(0)
{
NS_INIT_ISUPPORTS();
}
nsScriptLoader::~nsScriptLoader()
{
mObservers.Clear();
PRUint32 i, count;
mPendingRequests.Count(&count);
for (i = 0; i < count; i++) {
nsCOMPtr<nsISupports> sup(mPendingRequests.ElementAt(i));
if (sup) {
nsScriptLoadRequest* req = NS_REINTERPRET_CAST(nsScriptLoadRequest*, sup.get());
req->FireScriptAvailable(NS_ERROR_ABORT, NS_LITERAL_STRING(""));
}
}
mPendingRequests.Clear();
}
NS_INTERFACE_MAP_BEGIN(nsScriptLoader)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIScriptLoader)
NS_INTERFACE_MAP_ENTRY(nsIScriptLoader)
NS_INTERFACE_MAP_ENTRY(nsIStreamLoaderObserver)
NS_INTERFACE_MAP_END
NS_IMPL_ADDREF(nsScriptLoader)
NS_IMPL_RELEASE(nsScriptLoader)
/* void init (in nsIDocument aDocument); */
NS_IMETHODIMP
nsScriptLoader::Init(nsIDocument *aDocument)
{
mDocument = aDocument;
return NS_OK;
}
/* void dropDocumentReference (); */
NS_IMETHODIMP
nsScriptLoader::DropDocumentReference()
{
mDocument = nsnull;
return NS_OK;
}
/* void addObserver (in nsIScriptLoaderObserver aObserver); */
NS_IMETHODIMP
nsScriptLoader::AddObserver(nsIScriptLoaderObserver *aObserver)
{
NS_ENSURE_ARG(aObserver);
mObservers.AppendElement(aObserver);
return NS_OK;
}
/* void removeObserver (in nsIScriptLoaderObserver aObserver); */
NS_IMETHODIMP
nsScriptLoader::RemoveObserver(nsIScriptLoaderObserver *aObserver)
{
NS_ENSURE_ARG(aObserver);
mObservers.RemoveElement(aObserver, 0);
return NS_OK;
}
PRBool
nsScriptLoader::InNonScriptingContainer(nsIDOMHTMLScriptElement* aScriptElement)
{
nsCOMPtr<nsIDOMNode> node(do_QueryInterface(aScriptElement));
nsCOMPtr<nsIDOMNode> parent;
node->GetParentNode(getter_AddRefs(parent));
while (parent) {
nsCOMPtr<nsIContent> content(do_QueryInterface(parent));
if (!content) {
break;
}
nsCOMPtr<nsINodeInfo> nodeInfo;
content->GetNodeInfo(*getter_AddRefs(nodeInfo));
NS_ASSERTION(nodeInfo, "element without node info");
if (nodeInfo) {
nsCOMPtr<nsIAtom> localName;
nodeInfo->GetNameAtom(*getter_AddRefs(localName));
// XXX noframes and noembed are currently unconditionally not
// displayed and processed. This might change if we support either
// prefs or per-document container settings for not allowing
// frames or plugins.
if (content->IsContentOfType(nsIContent::eHTML) &&
((localName.get() == nsHTMLAtoms::iframe) ||
(localName.get() == nsHTMLAtoms::noframes) ||
(localName.get() == nsHTMLAtoms::noembed))) {
return PR_TRUE;
}
}
node = parent;
node->GetParentNode(getter_AddRefs(parent));
}
return PR_FALSE;
}
/* void processScriptElement (in nsIDOMHTMLScriptElement aElement, in nsIScriptLoaderObserver aObserver); */
NS_IMETHODIMP
nsScriptLoader::ProcessScriptElement(nsIDOMHTMLScriptElement *aElement,
nsIScriptLoaderObserver *aObserver)
{
NS_ENSURE_ARG(aElement);
nsresult rv = NS_OK;
// We need a document to evaluate scripts.
if (!mDocument) {
return FireErrorNotification(NS_ERROR_FAILURE, aElement, aObserver);
}
// Check to see that the element is not in a container that
// suppresses script evaluation within it.
if (mSuspendCount || InNonScriptingContainer(aElement)) {
return FireErrorNotification(NS_ERROR_NOT_AVAILABLE, aElement, aObserver);
}
// See if script evaluation is enabled.
PRBool scriptsEnabled = PR_TRUE;
nsCOMPtr<nsIScriptGlobalObject> globalObject;
mDocument->GetScriptGlobalObject(getter_AddRefs(globalObject));
if (globalObject)
{
nsCOMPtr<nsIScriptContext> context;
if (NS_SUCCEEDED(globalObject->GetContext(getter_AddRefs(context)))
&& context)
context->GetScriptsEnabled(&scriptsEnabled);
}
// If scripts aren't enabled there's no point in going on.
if (!scriptsEnabled) {
return FireErrorNotification(NS_ERROR_NOT_AVAILABLE, aElement, aObserver);
}
PRBool isJavaScript = PR_TRUE;
const char* jsVersionString = nsnull;
nsAutoString language, type, src;
// Check the language attribute first, so type can trump language.
aElement->GetAttribute(NS_LITERAL_STRING("language"), language);
if (!language.IsEmpty()) {
isJavaScript = nsParserUtils::IsJavaScriptLanguage(language, &jsVersionString);
}
// Check the type attribute to determine language and version.
aElement->GetType(type);
if (!type.IsEmpty()) {
nsAutoString mimeType;
nsAutoString params;
nsParserUtils::SplitMimeType(type, mimeType, params);
isJavaScript = mimeType.EqualsIgnoreCase("application/x-javascript") ||
mimeType.EqualsIgnoreCase("text/javascript");
if (isJavaScript) {
JSVersion jsVersion = JSVERSION_DEFAULT;
if (params.Find("version=", PR_TRUE) == 0) {
if (params.Length() != 11 || params[8] != '1' || params[9] != '.')
jsVersion = JSVERSION_UNKNOWN;
else switch (params[10]) {
case '0': jsVersion = JSVERSION_1_0; break;
case '1': jsVersion = JSVERSION_1_1; break;
case '2': jsVersion = JSVERSION_1_2; break;
case '3': jsVersion = JSVERSION_1_3; break;
case '4': jsVersion = JSVERSION_1_4; break;
case '5': jsVersion = JSVERSION_1_5; break;
default: jsVersion = JSVERSION_UNKNOWN;
}
}
jsVersionString = JS_VersionToString(jsVersion);
}
}
// If this isn't JavaScript, we don't know how to evaluate.
// XXX How and where should we deal with other scripting languages??
if (!isJavaScript) {
return FireErrorNotification(NS_ERROR_NOT_AVAILABLE, aElement, aObserver);
}
// Create a request object for this script
nsScriptLoadRequest* request = new nsScriptLoadRequest(aElement, aObserver, jsVersionString);
if (!request) {
return FireErrorNotification(NS_ERROR_OUT_OF_MEMORY, aElement, aObserver);
}
// Temporarily hold on to the request
nsCOMPtr<nsISupports> reqsup(request);
// Check to see if we have a src attribute.
aElement->GetSrc(src);
if (!src.IsEmpty()) {
nsCOMPtr<nsIURI> baseURI, scriptURI;
// Use the SRC attribute value to load the URL
mDocument->GetBaseURL(*getter_AddRefs(baseURI));
rv = NS_NewURI(getter_AddRefs(scriptURI), src, nsnull, baseURI);
if (NS_FAILED(rv)) {
return FireErrorNotification(rv, aElement, aObserver);
}
// Check that the containing page is allowed to load this URI.
nsCOMPtr<nsIScriptSecurityManager> securityManager(do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv));
if (NS_FAILED(rv)) {
return FireErrorNotification(rv, aElement, aObserver);
}
rv = securityManager->CheckLoadURI(baseURI, scriptURI,
nsIScriptSecurityManager::ALLOW_CHROME);
if (NS_FAILED(rv)) {
return FireErrorNotification(rv, aElement, aObserver);
}
// After the security manager, the content-policy stuff gets a veto
if (globalObject) {
nsCOMPtr<nsIDOMWindow> domWin(do_QueryInterface(globalObject));
PRBool shouldLoad = PR_TRUE;
rv = NS_CheckContentLoadPolicy(nsIContentPolicy::SCRIPT,
scriptURI, aElement, domWin, &shouldLoad);
if (NS_SUCCEEDED(rv) && !shouldLoad) {
return FireErrorNotification(NS_ERROR_NOT_AVAILABLE, aElement, aObserver);
}
request->mURI = scriptURI;
request->mIsInline = PR_FALSE;
request->mWasPending = PR_TRUE;
request->mLoading = PR_TRUE;
// Add the request to our pending requests list
mPendingRequests.AppendElement(reqsup);
nsCOMPtr<nsILoadGroup> loadGroup;
nsCOMPtr<nsIStreamLoader> loader;
(void) mDocument->GetDocumentLoadGroup(getter_AddRefs(loadGroup));
nsCOMPtr<nsIDocShell> docshell;
rv = globalObject->GetDocShell(getter_AddRefs(docshell));
if (NS_FAILED(rv)) {
mPendingRequests.RemoveElement(reqsup, 0);
return FireErrorNotification(rv, aElement, aObserver);
}
// Get the referrer url from the document
nsCOMPtr<nsIURI> documentURI;
mDocument->GetDocumentURL(getter_AddRefs(documentURI));
nsCOMPtr<nsIInterfaceRequestor> prompter(do_QueryInterface(docshell));
nsCOMPtr<nsIChannel> channel;
rv = NS_NewStreamLoader(getter_AddRefs(loader), scriptURI, this,
reqsup, loadGroup, prompter,
nsIChannel::LOAD_NORMAL, documentURI,
nsIHttpChannel::REFERRER_INLINES);
if (NS_FAILED(rv)) {
mPendingRequests.RemoveElement(reqsup, 0);
return FireErrorNotification(rv, aElement, aObserver);
}
}
} else {
request->mLoading = PR_FALSE;
request->mIsInline = PR_TRUE;
mDocument->GetDocumentURL(getter_AddRefs(request->mURI));
nsCOMPtr<nsIScriptElement> scriptElement(do_QueryInterface(aElement));
if (scriptElement) {
PRUint32 lineNumber;
scriptElement->GetLineNumber(&lineNumber);
request->mLineNo = lineNumber;
}
PRUint32 pendingRequestCount;
mPendingRequests.Count(&pendingRequestCount);
// If we've got existing pending requests, add ourselves
// to this list.
if (pendingRequestCount) {
request->mWasPending = PR_TRUE;
mPendingRequests.AppendElement(reqsup);
}
else {
request->mWasPending = PR_FALSE;
rv = ProcessRequest(request);
}
}
return rv;
}
nsresult
nsScriptLoader::FireErrorNotification(nsresult aResult,
nsIDOMHTMLScriptElement* aElement,
nsIScriptLoaderObserver* aObserver)
{
PRUint32 i, count;
mObservers.Count(&count);
for (i = 0; i < count; i++) {
nsCOMPtr<nsISupports> sup(dont_AddRef(mObservers.ElementAt(i)));
nsCOMPtr<nsIScriptLoaderObserver> observer(do_QueryInterface(sup));
if (observer) {
observer->ScriptAvailable(aResult, aElement,
PR_TRUE, PR_FALSE,
nsnull, 0,
NS_LITERAL_STRING(""));
}
}
if (aObserver) {
aObserver->ScriptAvailable(aResult, aElement,
PR_TRUE, PR_FALSE,
nsnull, 0,
NS_LITERAL_STRING(""));
}
return aResult;
}
nsresult
nsScriptLoader::ProcessRequest(nsScriptLoadRequest* aRequest)
{
NS_ENSURE_ARG(aRequest);
nsAFlatString* script;
nsAutoString textData;
// If there's no script text, we try to get it from the element
if (aRequest->mIsInline) {
// XXX This is inefficient - GetText makes multiple
// copies.
aRequest->mElement->GetText(textData);
script = &textData;
}
else {
script = &aRequest->mScriptText;
}
FireScriptAvailable(NS_OK, aRequest, *script);
nsresult rv = EvaluateScript(aRequest, *script);
FireScriptEvaluated(rv, aRequest);
return rv;
}
void
nsScriptLoader::FireScriptAvailable(nsresult aResult,
nsScriptLoadRequest* aRequest,
const nsAFlatString& aScript)
{
PRUint32 i, count;
mObservers.Count(&count);
for (i = 0; i < count; i++) {
nsCOMPtr<nsISupports> sup(dont_AddRef(mObservers.ElementAt(i)));
nsCOMPtr<nsIScriptLoaderObserver> observer(do_QueryInterface(sup));
if (observer) {
observer->ScriptAvailable(aResult, aRequest->mElement,
aRequest->mIsInline, aRequest->mWasPending,
aRequest->mURI, aRequest->mLineNo,
aScript);
}
}
aRequest->FireScriptAvailable(aResult, aScript);
}
void
nsScriptLoader::FireScriptEvaluated(nsresult aResult,
nsScriptLoadRequest* aRequest)
{
PRUint32 i, count;
mObservers.Count(&count);
for (i = 0; i < count; i++) {
nsCOMPtr<nsISupports> sup(dont_AddRef(mObservers.ElementAt(i)));
nsCOMPtr<nsIScriptLoaderObserver> observer(do_QueryInterface(sup));
if (observer) {
observer->ScriptEvaluated(aResult, aRequest->mElement,
aRequest->mIsInline, aRequest->mWasPending);
}
}
aRequest->FireScriptEvaluated(aResult);
}
nsresult
nsScriptLoader::EvaluateScript(nsScriptLoadRequest* aRequest,
const nsAFlatString& aScript)
{
nsresult rv = NS_OK;
// We need a document to evaluate scripts.
if (!mDocument) {
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIScriptGlobalObject> globalObject;
mDocument->GetScriptGlobalObject(getter_AddRefs(globalObject));
NS_ENSURE_TRUE(globalObject, NS_ERROR_FAILURE);
nsCOMPtr<nsIScriptContext> context;
rv = globalObject->GetContext(getter_AddRefs(context));
if (NS_FAILED(rv) || !context) {
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIPrincipal> principal;
mDocument->GetPrincipal(getter_AddRefs(principal));
// We can survive without a principal, but we really should
// have one.
NS_ASSERTION(principal, "principal required for document");
nsAutoString ret;
nsCAutoString url;
if (aRequest->mURI) {
rv = aRequest->mURI->GetSpec(url);
if (NS_FAILED(rv)) {
return rv;
}
}
context->SetProcessingScriptTag(PR_TRUE);
PRBool isUndefined;
context->EvaluateString(aScript, nsnull, principal, url.get(),
aRequest->mLineNo, aRequest->mJSVersion,
ret, &isUndefined);
context->SetProcessingScriptTag(PR_FALSE);
return rv;
}
void
nsScriptLoader::ProcessPendingReqests()
{
nsCOMPtr<nsISupports> reqsup(dont_AddRef(mPendingRequests.ElementAt(0)));
nsScriptLoadRequest* request = NS_REINTERPRET_CAST(nsScriptLoadRequest*,
reqsup.get());
while (request && !request->mLoading) {
mPendingRequests.RemoveElement(reqsup, 0);
ProcessRequest(request);
reqsup = dont_AddRef(mPendingRequests.ElementAt(0));
request = NS_REINTERPRET_CAST(nsScriptLoadRequest*, reqsup.get());
}
}
NS_IMETHODIMP
nsScriptLoader::OnStreamComplete(nsIStreamLoader* aLoader,
nsISupports* aContext,
nsresult aStatus,
PRUint32 stringLen,
const char* string)
{
nsresult rv;
nsScriptLoadRequest* request = NS_REINTERPRET_CAST(nsScriptLoadRequest*, aContext);
NS_ASSERTION(request, "null request in stream complete handler");
if (!request) {
return NS_ERROR_FAILURE;
}
if (NS_FAILED(aStatus)) {
mPendingRequests.RemoveElement(aContext, 0);
FireScriptAvailable(aStatus, request, NS_LITERAL_STRING(""));
ProcessPendingReqests();
return NS_OK;
}
// If we don't have a document, then we need to abort further
// evaluation.
if (!mDocument) {
mPendingRequests.RemoveElement(aContext, 0);
FireScriptAvailable(NS_ERROR_NOT_AVAILABLE, request,
NS_LITERAL_STRING(""));
ProcessPendingReqests();
return NS_OK;
}
if (stringLen) {
nsAutoString characterSet, preferred;
nsCOMPtr<nsIUnicodeDecoder> unicodeDecoder;
nsCOMPtr<nsIChannel> channel;
nsCOMPtr<nsIRequest> req;
rv = aLoader->GetRequest(getter_AddRefs(req));
NS_ASSERTION(req, "StreamLoader's request went away prematurely");
if (NS_FAILED(rv)) return rv;
channel = do_QueryInterface(req);
if (channel) {
nsCAutoString charsetVal;
rv = channel->GetContentCharset(charsetVal);
if (NS_SUCCEEDED(rv)) {
characterSet = NS_ConvertASCIItoUCS2(charsetVal);
nsCOMPtr<nsICharsetAlias> calias(do_GetService(kCharsetAliasCID,&rv));
if(NS_SUCCEEDED(rv) && calias) {
rv = calias->GetPreferred(characterSet, preferred);
if(NS_SUCCEEDED(rv)) {
characterSet = preferred;
}
}
}
}
if (NS_FAILED(rv) || characterSet.IsEmpty()) {
nsAutoString charset;
// Check the charset attribute to determine script charset.
request->mElement->GetCharset(charset);
if (!charset.IsEmpty()) {
// Get the preferred charset from charset alias service if there
// is one.
nsCOMPtr<nsICharsetAlias> calias(do_GetService(kCharsetAliasCID,&rv));
if (NS_SUCCEEDED(rv)) {
rv = calias->GetPreferred(charset, preferred);
if(NS_SUCCEEDED(rv)) {
characterSet = preferred;
}
}
}
}
if (NS_FAILED(rv) || characterSet.IsEmpty()) {
// charset from document default
rv = mDocument->GetDocumentCharacterSet(characterSet);
}
NS_ASSERTION(NS_SUCCEEDED(rv), "Could not get document charset!");
if (characterSet.IsEmpty()) {
// fall back to ISO-8851-1, see bug 118404
characterSet = NS_LITERAL_STRING("ISO-8859-1");
}
nsCOMPtr<nsICharsetConverterManager> charsetConv =
do_GetService(kCharsetConverterManagerCID, &rv);
if (NS_SUCCEEDED(rv) && charsetConv) {
rv = charsetConv->GetUnicodeDecoder(&characterSet,
getter_AddRefs(unicodeDecoder));
}
// converts from the charset to unicode
if (NS_SUCCEEDED(rv)) {
PRInt32 unicodeLength = 0;
rv = unicodeDecoder->GetMaxLength(string, stringLen, &unicodeLength);
if (NS_SUCCEEDED(rv)) {
typedef nsSharedBufferHandle<PRUnichar>* HandlePtr;
typedef nsAString* StrPtr;
HandlePtr handle = NS_AllocateContiguousHandleWithData(HandlePtr(0), NS_STATIC_CAST(PRUint32, unicodeLength+1), StrPtr(0));
PRUnichar *ustr = (PRUnichar *)handle->DataStart();
PRInt32 consumedLength = 0;
PRInt32 originalLength = stringLen;
PRInt32 convertedLength = 0;
PRInt32 bufferLength = unicodeLength;
do {
rv = unicodeDecoder->Convert(string, (PRInt32 *) &stringLen, ustr,
&unicodeLength);
if (NS_FAILED(rv)) {
// if we failed, we consume one byte, replace it with U+FFFD
// and try the conversion again.
ustr[unicodeLength++] = (PRUnichar)0xFFFD;
ustr += unicodeLength;
unicodeDecoder->Reset();
}
string += ++stringLen;
consumedLength += stringLen;
stringLen = originalLength - consumedLength;
convertedLength += unicodeLength;
unicodeLength = bufferLength - convertedLength;
} while (NS_FAILED(rv) && (originalLength > consumedLength) && (bufferLength > convertedLength));
handle->DataEnd(handle->DataStart() + convertedLength);
nsSharableString tempStr(handle);
request->mScriptText = tempStr;
}
}
NS_ASSERTION(NS_SUCCEEDED(rv),
"Could not convert external JavaScript to Unicode!");
if (NS_FAILED(rv)) {
mPendingRequests.RemoveElement(aContext, 0);
FireScriptAvailable(rv, request, NS_LITERAL_STRING(""));
ProcessPendingReqests();
return NS_OK;
}
//-- Merge the principal of the script file with that of the document
if (channel) {
nsCOMPtr<nsISupports> owner;
channel->GetOwner(getter_AddRefs(owner));
nsCOMPtr<nsIPrincipal> prin;
if (owner) {
prin = do_QueryInterface(owner, &rv);
}
rv = mDocument->AddPrincipal(prin);
if (NS_FAILED(rv)) {
mPendingRequests.RemoveElement(aContext, 0);
FireScriptAvailable(rv, request, NS_LITERAL_STRING(""));
ProcessPendingReqests();
return NS_OK;
}
}
}
// If we're not the first in the pending list, we mark ourselves
// as loaded and just stay on the list.
nsCOMPtr<nsISupports> first(dont_AddRef(mPendingRequests.ElementAt(0)));
if (first != aContext) {
request->mLoading = PR_FALSE;
return NS_OK;
}
mPendingRequests.RemoveElement(aContext, 0);
ProcessRequest(request);
// Process any pending requests
ProcessPendingReqests();
return NS_OK;
}
NS_IMETHODIMP
nsScriptLoader::Suspend()
{
mSuspendCount++;
return NS_OK;
}
NS_IMETHODIMP
nsScriptLoader::Resume()
{
NS_ASSERTION((mSuspendCount > 0), "nsScriptLoader call to resume() unbalanced");
mSuspendCount--;
return NS_OK;
}

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